mednet.data.segment.avdrive

AV-DRIVE dataset for Vessel Segmentation.

The DRIVE database has been established to enable comparative studies on segmentation of blood vessels in retinal images.

  • Reference: [SAN+04]

  • Original resolution (height x width): 584 x 565

  • Split reference: [SAN+04]

  • Protocol default:

    • Training samples: 20 (including labels and masks)

    • Test samples: 20 (including labels from annotator 1 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 of this database.

CONFIGURATION_KEY_DATADIR

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

Classes

DataModule(split_path)

AV_DRIVE dataset for Vessel Segmentation.

RawDataLoader()

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

mednet.data.segment.avdrive.DATABASE_SLUG = 'avdrive'

Pythonic name of this database.

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

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

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

Bases: RawDataLoader

A specialized raw-data-loader for the avdrive 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.avdrive.DataModule(split_path)[source]

Bases: CachingDataModule

AV_DRIVE dataset for Vessel Segmentation.

Parameters:

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