Internship Report
Comparison of R-Peak and T-Peak Detection Between Scipy and Neurokit2 Library Using Python
Cardiovascular disease (CVD) has been a big problem all over the world, since it has been the
main cause of death with stroke and heart attack accounting for 85% of all deaths. With the emergence
of CVD, portable electrocardiograms to measure the electrocardiography (ECG) signal remotely.
However, the doctors would not be able to supervise it for 24 hours straight, which is why an algorithm
to analyze the ECG signal is needed. This project develops the algorithm for R and T peaks detection on
normal wave activity using two different libraries, which are the SciPy and NeuroKit2 library to examine
which one is more suitable for peaks detection. The peaks detection validation results using SciPy were
100% accuracy and 99.82% precision for the R peak, while 99.39% accuracy and 98.84% precision for the
T peak. For the NeuroKit2 peaks detection, 99.78% accuracy and 99.48% precision for the R peak, while
100% accuracy and 99.77% precision for the T peak. The slight difference in accuracy and precision does
not signify if any of the library is better than the other. However, NeuroKit2 library would be a much
better library for peak detections as it could work in nearly every ECG data unlike the SciPy library.
No other version available