mednet.data.segment.chasedb1

CHASE-DB1 dataset for vessel segmentation.

The CHASE_DB1 is a retinal vessel reference dataset acquired from multiethnic school children. This database is a part of the Child Heart and Health Study in England (CHASE), a cardiovascular health survey in 200 primary schools in London, Birmingham, and Leicester. The ocular imaging was carried out in 46 schools and demonstrated associations between retinal vessel tortuosity and early risk factors for cardiovascular disease in over 1000 British primary school children of different ethnic origin. The retinal images of both of the eyes of each child were recorded with a hand-held Nidek NM-200-D fundus camera. The images were captured at 30 degrees FOV camera. The dataset of images are characterized by having nonuniform back-ground illumination, poor contrast of blood vessels as compared with the background and wider arteriolars that have a bright strip running down the centre known as the central vessel reflex.

Data specifications:

  • Raw data input (on disk):

    • RGB images encoded in JPG format with resolution (HxW) = 960 x 999 pixels.

    • Vessel annotations are encoded as PNG images with the same resolution as input samples.

    • Masks for the eye fundus are provided by this package.

    • Total samples: 28

  • Output sample:

    • Image: Load raw JPG images with PIL, with auto-conversion to RGB.

    • Vessel annotations: Load annotations with PIL, with auto-conversion to model 1 with no dithering.

    • Eye fundus mask: Load mask with PIL, with auto-conversion to model 1 with no dithering.

Split first-annotator contains 8 training samples and 20 tests samples annotated by expert 1. Split second-annotator contains the sample samples as in first-annotator, but annotated by expert 2.

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)

CHASE-DB1 dataset for vessel segmentation.

RawDataLoader()

A specialized raw-data-loader for the Chase-db1 dataset.

mednet.data.segment.chasedb1.DATABASE_SLUG = 'chasedb1'

Pythonic name to refer to this database.

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

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

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

Bases: RawDataLoader

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

Bases: CachingDataModule

CHASE-DB1 dataset for vessel segmentation.

Parameters:

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