See what the image is hiding.
SpectraLens is a product-style AI image forensics demo built for hackathons, judge presentations, and fast local deployment. It combines a polished landing page with a live detector experience that helps classify uploaded images as real, AI-generated, or AI-edited while surfacing supporting forensic signals.
- A dedicated landing page at
/for storytelling, product framing, and investor/judge demos - A separate detector workspace at
/scanfor live model interaction - FastAPI + mounted Gradio architecture
- EfficientNet-based image classifier with room for frequency-analysis features
- Metadata and forensic signal summaries for explainability
- A trained checkpoint in
checkpoints/best.ptso the demo can run locally right away - Docker support for later deployment
- Open the landing page and pitch the problem, value, and need for trustworthy media verification.
- Redirect into the detector page for a live upload-and-scan demo.
- Review class confidence, forensic signals, and visual evidence overlays.
main.py- FastAPI entrypoint and landing pageapp.py- SpectraLens detector interface mounted at/scandetector/- model, feature extraction, and dataset helperstrain.py- training scriptgenerate_manifest.py- dataset manifest generatordownload_cifake.py- helper for pulling CIFAKE samplescheckpoints/best.pt- trained demo checkpointdata/- local sample images and CSV manifestsDockerfile- deployment container definition
py -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
python main.pyThen open:
http://127.0.0.1:7860/http://127.0.0.1:7860/scan
python generate_manifest.py
python train.py --manifest data/train_manifest.csv --epochs 5 --freeze-backboneThis repo is prepared for Docker-friendly platforms such as:
- Hugging Face Docker Spaces
- Render
- Railway
The app listens on port 7860.
If you deploy to Hugging Face Spaces, add the required Spaces metadata block back to the top of the README inside the Space repo, or maintain a separate deployment-specific README for that target.