Spaces:
Sleeping
Sleeping
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 informationGET /health- Health check endpointPOST /analyze- Upload image for AI vs Real detectionGET /docs- Interactive Swagger API documentation
Usage
- Health Check:
GET /health - Analyze Image:
POST /analyzewith image file in form data - API Docs: Visit
/docsfor 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.