This repository contains ECG Recognition Library - an open-source library for assisting in diagnostics of heart conditions from ECG. This library provides functionality of heart condition detection, differential diagnostics, and risk markers evaluation. The library handles ECGs in both formats, as signal or as a photo.
Main features implemented in the library
- Recognition of ECG signal from a photo of printed ECG
- Detection of ST-elevation
- IM risk markers evaluation
- IM/BER differential diagnosis
Thus compared to other frameworks, ECG Recognition Library:
- Handles ECGs provised as a signal as well as an image
- Provides a range of functionality useful for IM diagnostics
Details of implemented methods.
- Required ECG frequency: 500 Hz
- Required length: ≥ 5s
Additional image requirement:
- Image should contain only ECG
- no background
- no foreign objects
- Each image should contain only one lead
Requirements: Python 3.7
- [optional] create Python environment, e.g.
$ conda create -n ECG python=3.7 $ conda activate ECG
- install requirements from requirements.txt
$ pip install -r requirements.txt
- install the library as a package
$ python -m pip install git+ssh://[email protected]/aimclub/ECG
Requirements: Python 3.7
- [optional] create Python environment, e.g.
$ conda create -n ECG python=3.7 $ conda activate ECG
- clone repository and install all requirements
$ git clone [email protected]:aimclub/ECG.git $ cd ECG $ pip install -r requirements.txt
- run tests
$ pytest tests/unit_tests.py $ pytest tests/integration_tests.py
- fix code style to match PEP8 automatically with autopep8
$ pip install autopep8==1.6.0 $ autopep8 --max-line-length=90 -i -r ECG $ autopep8 --max-line-length=90 -i -r tests
- check that code style matches PEP8
$ pip install pycodestyle==2.8.0 $ pycodestyle --max-line-length=90 --ignore=E266 ECG $ pycodestyle --max-line-length=90 --ignore=E266 tests
- build a PyPi package locally
$ python3 -m pip install --upgrade build $ python3 -m build
The general description is available here.
ECG Recognition Library API is available here
We provide a tutorial demonstrating suggested usage pipeline
The contribution guide is available in the repository.
In Russian:
- Ватьян А.С., Гусарова Н.Ф., Змиевский Д.А., Кабышев М.А., Передреев Д.А., Полевая Т.А., Татаринова А.А., Томилов И.В.Автоматизированная оценка параметров ЭКГ в условиях пандемии COVID-19. Scientific and Technical Journal of Information Technologies, Mechanics and Optics, 2022, vol. 22, no. 5, in press
- Пчелкин А.Ю., Гусарова Н.Ф. Кроссплатформенная разработка на базе вебтехнологий для поддержки решений в проблемно-ориентированных системах управления // Экономика. Право. Инновации. 2022. № 1. С. 41–47. http://dx.doi.org/10.17586/2713-1874-2022-1-41-47.
The library was developed in ITMO University.
- A. Vatyan - team leader
- N. Gusarova - chief scientific advisor
- T. Polevaya
- D. Zmievsky
- D. Peredreev
- M. Kabyshev
- Alexandra Vatyan [email protected] for collaboration suggestions
- Tatyana Polevaya [email protected] for technical questions