NonMaximumSuppression Class Reference#
3 min read time
Class for managing the NMS operator. More...
#include <op_non_max_suppression.hpp>

Public Member Functions | |
NonMaximumSuppression () | |
Construct a new Op Non Max Suppression object. More... | |
void | operator() (hipStream_t stream, const Tensor &input, const Tensor &output, const Tensor &scores, float scoreThreshold, float iouThreshold, const eDeviceType device=eDeviceType::GPU) const |
Executes the Non-Maximum Suppression operation. This object performs Non-Maximum Suppression on bounding boxes based on scores a score threshold, and an IoU threshold. More... | |
~NonMaximumSuppression () | |
Destroy the Op Non Max Suppression object. More... | |
![]() | |
virtual | ~IOperator () |
Detailed Description
Class for managing the NMS operator.
Constructor & Destructor Documentation
◆ NonMaximumSuppression()
|
inline |
Construct a new Op Non Max Suppression object.
◆ ~NonMaximumSuppression()
|
inline |
Destroy the Op Non Max Suppression object.
Member Function Documentation
◆ operator()()
void roccv::NonMaximumSuppression::operator() | ( | hipStream_t | stream, |
const Tensor & | input, | ||
const Tensor & | output, | ||
const Tensor & | scores, | ||
float | scoreThreshold, | ||
float | iouThreshold, | ||
const eDeviceType | device = eDeviceType::GPU |
||
) | const |
Executes the Non-Maximum Suppression operation. This object performs Non-Maximum Suppression on bounding boxes based on scores a score threshold, and an IoU threshold.
Limitations:
Input: Supported TensorLayout(s): [NW, NWC] Supported DataType(s): [4S16, S16]
Scores: Supported TensorLayout(s): [NW, NWC] Supported DataType(s): [F32]
Output: Supported TensorLayout(s): [NW, NWC] Supported DataType(s): [U8]
IoU Threshold: Range: (0.0, 1.0)
Input/Output Dependency:
Property | Input == Output == Scores -------------- | ------------- TensorLayout | No DataType | No Channels | No Width | Yes Height | No Batch | Yes
- Parameters
-
[in] stream The HIP stream to run this operator on. [in] input Batches of input boxes in the shape NW where N is the number of batches and W is the number of boxes per batch. If using layout NW, datatype must be 4S16. Boxes are structured in memory as a short4 with (x=x, y=y, z=width, w=height). If using layout NWC, datatype must be S16 with the final shape dimension being 4. [out] output Output tensor is the output boolean mask which marks boxes as either kept (1) or suppressed (0). If using NWC layout, the final shape dimension must be 1. The number of batches N and boxes per batch W must match with the given input tensor. [in] scores A Tensor containing the confidence scores for each box. If using layout NWC, the final shape dimension must be 1. The number of batches N and boxes per batch W must match with the given input tensor. [in] scoreThreshold The minimum score a box must have in order to be kept. [in] iouThreshold IoU threshold to filter overlapping boxes. [in] device The device to run this operator on. (Default: GPU)
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-roccv/checkouts/latest/include/op_non_max_suppression.hpp