-
-
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
Boost version #2218
Boost version #2218
Conversation
Reviewer's Guide by SourceryThis pull request updates the Sequence diagram for BBoxSafeRandomCrop transform operationsequenceDiagram
participant C as Client
participant B as BBoxSafeRandomCrop
C->>B: transform(image, bboxes)
activate B
alt bboxes exist
B->>B: Compute union of all bboxes
B->>B: Apply erosion based on erosion_rate
B->>B: Clip eroded union to valid coordinates
B->>B: Sample crop coordinates
else no bboxes
B->>B: Compute crop height with erosion_rate
B->>B: Set crop width (maintain aspect ratio)
B->>B: Place crop randomly
end
B-->>C: return transformed image and bboxes
deactivate B
Sequence diagram for AtLeastOneBBoxRandomCrop transform operationsequenceDiagram
participant C as Client
participant A as AtLeastOneBBoxRandomCrop
C->>A: transform(image, bboxes)
activate A
alt bboxes exist
A->>A: Select random reference bbox
A->>A: Compute eroded version of bbox
A->>A: Calculate valid crop bounds
A->>A: Sample crop coordinates
else no bboxes
A->>A: Use full image dimensions
A->>A: Sample crop coordinates
end
A-->>C: return transformed image and bboxes
deactivate A
Class diagram showing the updated crop transformsclassDiagram
class BaseCrop {
<<abstract>>
}
class BBoxSafeRandomCrop {
+erosion_rate: float
+p: float
+get_params_dependent_on_data()
+get_transform_init_args_names()
}
class AtLeastOneBBoxRandomCrop {
+height: int
+width: int
+erosion_factor: float
+p: float
+get_params_dependent_on_data()
+get_transform_init_args_names()
}
BaseCrop <|-- BBoxSafeRandomCrop
BaseCrop <|-- AtLeastOneBBoxRandomCrop
note for BBoxSafeRandomCrop "Ensures ALL bboxes are preserved in crop"
note for AtLeastOneBBoxRandomCrop "Ensures AT LEAST ONE bbox in crop"
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: all looks good
- 🟢 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 ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2218 +/- ##
=========================================
+ Coverage 0 89.78% +89.78%
=========================================
Files 0 50 +50
Lines 0 9100 +9100
=========================================
+ Hits 0 8170 +8170
- Misses 0 930 +930 ☔ View full report in Codecov by Sentry. |
Summary by Sourcery
Update the
BBoxSafeRandomCrop
transform to ensure all bounding boxes are preserved in the crop and improve its documentation. Update theAtLeastOneBBoxRandomCrop
transform to ensure at least one bounding box is present in the crop and improve its documentation. Bump albucore version to 0.0.23.New Features:
BBoxSafeRandomCrop
that guarantees all bounding boxes are preserved.Enhancements:
BBoxSafeRandomCrop
andAtLeastOneBBoxRandomCrop
transforms.