-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Added bounding box pre filtering #2287
Conversation
Reviewer's Guide by SourceryThis pull request introduces a new Sequence diagram for bounding box processing pipelinesequenceDiagram
participant Client
participant BboxProcessor
participant BboxParams
Note over BboxProcessor: New processing order with filtering
Client->>BboxProcessor: Process bounding boxes
activate BboxProcessor
BboxProcessor->>BboxProcessor: check_and_convert(direction='to')
BboxProcessor->>BboxParams: Check clip parameter
alt clip=True
BboxProcessor->>BboxProcessor: Clip boxes to [0,1]
end
BboxProcessor->>BboxParams: Check filter_invalid_bboxes
alt filter_invalid_bboxes=True
BboxProcessor->>BboxProcessor: Filter invalid boxes
end
BboxProcessor->>BboxProcessor: Apply transformations
BboxProcessor->>BboxProcessor: Filter based on min params
BboxProcessor->>BboxProcessor: check_and_convert(direction='from')
BboxProcessor-->>Client: Return processed boxes
deactivate BboxProcessor
Class diagram showing BboxParams and BboxProcessor changesclassDiagram
class BboxParams {
+str format
+Sequence[str] label_fields
+float min_area
+float min_visibility
+float min_width
+float min_height
+bool check_each_transform
+bool clip
+bool filter_invalid_bboxes
+__init__()
+to_dict_private()
}
class BboxProcessor {
+BboxParams params
+dict additional_targets
+__init__()
+default_data_name()
+ensure_data_valid()
+filter()
+check_and_convert()
+check()
}
BboxProcessor --> BboxParams: uses
note for BboxParams "Added filter_invalid_bboxes parameter"
note for BboxProcessor "Added check_and_convert method"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @ternaus - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟡 Testing: 1 issue found
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2287 +/- ##
=========================================
+ Coverage 0 89.78% +89.78%
=========================================
Files 0 50 +50
Lines 0 8854 +8854
=========================================
+ Hits 0 7950 +7950
- Misses 0 904 +904
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Summary by Sourcery
Add pre-filtering of bounding boxes to remove invalid boxes before applying transformations.
Bug Fixes:
Enhancements:
Tests: