提交 43a8d15b 编写于 作者: W Waleed Abdulla

Pass model to evaluate_coco() to allow importing.

上级 c329f256
......@@ -251,7 +251,7 @@ def build_coco_results(dataset, image_ids, rois, class_ids, scores, masks):
return results
def evaluate_coco(dataset, coco, eval_type="bbox", limit=0):
def evaluate_coco(model, dataset, coco, eval_type="bbox", limit=0):
"""Runs official COCO evaluation.
dataset: A Dataset object with valiadtion data
eval_type: "bbox" or "segm" for bounding box or segmentation evaluation
......@@ -409,7 +409,7 @@ if __name__ == '__main__':
dataset_val.prepare()
# TODO: evaluating on 500 images. Set to 0 to evaluate on all images.
evaluate_coco(dataset_val, coco, "bbox", limit=500)
evaluate_coco(model, dataset_val, coco, "bbox", limit=500)
else:
print("'{}' is not recognized. "
"Use 'train' or 'evaluate'".format(args.command))
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册