Hive.evaluation.detection.matching module#
- Hive.evaluation.detection.matching.matching_batch(iou_fn, iou_thresholds, pred_boxes, pred_classes, pred_scores, gt_boxes, gt_classes, gt_ignore, max_detections=100)[source]#
Match boxes of a batch to corresponding ground truth for each category independently
- Parameters:
iou_fn (
Callable[[ndarray,ndarray],ndarray]) – compute overlap for each pairiou_thresholds (
Sequence[float]) – defined which IoU thresholds should be evaluatedpred_boxes (
Sequence[ndarray]) – predicted boxes from single batch; List[[D, dim * 2]], D number of predictionspred_classes (
Sequence[ndarray]) – predicted classes from a single batch; List[[D]], D number of predictionspred_scores (
Sequence[ndarray]) – predicted score for each bounding box; List[[D]], D number of predictionsgt_boxes (
Sequence[ndarray]) – ground truth boxes; List[[G, dim * 2]], G number of ground truthgt_classes (
Sequence[ndarray]) – ground truth classes; List[[G]], G number of ground truthgt_ignore (
Sequence[Sequence[bool]]) – specified if which ground truth boxes are not counted as true positives (detections which match theses boxes are not counted as false positives either); List[[G]], G number of ground truthmax_detections (
int) – maximum number of detections which should be evaluated
- Return type:
List[Dict[int,Dict[str,ndarray]]]- Returns:
- List[Dict[int, Dict[str, np.ndarray]]]
matched detections [dtMatches] and ground truth [gtMatches] boxes [str, np.ndarray] for each category (stored in dict keys) for each image (list)