Inspiration
Cardiac arrhythmias are one of the leading causes of sudden death, yet most people only get their hearts checked during scheduled appointments. We can use AI to recognize a face in a crowd, generate a photo from a sentence, and detect fraud in microseconds. Yet most cardiac screening still relies on a clinician manually reading a printout. We thought that gap was worth closing, so we built something that could bridge detection and care coordination in a single workflow - where the moment an anomaly is found, the right people are notified, and next steps are already in motion.
What it does
HeartSync is an AI-powered ECG anomaly detection tool. A clinician or care provider uploads a CSV file of ECG signal samples, and Heartsync immediately begins analyzing the data in real time. The dashboard animates the waveform live, highlights irregular cardiac patterns (anomalies) as they are detected, displays heart rate and model confidence, and when anomalies are found in a scan, it triggers a care coordination workflow. That provides the options to alert a medical professional and schedule a follow-up appointment.
How we built it
Frontend - Built using React and Vite, with the ECG waveform being rendered on an HTML Canvas for a smooth animation. All signal visualization, anomaly highlighting, and playback controls are created without chart libraries.
Backend - Python and FastAPI handle file uploads and run the interface. When CSV is uploaded, the signal is segmented into individual beats and passed through our trained model for anomaly detection.
Machine Learning - We trained a convolutional autoencoder exclusively on normal sinus rhythm beats extracted from the MIT-BIH Arrhythmia Dataset. The idea is to train it only on what normal looks like; it will reconstruct normal beats easily and struggle to reconstruct any anomalies. Beats with high reconstruction error fall outside of the model's threshold of "normal" and are then flagged. This detection value is computed statically from the validation set error distribution.
Challenges we ran into
Playback Speed - at 2x and 3x, the progress bar and heart broke due to React stale closures inside the animation loop. Fixed by moving all time-critical updates to refs and aidrect DOM manipulation
Waveform Rendering - Getting the coordinate math right between the global sample indices, the visible window, and canvas pixels took more iterations than expected.
System Integration - Building a full-stack ML application under a time constraint, connecting React, FastAPI, and a live PyTorch model, while handling file uploads, presented a significant learning curve.
Heart Rate Realism - direct state updates caused jarring jumps. Solved with a smooth interpolation system where the displayed value gradually approaches a target ref rather than snapping to it.
Accomplishments that we're proud of
First Hackathon - This was both of our first hackathons, and we shipped a fully working product within the deadline.
Model Accuracy - Our autoencoder achieved an average of 97% accuracy on the MIT-BIH Dataset.
21,000+ Training Samples - extracted and trained on over 21,000 individual beats from a real medical research dataset
What we learned
We learned a lot about React Architecture, ML pipelines, Signal processing, ECG fundamentals, Full-stack integration, how autoencoders work, Github Repository structure, and collaboration (Workshop)
What's next for HeartSync
User Authentication - ECG data is sensitive health information; accounts ensure patient data stays private and accessible only to the right people
PDF Report Generation - gives clinicians a shareable, archivable summary of each analysis that can be attached directly to a patient's chart
Cloud Deployment - removes the need for local setup so any clinician anywhere can run an analysis from a browser, and opens the door to real-time monitoring from wearables and remote patients
Log in or sign up for Devpost to join the conversation.