Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dakomura authored Sep 5, 2022
1 parent 256f697 commit 0f530cd
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion mask_optimization/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This subdirectory provides scripts to mask optimization.
## scripts

### `1.apply_segmentation.py`
This script runs the segmentation models trained on the current dataset and save the results.
This script runs the segmentation models trained on the current dataset and save the results (requires MLFlow).

usage:
```
Expand All @@ -18,6 +18,11 @@ Input Variable | Description
--data_dir | input directory
--out_dir | output directory

Note: Please modify the source code so that the segmentation model can be loaded from MLFlow server (l.92-l.116).

output:
- segmentation mask predicted by the segmentation model, which ends with `.npy`

### `2.ridge_regression.py`
This script applies ridge regression between the IF-mask intensity and the output probabiities.

Expand All @@ -26,6 +31,9 @@ usage:
python 2.ridge_regression.py antibody
```

output:
- dataframe containing the number of pixels predicted as positive by the segmentation model and coefficient of ridge regression, which ends with `.npy`

### `3.IF_cutoff_optimization.py`
This script optimizes IF intensity cufoff.

Expand All @@ -34,6 +42,9 @@ usage:
python 3.IF_cutoff_optimization.py antibody
```

output:
- dataframe containing the updated IF threshold, which ends with `_otsu.pkl`

### `4_CELL.MCC_calculation.py`
This script calculates Matthew’s correlation coefficient (MCC) between the prediction and mask for leucocytes, myeloid cells, lymphocytes, plasma cells, and endothelial cells.

Expand All @@ -42,9 +53,17 @@ usage:
python 4_CELL.MCC_calculation.py antibody
```

output:
- dictionary containing MCC, which ends with `.pkl`


### `5_CELL.overlap_ratio_optimization.py`
This script optimizes the nucleus overlap cut-off based on the MCC.
usage:
```
python 5_CELL.overlap_ratio_optimization.py antibody
```

output:
- updated mask files, which ends with `_IHC_cellpose_mask.png` or `_IHC_nonrigid_mask2.png`

0 comments on commit 0f530cd

Please sign in to comment.