diff --git a/test.py b/test.py index f8739866..df5a886b 100644 --- a/test.py +++ b/test.py @@ -75,7 +75,7 @@ def test( for di, d in enumerate(detections): jdict.append({ 'image_id': int(Path(paths[si]).stem.split('_')[-1]), - 'category_id': coco91class(int(d[6])), + 'category_id': coco91class[int(d[6])], 'bbox': [float3(x) for x in box[di]], 'score': float3(d[4] * d[5]) }) diff --git a/utils/gcp.sh b/utils/gcp.sh index 7315c3c2..208871a3 100755 --- a/utils/gcp.sh +++ b/utils/gcp.sh @@ -7,7 +7,7 @@ bash yolov3/data/get_coco_dataset.sh # Start sudo rm -rf yolov3 && git clone https://github.com/ultralytics/yolov3 sudo rm -rf cocoapi && git clone https://github.com/cocodataset/cocoapi && cd cocoapi/PythonAPI && make && cd ../.. && cp -r cocoapi/PythonAPI/pycocotools yolov3 -cd yolov3 && python3 test.py --coco-map +cd yolov3 && python3 test.py --save-json # Resume python3 train.py --resume