Skip to content

About

3D segmentation and label-image processing of microscopy data

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

Asset 24@600x


Mantis-seg is a Python package for 3D image segmentation and label-image processing, developed as part of the Mantis ecosystem for high-content, multiplexed, and volumetric microscopy image analysis.

Mantis-seg provides Fractal tasks for intensity-based segmentation, label-image generation, and post-processing of segmented objects. It operates on OME-Zarr datasets and supports region-of-interest (ROI)-based processing.

Functionality

1. Intensity-based segmentation

The segment_by_intensity_threshold task segments microscopy images based on intensity thresholds, generating labeled regions from selected image channels. The resulting segmentations can be manually corrected to generate ground-truth annotations for training segmentation models, such as RDCNet.

Screenshot 2026-11-19 at 15 38 44
  • Input: 3D microscopy image from an OME-Zarr dataset, with channel and intensity threshold parameters.
  • Output: Segmentation label image and ROI table written to the OME-Zarr dataset.

2. Label expansion

The expand_labels task isotropically expands segmented objects in the XY plane or in all three dimensions (XYZ) into neighboring unlabeled regions, enabling the generation of expanded object masks.

Screenshot 2026-11-19 at 15 58 24
  • Input: Segmentation label image and expansion parameters.
  • Output: Expanded label image and ROI table written to the OME-Zarr dataset.

3. Fusion of touching labels

The fuse_touching_labels task merges touching segmented objects to generate fused regions.

Screenshot 2026-11-19 at 16 03 10
  • Input: Segmentation label image containing touching objects.
  • Output: Label image with fused objects and ROI table written to the OME-Zarr dataset.

4. Cleanup of 3D child labels

The cleanup_3d_child_labels task post-processes 3D segmentation labels to remove small-volume debris among child objects within a parent object (e.g., an organoid or tissue) using a volume filter.

Screenshot 2026-11-19 at 16 31 04
  • Input: 3D segmentation label image.
  • Output: Cleaned 3D label image and ROI table written to the OME-Zarr dataset.

5. Projection of 3D segmentation labels to 2D

The convert_3d_to_mip task projects 3D segmentation labels into 2D for downstream analysis and visualization in 2D.

Screenshot 2026-11-19 at 16 47
  • Input: 3D label image (ZYX).
  • Output: 2D projected label image (YX) and ROI table written to the corresponding 2D OME-Zarr dataset.

6. Build multiscale label image

The build_label_image task constructs the multiscale image pyramid and corresponding ROI table from an existing level-0 segmentation label image in an OME-Zarr dataset. This is useful when a segmentation task fails before completing pyramid generation and ROI table creation.

  • Input: Existing level-0 segmentation label image.
  • Output: Multiscale label-image pyramid and ROI table written to the OME-Zarr dataset.

7. In development: RDCNet segmentation

🚧 RDCNet segmentation is under development. The current implementation is available in the ISIT repository. We are working on integrating and refactoring this functionality into Mantis-seg.

Installation

Mantis-seg requires Python 3.11 or newer.

A Conda-based installation workflow is:

conda create -n mantis-seg python=3.11
conda activate mantis-seg

git clone https://github.com/fmi-basel/Mantis-seg.git
cd Mantis-seg
pip install -e .

License

BSD 3-Clause License.

About

3D segmentation and label-image processing of microscopy data

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages