Skip to content
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

CutMix data augmentation #144

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

navreeetkaur
Copy link

@navreeetkaur navreeetkaur commented Jan 18, 2022

CutMix is an image data augmentation technique increasingly used nowadays in training pipelines to improve performance. It is one of the best performing augmentation methods on CIFAR.

A patch in the image is removed and padded by a patch from another image in the dataset. The ground truth labels are also mixed proportionally to the number of pixels of combined images.

I use cutmix along with transforms of random crop, horizontal flip and normalisation as used by the original code, and train four models with cutmix probability of 0.5 and beta 1.0. The test results are as follows -

Model Acc. w/o Cutmix Acc. with Cutmix
VGG16 92.64% 94.77%
ResNet18 93.02% 95.84%
GoogleLeNet 93.64% 95.71%
SimpleDLA 94.89% 95.35%

These models were trained using MultiStepLR with milestones of 50 and 100 epochs, and gamma of 0.1

I noticed that MultiStepLR helps achieve the same accuracy earlier in the training procedure as compared to CosineAnealingLR. With max epochs of 200, learning rate at 50-60 epochs is around 0.08 while using CosineAnealingLR. This seems a bit high as accuracy and loss fluctuates and training progresses slowly. MultiStepLR helps use lr of 0.01 after 50 epochs, and 0.001 after 100 epochs, which helps reach higher accuracy faster. Hence, I have also added a parser argument to choose the scheduler from either CosineAnealingLR or MultiStepLR.

@navreeetkaur navreeetkaur changed the title CutMix CutMix data augmentation Jan 18, 2022
@navreeetkaur
Copy link
Author

#116 #120 #130

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant