All Projects → gatsby2016 → Fast-WSI-Prediction

gatsby2016 / Fast-WSI-Prediction

Licence: other
Unofficial implementation for ScanNet (a fast WSI prediction method) in PyTorch.

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to Fast-WSI-Prediction

claire
Constrained Large Deformation Diffeomorphic Image Registration (CLAIRE)
Stars: ✭ 30 (+50%)
Mutual labels:  medical-image-computing
NMRI
2D Fourier Transform of Nuclear Magnetic Resonance Imaging raw data
Stars: ✭ 13 (-35%)
Mutual labels:  medical-image-computing
cornerstone widget
A jupyter widget for the cornerstone library to make showing flashy images with nice tools easier.
Stars: ✭ 25 (+25%)
Mutual labels:  medical-image-computing
grouped-ssd-pytorch
PyTorch implementation of Grouped SSD (GSSD) and GSSD++ for focal liver lesion detection from multi-phase CT images (MICCAI 2018, IEEE TETCI 2021)
Stars: ✭ 36 (+80%)
Mutual labels:  medical-image-computing
nnDetection
nnDetection is a self-configuring framework for 3D (volumetric) medical object detection which can be applied to new data sets without manual intervention. It includes guides for 12 data sets that were used to develop and evaluate the performance of the proposed method.
Stars: ✭ 355 (+1675%)
Mutual labels:  medical-image-computing
FocusLiteNN
Official PyTorch and MATLAB implementations of our MICCAI 2020 paper "FocusLiteNN: High Efficiency Focus Quality Assessment for Digital Pathology"
Stars: ✭ 28 (+40%)
Mutual labels:  pathological-images
Paper-Notes
Paper notes in deep learning/machine learning and computer vision
Stars: ✭ 37 (+85%)
Mutual labels:  medical-image-computing
Monai
AI Toolkit for Healthcare Imaging
Stars: ✭ 2,568 (+12740%)
Mutual labels:  medical-image-computing
wolfpacs
WolfPACS is an DICOM load balancer written in Erlang.
Stars: ✭ 1 (-95%)
Mutual labels:  medical-image-computing
modelhub
A collection of deep learning models with a unified API.
Stars: ✭ 59 (+195%)
Mutual labels:  medical-image-computing

Fast WSI Prediction

Fast WSI prediction by ScanNet in PyTorch.

Aim: undergraduate course

Invasive Ductal Carcinoma (IDC) detection on Whole Slide Image (WSI) by deep learning method equipped with ScanNet fully conv. scheme for fast WSI prediction.

Data

279 slides with IDC ROI annotations.
Ratio of 6:2:2 for training, validation and testing separation.

Tiling small patch with 50*50 at 2.5x magnification for non-IDC and IDC class, binary classification task.

patches distribution non-IDC IDC
training 111090 49204
validation 45356 15354
testing 42292 14228

Method

  1. Replace the original VGG with VGG_fullyConv for training
  2. Train the VGG_fullyConv model for classification, same as original training process
  3. Check the performance on Validation dataset and select the best model in terms of F1 score
  4. Test and evaluate your trained VGG_fullyConv model on Testing dataset in patch-level
  5. Input the block with bigger size, Infer and predict the probability map for one WSI and show it!

HotSpot

We significantly improve the inferring time by the ScanNet scheme.

Implementation

Replaced the last GAP and fc. in VGG with AvgPooling with 2x2 kernel size followed by 2 convs with 1x1 kernel, s6_predWSI.py

self.avgpool = nn.AvgPool2d(kernel_size=2, stride=2)

self.classifier = nn.Sequential(
    nn.Conv2d(out_channel, out_channel, kernel_size=1, stride=1),
    nn.BatchNorm2d(out_channel),
    nn.ReLU(inplace=True),
    nn.Conv2d(out_channel, num_classes, kernel_size=1, stride=1))

Also, we modify the VGG network due to our small training size, and, we remove padding operation in convolutional layer to avoid the border effect arcoss testing blocks. You can refer to myModelVgg.py for more details.
The overall network structure for our architecture is shown:

Our overall network structure

Noting: The core part for Fast WSI is the step of sliding window of testing block. You can refer to s6_predWSI.py for details in function fast_wsi_pred()

Result

When training

We shows the curves of training loss and validation accuracy, see below:

Training loss curve Validation accuracy

Independent testing evaluation (patch-level)

Confusion matrics Postive pred Negtive pred
Postive 11041 3187 = 14228
Negtive 3391 38901 = 42292
  • Accuracy : 0.8836
  • Specificity : 0.9198
  • Recall : 0.7760
  • Precision : 0.7650
  • F1Score : 0.7705

WSI probability map prediction (slide-level)

The valuable thing is that we achieve a fast WSI prediction method, not accuracy or performance improvement.
We show one WSI prediction probability map below, the size of the original WSI is 13440*10560, and the size of the output prediction map is 834*654.
it only takes about 4s!

Original WSI Image Predicted Prob. Maps
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].