[CVPR2025] SCAP: Transductive Test-Time Adaptation via Supportive Clique-based Attribute Prompting
April 18, 2025 · View on GitHub
Wangxuan Institute of Computer Technology, Peking University
The official repository for SCAP: Transductive Test-Time Adaptation via Supportive Clique-based Attribute Prompting.

Environment Preparation
conda create -n TTA python=3.11
conda activate TTA
pip install torch==2.4.0 torchvision==0.19.0 torchaudio==2.4.0 --index-url https://download.pytorch.org/whl/cu118
pip install -r requirement.txt
Data
You should download ImageNet-A, ImageNet-R, ImageNet-Sketch and ImageNet-V first.
Then your data directory should be organized in the following format:
- you_data_path
- imagenet-a
- imagenet-r
- imagenet-sketch
- imagenet-v2-matched-frequency-format-val
Evaluation
You can run the following commands for ImageNet-A/R/Sketch/V2 respectively:
bash scripts/A.sh
bash scripts/R.sh
bash scripts/K.sh
bash scripts/V.sh
Results
The results were obtained with a single NVIDIA 4090 GPU.
The Acc@1 comparison results against CLIP, few-shot learning methods and the latest test-time adaptation methods on 4 benchmark datasets.

Citation
If you find this code useful for your research, please cite our paper.
@article{zhang2025scap,
title={SCAP: Transductive Test-Time Adaptation via Supportive Clique-based Attribute Prompting},
author={Zhang, Chenyu and Xu, Kunlun and Liu, Zichen and Peng, Yuxin and Zhou, Jiahuan},
journal={arXiv preprint arXiv:2503.12866},
year={2025}
}
Acknowledgement
Our code is based on the PyTorch implementation of TPT and DART.
Contact
For any questions, feel free to contact us (xkl@stu.pku.edu.cn).
Welcome to our Laboratory Homepage (OV3 Lab) for more information about our papers, source codes, and datasets.