logo

ML-Driven ECG Interpretation for Decision-Making

Published: January 22, 2025
# Healthcare
# Data Science
# AI / ML
Cardiovascular diseases (CVDs) are a major global health concern, accounting for a significant number of deaths each year and being a leading cause of mortality worldwide. Accurate and timely diagnosis of CVDs is crucial for effective treatment and improved patient outcomes. The gold standard used for screening and diagnosing CVDs is Electrocardiography (ECG). However, accurately interpreting ECG results can be challenging for healthcare professionals. In this case study, we explored the implementation of Machine Learning (ML) for ECG recognition to enhance diagnostic accuracy and enable timely interventions.

Challenge

The current ECG interpretation process by healthcare professionals faces limitations such as variations in diagnostic accuracy, time-consuming analysis, and challenges in differentiating between certain ECG patterns. Initially, for analysis, 3 pathologies were selected to be distinguished from the normal ECG result: complete right bundle branch block (CRBBB), complete left bundle branch block (CLBBB), and first-degree atrioventricular block (1dAVb). After digitally converting ECG images obtained from paper ECG, the source data was represented by 12-column data frames containing numeric values of voltage. The main challenge was to define the right voltage for each array and to compare it with known patterns.

Solution

Step 1. Discovery:

We reviewed and analyzed recent literature concerning general aspects and use cases, ECG analysis (segmentation and classification), and ECG detection, visualization and filtration.

Step 2. Data Collection:

We have conducted an online survey among healthcare professionals in Ukraine and covered 375 participants over 2 months in order to see real-life data on CVDs frequency in therapeutic practice.

Step 3. Data Preprocessing:

The ECG recordings are preprocessed to remove noise, artifacts, and baseline distortions. Image processing techniques, such as HSV color space threshold and MinAreaFilter, are applied to enhance the quality of ECG images.

Step 4. Model Training:

Multiple CNN models with transfer learning are employed for classification. Pretrained models, such as VGG16, DenseNet121, and WideResNet, are used to learn general features from large datasets like ImageNet. These models are then fine-tuned using the preprocessed ECG data to specialize in ECG pattern recognition.

Step 5. Evaluation and Validation:

The trained ML models are evaluated using validation datasets to measure their accuracy and performance. Metrics like f1_score and precision-recall curves are used to assess the models' ability to differentiate between various ECG classes. Then the accuracy of the results were validated by the domain experts.

Step 6. Model Deployment:

The best-performing ML model is selected for deployment in a mobile application. Users can upload 12-lead ECG images to the application for instant interpretation, which can be used as a recommendation for diagnosis.

Development Journey

  • Domain expertise in healthcare
  • Back–end: Python, PostgreSQL
  • Front–end: AngularJS 6 Environment

Impact

1. Improved Diagnostic Accuracy:

ML model consistently and accurately classifies ECG patterns and interprets them, reducing the risk of misdiagnosis and improving patient outcomes for certain ECG abnormalities.

2. Time Efficiency:

The automated analysis of ECGs significantly reduces the time required for diagnosis, enabling prompt interventions (such as angioplasty, stent placement, valve repair/replacement, electrical cardioversion, pacemaker implantation etc.) when necessary.

3. Accessibility:

The mobile application allows healthcare professionals to access ECG analysis anytime and anywhere, facilitating remote patient care and telemedicine.

4. Scalability:

ML model can be modified and expanded with new data, ensuring continuous improvement and adaptation to emerging ECG patterns.

5. Standardization:

ML-driven diagnosis promotes standardized interpretation, minimizing variations in diagnoses among different healthcare providers.

RELATED CASE STUDIES

View all Case Studies