Skip to content
heartKIT
User guide
HELIA

Download Datasets

The download command is used to download specified datasets. Please refer to Datasets for details on the available datasets. Additional datasets can be added by creating a new dataset class and registering it with heartKIT dataset factory, DatasetFactory.

Using the CLI, the download command can be used to download specified datasets in the configuration file or directly in the command line.

Terminal
heartkit -m download -c '{"datasets": [{"name": "ptbxl", "params": {"path": "./datasets/ptbxl"}}]}'

In code, the download method of a dataset can be used to download the dataset.

Python example
import heartkit as hk
ds = hk.DatasetFactory.get("ptbxl")(path="./datasets/ptbxl")
ds.download()

Similarly, to download multiple datasets, the download method of a task can be used.

Python example
import heartkit as hk
task = hk.TaskFactory.get("rhythm")
params = hk.HKTaskParams(
datasets=[hk.NamedParams(
name="ptbxl",
parameters={"path": "./datasets/ptbxl"}
), hk.NamedParams(
name="lsad",
parameters={"path": "./datasets/lsad"}
)],
force_download=False
)
task.download(params)

Please refer to HKTaskParams for the available configuration options for the download command.