CellProfiler / CellProfiler-plugins

Community-contributed and experimental CellProfiler modules.
http://plugins.cellprofiler.org/
54 stars 65 forks source link

updated runcellpose.py #245

Closed ShataDg closed 2 months ago

ShataDg commented 2 months ago

Problem

Cellpose v2 while reading images converts to float and normalizes the image by setting the first percentile to 0, the 99th percentile to 1, and scaling the image to those values (while clipping the top and the bottom of the distribution). As this operation is not included when images are loaded in CellProfiler, this step may lead to a mismatch in segmentation when using the Cellpose app vs using the RunCellpose plugin within CellProfiler.

Update

To solve this issue, a setting has been added to allow people to rescale their images before segmenting it through RunCellpose. The default option for this is "yes" and upgrade settings has been set to "no".