Non Maximum Suppression

Non Maximum Suppression: An Overview

Non Maximum Suppression (NMS) is a computer vision technique that is important in object detection. NMS helps select the best entities, such as bounding boxes, out of many overlapping entities that a computer vision algorithm detects. These overlapping entities can cause confusion for an object detection algorithm. Nevertheless, with the help of NMS, the algorithm can accurately detect objects in an image and even predict their location and size.

What is Non Maximum Suppression?

Imagine a scenario where an object detection algorithm identifies multiple bounding boxes in an image that surrounds a particular object. This detected object might appear several times because of the overlapping bounding boxes, leading to a potential error in the final detection. NMS works by sorting the bounding boxes based on their confidence value and then discards the ones that overlap with another bounding box that has a higher confidence score. By doing this, NMS makes sure that the object detection algorithm chooses the best bounding box and reduces the chance of multiple detections for a single object.

NMS uses object detection algorithms such as YOLO, Faster R-CNN, and SSD. These algorithms usually apply a sliding window approach to an image in order to detect people and objects that are present. The result of this detection approach is usually several bounding boxes that correspond to different parts of the same object in the image.

Why Use Non Maximum Suppression?

NMS is foundational in computer vision and helps to improve the accuracy of object detection. This is because NMS guarantees that only one bounding box is chosen for each detected object. Without NMS, an object detection algorithm could detect an object several times, leading to potential errors in the final detection. Moreover, NMS is also important in the speed of detection. As the non-maximum suppression algorithm eliminates overlapping results at every stage, it contributes to faster object detection.

In addition to object detection, NMS can be used in other computer vision tasks such as facial recognition, tracking and segmentation. For instance, if a face detection algorithm detects more than one face in an image, NMS will select the best face for detection and discard the rest. Then, if there is a need for segmentation, NMS can be used to clean up the resulting map while ensuring that only one person is present within each segmentation result.

How Does Non Maximum Suppression Works?

Non Maximum Suppression can be divided into three steps:

  1. Sort bounding boxes based on confidence score in descending order

In the first step, NMS sorts the detected bounding boxes based on their confidence score from the highest value to the lowest. Confidence score refers to a probability estimation that the detected bounding box contains an object within it. The highest scoring bounding box is considered the best.

  1. Eliminate the Boxes with Low Confidence Scores

The second step is to reject those bounding boxes that have a low confidence score. The lower confidence score could indicate that the bounding box does not contain the object at all, so it might just be noise in the image.

  1. Iteratively Select Best Bounding Boxes

The third step is to select the best bounding box from the remaining ones iteratively. NMS starts with the bounding box with the highest confidence score and selects it as the best bounding box. It will then eliminate all other bounding boxes that have an Intersection-over-Union (IoU) of more than or equal to 0.5, meaning that it has significant overlap. The remaining bounding boxes are then sorted again and, using the same principle, the algorithm iteratively selects the best bounding boxes until all possible boxes are taken into consideration. In the end, the non-overlapping boxes that correspond to the best detections are saved as the final output.

Non-Maximum Suppression is essential in many computer vision tasks, especially in object detection. It helps an algorithm in selecting the best bounding boxes for detected objects and eliminates overlapping results. NMS is important in improving detection accuracy and speed. Although it is a simple algorithm, it has a critical role in ensuring that only one bounding box is selected for each detected object. Lastly, NMS is necessary for various computer vision tasks and has an important role in addressing challenges in computer vision.

Great! Next, complete checkout for full access to SERP AI.
Welcome back! You've successfully signed in.
You've successfully subscribed to SERP AI.
Success! Your account is fully activated, you now have access to all content.
Success! Your billing info has been updated.
Your billing was not updated.