KatherPatchDataset¶

class KatherPatchDataset(save_dir_path=None)[source]¶

Define a class for holding the Kather dataset information.

Parameters:

save_dir_path (str, Path, or None) – Path to the directory containing the Kather dataset with label subdirectories (e.g., ‘BACK/’, ‘NORM/’, ‘TUM/’, etc.). If None, the dataset will be automatically downloaded from HuggingFace Hub and extracted to ‘~/.tiatoolbox/dataset/kather100k-validation/’. The directory structure should contain subdirectories for each tissue class, with .tif image files inside each subdirectory.

inputs¶

A list of paths where each path points to a sample image.

Type:

list

labels¶

A list of int where each value corresponds to the label of the sample at the same index.

Type:

list

label_names¶

A dict mapping each unique label value to the associated class name as a string.

Type:

dict

Initialize KatherPatchDataset.

Methods

Attributes