napari plugin¶
Installation¶
Make sure to have a running napari installation.
Via pip¶
In the environment with your napari installation run:
$ pip install merge-stardist-masks
Within napari¶
Within napari go to Plugins -> Install/Uninstall Plugins... and search for
napari-merge-stardist-masks in the lower list. Then click on the blue install
button.
After installation¶
Make sure to restart napari after the installation. If you do not find the plugins, go
to Plugins -> Install/Uninstall Plugins... and toggle the checkboxes in the upper list for
stardist-napari and napari-merge-stardist-masks.
Usage¶
Preparations¶
Download one of the pre-trained StarDist models from here and unzip the file.
Run a segmentation¶
Load sample data with
File -> Open sample -> StarDist OPP sample dataClick
Plugins -> StarDist OPP. Two widgets will open, the StarDist plugin and this plugin.All the parameters in the StarDist plugin should be correctly set already. Make sure that the axes in the field
Image Axesare correct, for a 3D image it should beZYX.Select
Custom 2D/3Din the fieldModel Typeand choose the directory where you unzipped the pre-trained model in theCustom Modelfield. See the image below for the correct settings.
Hit
Run. And wait until the CNN calculates the outputs. The outputs of the CNN are displayed once they are calculated.In the StarDist OPP widget, select again the path to the unzipped pre-trained model in the field
model path. Then selectStarDist distances (data)andStarDist probability (data)for thedistsandprobsfields, respectively.You can play around with the other fields. However, this might lead to errors. For 3D images, you should set
subtract distto1.00the other settings are already fine. See the following image for proper settings.
Hit
Runin the StarDist OPP widget. The post-processing starts and might take some time (on our machine it takes ~10 minutes). Once the post-processing is done, the label image will be shown in the viewer.