BLOG POST

Building a Deepfake Detection Pipeline with CNNs

1/10/2025 · Deepfakes · Machine Learning · Security Research · ~1 min read

This blog is still in progress, but here's a preview:

In this post, I walk through the high-level architecture of a deepfake detection pipeline: from dataset preparation and frame extraction to CNN training, evaluation, and limitations.

We start by extracting frames from each video and organizing them into REAL and FAKE classes so that the CNN can learn spatial inconsistencies.

bash
# Example: running the training script
python train_detector.py \
  --data-dir ./data/frames \
  --epochs 20 \
  --batch-size 32 \
  --lr 1e-4

I discuss trade-offs between complexity and performance, and how this aligns with real-world threat models where attackers use AI-generated videos for social engineering and fraud.