mednet.data.segment.rimoner3

RIM-ONE r3 (training set) for cup segmentation.

The dataset contains 159 stereo eye fundus images with a resolution of 2144 x 1424. The right part of the stereo image is disregarded. Two sets of ground-truths for optic disc and optic cup are available. The first set is commonly used for training and testing. The second set acts as a “human” baseline. A third set, composed of annotation averages may also be used for training and evaluation purposes.

  • Reference: [FSA+15]

  • Original resolution (height x width): 1424 x 1072

  • Split reference: [MPTAVG16]

  • Protocols optic-disc-exp1, optic-cup-exp1, optic-disc-exp2, optic-cup-exp2, optic-disc-avg and optic-cup-avg

  • Training: 99

  • Test: 60

This module contains the base declaration of common data modules and raw-data loaders for this database. All configured splits inherit from this definition.

Module Attributes

DATABASE_SLUG

Pythonic name to refer to this database.

CONFIGURATION_KEY_DATADIR

Key to search for in the configuration file for the root directory of this database.

Classes

DataModule(split_path)

RIM-ONE r3 (training set) for cup segmentation.

RawDataLoader()

A specialized raw-data-loader for the rimoner3 dataset.

mednet.data.segment.rimoner3.DATABASE_SLUG = 'rimoner3'

Pythonic name to refer to this database.

mednet.data.segment.rimoner3.CONFIGURATION_KEY_DATADIR = 'datadir.rimoner3'

Key to search for in the configuration file for the root directory of this database.

class mednet.data.segment.rimoner3.RawDataLoader[source]

Bases: RawDataLoader

A specialized raw-data-loader for the rimoner3 dataset.

datadir: Path

This variable contains the base directory where the database raw data is stored.

sample(sample)[source]

Load a single image sample from the disk.

Parameters:

sample (Any) – A tuple containing the path suffix, within the dataset root folder, where to find the image to be loaded, and an integer, representing the sample label.

Return type:

Mapping[str, Any]

Returns:

The sample representation.

target(sample)[source]

Load only sample target from its raw representation.

Parameters:

sample (Any) – A tuple containing the path suffix, within the dataset root folder, where to find the image to be loaded, and an integer, representing the sample target.

Return type:

Tensor

Returns:

The label corresponding to the specified sample, encapsulated as a torch float tensor.

class mednet.data.segment.rimoner3.DataModule(split_path)[source]

Bases: CachingDataModule

RIM-ONE r3 (training set) for cup segmentation.

Parameters:

split_path (Path | Traversable) – Path or traversable (resource) with the JSON split description to load.