This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Add standard ResNet data augmentation for ImageRecordIter #11027
Merged
Merged
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
987a112
add resnet augmentation
hetong007 626aa7d
add test
hetong007 252188e
fix scope
hetong007 b699b75
fix warning
hetong007 883c58e
fix lint
hetong007 3580a0d
fix lint
hetong007 6cc27cc
add color jitter and pca noise
hetong007 8906933
fix center crop
hetong007 a693eac
merge
hetong007 662bbf7
fix lint
hetong007 f6a7177
merge
hetong007 a777cb9
Trigger CI
hetong007 0c1c89b
fix
hetong007 74ee0c4
Merge branch 'resnet_aug' of https://github.com/hetong007/incubator-m…
hetong007 5e99e7c
fix augmentation implementation
hetong007 e171803
Merge remote-tracking branch 'upstream/master' into resnet_aug
hetong007 6b388ac
add checks for parameters
hetong007 9615bf6
Merge branch 'resnet_aug' of github.com:hetong007/incubator-mxnet int…
hetong007 9e372b0
modify training script
hetong007 8edf384
merge with upstream
bae03f4
fix compile error
hetong007 03b8f9f
Trigger CI
hetong007 54c077e
Trigger CI
hetong007 37f65fe
modify error message
hetong007 b6bc840
Merge branch 'resnet_aug' of https://github.com/hetong007/incubator-m…
hetong007 9bf2494
Trigger CI
hetong007 d266cb3
Trigger CI
hetong007 12e0009
Trigger CI
hetong007 4c79a06
improve script in example
hetong007 27b99e3
fix script
hetong007 c8a3bfa
clear code
hetong007 966360c
Trigger CI
hetong007 ecdb44a
set min_aspect_ratio to optional, move rotation and pad before random…
hetong007 6a848bb
fix
hetong007 f4a0195
Trigger CI
hetong007 3161574
Trigger CI
hetong007 0fd347a
Trigger CI
hetong007 22719b1
Merge remote-tracking branch 'upstream/master' into resnet_aug
hetong007 43c71e8
fix default values
hetong007 a0e3015
Trigger CI
hetong007 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
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.
I think it would be better to set defaults to the values we know work well, so that this script is runnable easily. Especially since we no longer set the aug level in train_imagenet.py
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.
My opinion is that by setting default values to perform no augmentation, users know exactly what kind of augmentation has been applied to the pipeline. It is transparent and will cause less confusion.
On the other hand, not every model uses the same augmentation as ResNet to train on ImageNet. If later another work introduces a better augmentation pipeline with different parameters, then we are unable to justify our default parameters.
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.
How about a function like the set_aug_level with the defaults set for resnet, but that function is not automatically called?
My only concern was that we don't have a good source (for users not using GluonCv, on a good set of starting params). Your point also makes sense, so am not too strongly opinionated about 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.
Just reviewed the code again, I think I'll turn off
--random-crop
and--random-mirror
as well.I can replace
set_aug_level
withset_resnet_aug
. The current one has settings look kind of arbitrary to me.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.
This PR removed set_data_aug_level() in data.py, but the function in still used in example/image-classification/fine-tune.py and example/image-classification/train_cifar10.py. Also, shouldn't set_resnet_aug() turn on mirroring, given the default has been changed to 0? Currently:
@hetong007 @ptrendx
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.
@DickJC123 Hi Dick, I'm fixing these issues in #11533