Skip to content
Snippets Groups Projects
Commit 424299cc authored by Tzu-Chan (Alice) Chuang's avatar Tzu-Chan (Alice) Chuang Committed by Kai Chen
Browse files

Add exceptions handling while validating (#975)

* Add exceptions handling while validating

* fix lint

* add Exception type
parent ca7b5216
No related branches found
No related tags found
No related merge requests found
......@@ -145,7 +145,11 @@ class CocoDistEvalmAPHook(DistEvalHook):
cocoGt = self.dataset.coco
imgIds = cocoGt.getImgIds()
for res_type in res_types:
cocoDt = cocoGt.loadRes(result_files[res_type])
try:
cocoDt = cocoGt.loadRes(result_files[res_type])
except IndexError:
print('No prediction found.')
break
iou_type = res_type
cocoEval = COCOeval(cocoGt, cocoDt, iou_type)
cocoEval.params.imgIds = imgIds
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment