Heartbeats Classification Using Hybrid Time-Frequency Analysis and Transfer Learning Based on ResNet

Yatao Zhang,Junyan Li,Shoushui Wei,Fengyu Zhou,Dong Li
DOI: https://doi.org/10.1109/jbhi.2021.3085318
IF: 7.7
2021-11-01
IEEE Journal of Biomedical and Health Informatics
Abstract:The classification of heartbeats is an important method for cardiac arrhythmia analysis. This study proposes a novel heartbeat classification method using hybrid time-frequency analysis and transfer learning based on ResNet-101. The proposed method has the following major advantages over the afore-mentioned methods: it avoids the need for manual features extraction in the traditional machine learning method, and it utilizes 2-D time-frequency diagrams which provide not only frequency and energy information but also preserve the morphological characteristic within the ECG recordings, and it owns enough deep to make better use of performance of CNN. The method deploys a hybrid time-frequency analysis of the Hilbert transform (HT) and the Wigner-Ville distribution (WVD) to transform 1-D ECG recordings into 2-D time-frequency diagrams which were then fed into a transfer learning classifier based on ResNet-101 for two classification tasks (i.e., 5 heartbeat categories assigned by the ANSI/AAMI standard (i.e., N, V, S, Q and F) and 14 original beat kinds of the MIT/BIH arrhythmia database). For 5 heartbeat categories classification, the results show the F1-score of N, V, S, Q and F categories are F <sub>N</sub> 0.9899, F <sub>V</sub> 0.9845, F <sub>S</sub> 0.9376, F <sub>Q</sub> 0.9968, F <sub>F</sub> 0.8889, respectively, and the overall F1-score is 0.9595 using the combination data balancing. The results show the average values for accuracy, sensitivity, specificity, predictive value and F1-score on test set for 14 beat kinds the MIT-BIH arrhythmia database are 99.75%, 91.36%, 99.85%, 90.81% and 0.9016, respectively. Compared with other methods, the proposed method can yield more accurate results.
computer science, interdisciplinary applications,mathematical & computational biology,medical informatics, information systems
What problem does this paper attempt to address?
This paper attempts to address the problem of heartbeat classification in electrocardiogram (ECG) signals. Specifically, the paper proposes a new heartbeat classification method that combines hybrid time-frequency analysis and transfer learning techniques based on ResNet-101. The main contributions and advantages of the paper are as follows: 1. **Avoiding manual feature extraction**: Compared to traditional machine learning methods, this method does not require manual feature extraction, thus simplifying the preprocessing steps. 2. **Preserving morphological features**: By converting one-dimensional ECG recordings into two-dimensional time-frequency images, this method not only provides frequency and energy information but also preserves the morphological features in the ECG recordings. 3. **Leveraging the advantages of deep networks**: Using deep convolutional neural networks (CNNs), particularly ResNet-101, can better utilize the network's performance. ### Method Overview 1. **Data Preprocessing**: - Denoising: Remove 50/60 Hz power line noise, muscle artifacts, and baseline wander (BW). - Heartbeat extraction: Use an R-wave detection algorithm to identify R-wave positions and segment heartbeats into 250-point segments. - Data balancing: Balance the number of samples in different categories through random oversampling and a combination of oversampling and undersampling methods. 2. **Hybrid Time-Frequency Analysis**: - Use Hilbert Transform (HT) to convert the original ECG signal into an analytic signal to reduce cross-terms and concentrate energy. - Use Wigner-Ville Distribution (WVD) to generate corresponding two-dimensional time-frequency images. 3. **Transfer Learning**: - Perform transfer learning based on ResNet-101 pre-trained on ImageNet, modifying the last three layers to adapt to the heartbeat classification task. - Validate the performance of the trained model using 5-fold cross-validation. ### Experimental Results - **Five-class heartbeat classification**: For the five classes of heartbeats defined by the ANSI/AAMI standard (N, V, S, Q, F), the F1 scores of the classification results are 0.9899, 0.9845, 0.9376, 0.9968, 0.8889, with an overall F1 score of 0.9595. - **Fourteen-class heartbeat classification**: For the 14 original heartbeat classes in the MIT/BIH arrhythmia database, the average accuracy, sensitivity, specificity, and F1 score on the test set are 99.75%, 91.36%, 99.85%, 90.81%, and 0.9016, respectively. ### Conclusion Compared to existing methods, the proposed method in this paper demonstrates higher accuracy in the heartbeat classification task. By combining hybrid time-frequency analysis and transfer learning based on ResNet-101, this method not only improves classification performance but also simplifies the feature extraction process, preserving more signal information.