"Evaluation results for {}: \n".format(iou_type)+create_small_table(results)
)
ifnotnp.isfinite(sum(results.values())):
self._logger.info("Some metrics cannot be computed and is shown as NaN.")
ifclass_namesisNoneorlen(class_names)<=1:
returnresults
# Compute per-category AP
# from https://github.com/facebookresearch/Detectron/blob/a6a835f5b8208c45d0dce217ce9bbda915f44df7/detectron/datasets/json_dataset_evaluator.py#L222-L252 # noqa
precisions=coco_eval.eval["precision"]
# precision has dims (iou, recall, cls, area range, max dets)