| Literature DB >> 32290113 |
Chaur-Heh Hsieh1, Yan-Shuo Li2, Bor-Jiunn Hwang2, Ching-Hua Hsiao2.
Abstract
The automatic detection of atrial fibrillation (AF) is crucial for its association with the risk of embolic stroke. Most of the existing AF detection methods usually convert 1D time-series electrocardiogram (ECG) signal into 2D spectrogram to train a complex AF detection system, which results in heavy training computation and high implementation cost. This paper proposes an AF detection method based on an end-to-end 1D convolutional neural network (CNN) architecture to raise the detection accuracy and reduce network complexity. By investigating the impact of major components of a convolutional block on detection accuracy and using grid search to obtain optimal hyperparameters of the CNN, we develop a simple, yet effective 1D CNN. Since the dataset provided by PhysioNet Challenge 2017 contains ECG recordings with different lengths, we also propose a length normalization algorithm to generate equal-length records to meet the requirement of CNN. Experimental results and analysis indicate that our method of 1D CNN achieves an average F1 score of 78.2%, which has better detection accuracy with lower network complexity, as compared with the existing deep learning-based methods.Entities:
Keywords: atrial fibrillation (AF); convolutional neural network (CNN); deep learning; electrocardiogram (ECG)
Mesh:
Year: 2020 PMID: 32290113 PMCID: PMC7180882 DOI: 10.3390/s20072136
Source DB: PubMed Journal: Sensors (Basel) ISSN: 1424-8220 Impact factor: 3.576
Figure 1Electrocardiogram.
Figure 2Flowchart of the proposed atrial fibrillation (AF) detection method. ECG: electrocardiogram; CNN: convolutional neural network.
Figure 3Data length histogram distribution.
Parameters of each layer of proposed 1D convolutional neural network (CNN).
| Layers | Parameters | Activation |
|---|---|---|
| Conv1D | Filter 32/kernel 5 | ReLU |
| BN | ||
| Maxpooling | 2 | |
| Conv1D | Filter 32/kernel 5 | ReLU |
| Maxpooling | 2 | |
| Conv1D | Filter 64/kernel 5 | ReLU |
| Maxpooling | 2 | |
| Conv1D | Filter 64/kernel 5 | ReLU |
| Maxpooling | 2 | |
| Conv1D | Filter 128/kernel 5 | ReLU |
| Maxpooling | 2 | |
| Conv1D | Filter 128/kernel 5 | ReLU |
| Maxpooling | 2 | |
| Dropout | 0.5 | |
| Conv1D | Filter 256/kernel 5 | ReLU |
| Maxpooling | 2 | |
| Conv1D | Filter 256/kernel 5 | ReLU |
| Maxpooling | 2 | |
| Dropout | 0.5 | |
| Conv1D | Filter 512/kernel 5 | ReLU |
| Maxpooling | 2 | |
| Dropout | 0.5 | |
| Conv1D | Filter 512/kernel 5 | ReLU |
| Flatten | ||
| Dense | 128 | ReLU |
| Dropout | 0.5 | |
| Dense | 32 | ReLU |
| Dense | 4 | Softmax |
Figure 4ECG examples of four classes: Normal, AF, Other, and Noisy.
Confusion matrix of four classes.
| Ground Truth | |||||
|---|---|---|---|---|---|
| AF | Normal | Noisy | Other | ||
|
| AF (a) |
|
|
|
|
| Normal |
|
|
|
| |
| Noisy |
|
|
|
| |
| Other |
|
|
|
| |
Confusion matrix of two classes.
| Ground Truth | |||
|---|---|---|---|
| AF (A) | Non-AF | ||
|
| AF (a) |
|
|
| Non-AF |
|
| |
F1 scores using different train/test ratio.
| Train/Test | AF | Normal | Noisy | Other | Average |
|---|---|---|---|---|---|
| 60:40 | 72.0 | 90.0 | 60.0 | 69.0 | 72.75 |
| 70:30 | 76.0 | 90.0 | 60.0 | 70.0 | 74.00 |
| 80:20 | 77.0 | 89.0 | 67.0 | 74.0 | 76.75 |
| 90:10 | 76.9 | 90.0 | 62.1 | 72.8 | 75.45 |
The best average F1 under various combinations of hyperparameters.
| Layer | Kernel Size | Batch Size | Learning Rate | Average | σ | Total Number of Parameters |
|---|---|---|---|---|---|---|
| 8 | 3 | 50 | 0.001 | 69.4 | 12.5 | 2,558,340 |
| 5 | 50 | 0.001 | 72.2 | 12.9 | 2,687,428 | |
| 7 | 70 | 0.0005 | 73.6 | 11.4 | 2,816,516 | |
| 9 | 3 | 50 | 0.001 | 76.6 | 9.6 | 1,608,324 |
| 5 | 50 | 0.0001 | 77.2 | 9.9 | 1,868,484 | |
| 7 | 30 | 0.0005 | 76.8 | 11.4 | 2,128,644 | |
| 10 | 3 | 90 | 0.0005 | 77.0 | 9.4 | 2,428,292 |
| 5 | 30 | 0.0001 | 77.8 | 9.1 | 3,212,740 | |
| 7 | 50 | 0.001 | 76.4 | 10.6 | 3,997,188 | |
| 11 | 3 | 50 | 0.0005 | 77.1 | 9.9 | 2,625,412 |
| 5 | N/A | N/A | N/A | N/A | N/A | |
| 7 | N/A | N/A | N/A | N/A | N/A |
Figure 5Normalized average confusion matrix of five folds.
Figure 6AF record which is misclassified as other.
Average F1 scores of proposed networks and their variants.
| Neural Networks | Average | Total Number of Parameters |
|---|---|---|
| Proposed-1 | 77.8 | 3,212,740 |
| All-BN | 69.2 | 3,216,644 |
| No-BN | 76.2 | 3,212,676 |
| Maxpooling | 67.7 | 2,885,060 |
| Max-Average pooling | 75.6 | 2,885,060 |
| Proposed-2 | 78.2 | 3,212,740 |
| Extra-Average | 77.4 | 2,885,060 |
Figure 7Training accuracy of All-BN.
Figure 8Training accuracy of No-BN.
Training parameters of the proposed 1D CNN.
| Layer Type | Output Shape | Parameters |
|---|---|---|
| Conv1D | 8996 × 32 | 192 |
| Batch Normalization | 8996 × 32 | 128 |
| Conv1D | 4494 × 32 | 5152 |
| Conv1D | 2243 × 64 | 10,304 |
| Conv1D | 1117 × 64 | 20,544 |
| Conv1D | 554 × 128 | 41,088 |
| Conv1D | 273 × 128 | 82,048 |
| Conv1D | 132 × 256 | 164,096 |
| Conv1D | 62 × 256 | 327,936 |
| Conv1D | 27 × 512 | 655,872 |
| Conv1D | 9 × 512 | 1,311,232 |
| Dense | 128 | 589,952 |
| Dense | 32 | 4128 |
| Dense | 4 | 132 |
| Total number of network training parameters: 3,212,740 | ||
Comparison of prediction accuracy of various methods.
| Methods | AF (A) | Normal (N) | Noisy (~) | Other (O) |
|---|---|---|---|---|
| Proposed-1 | 79.1 | 90.7 | 65.3 | 76.0 |
| Proposed-2 | 80.8 | 90.4 | 66.2 | 75.3 |
| CRNN | 76.4 | 88.8 | 64.5 | 72.6 |
| ResNet-1 | 65.7 | 90.2 | 64.0 | 69.8 |
| ResNet-2 | 67.7 | 88.5 | 65.6 | 66.6 |
| CL3-I | 76.0 | 90.1 | 47.1 | 75.2 |
Comparison of average F1 score and total number of parameters of various methods.
| Methods | Average | Average | Total Number of Parameters |
|---|---|---|---|
| Proposed-1 | 77.8 | 81.9 | 3,212,740 |
| Proposed-2 | 78.2 | 82.2 | 3,212,740 |
| CRNN | 75.6 | 79.3 | 10,149,440 |
| ResNet-1 | 72.4 | 75.2 | 10,466,148 |
| ResNet-2 | 72.1 | 74.3 | 1,219,508 |
| CL3-I | 72.1 | 80.4 | 206,334 |