Implementation is based on paper A moving average based filtering system with its application to real-time QRS detection [1].
Report: here
Download MIT-BIH database [2]
$ cd data
$ wget -r -N -c -np https://physionet.org/files/mitdb/1.0.0/
Convert database to MATLAB format
$ ./convert2mat.sh
Convert MATLAB detections to qrs format
$ ./convert2qrs.sh
Evaluate results
$ ./evaluate.sh