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

How can I get confidence_score for the boxes in output .txt files? #1112

Closed
redwankarimsony opened this issue Oct 10, 2020 · 4 comments
Closed
Labels
question Further information is requested Stale

Comments

@redwankarimsony
Copy link

❔How can I get confidence_score for the boxes in output .txt files?

The general output format of yolov5 the output text files containing the object location in the format <class_id> <x_center> <y_center> <width> <height> for each of the objects located. However, if I want to store the confidence_score of these bounding boxes to be also written in the format <class_id> <confidence_score> <x_center> <y_center> <width> <height> then what should I do? For example have a look at the image below. I want to store these score values 0.53, 0.83, 0.58, 0.42 in their corresponding lines in the 83082816-59e54880-a039-11ea-8abe-ab90cc1ec4b0.txt file

Thank you!

Additional context

@redwankarimsony redwankarimsony added the question Further information is requested label Oct 10, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Oct 10, 2020

Hello @redwankarimsony, thank you for your interest in our work! Please visit our Custom Training Tutorial to get started, and see our Jupyter Notebook Open In Colab, Docker Image, and Google Cloud Quickstart Guide for example environments.

If this is a bug report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.

If this is a custom model or data training question, please note Ultralytics does not provide free personal support. As a leader in vision ML and AI, we do offer professional consulting, from simple expert advice up to delivery of fully customized, end-to-end production solutions for our clients, such as:

  • Cloud-based AI systems operating on hundreds of HD video streams in realtime.
  • Edge AI integrated into custom iOS and Android apps for realtime 30 FPS video inference.
  • Custom data training, hyperparameter evolution, and model exportation to any destination.

For more information please visit https://www.ultralytics.com.

@NanoCode012
Copy link
Contributor

@redwankarimsony , I guess you're in luck. There's an open PR on this. #994

Just change the below,

f.write(('%g ' * 5 + '\n') % (cls, *xywh)) # label format

to this,

f.write(('%g ' * 6 + '\n') % (cls, conf, *xywh)) # label format includes conf

@redwankarimsony
Copy link
Author

Thanks a lot @NanoCode012
You really saved my day !

@github-actions
Copy link
Contributor

This issue 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested Stale
Projects
None yet
Development

No branches or pull requests

2 participants