Skip to main content

OMERO Annotate.AI

PyPI version install with bioconda Python versions CI/CD Documentation Pixi Badge License

OMERO Annotate.AI logo

Reproducible AI-assisted annotation of OMERO data, from image selection to training-ready datasets.

Pick images from an OMERO project, dataset, plate or screen. Annotate them in napari with micro-SAM or prepare them for Cellpose. The masks, ROIs and a tracking table go back to OMERO. Every run is described by one YAML file, so you can resume it, repeat it or share it.

micro-SAM segmentation of a Cell Painting field in napari micro-SAM (vit_b_lm) instance segmentation of nuclei in a Cell Painting field from the BioImage Archive (S-BIAD855), shown in napari.

How it works

flowchart LR
    A[OMERO<br/>project · dataset · plate · screen] --> B[Select images<br/>train / val / test split]
    B --> C[Annotate in napari<br/>micro-SAM or Cellpose]
    C --> D[Back to OMERO<br/>masks · ROIs · tracking table]
    D --> E[Training data<br/>micro-SAM · BiaPy · DL4MicEverywhere]
    D --> F[BioImage Archive<br/>MIFA export]
  • Jupyter widgets to connect to OMERO and create a training set or open one to continue, no code needed.
  • Resumable and crash-safe: each mask is saved locally, uploaded with a tag and then recorded in the tracking table, so an interrupted run continues where it stopped without duplicate uploads; pixel digests flag files that changed afterwards.
  • Review and correct earlier annotations with their saved masks; record a note per session.
  • Flexible sampling: timepoints, z-slices, 3D volumes, random patches, and filtering plate wells on their key-value pairs.
  • Training-ready output: one folder layout for micro-SAM, BiaPy and DL4MicEverywhere, with images and labels paired by name.
  • FAIR by default: the config carries study and method metadata and exports to the BioImage Archive (MIFA).
  • Local-only storage (storage: local) for data you cannot write to, such as public IDR OME-Zarr.

Jupyter widgets

OMERO connection widget Choosing an OMERO container in the workflow widget
Connect to any OMERO server. Choose a project, dataset, plate or screen.

napari plugin (experimental)

Annotate in your own napari window: Plugins → OMERO Annotate AI → Annotate training set (install with pip install "omero-annotate-ai[napari]"). It opens existing training sets on OMERO or in a local folder, saves each accepted image straight away, and can review annotated images starting from their saved masks. See the napari plugin guide.

Installation

# Recommended: pixi
pixi init myproject && cd myproject
pixi add micro_sam jupyterlab
pixi add --pypi "omero-annotate-ai[notebooks]"

# Or: conda + pip
conda install -c conda-forge micro_sam jupyterlab
pip install "omero-annotate-ai[notebooks]"

# Or: pip only (micro-SAM and napari from PyPI)
pip install "omero-annotate-ai[microsam,notebooks]" jupyterlab

See the installation guide for details and troubleshooting.

Quick start

With widgets (in Jupyter):

from omero_annotate_ai import create_omero_connection_widget, create_workflow_widget

conn_widget = create_omero_connection_widget()
conn_widget.display()
conn = conn_widget.get_connection()

workflow_widget = create_workflow_widget(connection=conn)
workflow_widget.display()  # New training set, or Open one to continue

ts = workflow_widget.training_set()
workflow_widget.annotate(note="nuclei only, small debris skipped")

From a YAML config (scripts, batch runs, or repeating a run):

from omero_annotate_ai import TrainingSet, load_config

config = load_config("annotation_config.yaml")
ts = TrainingSet.create(config, conn)
ts.annotate()

Continue later (after closing napari, or a crash): open the set by its table ID and annotate what is left; anything a crash left half-done is repaired first.

ts = TrainingSet.open(12345, conn)
ts.extend(train_n=10)  # optional: add images to the same table
ts.annotate(note="second round")

Each training set keeps its files in one folder: images, masks, config.yaml (with the sessions and their notes) and a local copy of the tracking table. By default that is ~/omero_annotate_ai/<server>/<table id>_<name>/; set OMERO_ANNOTATE_AI_HOME (or pass home= to TrainingSet.create / open) to keep the sets elsewhere. ts.review() reopens annotated images with their masks to correct them. Open the same set on another computer to carry on there; two people can even annotate it at the same time, because each session claims the images it shows (your own claims, e.g. after a dropped connection, never block you). create_pipeline(config, conn).run_full_micro_sam_workflow() from 0.4 still works but is deprecated.

The configuration guide lists every option.

Example notebooks

Jupyter marimo
Annotate with micro-SAM or Cellpose widget workflow annotation
Run from YAML (OMERO or OME-Zarr) from YAML
Train micro-SAM micro-SAM
Export for BiaPy / DL4MicEverywhere export
Export to the BioImage Archive BIA export
Try it on public data IDR OME-Zarr demo

Documentation

Upgrading from 0.4? The release notes list the changes and how to migrate.

Full documentation: https://leiden-cell-observatory.github.io/omero_annotate_ai/ (micro-SAM tutorial, API reference).

Contributing

git clone https://github.com/Leiden-Cell-Observatory/omero_annotate_ai.git
cd omero_annotate_ai
pixi install                         # default env: everything to run the notebooks
pixi run -e dev install-hooks        # once per clone: ruff + notebook-output hooks
pixi run -e dev pytest tests/        # dev env adds test, lint and type-check tools

Issues and pull requests are welcome on GitHub.

Contact and acknowledgements

Maarten Paul, m.w.paul@lacdr.leidenuniv.nl

Developed at the Leiden Cell Observatory within the NL-BioImaging infrastructure, funded by NWO.

License

GNU General Public License v2.0 or later (GPL-2.0-or-later); see LICENSE. The package builds on omero-py (GPL-2.0-or-later) and ezomero (GPL-2.0), so it uses a compatible license. Releases up to and including 0.4.x were published under Apache-2.0.

Metadata

Release files for omero-annotate-ai 0.5.1

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

Source distribution (sdist)

Source distribution for omero-annotate-ai 0.5.1
File Size Uploaded Provenance Actions
omero_annotate_ai-0.5.1.tar.gz 274.7 kB With provenance Details for omero_annotate_ai-0.5.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for omero-annotate-ai 0.5.1
File Interpreter ABI Platform Actions
omero_annotate_ai-0.5.1-py3-none-any.whl Python 3 none any Details for omero_annotate_ai-0.5.1-py3-none-any.whl

Total release size: 463.6 kB

Release files / omero_annotate_ai-0.5.1.tar.gz

Download URL omero_annotate_ai-0.5.1.tar.gz
Size 274.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d399defe6e21f8d17d8d68e946331bd4e9391cb8df2fcd7fb09dc24e00e9667a
BLAKE2b-256 checksum
How to use checksums
84d61aff6ede2480fdf250ef34dfc037553407d69729e07e84941a807fcf2f0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

Release files / omero_annotate_ai-0.5.1-py3-none-any.whl

Download URL omero_annotate_ai-0.5.1-py3-none-any.whl
Size 188.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5ba0e5d7f009bca12d782cd5b62f641b20efebecc51a44b56fc409e26831ff4b
BLAKE2b-256 checksum
How to use checksums
68d5a42f898e56e203fb2e653438812336210d696b7720c36b1832a362be8a1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

Security for omero-annotate-ai 0.5.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for omero_annotate_ai-0.5.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

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