Inspiration
Every year, 17.9 million people die from cardiac disease — and a huge portion of those deaths aren't inevitable. They happen because the warning signs were there and nobody caught them in time. The body gives signals before a cardiac emergency: subtle shifts in ECG morphology, a dropping SpO₂, a climbing heart rate. But by the time those signals become obvious, it's often already too late.
One of our teammates had a conversation with a cardiologist that put it plainly:
'''We don't lose patients because we don't know medicine. We lose them because we don't catch deterioration early enough.'''
That hit hard, because we have personally lost family members who dismissed subtle warning signs not realizing the indicated serious heart issues. This highlights the urgent need for real-time awareness and early cardiac risk detection before it becomes too late. CardioSense is our answer to that gap.
What it does
CardioSense AI is a real-time cardiac monitoring and early risk detection platform. It turns raw wearable data into medically grounded decisions — before a cardiac emergency happens.
The system monitors six vital signs (heart rate, blood pressure, SpO₂, temperature, and full ECG morphology including P-wave and T-wave parameters) and runs them through a clinical AI pipeline entirely on-device. No cloud. No delay. No patient data ever transmitted.
When readings deviate from clinical norms, CardioSense doesn't just flag a number — it produces a three-tier triage decision (LOW / MODERATE / CRITICAL) with a plain-English explanation grounded in AHA guidelines, tells the user exactly what to do, and if the situation is critical, automatically triggers a 911 alert and sends a complete clinical report to caregivers simultaneously.
How we built it
We built CardioSense as a full-stack, locally-inferenced AI health system across the entire hackathon weekend. The architecture is a five-stage pipeline:
- Data ingestion: Wearable sensors or manual entry send six vital signs and six ECG parameters as JSON to a FastAPI backend running on a Raspberry Pi 5.
- Risk scoring: A custom risk engine applies 25+ weighted clinical rules derived from AHA cardiac event guidelines. Each parameter contributes to a composite risk score — ST elevation alone adds 10 points, T-wave inversion adds 7, pushing any reading toward CRITICAL instantly.
- RAG retrieval: ChromaDB retrieves the most relevant AHA clinical context for the detected pattern, grounding the AI's output in verified medical knowledge rather than general language model inference.
- AI explanation: Llama 3.2:3b (running via Ollama, fully local) generates a plain-English explanation of the risk, specific observations, and what action the patient or caregiver should take.
- Dashboard + response: A React frontend with Recharts displays a live ECG waveform, triage level, vitals history, and AI explanation. A CRITICAL event triggers automatic 911 escalation and generates a clinical PDF report (via ReportLab) for provider review.
Challenges we ran into
The hardest design problem wasn't technical — it was clinical. Building a triage system that is sensitive enough to catch real emergencies without generating so many false alerts that caregivers start ignoring them required careful calibration of our scoring weights and thresholds. We spent significant time studying how clinicians think about alert fatigue.
ECG morphology was another deep challenge. Translating the clinical meaning of waveform patterns — PR interval elongation, QRS widening, T-wave inversion — into programmatic detection rules required us to go beyond software engineering into cardiology literature. We cross-referenced AHA guidelines and published ECG interpretation standards to make sure every rule we implemented had clinical backing.
Running Llama 3.2:3b on a Raspberry Pi 5 within an acceptable response window took meaningful optimization — including keeping the model warm with background keepalive calls and pre-initializing ChromaDB at startup to eliminate cold-start latency during the demo. Building all of this within a 24-hour hackathon window was the final challenge — and the one we're most proud of clearing.
Accomplishments that we're proud of
- Built a fully working real-time cardiac triage system — end-to-end, from sensor data to emergency response — in under 24 hours.
- Achieved true multi-signal analysis: we didn't settle for heart rate. CardioSense correlates six vitals with six ECG morphology parameters simultaneously, the way a cardiologist evaluates a patient holistically.
- Implemented RAG-grounded medical explanations — every AI output is anchored to AHA clinical guidelines, not general model knowledge.
- Ran 100% local AI inference on a Raspberry Pi 5 with no cloud dependency, making the system HIPAA-friendly by design.
- Designed and executed a compelling escalation demo — green to yellow to orange to red — that visually demonstrates the real-world stakes of early versus late detection.
What we learned
This project changed how we think about data in healthcare. Raw vital signs, on their own, are almost meaningless. A heart rate of 105 could be someone finishing a run or someone entering cardiac crisis. What matters is context — the pattern across multiple parameters, trended over time, evaluated against clinical norms.
ECG morphology is the missing layer. Most wearables stop at heart rate. P-wave absence and ST elevation can predict an event hours before vitals alone would signal danger.
AI in healthcare must be explainable. A risk score without a reason is useless — and dangerous. Grounding outputs in real guidelines is what earns trust.
Preventive triage beats reactive treatment. The real opportunity isn't in the ER. It's in the home — where patients spend 99% of their time and where early signals go undetected.
Interpretation > collection. Real innovation isn't about gathering more data. It's about knowing what the data means — and acting on it before it's too late.
What's next for CardioSense
⌚ Medical-grade ECG hardware integration — replace simulated inputs with a clinical-grade ECG sensor for validated real-world readings.
📊 Clinical dataset training and validation — train and test our risk model against validated cardiac event datasets to quantify accuracy and refine clinical thresholds.
🏥 EMR integration for Axxess — push alerts and clinical reports directly into Axxess's home health platform so nurses and physicians receive real-time updates within their existing workflow.
🤖 Predictive pre-arrest detection — train longitudinal models that identify deterioration patterns 24–48 hours before a cardiac event, shifting from reactive triage to true prevention.
💊 Medication correlation — cross-reference vitals trends with medication schedules to flag drug-induced cardiac side effects proactively.
📋 Regulatory pathway — explore FDA Class II clearance as a clinical decision support tool, with all current outputs carrying appropriate advisory disclaimers and human-in-the-loop design.
Log in or sign up for Devpost to join the conversation.