Download Datasets
Introduction
Section titled “Introduction”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.
heartkit -m download -c '{"datasets": [{"name": "ptbxl", "params": {"path": "./datasets/ptbxl"}}]}'Python
Section titled “Python”In code, the download method of a dataset can be used to download the dataset.
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.
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)Arguments
Section titled “Arguments”Please refer to HKTaskParams for the available configuration options for the download command.