aivsreal / README.md
NikhilN007's picture
Resolve merge conflict in README.md and deploy AI detection app
ce55ab5
metadata
title: AI vs Real Image Detection
emoji: πŸ”
colorFrom: blue
colorTo: purple
sdk: docker
app_port: 7860
pinned: false
license: mit
short_description: FastAPI ensemble AI image detection service

πŸ” AI vs Real Image Detection

A FastAPI-based web service that detects whether images are AI-generated or real using ensemble model prediction.

Features

  • FastAPI Backend: High-performance async API
  • Ensemble Detection: Uses multiple AI detection models for higher accuracy
  • CPU Optimized: Runs efficiently on Hugging Face Spaces free tier
  • REST API: Simple POST endpoint for image analysis

API Endpoints

  • GET / - Root endpoint with service information
  • GET /health - Health check endpoint
  • POST /analyze - Upload image for AI vs Real detection
  • GET /docs - Interactive Swagger API documentation

Usage

  1. Health Check: GET /health
  2. Analyze Image: POST /analyze with image file in form data
  3. API Docs: Visit /docs for interactive documentation

Response Format

{
  "real_prob": 0.85,
  "ai_prob": 0.15,
  "analysis_time": 2.3,
  "device": "CPU"
}

Models Used

  • dima806/deepfake_vs_real_image_detection
  • umm-maybe/AI-image-detector
  • Organika/sdxl-detector

Built with FastAPI, PyTorch, and Transformers. Optimized for CPU deployment.