New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUGFIX: Adjust IOU threshold to compute ConfusionMatrix in validation step of YOLO detection #10254
base: main
Are you sure you want to change the base?
Conversation
CLA Assistant Lite bot All Contributors have signed the CLA. ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 Hello @bavo96, thank you for submitting an Ultralytics YOLOv8 🚀 PR! To allow your work to be integrated as seamlessly as possible, we advise you to:
- ✅ Verify your PR is up-to-date with
ultralytics/ultralytics
main
branch. If your PR is behind you can update your code by clicking the 'Update branch' button or by runninggit pull
andgit merge main
locally. - ✅ Verify all YOLOv8 Continuous Integration (CI) checks are passing.
- ✅ Update YOLOv8 Docs for any new or updated features.
- ✅ Reduce changes to the absolute minimum required for your bug fix or feature addition. "It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is." — Bruce Lee
See our Contributing Guide for details and let us know if you have any questions!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #10254 +/- ##
==========================================
- Coverage 78.95% 75.12% -3.84%
==========================================
Files 121 121
Lines 15351 15351
==========================================
- Hits 12120 11532 -588
- Misses 3231 3819 +588
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I have read the CLA Document and I sign the CLA |
Can you do a quick check on this @glenn-jocher? |
@bavo96 absolutely! I'll look into this right away and circle back with any findings or necessary actions. Thanks for bringing this to my attention! 😊 If any specific details or examples come up in the meantime that could help investigate, please feel free to share! |
Many thanks for your help @glenn-jocher I'll recheck the code for any new issues while you prepare for your next action. |
You're welcome! 😊 Glad I could assist. Please do keep me updated if you come across anything else; happy to help further. Enjoy coding and good luck with your project! |
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