mednet.data.classify.montgomery¶
Montgomery DataModule for TB detection.
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.
Database references: [JCA+14],
Data specifications:
Raw data input (on disk):
PNG images 8 bit grayscale issued from digital radiography machines
Original resolution (height x width or width x height): 4020x4892 px or 4892x4020 px
Samples: 138 images and associated labels
Output image:
Transforms:
Load raw PNG with
PIL
Remove black borders
Convert to torch tensor
Final specifications
Grayscale, encoded as a single plane tensor, 32-bit floats, square at most 4020 x 4020 pixels
Binary labels: 0 (healthy), 1 (active tuberculosis), encoded as a 1D torch float tensor.
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. |
Classes
|
Montgomery DataModule for TB detection. |
|
A specialized raw-data-loader for the Montgomery dataset. |
- mednet.data.classify.montgomery.DATABASE_SLUG = 'montgomery'¶
Pythonic name of this database.
- mednet.data.classify.montgomery.CONFIGURATION_KEY_DATADIR = 'datadir.montgomery'¶
Key to search for in the configuration file for the root directory of this database.
- class mednet.data.classify.montgomery.RawDataLoader(config_variable='datadir.montgomery', multiclass=False)[source]¶
Bases:
RawDataLoader
A specialized raw-data-loader for the Montgomery dataset.
- Parameters:
- class mednet.data.classify.montgomery.DataModule(split_path, multiclass=False)[source]¶
Bases:
CachingDataModule
Montgomery DataModule for TB detection.
- Parameters:
split_path (
Path
|Traversable
) – Path or traversable (resource) with the JSON split description to load.multiclass (
bool
) – Set toTrue
if the targets should be output as 2 distinct classes instead of a single (0/1) output.