-
-
Notifications
You must be signed in to change notification settings - Fork 16.4k
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
Solution of pycocotools mAP Alignment #7732
Conversation
for more information, see https://pre-commit.ci
@glenn-jocher Hi there, are you checking this PR? |
@comlhj1114 thanks for the PR! This looks very thorough, I will take a look. |
@glenn-jocher Thanks. I spent whole weekend for this work :) |
Updated with changes from #6787 |
@comlhj1114 I tested this PR after merging changes from earlier PR #6787. These are my results (did not modify pycocotools or annotations json): Command
Master
PR
|
@glenn-jocher Thank you for your works! |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions YOLOv5 🚀 and Vision AI ⭐. |
@glenn-jocher Hi glenn, why is this PR stale and closed? Any point to be improved? |
@comlhj1114 sorry, I didn't realize stale workflow was closing PRs. I've updated the period to 90 days for PRs in #8465 About this PR my main concern is that the updates are causing the pycocotools mAP to drop. Is there a way to keep the pycocotools mAP the same? |
@glenn-jocher I don't understand what "the updates are causing the pycocotools mAP to drop" means. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions YOLOv5 🚀 and Vision AI ⭐. |
👋 Hello there! We wanted to let you know that we've decided to close this pull request due to inactivity. We appreciate the effort you put into contributing to our project, but unfortunately, not all contributions are suitable or aligned with our product roadmap. We hope you understand our decision, and please don't let it discourage you from contributing to open source projects in the future. We value all of our community members and their contributions, and we encourage you to keep exploring new projects and ways to get involved. For additional resources and information, please see the links below:
Thank you for your contributions to YOLO 🚀 and Vision AI ⭐ |
@comlhj1114 understood. I appreciate your clarification. I will look into this further and get back to you. Thank you for your patience. |
Maybe @glenn-jocher is talking about the mAP dropping in his test results. I agree with you, and in pycocotools, tp is really choosen by confidence score if a gt box is matched with more than one detections. |
@Yonglin5170 Thank you for your input. It's important to ensure that any changes align with the expected behavior of pycocotools, especially regarding the handling of true positives and the confidence score. I'll review the PR again with this context in mind. Your contributions are valuable to the project, and I apologize for any confusion caused by the workflow automation. Let's continue to work towards a solution that maintains or improves mAP without deviating from established standards. |
This PR is the solution of pycocotools mAP Alignment [#2258]
To match pycocotools mAP calculation, following changes are applied
Solutions
Limitations
There is dataset inherited difference between yolo and coco style.
In the coco style iscrowd flag is available, while in the yolo style is not.
In the cocoapi, the flag is used for sampling detections after filtering maxDet, which results different number of detections used in calculating mAPs between yolo and cocoapi.
To evade this problem, annotations with iscrowd=1 is ignored. This can be done in two ways.
Results
With ignored (or removed) iscrowd annotations
(yolov5/cocoapi)
(yolov5/cocoapi)
With original annotations
(yolov5/cocoapi)
(yolov5/cocoapi)
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Enhancements to YOLOv5's evaluation metrics and non-maximum suppression process.
📊 Key Changes
utils/metrics.py
.val.py
to include a maximum number of detections limit (max_det) set to 100.🎯 Purpose & Impact