!32957 rectify API doc of ops.NMSWithMask
Merge pull request !32957 from looop5/code_docs_NMSWithMask
This commit is contained in:
commit
ca2e44a4b0
|
@ -26,6 +26,6 @@ mindspore.ops.Log
|
||||||
**异常:**
|
**异常:**
|
||||||
|
|
||||||
- **TypeError** - `x` 不是Tensor。
|
- **TypeError** - `x` 不是Tensor。
|
||||||
- **TypeError** - 在GPU和CPU平台上运行时,`x` 的数据类型不是float16、float32或float64。
|
- **TypeError** - 在GPU和CPU平台上运行时, `x` 的数据类型不是float16、float32或float64。
|
||||||
- **TypeError** - 在Ascend平台上运行时,`x` 的数据类型不是float16或float32。
|
- **TypeError** - 在Ascend平台上运行时, `x` 的数据类型不是float16或float32。
|
||||||
|
|
||||||
|
|
|
@ -4774,9 +4774,10 @@ class Asin(Primitive):
|
||||||
class NMSWithMask(PrimitiveWithInfer):
|
class NMSWithMask(PrimitiveWithInfer):
|
||||||
r"""
|
r"""
|
||||||
When object detection problem is performed in the computer vision field, object detection algorithm generates
|
When object detection problem is performed in the computer vision field, object detection algorithm generates
|
||||||
a plurality of bounding boxes. Selects some bounding boxes in descending order of score(Descending order is not
|
a plurality of bounding boxes. Use the box with the highest score, calculate the overlap between other boxes and
|
||||||
supported in Ascend platform currently). Use the box with the highest score calculate the overlap between other
|
the current box, and delete the box based on a certain threshold(IOU). On Ascend platform, the input box score is
|
||||||
boxes and the current box, and delete the box based on a certain threshold(IOU). The IOU is as follows,
|
ignored, which only selects boexs based on the IOU between boxes, which means if you want to remove boxes that has
|
||||||
|
lower scores, you need to sort the input boxes by score in descending order in advance. The IOU is as follows,
|
||||||
|
|
||||||
.. math::
|
.. math::
|
||||||
\text{IOU} = \frac{\text{Area of Overlap}}{\text{Area of Union}}
|
\text{IOU} = \frac{\text{Area of Overlap}}{\text{Area of Union}}
|
||||||
|
@ -4796,14 +4797,16 @@ class NMSWithMask(PrimitiveWithInfer):
|
||||||
The data type must be float16 or float32.
|
The data type must be float16 or float32.
|
||||||
|
|
||||||
Outputs:
|
Outputs:
|
||||||
tuple[Tensor], tuple of three tensors, they are selected_boxes, selected_idx and selected_mask.
|
tuple[Tensor], tuple of three tensors, they are output_boxes, output_idx and selected_mask.
|
||||||
|
|
||||||
- **selected_boxes** (Tensor) - The shape of tensor is :math:`(N, 5)`. The list of bounding boxes
|
- **output_boxes** (Tensor) - The shape of tensor is :math:`(N, 5)`. On GPU and CPU platform, it is a sorted
|
||||||
after non-max suppression calculation.
|
list of bounding boxes by sorting the input `bboxes` in descending order of score. On Ascend platform,
|
||||||
- **selected_idx** (Tensor) - The shape of tensor is :math:`(N,)`. The indexes list of
|
it is same as input `bboxes`.
|
||||||
valid input bounding boxes.
|
- **output_idx** (Tensor) - The shape of tensor is :math:`(N,)`. The indexes list of `output_boxes`.
|
||||||
- **selected_mask** (Tensor) - The shape of tensor is :math:`(N,)`. A mask list of
|
- **selected_mask** (Tensor) - The shape of tensor is :math:`(N,)`. A mask list of
|
||||||
valid output bounding boxes.
|
valid output bounding boxes. Apply this mask on `output_boxes` to get the list of bounding boxes after
|
||||||
|
non-max suppression calculation, or apply this mask on `output_idx` to get the indexes list of bounding boxes
|
||||||
|
after non-max suppression calculation.
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
ValueError: If the `iou_threshold` is not a float number.
|
ValueError: If the `iou_threshold` is not a float number.
|
||||||
|
|
Loading…
Reference in New Issue