-
-
Notifications
You must be signed in to change notification settings - Fork 16k
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
predict/classify.py: save all predictions to csv #11654
Conversation
Previously was being stored as Python list (eg. with single quotes strings)
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 @sohang3112, thank you for submitting a YOLOv5 🚀 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/yolov5
master
branch. If your PR is behind you can update your code by clicking the 'Update branch' button or by runninggit pull
andgit merge master
locally. - ✅ Verify all YOLOv5 Continuous Integration (CI) checks are passing.
- ✅ 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
@glenn-jocher Please review this pull request, and let me know if something needs to be improved. Thanks in advance 🙂 |
@sohang3112 thanks for your contribution and submitting the pull request! We appreciate your effort in adding the feature to save image classification results to a CSV file. Our team will review the changes and provide feedback on any improvements that may be needed. Keep up the good work! 👍 |
@glenn-jocher Did you have a chance to review this PR yet? |
@sohang3112 thank you for your patience! I apologize for the delay. Our team has been actively reviewing all received pull requests, including yours. We will provide feedback and insights as soon as possible. Your contribution is highly appreciated! |
9831e83
to
eb1aafc
Compare
for more information, see https://pre-commit.ci
👋 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 ⭐ |
@glenn-jocher What sort of behaviour is this from your side?? The PR has been open for many months now, and throughout all that time you didn't find the time to even look at the changes once (let alone review & merge) ?? The only comments from you have been these useless bullshit platitudes of "valuable contribution". In the same time, you found the time to merge many other PRs in this repo, but you didn't even have the time to check the code change in my PR even once?? I have had enough - I'll make sure to never again contribute to any yolo project or any project maintained by you. Bye 👎 |
I'm genuinely sorry to hear about your experience and completely understand your frustration. It's our aim to review all contributions with the attention they deserve, but unfortunately, we can sometimes fall short due to the volume of activity. Your time and effort in contributing is truly valued, and I apologize for any oversight. Your feedback is a critical reminder for us to improve our responsiveness and engagement with contributors. Thank you for your past contributions, and I'm truly sorry to see you go. Wishing you the best in your future endeavors. |
Fixes Issue 11482: In classify/predict.py, save all image predictions as CSV for easy analysis later on.
Predictions are saved in predictions.csv in
save_dir
folder (which is of the form runs/predict-cls/exp-{NUMBER}). Each row in the CSV has results for 1 image.An example CSV is:
Here:
path
is path of imagetop_5_predicted
is a JSON list. Each item is a list of the form[label, score]
.label
,confidence
are the predicted label & confidence (i.e., the prediction with maximum score).🤖 Generated by Copilot at fc3be9e
Summary
✨📷📄
This pull request adds a new feature to the
classify
module that allows saving image classification results to a CSV file. The fileclassify/predict.py
is modified to create and write the CSV file in thesave_dir
folder. The CSV file contains the input file name, the predicted class name and confidence, and the top 5 predicted classes and confidences as a JSON array.Walkthrough
classify
module (link, link)🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
📊 Key Changes
csv
,io
, andjson
modules.predictions.csv
.🎯 Purpose & Impact
🌟 Summary
Predictions from YOLOv5's classification are now automatically saved to a CSV file for easy analysis and sharing. 📝🗃️✅