# LUDB Dataset

## Overview

The Lobachevsky University Electrocardiography database (LUDB) consists of 200 10-second 12-lead records. The boundaries and peaks of P, T waves and QRS complexes were manually annotated by cardiologists. Each record is annotated with the corresponding diagnosis.

Please visit [Physionet](https://physionet.org/content/ludb/1.0.1/) for more details.

## Usage

**Python**

```py title="Python example" linenums="1"
from pathlib import Path
import helia_edge as helia
import heartkit as hk

ds = hk.DatasetFactory.get('ludb')(
    path=Path("./datasets/ludb")
)

# Download dataset
ds.download(force=False)

# Create signal generator
data_gen = self.ds.signal_generator(
    patient_generator=helia.utils.uniform_id_generator(ds.patient_ids, repeat=True, shuffle=True),
    frame_size=256,
    samples_per_patient=5,
    target_rate=100,
)

# Grab single ECG sample
ecg = next(data_gen)

```

## Funding

The study was supported by the Ministry of Education of the Russian Federation (contract No. 02.G25.31.0157 of 01.12.2015).

## License

The LUDB is available for commercial use.

## Supported Tasks

* [Segmentation](https://ambiqai.github.io/heartkit/tasks/segmentation/)
