mednet.data.segment.drhagis

DRHAGIS dataset for Vessel Segmentation.

The DR HAGIS database has been created to aid the development of vessel extraction algorithms suitable for retinal screening programmes. Researchers are encouraged to test their segmentation algorithms using this database.

It should be noted that image 24 and 32 are identical, as this fundus image was obtained from a patient exhibiting both diabetic retinopathy and age-related macular degeneration.

The images resolutions (height x width) are one of:

  • 4752x3168 px, or

  • 3456x2304 px, or

  • 3126x2136 px, or

  • 2896x1944 px, or

  • 2816x1880 px

  • Protocol default:

    • Training samples: 19 (including labels and masks)

    • Test samples: 20 (including labels and masks)

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)

DRHAGIS dataset for Vessel Segmentation.

RawDataLoader()

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

mednet.data.segment.drhagis.DATABASE_SLUG = 'drhagis'

Pythonic name to refer to this database.

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

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

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

Bases: RawDataLoader

A specialized raw-data-loader for the Drive 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 path suffixes to the sample image, target, and mask to be loaded, within the dataset root folder.

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.drhagis.DataModule(split_path)[source]

Bases: CachingDataModule

DRHAGIS dataset for Vessel Segmentation.

Parameters:

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