Skip to content

Contains code for Semantic Segmentation of MoNuSeg 2018 challenge.

Notifications You must be signed in to change notification settings

nauyan/Segmentation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Current Features

  • Config File
  • Training Graphs
  • Patch-Wise Input
  • Updation of README Files
  • Inference Files
  • Quantitative Results
  • Visualization of Results
  • Train File
  • Directory Structure
  • Weights Save With Model

Legend

  • Resolved
  • Work In-Progess

Dataset

The dataset for this challenge was obtained by carefully annotating tissue images of several patients with tumors of different organs and who were diagnosed at multiple hospitals. This dataset was created by downloading H&E stained tissue images captured at 40x magnification from TCGA archive. H&E staining is a routine protocol to enhance the contrast of a tissue section and is commonly used for tumor assessment (grading, staging, etc.). Given the diversity of nuclei appearances across multiple organs and patients, and the richness of staining protocols adopted at multiple hospitals, the training datatset will enable the development of robust and generalizable nuclei segmentation techniques that will work right out of the box.

Training Data

Training data containing 30 images and around 22,000 nuclear boundary annotations has been released to the public previously as a dataset article in IEEE Transactions on Medical imaging in 2017.

Testing Data

Test set images with additional 7000 nuclear boundary annotations are available here MoNuSeg 2018 Testing data.

Dataset can be downloaded from Grand Challenge Webiste

A training sample with segmentation mask from training set can be seen below:

Tissue Segmentation Mask (Ground Truth)

Patch Generation

Since the size of data set is small and was eaisly loaded into the memmory so we have created patches in online mode. . All the images of training set and test set were reshape to 1024x1024 and then patches were extracted from them. The patch dimensions comprised of 256x256 with 50% overlap among them.

Models Diagrams

U-Net Modified

Blocks used to modify U-Net are:

Atrous Spatial Pyramid Pooling(ASPP)

Squeeze-and-Excitation Network

SegNet

SegNet Architecture

U-Net

UNet Architecture

Deep Lab v3+

DeepLabV3 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 -r requirments.txt

Training

To start training run the Train.py script from the command below. For training configurations refer to the config.json file. You can update the file according to your training settings. Model avaible for training are U-NET,SegNet, DeepLabv3+.

 python Train.py

Testing

To test the trained models on Test Images you first have to download the weights and place them in the results. After downliading the weights you unzip them and then run the Inference by using the command below. For testing configurations please refer to the config.json file.

python Test.py

Visualization of Results

Tissue Mask Predicted Mask

Quantitatvie Results

Model Loss Accuracy F1 Score Dice Score
Unet 0.0835 0.9150 0.7910 0.7906
Segnet 0.4820 0.8077 0.5798 0.3684
DeeplabV3+ 0.0783 0.9120 0.7750 0.7743
Unet + Skip Connections + ASPP + SE Block 0.0770 0.9210 0.801 0.8005

Results

Three Segmentation models have been trained and the model is evaluated on three metrics namely:

  • Accuracy
  • F1-Score
  • Dice Score

U-Net + Skip Connections + ASPP

U-Net

SegNet

DeepLab v3

Author

Maintainer Syed Nauyan Rashid ([email protected])

Releases

No releases published

Packages

No packages published

Languages