AssertionError: Results do not correspond to current coco set

提交COCO Detection Challenge (Bounding Box)时出现错误:

WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
/opt/conda/lib/python2.7/site-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')
Traceback (most recent call last):
  File "/tmp/codalab/tmpbULj9X/run/program/run.py", line 117, in 
    cocoDt=cocoGt.loadRes(resFile)
  File "/opt/conda/lib/python2.7/site-packages/pycocotools/coco.py", line 317, in loadRes
    'Results do not correspond to current coco set'
AssertionError: Results do not correspond to current coco set

原因在于MS COCO 2017的测试集数据被划分成了两个子集:Test-Dev和Test-Challege,每个子集各20K张图片,但是这两个子集的图片是放在一个文件夹里面的,如果把这个文件夹里面的40K张图片的预测文件一起提交到服务器,就会出现上面的错误.

解决的方法:根据image_info_test-dev2017.json文件,把Test-Dev数据集包含的图片找出来,只提交这些图片的预测文件,就不会出现这个错误了.

 

posted @ 2020-09-15 19:49  MSTK  阅读(2989)  评论(0编辑  收藏  举报