Knowing your heart rate is important because the heart's function is so crucial. Namely, the heart is what's responsible for circulating oxygen and nutrient-rich blood throughout your body. When it's not working as expected, basically everything in the body is affected. One way to gauge heart health — really, your health — is by your heart rate.
This is why we created a video heart rate monitor powered by OpenCV and used face detection, ROI extraction, and analyzed RGB fluctuations to sense pulse rate remotely.
We did this using a face detector to crop a region of the forehead out from a live webcam feed. This patch of skin is then analyzed for repetitions that are indicative of a heartbeat.
Our system uses the RetinaFace mobilenet face detector as it is extremely fast while being incredibly robust. This fast face detector also runs real-time on an 8 core CPU. This pipeline was deployed as a streamlit webpage which uses WebRTC to transmit frames to the server which processes the stream.
Review more info about the what and why of photoplethysmography as well as key concepts to help understand our project.
View our interactive web app for real-time pulse monitoring on Streamlit.
Watch our demo where we put everything together!
Try out our code where we provide you steps to generate an executable and deploy the project locally!