Code Monkey home page Code Monkey logo

oeem's Introduction

OEEM

Note: this code is expected to be ready at middle June.

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 pretrained models and dataset, then link to codes.

git clone https://github.com/XMed-Lab/OEEM.git
cd OEEM
ln -s [path of patches for cls] classification/glas
ln -s [path of patches for seg] segmentation/glas
ln -s [path of models for cls] classification/weights
ln -s [path of models for seg] segmentation/models

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 [gpu device no.] -m [model_name]

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

python classification/prepare_seg_inputs.py -d [gpu device no.] -ckpt [best_model_name]

Split WSI pseudo-mask to patches for segmentation.

Train segmentation model.

4. Testing

Test segmentation model.

Merge patches and evaluation.

Results compared with WSSS for natural images:

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

5. Citation

License

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

oeem's People

Contributors

eli-yili avatar xmengli avatar yzouag avatar

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.