-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the PARSEG wiki!
PARSEG (PArallelised Refinement of SEGmentations) is a workflow for the combining of segmentation maps and subsequent removal of overlapping objects. It can be utilised as either a napari plugin for graphical user interaction or as a Python API to be included in custom workflows. This document will describe both implementations.
To use these scripts you need to install napari-segmentation-overlap-filter
in a conda environment. For GUI usage, install the plugin in an environment which contains Napari.
Activate the your Napari environment and pip install the plugin
$ conda activate napari-env
$ pip install napari-segmentation-overlap-filter
Download the code into a folder where you want to run it from. All python scripts and jupyter notebooks take path to root directory containing data.
napari-segmentation-overlap-filter
combines existing segmentation masks and is agnostic to how these segmentations are created as long as they are labelled images with background pixels assigned as 0
. For generating labels with FIJI's Trackmate-Cellpose and using Trackmate_Cellpose_GUI.py
see this page.
Combine_Segmentations_And_Filter_Overlaps.ipynb
is an example notebook which shows how you can use the Python API for your own custom workflows, it is based off of the output from Trackmate_Cellpose_GUI.py
(see above). For a breakdown of how it works, see this page.
- Start napari and open two segmentation masks 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 (napari-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