wsipipe.load.datasets package

Loaders specify formats for a particular dataset.
  • Specify the slide and annotation type for a dataset

  • Specify the labels and grouping of labels for a dataset

loader module

class Loader[source]

Bases: object

Generic Loader class

Returns

Name of the loader. load_annotations (object): A function used to load annotations for the dataset load_slide (object): A function used to load slides for the dataset labels (Dict[str: int]): A dictionary of category names and the corresponding integer label for the dataset

Return type

name (str)

abstract property labels: Dict[str, int]
abstract load_annotations(file)[source]
Parameters

file (Path) –

Return type

AnnotationSet

abstract load_slide(path)[source]
Parameters

path (Path) –

Return type

SlideBase

abstract property name: str

camelyon16 module

Loader for the Camelyon 16 dataset.
  • Slides are tiffs read using openslide

  • Annotations are asapxml

  • Output labels for slides are background, normal and tumor

class Camelyon16Loader[source]

Bases: Loader

property labels: Dict[str, int]
load_annotations(file)[source]
Parameters

file (Path) –

Return type

AnnotationSet

load_slide(path)[source]
Parameters

path (Path) –

Return type

SlideBase

property name: str

stripai module

Loader for the STRIP AI dataset.
  • Slides are tiffs read using openslide

  • A single annotation is applied to whole slide

  • Output labels for slides are background, CE and LAA

class StripaiLoader[source]

Bases: Loader

property labels: Dict[str, int]
load_annotations(label)[source]
Parameters

label (Path) –

Return type

AnnotationSet

load_slide(path)[source]
Parameters

path (Path) –

Return type

SlideBase

property name: str

registry module

get_loader(name)[source]

A convenience function to call loader based on its name

Parameters

name (str) – Name of the loader.

Returns

the loader class

Return type

loader (Loader)