How syedhissamkazmi/ai-image-detector works
AI Image Authenticity Detector accepts images through a FastAPI web interface or a separate Streamlit demo, then reports probabilistic AI-authenticity results. The main workflow validates and optionally resizes an upload, extracts image details, runs two detectors concurrently, combines available predictions, and returns a structured report for the frontend. The README also documents model transparency, fallback behavior, dominant colours, and EXIF metadata. Some route and analyzer excerpts are incomplete, so uncertain internal wiring is omitted; the Streamlit path is documented only where its sampled source supports it.
Main entry points: routes.py Analyze route · analyzer.py Image analyzer · app.js Upload frontend · model.py Detector ensemble
Components 14
Web experience
- FastAPI app
app/main.py - Upload frontend
frontend/app.js - Streamlit demo
streamlit_app.py
Image analysis
- Upload validation
app/api/routes.py - Temporary uploads
uploads - Image analyzer
app/services/analyzer.py - Image features
app/services/analyzer.py
Model inference
- Detector ensemble
app/detector/model.py - Ateeq detector
app/detector/ateeq_detector.py - Wkaandemir detector
app/detector/wkaandemir_detector.py
API and configuration
- Analyze route
app/api/routes.py - Analysis response
app/api/schemas.py
Other components
- Browser user
- Hugging Face model hub
Connections 19
- Browser user → Upload frontend: selects image
- Upload frontend → Analyze route: posts upload
- FastAPI app → Upload frontend: serves interface
- FastAPI app → Analyze route: mounts routes
- Analyze route → Upload validation: validates and resizes
- Analyze route → Temporary uploads: writes temporary image
- Analyze route → Image analyzer: requests analysis
- Image analyzer → Image features: extracts metadata and colours
- Image analyzer → Temporary uploads: reads image file
- Image analyzer → Detector ensemble: requests predictions
- Detector ensemble → Ateeq detector: runs prediction
- Detector ensemble → Wkaandemir detector: runs prediction
- Ateeq detector → Hugging Face model hub: loads model
- Wkaandemir detector → Hugging Face model hub: downloads weights
- Image analyzer → Analysis response: builds report
- Analyze route → Upload frontend: returns JSON
- Upload frontend → Browser user: renders results
- Browser user → Streamlit demo: uploads image
- Streamlit demo → Detector ensemble: requests predictions