utils.box.multibox_detection

utils.box.multibox_detection#

multibox_detection(cls_probs: Tensor, offset_preds: Tensor, anchors: Tensor, nms_threshold: float = 0.1, pos_threshold: float = 0.009999999) Tensor[source]#

Predict bounding boxes using non-maximum suppression

Parameters:
  • cls_probs (torch.Tensor) – Shape [batch, anchor, num_classes + 1]

  • offset_preds (torch.Tensor) – Shape [batch, anchor, 4]

  • anchors (torch.Tensor) – Shape [anchor, 4]

  • nms_threshold (float, optional) – Defaults to 0.1

  • pos_threshold (float, optional) – Defaults to 0.009999999

Returns:

Shape [batch, anchor, 6]

One label contains (class, iou, luw, luh, rdw, rdh)

Return type:

torch.Tensor