Skip to main content

bioimageflow-segmentation-tools

Segmentation-focused tool package for BioImageFlow.

Tools

  • Cellpose3: Cellpose v3 pretrained model wrapper.
  • CellposeSAM: Cellpose-SAM pretrained model wrapper.
  • StarDistSegmenter: StarDist 2D pretrained model wrapper.
  • InstanSegSegment: selected-target nuclei or cell segmentation with named or local InstanSeg models.
  • Nagini3DSegment: volumetric NAGINI-3D segmentation with probability, parametric surfaces, and curvature outputs.
  • ThresholdSegment: threshold an intensity image and label connected foreground objects.
  • OtsuThresholdSegment: compute a global Otsu threshold and label foreground objects.
  • LocalThresholdSegment: compute a Sauvola local threshold and label foreground objects.
  • WatershedSegment: split foreground regions from marker labels or connected components.
  • DistanceWatershedSegment: split foreground with marker-free distance-transform watershed.
  • SplitTouchingObjects: split clumped labels using distance-transform watershed.
  • FilterLabels: remove labels by area, border contact, intensity, and shape constraints.
  • PostprocessLabels: remove small labels and relabel label images sequentially.

Classical connected-component tools use face connectivity by default and treat image > threshold as foreground when above is enabled. Label inputs are validated as finite, integral, non-negative arrays, and object counts are based on distinct positive IDs rather than the largest ID. Default label-output paths use TIFF rather than inheriting an input extension that may be lossy or unable to store UInt32 label IDs.

Package discovery requires only bioimageflow-core. Classical image dependencies and heavy model dependencies are declared in worker EnvironmentSpec objects and imported only inside process_row. Importing this package does not require ImageIO, NumPy, SciPy, scikit-image, Cellpose, TensorFlow, StarDist, or other model packages in the main process. Cellpose3, CellposeSAM, and StarDistSegmenter lazily keep one model per worker-side tool instance. Repeated calls with the same model selection reuse the weights; changing model_type or model_name replaces the cached model, and clear_model_cache() releases it explicitly. Applications can invalidate remote worker caches by stopping the corresponding Wetlands environment.

NAGINI-3D license boundary

Nagini3DSegment installs and executes the third-party nagini3D runtime, which is distributed under AGPL-3.0. The BioImageFlow wrapper remains BSD-4-Clause, but downstream distributors must review and comply with NAGINI-3D's license before publishing an environment or product containing that runtime. NAGINI model weights and datasets are not bundled in this package.

The former nnInteractive wrapper was removed because nnInteractive requires a stateful volumetric inference session; its public point-list-to-2D-mask contract did not represent the upstream API.

Example

from bioimageflow_core import Arguments
from bioimageflow_segmentation_tools import ThresholdSegment

segment = ThresholdSegment()
result = segment.process_row(
    Arguments(
        input_image="input.tif",
        threshold=128.0,
        labels="labels.tif",
        above=True,
    )
)

Workflow graph construction with segment(...) requires installing the main-process bioimageflow orchestrator alongside this package.

Metadata

Release files for bioimageflow-segmentation-tools 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bioimageflow-segmentation-tools 0.4.0
File Size Uploaded Provenance Actions
bioimageflow_segmentation_tools-0.4.0.tar.gz 35.7 kB Without provenance Details for bioimageflow_segmentation_tools-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bioimageflow-segmentation-tools 0.4.0
File Interpreter ABI Platform Actions
bioimageflow_segmentation_tools-0.4.0-py3-none-any.whl Python 3 none any Details for bioimageflow_segmentation_tools-0.4.0-py3-none-any.whl

Total release size: 63.3 kB

Release files / bioimageflow_segmentation_tools-0.4.0.tar.gz

Download URL bioimageflow_segmentation_tools-0.4.0.tar.gz
Size 35.7 kB
Tags Source
SHA-256 checksum
How to use checksums
50c73b749cb200db57376152a8f6500335f37d24f4e1b0dafad205588608058c
BLAKE2b-256 checksum
How to use checksums
fb872445cc6f44650b134124cf3ca22ed1392aeaec63ae627459bec2dc0631f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / bioimageflow_segmentation_tools-0.4.0-py3-none-any.whl

Download URL bioimageflow_segmentation_tools-0.4.0-py3-none-any.whl
Size 27.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c44077fad933b82b8d15c5b620c739ca2687711848be1638c2bf1e513412651
BLAKE2b-256 checksum
How to use checksums
50de349c3f0157ef302a4c9004d9d54033e827366316b707ad7c0d196836f42e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for bioimageflow-segmentation-tools 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page