Giter Club home page Giter Club logo

cellseg-sribd's Introduction

Solution of SRIBD-Med Team for NeurIPS2022-CellSeg Challenge

BEFORE YOU RAISE AN ISSUE, PLEASE SEND YOUR QUESTIONS TO [email protected] AND [email protected]

Institution: Shenzhen Research Institute of Big Data (SRIBD, http://www.sribd.cn/)
Authors: Wei Lou*, Xinyi Yu*, Chenyu Liu*, Xiang Wan, Guanbin Li, Siqi Liu, Haofeng Li# (http://haofengli.net/)

This repository provides the solution of team Sribd-med for NeurIPS-CellSeg Challenge. The details of our method are described in our paper [Multi-stream Cell Segmentation with Low-level Cues for Multi-modality Images]. Some parts of the codes are from the baseline codes of the NeurIPS-CellSeg-Baseline repository,

You can reproduce our method as follows step by step:

Environments and Requirements:

Install requirements by

python -m pip install -r requirements.txt

Dataset

The competition training and tuning data can be downloaded from https://neurips22-cellseg.grand-challenge.org/dataset/ Besides, you can download three publiced data from the following link: Cellpose: https://www.cellpose.org/dataset  Omnipose: http://www.cellpose.org/dataset_omnipose Sartorius: https://www.kaggle.com/competitions/sartorius-cell-instance-segmentation/overview 

Automatic cell classification

You can classify the cells into four classes in this step. Put all the images (competition + Cellpose + Omnipose + Sartorius) in one folder (data/allimages). Run classification code:

python classification/unsup_classification.py

The results can be stored in data/classification_results/

CNN-base classification model training

Using the classified images in data/classification_results/. A resnet18 is trained:

python classification/train_classification.py

Segmentation Training

Pre-training convnext-stardist using all the images (data/allimages).

python train_convnext_stardist.py

For class 0,2,3 finetune on the classified data (Take class1 as a example):

python finetune_convnext_stardist.py model_dir=(The pretrained convnext-stardist model) data_dir='data/classification_results/class1'

For class 1 train the convnext-hover from scratch using classified class 1 data.

python train_convnext_hover.py data_dir='data/classification_results/class3'

Finally, four segmentation models will be trained.

Trained models

The models can be downloaded from this link: https://drive.google.com/drive/folders/1MkEOpgmdkg5Yqw6Ng5PoOhtmo9xPPwIj?usp=sharing

Docker environment:

docker push lewislou/sribd-cellseg:tagname

Inference

The inference process includes classification and segmentation.

python predict.py -i input_path -o output_path --model_path './models' 

Colab codes for model inference: https://colab.research.google.com/drive/1Dk6V6vm0IqaIevjAyjUTuR1nZfT6EvCh?usp=sharing

Evaluation

Calculate the F-score for evaluation:

python compute_metric.py --gt_path path_to_labels --seg_path output_path

Finetue on a new dataset

We provide a jupyter notebook to train our model on a new dataset - cellpose step by step. The notebook codes are in the folder fintune_on_newdataset/finetune.py

Results

The tuning set F1 score of our method is 0.8795. The rank running time of our method on all the 101 cases in the tuning set is zero in our local workstation.

Acknowledgement

We thank the contributors of public datasets and the organizers of the competition. We thank for the support from the Shenzhen Research Institute of Big Data (SRIBD, http://www.sribd.cn/)

cellseg-sribd's People

Contributors

lewislou avatar xinyiyu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cellseg-sribd's Issues

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.