Skip to content
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

save-csv command header bug #13477

Closed
2 tasks done
aligh993 opened this issue Dec 30, 2024 · 4 comments
Closed
2 tasks done

save-csv command header bug #13477

aligh993 opened this issue Dec 30, 2024 · 4 comments
Labels
bug Something isn't working detect Object Detection issues, PR's

Comments

@aligh993
Copy link
Contributor

aligh993 commented Dec 30, 2024

Search before asking

  • I have searched the YOLOv5 issues and found no similar bug report.

YOLOv5 Component

Detection

Bug

The save-csv command did not write the CSV header.
For Example: $ python detect.py --weights yolov5m.pt --source 0 --save-csv
predictions.csv

Environment

No response

Minimal Reproducible Example

No response

Additional

No response

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!
@aligh993 aligh993 added the bug Something isn't working label Dec 30, 2024
@UltralyticsAssistant UltralyticsAssistant added the detect Object Detection issues, PR's label Dec 30, 2024
@UltralyticsAssistant
Copy link
Member

👋 Hello @aligh993, thank you for reporting this potential issue with YOLOv5 🚀!

If this is indeed a 🐛 bug, we kindly ask you to provide a minimum reproducible example (MRE). This will greatly help us investigate and resolve the issue more efficiently. An MRE typically includes a clear description of the steps taken, the exact commands or code used, example data if applicable, and the observed versus expected behavior.

Your willingness to submit a pull request is fantastic! An Ultralytics engineer will also review this issue and assist you shortly 😊.

@pderrenger
Copy link
Member

@aligh993 thank you for reporting this issue! It seems like the CSV header might not be written when using the to_csv method. Could you verify if you are using the latest YOLOv5 version? If the issue persists, you may consider customizing the to_csv method by passing additional arguments, such as header=True. For example:

csv_result = results[0].to_csv(header=True)

If this doesn't resolve your issue, please feel free to provide a minimal reproducible example, and we'll assist further. Looking forward to your PR if you find a fix!

@aligh993
Copy link
Contributor Author

@pderrenger thank you so much. Yes, I'm using the latest version of YOLOv5, but the issue still persists. I found a fix in 'detect.py' and requested a PR at this link: #13472

@pderrenger
Copy link
Member

Thank you for the update, @aligh993, and for taking the initiative to submit a PR! We'll review it shortly. Your contribution is greatly appreciated and helps improve YOLOv5 for everyone. If you encounter any other issues, feel free to share them.

@aligh993 aligh993 closed this as completed Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working detect Object Detection issues, PR's
Projects
None yet
Development

No branches or pull requests

3 participants