DRCA-net(distance regression and classification with attention) is a convolutional neural network developed using tensorflow and tensorpack. In this work i perform nuclei instance segmentation and type classification in parallel using an end-to-end trainable multi-branch convolutional neural network which uses attention mechanism for feature refinment and higher accuracy.We have experimented our network with four diffenet H&E stained multi-tissue datasets.
Overall architecture of the model showcasing base shared feature encoder and three different attention incorporated branches
Classification results on PanNuke dataset
Instance Segmentation results on the four datasets that we have used
Install all dependecies mentioned in the requirements text file
pip install -r requirements.txt
Dataset download links
The project is configured to run PanNuke dataset
CoNSeP (https://warwick.ac.uk/fac/sci/dcs/research/tia/data/hovernet/)
Kumar,TNBC,CPM-15 and CPM-17 (https://drive.google.com/open?id=1l55cv3DuY-f7-JotDN7N5nbNnjbLWchK).
PanNuke dataset (https://warwick.ac.uk/fac/sci/dcs/research/tia/data/pannuke/)
Preprocessing steps before training
Use the python scripts in the panNukePrecprocess/
folder to process panNuke dataset. make necessary directory configurations.
Create patches by running the file extract_patches/
, provide the directory paths in the script file.
Training
Change hypermeters in the opt/hover.py
file, select batch size according to your available GPU memmory.
In config.py
file , enter paths of extracted training and validation patches.
run file train.py
using command python train.py --gpu="0,1"
select gpus according to your specific scnenerio.
Inference and performance calculation
run file infer.py
after training , post process your model output by running script process.py
finally setup directories in the compute_stats.py
file and run this file by providing mode to --mode
flag either instance
or type
For PanNuke classification calculations use file convert.py
to create .mat
format ground-truth masks necessary for calculation prediction performance.