{"id":29022908,"url":"https://github.com/kali414/cardia","last_synced_at":"2026-04-09T11:03:56.222Z","repository":{"id":301212038,"uuid":"1008527529","full_name":"Kali414/Cardia","owner":"Kali414","description":"A deep learning-based system for real-time, non-contact heart rate estimation using webcam video and facial analysis.   ","archived":false,"fork":false,"pushed_at":"2025-06-25T18:25:56.000Z","size":43705,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-25T18:34:12.580Z","etag":null,"topics":["deep-learning","flask","lstm","node","socket-io","tensorflow"],"latest_commit_sha":null,"homepage":"https://cardia-seven.vercel.app","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kali414.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-25T17:22:38.000Z","updated_at":"2025-06-25T18:26:27.000Z","dependencies_parsed_at":"2025-06-25T18:46:50.842Z","dependency_job_id":null,"html_url":"https://github.com/Kali414/Cardia","commit_stats":null,"previous_names":["kali414/cardia"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Kali414/Cardia","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kali414%2FCardia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kali414%2FCardia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kali414%2FCardia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kali414%2FCardia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kali414","download_url":"https://codeload.github.com/Kali414/Cardia/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kali414%2FCardia/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261990350,"owners_count":23241187,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","flask","lstm","node","socket-io","tensorflow"],"created_at":"2025-06-26T03:04:11.486Z","updated_at":"2025-12-30T22:23:54.268Z","avatar_url":"https://github.com/Kali414.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- Model training repo - https://github.com/Kali414/DRDO_PROJECT --\u003e\n\n# CARDIAA – Camera-Assisted Real-time Detection of Instantaneous Arterial Activity\n\n## Webcam-Based Heart Rate Detection Using Deep Learning\n\n## Overview\n\nCARDIAA is a real-time, non-contact heart rate monitoring system that uses a standard webcam and advanced deep learning techniques to estimate a person’s heart rate (in BPM) by analyzing facial video streams.\n\nInstead of relying on physical sensors or wearable devices, the system leverages subtle changes in skin tone and facial features captured on camera to infer arterial activity. This makes it suitable for applications in telemedicine, fitness monitoring, and continuous health tracking.\n\n\n\n---\n\n## Table of Contents\n\n- [Features](#features)\n- [Dataset](#dataset)\n- [Methodology](#methodology)\n- [Model Architecture](#model-architecture)\n- [Installation](#installation)\n- [Limitations \u0026 Ethical Considerations](#limitations--ethical-considerations)\n- [References](#references)\n- [License](#license)\n- [Contact](#contact)\n\n---\n\n## Features\n\n- Non-contact heart rate estimation using webcam video\n- Face detection and region-of-interest (ROI) extraction\n- Feature extraction from facial video (mean green channel intensity)\n- Deep learning model (CNN-LSTM) for temporal signal processing\n- End-to-end pipeline: video input → face detection → feature extraction → heart rate prediction\n\n---\n\n## Dataset\n\n- **UBFC-RPPG Dataset**: Public dataset for remote photoplethysmography (rPPG) and heart rate estimation.\n- Contains facial videos and synchronized ground truth heart rate (from pulse oximeter).\n- [Dataset details and terms](https://sites.google.com/view/ybenezeth/ubfcrppg)\n- **Note**: For subjects 21 and 27, facial images must not be published or shared.\n\n**Ground Truth Format:**\n- *Dataset 1*: `.xmp` files (Timestep, Heart Rate, SpO2, PPG)\n- *Dataset 2*: `ground_truth.txt` (PPG, Heart Rate, Timestep)\n\n *Download the UBFC-RPPG dataset (see [Dataset](https://drive.google.com/drive/folders/1o0XU4gTIo46YfwaWjIgbtCncc-oF44Xk?usp=drive_link)) .*\n\n---\n\n## Methodology\n\n1. **Data Preprocessing**:\n   - Load video frames and corresponding ground truth Heart Rate.\n   - Detect face region using Haar cascade.\n   - Extract mean green channel intensity from the face region for each frame.\n   - Segment features into windows of 24 frames.\n\n2. **Model Training**:\n   - Input: Sequence of mean green values (shape: 24, 1).\n   - Output: Corresponding Heart Rate values (shape: 24).\n   - Model: CNN-LSTM (see below).\n\n3. **Prediction**:\n   - For a new webcam video, repeat face detection and feature extraction.\n   - Model predicts heart rate for each window.\n\n---\n\n## Model Architecture\n\n- **Input**: Sequence of 24 mean green channel values.\n- **CNN Layers**: 1D convolution + max pooling for local feature extraction.\n- **LSTM Layers**: Capture temporal dependencies in the signal.\n- **Dense Layers**: Regression output for BPM.\n- **Regularization**: Dropout and batch normalization.\n- **Loss**: Mean Absolute Error (MAE).\n\n---\n## 🚀 Installation \u0026 Setup Guide\n\nFollow these steps to run the entire project on your local machine.\n\n### 🧾 Prerequisites\n\nMake sure you have the following installed:\n- Python (version \u003c 3.11, e.g., 3.10.x)\n- Node.js (v14 or higher)\n- npm (comes with Node.js)\n- Git\n\n---\n\n### 🛠️ Step-by-Step Setup\n\n#### 1. **Clone the Repository**\n\n```bash\ngit clone https://github.com/Kali414/Cardia.git\ncd Cardia\n```\n\n#### 2. **Start the Backend**\n\n```bash\ncd backend\n# (Optional) Create and activate a virtual environment\npython -m venv venv\nsource venv/bin/activate       # On Windows: venv\\Scripts\\activate\n\n# Install backend dependencies\npip install -r requirements.txt\n\n# Run the backend server\npython app.py\n```\n\nBackend will run at: **http://localhost:5000**\n\n#### 3. **Start the Frontend**\n\nOpen a new terminal window (keep backend running)\n\n```bash\ncd Cardia/frontend\n\n# Install frontend dependencies\nnpm install\n\n# Run the frontend dev server\nnpm run dev\n```\n\nFrontend will run at: **http://localhost:3000**\n\n---\n\n## ✅ Final Check\n\n✅ **Backend**: http://localhost:5000  \n✅ **Frontend**: http://localhost:3000  \n✅ **Open** http://localhost:3000 in your browser and use the app\n\n\n**OR Run using Docker Compose:**\n```\ndocker-compose up --build\n```\n---\n\n## Limitations \u0026 Ethical Considerations\n\n- Accuracy may vary with lighting, movement, and camera quality.\n- Application can only detect heart rate for 1 people at a time\n- Sudden change can cause incorrect heart rate calculation. In the most case, heart rate can be correctly detected after 10 seconds being stable infront of the camera\n- Dataset restrictions: Do not publish or share facial images from restricted subjects.\n---\n\n\n## References\n- Real Time Heart Rate Monitoring From Facial RGB Color Video Using Webcam by H. Rahman, M.U. Ahmed, S. Begum, P. Funk\n- Remote Monitoring of Heart Rate using Multispectral Imaging in Group 2, 18-551, Spring 2015 by Michael Kellman Carnegie (Mellon University), Sophia Zikanova (Carnegie Mellon University) and Bryan Phipps (Carnegie Mellon University)\n- Non-contact, automated cardiac pulse measurements using video imaging and blind source separation by Ming-Zher Poh, Daniel J. McDuff, and Rosalind W. Picard\n- Camera-based Heart Rate Monitoring by Janus Nørtoft Jensen and Morten Hannemose\n---\n\n## License\n\nThis project is licensed under the terms of the MIT License. See the [LICENSE](LICENSE) file for details.\n\n\n---\n\n## Contribution\nFor contributions, suggestions, or questions, feel free to reach out to:\n- kalicharansahoo91@gmail.com  \n\n---\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkali414%2Fcardia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkali414%2Fcardia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkali414%2Fcardia/lists"}