conda create -n CTTA python==3.9.7
conda activate CTTA
pip install torch==2.1.1 torchvision==0.16.1 torchaudio==2.1.1 --index-url https://download.pytorch.org/whl/cu121
pip install -r requirements.txt- ImageNet-C Download
- Cifar10-to-Cifar10-C Automatic Download
- Cifar100-to-Cifar100-C Automatic Download
You can set --train_info to use the provided statistics.
- ImageNet-C Download
- Cifar10-to-Cifar10-C and Cifar100-to-Cifar100-C you should train it yourself by setting
--src_data_dir, source data Download
- ImageNet-to-ImageNet-C: you can load the source model from timm.
- Cifar10-to-Cifar10-C: you can load the source model from here.
- Cifar100-to-Cifar100-C: you can load the source model from here.
bash bash/imagenet.sh
bash bash/cifar10.sh
bash bash/cifar100.shOur code is based on the PyTorch implementation of the following projects:
