CNNDetection
A ResNet-50 trained as a binary classifier to tell real photos from CNN-generated images.
Image classification · 175 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Image classification
- Parameters
- 23.5M
- Operations
- 175
- Framework
- PyTorch
- Recurrent
- No
- Published
- CVPR 2020
- Cited by
- 1,201 (as of 28 October 2026)
- Authors
- Sheng-Yu Wang, Oliver Wang, Richard Zhang and others
- License
- CC-BY-NC-SA-4.0
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m15144
- Graph hash
- 3ed369a9588ac9f6978ff5a60023b291cef513dcd324a3154d08e4356dbe5ef3
- Skeleton hash
- a6ad0dd68d4976e4bd6ece6c83a81575da884a6048765c4ad7a09ee5beb67183
- Architecture hash
- 05bd86ad813937398e61efad39bf609889a9acffc41bd810f2ebfdc33a9594cd
- Diagram SHA-256
- 5a4866bce3ecf29e7c55b44bf0b96a365b0d7807c174fcca4638125c46150c95
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
CNNDetection is a detector for telling apart real images from images generated by a convolutional neural network (CNN). The network is a ResNet-50 pre-trained on ImageNet and then trained as a binary real-or-fake classifier, so the graph is a standard image classifier. The paper's contribution is in how that classifier is trained and what its behavior shows.
The authors train on images from only one generator, ProGAN, and report that the classifier generalizes to unseen architectures, datasets and training methods. The training set has 720K images, built from 20 ProGAN models each trained on a different LSUN object category. Data augmentation in the form of common post-processing operations is described as critical for generalization, even when the test images are not post-processed. The two trained variants blur and JPEG-compress each training image with 50% or with 10% probability.
To test the detector the paper introduces the ForenSynths dataset, with synthesized images from 11 models, and scores each one by average precision. The authors read the result as a sign that the CNN-generated images of that time share common systematic flaws. A later note in the code repository reports 92% AUC on StyleGAN3.
Key idea. The paper shows that a standard image classifier trained on images from one CNN generator, ProGAN, can detect images from many other generators when trained with careful augmentation.
- CNNDetection
- CNN-generated image detection
- fake image detector
- GAN image detection
- image forensics
- real or fake classifier
- ForenSynths
- deepfake detection
- synthetic image detection
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{wang2020cnngeneratedimagessurprisinglyeasy,
title={CNN-generated images are surprisingly easy to spot... for now},
author={Sheng-Yu Wang and Oliver Wang and Richard Zhang and Andrew Owens and Alexei A. Efros},
year={2020},
eprint={1912.11035},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/1912.11035},
}