Inspiration

AI-generated images are becoming increasingly realistic, while social-media platforms routinely compress, resize, crop, and otherwise transform uploaded content. A detector that performs well only on pristine images may become unreliable after these everyday changes.

We built AegisAI to detect AI-generated images while also showing users how real-world image transformations affect the model’s confidence.

What it does

Users can upload an image and receive confidence scores indicating whether it is likely AI-generated or authentic.

A real-time transformation dropdown lets users apply common platform and camera effects, including:

  • JPEG compression
  • Gaussian blur
  • Resize round trips
  • Sensor noise
  • Color jitter
  • Center cropping

The interface displays the original and transformed images side by side. It also compares their confidence scores and reports the change in AI probability, making the model’s robustness visible rather than presenting only a final classification.

How we built it

AegisAI uses a pretrained EfficientNet-B0 backbone with a binary classification head. We fine-tuned it on 85,000 CIFAKE images representing authentic and AI-generated content.

Instead of applying transformations only during evaluation, we randomly introduced the challenge transformations during training. This teaches the model to recognize AI-generated content after realistic post-processing.

The pipeline includes:

  • Manifest-based dataset preparation
  • Robustness-aware training augmentation
  • Batched command-line inference
  • Clean and per-transformation evaluation
  • False-positive and false-negative analysis
  • An interactive Gradio interface
  • Automatic model-checkpoint downloading

Results

On the held-out CIFAKE evaluation set, our final model achieved:

  • 97.58% clean accuracy
  • 99.75% clean AUROC
  • 94.45% average transformed accuracy
  • 87.55% worst-case accuracy under a 0.25× resize round trip
  • 89.65% accuracy under severe Gaussian blur

We also evaluated frozen-feature DINOv2 and DINOv3 baselines. EfficientNet-B0 provided the strongest balance of clean accuracy, transformation robustness, model size, and interactive-demo speed.

Challenges we faced

The main challenge was preserving detection performance after image degradation. Compression, heavy blur, and aggressive resizing can remove the subtle visual patterns used to distinguish authentic and generated images.

Another challenge was making robustness understandable to users. Rather than displaying only one prediction, we designed the interface to show the original result, transformed result, and confidence change together.

We also had to keep the complete training, evaluation, inference, checkpoint-download, and user-interface workflow reproducible within the hackathon timeframe.

What we learned

We learned that high clean accuracy alone does not guarantee reliability after real-world processing. Training with the same transformation families used during evaluation significantly improved robustness.

We also learned that exposing confidence changes gives users more useful information than a single binary label. It makes the model’s sensitivity to compression and other transformations immediately visible.

What's next

The current model was trained on CIFAKE, whose images have a relatively low native resolution. Future work would include training on higher-resolution and more diverse datasets, evaluating additional image generators, calibrating confidence across domains, and testing against the reserved WildFake/COCO–DALL·E benchmark.

Built With

Share this project:

Updates

Submission history