qrsdel

Algoritmo para a delineación de QRS sobre sinais de ECG

qrsdel

This project provides the implementation of a noise robust multi-lead QRS delineation algorithm on ECG signals. A full description of the algorithm is detailed in this paper presented in the 2015 Computing in Cardiology conference. It is recommended to be familiar with the WFDB software package in order to fully exploit this package.

Algorithm Evaluation

The project also includes some utilities to evaluate the robustness of the algorithm. The generate_nsqtdb.py script allows to generate a new database from the Physionet QT database by adding different amounts of electrode motion noise to each record, by following these steps:

  1. Download the full QT database to a new directory, and also copy the em_250

record that can be found in the records directory.

  1. Modify the generate_nsqtdb.py script to set DB_DIR variable to the path

to the directory where the database has been downloaded.

  1. Run python generate_nsqtdb.py in order to generate the new records.

Once the database has been generated and qrsdel has been executed with each record, the error_measurements.py module can be used to generate a markdown report with the mean error and standard deviation of the QRS delineation in each record. Following we show an example of one of such reports, obtained from the original records of the QT database.

Distances table

RecordSeQRS Onset (ms)QRS Peak (ms)QRS Offset (ms)
sel1001.006.00 ± 15.24-10.80 ± 2.10-2.13 ± 6.67
sel1020.9944.86 ± 24.70-41.43 ± 24.01-48.33 ± 59.78
sel1031.0020.40 ± 7.96-2.93 ± 3.71-1.07 ± 9.23
sel1041.0024.36 ± 17.83-29.19 ± 22.59-7.27 ± 21.55
sel1141.009.84 ± 15.50-1.44 ± 1.92-7.20 ± 14.49
sel1161.009.04 ± 13.24-11.68 ± 1.93-0.48 ± 15.77
sel1171.0011.60 ± 9.54-10.00 ± 3.390.80 ± 11.79
sel1231.0015.87 ± 16.18-6.67 ± 2.398.40 ± 13.52
sel140461.006.84 ± 7.55-10.06 ± 3.190.52 ± 5.63
sel141571.0016.67 ± 15.73-17.73 ± 4.58-2.27 ± 7.98
sel141721.0017.04 ± 13.45-19.68 ± 13.76-0.48 ± 6.82
sel158141.0017.07 ± 13.10-4.13 ± 7.41-22.53 ± 34.06
sel162651.0010.00 ± 11.21-7.60 ± 2.399.73 ± 10.21
sel162721.00-4.00 ± 11.78-4.27 ± 2.523.87 ± 8.42
sel162731.00-4.27 ± 18.12-12.80 ± 6.653.07 ± 8.18
sel164201.0012.93 ± 6.59-1.73 ± 4.090.80 ± 7.11
sel164831.0015.33 ± 9.86-9.87 ± 2.477.73 ± 8.26
sel165391.008.40 ± 7.11-6.27 ± 5.903.33 ± 5.37
sel167731.0020.80 ± 10.45-10.27 ± 3.047.07 ± 7.84
sel167861.00-9.07 ± 16.65-17.60 ± 2.44-0.53 ± 9.45
sel167951.008.00 ± 8.82-19.73 ± 3.571.20 ± 8.83
sel171521.0017.73 ± 7.643.47 ± 3.22-3.33 ± 12.99
sel174531.0010.00 ± 8.63-16.27 ± 3.266.27 ± 8.98
sel2131.0022.25 ± 14.55-16.28 ± 11.988.73 ± 8.18
sel2211.000.40 ± 16.76-7.73 ± 4.495.33 ± 15.64
sel2231.0010.32 ± 17.62-0.65 ± 1.7927.87 ± 15.26
sel2301.0012.32 ± 12.05-12.16 ± 3.838.88 ± 7.26
sel2311.00-11.44 ± 16.14-13.04 ± 5.655.52 ± 17.71
sel2321.0010.53 ± 9.092.13 ± 2.00-54.67 ± 39.70
sel2331.0010.40 ± 11.01-5.73 ± 3.682.00 ± 8.69
sel301.00-0.93 ± 19.51-9.20 ± 1.83-14.40 ± 8.62
sel3011.0011.33 ± 8.20-4.40 ± 2.158.27 ± 7.08
sel3021.0017.73 ± 5.23-6.13 ± 2.47-1.07 ± 7.79
sel3061.002.56 ± 14.55-11.78 ± 3.993.11 ± 7.61
sel3071.0014.67 ± 6.23-6.00 ± 2.006.27 ± 6.51
sel3081.0013.52 ± 15.39-48.24 ± 8.673.12 ± 10.25
sel311.0016.40 ± 21.00-12.00 ± 2.31-9.60 ± 6.08
sel3101.0019.87 ± 5.11-9.60 ± 1.960.67 ± 7.24
sel321.008.53 ± 13.77-11.60 ± 4.54-3.60 ± 10.03
sel331.0024.67 ± 3.11-10.80 ± 3.60-16.53 ± 14.23
sel341.0019.73 ± 4.95-10.00 ± 2.00-40.40 ± 6.88
sel351.0012.90 ± 13.51-10.71 ± 2.36-7.48 ± 7.09
sel361.0015.74 ± 10.56-9.42 ± 2.39-61.29 ± 38.51
sel371.0018.08 ± 16.86-7.68 ± 8.68-7.12 ± 12.83
sel381.0032.27 ± 11.7724.00 ± 6.20-16.27 ± 9.74
sel391.004.93 ± 6.42-17.20 ± 4.75-25.73 ± 28.16
sel401.0020.80 ± 11.61-12.13 ± 2.19-6.13 ± 8.56
sel411.0017.47 ± 6.81-7.60 ± 1.58-2.53 ± 9.77
sel421.0043.47 ± 5.91-12.40 ± 10.75-6.40 ± 5.23
sel431.0057.20 ± 13.15-3.73 ± 5.56-0.27 ± 5.26
sel441.0033.47 ± 29.64-10.13 ± 2.00-28.67 ± 23.03
sel451.0022.67 ± 5.78-11.60 ± 1.89-6.27 ± 8.93
sel461.005.07 ± 17.34-18.53 ± 8.67-2.80 ± 5.38
sel471.0024.67 ± 16.75-12.00 ± 3.10-13.87 ± 16.58
sel481.0017.73 ± 12.51-13.33 ± 1.89-22.13 ± 15.86
sel491.0015.47 ± 5.03-5.73 ± 1.98-11.60 ± 10.65
sel501.0015.62 ± 16.62-8.88 ± 3.57-4.25 ± 14.03
sel511.0010.93 ± 5.05-1.20 ± 1.83-20.00 ± 7.45
sel521.00-1.87 ± 21.48-8.00 ± 2.53-8.67 ± 12.61
sel8031.0012.00 ± 7.93-3.73 ± 2.298.67 ± 13.15
sel8081.003.87 ± 8.67-27.73 ± 3.991.20 ± 7.88
sel8111.0013.47 ± 14.22-4.80 ± 2.406.67 ± 18.48
sel8201.00-0.27 ± 13.14-10.00 ± 2.2510.40 ± 9.44
sel8211.006.13 ± 7.28-8.93 ± 3.384.93 ± 4.09
sel8401.009.26 ± 4.56-12.06 ± 5.728.00 ± 6.34
sel8471.004.36 ± 13.41-8.97 ± 3.942.91 ± 6.70
sel8531.00-0.67 ± 16.82-17.47 ± 2.637.20 ± 5.69
sel8711.0032.69 ± 9.27-29.60 ± 9.063.60 ± 5.82
sel8721.0015.20 ± 7.19-4.53 ± 2.2510.93 ± 6.10
sel8731.0012.97 ± 5.83-7.27 ± 5.954.36 ± 6.56
sel8831.0010.13 ± 14.92-6.40 ± 3.206.27 ± 15.75
sel8911.005.75 ± 15.13-19.32 ± 2.51-3.61 ± 18.79
sele01041.0016.40 ± 4.77-11.73 ± 2.299.73 ± 7.84
sele01061.0020.53 ± 4.47-5.07 ± 9.8511.73 ± 4.73
sele01071.0017.06 ± 11.24-6.59 ± 3.202.47 ± 5.74
sele01101.008.93 ± 4.70-13.47 ± 7.123.20 ± 4.78
sele01111.007.60 ± 7.11-10.53 ± 3.507.20 ± 17.26
sele01121.0016.40 ± 10.62-10.24 ± 3.6819.36 ± 8.37
sele01141.0013.87 ± 10.11-6.53 ± 2.4210.13 ± 9.45
sele01161.002.13 ± 16.77-6.00 ± 3.39-18.13 ± 25.77
sele01211.007.07 ± 5.03-3.87 ± 1.6314.93 ± 8.06
sele01221.0011.33 ± 4.51-9.73 ± 1.9816.27 ± 7.72
sele01241.007.04 ± 8.96-5.76 ± 4.743.28 ± 11.99
sele01261.0011.73 ± 7.65-1.60 ± 4.808.80 ± 10.65
sele01291.00-10.27 ± 19.67-22.80 ± 3.1214.27 ± 7.84
sele01331.004.00 ± 20.16-24.67 ± 3.1113.33 ± 7.96
sele01361.0018.93 ± 5.46-6.00 ± 2.689.47 ± 7.04
sele01661.00-29.78 ± 13.15-11.67 ± 7.20-0.44 ± 16.43
sele01701.009.87 ± 5.91-3.87 ± 0.726.93 ± 3.26
sele02031.0011.33 ± 7.87-5.33 ± 2.152.67 ± 8.78
sele02101.0017.73 ± 7.64-6.00 ± 2.002.93 ± 12.00
sele02111.009.60 ± 18.11-5.07 ± 2.058.53 ± 8.87
sele03031.0014.27 ± 4.70-2.13 ± 2.6812.40 ± 8.54
sele04051.00-2.13 ± 10.26-12.80 ± 2.172.67 ± 10.03
sele04061.005.29 ± 13.95-5.68 ± 3.014.26 ± 3.79
sele04091.0012.00 ± 6.28-3.73 ± 1.440.40 ± 5.69
sele04111.007.20 ± 6.23-6.53 ± 2.193.60 ± 12.58
sele05091.006.27 ± 4.58-6.13 ± 2.00-34.13 ± 5.34
sele06031.006.53 ± 13.72-10.80 ± 2.951.20 ± 15.18
sele06041.008.53 ± 6.09-15.33 ± 7.247.87 ± 10.46
sele06061.0016.93 ± 6.59-6.13 ± 2.00-26.80 ± 4.64
sele06071.0022.40 ± 14.03-23.07 ± 1.694.80 ± 6.88
sele06091.0021.87 ± 11.401.60 ± 1.9611.07 ± 12.12
sele06121.0013.47 ± 14.51-6.00 ± 2.25-0.93 ± 11.99
sele07041.0011.60 ± 9.08-20.27 ± 4.84-84.53 ± 12.76
Total:1.0013.09 ± 17.48-11.47 ± 12.01-2.41 ± 22.34