ultralytics / hub

Ultralytics HUB tutorials and support
https://hub.ultralytics.com
GNU Affero General Public License v3.0
138 stars 14 forks source link

How to interpret confusion matrix? #881

Open KDLPro opened 1 month ago

KDLPro commented 1 month ago

Search before asking

Question

How do I interpret this confusion matrix? This is for YOLOv8 bounding box object detection and there are no docs on how to interpret confusion matrices. Your help is very much appreciated. Thank you!

image

Additional

No response

pderrenger commented 1 month ago

@KDLPro hello! 😊

Interpreting a confusion matrix for YOLOv8 bounding box object detection can be quite insightful. Here's a quick guide to help you understand it:

  1. True Positives (TP): These are the correctly detected objects. The model predicted the object class correctly and the bounding box overlaps sufficiently with the ground truth.

  2. False Positives (FP): These occur when the model predicts an object that doesn't exist or misclassifies an object. This can happen if the bounding box doesn't overlap enough with any ground truth or is assigned the wrong class.

  3. False Negatives (FN): These are the missed detections. The model failed to predict an object that is present in the ground truth.

  4. True Negatives (TN): In object detection, TNs are not typically represented in the confusion matrix as they refer to correctly identified absence of objects.

The matrix helps you understand the performance of your model by showing how well it distinguishes between different classes. Ideally, you want high TP and low FP/FN counts.

For more detailed insights, you can refer to the Ultralytics HUB documentation.

Feel free to reach out if you have more questions! 🚀