Inspiration

Cardiac arrest affects millions of people worldwide each year, yet effective CPR relies on proper technique and repeated practice. Current CPR training is typically limited to scheduled courses and specialized training facilities, restricting opportunities for continuous practice and access for many individuals. A free, computer vision-based CPR simulator provides an accessible way for individuals around the world to develop a basic understanding of CPR, practice essential techniques, and receive immediate feedback, expanding access to lifesaving education beyond traditional training environments.

What it does

FirstAidVision is a computer vision-based CPR training tool designed to provide accessible practice for users around the world. Using real-time camera input, the system uses pose estimation and landmark mapping to track key body points, including the shoulders, elbows, wrists, and hands, analyzing joint movements during CPR practice. By evaluating factors such as compression motion, hand positioning, and movement consistency, the simulator determines the accuracy (9/10 times) of chest compressions and provides immediate feedback to help users improve their technique. In addition, FirstAidVision integrates an AI-powered chatbot that allows users to ask questions about CPR and first aid, providing accessible information and guidance to enhance their learning experience.

How we built it

MediaPipe Pose: We used MediaPipe Pose to track the user’s body through their camera. It detects important points on the body, such as the shoulders, elbows, wrists, and hips. These points allow our system to understand the user’s posture, hand position, and compression movements during CPR practice.

TensorFlow.js: We used TensorFlow.js to run AI models directly in the browser. This allows the camera footage to be analyzed instantly on the user’s device instead of sending data to a server, making the CPR feedback faster and more responsive.

Gemini API: We integrated Gemini to create an AI first-aid assistant. Users can ask questions about CPR or emergency situations, and the AI provides helpful explanations and guidance.

HTML, CSS, JavaScript: We built the website from scratch using HTML, CSS, and JavaScript. The website displays the live camera feed, shows CPR tracking results, provides instructions, and gives users feedback during training.

Google Fonts API: We used Google Fonts to add the Inter font, creating a clean and easy-to-read design for the interface.

Express.js: We used Express.js to create the backend of our application. It connects the website to our AI services and manages communication between different parts of the system.

Challenges we ran into

What's next for FirstAidVision

Built With

Share this project:

Updates