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

Add threshold parameter for object detection widget #322

Open
NielsRogge opened this issue Oct 17, 2022 · 5 comments
Open

Add threshold parameter for object detection widget #322

NielsRogge opened this issue Oct 17, 2022 · 5 comments
Assignees
Labels
good first issue Good for newcomers widgets

Comments

@NielsRogge
Copy link
Contributor

NielsRogge commented Oct 17, 2022

Is your feature request related to a problem? Please describe.
Currently, the object detection widgets don't have a threshold parameter, so they just use the hardcoded one from the object detection pipeline, which is 0.9 as seen here.

However, with more and more object detection models coming, we definitely need an adjustable threshold button for the widget, as for instance now Deformable DETR checkpoints, which need a lower threshold to detect objects in a scene, simply say "no objects detected":

Screenshot 2022-10-17 at 08 40 55

Describe the solution you'd like
Adding a "threshold button" to the inference widgets. Perhaps make it possible to set a default threshold in the model card.

@osanseviero
Copy link
Member

Is this supported in the pipeline class already @NielsRogge ?

@alaradirik alaradirik self-assigned this Oct 31, 2022
@alaradirik
Copy link

alaradirik commented Nov 1, 2022

Hey @osanseviero, threshold is already supported in the pipeline class, I'm updating the pipeline to use the post_process_object_detection methods instead of post_process with this PR. We still need to add a threshold slider to the inference widgets though.

@osanseviero
Copy link
Member

Cc @mishig25 and @OlivierDehaene maybe can help here (adding the slider in the widget and adding support in the inference API for this)

@osanseviero osanseviero transferred this issue from huggingface/hub-docs Nov 22, 2023
@NielsRogge NielsRogge added the good first issue Good for newcomers label Nov 29, 2023
@plannaAlain
Copy link

I think this is a critical feature.

@NielsRogge
Copy link
Contributor Author

cc @mishig25 would you be up for implementing this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers widgets
Projects
None yet
Development

No branches or pull requests

6 participants