Building a Zero-Contact Vitals Tracker: Extracting Heart Rate from a Webcam using AI & rPPG
Link to Live Project: https://medium.com/@surjeetlko5
Introduction:
Healthcare is shifting towards non-invasive, remote monitoring. I built a zero-contact vitals tracker that uses real-time Photoplethysmography (rPPG) to measure human signals using just a laptop webcam or CCTV feed.
How It Works:
1. Facial Landmark Tracking: Used MediaPipe to identify and crop the face ROI (Region of Interest), specifically the forehead and cheeks.
2. Blood Volume Pulse (BVP) Estimation: Captures tiny color variations in skin caused by cardiac cycles (unseen by the naked eye) using OpenCV.
3. Signal Processing: Noise filtering and fast Fourier transform (FFT) extract heart metrics like Pulse Rate, Heart Rate Variability (HRV), and breathing rate.
4. Real-time API: Powered by a FastAPI server, pushing vitals onto a live visualization screen.
Tech Stack:
rPPG, Deep Learning, OpenCV, FastAPI, SciPy.
Key Results:
Tracks pulse within ±3 BPM accuracy compared to smart bands, completely contactless, and ready for digital health kiosks.
