|
|
|
@ -228,20 +228,20 @@ class IOU(PrimitiveWithInfer):
|
|
|
|
|
|
|
|
|
|
Inputs:
|
|
|
|
|
- **anchor_boxes** (Tensor) - Anchor boxes, tensor of shape (N, 4). "N" indicates the number of anchor boxes,
|
|
|
|
|
and the value "4" refers to "x0", "x1", "y0", and "y1".
|
|
|
|
|
and the value "4" refers to "x0", "x1", "y0", and "y1". Data type must be float16.
|
|
|
|
|
- **gt_boxes** (Tensor) - Ground truth boxes, tensor of shape (M, 4). "M" indicates the number of ground
|
|
|
|
|
truth boxes, and the value "4" refers to "x0", "x1", "y0", and "y1".
|
|
|
|
|
truth boxes, and the value "4" refers to "x0", "x1", "y0", and "y1". Data type must be float16.
|
|
|
|
|
|
|
|
|
|
Outputs:
|
|
|
|
|
Tensor, the 'iou' values, tensor of shape (M, N).
|
|
|
|
|
Tensor, the 'iou' values, tensor of shape (M, N), with data type float16.
|
|
|
|
|
|
|
|
|
|
Raises:
|
|
|
|
|
KeyError: When `mode` is not 'iou' or 'iof'.
|
|
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
>>> iou = P.IOU()
|
|
|
|
|
>>> anchor_boxes = Tensor(np.random.randint(1.0, 5.0, [3, 4]), mindspore.float32)
|
|
|
|
|
>>> gt_boxes = Tensor(np.random.randint(1.0, 5.0, [3, 4]), mindspore.float32)
|
|
|
|
|
>>> anchor_boxes = Tensor(np.random.randint(1.0, 5.0, [3, 4]), mindspore.float16)
|
|
|
|
|
>>> gt_boxes = Tensor(np.random.randint(1.0, 5.0, [3, 4]), mindspore.float16)
|
|
|
|
|
>>> iou(anchor_boxes, gt_boxes)
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|