Object Detection IoU Calculator

Measure overlap between predicted and labeled boxes precisely. Explore metrics, thresholds, and visual comparisons confidently. Improve evaluation accuracy with clear outputs and charts.

Calculator Inputs


Predicted Box Coordinates
Ground Truth Coordinates

PDF export captures the current page, including result cards and chart.

Example Data Table

Scenario Predicted Box Ground Truth Box Intersection Area Union Area IoU Interpretation
Moderate overlap (120, 90, 320, 260) (150, 110, 340, 280) 28900 38800 0.744845 Strong localization quality.
Loose alignment (50, 60, 180, 200) (110, 100, 250, 240) 5600 30800 0.181818 Weak overlap and poor fit.
Perfect overlap (40, 40, 140, 160) (40, 40, 140, 160) 12000 12000 1.000000 Exact match.
No overlap (10, 10, 60, 60) (100, 100, 180, 180) 0 8900 0.000000 No detection agreement.

Formula Used

Intersection Area = max(0, min(x2) − max(x1)) × max(0, min(y2) − max(y1))

Union Area = Area of Predicted Box + Area of Ground Truth Box − Intersection Area

IoU = Intersection Area ÷ Union Area

Dice Score = 2 × Intersection Area ÷ (Predicted Area + Ground Truth Area)

Generalized IoU = IoU − ((Smallest Enclosing Area − Union Area) ÷ Smallest Enclosing Area)

How to Use This Calculator

  1. Select the box format you want to enter.
  2. Choose whether position values start at the top-left or center.
  3. Enter image dimensions, confidence score, and IoU threshold.
  4. Fill in predicted box values and ground truth values.
  5. Press Calculate IoU to view the result above the form.
  6. Review IoU, GIoU, Dice score, box areas, offsets, and chart output.
  7. Use the CSV button for raw export and the PDF button for page export.

Frequently Asked Questions

1. What does IoU mean in object detection?

IoU stands for Intersection over Union. It measures the overlap between a predicted bounding box and the labeled ground truth box. Higher values mean the prediction is positioned more accurately.

2. What is considered a good IoU score?

A good IoU depends on the task. Many benchmarks treat 0.50 as acceptable, while stricter evaluations may expect 0.75 or more. Higher-risk applications often require stronger localization.

3. Why can IoU be zero?

IoU becomes zero when the predicted box and ground truth box do not overlap at all. In that case, the intersection area is zero, so the overlap score also becomes zero.

4. What is the difference between IoU and Dice score?

Both measure overlap, but they use different formulas. IoU divides intersection by union, while Dice doubles the intersection and divides by the combined areas. Dice often produces slightly larger values.

5. Why does this calculator include GIoU?

GIoU helps when boxes barely overlap or do not overlap. It adds a penalty based on the smallest enclosing box, making it more informative than plain IoU in weak-localization cases.

6. Can I use center coordinates instead of corner coordinates?

Yes. Choose the position and size format, then select center origin. The calculator converts those values into corners automatically before computing overlap metrics and related statistics.

7. Why include image width and height?

Image dimensions allow the calculator to estimate coverage percentages. That helps you understand how much of the image each box occupies and how large the overlap is relative to the frame.

8. Does a high confidence score guarantee a high IoU?

No. Confidence reflects model certainty, while IoU measures spatial accuracy. A model may be highly confident yet still place the box poorly, which leads to a low overlap score.

Related Calculators

batch size calculatorstride calculatorimage size calculatorintersection over unionimage resolution calculatorpixel density calculatorbounding box areaimage resize scaleanchor box sizefeature map size

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.