Skip to content

Advanced Hybrid Intelligence for detecting AI-generated images. Combines commercial-grade APIs, cutting-edge open-source models, and privacy-first local analysis.

Notifications You must be signed in to change notification settings

pratikrath126/ai-image-detector

Repository files navigation

🕵️‍♂️ AI Image Detector

AI Image Detector Hero

Advanced Hybrid Intelligence for detecting AI-generated images. Combines commercial-grade APIs, cutting-edge open-source models, and privacy-first local analysis.

🔗 Live Demo

https://aiimagedetector-ten.vercel.app

🚀 Features

  • Multi-Engine Ensemble: Uses 3 independent detection engines for maximum reliability.
    • Sightengine GenAI: Commercial-grade detection for DALL-E, Midjourney, Stable Diffusion.
    • Ateeqq Space (ViT): High-accuracy Vision Transformer hosted on Hugging Face Spaces.
    • Local Metadata Engine: specialized heuristic analysis of EXIF data, AI tool markers, and entropy.
  • Weighted Voting System: Smart aggregation logic that reduces false positives by cross-validating results.
  • Cyberpunk UI: A stunning, responsive interface with neon aesthetics, glassmorphism, and smooth animations.
  • Privacy-First: Images are processed in real-time and never stored.
  • Drag & Drop: Intuitive upload zone with file validation and preview.

🛠️ Tech Stack

  • Framework: Next.js 14 (App Router)
  • Language: TypeScript
  • Styling: Vanilla CSS (Variables, Flexbox/Grid, Animations) - No Tailwind dependency
  • AI Integration:
    • @gradio/client for Hugging Face Spaces
    • FormData for Sightengine API
  • Deployment: Vercel

📦 Installation

  1. Clone the repository:

    git clone https://github.com/your-username/ai-image-detector.git
    cd ai-image-detector
  2. Install dependencies:

    npm install
  3. Set up Environment Variables: Create a .env.local file in the root directory and add your keys:

    # Sightengine API (Get free keys at sightengine.com)
    SIGHTENGINE_API_USER=your_user_id
    SIGHTENGINE_API_SECRET=your_api_secret
    
    # Hugging Face Token (Optional, for higher rate limits)
    HF_API_TOKEN=hf_your_token_here
  4. Run Development Server:

    npm run dev

    Open http://localhost:3000 to view the app.

🚀 Deployment

The easiest way to deploy is via Vercel.

  1. Push your code to GitHub.
  2. Import the project in Vercel.
  3. Add the Environment Variables (SIGHTENGINE_API_USER, SIGHTENGINE_API_SECRET, HF_API_TOKEN) in the Vercel project settings.
  4. Deploy!

🧩 Architecture

graph TD
    A[Image Upload] --> B[Next.js API Route /api/detect]
    B --> C1[Sightengine GenAI]
    B --> C2["Ateeqq Space (ViT/CNN)"]
    B --> C3[Local Metadata Analysis]
    C1 & C2 & C3 --> D[Ensemble Engine]
    D --> E[Weighted Voting Logic]
    E --> F[finalVerdict + Confidence Score]
Loading

📄 License

MIT License. Free to use and modify.

About

Advanced Hybrid Intelligence for detecting AI-generated images. Combines commercial-grade APIs, cutting-edge open-source models, and privacy-first local analysis.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors