Skip to content

MONAI Pathology Components

Behrooz Hashemian edited this page Oct 24, 2022 · 3 revisions

MONAI Pathology Components

Components

  • WSIReader: Whole slide image reader to extract patches whole slide images without loading the entire slide into the memory at a given resolution level, location and size. It supports different backends such as cuCIM, OpenSlide, TiffFile, and is easily extensible to support other backends and use a consistent metadata to extract patches.
  • PatchWSIDatatset: a dataset that extracts patches directly from whole slide images and prepare them via provided transforms. It also load and transform associated label to each patch.
  • SlidingPatchWSIDatatse: this dataset generates, extract and prepare patches that sweep the entire slide with possible overlaps and different offset for starting position of the whole slide image. It also support random offset for data augmentation. Moreover, it provides all the necessary metadata to create the entire slide from the patches, and can be used in tandem with ProbMapProducer to create probability heat maps at any resolution level.
  • MaskedPatchWSIDatatset: this dataset generates, extract and prepare patches that contains tissue. Given a resolution level, it create a tissue mask and return their corresponding patches in any other given resolution.
  • ProbMapProducer: the handler automatically gets the model output of each patch, and builds and continuously updates the probability maps associate of the whole slide image at a given resolution level.
  • ForegroundMask: binary mask of a given histopathology image that separate tissue from background has many application in validation of the models and enhancing the performance. This transform creates a foreground tissue mask based on thresholding RGB and HSV channels using various thresholding methods such as otsu.
  • GridSplit: Split patches and their labels to sub-patches.
  • GridPatch: Given a loaded whole slide image at resolution level, it generate patches on the grid that covers all the whole image. It also sorts the patches based on a given sort function and filter them based on the given threshold.
  • RandGridPatch: Similar functionality to GridPatch but it can randomly create offset for the image for data augmentation of patches.
  • FROC calculation: FROC is an important metrics when dealing with lesion detection. Having a probability map and the ground truth lesion mask, it provides are the required methods to calculate FROC.
  • TorchVisionFCModel: Create fully convolutional models out of pre-trained torch vision models that we have used in metastasis detection pipeline but can be used in any domain.
  • MILModel: Multiple Instance Learning (MIL) model with a classification backbone model.
  • HoVerNet model: for simultaneous segmentation and classification of nuclei in histopathology images, which include three branches, nuclei prediction, hover map prediction and nuclei classification.
  • HoVerNetLoss: a loss function consists of weighted average of six losses from three branches of HoVerNet model.
  • ComputeHoVerMaps: computes the horizontal and vertical maps from a binary instance mask of objects in an image, e.g. nuclei in a histopathology image.
  • SobleGradients: Compute Sobel gradients with arbitrary kernel size (important for HoVerNet loss)
  • SplitDimd: updated to output list of dictionaries. This is particularly useful for our pathology multiple-instance learning pipeline.

Pathology pipelines

  • Tumor metastasis detection pipeline
  • Multiple instance leanring
  • Pathology NVTX performance profiling tutorial
  • Nuclei segmentation and classification (HoVerNet) pipeline (WIP)

MONAI Bundle

  • Tumor metastasis detection

Developed in cuCIM and accessible in MONAI via CuCIM and RandCuCIM wrappers

  • GPU-accelerated transforms
    • spatial transforms
    • intensity transforms
    • color transforms
  • Stain normalization
Clone this wiki locally