Skip to content

YOLOv5 Tutorial Colab COCO test-dev2017 issue #2649

@NicoloPosta

Description

@NicoloPosta

❔Question

I'm using the Colab YOLOv5 Tutorial jupyter notebook, i'm in the section COCO test-dev2017 and i'm getting this output when i run the following command !python test.py --weights yolov5s.pt --data coco.yaml --task test:

Namespace(augment=False, batch_size=32, conf_thres=0.001, data='./data/coco.yaml', device='', exist_ok=False, img_size=640, iou_thres=0.6, name='exp', project='runs/test', save_conf=False, save_hybrid=False, save_json=True, save_txt=False, single_cls=False, task='test', verbose=False, weights=['yolov5s.pt'])
YOLOv5 🚀 v4.0-169-g1e8ab3f torch 1.8.0+cu101 CUDA:0 (Tesla T4, 15109.75MB)

Fusing layers... 
Model Summary: 224 layers, 7266973 parameters, 0 gradients, 17.0 GFLOPS
test: Scanning '../coco/test-dev2017' images and labels... 0 found, 20288 missing, 0 empty, 0 corrupted: 100% 20288/20288 [00:17<00:00, 1142.06it/s]
test: WARNING: No labels found in ../coco/test-dev2017.cache. See https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data
test: New cache created: ../coco/test-dev2017.cache
               Class      Images      Labels           P           R      mAP@.5  mAP@.5:.95: 100% 634/634 [03:38<00:00,  2.90it/s]
                 all       20288           0           0           0           0           0
Speed: 3.0/3.0/6.0 ms inference/NMS/total per 640x640 image at batch-size 32
/usr/local/lib/python3.7/dist-packages/seaborn/matrix.py:194: RuntimeWarning: All-NaN slice encountered
  vmin = np.nanmin(calc_data)
/usr/local/lib/python3.7/dist-packages/seaborn/matrix.py:199: RuntimeWarning: All-NaN slice encountered
  vmax = np.nanmax(calc_data)

Evaluating pycocotools mAP... saving runs/test/exp2/yolov5s_predictions.json...
loading annotations into memory...
Done (t=0.96s)
creating index...
index created!
Loading and preparing results...
pycocotools unable to run: Results do not correspond to current coco set
Results saved to runs/test/exp

I think the problem is in this line:

test: Scanning '../coco/test-dev2017' images and labels... 0 found, 20288 missing, 0 empty, 0 corrupted: 100% 20288/20288

because the ../coco/test-dev2017 does not exist in the coco folder that gets downloaded by following the jupyter notebook line by line.

I've noticed that the test-dev2017 lables aren't present in the coco folder mentioned before, maybe that's the reason why i'm getting this other error too:

pycocotools unable to run: Results do not correspond to current coco set

Probably since it was a competition the test-dev2017 lables are not publicly available and so the results must be submitted to the evaluation server.
If it's how i said can you explain me how to submit them to the correct evaluation server since i can't figure it out myself?

In addition i've found another error in the same section:

(Original)

torch.hub.download_url_to_file('https://github.com/ultralytics/yolov5/releases/download/v1.0/coco2017labels.zip', 'tmp.zip')
!unzip -q tmp.zip -d ../ && rm tmp.zip  # unzip labels
!f="test2017.zip" && curl http://images.cocodataset.org/zips/$f -o $f && unzip -q $f && rm $f  # 7GB,  41k images
%mv ./test2017 ./coco/images && mv ./coco ../  # move images to /coco and move /coco next to /yolov5

(Resolved)

torch.hub.download_url_to_file('https://github.com/ultralytics/yolov5/releases/download/v1.0/coco2017labels.zip', 'tmp.zip')
!unzip -q tmp.zip -d ../ && rm tmp.zip  # unzip labels
!f="test2017.zip" && curl http://images.cocodataset.org/zips/$f -o $f && unzip -q $f && rm $f  # 7GB,  41k images
%mv ./test2017 ../coco/images  # move images to /coco

Additional context

I'm using free version of Google Colab for funning the jupyter

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions