AI-Image-Detector / README.md
AI-RESEARCHER-2024's picture
Update README.md
737a831 verified

A newer version of the Gradio SDK is available: 6.2.0

Upgrade
metadata
title: AI Image Detector
emoji: πŸ”
colorFrom: green
colorTo: red
sdk: gradio
sdk_version: 6.0.2
app_file: app.py
pinned: false
license: mit

AI Image Detector

Detect whether an image is AI-generated or a real photograph using deep learning.

Model Architecture

  • Base Model: MobileNetV2 (pretrained on ImageNet)
  • Transfer Learning: Custom classification head with:
    • Global Average Pooling
    • Batch Normalization
    • Dense layer (256 units) with L2 regularization
    • Dropout (0.7)
    • Sigmoid output for binary classification

Training Data

The model was trained on a combined dataset of ~128,000 images:

  • CIFAKE Dataset: 100,000 images (50k real, 50k AI-generated)
  • Tiny GenImage Dataset: 28,000 additional images from various AI generators including:
    • Midjourney
    • Stable Diffusion
    • BigGAN
    • ADM
    • GLIDE
    • VQDM
    • Wukong

Usage

Upload any image to the interface, and the model will predict whether it's:

  • Real Image: A genuine photograph
  • AI-Generated: Created by an AI model

Files

  • app.py - Main Gradio application
  • requirements.txt - Python dependencies
  • transfer_model.keras - Trained model weights

License

MIT License

Acknowledgments