Abstract

Objective. Electrocardiography is a common method for screening cardiovascular diseases. Accurate heartbeat classification assists in diagnosis and has attracted great attention. In this paper, we proposed an automatic heartbeat classification method based on a transformer neural network using a self-attention mechanism. Approach. An adaptive heartbeat segmentation method was designed to selectively focus on the time-dependent representation of heartbeats. A one-dimensional convolution layer was used to embed wave characteristics into symbolic representations, and then, a transformer block using multi-head attention was applied to deal with the dependence of wave-embedding. The model was trained and evaluated using the MIT-BIH arrhythmia database (MIT-DB). To improve the model performance, the model pre-trained on MIT-BIH supraventricular arrhythmia database (MIT-SVDB) was used and fine-tuned on MIT-DB. Main results. The proposed method was verified using the MIT-DB for two groups. In the first group, our method attained F1 scores of 0.86 and 0.96 for the supraventricular ectopic beat class and ventricular ectopic beat class, respectively. In the second group, our method achieved an average F1 value of 99.83% and better results than other state-of-the-art methods. Significance. We proposed a novel heartbeat classification method based on a transformer model. This method provides a new solution for real-time electrocardiogram heartbeat classification, which can be applied to wearable devices

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call