Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Public repository associated with "Deep Learning for ECG Analysis: Benchmarks and Insights from PTB-XL"
| Date | Stars |
|---|---|
| 2026-07-31 | 304 |
| 2026-08-04 | 305 |
| 2026-08-06 | 306 |
Today
+1 stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# Deep Learning for ECG Analysis: Benchmarks and Insights from PTB-XL
This repository is accompanying our article [Deep Learning for ECG Analysis: Benchmarks
and Insights from PTB-XL](https://doi.org/10.1109/jbhi.2020.3022989), which builds on the [PTB-XL dataset](https://www.nature.com/articles/s41597-020-0495-6).
It allows to reproduce the ECG benchmarking experiments described in the paper and to benchmark
user-provided models within our framework. We also maintain a leaderboard for the described PTB-XL dataset
on this page, so feel free to submit your results as PRs.
Please acknowledge our work by citing the corresponding articles listed in **References** below.
## Setup
### Install dependencies
Install the dependencies (wfdb, pytorch, torchvision, cudatoolkit, fastai, fastprogress) by creating a conda environment:
conda env create -f ecg_env.yml
conda activate ecg_env
### Get data
Download and prepare the datasets (PTB-XL and ICBEB) via the following bash-script:
./get_datasets.sh
This script first downloads [PTB-XL from PhysioNet](https://physionet.org/content/ptb-xl/) and stores it in `data/ptbxl/`.
Afterwards all training data from the [ICBEB challenge 2018](http://2018.icbeb.org/Challenge.html) is downloaded and temporally stored in `tmp_data/`.
After downloading and unzipping `code/utils/convert_ICBEB.py` is called which stores the data in appropriate format in `data/ICBEB/`.
## Reproduce results from the paper
Change directory: `cd code` and then call
python reproduce_results.py
This will perform all experiments for all models used in the paper.
Depending on the executing environment, this will take up to several hours.
Once finished, all trained models, predictions and results are stored in `output/`,
where for each experiment a sub-folder is created each with `data/`, `models/` and `results/` sub-sub-folders.
### Download models and results
We also provide a [compressed zip-archive](https://datacloud.hhi.fraunhofer.de/s/gLkjQL94d7FXBbS) containing the `output` folder corresponding to our runs including trained models and predictions from our runs mentioned in the leaderboard below.
## Benchmarking user-provided models
For creating custom benchmarking results our recommendation is as follows:
1. create your model `code/models/your_model.py` which implements a standard classifier interface with `fit(X_train, y_train, X_val, y_val)` and `predict(X)`
2. create a config file `code/configs/your_configs.py` with name, type and parameters (if needed)
3. add your modeltype and model import to the cases in `perform`-function of `code/experiments/scp_experiment.py` (already added for demonstration purpose!)
4. add your model-config to `models` and perform your experiment as below (adjusted code of `code/reproduce_results.py`):
```python
from experiments.scp_experiment import SCP_Experiment
from configs.your_custom_configs import your_custom_config
datafolder = '../data/ptbxl/'
outputfolder = '../output/'
models = [your_custom_config]
e = SCP_Experiment('your_custom_experiment', 'diagnostic', datafolder, outputfolder, models)
e.prepare()
e.perform()
e.evaluate()
```
### Notes on e.evaluate()
Although we recommend using our framework, custom evaluation of custom models is still possible via calling `code.utils.utils.evaluate_experiment(y_true, y_pred, thresholds)`
manually with classwise thresholds.
For `e.evaluate()`: If the name of the experiment is `exp_ICBEB` classifier thresholds are needed.
In any other case `evaluate_experiment(y_true, y_pred)` will return a dictionary with `macro_auc` and `Fmax` (both metrics are **without any explicitly needed thresholds**).
In case of `exp_ICBEB` we offer two functions for computing thresholds (located in `code/utils/utils.py`):
1. `thresholds = utils.find_optimal_cutoff_thresholds(y_train, y_train_pred)`
2. `thresholds = utils.find_optimal_cutoff_thresholds_for_Gbeta(y_train, y_train_pred)`
In addition to `macro_auc` and `Fmax` `evaExcerpt of 16,966 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:18f5f34570dd0e26, llm:Repository associated with paper 'Deep Learning for ECG Analysis: Benchmarks and Insights from PTB-XL' — public benchmarking of deep learning models on ECG dataset (PTB-XL).
matched fp:18f5f34570dd0e26, llm:Repository associated with paper 'Deep Learning for ECG Analysis: Benchmarks and Insights from PTB-XL' — public benchmarking of deep learning models on ECG dataset (PTB-XL).
matched fp:18f5f34570dd0e26, llm:Repository associated with paper 'Deep Learning for ECG Analysis: Benchmarks and Insights from PTB-XL' — public benchmarking of deep learning models on ECG dataset (PTB-XL).