Inspiration
AI-generated images are becoming increasingly difficult to distinguish from authentic images. But the challenge goes beyond simply detecting images produced by today's generators. In the real world, images are often compressed, resized, blurred, cropped, or affected by noise before they are analyzed. I wanted to build a detector that was designed with this problem in mind rather than optimizing only for clean-image accuracy. This led me to explore whether combining information from the image's spatial appearance with information hidden in its frequency characteristics could provide a more robust signal.
What it does
Verixa is a robust AIGC image detection system that predicts how likely an image is to be AI-generated. It uses two complementary branches:
- RGB branch: ConvNeXt-Tiny extracts spatial and visual features from the original image.
- Frequency branch: A 2D Fast Fourier Transform converts the image into a frequency representation, which is processed by a dedicated CNN.
The features from both branches are fused to produce the final AIGC probability. Verixa is also evaluated beyond clean images through a 17-condition robustness suite covering compression, blur, resizing, noise, jitter, cropping, and severe composite transformations.
How I built it
I built Verixa using Python and PyTorch. For training, I used a balanced dataset of 30,000 images from CIFAKE and SID_Set, with 15,000 images from each dataset. I used an approximately 80/20 train-validation split with a fixed seed of 1337 and explicitly checked for cross-split leakage. The final architecture combines a ConvNeXt-Tiny RGB branch with an FFT-based convolutional branch. Their learned representations are fused before the final classification layer. I also built the surrounding pipeline for dataset preparation, augmentation, training, threshold calibration, inference, robustness evaluation, and error analysis. The final repository includes a command-line inference pipeline that accepts an image directory and produces the required JSON output containing image_path and pred.
Challenges I ran into
The biggest challenge was generalization. A detector can achieve excellent performance when the training and evaluation images share similar characteristics, but that does not guarantee that it will recognize images from an unseen generator. This became especially apparent when I evaluated Verixa on a held-out distribution. While the model performed strongly on the development data and remained relatively stable under image transformations, its performance on unseen DALL·E 3-generated images revealed a significant generalization gap. This taught me that building a reliable AIGC detector requires much more than maximizing accuracy on a single dataset.
Accomplishments that I'm proud of
I am particularly proud of building Verixa as a complete, reproducible detection pipeline rather than only a trained classifier. The final V1 model achieved:
- 97.55% Clean Accuracy
- 99.68% Clean AUROC
- 2.50% Clean FPR
- 96.95% Mean Transformed Accuracy
- 95.37% Worst-Case Accuracy
- 97.30% Held-Out COCO Accuracy
- 51.97% DALL·E 3 Synthetic Recall
I am also proud that the project includes a dedicated robustness evaluation, explicit error analysis, cross-split leakage checks, automated tests, a public model checkpoint through Git LFS, and a working end-to-end inference demo.
What I learned
The biggest lesson was that robustness and generalization are different problems. Verixa performed well when images were transformed through compression, blur, resizing, noise, and other distortions. However, the held-out DALL·E 3 evaluation showed that strong robustness to image transformations does not automatically translate into strong generalization to a new image generator. The project also reinforced the value of combining complementary representations. RGB features capture visible spatial information, while frequency-domain features provide a different perspective on the same image. Most importantly, I learned that honest evaluation and error analysis are just as important as the headline accuracy when building forensic machine-learning systems.
What's next for Verixa — Robust AIGC Image Detection
The next priority for Verixa is improving cross-generator generalization. Given more time, I would expand the training data across a wider range of image generators and investigate more generator-independent forensic features. I would also explore additional frequency representations and stronger feature-fusion strategies. The long-term goal is to move from a detector that performs well on known distributions toward one that can reliably identify AI-generated content from previously unseen generators and real-world image conditions.
Built With
- cnn
- convnext
- machine-learning
- numpy
- pillow
- python
- pytorch
- scikit-learn
Log in or sign up for Devpost to join the conversation.