mednet.data.classify.angioreport¶
AngioReport dataset for automatic report generation on angiography images.
The AngioReport Dataset is the first publicly available angiographic dataset, comprising images of both fluorescein angiography and indocyanine green angiography (ICGA), all labeled by retinal specialists. Collected at the Department of Ophthalmology, Rajavithi Hospital, Bangkok, Thailand, the final dataset consists of 55,361 images from 1,691 patients (3,179 eyes). Among the 3,179 eyes, 81.8% were examined in both FA and ICGA modes, 10.3% underwent FA only, and the remaining 7.9% had ICGA only. Since angiographic imaging methods are non-standardized and vary based on the specialist and patient, the number of images per eye in this dataset ranges from a few to several hundred. The only labeled images are those present in the original training split (33,559 images from 1,921 eyes).
The dataset covers 24 medical conditions and provides detailed descriptions of the type, location, shape, size, and pattern of abnormal fluorescence. Specifically: - Impression [multilabel] - HyperF_Type [multiclass] - HyperF_Area(DA) [multiclass] - HyperF_Fovea [binary] - HyperF_ExtraFovea [multilabel] - HyperF_Y [multilabel] - HypoF_Type [multiclass] - HypoF_Area(DA) [multiclass] - HypoF_Fovea [binary] - HypoF_ExtraFovea [multilabel] - HypoF_Y [multilabel] - CNV [binary] - Vascular abnormality (DR) [multilabel] - Pattern [multilabel]
In the current setup, we include only those samples that were examined in both FA and ICGA modes, identifiable by their aspect ratio, specifically, images whose width is twice their height, as these represent concatenated pairs of both modalities. For each eye, we select only the last frame image, which is typically the most informative for diagnosis. This selection results in a total of 1,887 samples/eyes.
Data specifications:
Raw data input (on disk):
JPEG grayscale images encoded as 8-bit sRGB, with varying resolution (most images being 384 x 364 pixels or 256 x 256 pixels, after being cropped to obtain images of one of the two modalities).
Total samples: 30,768 (FA/ICGA images) (Only last frame 1887)
Output image:
Transforms:
Load raw JPEG with
PIL, with auto-conversion to grayscaleCrop images to obtain the specified modality (FA or ICGA)
Convert to torch tensor
Final specifications
Grayscale, encoded as a single plane tensor, 32-bit floats, with varying resolution depending on input.
Labels: they depend on the task selected.
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
Pythonic name of this database. |
|
Key to search for in the configuration file for the root directory of this database. |
|
List of impression type detectable from icga. |
Functions
|
Binarize the input list of radiological findings. |
Classes
|
AngioReport dataset. |
|
A specialized raw-data-loader for the AngioReport dataset. |
- mednet.data.classify.angioreport.DATABASE_SLUG = 'angioreport'¶
Pythonic name of this database.
- mednet.data.classify.angioreport.CONFIGURATION_KEY_DATADIR = 'datadir.angioreport'¶
Key to search for in the configuration file for the root directory of this database.
- mednet.data.classify.angioreport.IMPRESSION_TYPE_ICGA = ['unremarkable changes', 'macular neovascularization', 'central serous chorioretinopathy', 'uveitis', 'polypoidal choroidal vasculopathy', 'pachychoroid pigment epitheliopathy', 'choroidal mass', 'Other']¶
List of impression type detectable from icga.
- mednet.data.classify.angioreport.binarize_findings(lst)[source]¶
Binarize the input list of radiological findings.
The output list contains zeros and ones, respecting the findings order in
IMPRESSION_TYPE_ICGA.
- class mednet.data.classify.angioreport.RawDataLoader(problem_type, modality='FA')[source]¶
Bases:
RawDataLoaderA specialized raw-data-loader for the AngioReport dataset.
- Parameters:
problem_type (
Literal['binary','multiclass','multilabel']) – Specifies the problem type for the current split. Can bebinaryormulticlass. This parameter controls how the target labels are processed and retrieved from the dataset.modality (
Literal['FA','ICGA']) – Specifies the modality to be used. Can beFA(Fluorescein Angiography) orICGA(Indocyanine Green Angiography). Default isFA. Depending on the modality a different crop operation is performed on the input image.
- 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:
- Returns:
The label corresponding to the specified sample, encapsulated as a 1D torch float or 0D long tensor (depending on the problem_type).
- class mednet.data.classify.angioreport.DataModule(split_path, num_classes, problem_type, modality='FA')[source]¶
Bases:
CachingDataModuleAngioReport dataset.
- Parameters:
split_path (
Path|Traversable) – Path or traversable (resource) with the JSON split description to load.num_classes (
int) – Number of output classes for the task at hand.problem_type (
Literal['binary','multiclass','multilabel']) – Specifies the problem type for the current split. Can bebinary,multilabelormulticlass. This parameter controls how the target labels are processed and retrieved from the dataset.modality (
Literal['FA','ICGA']) – Specifies the modality to be used. Can beFA(Fluorescein Angiography) orICGA(Indocyanine Green Angiography). Default isFA. Depending on the modality a different crop operation is performed on the input image.