Skip to main content

Package for detecting QRS in a ECG signal.

Project description

Fast QRS detector

Fast 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 : 0.1.1

Installation / Prerequisites

User installation

The easiest way to install fast QRS detector is using pip :

$ pip install fast_qrs_detector

Dependencies

Fast 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

Fast QRS detector

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

from fast_qrs_detector import qrs_detector

qrs = qrs_detector(signal, frequence_sampling)

Plot functions

from fast_qrs_detector 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.1.tar.gz (18.9 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.1-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fast_qrs_detector-0.1.1.tar.gz
  • Upload date:
  • Size: 18.9 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.1.tar.gz
Algorithm Hash digest
SHA256 091879cf885a9d10ee9de389c562ee79231e08e1713f0d6a7732f265021d75c5
MD5 94279638c5472b6d2b083d9aa32adfea
BLAKE2b-256 e694627746c1f388a194eea3a6fe9bcc812b71cdfc4af314e1dc54794aa02f79

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fast_qrs_detector-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e730b475833d9f4793b549e1d5c7b188c858328af1b1bf61bca6dc4dcde7d6ac
MD5 3d5d9779c6ef62109d3489c91a9f1914
BLAKE2b-256 ec9892757a820eaf50eb19152166ed5050fadfaa39bc80ca5a672916bab84594

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