-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
This is the function compute_MMR() called by tools/test.py. It has no return of the final mMR result.
def compute_MMR(json_result_file, anno_file):
mr_res_dict = OrderedDict()
iou_type="bbox"
id_c = 0
mr_mode = "crowdhuman"
for id_setup in range(3,4):
coco_mod_gt = COCO_MD(anno_file)
coco_mod_dt = coco_mod_gt.loadRes(str(json_result_file))
imgIds = sorted(coco_mod_gt.getImgIds())
# imgIds = sorted(iduse)
coco_mr_eval = COCOMReval(coco_mod_gt, coco_mod_dt, iou_type)
coco_mr_eval.params.imgIds = imgIds
coco_mr_eval.evaluate(id_setup)
coco_mr_eval.accumulate()
mean_s = coco_mr_eval.summarize(id_setup)
if mr_mode == "crowdhuman":
if id_c == 0:
mr_res_dict["Reasonable"] = mean_s
elif id_c == 1:
mr_res_dict["Small"] = mean_s
elif id_c == 2:
mr_res_dict["Heavy"] = mean_s
elif id_c == 3:
mr_res_dict["All"] = mean_s
elif mr_mode == "citypersons":
if id_c == 0:
mr_res_dict["Reasonable"] = mean_s
elif id_c == 1:
mr_res_dict["Bare"] = mean_s
elif id_c == 2:
mr_res_dict["Partial"] = mean_s
elif id_c == 3:
mr_res_dict["Heavy"] = mean_s
id_c += 1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels