Skip to content

PhilipChicco/wsshisto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weakly Supervised Segmentation on Neural Compressed Histopathology

Repo-Updates

This repository is under continous updates.

Environment Requirements

Conda environment installation

conda env create --name wsshisto python=3.6
conda activate wsshisto
```
  • run pip install -r requirements.txt

Getting started

Datasets

  • Download WSI daatasets e.g. Camelyon16
  • Place datasets in appropriate locations.
  • Preprocess WSI to generate WSI thumbnails (normal/tumor) e.g. save as '001_tissue_fig.png', tumor mask from 'xml' annotations (001_tumor.png) all in a single folder (e.g. /cm16/WSI_ALL)
  • Refer to CLAM & DSMIL for pre-processing.
  • Extract patches from all training WSIs. Save patches and normalize (e.g. save in cm16/train/patches_norm/train/0). The folder (patches_norm/train/0) contains WSIs as folders (001/xx_patch.png .... xx_patch..png), each containing all the patches for that slide.

Train SimCLR encoder and Compress WSIs

  • Train the patch encoder (see configs/patch_enc.yml)
  • run python graph_research/train.py --config /path/to/patch_enc.yml
  • To compress WSIs using the trained encoder refer to Tellez et al. NIC
  • Save the compressed WSIs in a folder i.e., (/path/to/compressed/all/wsi/001.npy) as well as the masks (/path/to/compressed/all/label/001.npy)

Train | Test WSS

  • Train/test the benchmark UNet
  • run python graph_research/{train/test}.py --config ./graph_research/configs/wsi/neu_seg/wsi_seg.yml
  • Train/test proposed WSS-SS
  • run python graph_research/{train/test}.py --config ./graph_research/configs/wsi/neu_seg/wsi_ss_mask.yml

Models

  • To see more details on the proposed algorithm, refer to models/pooling/seam.py and trainers/wsi_ss_trainer.py

References

Our implementation builds upon several existing publicly available code.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages