Skip to content

lmb-freiburg/rohl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RoHL

Code accompanying the paper: Improving robustness against common corruptions with frequency biased models (ICCV 2021)

Setup

Please install the following packages

  • pytorch (>=1.6)
  • numpy
  • scikit-learn
  • pandas

Evaluation

  • Note: the imagenet data directory should have the following structure:
 imagenet
 └── train
 └── val
 └── corrupted
     └── brightness
     └── contrast
     └── fog
     └── ...
  • Download pretrained models: lf_expert, hf_expert

  • Then run the following command to evaluate:

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

Example training:

  • 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

Citation

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"
}

Author

Tonmoy Saikia (saikiat@cs.uni-freiburg.de)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages