diff --git a/fluid/PaddleCV/rcnn/eval_coco_map.py b/fluid/PaddleCV/rcnn/eval_coco_map.py index 06ae3589065d849fda461bc41fa0abf4abd94515..6b01da55ade6e9b5dabf370c30208c465028df9f 100644 --- a/fluid/PaddleCV/rcnn/eval_coco_map.py +++ b/fluid/PaddleCV/rcnn/eval_coco_map.py @@ -111,8 +111,10 @@ def eval(): assert len(dts_res) > 0, "The number of valid bbox detected is zero.\n \ Please use reasonable model and check input data." - assert len(segms_res) > 0, "The number of valid mask detected is zero.\n \ - Please use reasonable model and check input data.." + if cfg.MASK_ON: + assert len( + segms_res) > 0, "The number of valid mask detected is zero.\n \ + Please use reasonable model and check input data.." with open("detection_bbox_result.json", 'w') as outfile: json.dump(dts_res, outfile)