Next Article in Journal
Editorial on the Special Issue Titled “Pathology and Diagnosis of Gynecologic Diseases”
Previous Article in Journal
Refractory Bilateral Tubo-Ovarian Abscesses in a Patient with Iatrogenic Hypogammaglobulinemia
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Brief Report

An Open-Source Graphical User Interface-Embedded Automated Electrocardiogram Quality Assessment: A Balanced Class Representation Approach

Biomedical and Mobile Health Technology Lab, Department of Health Sciences and Technology, ETH Zurich, 8008 Zurich, Switzerland
*
Authors to whom correspondence should be addressed.
These authors contributed equally to this work.
Diagnostics 2023, 13(22), 3479; https://doi.org/10.3390/diagnostics13223479
Submission received: 30 October 2023 / Revised: 13 November 2023 / Accepted: 17 November 2023 / Published: 20 November 2023
(This article belongs to the Section Machine Learning and Artificial Intelligence in Diagnostics)

Abstract

:
The rise in cardiovascular diseases necessitates accurate electrocardiogram (ECG) diagnostics, making high-quality ECG recordings essential. Our CNN-LSTM model, embedded in an open-access GUI and trained on balanced datasets collected in clinical settings, excels in automating ECG quality assessment. When tested across three datasets featuring varying ratios of acceptable to unacceptable ECG signals, it achieved an F1 score ranging from 95.87% to 98.40%. Training the model on real noise sources significantly enhances its applicability in real-life scenarios, compared to simulations. Integrated into a user-friendly toolbox, the model offers practical utility in clinical environments. Furthermore, our study underscores the importance of balanced class representation during training and testing phases. We observed a notable F1 score change from 98.09% to 95.87% when the class ratio shifted from 85:15 to 50:50 in the same testing dataset with equal representation. This finding is crucial for future ECG quality assessment research, highlighting the impact of class distribution on the reliability of model training outcomes.

1. Introduction

Globally, cardiovascular diseases (CVDs) are the leading cause of death, accounting for 32% of all global fatalities in 2019, with the majority occurring in low- to middle-income countries [1]. Heart attacks and strokes, which comprise 85% of these CVD-related deaths, underscore the urgent need for effective diagnostic tools, such as Electrocardiography (ECG) [2,3,4]. The advent of wearable technologies has facilitated continuous ECG monitoring, significantly advancing cardiovascular care [5,6]. However, the interpretation of ECG records is complicated due to their vulnerability to disruptions [7].
Advancements in ECG integration with digital health technologies offer promising solutions to improve cardiac care, particularly in underserved regions [8,9]. Automated ECG quality assessment is pivotal in these settings, where access to healthcare and trained specialists is limited. By enabling the immediate identification and re-recording of subpar ECGs, these techniques can streamline the diagnostic process, reducing delays and improving patient outcomes [10,11].
The traditional approach to ECG recording and assessment, often manual and time-consuming, demands expertise [12,13]. Modern approaches leveraging machine learning and sensor advancements offer a more efficient alternative, potentially reducing the workload on healthcare professionals [14,15,16]. Moreover, real-time ECG quality assessment techniques, incorporating advanced signal processing, play a crucial role in the reliability and accuracy of diagnoses [17,18].
Our recent works have demonstrated the versatility of ECG in various contexts, from assessing driving stress to hypertension monitoring, further highlighting its potential in cardiovascular care [19,20]. The democratization of ECG assessments through automated systems can make them more accessible and practical in diverse healthcare environments [21,22].
Building on these motivations, our study introduces a new machine learning algorithm embedded in a graphical user interface (GUI), designed to enhance usability for clinicians. This tool not only eases the assessment of ECG signal quality, but also considers class representation during training and testing phases, addressing a crucial aspect often overlooked in previous studies.

2. Methodology

2.1. Training Datasets: CinC11 and CinC17

The CinC11 dataset [23] used in this study was a relabeled single-lead version. Each lead was assigned a separate label, unlike the original dataset with 12-leads having a single label. The relabeled dataset, available on GitHub [24], consisted of 5400 10-s single-lead ECG recordings from CinC11. These recordings were divided into a train set of 1200 samples and a test set of 4200 samples. The train set comprised 67.92% acceptable signals and 32.08% unacceptable signals. A random split was performed, creating a train-validation ratio of 90:10. The test set contained 67.71% acceptable signals and 32.29% unacceptable signals, as defined in [24].
For training an alternative version of the CNN-LSTM model, a mixture of CinC11 [23] and CinC17 [25] data were used. One dataset aimed for a balanced distribution of acceptable and unacceptable labeling with a 50:50 ratio. Additional noisy data from CinC17 was incorporated to balance the classes and generate more training data. This resulted in a dataset of 4048 10-s ECG recordings, with 2024 samples labeled as acceptable and 2024 samples labeled as unacceptable.
The second dataset included all data from both CinC11 and CinC17, resulting in a larger dataset of 13,912 samples. Out of these, 11,888 were labeled as acceptable and 2024 samples were labeled as unacceptable. The larger dataset size aimed to enhance the model’s flexibility and robustness due to the availability of more training data.
Both datasets were split into training, validation, and test sets using an 80:10:10 ratio. However, it is important to note that the randomization algorithm used for splitting the data makes it difficult to trace the origin of leads within the splits. It is possible that leads from a single 12-lead recording ended up in different sets, which could potentially introduce data leakage and inflate the results [26,27].

2.2. Testing Dataset: BUT QDB

The BUT QDB dataset [28,29] was used as an external test dataset to avoid high performance scores due to leakage. The original 20 min recordings were preprocessed to consist of multiple 10 s samples with a single label. All the labeled segments shorter than 10 s were discarded. This resulted in 10,570 samples. The BUT QDB dataset consists of 1000 Hz recordings, so the 10,570 samples of 10 s were downsampled to become 500 Hz. A total of 5285 of these samples were labeled acceptable, and 5285 samples were labeled unacceptable.

2.3. Spectrogram Conversion

ECG recordings were first normalized between −1.0 and 1.0 before being converted into spectrograms using the tf.signal.stft function. This function applies to the ECG tensor of shape (samples, channels), with channels being None, as the ECG tensor comprises a single channel. Key parameters for the function are frame length and frame step, denoting the length and step size of the analysis window, respectively, used in the Short-Time Fourier Transform (STFT) computation.
The STFT process splits the ECG tensor into frames, applying the Fourier transform separately to each, thus switching the signal from the time domain to the frequency domain. The window function employed here, the Hann function, aids in mitigating spectral leakage, or the distortion of signal frequency when it extends beyond the window edges. The selection of the frame length is determined by a trade-off between time and frequency resolution.
STFT is given by:
S T F T x [ k ] = X ( m , ω ) = k = x [ k ] ω [ k m ] e j ω k ,
where k indicates the index of the analyzed value in the ECG data sample, and the fast Fourier transform values are computed over discrete steps or ‘windows’.
The Hann window function, used here, is defined as:
w [ n ] = 0.5 0.5 cos ( 2 π n N ) .
This function’s bell-shaped and symmetric nature transitions from 0 at the window start and end to 1 in the center, reducing spectral leakage. Chosen over the Hamming window function due to its superior frequency-time resolution trade-off and effectiveness in reducing spectral leakage, the Hann window function is more suitable for ECG data, particularly for identifying high-frequency arrhythmias such as atrial fibrillation.

2.4. CNN-LSTM Model

The CNN-LSTM model used in this study is based on the work of Özer et al. [30], originally designed for classifying power quality disturbances in the power grid. The model consists of two main parts: a Convolutional Neural Network (CNN) for feature extraction and a Long Short-Term Memory (LSTM) network for temporal data analysis and classification. The input data, originally power grid data, is converted into two-dimensional spectrograms before being fed into the model. The CNN part performs feature extraction, while the LSTM part captures temporal dependencies and performs classification. However, to adapt the model for ECG quality assessment, several modifications were made to reduce overfitting and computational demands. Specifically, additional dropout layers were added to the CNN part, and the Bi-LSTM was replaced with an LSTM. This modified model closely resembles models used in previous studies for heartbeat event classification and atrial fibrillation detection.
The finalized CNN-LSTM model, illustrated in Figure 1, starts with an input layer that takes in spectrogram data of shape (38, 129). A normalization layer is applied to scale the input data for improved processing. The model then incorporates a series of convolutional layers, max pooling layers for down-sampling, dropout layers to prevent overfitting, and dense layers for feature extraction. The LSTM layer, a type of recurrent neural network, follows the CNN part and captures temporal dependencies in the sequential data. After additional dropout and dense layers, a sigmoid activation function is applied in the output layer to predict the class probabilities for ECG quality assessment.
For model training, we utilized the Adam optimizer, an optimization algorithm favored for its adaptive learning rate, which adjusts during training based on parameter gradients. This contrasts with algorithms like stochastic gradient descent, which employ a static learning rate throughout training.
Training the model involved the Adam optimizer with a learning rate of 0.0001 and sparse categorical cross-entropy loss. The learning rate parameter impacts the model parameters’ modification speed with each iteration. Lower rates make for slower, more accurate updates, while higher rates expedite these updates, but may reduce precision. Here, we have opted for a 0.0001 learning rate as the typical 0.001 rate seemed to hasten model convergence excessively. Despite altering the training ‘friction’ level, this learning rate does not affect the adaptive nature of the Adam optimizer.
Following training, we saved the parameters for future testing and integration into the toolbox. We carried out the implementation using Python 3.8.11 and TensorFlow 2.9.1, leveraging both a CPU and GPU for training. For a dataset of 13,912 data points, the training process lasted around 10 min.

3. Results

Figure 2 shows the results of the CNN-LSTM model on waveform input data, the figure displays the ground truth labels [‘Tru’] and the predicted labels [‘Pred’].
Table 1 summarizes the performance of the proposed CNN-LSTM model compared to other methods. The model achieved the highest sensitivity, specificity, accuracy, and F1-score among all the analyzed methods.
The toolbox underwent significant changes to improve usability. It now accepts waveform data without a specific numbering scheme, can import .wav files, automatically detects the number of leads in the data, and adjusts the table size accordingly. The code was also optimized and follows software engineering best practices.
The new toolbox is shown in Figure 3 and Figure 4, and the code for the toolbox can be found on GitHub (https://github.com/Kirina/Automated_ecg_assessment, accessed on 16 November 2023), along with detailed instructions on its usage. The original code is also available on GitHub (https://github.com/LinusKra/ECGAssess, accessed on 16 November 2023), enabling easy comparison of the code changes. Figure 3 presents a demonstration highlighting the CNN-LSTM’s capability to automatically classify ‘Lead 1’ as having acceptable quality. In contrast, Figure 4 illustrates an instance of unacceptable quality in a distinct ECG recording.

4. Discussion

Our evaluation of the CNN-LSTM model across diverse datasets such as CinC11 [23], CinC17 [25], and BUT QDB [28,29] demonstrates its adaptability and robustness. The model’s effective performance on the BUT QDB dataset, which was gathered under different conditions than the training data, underscores its generalizability.
In terms of sensitivity, specificity, accuracy, and F1-score, the CNN-LSTM model exhibits superior effectiveness in ECG quality assessment, outperforming other methods as detailed in Table 1. This highlights its potential for practical clinical application. Moreover, our analysis showed the performance of the proposed algorithm with equal representations of high quality vs. low quality, at 50:50, during both the training and testing phases. This highlights the importance of class representation during training and testing. Notably, the F1 score of the proposed algorithm decreased from 98.09% to 95.87% when the class representation changed from 85:15 to 50:50, despite the test set having an equal representation for both. This point must be carefully considered when reporting results in future investigations on this topic.
In our study, the newly developed toolbox was demonstrated using examples from the CinC11 dataset, as illustrated in Figure 3. This figure showcases the toolbox’s interface while analyzing an ECG signal from ‘Lead 1’, marked as having acceptable quality. Despite the CNN-LSTM algorithm’s automatic labeling indicating bad quality, other ECG signal quality indices concurred with the acceptable quality assessment. This instance demonstrates the toolbox’s ability to facilitate a comprehensive review of ECG signals. The user-friendly graphical interface, complete with a scroll bar, allows clinicians to easily navigate and assess each of the 12 leads within an ECG recording. The effective visualization and assessment capabilities of the toolbox, as seen in Figure 3, underscore its potential utility in clinical settings.
Figure 4 provides an additional perspective on the toolbox’s functionality by presenting an ECG signal from ‘Lead 8’ of the CinC11 dataset, this time marked as having unacceptable quality. In this case, the GUI’s labeling based on the CNN-LSTM algorithm indicates bad quality, aligning with the disagreement observed in other ECG signal quality indices. This example highlights the toolbox’s sensitivity in detecting and labeling poor-quality signals, an essential feature for ensuring accurate ECG analysis. The graphical user interface again proves instrumental in allowing for the detailed examination of each lead, reinforcing the toolbox’s role in enhancing ECG quality assessment. The contrast between the results for ‘Lead 1’ and ‘Lead 8’ within the same dataset illustrates the model’s nuanced approach to ECG signal evaluation.
A primary strength of this study is the extensive evaluation of the model across varied datasets, which reduces the risk of dataset-specific overfitting and showcases the model’s ability to handle different signal qualities. Combining CNN for feature extraction with LSTM for temporal data analysis, the model adeptly identifies complex ECG patterns, resonating with the guidelines in [36]. This methodology significantly contributes to discussions on the need for robust and adaptable models in biomedical signal analysis, particularly for diagnosing noncommunicable diseases.
Furthermore, the study emphasizes transparency and reproducibility, demonstrated by the public availability of the source code [24]. This openness encourages further research and collaboration in the field.
However, the study has limitations. The model’s effectiveness is closely linked to the diversity and quality of the training data, and its performance might be impacted when exposed to highly varied data types. The computational demands for training and deploying deep learning models could also limit their feasibility in certain settings.
Future research should focus on developing algorithms that are compatible with various ECG recording devices by accommodating multiple sampling frequencies. Expanding the algorithm to handle different data lengths and enabling real-time analysis could greatly enhance its clinical utility. Exploring hybrid models that combine feature-based and deep learning approaches might offer a balance between computational efficiency and interpretability.
The consistent and versatile performance of our CNN-LSTM model across various datasets reaffirms its promising reliability as a screening tool. This tool has the potential to improve decision-making processes when collecting ECGs in different settings with noise and various clinical environments. Feedback from clinicians on this tool would be highly appreciated to understand its efficacy, scalability, and effectiveness in improving cardiac diagnosis and treatment.

5. Conclusions

This study introduces an innovative CNN-LSTM model for automated ECG quality assessment, embedded in an open-access GUI and trained on real-world noise without simulated data. The model, comprising a CNN for feature extraction and an LSTM for classification, shows superior performance on various datasets, including CinC11, CinC17, and BUT QDB. It demonstrates high sensitivity, specificity, accuracy, and F1 scores, highlighting its robustness in diverse clinical settings. The balanced class representation during training provides crucial insights, emphasizing the need for accurate class distribution in ECG quality assessment. Future work should focus on enhancing the model’s adaptability to different data types and extending its capabilities for real-time analysis.

Author Contributions

M.E. designed and led the study. M.E., K.v.d.B. and C.M. conceived the study. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The CinC11, CinC17, and BUT QDB datasets can be downloaded via the following links: CinC11: https://physionet.org/content/challenge-2011/1.0.0/, accessed on 16 November 2023; CinC17: https://archive.physionet.org/pn3/challenge/2017/, accessed on 16 November 2023; BUT QDB: https://physionet.org/content/butqdb/1.0.0/, accessed on 16 November 2023. The associated code is publicly accessible and can be downloaded from https://github.com/Kirina/Automated_ecg_assessment, accessed on 16 November 2023.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. World Health Organization; Cardiovascular Diseases World Health Organization. Cardiovascular Diseases. Key Facts. 2021. Available online: https://www.who.int/news-room/fact-sheets/detail/cardiovascular-diseases-(cvds) (accessed on 16 November 2023).
  2. Nemati, R.; Ganjoo, M.; Jadidi, F.; Tanha, A.; Baghbani, R. Electrocardiography in early diagnosis of cardiovascular complications of COVID-19; a systematic literature review. Arch. Acad. Emerg. Med. 2021, 9, e10. [Google Scholar] [PubMed]
  3. Chung, C.T.; Lee, S.; King, E.; Liu, T.; Armoundas, A.A.; Bazoukis, G.; Tse, G. Clinical significance, challenges and limitations in using artificial intelligence for electrocardiography-based diagnosis. Int. J. Arrhythmia 2022, 23, 24. [Google Scholar] [CrossRef] [PubMed]
  4. Maron, B.J.; Friedman, R.A.; Kligfield, P.; Levine, B.D.; Viskin, S.; Chaitman, B.R.; Okin, P.M.; Saul, J.P.; Salberg, L.; Van Hare, G.F.; et al. Assessment of the 12-Lead Electrocardiogram as a Screening Test for Detection of Cardiovascular Disease in Healthy General Populations of Young People (12–25 Years of Age) A Scientific Statement From the American Heart Association and the American College of Cardiology. J. Am. Coll. Cardiol. 2014, 64, 1479–1514. [Google Scholar] [PubMed]
  5. Kamga, P.; Mostafa, R.; Zafar, S. The use of wearable ECG devices in the clinical setting: A review. Curr. Emerg. Hosp. Med. Rep. 2022, 10, 67–72. [Google Scholar] [CrossRef] [PubMed]
  6. Neri, L.; Oberdier, M.T.; van Abeelen, K.C.; Menghini, L.; Tumarkin, E.; Tripathi, H.; Jaipalli, S.; Orro, A.; Paolocci, N.; Gallelli, I.; et al. Electrocardiogram Monitoring Wearable Devices and Artificial-Intelligence-Enabled Diagnostic Capabilities: A Review. Sensors 2023, 23, 4805. [Google Scholar] [CrossRef]
  7. Breen, C.; Kelly, G.; Kernohan, W. ECG interpretation skill acquisition: A review of learning, teaching and assessment. J. Electrocardiol. 2022, 73, 125–128. [Google Scholar] [CrossRef]
  8. Krittanawong, C.; Rogers, A.J.; Johnson, K.W.; Wang, Z.; Turakhia, M.P.; Halperin, J.L.; Narayan, S.M. Integration of novel monitoring devices with machine learning technology for scalable cardiovascular management. Nat. Rev. Cardiol. 2021, 18, 75–91. [Google Scholar] [CrossRef]
  9. Bayoumy, K.; Gaber, M.; Elshafeey, A.; Mhaimeed, O.; Dineen, E.H.; Marvel, F.A.; Martin, S.S.; Muse, E.D.; Turakhia, M.P.; Tarakji, K.G.; et al. Smart wearable devices in cardiovascular care: Where we are and how to move forward. Nat. Rev. Cardiol. 2021, 18, 581–599. [Google Scholar] [CrossRef]
  10. Lazarus, G.; Kirchner, H.; Siswanto, B.B. Prehospital tele-electrocardiographic triage improves the management of acute coronary syndrome in rural populations: A systematic review and meta-analysis. J. Telemed. Telecare 2022, 28, 632–641. [Google Scholar] [CrossRef]
  11. van der Bijl, K.; Elgendi, M.; Menon, C. Automatic ECG quality assessment techniques: A systematic review. Diagnostics 2022, 12, 2578. [Google Scholar] [CrossRef]
  12. Cook, D.A.; Oh, S.Y.; Pusic, M.V. Accuracy of physicians’ electrocardiogram interpretations: A systematic review and meta-analysis. JAMA Intern. Med. 2020, 180, 1461–1471. [Google Scholar] [CrossRef] [PubMed]
  13. Pandiaraja, M.; Brimicombe, J.; Cowie, M.; Dymond, A.; Lindén, H.C.; Lip, G.Y.; Mant, J.; Williams, K.; Charlton, P.H.; Investigators, S. Screening for atrial fibrillation: Improving efficiency of manual review of handheld electrocardiograms. Eng. Proc. 2020, 2, 78. [Google Scholar] [PubMed]
  14. Siontis, K.C.; Noseworthy, P.A.; Attia, Z.I.; Friedman, P.A. Artificial intelligence-enhanced electrocardiography in cardiovascular disease management. Nat. Rev. Cardiol. 2021, 18, 465–478. [Google Scholar] [CrossRef] [PubMed]
  15. Fu, Z.; Hong, S.; Zhang, R.; Du, S. Artificial-intelligence-enhanced mobile system for cardiovascular health management. Sensors 2021, 21, 773. [Google Scholar] [CrossRef] [PubMed]
  16. Elgendi, M.; Al-Ali, A.; Mohamed, A.; Ward, R. Improving remote health monitoring: A low-complexity ECG compression approach. Diagnostics 2018, 8, 10. [Google Scholar] [CrossRef] [PubMed]
  17. Satija, U.; Ramkumar, B.; Manikandan, M.S. A new automated signal quality-aware ECG beat classification method for unsupervised ECG diagnosis environments. IEEE Sens. J. 2018, 19, 1. [Google Scholar] [CrossRef]
  18. Yao, X.; Rushlow, D.R.; Inselman, J.W.; McCoy, R.G.; Thacher, T.D.; Behnken, E.M.; Bernard, M.E.; Rosas, S.L.; Akfaly, A.; Misra, A.; et al. Artificial intelligence–enabled electrocardiograms for identification of patients with low ejection fraction: A pragmatic, randomized clinical trial. Nat. Med. 2021, 27, 815–819. [Google Scholar] [CrossRef]
  19. Elgendi, M.; Menon, C. Machine learning ranks ECG as an optimal wearable biosignal for assessing driving stress. IEEE Access 2020, 8, 34362–34374. [Google Scholar] [CrossRef]
  20. Liang, Y.; Chen, Z.; Ward, R.; Elgendi, M. Hypertension assessment via ECG and PPG signals: An evaluation using MIMIC database. Diagnostics 2018, 8, 65. [Google Scholar] [CrossRef]
  21. Avula, V.; Wu, K.C.; Carrick, R.T. Clinical applications, methodology, and scientific reporting of electrocardiogram deep-learning models: A systematic review. JACC Adv. 2023, 2, 100686. [Google Scholar] [CrossRef]
  22. Elgendi, M.; Mohamed, A.; Ward, R. Efficient ECG compression and QRS detection for e-health applications. Sci. Rep. 2017, 7, 459. [Google Scholar] [CrossRef] [PubMed]
  23. Silva, I.; Moody, G.B.; Celi, L. Improving the quality of ECGs collected using mobile phones: The Physionet/Computing in Cardiology Challenge 2011. In Proceedings of the 2011 Computing in Cardiology (CinC), Hangzhou, China, 18–21 September 2011; IEEE: Piscataway, NJ, USA, 2011; pp. 273–276. [Google Scholar]
  24. Kramer, L.; Menon, C.; Elgendi, M. ECGAssess: A Python-Based Toolbox to Assess ECG lead signal quality. Front. Digit. Health 2022, 4, 847555. [Google Scholar] [CrossRef] [PubMed]
  25. Clifford, G.D.; Liu, C.; Moody, B.; Li-wei, H.L.; Silva, I.; Li, Q.; Johnson, A.; Mark, R.G. AF classification from a short single lead ECG recording: The PhysioNet/computing in cardiology challenge 2017. In Proceedings of the 2017 Computing in Cardiology (CinC), Rennes, France, 24–27 September 2017; IEEE: Piscataway, NJ, USA, 2017; pp. 1–4. [Google Scholar] [CrossRef]
  26. Kapoor, S.; Narayanan, A. Leakage and the Reproducibility Crisis in ML-based Science. arXiv 2022, arXiv:2207.07048. [Google Scholar] [CrossRef]
  27. Kaufman, S.; Rosset, S.; Perlich, C. Leakage in data mining: Formulation, detection, and avoidance. ACM Trans. Knowl. Discov. Data (TKDD) 2012, 6, 1–21. [Google Scholar] [CrossRef]
  28. Nemcova, A.; Smisek, R.; Opravilová, K.; Vitek, M.; Smital, L.; Maršánová, L. Brno University of Technology ECG Quality Database (BUT QDB) (version 1.0.0). PhysioNet 2020, 101, e215–e220. [Google Scholar] [CrossRef]
  29. Goldberger, A.L.; Amaral, L.A.; Glass, L.; Hausdorff, J.M.; Ivanov, P.C.; Mark, R.G.; Mietus, J.E.; Moody, G.B.; Peng, C.K.; Stanley, H.E. PhysioBank, PhysioToolkit, and PhysioNet: Components of a new research resource for complex physiologic signals. Circulation 2000, 101, e215–e220. [Google Scholar] [CrossRef]
  30. Özer, İ.; Efe, S.B.; Özbay, H. CNN/Bi-LSTM-based deep learning algorithm for classification of power quality disturbances by using spectrogram images. Int. Trans. Electr. Energy Syst. 2021, 31, e13204. [Google Scholar] [CrossRef]
  31. Hermawan, I.; Ma’sum, M.A.; Intan, P.R.D.; Jatmiko, W.; Wiweko, B.; Boediman, A.; Pradekso, B.K. Temporal feature and heuristics-based noise detection over classical machine learning for ECG signal quality assessment. In Proceedings of the 2019 International Workshop on Big Data and Information Security (IWBIS), Bali, Indonesia, 11 October 2019; IEEE: Piscataway, NJ, USA, 2019; pp. 1–8. [Google Scholar] [CrossRef]
  32. Clifford, G.D.; Behar, J.; Li, Q.; Rezek, I. Signal Quality Indices and data fusion for determining clinical acceptability of electrocardiograms. Physiol. Meas. 2012, 33, 1419–1433. [Google Scholar] [CrossRef]
  33. Taji, B.; Chan, A.D.; Shirmohammadi, S. Classifying measured electrocardiogram signal quality using deep belief networks. In Proceedings of the 2017 IEEE International Instrumentation and Measurement Technology Conference (I2MTC), Turin, Italy, 22–25 May 2017; IEEE: Piscataway, NJ, USA, 2017; pp. 1–6. [Google Scholar] [CrossRef]
  34. Yaghmaie, N.; Maddah-Ali, M.A.; Jelinek, H.F.; Mazrbanrad, F. Dynamic signal quality index for electrocardiograms. Physiol. Meas. 2018, 39, 105008. [Google Scholar] [CrossRef]
  35. Fu, F.; Xiang, W.; An, Y.; Liu, B.; Chen, X.; Zhu, S.; Li, J. Comparison of Machine Learning Algorithms for the Quality Assessment of Wearable ECG Signals Via Lenovo H3 Devices. J. Med. Biol. Eng. 2021, 41, 231–240. [Google Scholar] [CrossRef]
  36. Elgendi, M.; Howard, N.; Lovell, N.; Cichocki, A.; Brearley, M.; Abbott, D.; Adatia, I. A six-step framework on biomedical signal analysis for tackling noncommunicable diseases: Current and future perspectives. JMIR Biomed. Eng. 2016, 1, e6401. [Google Scholar] [CrossRef]
Figure 1. Schematic overview of the proposed CNN-LSTM network. The Feature extraction box outlines the CNN part of the model. The Classification box outlines the LSTM part of the model. The values under the input layer represent the input shape. The values under the Conv1D layers represent the filter and kernel size. The value under the dropout layers represents the dropout rate. The value under the LSTM and Dense layers represents the dimensionality of the output. The Sigmoid under the last Dense layer represents the activation function of the output.
Figure 1. Schematic overview of the proposed CNN-LSTM network. The Feature extraction box outlines the CNN part of the model. The Classification box outlines the LSTM part of the model. The values under the input layer represent the input shape. The values under the Conv1D layers represent the filter and kernel size. The value under the dropout layers represents the dropout rate. The value under the LSTM and Dense layers represents the dimensionality of the output. The Sigmoid under the last Dense layer represents the activation function of the output.
Diagnostics 13 03479 g001
Figure 2. Examples of true positives and true negatives yielded by the proposed CNN-LSTM model, utilizing the BUT QDB dataset.
Figure 2. Examples of true positives and true negatives yielded by the proposed CNN-LSTM model, utilizing the BUT QDB dataset.
Diagnostics 13 03479 g002
Figure 3. Showcase of the new toolbox with an instance of an ECG signal with acceptable quality. The GUI marks it as bad quality due to automatic labeling based on the proposed CNN-LSTM algorithm. Other ECG signal quality indices in agreement. The displayed ECG corresponds to ‘Lead 1’, extracted from the CinC11 dataset, which includes 12-lead ECG data. By utilizing the scroll bar situated in the top left corner of the graphical user interface, we can load and examine each ECG lead within the dataset. Remarkably, all 12 ECG leads exhibit acceptable quality.
Figure 3. Showcase of the new toolbox with an instance of an ECG signal with acceptable quality. The GUI marks it as bad quality due to automatic labeling based on the proposed CNN-LSTM algorithm. Other ECG signal quality indices in agreement. The displayed ECG corresponds to ‘Lead 1’, extracted from the CinC11 dataset, which includes 12-lead ECG data. By utilizing the scroll bar situated in the top left corner of the graphical user interface, we can load and examine each ECG lead within the dataset. Remarkably, all 12 ECG leads exhibit acceptable quality.
Diagnostics 13 03479 g003
Figure 4. Showcase of the new toolbox with an instance of an ECG signal with unacceptable quality. The GUI marks it as bad quality due to automatic labeling based on the proposed CNN-LSTM algorithm. Other ECG signal quality indices in disagreement. The displayed ECG corresponds to ‘Lead 8,’ extracted from the CinC11 dataset, which includes 12-lead ECG data. By utilizing the scroll bar situated in the top left corner of the graphical user interface, we can load and examine each ECG lead within the dataset. Remarkably, all 12 ECG leads, excluding ‘Lead 8,’ exhibit acceptable quality.
Figure 4. Showcase of the new toolbox with an instance of an ECG signal with unacceptable quality. The GUI marks it as bad quality due to automatic labeling based on the proposed CNN-LSTM algorithm. Other ECG signal quality indices in disagreement. The displayed ECG corresponds to ‘Lead 8,’ extracted from the CinC11 dataset, which includes 12-lead ECG data. By utilizing the scroll bar situated in the top left corner of the graphical user interface, we can load and examine each ECG lead within the dataset. Remarkably, all 12 ECG leads, excluding ‘Lead 8,’ exhibit acceptable quality.
Diagnostics 13 03479 g004
Table 1. Overview of the performance of the proposed CNN-LSTM compared to other methods. Ac refers to acceptable, UnAc refers to unacceptable. N/R refers to not received, meaning that the value was not mentioned in the article. 1 Subset of CinC11 labeled in [24]. 2–6 Same dataset. 7 Calculated value from values in paper.
Table 1. Overview of the performance of the proposed CNN-LSTM compared to other methods. Ac refers to acceptable, UnAc refers to unacceptable. N/R refers to not received, meaning that the value was not mentioned in the article. 1 Subset of CinC11 labeled in [24]. 2–6 Same dataset. 7 Calculated value from values in paper.
MethodYearTrain DatasetTest DatasetTrain RatioTest DataSensitivitySpecificityAccuracyF1-Score
Ac:UnAcAc:UnAc(%)(%)(%)(%)
Proposed method2022CinC11 1 and CinC17 2BUT QDB 350:5050:5092.4399.6096.0295.87
Proposed method2022CinC11 1 and CinC17 2CinC11 1 and CinC1750:5050:5098.5295.5297.0397.09
Proposed method2022CinC11 1 and CinC17 4BUT QDB 385:1550:5099.4196.7198.0698.09
Proposed method2022CinC11 1 and CinC17 4CinC11 1 and CinC1785:1585:1599.7483.8097.2798.40
Proposed method2022CinC11 1,5CinC11 1,668:3268:3298.2492.0496.2397.25
Kramer et al. [24]2022CinC11 1,5CinC11 1,668:3268:3298.0386.2194.2196.31 7
Hermawan et al. [31]2019CinC11CinC1170:3070:3085.0086.0085.60N/R
Clifford et al. [32]2012CinC11 and NSTDBCinC11 and NSTDB50:5050:50N/RN/R95.80N/R
Taji et al. [33]2017CinC11 and NSTDBCinC11 and NSTDB50:5050:5098.2098.2097.2098.38
Yaghmaie et al. [34]2017CinC11 and NSTDB andCinC11 and NSTDB50:5050:5096.2097.6096.90N/R
MIT-BIH
Fu et al. [35]2021PrivatePrivate80:2084:1698.6686.6596.73N/R
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Elgendi, M.; van der Bijl, K.; Menon, C. An Open-Source Graphical User Interface-Embedded Automated Electrocardiogram Quality Assessment: A Balanced Class Representation Approach. Diagnostics 2023, 13, 3479. https://doi.org/10.3390/diagnostics13223479

AMA Style

Elgendi M, van der Bijl K, Menon C. An Open-Source Graphical User Interface-Embedded Automated Electrocardiogram Quality Assessment: A Balanced Class Representation Approach. Diagnostics. 2023; 13(22):3479. https://doi.org/10.3390/diagnostics13223479

Chicago/Turabian Style

Elgendi, Mohamed, Kirina van der Bijl, and Carlo Menon. 2023. "An Open-Source Graphical User Interface-Embedded Automated Electrocardiogram Quality Assessment: A Balanced Class Representation Approach" Diagnostics 13, no. 22: 3479. https://doi.org/10.3390/diagnostics13223479

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop