Skip to content

Commit 5fbe37d

Browse files
committed
update docs
1 parent dd3140e commit 5fbe37d

2 files changed

Lines changed: 63 additions & 7 deletions

File tree

documentation/CP-plugins-documentation/runcellpose.md

Lines changed: 59 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,65 @@
11
# RunCellpose
22

3-
RunCellpose is one of the modules that has additional dependencies that are not packaged with the built CellProfiler.
4-
Therefore, you must additionally download RunCellpose's dependencies.
5-
See [Using Plugins](using_plugins.md) for more information.
3+
You can run RunCellpose using Cellpose in a Docker that the module will automatically download for you so you do not have to perform any installation yourself.
4+
See [Using plugins - Using Docker](using_plugins.md/#using-docker-to-bypass-installation-requirements) for more information on using Docker with CellProfiler.
5+
6+
You can also this module using Cellpose installed to the same Python environment as CellProfiler.
7+
See [Using plugins - Installing dependencies](using_plugins.md/#installing-plugins-with-dependencies-using-cellprofiler-from-source) for more information on installing dependencies for CellProfiler plugins.
8+
9+
## Installing Cellpose in the same Python environment as CellProfiler
10+
11+
We provide some information below about installations that have worked for us.
12+
If you are having challenges with installing Cellpose in your CellProfiler environment, please reach out on the [forum](https://forum.image.sc/).
13+
14+
### Omnipose (Cellpose 1)
15+
16+
In an environment that has Cellprofiler installed, run the following commands to install Omnipose and Cellpose 1:
17+
18+
```bash
19+
pip install omnipose
20+
pip install cellpose==1.0.2
21+
```
22+
23+
### Cellpose 2
24+
25+
In an environment that has Cellprofiler installed, run the following commands to install Cellpose 2:
26+
27+
```bash
28+
pip install cellpose==2.3.2
29+
```
30+
31+
If you have an older version of Cellpose, run the following command to reinstall Cellpose 2:
32+
33+
```bash
34+
python -m pip install --force-reinstall -v cellpose==2.3.2
35+
```
36+
37+
### Cellpose 3
38+
39+
In a Python 3.9 environment that has Cellprofiler installed, run the following commands to install Cellpose 3:
40+
41+
```bash
42+
python3.9 -m pip install cellpose==3.1.1.2
43+
python3.9 -m pip install numpy==1.24.4
44+
```
45+
46+
### Cellpose-SAM (Cellpose 4)
47+
48+
On Mac M1/M2, to create a new environment with CellProfiler and Cellpose 4, run the following commands:
49+
50+
```bash
51+
export LDFLAGS="-L/opt/homebrew/opt/mysql@8.0/lib"
52+
export CPPFLAGS="-I/opt/homebrew/opt/mysql@8.0/include"
53+
export PKG_CONFIG_PATH="/opt/homebrew/opt/mysql@8.0/lib/pkgconfig"
54+
conda create -y --force -n cellposeSAM_cellprofiler python=3.9 h5py=3.6.0 python.app scikit-learn==0.24.2 scikit-image==0.18.3 openjdk
55+
conda activate cellposeSAM_cellprofiler
56+
pip install cellpose==4.0.6
57+
pip install mysqlclient==1.4.6 cellprofiler
58+
```
659

760
## Using RunCellpose with a GPU
861

9-
If you want to use a GPU to run the model (this is recommended for speed), you'll need a compatible version of PyTorch and a supported GPU.
62+
If you want to use a GPU to run the model (this is recommended for speed), you'll need a compatible version of PyTorch and a supported GPU.
1063
General instructions are available at this [link](https://pytorch.org/get-started/locally/).
1164

1265
1. Your GPU should be visible in Device Manager under Display Adaptors.
@@ -35,4 +88,5 @@ If your GPU isn't there, you likely need to install drivers.
3588
W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
3689
2022-05-26 20:24:21.906286: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
3790
```
38-
If you don't have a GPU, this is not a problem. If you do, your configuration is incorrect and you need to try reinstalling drivers and the correct version of CUDA for your system.
91+
If you don't have a GPU, this is not a problem.
92+
If you do, your configuration is incorrect and you need to try reinstalling drivers and the correct version of CUDA for your system.

documentation/CP-plugins-documentation/supported_plugins.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,18 @@ Those plugins that do have extra documentation contain links below.
1515
| CalculateMoments | CalculateMoments extracts moments statistics from a given distribution of pixel values. | No | | N/A |
1616
| CallBarcodes | CallBarcodes is used for assigning a barcode to an object based on the channel with the strongest intensity for a given number of cycles. It is used for optical sequencing by synthesis (SBS). | No | | N/A |
1717
| CompensateColors | CompensateColors determines how much signal in any given channel is because of bleed-through from another channel and removes the bleed-through. It can be performed across an image or masked to objects and provides a number of preprocessing and rescaling options to allow for troubleshooting if input image intensities are not well matched. | No | | N/A |
18+
| ConvertObjectsToOutlines | ConvertObjectsToOutlines takes in black images with white object outlines and uses them to predict objects. See [Ask Erin Dear Beth video podcast](https://youtu.be/qWYyp_a0IHM) for a walkthrough of using the module. | No | | N/A |
1819
| DistanceTransform | DistanceTransform computes the distance transform of a binary image. The distance of each foreground pixel is computed to the nearest background pixel and the resulting image is then scaled so that the largest distance is 1. | No | | N/A |
1920
| EnforceObjectsOneToOne| EnforceObjectsOneToOne generates Primary and Secondary object relationships for any pair of objects in a similar manner to the relationships established by IdentifyPrimaryObjects and IdentifySecondaryObjects. It is particularly useful for relating objects identified using Deep Learning. | No | | N/A |
2021
| EnhancedMeasureTexture| EnhancedMeasureTexture measures the degree and nature of textures within an image or objects in a more comprehensive/tuneable manner than the MeasureTexture module native to CellProfiler. | No | | N/A |
2122
| FilterObjects_StringMatch| FilterObjects_StringMatch allows filtering of objects using exact or partial string matching in a manner similar to FilterObjects. | No | | N/A |
2223
| HistogramEqualization | HistogramEqualization increases the global contrast of a low-contrast image or volume. Histogram equalization redistributes intensities to utilize the full range of intensities, such that the most common frequencies are more distinct. This module can perform either global or local histogram equalization. | No | | N/A |
2324
| HistogramMatching | HistogramMatching manipulates the pixel intensity values an input image and matches them to the histogram of a reference image. It can be used as a way to normalize intensities across different 2D or 3D images or different frames of the same 3D image. It allows you to choose which frame to use as the reference. | No | | N/A |
2425
| PixelShuffle | PixelShuffle takes the intensity of each pixel in an image and randomly shuffles its position. | No | | N/A |
25-
| [RunCellpose](RunCellPose.md) | RunCellpose allows you to run Cellpose within CellProfiler. Cellpose is a generalist machine-learning algorithm for cellular segmentation and is a great starting point for segmenting non-round cells. You can use pre-trained Cellpose models or your custom model with this plugin. You can use a GPU with this module to dramatically increase your speed/efficiency. | Yes | `cellpose` | Yes |
26+
| [RunCellpose](RunCellPose.md) | RunCellpose allows you to run Cellpose within CellProfiler. Cellpose is a generalist machine-learning algorithm for cellular segmentation and is a great starting point for segmenting non-round cells. You can use pre-trained Cellpose models or your custom model with this plugin. You can use a GPU with this module to dramatically increase your speed/efficiency. It currently supports Cellpose 1-4. | Yes | `cellpose` | Yes |
2627
| Runilastik | Runilasitk allows to run ilastik within CellProfiler. You can use pre-trained ilastik projects/models to predict the probability of your input images. The plugin supports two types of ilastik projects: Pixel Classification and Autocontext (2-stage).| Yes | | Yes |
2728
| RunImageJScript | RunImageJScript allows you to run any supported ImageJ script directly within CellProfiler. It is significantly more performant than RunImageJMacro, and is also less likely to leave behind temporary files. | Yes | `imagejscript` , though note that conda installation may be preferred, see [this link](https://py.imagej.net/en/latest/Install.html#installing-via-pip) for more information | No |
28-
| RunOmnipose | RunOmnipose allows you to run Omnipose within CellProfiler. Omnipose is a general image segmentation tool that builds on Cellpose. | Yes | `omnipose` | No |
29+
| RunOmnipose | RunOmnipose allows you to run Omnipose within CellProfiler. Omnipose is a general image segmentation tool that builds on Cellpose. Omnipose usage is also supported from within the RunCellpose module. | Yes | `omnipose` | No |
2930
| RunStarDist | RunStarDist allows you to run StarDist within CellProfiler. StarDist is a machine-learning algorithm for object detection with star-convex shapes making it best suited for nuclei or round-ish cells. You can use pre-trained StarDist models or your custom model with this plugin. You can use a GPU with this module to dramatically increase your speed/efficiency. RunStarDist is generally faster than RunCellpose. | Yes | `stardist` | No |
31+
| RunVista2D | This module uses a pre-trained VISTA2D model to detect cell objects in an image. | No | | N/A |
3032
| VarianceTransform | This module allows you to calculate the variance of an image, using a determined window size. It also has the option to find the optimal window size from a predetermined range to obtain the maximum variance of an image. | No | | N/A |

0 commit comments

Comments
 (0)