Shortcuts

mmcv.ops.nms_match

mmcv.ops.nms_match(dets: Union[torch.Tensor, numpy.ndarray], iou_threshold: float)List[Union[numpy.ndarray, torch.Tensor]][source]

Matched dets into different groups by NMS.

NMS match is Similar to NMS but when a bbox is suppressed, nms match will record the indice of suppressed bbox and form a group with the indice of kept bbox. In each group, indice is sorted as score order.

Parameters
  • dets (torch.Tensor | np.ndarray) – Det boxes with scores, shape (N, 5).

  • iou_threshold (float) – IoU thresh for NMS.

Returns

The outer list corresponds different matched group, the inner Tensor corresponds the indices for a group in score order.

Return type

list[torch.Tensor | np.ndarray]