Repository : https://github.com/YAI-Medical/cancer-instance-segmentation-from-tissue
YAI 8th 2021 Fall Project - Medical Project Team
-
Team Leader : Dongha Kim - Yonsei Univ. College of Medicine.
-
Team Member : Donggeon Bae - Yonsei. Univ. Dept. of Electrical and Electronic Engineering.
-
Team Member : Junho Lee - Yonsei Univ. Dept. of Computer Engineering.
Cancer Instance Segmentation and Classification Dataset
This dataset, also known as PanNuke, contains semi automatically generated nuclei instance segmentation and classification images with exhaustive nuclei labels across 19 different tissue types. The dataset consists of 481 visual fields, of which 312 are randomly sampled from more than 20K whole slide images at different magnifications, from multiple data sources.
In total the dataset contains 205,343 labeled nuclei, each with an instance segmentation mask. Models trained on PanNuke can aid in whole slide image tissue type segmentation, and generalise to new tissues.
19 Tissue types (Breast, Colon, Bile-duct, Esophagus, Uterus, Lung, Cervix, Head&Neck, Skin, Adrenal Gland, Kidney, Stomach, Prostate, Testis, Liver, Thyroid, Pancreas, Ovary, Bladder). Note, that it also unifies existing datasets within it, we have carefully labelled these under a single nuclei categories schema that is common to all 19 tissues.
This particular directory includes training patches of size 256x256 and their masks, this is one of the folds. In total there are more than 7 thousand training patches within all the three folds.
The files within each fold directories are:
-
images.npy
- image patches of 256x256 -
masks.npy
an array of 6 channel instance-wise masks (0: Neoplastic cells, 1: Inflammatory, 2: Connective/Soft tissue cells, 3: Dead Cells, 4: Epithelial, 6: Background) -
types.npy
tissue type that a given path was extracted from.
DeepLabV3 + Resnet101: Baseline
-
Paper: Arxiv 1706.05587
-
Implementation: Pytorch Vision
U-Net
-
Paper: Arxiv 1505.04597
-
Implementation: models/unet.py
Inception U-Net
-
Paper: ACM 10.1145/3376922
-
Implementation: models/unet.py
RefineNet
-
Paper: Arxiv 1611.06612
-
Implementation: models/refinenet.py
-
Cost function - Hybrid Loss
$$ \text{Loss} = 2\times \text{BCE } + 2 \times \text{Dice } + \text{IoU} $$ - Binary Cross Entropy
$$ \text{BCE} = - \sum _{i=1} ^{\text{output size}} y_i \cdot \log {\hat{y}_i} $$ - Dice Coefficient
$$ \text{Dice} = \frac{2\times\text{TP}}{(\text{TP} + \text{FP}) + (\text{TP} + \text{FN})} $$ - Intersection over Union
$$ \text{IoU} = \frac{\text{Dice}}{2-\text{Dice}} $$ -
Optimizing - Stochastic Gradient Descent with Adam
- Learning Rate Scheduling - Cosine Annealing Warm Up Restarts (See Graph Below)
All non-necessary codes are modularized as package. Watch all codes in github repository.