|
58 | 58 | and the mask reconstruction algorithm for Omnipose that was created to solve over-segemnation of large cells; useful for bacterial cells, |
59 | 59 | but can be used for other arbitrary and anisotropic shapes. You can mix and match Omnipose models with Cellpose style masking or vice versa. |
60 | 60 |
|
61 | | -The module has been updated to be compatible with the latest release of Cellpose. From the old version of the module the 'cells' model corresponds to 'cyto2' model. |
| 61 | +The module is compatible with Cellpose 1.0.2 >= 2.3.2. From the old version of the module the 'cells' model corresponds to 'cyto2' model. |
62 | 62 |
|
63 | | -Installation: |
| 63 | +You can run this module using Cellpose installed to the same Python environment as CellProfiler. Alternatively, you can |
| 64 | +run this module using Cellpose in a Docker that the module will automatically download for you so you do not have to perform |
| 65 | +any installation yourself. |
64 | 66 |
|
65 | | -It is necessary that you have installed Cellpose version >= 1.0.2 |
66 | | -
|
67 | | -You'll want to run `pip install cellpose` on your CellProfiler Python environment to setup Cellpose. If you have an older version of Cellpose |
68 | | -run 'python -m pip install cellpose --upgrade'. |
| 67 | +To install Cellpose in your Python environment: |
| 68 | +You'll want to run `pip install cellpose==2.3.2` on your CellProfiler Python environment to setup Cellpose. If you have an older version of Cellpose |
| 69 | +run 'python -m pip install --force-reinstall -v cellpose==2.3.2'. |
69 | 70 |
|
70 | 71 | To use Omnipose models, and mask reconstruction method you'll want to install Omnipose 'pip install omnipose' and Cellpose version 1.0.2 'pip install cellpose==1.0.2'. |
71 | 72 |
|
|
84 | 85 | """ |
85 | 86 |
|
86 | 87 | "Select Cellpose Docker Image" |
87 | | -CELLPOSE_DOCKER_NO_PRETRAINED = "cellprofiler/runcellpose_no_pretrained:0.1" |
88 | | -CELLPOSE_DOCKER_IMAGE_WITH_PRETRAINED = "cellprofiler/runcellpose_with_pretrained:0.1" |
| 88 | +CELLPOSE_DOCKER_NO_PRETRAINED_v232 = "cellprofiler/runcellpose_no_pretrained:2.3.2" |
| 89 | +CELLPOSE_DOCKER_IMAGE_WITH_PRETRAINED_v232 = "cellprofiler/runcellpose_with_pretrained:2.3.2" |
| 90 | +CELLPOSE_DOCKER_NO_PRETRAINED_v220 = "cellprofiler/runcellpose_no_pretrained:2.2" |
| 91 | +CELLPOSE_DOCKER_IMAGE_WITH_PRETRAINED_v220 = "cellprofiler/runcellpose_with_pretrained:2.2" |
89 | 92 |
|
90 | 93 | "Detection mode" |
91 | 94 | MODEL_NAMES = ['cyto','nuclei','tissuenet','livecell', 'cyto2', 'general', |
@@ -134,19 +137,19 @@ def create_settings(self): |
134 | 137 |
|
135 | 138 | self.docker_image = Choice( |
136 | 139 | text="Select Cellpose docker image", |
137 | | - choices=[CELLPOSE_DOCKER_IMAGE_WITH_PRETRAINED, CELLPOSE_DOCKER_NO_PRETRAINED], |
138 | | - value=CELLPOSE_DOCKER_IMAGE_WITH_PRETRAINED, |
| 140 | + choices=[CELLPOSE_DOCKER_IMAGE_WITH_PRETRAINED_v220, CELLPOSE_DOCKER_NO_PRETRAINED_v220,CELLPOSE_DOCKER_IMAGE_WITH_PRETRAINED_v232, CELLPOSE_DOCKER_NO_PRETRAINED_v232], |
| 141 | + value=CELLPOSE_DOCKER_IMAGE_WITH_PRETRAINED_v232, |
139 | 142 | doc="""\ |
140 | 143 | Select which Docker image to use for running Cellpose. |
141 | 144 |
|
142 | 145 | If you are not using a custom model, you can select |
143 | | -**"{CELLPOSE_DOCKER_IMAGE_WITH_PRETRAINED}"**. If you are using a custom model, |
144 | | -you can use either **"{CELLPOSE_DOCKER_NO_PRETRAINED}"** or |
145 | | -**"{CELLPOSE_DOCKER_IMAGE_WITH_PRETRAINED}"**, but the latter will be slightly |
146 | | -larger (~500 MB) due to including all of the pretrained models. |
| 146 | +**"{CELLPOSE_DOCKER_IMAGE_WITH_PRETRAINED_v232}"** or "{CELLPOSE_DOCKER_IMAGE_WITH_PRETRAINED_v220}"**. If you are using a custom model, |
| 147 | +you can use any of the available Dockers, but those with pretrained models will be slightly larger (~500 MB). |
147 | 148 | """.format( |
148 | | - **{"CELLPOSE_DOCKER_NO_PRETRAINED": CELLPOSE_DOCKER_NO_PRETRAINED, |
149 | | - "CELLPOSE_DOCKER_IMAGE_WITH_PRETRAINED": CELLPOSE_DOCKER_IMAGE_WITH_PRETRAINED} |
| 149 | + **{"CELLPOSE_DOCKER_NO_PRETRAINED_v220": CELLPOSE_DOCKER_NO_PRETRAINED_v220, |
| 150 | + "CELLPOSE_DOCKER_IMAGE_WITH_PRETRAINED_v220": CELLPOSE_DOCKER_IMAGE_WITH_PRETRAINED_v220, |
| 151 | + "CELLPOSE_DOCKER_NO_PRETRAINED_v232": CELLPOSE_DOCKER_NO_PRETRAINED_v232, |
| 152 | + "CELLPOSE_DOCKER_IMAGE_WITH_PRETRAINED_v232": CELLPOSE_DOCKER_IMAGE_WITH_PRETRAINED_v232} |
150 | 153 | ), |
151 | 154 | ) |
152 | 155 |
|
@@ -738,7 +741,7 @@ def upgrade_settings(self, setting_values, variable_revision_number, module_name |
738 | 741 | setting_values = setting_values + ["0.0", False, "15", "1.0", False, False] |
739 | 742 | variable_revision_number = 3 |
740 | 743 | if variable_revision_number == 3: |
741 | | - setting_values = [setting_values[0]] + ["Python",CELLPOSE_DOCKER_IMAGE_WITH_PRETRAINED] + setting_values[1:] |
| 744 | + setting_values = [setting_values[0]] + ["Python",CELLPOSE_DOCKER_IMAGE_WITH_PRETRAINED_v232] + setting_values[1:] |
742 | 745 | variable_revision_number = 4 |
743 | 746 | if variable_revision_number == 4: |
744 | 747 | setting_values = [setting_values[0]] + ['No'] + setting_values[1:] |
|
0 commit comments