Lewislou commited on
Commit
c72844f
1 Parent(s): ebe155d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +90 -14
README.md CHANGED
@@ -1,18 +1,94 @@
1
  ---
2
- # Example metadata to be added to a model card.
3
- # Full model card template at https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/templates/modelcard_template.md
4
- language:
5
- - {en} # Example: en
6
- license: {apache-2.0} # Example: apache-2.0 or any license from https://hf.co/docs/hub/repositories-licenses
7
- library_name: {library_name} # Optional. Example: keras or any library from https://github.com/huggingface/hub-docs/blob/main/js/src/lib/interfaces/Libraries.ts
8
- tags:
9
- - {cell segmentation} # Example: audio
10
- - {stardist} # Example: automatic-speech-recognition
11
- - {hover-net} # Example: speech # Example to specify a library: allennlp
12
- datasets:
13
- - {nips_cell_seg} # Example: common_voice. Use dataset id from https://hf.co/datasets
14
- metrics:
15
- - {f-score} # Example: wer. Use metric id from https://hf.co/metrics
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
 
18
 
 
1
  ---
2
+ # For reference on model card metadata, see the spec: https://github.com/huggingface/hub-docs/blob/main/modelcard.md?plain=1
3
+ # Doc / guide: https://huggingface.co/docs/hub/model-cards
4
+ {{ card_data }}
5
+ ---
6
+
7
+ # Model Card for {{ model_id | default("Model ID", true) }}
8
+
9
+ <!-- Provide a quick summary of what the model is/does. -->
10
+
11
+ 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,
12
+
13
+ You can reproduce our method as follows step by step:
14
+
15
+
16
+ ### How to Get Started with the Model
17
+
18
+ Install requirements by python -m pip install -r requirements.txt
19
+
20
+ ## Training Details
21
+
22
+ ### Training Data
23
+
24
+ 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
25
+
26
+ ## Environments and Requirements:
27
+ Install requirements by
28
+
29
+ ```shell
30
+ python -m pip install -r requirements.txt
31
+ ```
32
+
33
+ ## Dataset
34
+ The competition training and tuning data can be downloaded from https://neurips22-cellseg.grand-challenge.org/dataset/
35
+ Besides, you can download three publiced data from the following link:
36
+ Cellpose: https://www.cellpose.org/dataset 
37
+ Omnipose: http://www.cellpose.org/dataset_omnipose
38
+ Sartorius: https://www.kaggle.com/competitions/sartorius-cell-instance-segmentation/overview 
39
+
40
+ ## Automatic cell classification
41
+ You can classify the cells into four classes in this step.
42
+ Put all the images (competition + Cellpose + Omnipose + Sartorius) in one folder (data/allimages).
43
+ Run classification code:
44
+
45
+ ```shell
46
+ python classification/unsup_classification.py
47
+ ```
48
+ The results can be stored in data/classification_results/
49
+
50
+ ## CNN-base classification model training
51
+ Using the classified images in data/classification_results/. A resnet18 is trained:
52
+ ```shell
53
+ python classification/train_classification.py
54
+ ```
55
+ ## Segmentation Training
56
+ Pre-training convnext-stardist using all the images (data/allimages).
57
+ ```shell
58
+ python train_convnext_stardist.py
59
+ ```
60
+ For class 0,2,3 finetune on the classified data (Take class1 as a example):
61
+ ```shell
62
+ python finetune_convnext_stardist.py model_dir=(The pretrained convnext-stardist model) data_dir='data/classification_results/class1'
63
+ ```
64
+ For class 1 train the convnext-hover from scratch using classified class 3 data.
65
+ ```shell
66
+ python train_convnext_hover.py data_dir='data/classification_results/class3'
67
+ ```
68
+
69
+ Finally, four segmentation models will be trained.
70
+
71
+ ## Trained models
72
+ The models can be downloaded from this link:
73
+ https://drive.google.com/drive/folders/1MkEOpgmdkg5Yqw6Ng5PoOhtmo9xPPwIj?usp=sharing
74
+
75
+ ## Inference
76
+ The inference process includes classification and segmentation.
77
+ ```shell
78
+ python predict.py -i input_path -o output_path --model_path './models'
79
+ ```
80
+
81
+ ## Evaluation
82
+ Calculate the F-score for evaluation:
83
+ ```shell
84
+ python compute_metric.py --gt_path path_to_labels --seg_path output_path
85
+ ```
86
+
87
+ ## Results
88
+ 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
89
+ workstation.
90
+
91
+
92
 
93
 
94