How viveklumbhani/deepfake-detection-using-machine-learning works
This is a deepfake-image detection system with a data preparation and model-training workflow, evaluation, and Streamlit inference apps. Videos can be sampled into labeled frames; image directories feed augmented training and validation generators. Training builds and saves three transfer-learning classifiers, while evaluation reports metrics for each and their averaged predictions. The interactive app accepts an image, shows individual and ensemble predictions, and can display a Grad-CAM overlay. Source excerpts establish the shown calls; other README capabilities are represented only where their implementation is supported by the tree.
Main entry points: config.py Paths and settings · models.py CNN builders · data_pipeline.py Image generators · app.py Detection app
Components 11
Data preparation
- Frame extraction
src/preprocess.py - Image generators
src/data_pipeline.py
Model development
- CNN builders
src/models.py - Model training
src/train.py - Model evaluation
src/evaluate.py - Grad-CAM
src/explainability.py
Inference apps
- Detection app
app/app.py - Simple detection app
app/app_simple.py
Shared configuration
- Paths and settings
src/config.py
Other components
- Image user
- Video dataset
Connections 19
- Video dataset → Frame extraction: provides videos
README.md - Frame extraction → Image generators: prepares frames
- Image generators → Model training: supplies batches
src/train.py - CNN builders → Model training: builds classifiers
src/train.py - Model training → CNN builders: trains classifiers
src/train.py - Image generators → Model evaluation: supplies validation data
src/evaluate.py - CNN builders → Model evaluation: builds classifiers
src/evaluate.py - Image user → Detection app: uploads image
app/app.py - Detection app → CNN builders: builds classifiers
app/app.py - Detection app → Grad-CAM: requests heatmap
app/app.py - Image user → Simple detection app: uploads image
app/app_simple.py - Simple detection app → CNN builders: builds classifiers
app/app_simple.py - Frame extraction → Paths and settings: reads paths and settings
src/preprocess.py - Image generators → Paths and settings: reads settings
src/data_pipeline.py - CNN builders → Paths and settings: reads input size
src/models.py - Model training → Paths and settings: reads training settings
src/train.py - Model evaluation → Paths and settings: reads model paths
src/evaluate.py - Detection app → Paths and settings: reads model paths
app/app.py - Simple detection app → Paths and settings: reads model paths
app/app_simple.py