Ecg augmentation library and easy to use wrapper around other libraries
Project description
Ecgmentations
Ecgmentations is a Python library for ecg augmentation. Ecg augmentation is used in deep learning to increase the quality of trained models. The purpose of ecg augmentation is to create new training samples from the existing data.
Here is an example of how you can apply some augmentations from Ecgmentations to create new ecgs from the original one:
Table of contents
Authors
Rostislav Epifanov — Researcher in Novosibirsk
Installation
Installation from PyPI:
pip install ecgmentations
Installation from GitHub:
pip install git+https://github.com/rostepifanov/ecgmentations
A simple example
import numpy as np
import ecgmentations as E
# Declare an augmentation pipeline
transform = E.Sequential([
E.TimeReverse(p=0.5),
E.ChannelShuffle(p=0.06),
])
# Create example ecg (length, nchannels)
ecg = np.ones((12, 5000)).T
# Augment an ecg
transformed = transform(ecg=ecg)
transformed_ecg = transformed['ecg']
List of augmentations
The list of time axis transforms:
- TimeReverse
- TimeShift
- TimeSegmentShuffle
- RandomTimeWrap
- TimeCutout
- TimeCrop
- CenterTimeCrop
- RandomTimeCrop
- TimePadIfNeeded
The list of pulse transforms:
The list of other transforms:
Citing
If you find this library useful for your research, please consider citing:
@misc{epifanov2023ecgmentations,
Author = {Rostislav Epifanov},
Title = {Ecgmentations},
Year = {2023},
Publisher = {GitHub},
Journal = {GitHub repository},
Howpublished = {\url{https://github.com/rostepifanov/ecgmentations}}
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for ecgmentations-0.0.7-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93111c75de973dc0a4ca7e68803ac16b19b2593dcf2361c9f072ba3c3f6e0fc5 |
|
MD5 | cd2d66627ed82d78094913af4b3ffc0a |
|
BLAKE2b-256 | cd28e13e889987f4395abf3b89de94c4f1198fd81c885e6b9a8eebfbff9b6a17 |