-
Notifications
You must be signed in to change notification settings - Fork 624
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 RandAugment and TrivialAugment to auto_aug module #4704
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jantonguirao
approved these changes
Mar 10, 2023
stiepan
added
conditional execution
Questions related to conditional execution and using `if` statements in DALI
automatic augmentations
Automatic augmentations (AutoAugment, RandAugment, TrivialAugment and more) support in DALI.
labels
Mar 10, 2023
awolant
approved these changes
Mar 13, 2023
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.
Same as before :)
Signed-off-by: Kamil Tokarski <[email protected]>
Signed-off-by: Kamil Tokarski <[email protected]>
!build |
CI MESSAGE: [7573522]: BUILD STARTED |
CI MESSAGE: [7573522]: BUILD PASSED |
18 tasks
stiepan
added a commit
that referenced
this pull request
Mar 14, 2023
* Add RandAugment and TrivialAugment to auto_aug module * Fix type annotations --------- Signed-off-by: Kamil Tokarski <[email protected]>
aderylo
pushed a commit
to zpp-dali-2022/DALI
that referenced
this pull request
Mar 17, 2023
* Add RandAugment and TrivialAugment to auto_aug module * Fix type annotations --------- Signed-off-by: Kamil Tokarski <[email protected]>
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
automatic augmentations
Automatic augmentations (AutoAugment, RandAugment, TrivialAugment and more) support in DALI.
conditional execution
Questions related to conditional execution and using `if` statements in DALI
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Category:
New feature (non-breaking change which adds functionality)
Description:
Add RandAugment (https://arxiv.org/abs/1909.13719) and TrivialAugment (https://arxiv.org/abs/2103.10158).
The first selects, for each sample, uniformy at random, N operations out of the set of augmentations and applies them. Each augmentation uses magnitude (intuitevely strength) M that is fixed throught execution and common for all samples and ops. (The magnitude may still be randomly negated though, based on the augmentation specifcation).
TrivialAugment uses N=1 but the magnitudes are randomly sampled per sample (per iteration).
Additional information:
For context: augmentations used by RA, TA (and AA) are DALI-based python functions that take sample and a parameter. They are decorated with
@agumentation
which takes care of providing the parameter based only on the magnitude_bin, i.e. an int from[0, num_magnitude_bins-1]
range, so that the RA/TA/AA schemes can in abstract way control parameters of different operations.The necessary augmentations are defined here: https://github.com/NVIDIA/DALI/blob/main/dali/python/nvidia/dali/auto_aug/augmentations.py
The
trivial_augment_wide
andrand_augment
run the suites with default set of augmentations based on the papers, theapply_trivial_augment
andapply_rand_augment
accept the custom list of augmentations to apply.Affected modules and functionalities:
Key points relevant for the review:
Tests:
Checklist
Documentation
DALI team only
Requirements
REQ IDs: N/A
JIRA TASK: DALI-3230