This repository is an official implementation of IAPL, codes and weight will be released after paper accepted.
- [2026/3/4] Codes and pre-trained weights are released.
- [2026/2/21] Our paper is accepted by CVPR 2026.
pip install -r requirements.txt
Download UniversalFakeDetect and GenImage Datasets.
Organize the directory structure as follows:
Datasets
└── UniversalFakeDetect
└── train
├── car
├── horse
│ .
│ .
└── test
├── progan
│── cyclegan
│── biggan
│ .
│ .
└── GenImage
└── train
├── SDv14
├── 0_real
├── 1_fake
└── test
├── ADM
├── 0_real
├── 1_fake
│── BigGAN
│── glide
│ .
│ .
Training:
sh run_universalfake.sh
Testing on universalfakedetect:
sh tta_universalfake.sh
Testing on Chameleon:
sh tta_chameleon.sh
Results:
| Benchmark | mACC(%) | mAP(%) |
|---|---|---|
| UniversalFakeDetect | 95.61 | 99.32 |
| Chameleon | 60.70 | 50.43 |
Training:
sh run_genimage.sh
Testing on GenImage:
sh tta_genimage.sh
Testing on Chameleon:
sh tta_chameleon_sdv1.4.sh
Results:
| Benchmark | mACC(%) | mAP(%) |
|---|---|---|
| GenImage | 96.7 | 99.5 |
| Chameleon | 75.09 | 64.69 |
We release the pre-trained models on ModelScope
We sincerely thank the following repos: UniversalFakeDetect, FatFormer, AIDE and TPT.
@article{li2025towards,
title={Towards Generalizable AI-Generated Image Detection via Image-Adaptive Prompt Learning},
author={Li, Yiheng and Tan, Zichang and Xu, Guoqing and Lei, Zhen and Zhou, Xu and Yang, Yang},
journal={arXiv preprint arXiv:2508.01603},
year={2025}}

