CellProfiler / CellProfiler-plugins

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

Cellpose Plugin -> Model Options for Cellpose 2.0 Unavailable #167

Closed jenna-tomkinson closed 1 year ago

jenna-tomkinson commented 1 year ago

@bethac07

Hi Beth!

After using the Cellpose plugin in CellProfiler, I noticed an inconsistency between the plugin and Cellpose 2.0.

The main issue is that the models within Cellpose 2.0 are not reflected within the Cellpose plugin Detection mode.

Specifically, in the runcellpose.py file, it states that the choice for Detection mode is based on:

model_dic = models.MODEL_NAMES

When I go to the MODEL_NAMES in the models.py file from Cellpose, it shows:

MODEL_NAMES = ['cyto','nuclei','tissuenet','livecell', 'cyto2', 'general', 'CP', 'CPx', 'TN1', 'TN2', 'TN3', 'LC1', 'LC2', 'LC3', 'LC4']

Within the Cellpose plugin in CellProfiler, I am only given three options in the Detection mode which are Cells, Nuclei, and Custom. This does not match the dictionary from above.

Thank you in advance for your help with this!

Jenna

jenna-tomkinson commented 1 year ago

@bdiazroh

Hi Barbara!

I noticed you implmented the change I am referencing above that I am having issues with in a previous commit (https://github.com/CellProfiler/CellProfiler-plugins/commit/74177f5bcd92ba6bc1132e9488e4e339c2c4af73).

What advice do you have for how to get CellProfiler to recognize the models from Cellpose 2.0. Currently, it seems to only recognize Cells, Nuclei, and Custom, which is what you had changed.

Thank you in advance for your assistance with this!

For reference: I do have Cellpose 2.1.0 installed in a CellProfiler conda environment.

jenna-tomkinson commented 1 year ago

@bethac07 @bdiazroh

I figured out the issue. It looks like the version of the runcellpose.py file was the old version that was referenced in the article for the Cellpose plugin for CellProfiler that I had downloaded when following the instructions.

Once I downloaded the most up to date version of the file from the plugins Github, it is now working properly with all of the functions.

Thank you!