|
1 | 1 | # RunCellpose |
2 | 2 |
|
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 | +``` |
6 | 59 |
|
7 | 60 | ## Using RunCellpose with a GPU |
8 | 61 |
|
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. |
10 | 63 | General instructions are available at this [link](https://pytorch.org/get-started/locally/). |
11 | 64 |
|
12 | 65 | 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. |
35 | 88 | W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found |
36 | 89 | 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. |
37 | 90 | ``` |
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. |
0 commit comments