-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat: Filter out low-confidence bounding box detections #3154
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
base: main
Are you sure you want to change the base?
feat: Filter out low-confidence bounding box detections #3154
Conversation
fixes issue with len(keepers). Since keepers is a tuple with indices, it's len() is not indicative of the number of bboxes that should be kept. This is resolved by using Any()
… reproducibility. instead of a default filtering threshold of 0.25, the filtering is made optional and by default all bboxes are kept.
Low-confidence bounding boxes are removed when min_bbox_score parameter is provided. Default behavior remains unchanged.
|
Thank you for picking up my PR and running with it, your edits all look good to me! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds functionality to filter out low-confidence bounding box detections during top-down pose estimation. The feature helps reduce false positives by removing detections below a configurable confidence threshold.
Key changes:
- Added a new
RemoveLowConfidenceBoxespostprocessor class to filter bounding boxes based on score threshold - Added
min_bbox_scoreparameter toget_inference_runners,get_detector_inference_runner, andget_filtered_coco_detector_inference_runnerfunctions - Updated
build_detector_postprocessorto optionally apply the low-confidence box filtering
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| deeplabcut/pose_estimation_pytorch/data/postprocessor.py | Added RemoveLowConfidenceBoxes class and updated build_detector_postprocessor to accept min_bbox_score parameter for filtering low-confidence detections |
| deeplabcut/pose_estimation_pytorch/apis/utils.py | Added min_bbox_score parameter to three inference runner functions (get_inference_runners, get_detector_inference_runner, get_filtered_coco_detector_inference_runner) with appropriate documentation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… quotes and logging instead of print.
(should be interpreted as the *minimum acceptible confidence)
Revised version of PR #3118 by @tlancaster6
Feature
Filter out low-confidence bounding box detections during top-down pose estimation to reduce false-positives.
Function
get_inference_runnersin deeplabcut.pose_estimation_pytorch now accepts an optional argumentmin_bbox_score. Low-confidence bounding boxes are removed when min_bbox_score parameter is provided. Default behavior remains unchanged (i.e. all bounding boxes are kept).