【目標檢測】coco工具包驗證時錯誤Results do not correspond to current coco set

用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文件中刪除就好了~

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章