Overview: Our solution is an end-to-end detection pipeline designed to identify AI-generated content (AIGC) in images, explicitly distinguishing between pristine photographs/human-crafted art and synthetic generations produced by modern diffusion models and CNN.
Inspiration: When presented with five different problem statements, we were drawn to the challenge of identifying AI-generated images because of its growing relevance in today’s digital landscape. With generative AI becoming increasingly capable of producing realistic images, distinguishing synthetic content from real images is becoming more difficult.
We were particularly interested in the technical challenge behind the problem. Rather than simply detecting obvious visual artefacts, could we build a computer vision system that learns subtle patterns across images generated by different AI models and remains reliable after common image transformations?
This led us to explore how modern vision architectures could be fine-tuned for AI-generated image detection
Development Tools Used:
- IDE & Environment: Visual Studio Code, Jupyter Notebooks
- Experiment Tracking & Computation: Kaggle Notebook
- Version Control: Git & GitHub
We used Visual Studio Code and Jupyter Notebooks throughout the development process to write, test, and iterate on our code. For model training and experimentation, we used Kaggle Notebooks to access the computational resources needed to train and evaluate our models. We also used Git and GitHub for version control, allowing us to manage our code and track changes as we developed the project collaboratively.
Models, APIs & Frameworks Used:
- Core Architecture: Fine-tuned ConvNeXt and Vision Transformer (ViT) backbones pretrained on ImageNet-22k.
- Deep Learning Frameworks: PyTorch, torchvision
- Libraries & Utilities: Hugging Face Transformers, Timm (PyTorch Image Models), scikit-learn, pandas, OpenCV, Pillow, NumPy
Our core architecture was built around fine-tuned ConvNeXt and Vision Transformer (ViT) backbones, both pretrained on ImageNet-22k. We implemented our deep learning pipeline using PyTorch and torchvision, while Hugging Face Transformers and Timm (PyTorch Image Models) supported our model development. For data processing, image manipulation, and evaluation, we used scikit-learn, pandas, OpenCV, Pillow, and NumPy.
Datasets & Assets Used:
- Training Corpus: A balanced mixture of real images (COCO, ImageNet subsets) and synthetic images generated across multiple architectures (Stable Diffusion v1.5/XL, Midjourney v5/v6, DALL-E 3).
We constructed a balanced training corpus containing both real and synthetic images. The real-image component was sourced from COCO and selected ImageNet subsets, while the synthetic component consisted of images generated using multiple architectures, including Stable Diffusion v1.5/XL, Midjourney v5/v6, and DALL-E 3. By including outputs from different image-generation models, we aimed to make our detector more generalisable rather than having it learn the characteristics of a single generator.
- Robustness Corpus: Augmented variants incorporating Gaussian blur, JPEG compression artifacts, random cropping, and color jitter.
To test how well our model would perform under realistic conditions, we created a robustness corpus containing augmented versions of the images. These included Gaussian blur, JPEG compression artifacts, random cropping, and colour jitter. These transformations allowed us to evaluate whether our model could still identify AI-generated images when their visual quality or appearance had been altered.
| Evaluation Condition | Certainty/AIGC Score |
|---|---|
| Clean Image (test4.png) (Unmodified) | 0.99 |
| Transformed Image (test21.png) (Augmented) | 0.482 |
Error Analysis Note
The evaluation reveals a sharp performance drop under heavy degradation (dropping from 0.98 on clean inputs down to 0.461 on transformed inputs).
False Positives: Highly textured real photographs (e.g., dense foliage, complex architectural facades) are occasionally misclassified as fake due to high-frequency noise patterns mimicking diffusion artifacts.
False Negatives: Heavily compressed or downscaled synthetic images frequently bypass detection because compression artifacts strip away the subtle high-frequency spectral traces left by latent diffusion decoders.
Trade-offs: Optimizing the decision threshold to reduce false positives on pristine real imagery increases the false-negative rate on heavily compressed AIGC, highlighting a core tension between robustness to compression and sensitivity to micro-artifacts. Challenges & Lessons Learned
Building a consistent data pipeline for diverse generators presented a major scaling hurdle. Manually validating images proved unfeasible, prompting the integration of an AI agent to assist with data pipeline diagnostics, spot structural anomalies, and iteratively refine dataset quality based on live model feedback.
This workflow demonstrated that AI can serve as an active development multiplier rather than just a final product. Furthermore, performance gains stemmed less from raw model complexity and more from diagnosing data weaknesses and continuously tightening the iteration loop around them.
Built With
- keras
- python
Log in or sign up for Devpost to join the conversation.