Git Product home page Git Product logo

histoseg's Introduction

Author / Corresponding Person: PWC
Saad Wazir [[email protected]]

HistoSeg - Quick attention with multi-loss function for multi-structure segmentation in digital histology images Maintained - Yes Quick Attention Multi Loss Function Encoder-Decoder Network Semantic Segmentation Computational Pathology

HistoSeg : Quick attention with multi-loss function for multi-structure segmentation in digital histology images

Paper was presented at 12th International Conference on Pattern Recognition Systems (ICPRS), 2022 École Nationale Supérieure des Mines de Saint-Étienne, France

Download Paper

DOI: 10.1109/ICPRS54038.2022.9854067

Copyrights has been given to IEEE. IEEE Xplore link is https://ieeexplore.ieee.org/document/9854067

Please Cite it as following

S. Wazir and M. M. Fraz, "HistoSeg: Quick attention with multi-loss function for multi-structure segmentation in digital histology images," 2022 12th International Conference on Pattern Recognition Systems (ICPRS), 2022, pp. 1-7, doi: 10.1109/ICPRS54038.2022.9854067.

Histological Image Segmentation

This repo contains the code to Test and Train the HistoSeg

HistoSeg is an Encoder-Decoder DCNN which utilizes the novel Quick Attention Modules and Multi Loss function to generate segmentation masks from histopathological images with greater accuracy.

HistoSeg Qualitative Results

HistoSeg Learning Curve

HistoSeg Quantitative Results

MoNuSeg GlaS
F1 IoU Dice F1 IoU Dice
75.08 71.06 95.20 98.07 76.73 99.09

Datasets used for trainig HistoSeg

MoNuSeg - Multi-organ nuclei segmentation from H&E stained histopathological images

link: https://monuseg.grand-challenge.org/

GlaS - Gland segmentation in histology images

link: https://warwick.ac.uk/fac/cross_fac/tia/data/glascontest/

Trained Weights are available in the repo to test the HistoSeg

For MoNuSeg Dataset link: https://github.com/saadwazir/HistoSeg/blob/main/HistoSeg_MoNuSeg_.h5

For GlaS Dataset link: https://github.com/saadwazir/HistoSeg/blob/main/HistoSeg_GlaS_.h5

Data Preprocessing for Training

After downloading the dataset you must generate patches of images and their corresponding masks (Ground Truth), & convert it into numpy arrays or you can use dataloaders directly inside the code. Note: The last channel of masks must have black and white (0,1) values not greyscale(0 to 255) values. you can generate patches using Image_Patchyfy. Link : https://github.com/saadwazir/Image_Patchyfy

For example to train HistoSeg on MoNuSeg Dataset, the distribution of dataset after creating pathes

X_train 1470x256x256x3 
y_train 1470x256x256x1
X_val 686x256x256x3
y_Val 686x256x256x1

Data Preprocessing for Testing

You just need to resize the images and their corresponding masks (Ground Truth) into same size i.e all the samples must have same resolution, and then convert it into numpy arrays.

For example to test HistoSeg on MoNuSeg Dataset, the shapes of dataset after creating numpy arrays are

X_test 14x1000x1000x3 
y_test 14x1000x1000x1

Requirements

pip install matplotlib
pip install seaborn
pip install tqdm
pip install scikit-learn
conda install tensorflow==2.7
pip install keras==2.2.4

Training

To train HistoSeg use the following command

python HistoSeg_Train.py --train_images 'path' --train_masks 'path' --val_images 'path' --val_masks 'path' --width 256 --height 256 --epochs 100 --batch 16

Testing

To test HistoSeg use the following command

python HistoSeg_Test.py --images 'path' --masks 'path' --weights 'path' --width 1000 --height 1000

For example to test HistoSeg on MoNuSeg Dataset with trained weights, use the following command
python HistoSeg_Test.py --images 'X_test_MoNuSeg_14x1000x1000.npy' --masks 'y_test_MoNuSeg_14x1000x1000.npy' --weights 'HistoSeg_MoNuSeg_.h5' --width 1000 --height 1000

HistoSeg - Quick attention with multi-loss function for multi-structure segmentation in digital histology images

histoseg's People

Contributors

saadwazir avatar

Stargazers

Frank Star avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.