用CenterNet在自己的制作的数据集上测试mAP,结果报错:Results do not correspond to current coco set

搜了一圈都没有搜到,然后看coco,py代码:

assert set(annsImgIds) == (set(annsImgIds) & set(self.getImgIds())), \
               'Results do not correspond to current coco set'

这个断言的作用是:判断你的json文件内,所有image的id是否和你annotations中出现的图片id有对应

后来发现,我有一些图片里面是空,这张图片上没有annotations,所以id的数量会对不上,只需要把没有注释的图片从json文件中删除就好了~

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐