coco格式的json测试文件
推测输出数据的格式:
./half1/COCO_val2014_000000164115.jpg 500 500 8 105.46875 189.90384615384613 327.52403846153845 416.46634615384613
输出的格式中没有打印推测结果中的confidence,可以自己加上.
输出的顺序为名称,长,宽,类别,左上x,左上y,右下x,右下y.
运行测试的时候需要输出的格式是左上x,左上y,W,H
import re
import json
#coco x1,y1,w,h
labels = ["person",
"bicycle", "car", "motorbike", "aeroplane",
"bus", "train", "truck", "boat", "traffic light",
"fire hydrant", "stop sign", "parking meter", "bench",
"bird", "cat", "dog", "horse", "sheep", "cow", "elephant",
"bear", "zebra", "giraffe", "backpack", "umbrella", "handbag",
"tie", "suitcase", "frisbee", "skis", "snowboard", "sports ball",
"kite", "baseball bat", "baseball glove", "skateboard", "surfboard",
"tennis racket", "bottle", "wine glass", "cup", "fork", "knife", "spoon",
"bowl", "banana", "apple", "sandwich", "orange", "broccoli", "carrot", "hot dog",
"pizza", "donut", "cake", "chair", "sofa", "potted plant",