1Wangxuan Institute of Computer Technology, Peking University 2School of Artificial Intelligence and Automation, Huazhong University of Science and Technology 3Amazon Inc.
This is the official repository for Class-aware Domain Knowledge Fusion and Fission for Continual Test-Time Adaptation.
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
- Other datasets can be downloaded automatically.
Set --data_dir to your corruption dataset path.
For the "Source Domain Statistics", besides training it by yourself, you can also use the one provided by us: ImageNet, Cifar10, Cifar100.
You can set --train_info to use the provided "Source Domain Statistics", or you can train it yourself by setting --src_data_dir.
- ImageNet-to-ImageNet-C: you can directly load it 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.
For Cifar10-to-Cifar10-C/Cifar100-to-Cifar100-C, load the source model by setting --checkpoint.
bash bash/imagenet.sh
bash bash/cifar10.sh
bash bash/cifar100.shThe results were obtained with a single NVIDIA 4090 GPU.
If you find this code useful for your research, please cite our paper.
@inproceedings{zhou2025classaware,
title={Class-aware Domain Knowledge Fusion and Fission for Continual Test-Time Adaptation},
author={Zhou, Jiahuan and Zhu, Chao and Cui, Zhenyu and Liu, Zichen and Zou, Xu and Hua, Gang},
booktitle={The Thirty-ninth Annual Conference on Neural Information Processing Systems},
year={2025}
}Our code is based on the PyTorch implementation of the following projects: