Inspiration

Cardiovascular diseases remain the leading cause of mortality globally. While modern hospitals utilize state-of-the-art electronic health records (EHR), millions of legacy diagnostic records—especially in underserved clinics or historical archives—exist purely as physical, paper-based ECG reports.

When a critical cardiac event occurs, clinicians shouldn't have to waste vital minutes manually transcribing telemetry or wrestling with faded graph paper. We built SilentPulse to act as an intelligent bridge: a clinical intelligence AI platform that transforms legacy, static paper ECGs into dynamic, deep-learning-ready digital arrays capable of predicting patient instability before it happens.

What it does

SilentPulse automatically ingests scanned medical reports, strips away physical background artifacts, extracts patient demographics, and digitizes the analog waveform into a raw 1D mathematical signal. It then passes this digital signal through an advanced deep learning pipeline to evaluate individual heartbeats, identify subtle clinical anomalies (like mild arrhythmias and ventricular ectopies), forecast future cardiovascular instability up to 5 beats out, and provide doctor-facing explanations highlighting exactly which parts of the wave triggered an alert.

How we built it

The platform is designed as a modular, end-to-end clinical intelligence pipeline:

  • Data Ingestion & OCR Layer: Converted scanned PDF reports to images via PyMuPDF and used EasyOCR paired with spatial, coordinate-anchored regex parsers to calculate exact patient age ($Age = \text{Study Year} - \text{Birth Year}$) and extract unstructured clinical indications.
  • Signal Extraction (Computer Vision): Implemented an HSV color-masking layer in OpenCV to computationally remove the pink/red background grid pattern. A column-by-column height-proximity persistence heuristic traces the dark waveform ink, interpolates missing data points, and applies a Savitzky-Golay filter to isolate a smooth 1D signal.
  • Deep Learning & Diagnostics: Individual heartbeats are segmented in 180-sample windows centered around detected R-peaks. An unsupervised Convolutional Autoencoder evaluates the beats, computing a Mean Squared Error (MSE) anomaly index:

$$MSE = \frac{1}{n} \sum_{i=1}^{n} (x_i - \hat{x}_i)^2$$

  • Trend Forecasting & XAI: A Long Short-Term Memory (LSTM) network analyzes historical MSE trajectories across consecutive beats to project instability. Simultaneously, a SHAP (Shapley Additive exPlanations) engine maps game-theory feature importance back to specific cycle landmarks (P-wave, PR interval, QRS complex, ST segment, or T-wave) for clinical transparency.
  • Frontend Design System: Built a responsive, medical-grade "Futuristic Slate Light Theme" UI using dynamic CSS custom variables and interactive Chart.js components for real-time telemetry rendering without screen clipping.

Challenges we ran into

  • The "Flatline" Bug: Early versions of our OpenCV line-tracer got trapped in the borders of the background grid paper, resulting in catastrophic flat step-functions instead of actual waves. We solved this by implementing tight HSV color-range constraints and relaxing our contour filters to strictly follow the darker waveform ink.
  • Demographic & Diagnostic Misalignments: Initial regex parsers occasionally misread text blocks, miscalculating patient ages or misclassifying Isolated Ventricular Ectopies as Atrial Fibrillation. We resolved this by building spatial anchor-bound bounding boxes that dynamically adapt to the layout of standardized clinical reports.

Accomplishments that we're proud of

We successfully built a completely non-invasive, open-source-driven pipeline that effectively breathes new life into static paper records. We are incredibly proud of achieving highly precise waveform extraction that lets our downstream R-peak segmentation models process 100% of the cardiac cycle seamlessly, turning noisy, real-world physical scans into reliable mathematical data arrays.

What we learned

Building this platform underscored the reality that data preprocessing is 90% of the battle in medical AI. We learned that training complex neural networks is trivial if your input data is corrupted by paper wrinkles, scanning artifacts, or dominant background grid lines. Developing a highly robust, deterministic computer vision cleaning pipeline proved just as scientifically vital as designing the deep learning architectures themselves.

What's next for SilentPulse

We plan to scale SilentPulse by expanding its deep learning models to support multi-lead ECG inputs (moving from a single continuous rhythm strip to comprehensive 12-lead full-page report processing). Additionally, we aim to integrate lightweight, edge-optimized models using ONNX runtime, allowing the pipeline to run locally on low-resource tablets and mobile devices in rural clinics lacking stable cloud connectivity.

Built With

Share this project:

Updates