Giter Club home page Giter Club logo

wsispdr's Introduction

Weakly Supervised Cell Instance Segmentation
by Propagating from Detection Response

by Kazuya Nishimura, Ker Dai Fei Elmer, Ryoma Bise

[Home] [Project] [Paper]

Illustration

Prerequisites

Installation

Python setting

Conda user

conda env create -f=requirement.yml
conda activate pytorch

Docker user

docker build ./docker
sh run_docker.sh

Graph-cut installation

Graph-cut setting

We use following code.

https://jp.mathworks.com/matlabcentral/fileexchange/38555-kernel-graph-cut-image-segmentation

mkdir graphcut 
cd graphcut
wget http://www.wisdom.weizmann.ac.il/~bagon/matlab_code/GCmex1.9.tar.gz
tar -zxvf GCmex1.9.tar.gz
matlab -nodesktop -nosplash -r 'compile_gc; exit'
cd ..

Demo

This demo is only one image's demo. If you want to apply this method to your dataset, you should prepare the likelihood map.

python main.py -g

Back propagate from each cell

Use cuda

python propagate_main.py -g

Use cpu

python detection_train.py 

Optins:

-i :input path(str)

-o :output path(str)

-w :weight path want to load

-g :whether use CUDA

Graph-cut

matlab -nodesktop -nosplash -r 'graphcut; exit'

This is a sample code.

We don't provide dataset.

If you want to apply your dataset, you should prepare the original image and point level annotation(cell centroid). The attached text file (sample_cell_position.txt) contains a cell position(frame,x,y) as each row. Prepare the same format text file for your dataset.

Generate likelyfood map

Set the variance to a value sufficiently larger than the target object. The guided backpropagation depends on variance size.

python likelymapgen.py 

Option:

-i :txt_file_path (str)

-o :output_path (str)

-w :width (int)

-h :height (int)

-g :gaussian variance size (int)

Train cell detection CNN

Use cuda

python detection_train.py -g

Use cpu

python detection_train.py 

Optins:

-t :train path(str)

-v :validation path(str)

-w :save path of weight(str)

-g :whether use CUDA

-b :batch size (default is 16)

-e :epochs (default is 500)

-l :learning rate(default is 1e-3)

Predict cell detection

Use cuda

python detection_predict.py -g

Use cpu

python detection_predict.py 

Optins:

-i :input path(str)

-o :output path(str)

-w :weight path want to load

-g :whether use CUDA

citation

If you find the code useful for your research, please cite:

@inproceedings{nishimura2019weakly,
  title={Weakly Supervised Cell Instance Segmentation by Propagating from Detection Response},
  author={Nishimura, Kazuya and Bise, Ryoma and others},
  booktitle={International Conference on Medical Image Computing and Computer-Assisted Intervention},
  pages={649--657},
  year={2019},
  organization={Springer}
}

wsispdr's People

Contributors

naivete5656 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

wsispdr's Issues

Data preparation

Hi,
I wanted to try your code on a dataset which has centroid (x,y) position given. Kindly, can you tell me what "frame" refers to in your txt file which has 3 things "frame", "x", "y".
Does "frame" refers to image name in your dataset ?

Where is the regional backpropagation implemented?

Dear Mr. Nishimura,
I have been reading your paper with interest and decided to look into the implementation (thank you very much for providing legible code) of the region backprop as defined in Eq. 5 in your paper "Weakly supervised cell instance segmentation under various conditions". However, I could not find it. The closest I got to a backpropagation based region proposal method was in the guided_model.py aroung lines 160-180, namely in the function call: img_grad.sum(1).clone().clamp(min=0).cpu().numpy(). What I read from this line is namely - the gradient used is the gradient w.r.t. the input, but with ReLU applied on it, which as far as I can see is not the same as in the paper.
Where am I wrong?
Your paper is really interesting and I would really appreciate your clarification. :)
Yours,
Erik

Where is util's evaluation code?

Hi, Thanks for sharing your work!

I want to know how to evaluate mDice score, so I've searched Evaluation code.
It may be in util's EvaluationMethods, but I couldn't find it.

Would you tell me where the evaluation code locates?

Generalization ability of this method

Hello
How are you?
Thanks for contributing this paper and project.
I have a question.
Do u think that this method can be used in the retail product segmentation.
Thanks

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.