# P-Wave Detection Using a Fully Convolutional Neural Network in Electrocardiogram Images
## 5 Conclusions  
Automatic analysis of an ECG signal delivers important information for diagnosis to medical experts. The MIT-BIH AF database is considered a challenging ECG database, as it contains various types of ECG signals. To our knowledge, this paper is the first to manually annotate P-waves in the MIT-BIH AF database. In addition, it is the first to develop an efficient automated algorithm to detect the absence or presence of the different shapes of P-waves using a fully convolutional neural network model (U-Net). This automated algorithm works on 2D images of printed ECGs without the need for its digitization.  
The proposed automatic P-wave detection method achieved an accuracy and sensitivity of 98.56 and 98.78%, respectively, over the first 5 min of Lead II of the MIT-BIH AF database (a total of 8280  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Publication**} & \multirow{2}{*}{**Method**} & \multirow{2}{*}{**\# Beats**} &
\begin{tabular}{c} **Annotation** \\ **(File Name)** \\ \end{tabular} & \multirow{2}{*}{**SE [\%]**} & \multicolumn{2}{c}{**Accuracy**} & \multirow{2}{*}{**+P [\%]**} \\ \cline{1-1} \cline{5-5}  & & & & & **1** \\ \hline
**Proposed Algorithm** & U-Net & 3194 & Manual.(q1c) & 97.24 & 98.9 & 97.22 \\
**[PERSON] et al. [35]** & Wavelets & 3194 & Manual.(q1c) & 98.87 & N/R & 91.03 \\
**[PERSON] et al. [39]** & Low-pass & 3194 & Manual.(q1c) & 97.70 & N/R & 91.17 \\
**[PERSON] [37]** & Wavelets & 3194 & Manual.(q1c) & 100 & N/R & 88.15 \\
**[PERSON] [40]** & Differential & 3194 & Manual.(q1c) & 98.9 & 98.5 & N/R \\
**[PERSON] [44]** & ConvNet & 3194 & Manual.(q1c) & N/R & 96.2 & N/R \\ \hline \hline \end{tabular}
\end{table}
Table 6: P-wave detection performance comparison on the manual annotated QT database. [N/R: not reported].  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Record** & **TP** & **FP** & **FN** & **SE (\%)** & **+P (\%)** \\ \hline
**Sel43** & 8 & 1 & 0 & 100 & 88.8 \\
**Sel44** & 8 & 0 & 0 & 100 & 100 \\
**Sel45** & 8 & 0 & 0 & 100 & 100 \\
**Sel46** & 8 & 0 & 0 & 100 & 100 \\
**Sel47** & 10 & 0 & 0 & 100 & 100 \\
**Sel48** & 10 & 0 & 0 & 100 & 100 \\
**Sel49** & 10 & 0 & 0 & 100 & 100 \\
**Sel51** & 9 & 0 & 1 & 90 & 100 \\
**Sel52** & 10 & 0 & 0 & 100 & 100 \\
**Sel17152** & 10 & 0 & 0 & 100 & 100 \\
**Sel14046** & 10 & 0 & 1 & 91 & 100 \\
**Sel14157** & 10 & 0 & 0 & 100 & 100 \\
**Sel14172** & 16 & 0 & 0 & 100 & 100 \\
**Sel15814** & 10 & 0 & 0 & 100 & 100 \\ \hline \hline  & 1027 & 31 & 32 & 97.24 & 97.22 \\ \hline \hline \end{tabular}
\end{table}
Table 5: _Cont._beats). Moreover, the proposed method was validated using the well-known automatically and manually annotated QT database. This resulted in accuracies of 98.98 and 98.9% and sensitivities of 98.97 and 97.24% for the automatically and manually annotated QT database, respectively. Thus, this indicates that the results are promising, as this image-based approach can be applied in analyzing old ECG records when only printed versions are available. It also stands as a benchmark for testing and validation purposes. This study also provides a positive proof of concept for detecting P-waves in abnormal ECG beats with atrial disorders using a small amount of training data. However, further generalization is required to detect QRS complexes and T-waves.  
The following are available online at [[http://www.mdpi.com/2076-3417/10/3/976/s1](http://www.mdpi.com/2076-3417/10/3/976/s1)]([http://www.mdpi.com/2076-3417/10/3/976/s1](http://www.mdpi.com/2076-3417/10/3/976/s1)).  
Methodology, R.N.C., S.M.G., M.S.E.-M. and M.W.F.; Software, R.N.C. and M.W.F. Supervision, S.M.G., M.S.E.-M. and M.W.F.; Validation, S.M.G.; Visualization, S.Y.M.; Writing--original draft, R.N.C.; Writing--review & editing, S.M.G. and M.S.E.-M. All authors have read and agreed to the published version of the manuscript.  
This research received no external funding.  
The authors declare no conflict of interest.