A reference app to run inference + train tasks to segment Nuclei. This app works in both Digital Slide Archive (DSA) and QuPath Viewers, but we recommend using DSA as an endpoint for studies; however, you can also use the local datastore as a studies folder.
- Supported Viewers
- Installation Requirements
- Pretrained Models
- How To Use the App
- Performance Benchmarking
The Pathology Sample Application supports the following viewers:
For more information on each of the viewers, see the plugin extension folder for the given viewer.
MONAI Label for Pathology requires an additional dependency of OpenSlide or CuCIM. Make sure that any .dll or .so files are in the system load path.
For Windows, make sure <openslide_folder>/bin is added in PATH environment.
For Ubuntu: apt install openslide-tools or pip install cucim
The following are the models which are currently added into Pathology App:
| Name | Description |
|---|---|
| Segmentation Nuclei | An example of multi-label segmentation for the following labels: Neoplastic, Inflammatory, Connective/Soft Tissue, Dead, and Epithelial. |
| DeepEdit Nuclei | It is a combination of both Interaction + Auto Segmentation model, trained to segment Nuclei cells that combines all cell types from the standard segmentation model above as Nuclei. |
| NuClick | This is NuClick implementation (UNet model) as provided at: https://github.com/mostafajahanifar/nuclick_torch. Training task for monailabel is not yet supported. |
Model Details (dataset, input, outputs)
The above Nuclei models are trained on PanNuke Dataset for Nuclei Instance Segmentation and Classification
- WSI Images
- Region (ROI) of WSI Image
Segmentation Mask is produced in one of the following formats:
- Standard JSON
- DSA Document (JSON)
- ASAP Annotation XML
The following commands are examples of how to start the Pathology Sample Application. Make sure when you're running the command that you use the correct app and studies path for your system.
# Download Pathology App (skip this if you have already downloaded the app or using github repository (dev mode))
monailabel apps --download --name pathology --output workspace
# Start MONAI Label Server with all models
monailabel start_server --app workspace/pathology --studies datasets/wsi
# Start MONAI Label Server with all models and use specific bundle versions
monailabel start_server --app workspace/pathology --studies datasets/wsi --conf hovernet_nuclei 0.1.8 --conf nuclick 0.1.0 --conf classification_nuclei 0.1.0
# Start MONAI Label Server with HoVerNet Nuclei model
monailabel start_server --app workspace/pathology --studies datasets/wsi --conf models hovernet_nuclei
# Start MONAI Label Server with multiple models
monailabel start_server --app workspace/pathology --studies datasets/wsi
# Start MONAI Label Server with HoVerNet Nuclei model and preload on GPU
monailabel start_server --app workspace/pathology --studies datasets/wsi --conf models hovernet_nuclei --conf preload true
# Start MONAI Label Server with HoVerNet Nuclei in Inference Only mode
monailabel start_server --app workspace/pathology --studies datasets/wsi --conf models hovernet_nuclei --conf skip_trainers truegit clone https://github.com/Project-MONAI/MONAILabel.git
cd MONAILabel
pip install -r requirements.txtInstall Openslide:
Install Openslide binaries manually and make sure .dll or .so files for openslide are in system load path.
- For windows, make sure <openslide_folder>/bin is added in PATH environment.
- For ubuntu:
apt install openslide-tools
# download sample wsi image (skip this if you already have some)
mkdir sample_wsi
cd sample_wsi
wget https://demo.kitware.com/histomicstk/api/v1/item/5d5c07539114c049342b66fb/download
cd -
# run server
./monailabel/scripts/monailabel start_server --app sample-apps/pathology --studies datasets/wsiThe performance benchmarking is done using the MONAILabel server and DSA client. All the details are captured in a Google Sheet.
The following graph shows a summary of:
- NucleiDetection (CPU-Based DSA Algorithm)
- Segmentation/DeepEdit (MONAILabel models)
![]() |
|
![]() |
![]() |
You need to install DSA and upload some test images. Refer: https://github.com/DigitalSlideArchive/digital_slide_archive/tree/master/devops/dsa
Following are some config options:
# run server (Example: DSA API URL is http://0.0.0.0:8080/api/v1)
./monailabel/scripts/monailabel start_server --app sample-apps/pathology \
--studies http://0.0.0.0:8080/api/v1 \
# run server (Advanced options)
./monailabel/scripts/monailabel start_server --app sample-apps/pathology \
--studies http://0.0.0.0:8080/api/v1 \
--conf dsa_folder 621e94e2b6881a7a4bef5170 \
--conf dsa_api_key OJDE9hjuOIS6R8oEqhnVYHUpRpk18NfJABMt36dJ \
--conf dsa_asset_store_path digital_slide_archive/devops/dsa/assetstore



