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

Detection confidence when drawing tracked_objects' boxes? #310

Open
utility-aagrawal opened this issue Apr 3, 2024 · 5 comments
Open

Detection confidence when drawing tracked_objects' boxes? #310

utility-aagrawal opened this issue Apr 3, 2024 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@utility-aagrawal
Copy link

Hi @aguscas ,

I am drawing bounding boxes from tracked_objects but I don't see an option to display detection confidence.

  1. Why is that so?
  2. What's the easiest way to get detection confidence? For my use case, I need the ability to track but also to display detection confidence in the output.

Let me know in case of any questions. Thanks!

@utility-aagrawal utility-aagrawal added the help wanted Extra attention is needed label Apr 3, 2024
@aguscas
Copy link
Collaborator

aguscas commented Apr 4, 2024

Doesn't the argument draw_scores of the draw_boxes function allow you to draw the confidences?

@utility-aagrawal
Copy link
Author

No, I just gave it a try. draw_scores doesn't seem to work with tracking_objects but works with Detection objects. For my use case, I would need it to work with tracking_objects since I also want tracking object id to keep track of the same object. Let me know if you need anything additional. Thanks!

@aguscas
Copy link
Collaborator

aguscas commented Apr 4, 2024

Alright, makes sense since the score is an attribute of the Detection instead of the TrackedObject.

I can make a PR to add an score attribute to the TrackedObject to draw it (setting it to None in the TrackedObject. tracker_step method, and setting it equal to detection.score in the TrackedObject.hit method), but we would have to see with @facundo-lezama or @javiber if that would be a desirable feature to have in general before.

Anyway, I am not sure I understood the exact reason you want to be able to draw the score. What did you mean by 'I also want tracking object id to keep track of the same object'?

@utility-aagrawal
Copy link
Author

Yeah, PR would be great!

I am using norfair to track faces. When I present my users with the output, I want to show them:

  1. detected faces with their confidence
  2. if the same person is present in multiple frames, "id" from tracked_object to denote that it's the same person you have seen in other frames so essentially group faces by person.

Does that make sense?

@aguscas
Copy link
Collaborator

aguscas commented Apr 4, 2024

I made this PR which adds the scores attribute to TrackedObject instances. It is still not merged (since we need to first discuss if that is a feature we would like to have), but you can try installing that version of norfair if you want to use it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants