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
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment