josh wu | ← all projects

heartbeat hunters
using video photoplethysmography to unmask ai-generated human videos — 94.81% accuracy

description

AI-generated human videos have become increasingly sophisticated, posing serious threats to media integrity and cybersecurity. This project detects deepfakes using video photoplethysmography (vPPG) — a method that identifies subtle skin tone changes caused by blood flow, a physiological signal absent in AI-generated content.

The system analyzes video frame by frame with OpenCV, isolating a region of interest (typically the face), applying chroma keying to extract skin-tone areas, then using a moving average to smooth color intensity fluctuations. A bandpass filter isolates heart rate frequencies (0.75–4 Hz) and Fast Fourier Transform (FFT) analyzes the signal's periodicity — genuine human videos show periodic pulse patterns, AI-generated ones do not. Results are visualized in real-time and exported to CSV. The system achieved 94.81% accuracy and won a Gold Medallion at the Waterloo Wellington Science and Engineering Fair.

methodology
  • Frame-by-frame capture at 1920×1080 via OpenCV; face/skin ROI selected per frame
  • Chroma keying isolates skin-tone pixels; green channel (most blood-flow sensitive) tracked alongside red and blue
  • Moving average smooths color intensity; bandpass filter (0.75–4 Hz) isolates heart rate frequencies
  • FFT analyzes signal periodicity — real videos show periodic pulse, AI-generated do not
  • Empirical thresholds classify signal strength and consistency as real or synthetic
  • Real-time visualization and CSV export for further analysis
results

94.81% accuracy in classifying real vs. AI-generated human videos. Gold Medallion at WWSEF. Provides a reliable, scalable deepfake detection method that does not require extensive technical expertise to operate.

tech stack
PythonOpenCVvPPGFFTBandpass FilteringCSV Export
links