WAVIE: A Modular and Open-Source Python Implementation for Fully Automated Digitisation of Paper Electrocardiograms

The electrocardiogram (ECG) is a ubiquitous tool for the assessment of heart disease. While considerable effort has been directed at ECG digitization to facilitate artificial intelligence applications, limitations persist in the generalizability of existing methods. As part of the ‘Digitization and Classification of ECG Images: The George B. Moody PhysioNet Challenge 2024’, we present WAVIE, a fully-automated, modular, and open-source framework for ECG digitization to handle the heterogeneity of real-world data. Using the PTB-XL dataset, synthetic paper ECGs were generated with known variations and artifacts. Our team, wavie ABI, developed a three-stage framework consisting of deep-learning models for orientation correction, object detection, and waveform extraction. Inference on the hidden test set for the digitisation task produced a mean signal-to-noise ratio (SNR) of 5.469 (ranked 3rd of 16 teams). WAVIE provides a comprehensive and generalizable baseline that can be reconfigured and fine-tuned for specific ECG digitisation tasks, ensuring adaptability for future research applications.