mednet.config.data.shenzhen.datamodule#
Shenzhen DataModule for computer-aided diagnosis.
Database reference: [MONTGOMERY-SHENZHEN-2014]
Module Attributes
Key to search for in the configuration file for the root directory of this database. |
Functions
|
Return a database split for the Shenzhen database. |
Classes
|
Shenzhen DataModule for computer-aided diagnosis. |
|
A specialized raw-data-loader for the Shenzhen dataset. |
- mednet.config.data.shenzhen.datamodule.CONFIGURATION_KEY_DATADIR = 'datadir.shenzhen'#
Key to search for in the configuration file for the root directory of this database.
- class mednet.config.data.shenzhen.datamodule.RawDataLoader(config_variable='datadir.shenzhen')[source]#
Bases:
RawDataLoaderA specialized raw-data-loader for the Shenzhen dataset.
- Parameters:
config_variable (
str) – Key to search for in the configuration file for the root directory of this database.
- mednet.config.data.shenzhen.datamodule.make_split(basename)[source]#
Return a database split for the Shenzhen database.
- class mednet.config.data.shenzhen.datamodule.DataModule(split_filename)[source]#
Bases:
CachingDataModuleShenzhen DataModule for computer-aided diagnosis.
The standard digital image database for Tuberculosis was created by the National Library of Medicine, Maryland, USA in collaboration with Shenzhen No.3 People’s Hospital, Guangdong Medical College, Shenzhen, China. The Chest X-rays are from out-patient clinics, and were captured as part of the daily routine using Philips DR Digital Diagnose systems.
Database reference: [MONTGOMERY-SHENZHEN-2014]
Data specifications:
Raw data input (on disk):
PNG 8-bit RGB images (grayscale, but encoded as RGB images with “inverted” grayscale scale requiring special treatment).
Variable width and height of 3000 x 3000 pixels or less
Output image:
Transforms:
Load raw PNG with
PILRemove black borders
Torch center cropping to get square image
Final specifications:
Grayscale, encoded as a single plane tensor, 32-bit floats, square with varying resolutions, depending on the input image
Labels: 0 (healthy), 1 (active tuberculosis)
- Parameters:
split_filename (
str) – Name of the .json file containing the split to load.