Skip to content

SegmentationTool

Loic A. Royer edited this page Feb 25, 2024 · 1 revision

Install Segmentation Libraries StarDist and Cellpose

To install the StarDist and Cellpose plugins for napari, you can follow these general steps, which are adapted from the resources found on the napari-hub, and from the BiA-PoL blog that provides a detailed guide for using StarDist in napari with GPU support on Windows.

Installing StarDist Napari Plugin

  1. Start Napari: Open Napari using the command line or your desktop application.
  2. Install Plugin: Within Napari, go to Plugins > Install/Uninstall Packages.... Search for stardist-napari and click the Install button next to it.
  3. Restart Napari: After the installation, you will need to restart Napari.
  4. Verify Installation: After restarting, you should see a new menu entry under Plugins for StarDist.

For testing, you can access example images by navigating to File > Open Sample > stardist-napari within Napari.

Installing Cellpose Napari Plugin

Installing Cellpose follows a similar process:

  1. Start Napari: Open Napari using the command line or your desktop application.
  2. Install Plugin: Within Napari, go to Plugins > Install/Uninstall Packages.... Search for cellpose-napari and click the Install button next to it.
  3. Restart Napari: After installation, you will need to restart Napari.
  4. Verify Installation: After restarting, you should see a new menu entry under Plugins for Cellpose.

Please note that for both plugins, the first time you run them, it may take a while as they may need to download additional pre-trained models.

Remember that these plugins are Python packages, and they can also be installed directly from your terminal using pip, for example: pip install stardist-napari for StarDist.

If you are using these plugins with GPU support, make sure that your system has CUDA and CUDNN installed properly. For Windows systems, you may need to install specific versions of CUDA and CUDNN that are compatible with the versions of TensorFlow used by these plugins. The process can involve downloading the CUDA toolkit and patches from NVIDIA's website, and then CUDNN. You'd copy CUDNN files into the CUDA directory and ensure environment variables are set correctly.

Keep in mind that managing versions and ensuring compatibility can be complex, and you might need to consult with IT support if you do not have administrative privileges or are unfamiliar with these processes.

For further details on the installation and troubleshooting, you can refer to the official StarDist GitHub repository and the Cellpose GitHub repository. The napari-hub also offers detailed documentation on the plugins for setting up and using these plugins.

Clone this wiki locally