Object Detection -IOU-Intersection Over Union

In the world of deep learning Object detection is an active research subject. Objects in an Image/Frame are detected with a simple box plotted around them.

This task of plotting a box around the Object can be called bounding boxes.

The bounding box is nothing but (x-y ) coordinates of the object in the image. These co-ordinates uniquely defined objects in the Image.

Now, the bounding box for an Object in Image is primarily hand labeled and can be called as Primary Boundary Box.

The Deep Learning model predicts a bounding box around the Object which can be called Predicted Boundary Box.

Boundary Box Representation (Green-Primary, Red-Predicted)

IOU can be computed as Area of Intersection divided over Area of Union

Area of Intersection
Area of Union

Why we do use IOU Concept in Object Detection?

The model output for predicted bounding box is extremely unlikely to be as an exact primary bounding box in reality. Therefore to measure how accurate is the object identified in the Image/Frame we can make use of metric IOU.

This gives us an option to consider the object detected is complete or not. The IOU is a simple way of evaluation of our training model +bounding box with its performance on the testing set.

General Threshold for the IOU can be 0.5. This can vary from problem to problem. Normally IOU>0.5 is considered a good prediction.

BAD PREDICTION: IOU 0.35
GOOD PREDICTION : IOU 0.74
EXCELLENT PREDICTION: IOU 0.93

Concluding, IOU is an important metric in deciding the object prediction of deep learning models.

Most of the frameworks use this metric like YOLO, CNN Based Object detectors.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store