Shuqiao Liang, Jian Liu, RenZhang Chen, Quanlong Guan
- [2025.09.25] We have released the code, dataset and pre-trained model of FerretNet!
- [2025.09.18] FerretNet has been accepted by NeurIPS 2025! 🎉🎉🎉
- We released two new test dataset: Synthetic-Pop and Synthetic-Aesthetic, more detail see 👉detailed tutorial.
- We discussed the artifacts in synthetic images caused by latent variable sampling and decoding (showing as texture discontinuities, excessive smoothing, and other local anomalies). Based on this and the local pixel correlations of the Markov Random Field, we proposed a method to reconstruct synthetic images using local pixels, enabling the revelation of abnormal artifacts. Building upon the proposed synthetic image artifact extraction method, we introduce FerretNet, a lightweight neural network with only 1.1M parameters, which is trained from scratch using ProGAN-4cls. It achieves an average detection accuracy of 97.1% across synthetic images from 20+ generative models.
-
Clone the repo:
git clone https://github.com/xigua7105/FerretNet.git cd FerretNet -
Environment setup:
FerretNet works with Python 3.10+ and PyTorch 2.0+.
conda create -n ferretnet python=3.10 conda activate ferretnet pip install -r requirements.txt
- Download pre-trained model ferretnet-b-median-3.pth.
- To quickly detect whether an image is AI-synthesized, run:
python demo_image.py --cfg_path configs/Test.yaml - To quickly detect whether a video is AI-synthesized, run:
python demo_video.py --cfg_path configs/Test.yaml
- We provide visualization tools for analyzing image in the "analysis" folder.
python -m analysis.generate_images --image_dir path_to_your_image_dir --gen_mode v1
- ⬇️ All checkpoints and configs can download from our Baidu Disk link.
-
Results on VAR.
Evaluate ACC and AP on images generated by the autoregressive model VAR. The data can be downloaded from our Baidu Disk link.Method VAR NPR 82.9 / 83.7 FreqNet 95.3 / 98.7 FatFormer 83.9 / 91.1 FerretNet (Ours) 97.8 / 99.9 -
More sota methods comparison. Updating...
The reported results correspond to the average ACC and AP across four datasets: ForenSynths, Diffusion-6-cls, Synthetic-Pop, and Synthetic-Aesthetic.Methods Ref Image size Params FLOPs FPS ACC / AP CO-SPY CVPR 2025 384² 963.05M 644.80G 26.3 76.5 / 83.8 FatFormer CVPR 2024 224² 492.59M 269.92G 88.6 86.1 / 91.0 FreqNet AAAI 2024 256² 1.85M 2.58G 200.2 79.2 / 86.8 NPR CVPR 2024 256² 1.44M 2.29G 720.9 86.5 / 89.4 SAFE KDD 2025 256² 1.44M 2.29G 770.2 96.8 / 99.3 FerretNet (Ours) NeurIPS 2025 256² 1.06M 2.38G 772.1 97.1 / 99.6 -
More details can be found in 👉detailed results.
- We provide a 👉detailed tutorial for training your own models.
- Thanks to these open-source repositories (CNNDetection, DIRE, UniversalFakeDetect and FatFormer) for their contribution to advancing the development of synthetic image detection.
-
If the code, dataset and paper help your research, please cite our paper:
This project is released under the Apache 2.0 license. Please see the LICENSE file for more information.



