PARSEG (PAralellised Refinement of SEGmentations) combines segmentation masks and filters overlapping objects based on colocalization statistics, such as percent overlap.
This napari plugin was generated with Cookiecutter using @napari's [cookiecutter-napari-plugin] template.
By leveraging Dask, PARSEG filters overlapping segmentations masks in a computationally efficient manner by processing individual 2D slices in parallel.
There are two different ways to interact with PARSEG and use it for different objectives:
- As a napari plugin for graphical user interaction
- As a Python API to allow users to integrate PARSEG tools into their own custom workflows
You can install napari-segmentation-overlap-filter
via pip:
pip install napari-segmentation-overlap-filter
To install the latest development version:
pip install git+https://github.com/FrancisCrickInstitute/PARSEG
For more detailed walkthroughs, please consult the wiki.
- Download the example dataset images
- Start napari and open both images as separate layers
- Convert the layers from an
Image Layer
to aLabels Layer
by right-clicking on the layer - Open the plugin with
Plugins > Segmentation Overlap Filter
and the widget will appear on the right - Select the two segmentation masks you'd like to combine using the drop down and menu
- Drag the slider to set percent overlap allowed
- Click
Run
- Optionally, export the overlap dataframe as a csv file
This example notebook shows how you can integrate the Python API into your own workflow for filtering and combining overlapping segmentation masks
If you encounter any problems, please file an issue along with a detailed description.