Less Attention is More: Prompt Transformer for Generalized Category Discovery (CVPR2025)
September 9, 2025 ยท View on GitHub
Less Attention is more: Prompt Transformer for Generalized Category Discovery (CVPR 2025)
By
Wei Zhang,
Baopeng Zhang*,
Zhu Teng,
Wenxin Luo,
Junnan Zou,
Jianping Fan

๐ Running
Dependencies
We provide torch version and paddle version in this repo.
Torch: The code was trained onpython3.10pytorch2.0.0andCUDA11.7. You can install dependencies by
pip install -r requirements.txt
Paddle: This version was trained onpython3.10.9paddlepaddle-gpu2.6.2.post112
Config
Set paths to datasets and desired log directories in config.py.
Datasets
- We trained on three generic datasets: CIFAR-10, CIFAR-100, ImageNet-100.
- We also used four fine-grained benchmarks: StanfordCars, CUB-200, FGVC-Aircraft and Herbarium19.
Scripts
Train the model (taking the Stanford Cars benchmark as an example).
bash scripts/run_cars.sh
Pretrain model
Download the pretrain models and put them in pretrain_model folder. Changing the path (such as /pretrain_model/scars.pt) in train.py if you use these models.
๐ก Citing this work
If you find this repo useful for your research, please consider citing our paper:
@inproceedings{zhang2025less,
title={Less Attention is More: Prompt Transformer for Generalized Category Discovery},
author={Zhang, Wei and Zhang, Baopeng and Teng, Zhu and Luo, Wenxin and Zou, Junnan and Fan, Jianping},
booktitle={Proceedings of the Computer Vision and Pattern Recognition Conference},
pages={30322--30331},
year={2025}
}
๐ Acknowledge
The code is largely built on : LegoGCD and SPTNet. Many thanks to their briliant works.