Skip to content

The repository contains a simple pipeline for training Nuclei Segmentation Datasets of Histopathology Images.

Notifications You must be signed in to change notification settings

nauyan/NucleiSegmentation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Repository for Nuclei Segmentation for Histopathology Images

Note: If you're interested in using it, feel free to ⭐️ the repo so we know!

Datasets

CPM 15

The dataset can be downloaded from the link

CPM 17

The dataset can be downloaded from the link

Consep

A dataset that contains manually annotated 24,319 nuclei with associated class labels. The dataset can be downloaded from the link

Nuclei Segmentation

The dataset consist of 143 images ER+ BCa images scanned at 40x. Each image is 2,000 x 2,000. Across these images there are about 12,000 nuclei manually segmented. The dataset can be downloaded from the link

Patch Generation

Patch Generation has been done in offline mode to reduce pipeline complexity. The proposed approach uses multiple dataset therefore the size of WSIs are non-standard. Where as the pathches generated from WSIs have dimensions of 256x256x3 having 75% overlap among them.

Models

The purpose of this pipeline was to explore and train various nuclei segmentaion datasets therefore we used Modified U-Net for training.

U-Net

UNet Architecture

Pre-Trained Models

The Pre-Trained models can be downloaded from google drive.

Installation

To get this repo work please install all the dependencies using the command below:

pip install -U segmentation-models
pip install -r requirments.txt

Training

To start training run the Train.py script from the command below. For training configurations refer to the Training File file. You can update the file according to your training settings. Model avaible for training is U-NET.

 python Train.py

Testing

To perfrom Inference on the trained models on Test Images you first have to download the weights and place them in the results folder. After downliading the weights you unzip them and then run the Inference by using the command below.

python Inference.py

Visualization of Results

Inferecne Results from CPM15 Dataset

Tissue Mask Predicted Mask

Inferecne Results from CPM17 Dataset

Tissue Mask Predicted Mask

Inferecne Results from Consep Dataset

Tissue Mask Predicted Mask

Inferecne Results from Nuclei Segmentation Dataset

Tissue Mask Predicted Mask

Quantitative Results

Dataset Loss Accuracy F1 Score Dice Score
CPM 15 0.048 0.951 0.879 0.878
CPM 17 0.054 0.945 0.866 0.865
Consep 0.304 0.692 0.586 0.586
Nuclei Segmentation 0.016 0.983 N/A N/A

Training Plots

Model is evaluated on three metrics namely:

  • Accuracy
  • F1-Score
  • Dice Score

CPM 15

CPM 17

Consep

Nuclei Segmentation

Authors

Maintainer Syed Nauyan Rashid ([email protected])
Maintainer Asim Khan Niazi ([email protected])

Releases

No releases published

Packages

No packages published

Languages