NonMaximumSuppression
- cvcuda.nms(src: nvcv.Tensor, scores: nvcv.Tensor, score_threshold: float = 1.1920928955078125e-07, iou_threshold: float = 1.0, *, stream: nvcv.cuda.Stream | None = None) nvcv.Tensor
Executes NMS.
The Non-Maximum Suppression (NMS) operation reads a set of input bounding boxes (bboxes) proposals and their scores and writes an output boolean mask with suppressed bboxes as zeros and selected bboxes as ones.
See also
Refer to the CV-CUDA C API reference for the Non-Maximum Suppression operator for more details and usage examples.
- Parameters:
src (nvcv.Tensor) – src[i, j] is the set of input bounding box proposals for an image where i ranges from 0 to batch-1, j ranges from 0 to number of bounding box proposals anchored at the top-left of the bounding box area
scores (nvcv.Tensor) – scores[i, j] are the associated scores for each bounding box proposal in
src
considered during the reduce operation of NMSscore_threshold (float) – Minimum score of a bounding box proposals
iou_threshold (float) – Maximum overlap between bounding box proposals covering the same effective image region as calculated by Intersection-over-Union (IoU)
stream (nvcv.cuda.Stream, optional) – CUDA Stream on which to perform the operation.
- Returns:
The output tensor of selected bounding boxes.
- Return type:
nvcv.Tensor
Caution
Restrictions to several arguments may apply. Check the C API references of the CV-CUDA operator.
- cvcuda.nms_into(dst: nvcv.Tensor, src: nvcv.Tensor, scores: nvcv.Tensor, score_threshold: float = 1.1920928955078125e-07, iou_threshold: float = 1.0, *, stream: nvcv.cuda.Stream | None = None) nvcv.Tensor
Executes NMS.
The Non-Maximum Suppression (NMS) operation reads a set of input bounding boxes (bboxes) proposals and their scores and writes an output boolean mask with suppressed bboxes as zeros and selected bboxes as ones.
See also
Refer to the CV-CUDA C API reference for the Non-Maximum Suppression operator for more details and usage examples.
- Parameters:
dst (nvcv.Tensor) – dst[i, j] is the output boolean mask marking selected bounding boxes, where i ranges from 0 to batch-1, j ranges from 0 to the number of bounding box proposals anchored at the top-left of the bounding box area
src (nvcv.Tensor) – src[i, j] is the set of input bounding box proposals for an image where i ranges from 0 to batch-1, j ranges from 0 to number of bounding box proposals anchored at the top-left of the bounding box area
scores (nvcv.Tensor) – scores[i, j] are the associated scores for each bounding box proposal in
src
considered during the reduce operation of NMSscore_threshold (float) – Minimum score of a bounding box proposals
iou_threshold (float) – Maximum overlap between bounding box proposals covering the same effective image region as calculated by Intersection-over-Union (IoU)
stream (nvcv.cuda.Stream, optional) – CUDA Stream on which to perform the operation.
- Returns:
None
Caution
Restrictions to several arguments may apply. Check the C API references of the CV-CUDA operator.