> For the complete documentation index, see [llms.txt](https://vikram-bajaj.gitbook.io/deep-learning-specialization-coursera/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vikram-bajaj.gitbook.io/deep-learning-specialization-coursera/main-10/convolutional-neural-networks/object-detection/intersection-over-union.md).

# Intersection over Union

This is one method of determining if the YOLO algorithm (or any other bounding box generating algorithm) is doing well.

Consider the image below. The red box is the actual bounding box and the blue one is the bounding box generated by an algorithm.

![](https://3732905555-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M5-0RGo4dZhdwCIHrC1%2F-M5-0TEuN77zAmTpQjIr%2F-M5-0WUJQTsz7KHvnvDv%2FIntersection%20over%20Union.JPG?generation=1586990829445420\&alt=media)

We calculate the IoU (Intersection over Union) as $$\frac{size ,of ,intersection}{size ,of ,union}$$ and an algorithm is generally said to be doing well enough if IoU >= 0.5.
