def _calc_metrics(self, bboxes, anno): valid = ~np.any(np.isnan(anno), axis=1) if len(valid) == 0: ops.sys_print('Warning: no valid annotations') return None, None else: ious = ops.rect_iou(bboxes[valid, :], anno[valid, :]) center_errors = ops.center_error(bboxes[valid, :], anno[valid, :]) return ious, center_errors
def _calc_metrics(self, bboxes, anno): # can be modified by children classes ious = ops.rect_iou(bboxes, anno) center_errors = ops.center_error(bboxes, anno) return ious, center_errors