Skip to main content

Package for detecting QRS in a ECG signal.

Project description

QRS_Detector

QRS_Detector is a Python module for detecting QRS complexes on an electrocardiogram (ECG) and distributed under the Eclipse Public License (EPL).

The development of this library started in February 2024 as part of Aura Healthcare project, in OCTO Technology R&D team.

alt text alt text

Website : https://www.aura.healthcare

Github : https://github.com/Aura-healthcare

Version : 1.0.0

Installation / Prerequisites

User installation

The easiest way to install QRS_Detector is using pip :

$ pip install QRS_Detector

you can also clone the repository:

$ git clone https://github.com/Genialmanos/QRS_Detector.git
$ python setup.py install

Dependencies

QRS_Detector requires the following:

  • Python (>= 3.6)
  • numpy >= 1.16.0
  • scipy >= 1.2.0
  • matplotlib >= 3.3.4

Note: The package can be used with all Python versions from 3.6 to latest version (currently Python 3.11).

Getting started

QRS detection

This package provides methods to detect QRS complexes on an electrocardiogram (ECG) like MIT-BIH-Arrhythmia.

from QRS_Detector import qrs_detector

qrs = qrs_detector(signal, frequence_sampling)

Plot functions

from Print_QRS import print_signal_with_qrs
# Basic usage
print_signal_with_qrs(signal, qrs_predicted)

# Full usage with all parameters
print_signal_with_qrs(signal, qrs_predicted, true_qrs=labeled_qrs, mini=10000, maxi=15000, description="QRS between frames 10000 and 15000")

Parameters:

  • signal (list or numpy array): The 1D array of signal values (e.g., ECG signal data).
  • qrs_predicted (list of integers): Indices of the signal where QRS complexes are predicted.
  • true_qrs (list of integers, optional): Indices of the signal where QRS complexes are actually located (true labels). Default is an empty list.
  • mini (int, optional): The starting index of the segment of the signal to be plotted. Default is 0.
  • maxi (int, optional): The ending index of the segment of the signal to be plotted. If set to 1, the function plots up to the end of the signal. Default is 1.
  • description (str, optional): A description or title for the plot. Default is an empty string.

Quality control and performances

This algorithm uses a benchmark previously made by Aura. It compares different public libraries in terms of accuracy on 5 public datasets. This algorithm achieves better results in terms of accuracy, as well as efficiency. Compared with the best of the algorithms tested, this algorithm achieves better results with an average time 5 times shorter. TODO

References

Here are the main references used to made this algorithm:

Zidelmal, Z., Amirou, A., Adnane, M., & Belouchrani, A. (2012). QRS detection based on wavelet coefficients. Computer Methods And Programs In Biomedicine, 107(3), 490‑496. https://doi.org/10.1016/j.cmpb.2011.12.004

Lu, X., Pan, M., & Yu, Y. (2018). QRS detection based on improved adaptive threshold. Journal Of Healthcare Engineering, 2018, 1‑8. https://doi.org/10.1155/2018/5694595

Modak, S., Abdel-Raheem, E., & Taha, L. Y. (2021). A novel adaptive multilevel thresholding based algorithm for QRS detection. Biomedical Engineering Advances, 2, 100016. https://doi.org/10.1016/j.bea.2021.100016

M. Šarlija, F. Jurišić and S. Popović (2017). "A convolutional neural network based approach to QRS detection," Proceedings of the 10th International Symposium on Image and Signal Processing and Analysis,121-125 https://doi.org/10.1109/ISPA.2017.8073581

Authors

Jean-Charles Fournier - (https://github.com/Genialmanos)

License

This project is licensed under the Eclipse Public License - v 2.0 - see the LICENSE.md file for details

How to contribute

Please refer to How To Contribute

Acknowledgments

I hereby thank Clément Le Couedic and Fabien Peigné, my coworkers who gave me time to Open Source this library.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fast_qrs_detector-0.1.0.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fast_qrs_detector-0.1.0-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file fast_qrs_detector-0.1.0.tar.gz.

File metadata

  • Download URL: fast_qrs_detector-0.1.0.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.6

File hashes

Hashes for fast_qrs_detector-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fd22fd1f1a99d8304b10cf2fb8747bdb54b9a64e62ba79daa6c6446575c87dfb
MD5 e77456b54ccc26c88af7c987dae04bc9
BLAKE2b-256 0afa5ac663edcf5e4981ebcf6ba9f8a9e183a1f093ff03922133e1841785b21d

See more details on using hashes here.

File details

Details for the file fast_qrs_detector-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for fast_qrs_detector-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b25e685b002ddb6ce649beae029f6d12f3538ec8376464976d109d4d732a5286
MD5 ba11a542cb05928d09ed8e0158db138e
BLAKE2b-256 174c69e6d3bf76c09e970a2d6524fbb91d351ee8a60549823cd2703d05646f9d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page