{"title":"Electrocardiography signal processing method for effective assessment of a patient's heart rate using a convolutional neural network","authors":"Daniel V. Gordienko, Artem O. Kravchenko","doi":"10.17816/dd627084","DOIUrl":null,"url":null,"abstract":"BACKGROUND: The initial step in annotating an electrocardiogram is the evaluation of the patient's heart rhythm. In the presented study, a method has been developed to process the electrocardiographic signal and estimate the heart rhythm. The method is based on the application of a trained convolutional neural network, which will provide the physician with preliminary information about possible atrial fibrillation or the presence of other rhythm disturbances as soon as possible after receiving the electrocardiogram. Furthermore, such methodologies can be incorporated into telemedicine systems, thereby facilitating remote monitoring of cardiac status. \nAIM: The aim of the study was to develop an electrocardiography signal processing method for the classification of a patient’s heart rhythm into three classes: sinus rhythm, atrial fibrillation, and other arrhythmias. \nMATERIALS AND METHODS: The publicly available electrocardiograms of patients were selected for model training and testing. The software was written in the Python programming language using the TensorFlow framework. The training, validation, and test samples were formed with a ratio of 10:1:1:1, with a uniform distribution by classes. Three variants of data sets for each record were prepared: combining plots of all 12 leads of the electrocardiogram on one image, obtaining spectrograms of II and V1 leads using Gaussian wavelet, and representing the record as a vector cardiogram. The architecture of the convolutional neural network was based on the ResNet18 architecture, which was further modified, and a series of modifications were made for each of the input data representations. \nRESULTS: A serialized model was obtained with the following accuracy metrics: accuracy=43% for matching 12 electrocardiographic leads in the image; accuracy=43% for vector representation of the electrocardiogram; and accuracy=69% for wavelet transform of the electrocardiogram. In the case of a two-class problem involving sinus rhythm and atrial fibrillation, the accuracy metric for the wavelet transform reaches 93% with metrics recall, precision, and F1-score values of 93%, 94%, and 93%, respectively. \nCONSLUSIONS: The results demonstrate the potential of using convolutional neural networks to assess the heart rhythm of patients. Further development of the project involves the selection of the most effective machine learning algorithm, testing of this algorithm for the two-class problem, and expansion of the solution for other classes of rhythm disorders. Additionally, it is possible to improve classification results for the three-class problem by using a superior model and introducing additional clustering.","PeriodicalId":34831,"journal":{"name":"Digital Diagnostics","volume":"2 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-07-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Digital Diagnostics","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.17816/dd627084","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
BACKGROUND: The initial step in annotating an electrocardiogram is the evaluation of the patient's heart rhythm. In the presented study, a method has been developed to process the electrocardiographic signal and estimate the heart rhythm. The method is based on the application of a trained convolutional neural network, which will provide the physician with preliminary information about possible atrial fibrillation or the presence of other rhythm disturbances as soon as possible after receiving the electrocardiogram. Furthermore, such methodologies can be incorporated into telemedicine systems, thereby facilitating remote monitoring of cardiac status.
AIM: The aim of the study was to develop an electrocardiography signal processing method for the classification of a patient’s heart rhythm into three classes: sinus rhythm, atrial fibrillation, and other arrhythmias.
MATERIALS AND METHODS: The publicly available electrocardiograms of patients were selected for model training and testing. The software was written in the Python programming language using the TensorFlow framework. The training, validation, and test samples were formed with a ratio of 10:1:1:1, with a uniform distribution by classes. Three variants of data sets for each record were prepared: combining plots of all 12 leads of the electrocardiogram on one image, obtaining spectrograms of II and V1 leads using Gaussian wavelet, and representing the record as a vector cardiogram. The architecture of the convolutional neural network was based on the ResNet18 architecture, which was further modified, and a series of modifications were made for each of the input data representations.
RESULTS: A serialized model was obtained with the following accuracy metrics: accuracy=43% for matching 12 electrocardiographic leads in the image; accuracy=43% for vector representation of the electrocardiogram; and accuracy=69% for wavelet transform of the electrocardiogram. In the case of a two-class problem involving sinus rhythm and atrial fibrillation, the accuracy metric for the wavelet transform reaches 93% with metrics recall, precision, and F1-score values of 93%, 94%, and 93%, respectively.
CONSLUSIONS: The results demonstrate the potential of using convolutional neural networks to assess the heart rhythm of patients. Further development of the project involves the selection of the most effective machine learning algorithm, testing of this algorithm for the two-class problem, and expansion of the solution for other classes of rhythm disorders. Additionally, it is possible to improve classification results for the three-class problem by using a superior model and introducing additional clustering.