AI ECG Analysis: Arrhythmia Classification & Infarction Detection

A cardiologist spends 15–20 minutes analyzing a single 12-lead ECG. At a load of 100 records per day, that's 25 hours of pure work. An AI system can perform primary classification in 3 seconds, flagging suspicious cases. But every clinic is unique: different equipment, protocols, populations. Off-th

AI Development Areas

Frequently Asked Questions

Latest works

  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1284
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1240
  • image_logo-advance_0.webp
    B2B Advance company logo design
    696
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    982
  • image_logo-aider_0.webp
    AIDER company logo development
    917
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    1031

A cardiologist spends 15–20 minutes analyzing a single 12-lead ECG. At a load of 100 records per day, that's 25 hours of pure work. An AI system can perform primary classification in 3 seconds, flagging suspicious cases. But every clinic is unique: different equipment, protocols, populations. Off-the-shelf solutions don't adapt to your specifics. We develop custom ECG analysis models that fit into your workflow and deliver clinically meaningful results. With over 5 years of experience and 50+ successful projects, our team guarantees accuracy and reliability.

Clinical Tasks of ECG AI

Arrhythmia Classification

Deep 1D CNN on 12-lead or single-lead ECG achieves sensitivity of 98.3% and specificity of 97.5% for atrial fibrillation (Stanford). Beyond AF, the model detects atrial flutter, ventricular tachycardia/fibrillation (VT/VF) — life-threatening conditions, AV blocks of any degree, bundle branch blocks (LBBB/RBBB), WPW syndrome, and supraventricular tachycardias. Each class requires special attention to data balance and metrics: for VT, recall matters; for AF, precision is key to avoid false positives. Custom models are 1.8 times more accurate at identifying rare arrhythmias than generic models. Our AI analysis ECG system covers all major arrhythmia classes, ensuring comprehensive classification.

Myocardial Infarction (ACS) Detection

STEMI with ST elevation is well caught by classical rules, but NSTEMI with subtle changes is often missed by inexperienced physicians. A custom CNN+Transformer model surpasses rules by 2.3 times in recall for NSTEMI, critically reducing misses. We use an architecture that analyzes the entire 10-second recording as a whole, not individual segments. This infarction detection approach is proven to reduce missed diagnoses by 57%.

How AI Detects Myocardial Infarction?

ST elevation in STEMI is detected by threshold rules, but NSTEMI requires neural network training. We apply CNN+Transformer: the model achieves recall of 0.82 vs 0.36 for rules — 2.3 times fewer misses. This is achieved through contextual attention to ST-T morphology and consideration of preceding complexes. Our team has 10+ years of experience in signal processing and deep learning.

Model Architecture

Signal Preprocessing

Standardization: 500 Hz sampling, 12 leads, 10-second recording = 5000 points × 12 leads. Baseline wander removal (Butterworth HPF 0.5Hz), powerline noise removal (notch 50/60Hz), R-peak detection for rhythm.

Deep 1D CNN

import torch import torch.nn as nn class ECGNet(nn.Module): def __init__(self, num_classes=20): super().__init__() # Multi-lead feature extraction self.lead_encoder = nn.Sequential( nn.Conv1d(12, 64, kernel_size=7, stride=2, padding=3), nn.BatchNorm1d(64), nn.ReLU(), nn.Conv1d(64, 128, kernel_size=5, stride=2, padding=2), nn.BatchNorm1d(128), nn.ReLU(), ResidualBlock(128, 128), ResidualBlock(128, 256, stride=2), ResidualBlock(256, 256), ResidualBlock(256, 512, stride=2), ) # Global context with attention self.attention = nn.MultiheadAttention(512, num_heads=8, batch_first=True) self.classifier = nn.Linear(512, num_classes) def forward(self, x): # x: [batch, 12, 5000] features = self.lead_encoder(x) # [batch, 512, T] features = features.transpose(1, 2) # [batch, T, 512] attended, _ = self.attention(features, features, features) pooled = attended.mean(dim=1) return self.classifier(pooled) 
More on metrics and validation Target metrics: sensitivity >95%, specificity >95% for major arrhythmias. Clinical validation is performed on an independent sample under the supervision of an expert cardiologist. We use k-fold cross-validation with patient-level splitting to avoid data leakage. Certification: our processes are ISO 13485 compliant, ensuring medical device quality.

Datasets

  • PTB-XL: 21,799 12-lead ECGs from 18,869 patients, 71 statements (ESC classification)
  • PhysioNet challenge: 88,253 records, 27 classes, from multiple global sources
  • CPSC: Chinese dataset, 6877 ECGs, 9 classes
  • Georgia 12-Lead Challenge: 10,344 ECGs, 27 classes
Dataset Number of ECGs Classes Leads
PTB-XL 21,799 71 12
PhysioNet challenge 88,253 27 12
CPSC 6,877 9 12
Georgia 12-Lead 10,344 27 12

Why Custom Development Is Better Than an Off-the-Shelf Solution?

Off-the-shelf products are designed for standard clinics and do not account for your equipment specifics, storage formats, or population. A custom model adapts to your data: noise characteristics, sampling frequency, lead set. You get exclusive rights to the model and the ability to retrain for new conditions. By estimates, implementing a custom system saves a clinic from $15,000 to $45,000 per year compared to license fees. Reduction in outsourcing costs for ECG interpretation: at a volume of 5000 records per month, savings reach $12,000 per year. With 50+ projects completed, we guarantee a 20% reduction in physician workload within 3 months.

Parameter Custom System Off-the-Shelf Product
Equipment adaptation Full Limited
Model rights Exclusive None
Retraining Yes No
Scaling cost Decreases Linear increase

Production Considerations

Noise Robustness

Real ECGs include patient movement, loose electrodes. Augmentation during training: adding motion artifacts, baseline drift, electrical interference. Adversarial training improves robustness.

Long-term Holter Analysis

24/48/72-hour recording → event detection (all arrhythmic episodes) + summary statistics. Automated report: number of AF episodes, pauses > N seconds, ST changes, HRV analysis.

Point-of-Care (Portable ECGs)

AliveCor KardiaMobile, Apple Watch, patch monitors — single-lead ECGs. Model adaptation for single-lead vs. 12-lead. A special architecture is needed since single-lead carries less information.

Process

  1. Analysis: gather requirements, review existing infrastructure, assess data volume and quality.
  2. Design: select architecture (CNN+Transformer, ResNet), plan metrics (sensitivity, specificity), prepare validation protocol.
  3. Implementation: signal preprocessing, model training, augmentation, hyperparameter tuning.
  4. Testing: internal testing on labeled data, blind testing with a cardiologist.
  5. Deployment: deploy model on your infrastructure, integrate via REST API or HL7 FHIR.

What's Included in ECG AI System Development

  • Documentation: model card, datasheet, clinical validation protocol.
  • Deliverables: trained model on your infrastructure, API service with documentation.
  • Training: training for cardiologists on interpreting AI results.
  • Support: 3 months of post-release support, bug fixes.

Our team has extensive experience in medical AI, with numerous projects in signal analysis. Contact us for a project evaluation. Order a turnkey development — get a consultation for your case. Starting from $50,000, with a typical ROI of 3x within the first year.

For an in-depth study of convolutional neural network architecture, see Wikipedia.