Aiming at the deficiencies of insufficient cross-domain generalization and poor rhythm sensitivity in atrial fibrillation (AF) detection from multi-lead electrocardiogram (ECG) signals, this paper proposes a novel AF detection algorithm based on multi-scale patch attention fusion. The method segmented ECG signals into overlapping temporal fragments of different scales to capture local waveform details and long-range rhythm patterns respectively; it fused cross-scale feature information through a multi-scale attention mechanism to strengthen the model’s ability to perceive local and global rhythm features, and introduced the self-attention mechanism of Transformer to capture long-range rhythm correlations among fragments, thus realizing in-depth mining of ECG features. The algorithm was validated on the public CinC2021 dataset and the self-constructed clinical Clin-ECG dataset. Experimental results showed that the algorithm achieved an accuracy of 94.6% and 92.7% on the two datasets, with F1 scores reaching 0.945 and 0.923, respectively. Compared with baseline models such as ECG-ResNet and CNN-BiLSTM, the proposed algorithm exhibited higher accuracy and better cross-dataset generalization ability, providing an effective method for the automatic detection of AF from multi-lead ECG signals.
The dynamic electrocardiogram (ECG) collected by wearable devices is often corrupted by motion interference due to human activities. The frequency of the interference and the frequency of the ECG signal overlap with each other, which distorts and deforms the ECG signal, and then affects the accuracy of heart rate detection. In this paper, a heart rate detection method that using coarse graining technique was proposed. First, the ECG signal was preprocessed to remove the baseline drift and the high-frequency interference. Second, the motion-related high amplitude interference exceeding the preset threshold was suppressed by signal compression method. Third, the signal was coarse-grained by adaptive peak dilation and waveform reconstruction. Heart rate was calculated based on the frequency spectrum obtained from fast Fourier transformation. The performance of the method was compared with a wavelet transform based QRS feature extraction algorithm using ECG collected from 30 volunteers at rest and in different motion states. The results showed that the correlation coefficient between the calculated heart rate and the standard heart rate was 0.999, which was higher than the result of the wavelet transform method (r = 0.971). The accuracy of the proposed method was significantly higher than the wavelet transform method in all states, including resting (99.95% vs. 99.14%, P < 0.01), walking (100% vs. 97.26%, P < 0.01) and running (100% vs. 90.89%, P < 0.01). The absolute error [0 (0, 1) vs. 1 (0, 1), P < 0.05] and relative error [0 (0, 0.59) vs. 0.52 (0, 0.72), P < 0.05] of the proposed method were significantly lower than the wavelet transform method during running state. The method presented in this paper shows high accuracy and strong anti-interference ability, and is potentially used in wearable devices to realize real-time continuous heart rate monitoring in daily activities and exercise conditions.
Accurate neurological outcome assessment after cardiac arrest is critical for clinical diagnosis and treatment. Existing electroencephalogram (EEG) prediction models suffer from high computational complexity, redundant full-channel data, and insufficient fusion of time-frequency domain features. This study proposes a lightweight deep learning model, WaveConv-SR-RepVGG, based on adaptive time-frequency feature fusion and reparameterized convolution. Taking the reparameterized visual convolutional network (RepVGG) as the baseline framework, the model introduces a shrinkage (SR) mechanism into the time-domain branch to suppress interference from low signal-to-noise ratio EEG signals. A multi-scale wavelet convolution (MS-Conv) module is constructed to extract multi-scale spectral features, and time-frequency features are fused to form joint representations for prognostic classification. Experiments were conducted on the PhysioNet 2023 dataset. Under the 18-channel setting, the model achieved an accuracy of 81.7%, an F1 score of 86.1%, and an AUC of 0.847. Under the 4-channel setting, the accuracy reached 81.2%, the F1 score reached 86.7%, and the AUC reached 0.877, with overall performance outperforming various mainstream deep learning algorithms. The proposed model enables neurological outcome prediction for patients after cardiac arrest and maintains stable and excellent classification performance with fewer EEG acquisition channels.