How pratyaksh-saxena018/deepfake-authenticator works
This repository provides image-authenticity detection through two Streamlit interfaces and a spectral-feature command-line workflow. The spectral path detects a face (or falls back to the full image), computes frequency features, and classifies them; training scripts prepare data and produce classifier weights. Separate MobileViT training and inference provide another image-classification path. A forensic-reporting module supports retrieval-grounded reports but is not shown connected to either interface. The README is empty, so relationships below rely on the sampled source; unsampled tests and other internals are omitted.
Main entry points: mini_predict.py CLI prediction · prepare_data.py Dataset preparation · train_classifier.py Spectral training · data Real/fake images
Components 15
User Interfaces
- Foundation UI
app_v2.py - Hosted detector
- MobileViT UI
app_v3.py
Spectral Detection
- CLI prediction
mini_predict.py - Face extraction
utils/face_extractor.py - Spectral features
utils/spectral_engine.py
Model Training
- MobileViT weights
models/mobilevit_deepfake.pt - XGBoost model
models/xgboost_spectral_model.json - Dataset preparation
prepare_data.py - Hugging Face dataset
- Real/fake images
data - Spectral training
train_classifier.py - MobileViT training
train_deep.py
Forensic Reporting
- Report synthesis
utils/rag_reporter.py
Other components
- Image submitter
Connections 16
- Image submitter → Foundation UI: uploads image
app_v2.py - Foundation UI → Hosted detector: classifies image
app_v2.py - Image submitter → MobileViT UI: uploads image
app_v3.py - MobileViT UI → MobileViT weights: loads weights
app_v3.py - Image submitter → CLI prediction: provides image
mini_predict.py - CLI prediction → Face extraction: extracts face
mini_predict.py - CLI prediction → Spectral features: computes features
mini_predict.py - CLI prediction → XGBoost model: loads classifier
mini_predict.py - Dataset preparation → Hugging Face dataset: streams samples
prepare_data.py - Dataset preparation → Face extraction: crops faces
prepare_data.py - Dataset preparation → Real/fake images: writes images
prepare_data.py - Spectral training → Real/fake images: reads images
train_classifier.py - Spectral training → Spectral features: extracts features
train_classifier.py - Spectral training → XGBoost model: saves classifier
train_classifier.py - MobileViT training → Real/fake images: reads images
- MobileViT training → MobileViT weights: saves weights
train_deep.py