Code accompanying the paper: Improving robustness against common corruptions with frequency biased models (ICCV 2021)
Please install the following packages
- pytorch (>=1.6)
- numpy
- scikit-learn
- pandas
- Note: the imagenet data directory should have the following structure:
imagenet
└── train
└── val
└── corrupted
└── brightness
└── contrast
└── fog
└── ...
python train.py ./datasets/imagenet --low-high --evaluate --lf-ckpt ./work_dir/lf_expert/model.pth.tar --hf-ckpt ./work_dir/hf_expert/model.pth.tar -b 1024
- Non-TV model:
python train.py ./datasets/in-100 --num-classes 100 --arch resnet18 -b 64 --lr 0.025 --id=non_tv_model
- TV model:
python train.py ./datasets/in-100 --num-classes 100 --epochs 180 --arch resnet18 -b 64 --lr 0.025 --id=tv_model --tv --num-tv-layers 1
If you use the code or parts of it in your research, you should cite the aforementioned paper:
@InProceedings{SB21b,
author = "T. Saikia and C. Schmid and T.Brox",
title = "Improving robustness against common corruptions with frequency biased models",
booktitle = "IEEE International Conference on Computer Vision (ICCV)",
year = "2021",
url = "http://lmb.informatik.uni-freiburg.de/Publications/2021/SB21b"
}
Tonmoy Saikia (saikiat@cs.uni-freiburg.de)