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

Fix bug in wait_for_confident_result #317

Merged
merged 1 commit into from
Feb 21, 2025
Merged

Conversation

CoreyEWood
Copy link
Contributor

The confidence_threshold parameter defaults to None, and the docstring states that if it is None then the detector's confidence threshold will be used. However, it currently only fetches the detector's confidence threshold if the value for image_query is a string - if you pass it an ImageQuery object, confidence_threshold will still be None when passed to iq_is_confident, which will then error when trying to do iq.result.confidence >= confidence_threshold.

This fixes it so it will always fetch the detector's confidence threshold if the inputted confidence_threshold is None.

@CoreyEWood CoreyEWood changed the title Fix bug in wait_for_confident_result Fix bug in wait_for_confident_result Feb 21, 2025
@CoreyEWood CoreyEWood changed the title Fix bug in wait_for_confident_result Fix bug in wait_for_confident_result Feb 21, 2025
Copy link
Collaborator

@brandon-groundlight brandon-groundlight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch

@CoreyEWood CoreyEWood merged commit 29f64cf into main Feb 21, 2025
9 checks passed
@CoreyEWood CoreyEWood deleted the fix-wait-for-confident-bug branch February 21, 2025 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants