[CVPR 2021] Code for "Augmentation Strategies for Learning with Noisy Labels".
MIT License
Code for Augmentation Strategies for Learning with Noisy Labels (CVPR 2021).
Authors: Kento Nishi*, Yi Ding*, Alex Rich, Tobias Höllerer [*
: equal contribution]
View on arXiv / View PDF / Download Paper Source / Download Source Code
The source code is heavily reliant on CUDA. Please make sure that you have the newest version of Pytorch and a compatible version of CUDA installed. Using older versions may exhibit inconsistent performance.
Download Pytorch / Download CUDA
Other requirements are included in
requirements.txt
.
Reproducibility
At particularly high noise ratios (ex. 90% on CIFAR-10), results may vary across training runs. We are aware of this issue, and are exploring ways to yield more consistent results. We will publish any findings (consistently performant configurations, improved procedures, etc.) both in this repository and in continuations of this work.
All training configurations and parameters are controlled via the presets.json
file. Configurations can contain infinite subconfigurations, and settings specified in subconfigurations always override the parent.
To train locally, first add your local machine to the presets.json
:
{
// ... inside the root scope
"machines": { // list of machines
"localPC": { // name for your local PC, can be anything
"checkpoint_path": "./localPC_checkpoints"
}
},
"configs": {
"c10": { // cifar-10 dataset
"machines": { // list of machines
"localPC": { // local PC name
"data_path": "/path/to/your/dataset"
// path to dataset (python) downloaded from:
// https://www.cs.toronto.edu/~kriz/cifar.html
}
// ... keep all other machines unchanged
}
// ... keep all other config values unchanged
}
// ... keep all other configs unchanged
}
// ... keep all other global values unchanged
}
A "preset" is a specific configuration branch. For example, if you would like to run train_cifar.py
with the preset root -> c100 -> 90sym -> AugDesc-WS
on your machine named localPC
, you can run the following command:
python train_cifar.py --preset c100.90sym.AugDesc-WS --machine localPC
The script will begin training the preset specified by the --preset
argument. Progress will be saved in the appropriate directory in your specified checkpoint_path
. Additionally, if the --machine
flag is ommitted, the training script will look for the dataset in the data_path
inherited from parent configurations.
Here are some abbreviations used in our presets.json
:
Abbreviation | Meaning |
---|---|
c10 |
CIFAR-10 |
c100 |
CIFAR-100 |
c1m |
Clothing1M |
sym |
Symmetric Noise |
asym |
Asymmetric Noise |
SAW |
Strongly Augmented Warmup |
WAW |
Weakly Augmented Warmup |
RandAug |
RandAugment |
Please cite the following:
@InProceedings{Nishi_2021_CVPR,
author = {Nishi, Kento and Ding, Yi and Rich, Alex and {H{\"o}llerer, Tobias},
title = {Augmentation Strategies for Learning With Noisy Labels},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2021},
pages = {8022-8031}
}
Extra bits of unsanitized code for plotting, training, etc. can be found in the Aug-for-LNL-Extras repository.
This repository is a fork of the official DivideMix implementation.