Skip to main content

Ecg augmentation library and easy to use wrapper around other libraries

Project description

Ecgmentations

Python version support PyPI version Downloads

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:

preview

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:

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

ecgmentations-0.0.6-py2.py3-none-any.whl (22.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file ecgmentations-0.0.6-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for ecgmentations-0.0.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b90e8393ced54dcc25acb4040f16ca308033e2a091e91bd8439628082da13527
MD5 2e05eaa8a7ea31ae56f6ec34f682a228
BLAKE2b-256 c5c3a2b007187863c6ea2bd3e26787ca2832e6edf7085bb7aaf17997d2a944b1

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