Giter VIP home page Giter VIP logo

xmed-lab / oeem Goto Github PK

View Code? Open in Web Editor NEW
33.0 1.0 5.0 3.53 MB

MICCAI 2022: Online Easy Example Mining for Weakly-supervised Gland Segmentation from Histology Images

License: MIT License

Python 30.22% Jupyter Notebook 69.55% Dockerfile 0.03% Makefile 0.02% Batchfile 0.03% Shell 0.15%
weakly-supervised-segmentation gland-tissue-segmentation histological-images medical-imaging example-mining

oeem's Introduction

OEEM

Yi Li*, Yiduo Yu*, Yiwen Zou*, Tianqi Xiang, Xiaomeng Li, "Online Easy Example Mining for Weakly-supervised Gland Segmentation from Histology Images", MICCAI 2022 (Accepted). [paper]

1. Introduction

This framework is designed for histology images, containing two stages. The first classification stage generates pseudo-masks for pathes. And the segmentation stage uses OEEM to mitigate the noise in pseudo-masks dynamically.

framework visualization

1. Environment

This code has been tested with Python 3.7, PyTorch 1.10.2, CUDA 11.3 mmseg 0.8.0 and mmcv 1.4.0 on Ubuntu 20.04.

2. Preparation

Download resources (dataset, weights) with extract code snb3, then link to codes.

git clone https://github.com/XMed-Lab/OEEM.git
cd OEEM
ln -s OEEM_resources/glas_cls classification/glas
ln -s OEEM_resources/glas_seg segmentation/glas
ln -s OEEM_resources/weights classification/weights
ln -s OEEM_resources/weights segmentation/weights

Install library dependencies

pip install -r requirements.txt

Install mmsegentation.

cd segmentation
pip install -U openmim
mim install mmcv-full==1.4.0
pip install -v -e .

3. Training

Train classification model.

python classification/train.py -d 0 -m res38d

Generate pseudo-mask (WSI size). The output will be in [model_name]_best_train_pseudo_mask folder.

python classification/prepare_seg_inputs.py -d 0 -ckpt res38d_best

Split WSI pseudo-mask to patches for segmentation.

python segmentation/tools/crop_img_and_gt.py segmentation/glas/images classification/res38d_best_train_pseudo_mask segmentation/glas

Train segmentation model.

cd segmentation
bash tools/dist_train.sh configs/pspnet_oeem/pspnet_wres38-d8_10k_histo.py 1 runs/oeem

4. Testing

Test segmentation model.

cd segmentation
bash tools/dist_test.sh configs/pspnet_oeem/pspnet_wres38-d8_10k_histo_test.py runs/oeem/[name of best ckpt] 1

Merge patches and evaluation.

python tools/merge_patches.py glas/test_patches glas/test_wsi 2
python tools/count_miou.py glas/test_wsi glas/gt_val 2

Results compared with WSSS for natural images:

Method mIoU Dice
SEAM 66.11% 79.59%
Adv-CAM 68.54% 81.33%
SC-CAM 71.52% 83.40%
Ours 77.56% 87.36%

5. Citation

@misc{https://doi.org/10.48550/arxiv.2206.06665,
  doi = {10.48550/ARXIV.2206.06665},
  url = {https://arxiv.org/abs/2206.06665},
  author = {Li, Yi and Yu, Yiduo and Zou, Yiwen and Xiang, Tianqi and Li, Xiaomeng},
  keywords = {Computer Vision and Pattern Recognition (cs.CV), Artificial Intelligence (cs.AI), FOS: Computer and information sciences, FOS: Computer and information sciences},
  title = {Online Easy Example Mining for Weakly-supervised Gland Segmentation from Histology Images},
  publisher = {arXiv},
  year = {2022},
  copyright = {Creative Commons Attribution 4.0 International}
}

License

This repository is released under MIT License (see LICENSE file for details).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.