-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Add Shear augmentation. #3656
Add Shear augmentation. #3656
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3656 +/- ##
==========================================
+ Coverage 60.84% 61.45% +0.61%
==========================================
Files 213 213
Lines 15135 15345 +210
Branches 2587 2608 +21
==========================================
+ Hits 9209 9431 +222
+ Misses 5459 5441 -18
- Partials 467 473 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
…to shear_clean
…to shear_clean
_MAX_LEVEL = 10 | ||
|
||
|
||
def level_to_value(level, max_value): |
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.
Will this method be used by multiple transforms?
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.
Yeah, it will be used for another aug like translate, rotate, etc.
return (level / _MAX_LEVEL) * max_value | ||
|
||
|
||
def random_negative(value, random_negative_prob): |
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.
and this
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.
Yeah, it will be used for another aug like translate, rotate, etc.
This PR implements Shear augmentation, and clean up the irrelevant commits.