medmnist
load_data
¶
Download and load the medmnist data. Medmnist has 18 datasets. Here is the list of datasets available in Medmnist. [ 'chestmnist', 'adrenalmnist3d', 'bloodmnist', 'breastmnist', 'dermamnist', 'fracturemnist3d', 'nodulemnist3d', 'octmnist', 'organamnist', 'organcmnist', 'organmnist3d', 'organsmnist', 'pathmnist', 'pneumoniamnist', 'retinamnist', 'synapsemnist3d', 'tissuemnist', 'vesselmnist3d' ] For more details on the dataset, please check https://medmnist.com, https://zenodo.org/record/6496656
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_name |
str
|
Name of the dataset to download and load. |
required |
root_dir |
str
|
The path to store the downloaded data. When |
None
|
image_key |
str
|
The key for image. Defaults to "x". |
'x'
|
label_key |
str
|
The key for label. Defaults to "y". |
'y'
|
Raises:
Type | Description |
---|---|
ValueError
|
if the dataset_name is invalid |
Returns:
Type | Description |
---|---|
Tuple[NumpyDataset, NumpyDataset, NumpyDataset]
|
Tuple[NumpyDataset, NumpyDataset, NumpyDataset]: returns a tuple of traing, val and test data. |