|
1 |
| -# Cell Segmentation Evaluator: evaluation of cell segmentation methods without reference segmentations |
2 |
| -Haoran Chen and Robert F. Murphy\ |
3 |
| -Carnegie Mellon University\ |
4 |
| -V1.0.2 Aug 24, 2022 |
5 |
| - |
6 |
| -## Description of idea |
7 |
| -We present here an approach that seeks to evaluate cell segmentation methods without relying upon comparison to results from humans. |
8 |
| -For this, we defined a series of segmentation quality metrics that can be applied to multichannel fluorescence images. |
9 |
| -We calculated these metrics for 11 previously-described segmentation methods applied to datasets from 4 multiplexed microscope modalities covering 5 tissues. |
10 |
| -Using principal component analysis to combine the metrics we defined an overall cell segmentation quality score and ranked the segmentation methods. |
11 |
| - |
12 |
| -## Use of package |
13 |
| -This package allows users to |
14 |
| -1. Reproduce all results that we generated for the paper on multichannel images from HuBMAP public portal. |
15 |
| -2. Seek the most suitable segmentation method for one or a batch of multichannel images. |
16 |
| -3. Obtain the segmentation quality score on given segmentation masks. |
17 |
| - |
18 |
| -The package was tested under Ubuntu 18.04 LTS. |
19 |
| - |
20 |
| - |
21 |
| -## Execution |
22 |
| -### Step 0: Setup environment |
23 |
| -```bash |
24 |
| -pip install -r requirements.txt |
25 |
| -``` |
26 |
| - |
27 |
| -### Step 1: Setup configuration file |
28 |
| -```bash |
29 |
| -python generate_config.py |
30 |
| -``` |
31 |
| -This step generates config.json which contains all configurational parameters and options in order to run the evaluation pipeline. The users will be asked a series of questions about how they would like to utilize this package. The answers will be stored in config.json for the pipeline to read. Meanwhile, all necessay data, softwares and dependencies will also be automatically downloaded or installed based on users' responses. |
32 |
| - |
33 |
| -### Step 2: Run the pipeline |
34 |
| -```bash |
35 |
| -python run_pipeline.py configuration_file_path |
36 |
| -``` |
37 |
| -This step runs the evaluation pipeline given the generated configuration file. |
38 |
| - |
39 |
| -## Segmentation masks of HuBMAP images |
40 |
| -All segmentation masks and evaluation results we generated for the paper can be download from Google Drive folder below: |
41 |
| - |
42 |
| -https://drive.google.com/drive/folders/14tw4qrXWTt2eg64zOpYjE9cZ7OFo1i6b?usp=sharing |
43 |
| - |
44 |
| -The segmentation masks would be automatically downloaded if you choose to reproduce all results of the paper at step 1 above. |
45 |
| - |
46 |
| -## Documentation |
47 |
| - |
48 |
| -For more detailed introduction of segmentation quality metrics among other image quality metrics, please see |
49 |
| -[HuBMAP Image Quality Control Metrics](http://hubmap.scs.cmu.edu/wp-content/uploads/2021/09/HuBMAP-Image-Quality-Control-Metrics-v1.5.pdf) |
50 |
| - |
51 |
| -## Citation |
52 |
| -If you find our package useful in your research, please cite our bioRxiv paper: |
53 |
| -> Chen, Haoran, and Robert F. Murphy. "Evaluation of cell segmentation methods without reference segmentations." bioRxiv (2022): 2021-09. |
54 |
| -
|
55 |
| -## Contact |
56 |
| - |
57 |
| -Robert F. Murphy - [email protected]\ |
58 |
| - |
59 |
| - |
| 1 | +# Cell Segmentation Evaluator: evaluation of cell segmentation methods without reference segmentations |
| 2 | +Haoran Chen and Robert F. Murphy and Ted Zhang\ |
| 3 | +Carnegie Mellon University\ |
| 4 | +V1.2 Jan 05, 2023 |
| 5 | + |
| 6 | +## Cell Segmentation Approach |
| 7 | +This package implements an approach for cell segmentation evaluation (CSE) without relying upon comparison to results from humans. |
| 8 | +For this, we defined a series of segmentation quality metrics that can be applied to multichannel fluorescence images. |
| 9 | +We calculated these metrics for 11 previously-described segmentation methods applied to 2D images from 4 multiplexed microscope modalities covering 5 tissues. |
| 10 | +Using principal component analysis to combine the metrics we defined an overall cell segmentation quality score. |
| 11 | +We also defined similar metrics and quality score for 3D images. |
| 12 | + |
| 13 | +Reference: Haoran Chen and Robert F. Murphy (2022) Evaluation of cell segmentation methods without reference segmentations. Molecular Biology of the Cell. https://doi.org/10.1091/mbc.E22-08-0364 |
| 14 | + |
| 15 | +## Package contents |
| 16 | +This package contains two implementations of the cell segmentation metrics as well as example images for testing. The first implementation ("SimpleCSE") just calculates metrics and quality score for one or more images and corresponding cell segmentation masks. |
| 17 | +It was tested on python >=3.8 under Ubuntu 18.04 LTS. |
| 18 | + |
| 19 | +## SimpleCSE |
| 20 | + |
| 21 | +This folder contains a simplified version of the CSE that calculate the metrics and quality score given a multichannel image and a corresponding cell mask. |
| 22 | + |
| 23 | +It is provided as a python main program and as an example Jupyter Notebook ("SegEvalExample.ipynb"). |
| 24 | + |
| 25 | +The multichannel image should be in a format readable by AICSimageio (e.g., OME TIFF). The masks should be in a similar format with an indexed image for cell masks in the first channel and an indexed image (with corresponding indices) for nuclear masks in the second channel. |
| 26 | + |
| 27 | +The output is a JSON file with the metrics and the scores. |
| 28 | + |
| 29 | +## Execution from command line |
| 30 | +### Step 1: |
| 31 | +Download the "SimpleCSE" folder and change your default directory ("cd SimpleCSE") to that folder |
| 32 | +### Step 2: |
| 33 | +Run |
| 34 | +```bash |
| 35 | +pip install -r requirements.txt |
| 36 | +``` |
| 37 | +### Step 3 |
| 38 | +Run |
| 39 | +```bash |
| 40 | +python seg_eval_main.py --img-dir [img_dir_path] --mask-dir [mask_dir_path] |
| 41 | +``` |
| 42 | +Please download and extract example images and masks from [example_data.zip](https://drive.google.com/file/d/1qtAbPQBiU4SxXFDxl-UhOShTaQszB1Ca/view?usp=share_link). The "example_data" folder contains example 2D CODEX and 3D IMC images and their corresponding cell masks. To run them, download the example data use |
| 43 | + |
| 44 | +python seg_eval_main.py --img-dir [example_data/imgs/2D_CODEX.ome.tiff] --mask-dir [example_data/masks/2D_CODEX.ome.tiff] |
| 45 | + |
| 46 | +python seg_eval_main.py --img-dir [example_data/imgs/3D_IMC.ome.tiff] --mask-dir [example_data/masks/3D_IMC.ome.tiff] |
| 47 | + |
| 48 | + |
| 49 | +##full CSE pipeline |
| 50 | + |
| 51 | +This implementation can be used to seek the most suitable segmentation method for one or a batch of multichannel images. |
| 52 | + |
| 53 | +## Execution: find most suitable segmentation method for multichannel images |
| 54 | +### Step 1: |
| 55 | +Download "full_pipeline" folder and change your default directory to that folder |
| 56 | +### Step 2: Setup environment |
| 57 | +```bash |
| 58 | +pip install -r requirements.txt |
| 59 | +``` |
| 60 | + |
| 61 | +### Step 3: Setup configuration file |
| 62 | +```bash |
| 63 | +python generate_config.py |
| 64 | +``` |
| 65 | +This step generates config.json which contains all configurational parameters and options in order to run the evaluation pipeline. The user will be asked a series of questions about how they would like to utilize this package. The answers will be stored in config.json for the pipeline to read. Meanwhile, all necessary data, software and dependencies will also be automatically downloaded or installed based on user responses. |
| 66 | + |
| 67 | +### Step 4: Run the pipeline |
| 68 | +```bash |
| 69 | +python run_pipeline.py configuration_file_path |
| 70 | +``` |
| 71 | +This step runs the evaluation pipeline given the generated configuration file. |
| 72 | + |
| 73 | +## Segmentation masks of HuBMAP images |
| 74 | +All segmentation masks and evaluation results we generated for the paper can be download from the Google Drive folder below: |
| 75 | + |
| 76 | +https://drive.google.com/drive/folders/14tw4qrXWTt2eg64zOpYjE9cZ7OFo1i6b?usp=sharing |
| 77 | + |
| 78 | +The segmentation masks will be automatically downloaded if you choose to reproduce all results of the paper at step 1 above. |
| 79 | + |
| 80 | +## Documentation |
| 81 | + |
| 82 | +For more detailed introduction of segmentation quality metrics among other image quality metrics, please see |
| 83 | +[HuBMAP Image Quality Control Metrics](http://hubmap.scs.cmu.edu/wp-content/uploads/2021/09/HuBMAP-Image-Quality-Control-Metrics-v1.5.pdf) |
| 84 | + |
| 85 | + |
| 86 | +## Contact |
| 87 | + |
| 88 | +Robert F. Murphy - [email protected]\ |
| 89 | + |
0 commit comments