peal.data.custom_datasets.Camelyon17Dataset¶
- class peal.data.custom_datasets.Camelyon17Dataset[source]¶
Bases:
ImageDatasetThin wrapper around the WILDS Camelyon17 tumour dataset.
Delegates to
wilds.get_dataset("camelyon17")(downloading it if needed) and returns(transform(image), label); the WILDS metadata, which holds the hospital of origin, is dropped.Camelyon17AugmentedDatasetis the variant that exports the images into PEAL’s csv layout and keeps the hospital as the confounder.- Parameters:
config (
DataConfig) – Stored on the instance but not interpreted here.transform (
callable) – Applied to the PIL image.**kwargs – Ignored.
Methods
- __init__(config, transform, **kwargs)[source]¶
Open (and if needed download) the WILDS dataset and store the transform.
- Raises:
ImportError – If the optional
wildsdependency is not installed.