SoftNMS<T>

Models & Types · AiDotNet.ComputerVision.Detection.PostProcessing

Implements Soft-NMS algorithm which reduces confidence of overlapping boxes instead of removing them.

For Beginners

Standard NMS completely removes overlapping boxes, which can be problematic when objects are close together or occluded. Soft-NMS instead reduces the confidence score of overlapping boxes, allowing them to potentially survive if their confidence remains above the threshold.

How It Works

Reference: Bodla et al., “Soft-NMS – Improving Object Detection With One Line of Code”, ICCV 2017

Constructors

Constructor Summary
SoftNMS() Creates a new Soft-NMS instance.

Methods

Method Summary
List<Detection<T>> Apply(List<Detection<T>> detections, double iouThreshold, double scoreThreshold, DecayMethod<T> method, double sigma) Applies Soft-NMS with configurable decay method.
List<Detection<T>> ApplyClassAware(List<Detection<T>> detections, double iouThreshold, double scoreThreshold, DecayMethod<T> method, double sigma) Applies class-aware Soft-NMS.
List<Detection<T>> ApplyGaussian(List<Detection<T>> detections, double sigma, double scoreThreshold) Applies Soft-NMS with Gaussian decay.
List<Detection<T>> ApplyLinear(List<Detection<T>> detections, double iouThreshold, double scoreThreshold) Applies Soft-NMS with linear decay.