BUGFIX: Adjust IOU threshold to compute ConfusionMatrix in validation step of YOLO detection #10254
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
1. Check for Existing Contributions: I have explored existing PRs and haven't found a solution yet.
2. Elaborate Your Changes: When running model validation, for yolo detection, I found out that the
ConfusionMatrix
doesn't change the IOU threshold (iou_thres=0.45
). Below is my code to run the validation process:When I traceback to the val.py file, I find this:
I have added the
self.arg.iou
to theiou_thres
in theConfusionMatrix
. I think my PR will help users adjust the iou_thres using configuration.3. Ultralytics Contributor License Agreement (CLA): I have read the CLA Document and I sign the CLA
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Enhanced accuracy in model validation by incorporating IoU threshold in Confusion Matrix calculation.
📊 Key Changes
🎯 Purpose & Impact