fl4health.datasets.skin_cancer.load_data module¶
- construct_skin_cancer_tensor_dataset(data, transform=None, num_workers=8)[source]¶
Construct a
TensorDataset
for skin cancer data.- Parameters:
- Returns:
A
TensorDataset
containing the processed images and labels.- Return type:
- load_skin_cancer_data(data_dir, dataset_name, batch_size, split_percents=(0.7, 0.15, 0.15), sampler=None, train_transform=None, val_transform=None, test_transform=None, dataset_converter=None, seed=None)[source]¶
Load skin cancer dataset (training, validation, and test set).
- Parameters:
data_dir (Path) – Directory containing the dataset files.
dataset_name (str) – Name of the dataset to load.
batch_size (int) – Batch size for the DataLoader.
split_percents (tuple[float, float, float]) – Percentages for splitting the data into train, val, and test sets.
sampler (LabelBasedSampler | None) – Sampler for the dataset. Defaults to None.
train_transform (Callable | None) – Transformations to apply to the training data. Defaults to None.
val_transform (Callable | None) – Transformations to apply to the validation data. Defaults to None.
test_transform (Callable | None) – Transformations to apply to the test data. Defaults to None.
dataset_converter (DatasetConverter | None) – Converter to apply to the dataset. Defaults to None.
seed (int | None) – Random seed for shuffling data. Defaults to None.
- Returns:
DataLoaders for the training, validation, and test sets, and a dictionary with the number of examples in each set.
- Return type: