-
Notifications
You must be signed in to change notification settings - Fork 465
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
feat: add RandomCrop module in transforms #448
Conversation
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.
Thanks for the PR!
I think we should keep this PR about the sole implementation of the cropping augmentation (and handle the integration of img+target transforms in the datasets in another PR), cf my comments :)
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.
Thanks for the edits! Only a few comments left
Codecov Report
@@ Coverage Diff @@
## main #448 +/- ##
==========================================
- Coverage 95.84% 95.83% -0.01%
==========================================
Files 96 96
Lines 3997 4014 +17
==========================================
+ Hits 3831 3847 +16
- Misses 166 167 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
Thanks ! Looks good to me, could you add an entry in the documentation please? 🙏
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.
Cheers!
This PR adds RandomCrop in
transforms/base.py
, and updates the detection dataset with ageometric_transforms
args to compose both RandomCrop and RandomRotate.Any feedback is welcome!
NB: cropping should be performed BEFORE rotation, because it is lighter that way (less information to deal with), and also because the rotation transformation converts boxes to rotated boxes whereas cropping is performed with straight bounding boxes.