/hover_net

Simultaneous Nuclear Instance Segmentation and Classification in H&E Histology Images.

Primary LanguagePythonMIT LicenseMIT

HoVer-Net: Simultaneous Segmentation and Classification of Nuclei in Multi-Tissue Histology Images

A multiple branch network that performs nuclear instance segmentation and classification within a single network. The network leverages the horizontal and vertical distances of nuclear pixels to their centres of mass to separate clustered cells. A dedicated up-sampling branch is used to classify the nuclear type for each segmented instance.

This is an extended version of our previous work: XY-Net.

Link to Medical Image Analysis paper.

NEWS: We have now released an inference version of HoVer-Net with WSI-processing capability trained on ~200,000 nuclei. For further information, click here.

Set Up Environment

conda create --name hovernet python=3.6
conda activate hovernet
pip install -r requirements.txt

Dataset

Download the CoNSeP dataset as used in our paper from this link.
Download the Kumar, CPM-15, CPM-17 and TNBC datsets from this link.

Ground truth files are in .mat format, refer to the README included with the datasets for further information.

Repository Structure

  • src/ contains executable files used to run the model. Further information on running the code can be found in the corresponding directory.
  • loader/contains scripts for data loading and self implemented augmentation functions.
  • metrics/contains evaluation code.
  • misc/contains util scripts.
  • model/ contains scripts that define the architecture of the segmentation models.
  • opt/ contains scripts that define the model hyperparameters.
  • postproc/ contains post processing utils.
  • config.py is the configuration file. Paths need to be changed accordingly.
  • train.py and infer.py are the training and inference scripts respectively.
  • process.py is the post processing script for obtaining the final instances.
  • extract_patches.py is the patch extraction script.

HoVer-Net

Citation

If any part of this code is used, please give appropriate citation to our paper.

BibTex entry:

@article{graham2019hover,
  title={Hover-net: Simultaneous segmentation and classification of nuclei in multi-tissue histology images},
  author={Graham, Simon and Vu, Quoc Dang and Raza, Shan E Ahmed and Azam, Ayesha and Tsang, Yee Wah and Kwak, Jin Tae and Rajpoot, Nasir},
  journal={Medical Image Analysis},
  pages={101563},
  year={2019},
  publisher={Elsevier}
}

Overlaid Segmentation and Classification Prediction

Segmentation

The colour of the nuclear boundary denotes the type of nucleus.
Blue: epithelial
Red: inflammatory
Green: spindle-shaped
Cyan: miscellaneous

Authors

Additional Implementations available

Getting Started

Install the required libraries before using this code. Please refer to requirements.txt

Results

All comparative results on the CoNSeP, Kumar and CPM-17 datasets can be found here.

Extra

The cell profiler pipeline that we used in our comparative experiments can be found here.

Companion Sites

The same version of this repository is officially available on the following sites for collection/affiliation purpose

License

This project is licensed under the MIT License - see the LICENSE file for details