How hanmoonsub/deepguard works
DeepGuard combines a browser application and FastAPI/Celery services for authenticated image and video deepfake analysis, plus a reusable model, data-preparation, training, and explainability stack. The documented workflow uploads media, queues inference, stores results, and presents probabilities and video details; separate XAI views expose model-focus heatmaps. The sampled routes and services support the upload-to-worker-to-result path. Some model, explainability, and preprocessing wiring is documented rather than shown in the excerpts, so those links are kept conservative.
Main entry points: inference.py Inference routes · celery_app.py Celery worker · App.js React app · ms_eff_gcvit.py DeepGuard models
Components 21
Web experience
- React app
client/src/App.js - Analysis pages
client/src/pages/analysispage.js - Results and heatmaps
client/src/pages/AnalysisDetailPage.js
API and jobs
- FastAPI app
App/main.py - Auth routes
App/routes/auth.py - Inference routes
App/routes/inference.py - Auth service
App/services/auth_svc.py - Image service
App/services/image_svc.py - Video service
App/services/video_svc.py - Inference coordinator
App/services/inference_svc.py - Celery worker
App/celery_app.py
Detection stack
- Image predictor
inference/image_predictor_prt.py - Video predictor
inference/video_predictor_prt.py - DeepGuard models
deepguard/models/ms_eff_gcvit.py - XAI explainers
explainability/explainer/cam_explainer.py
Model development
- Face and frame prep
preprocess/face_detector.py - Training datasets
deepguard/data/dataset.py - Training scripts
train_eff_gcvit.py
Other components
- User
- MySQL
- Redis
Connections 26
- User → React app: uses
- React app → FastAPI app: API requests
- React app → Analysis pages: routes to
- React app → Results and heatmaps: routes to
- FastAPI app → Auth routes: dispatches
- FastAPI app → Inference routes: dispatches
- Auth routes → Auth service: calls
- Auth routes → MySQL: reads/writes
- Inference routes → Image service: uploads and records
- Inference routes → Video service: uploads and records
- Inference routes → Inference coordinator: queues tasks
- Inference routes → MySQL: reads results
- Inference coordinator → Celery worker: registers tasks
- Inference coordinator → Redis: dispatches tasks
- Celery worker → Image predictor: runs image inference
- Celery worker → Video predictor: runs video inference
- Celery worker → Image service: updates image results
- Celery worker → Video service: updates video results
- Image service → MySQL: reads/writes
- Video service → MySQL: reads/writes
- Image predictor → DeepGuard models: predicts with
- Video predictor → DeepGuard models: predicts with
- XAI explainers → DeepGuard models: explains
- Face and frame prep → Training datasets: prepares data for
- Training datasets → Training scripts: supplies data
- Training scripts → DeepGuard models: trains