mfft-api / README.md
MohsinElis's picture
Deploy production MFFT detection API with verified 20-epoch weights
37b0e8b verified
|
Raw History Blame Contribute Delete
1.38 kB
---
title: MFFT AI Image Detector API
emoji: 🛡️
colorFrom: indigo
colorTo: blue
sdk: docker
app_port: 7860
pinned: false
license: mit
---
# MFFT: Multi-Frequency Fusion Transformer — Production Detection API
FastAPI inference server for AI-generated image and deepfake detection based on radial Fourier frequency sub-band decomposition and Frequency-Guided Attention (FGA).
Three verified production models trained for 20 epochs on 120,000 images are served concurrently:
- **MFFT-Tiny** (372K params, 1.49 MB FP16): **98.59% accuracy**, **99.88% AUC-ROC** (~3.2 ms latency)
- **MFFT-Base** (1.62M params, 6.49 MB FP16): **98.37% accuracy**, **99.87% AUC-ROC** (5-seed replication average: **98.58% ± 0.13%**)
- **MFFT-Large** (6.30M params, 25.21 MB FP16): **98.11% accuracy**, **99.68% AUC-ROC** (Default production profile)
## Endpoints
- `GET /` — Healthcheck and loaded model status
- `GET /models` — Available model profiles and specifications
- `POST /predict?model=large` — Single image forensic analysis with anomaly heatmap (base64 PNG) and radial Fourier frequency band breakdown
- `POST /predict/batch?model=large` — Multi-image batch inference
## Example Usage
```bash
curl -X POST "https://mohsinelis-mfft-api.hf.space/predict?model=large" \
-H "Authorization: Bearer free" \
-F "file=@image.jpg"
```