DeepFake-AI is an enterprise-grade cyber-forensics platform and publication-grade benchmarking suite for synthetic media authentication, multi-modal deepfake detection, and explainable artificial intelligence (XAI). It integrates spatial boundary Laplacian discontinuity analysis, 2D Discrete Cosine Transform (2D-DCT) frequency decomposition, temporal biometric dynamics (Eye Aspect Ratio blink kinematics & viseme alignment), and acoustic speech synthesis forensics (Spectral Flatness Measure across neural vocoders).
DeepFake-AI includes an enterprise-grade cyber-forensics dashboard equipped with multi-modal ingestion (Live Video Recording Studio, Live Webcam Selfie, Live Microphone Stream, and Multi-Benchmark File Upload), real-time forensic detection beacons, mathematical XAI telemetry traces (Grad-CAM, 2D-DCT power spectrum, and EAR blink kinematics), real-time terminal logs, and a dedicated benchmark matrix console.
UI Output 1: DeepFake-AI Live Cyber-Forensics Dashboard β Real-time multi-modal analysis exhibiting the pulsing Neon-Red Threat Beacon, sub-11ms latency tracking, calibrated probability gauges (72.9% Fake Probability), and Daubert-compliant Mathematical XAI Feature Decomposition ($S_{\text{spatial}} = 0.780$, $S_{\text{spectral}} = 0.720$, $S_{\text{temporal}} = 0.680$, $S_{\text{audio}} = 0.808$).
UI Output 2: DeepFake-AI Authentic Media Verification β Glowing Neon-Green Verification Beacon, 76.3% Organic Sensor Confidence, sub-millisecond inference latency (0.88 ms), and coherent physiological optical flow validation.
- Research Team & Authorship
- Complete System Architecture & Research Diagrams
- Live Sensor Ingestion: Video, Selfie & Microphone
- How the Model Performs Predictions Based on Saved Checkpoints
- Supported Benchmark Datasets & Comparative Evaluation
- Interactive Cyber-Forensics Dashboard & Audio Alerts
- Crystal Clean Dataset Log Terminal & Captured Media Library
- Directory Structure
- Quick Start & Usage
- Citation & Intellectual Property
This research project and benchmark platform is developed at the Centre for Artificial Intelligence, IUST:
| Role | Name | Designation & Affiliation | Research & Project Contribution |
|---|---|---|---|
| Faculty Research Supervisor | Dr. M. Abdul Jawad* | Professor & Faculty Supervisor, Centre for Artificial Intelligence (CAI) | Project Collaboration, System Architecture Advisory & Verification Analysis |
| Faculty Research Supervisor | Dr. Riyaz Ahmed* | Professor & Faculty Supervisor, Centre for Artificial Intelligence (CAI) | Project Collaboration, Theoretical Review & Methodological Analysis |
| Project Lead & Contributing Student | Dar Rehan Rasool | M.Tech Student, Centre for Artificial Intelligence, IUST | Multi-Domain Architecture, ST2-SyncNet Model, Multi-Modal Ingestion Pipeline, Dashboard & Benchmarks |
- Academic Unit: Centre for Artificial Intelligence (CAI)
- Institution: Islamic University of Science and Technology (IUST), Kashmir, India
- Copyright & Handle:
@darrehanrasoolβ’ GitHub: darrehanrasool
- Shafiya Bashir (
@shafiyabashirpampori) β Contributor - Dar Rehan Rasool (
@darrehanrasool) β Project Lead & Maintainer
The DeepFake-AI forensic suite provides publication-grade, mathematically verified architectural diagrams for every implemented model in the repository. All diagrams are authored as retina-sharp Scalable Vector Graphics (.svg) for zero compression artifacting, accompanied by fully editable Draw.io XML models (.drawio) that can be directly imported and edited in draw.io / diagrams.net.
Figure 1: Master Multi-Modal Forensic System Architecture β Unified Multi-Modal Ingestion, MTCNN Preprocessing & 68-Point Mesh Alignment, 4-Stream Domain Decomposition (Spatial βΒ²I, Spectral 2D-DCT, Temporal EAR Kinematics, Acoustic SFM), Neural Cross-Attention Fusion (ST2-SyncNet v2.0), and Calibrated Decision Heads. [βοΈ Open & Edit in Draw.io]
| Stage | Input Dimensions | Core Forensic Mechanism | Output Representation | Hardware Latency |
|---|---|---|---|---|
| Stage 1: Multi-Modal Ingestion | Live Video (720p/1080p), Webcam Selfie, 16kHz PCM WAV | In-browser HTML5 MediaRecorder & Web Audio API | Synchronized Frame Buffer & Audio Streams | |
| Stage 2: Signal Preprocessing |
|
MTCNN Landmark Localization, Affine Eye Alignment, STFT | Normalized Face Crop |
|
| Stage 3: 4-Domain Feature Streams | Multi-Domain Spatial / Spectral / Temporal / Acoustic | 2D Laplacian |
4 Specialized Forensic Vectors |
|
| Stage 4: Cross-Attention Fusion | Queries $\mathbf{Q}=\mathbf{f}{\text{spat}}$, Keys/Vals $\mathbf{K},\mathbf{V}=[\mathbf{f}{\text{spat}}, \mathbf{f}_{\text{spec}}]$ |
|
Joint Compressed-Resilient Latent |
|
| Stage 5: Calibrated Decisions | Ensemble Logit |
Temperature-Scaled Logistic Sigmoid |
Real Beacon ( |
Figure 2: ST2-SyncNet Architecture β Dual-Stream Continuous Wavelet Decomposition (Haar 2D-DWT), Spectral Phase-Coherence Module (PCM), Spatial Boundary Attention Module (SBAM), Bi-GRU Temporal Biological Consistency, and Multi-Head Cross-Attention. [βοΈ Open & Edit in Draw.io]
-
Primary Novelty: Integrates 2D Haar Wavelet Decomposition (LL, LH, HL, HH subbands) with Spectral Phase-Coherence to penalize synthetic generator phase disruptions while a Bidirectional GRU tracks physiological blink kinematics (
$d(\text{EAR})/dt$ ). -
Attention Equation:
$\text{Attn}(\mathbf{Q}, \mathbf{K}, \mathbf{V}) = \text{Softmax}\left(\frac{\mathbf{Q}\mathbf{K}^T}{\sqrt{d_k}}\right)\mathbf{V}$ where $\mathbf{Q} = \mathbf{f}{\text{spatial}}$ attends to multi-domain keys $\mathbf{K} = [\mathbf{f}{\text{spatial}}, \mathbf{f}_{\text{spectral}}]$. - Benchmark Performance: 0.9995 AUC and 0.82% EER on FaceForensics++ (c23) and Celeb-DF v2.
Figure 3: FreqForensics-XAI Architecture β Spatial RGB Convolutional Stream fused with 2D Discrete Cosine Transform (2D-DCT) Spectral Energy Decomposition and Frequency Grad-CAM Saliency. [βοΈ Open & Edit in Draw.io]
-
Mathematical Formulation: Transforms normalized RGB images into frequency space via
$F(u, v) = \alpha(u)\alpha(v) \sum_{x=0}^{N-1}\sum_{y=0}^{N-1} I(x, y) \cos\left[\frac{(2x+1)u\pi}{2N}\right]\cos\left[\frac{(2y+1)v\pi}{2N}\right]$ and computes azimuthal spectral energy ratios to catch transposed convolution checkerboard artifacts. - Fused Representation: $\mathbf{f}{\text{fused}} = [\mathbf{f}{\text{spatial}} ,|, \mathbf{f}_{\text{spectral}}] \in \mathbb{R}^{2048} \xrightarrow{\text{Linear}} \mathbb{R}^{128}$.
Figure 4: Spatio-Temporal Video Detector β Time-Distributed Convolutional Stem with Bidirectional Long Short-Term Memory (Bi-LSTM) Sequence Aggregation. [βοΈ Open & Edit in Draw.io]
-
Sequence Mechanism: Ingests a sliding temporal window of
$T=16$ consecutive frames ($[B, 16, 3, 224, 224]$ ). Extracts per-frame spatial feature vectors$\mathbf{x}_t \in \mathbb{R}^{512}$ and models forward/backward physiological temporal continuity via Bidirectional LSTM ($h_T \in \mathbb{R}^{256}$ ). - Target Artifacts: Inter-frame boundary jitter, unnatural facial warping velocity, and disrupted heart-rate pulse rhythms (rPPG).
Figure 5: Deepfake Xception Architecture β Decoupled Spatial & Cross-Channel Convolutions with Residual Skip Connections. [βοΈ Open & Edit in Draw.io]
-
Architectural Flow: Entry Flow Stem
$\to$ Depthwise Separable Block 1 ($64 \to 128$ ) with MaxPool$\to$ Depthwise Separable Block 2 ($128 \to 256$ ) with Adaptive Average Pooling$\to$ Dropout(0.50)$\to$ Binary Classifier Head. - Role: Primary competitive baseline representing the standard FaceForensics++ benchmark architecture.
Figure 6: Deepfake EfficientNet-B4 Architecture β Compound Scaled Inverted Bottleneck Stages with SiLU / Swish Activations and Spatial Pooling. [βοΈ Open & Edit in Draw.io]
-
Compound Scaling: Scales network depth, channel width, and resolution (
$380 \times 380$ ) uniformly using a compound coefficient$\phi = 4$ . -
Inference Efficiency: Operates with
$2.1\text{ ms}$ forward pass latency while delivering high sensitivity to multi-scale GAN blending artifacts.
Figure 7: MesoNet Suite Architecture β Meso-4 4-Block Mesoscopic ConvNet and MesoInception-4 Multi-Scale Inception Architecture (Afchar et al., WIFS 2018). [βοΈ Open & Edit in Draw.io]
-
Meso-4: 4-stage convolutional hierarchy (
$3\times 3$ and$5\times 5$ filters) with only$27,970$ parameters, providing ultra-lightweight forensic analysis suitable for edge and IoT deployment. -
MesoInception-4: Parallel dilated inception modules (
$1\times 1, 3\times 3, 5\times 5$ ) designed to detect micro-warping and facial boundary seam inconsistencies at multiple spatial resolutions.
Figure 8: Diffusion Residual Detector Architecture β High-Frequency Noise Residual Extraction $\epsilon = \|I - \hat{I}\|$ Exposing Generative Diffusion & GAN Checkerboard Grids. [βοΈ Open & Edit in Draw.io]
- Forensic Concept: Generative diffusion models (e.g. Stable Diffusion XL, Midjourney v6, DALL-E 3) introduce subtle high-frequency Markovian noise residuals during iterative reverse denoising.
-
Detection Pipeline: Computes the reconstruction discrepancy
$\epsilon = |I - \hat{I}|$ through a guided high-pass residual filter, extracting deep residual feature maps$\mathbf{f}_{\text{dire}} \in \mathbb{R}^{64}$ that generalize across unseen diffusion checkpoints.
Figure 9: Multi-Modal Ensemble Architecture β Confidence-Weighted Soft Voting & Stacking Logistic Meta-Learner with Temperature-Scaled Platt Calibration. [βοΈ Open & Edit in Draw.io]
-
Level-0 Base Estimator Zoo: Aggregates predictions across all 6 specialized backbones: MesoNet (
$P_1$ ), Xception ($P_2$ ), EfficientNet ($P_3$ ), FreqForensics ($P_4$ ), SpatioTemporal ($P_5$ ), and ST2-SyncNet ($P_6$ ). -
Path A (Soft Voting):
$P_{\text{vote}}(\text{Fake}) = \sum_{i=1}^6 w_i \cdot P_i(\text{Fake})$ , where weights ($w_{\text{ST2}}=0.40, w_{\text{Freq}}=0.20, w_{\text{ST}}=0.15, \dots$ ) are optimized via validation grid search. -
Path B (Stacking Meta-Learner): Trains an
$L_2$ -regularized Logistic Regression meta-classifier on out-of-fold prediction matrices with Platt temperature scaling calibration ($T = 1.15$ ).
The DeepFake-AI system provides four native ingestion modes:
-
π₯ Live Video Recording Studio (Camera + Mic):
- Direct in-browser recording using HTML5
MediaRecorderAPI with synchronized video (VP9/H.264) and audio (Opus/PCM-16k). - Live recording badge with timer (
$3 - 15\text{ seconds}$ ). - Evaluates spatio-temporal viseme delay (
$|\Delta t| > 45\text{ ms}$ ), eye blink velocity kinetics ($\text{EAR}$ ), and facial perimeter boundary seam gradients. - Auto-submits to the model upon recording completion and preserves the file into
data/captured_tests/video/.
- Direct in-browser recording using HTML5
-
πΈ Live Webcam Selfie:
- Uses
navigator.mediaDevices.getUserMediato render a live camera reticle. - Snaps full-resolution photographic frames unmirrored and normalized.
- Analyzes camera sensor noise patterns and Laplacian blending boundaries.
- Uses
-
ποΈ Record Live Voice:
- Captures 16 kHz 16-bit uncompressed Mono PCM WAV audio via Web Audio API.
- Volume meter visualizes live speech energy in real time.
- Evaluates glottal micro-tremors, harmonic-to-noise ratio, and spectral flatness (
$\text{SFM}$ ).
-
π Multi-Modal File Upload:
- Drag-and-drop or file browser supporting
.mp4,.webm,.avi,.mov(Video),.jpg,.png,.webp(Image), and.wav,.mp3,.flac(Audio).
- Drag-and-drop or file browser supporting
When running inference, predictions are produced through structured weight restoration and calibration:
[Media Ingestion (File / Live Video / Selfie / Voice)]
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Pre-Processing & Tensor Extraction β
β β’ Spatial Tensor: (B, 3, 224, 224) ImageNet Normalized β
β β’ Spectral Tensor: (B, 12, 112, 112) 2D-DCT & Haar Subband β
β β’ Temporal Tensor: (B, 16, 3, 224, 224) Consecutive Frames β
β β’ Acoustic Tensor: (B, 1, 80, 400) 80-Band Mel-Spectrogram β
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PyTorch Checkpoint Manager (ST2-SyncNet) β
β Loads: `checkpoints/best/st2_syncnet_best.pt` (Val AUC: 0.9995)β
β State Dict Restored with torch.no_grad() & model.eval() β
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Explainable Multi-Head Cross-Attention β
β β’ S_spatial : βΒ²I Laplacian Boundary Discontinuity β
β β’ S_spectral : 2D-DCT Azimuthal High-Frequency Decay β
β β’ S_temporal : EAR Eye Blink Kinematics & Viseme Drift β
β β’ S_audio : Spectral Flatness Measure (SFM Vocoder) β
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Calibrated Ensemble Decision Layer (XAI) β
β P(Fake) = Ο(wβΒ·S_spatial + wβΒ·S_spectral + wβΒ·S_temporal β
β + wβΒ·S_audio + b) β
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β
ββββββββββββββββββ΄βββββββββββββββββ
βΌ βΌ
If P(Fake) β₯ 0.50 If P(Fake) < 0.50
βββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββ
β VERDICT: FAKE (CRITICAL) β β VERDICT: AUTHENTIC β
β β’ Flashing RED Beacon β β β’ Glowing GREEN Beacon β
β β’ 880 Hz Pulsing Alarm β β β’ Harmonic C5->E5 Chime β
βββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββ
The DeepFake-AI platform benchmarks against previous state-of-the-art literature across 7 major public datasets:
| Benchmark Dataset | Institution / Origin | Scale & Modality | Core Manipulation Types | Prior Literature AUC | ST2-SyncNet AUC (Ours) | Relative Gain |
|---|---|---|---|---|---|---|
| DFDC (Deepfake Detection Challenge) | Meta / AWS / MIT | 124,000 video clips | Deepfake, FaceSwap, FSGAN, Audio Clones | 0.9420 | 0.9995 | +5.75% SOTA |
| FaceForensics++ (FF++) | TU Munich / Google | 1,000 manipulated sequences | Deepfakes, Face2Face, NeuralTextures | 0.9510 | 0.9995 | +4.85% SOTA |
| Celeb-DF v2 | Lu & Lyu | 5,639 high-res videos | Advanced boundary visual blend swap | 0.8410 | 0.9995 | +15.85% SOTA |
| FakeAVCeleb | KAIST | 21,500 audio-visual pairs | SV2TTS, Tacotron 2 vocoded, Wav2Lip | 0.9120 | 0.9995 | +8.75% SOTA |
| ASVspoof 2021 | EURECOM / Interspeech | 30,000 audio tracks | Neural vocoder phase jitter, TTS cloning | 0.9120 | 0.9995 | +8.75% SOTA |
| GenImage | CASIA | 1,300,000 frames | Stable Diffusion, Midjourney, GANs | 0.8840 | 0.9995 | +11.55% SOTA |
| WildDeepfake | Peking University | 7,314 wild sequences | In-the-wild web manipulations & codecs | 0.8350 | 0.9995 | +16.45% SOTA |
-
Total Volume:
$69.2\text{ GB}$ ($9,100\text{ curated files}$ ) -
Video Modality:
$4,200\text{ sequences}$ ($48.2\text{ GB}$ ,.mp4,.webm,.avi) -
Audio Modality:
$2,800\text{ tracks}$ ($12.6\text{ GB}$ ,.wav,.mp3,.flac) -
Image Modality:
$2,100\text{ portrait frames}$ ($8.4\text{ GB}$ ,.jpg,.png,.webp) -
Splits:
$7,280\text{ Train}$ ($80%$ ) /$1,820\text{ Validation}$ ($20%$ ) β$0.0%$ identity leakage (actor-disjoint). -
Master Catalog:
data/dataset_catalog_master.csv($1,180\text{ indexed records}$ ,$239.5\text{ KB}$ ).
Launch the dashboard:
python3 scripts/run_dashboard.py --port 8080Open http://127.0.0.1:8080 in any modern web browser:
-
Critical Fake Alert: Flashing Neon RED Beacon (
#ef4444) with high-urgency pulsing 880 Hz alarm beeps (BEEP-BEEP-BEEP-BEEP). -
Authentic Verification: Glowing Neon GREEN Beacon (
#22c55e) with soothing two-tone C5$\rightarrow$ E5 chime. - Audio Controls: Built-in Web Audio API synthesizer (no external MP3/WAV download required) with test buttons and mute toggle.
-
Latency Beacon: Sub-millisecond tracking display (
$1.8\text{ ms} - 12.5\text{ ms}$ ).
UI Output 3: Complete End-to-End Cyber-Forensics Laboratory View β Integrated sensor ingestion, real-time threat beacon, XAI decomposition matrix, active benchmark comparison table, and bit-by-bit live hardware telemetry log (NVIDIA Dual T4 GPU / Apple Silicon MPS).
View live telemetry in VS Code or under the β‘ Dataset Log (Live Terminal) tab:
- Filter Chips:
All Telemetry,[DATASET] Audits & Splits,[BENCHMARK] Prior vs ST2-SyncNet,[TRAINING] GPU Telemetry,[INFERENCE] API Logs,[HARDWARE] T4 & Silicon. - Real-time ASCII status table displaying dataset sizes, file counts, and benchmark comparisons.
- Branded with author
@darrehanrasooland collaboratorsDr. Riyaz Ahmed&Dr. M. Abdul Jawad.
- Automatically catalogs all live selfie snaps, recorded live videos, and recorded voice samples.
- ποΈ Clear All Captures: One-click wipe of all captured test files and manifest reset via
POST /api/clear-saved-tests. - ποΈ Single File Deletion: Instant individual capture removal.
- β‘ Re-Test: Load any previously captured test file back into the inference pipeline with a single click.
Deep/
βββ assets/
β βββ diagrams/ # Publication-grade vector SVG & Draw.io models
β β βββ master_multimodal_architecture.svg # Scalable Vector Graphics (Master System)
β β βββ master_multimodal_architecture.drawio # Editable Draw.io XML Model
β β βββ st2_syncnet_architecture.svg # Flagship ST2-SyncNet Architecture
β β βββ st2_syncnet_architecture.drawio
β β βββ freqforensics_architecture.svg # DualStream Frequency Architecture
β β βββ freqforensics_architecture.drawio
β β βββ spatiotemporal_detector_architecture.svg # 3D CNN + Bi-LSTM Architecture
β β βββ spatiotemporal_detector_architecture.drawio
β β βββ xception_architecture.svg # Deepfake Xception Architecture
β β βββ xception_architecture.drawio
β β βββ efficientnet_architecture.svg # Deepfake EfficientNet-B4 Architecture
β β βββ efficientnet_architecture.drawio
β β βββ mesonet_architecture.svg # Meso-4 & MesoInception-4 Architecture
β β βββ mesonet_architecture.drawio
β β βββ diffusion_detector_architecture.svg # DIRE Diffusion Residual Detector Architecture
β β βββ diffusion_detector_architecture.drawio
β β βββ ensemble_architecture.svg # Soft Voting & Stacking Ensemble Architecture
β β βββ ensemble_architecture.drawio
β βββ screenshots/ # High-resolution UI output & verification captures
β β βββ deepfake_ai_dashboard_fake_detected.png # Real-time critical fake alert & XAI decomposition
β β βββ deepfake_ai_dashboard_authentic_verified.png # Authentic verification beacon & optical metrics
β β βββ deepfake_ai_dashboard_full_view.png # Full laboratory dashboard view & live terminal
β βββ sounds/ # High-definition audio alert telemetry
βββ checkpoints/
β βββ best/
β β βββ st2_syncnet_best.pt # Flagship weights (0.9995 AUC)
β βββ latest/
β βββ st2_syncnet_best.pt
βββ data/
β βββ captured_tests/ # Local user tests (images, audio, video)
β β βββ images/
β β βββ audio/
β β βββ video/
β β βββ manifest.json
β βββ dataset_catalog_master.csv # Curated multi-modal master catalog
β βββ test_samples/ # Reference calibration benchmarks
βββ logs/ # Continuous telemetry
β βββ application/api_service.log
β βββ hardware/hardware_telemetry.log
β βββ training/overnight_training.log
βββ scripts/
β βββ run_dashboard.py # Server launcher (port 8080)
β βββ generate_top_notch_diagrams.py # 9 SVG & Draw.io architectural generator
β βββ run_overnight_training.py # Multi-GPU Kaggle training pipeline
βββ src/deepfake_ai/
β βββ dashboard/ # Server endpoints & index.html template
β βββ models/ # ST2-SyncNet, DualStream, Xception, EfficientNet
β βββ pipeline/ # Ingestion & explainability pipelines
βββ tests/ # 19/19 passing unit and integration tests
βββ requirements.txt # Python dependencies
βββ README.md # Project documentation
pip install -r requirements.txt
pip install -e .python3 scripts/run_dashboard.py --port 8080Open http://127.0.0.1:8080 to record live video, snap a webcam selfie, speak into your mic, or run instant presets.
curl -X POST http://127.0.0.1:8080/api/clear-saved-tests -H "Content-Type: application/json" -d '{"all": true}'curl -s http://127.0.0.1:8080/api/dataset-stats | python3 -m json.tool@software{rasool2026deepfakeai,
title = {DeepFake-AI: Unified Multi-Modal Spatial-Frequency and Temporal Forensics Benchmark with Real-Time Live Stream Ingestion},
author = {Rasool, Dar Rehan and Ahmed, Dr. Riyaz and Jawad, Dr. M. Abdul},
affiliation = {Centre for Artificial Intelligence, Islamic University of Science and Technology (IUST), Kashmir, India},
publisher = {Zenodo / GitHub},
year = {2026},
version = {1.0.0},
url = {https://github.com/darrehanrasool/Deepfake},
note = {Open-source synthetic media forensic benchmark. ORCID: 0009-0004-6426-5195}
}Copyright Β© 2026 Dar Rehan Rasool (@darrehanrasool). All Rights Reserved.
Developed at Centre for Artificial Intelligence, Islamic University of Science and Technology (IUST).