NGC | Catalog


For downloads and more information, please view on a desktop device.
Logo for clara_pt_pathology_metastasis_detection


A pre-trained model for automated detection of metastases in whole-slide histopathology images.



Use Case



Clara Train

Latest Version



March 25, 2022


240.22 MB

Model Overview

A pre-trained model for automated detection of metastases in whole-slide histopathology images.

Note: The 4.1 version of this model is only compatible with the 4.1 version of the Clara Train SDK container

Model Architecture

The model is trained based on ResNet18 [1] with the last fully connected layer replaced by a 1x1 convolution layer. Diagram showing the flow from model input, through the model architecture, and to model output


The training was performed with the following:

  • Script:
  • GPU: at least 16 GB of GPU memory.
  • Actual Model Input: 224 x 224 x 3
  • AMP: True
  • Optimizer: Novograd
  • Learning Rate: 1e-3
  • Loss: BCEWithLogitsLoss


All the data used to train, validate, and test this model is from Camelyon-16 Challenge. You can download all the images for "CAMELYON16" data set from various sources listed here.

Location information for training/validation patches (the location on the whole slide image where patches are extracted) are adopted from NCRF/coords.

Annotation information are adopted from NCRF/jsons.

  • Target: Tumor
  • Task: Detection
  • Modality: Histopathology
  • Size: 270 WSIs for training/validation, 48 WSIs for testing

Data Preparation

This MMAR expects the training/validation data (whole slide images) reside in $DATA_ROOT/training/images. By default $DATA_ROOT is pointing to /workspace/data/medical/pathology/ You can easily modify $DATA_ROOT to point to a different directory in config/environment.json.

To reduce the computation burden during the inference, patches are extracted only where there is tissue and ignoring the background according to a tissue mask. You should run prior to the inference to generate foreground masks, where the input is the whole slide test images and the output is the foreground masks. Please also create a directory for prediction output, aligning with the one specified with $MMAR_EVAL_OUTPUT_PATH in config/environment.json (e.g. /eval)

Please refer to "Annotation" section of Camelyon challenge to prepare ground truth images, which are needed for FROC computation. By default, this data set is expected to be at /workspace/data/medical/pathology/ground_truths. But it can be modified in


FROC score is used for evaluating the performance of the model. After inference is done, needs to be run to evaluate FROC score based on predicted probability map (output of inference) and the ground truth tumor masks. This model achieve the ~0.92 accuracy on validation patches, and FROC of ~0.72 on the 48 Camelyon testing data that have ground truth annotations available.


Training loss over 20 Epochs.

Graph that shows training loss over 20 epochs


Validation accuracy over 20 epochs.

Graph that shows validation accuracy over 20 epochs

How to Use this Model

The model was validated with NVIDIA hardware and software. For hardware, the model can run on any NVIDIA GPU with memory greater than 16 GB. For software, this model is usable only as part of Transfer Learning & Annotation Tools in Clara Train SDK container. Find out more about Clara Train at the Clara Train Collections on NGC.

Full instructions for the training and validation workflow can be found in our documentation.


Input: Input for the training pipeline is a json file (dataset.json) which includes path to each WSI, the location and the label information for each training patch.


  1. Extract 224 x 224 x 3 patch from WSI according to the location information from json

Augmentation for training:

  1. Randomly applying color jittering
  2. Randomly applying spatial flipping
  3. Randomly applying spatial rotation
  4. Randomly applying spation zooming
  5. Randomly applying intensity scaling


Output of the network is a probability number of the input patch being tumor or normal.

Sliding-window Inference

Inference is performed on WSI in a sliding window manner with specified stride. A foreground mask is needed to specify the region where the inference will be performed on, given that background region which contains no tissue at all can occupy a significant portion of a WSI. Output of the inference pipeline is a probability map of size 1/stride of original WSI size.


This training and inference pipeline was developed by NVIDIA. It is based on a segmentation and classification model developed by NVIDIA researchers. This research use only software has not been cleared or approved by FDA or any regulatory agency. Clara pre-trained models are for developmental purposes only and cannot be used directly for clinical procedures.


[1] He, Kaiming, et al, "Deep Residual Learning for Image Recognition." In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770-778. 2016.


End User License Agreement is included with the product. Licenses are also available along with the model application zip file. By pulling and using the Clara Train SDK container and downloading models, you accept the terms and conditions of these licenses.