OMERO integration for AI-powered image annotation and segmentation workflows
pip install omero-annotate-ai==0.5.0 Copy PIP instructions
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 (vit_b_lm) instance segmentation of nuclei in a Cell Painting field from the BioImage Archive (S-BIAD855), shown in napari.
project · dataset · plate · screen] --> B[Select images
train / val / test split] B --> C[Annotate in napari
micro-SAM or Cellpose] C --> D[Back to OMERO
masks · ROIs · tracking table] D --> E[Training data
micro-SAM · BiaPy · DL4MicEverywhere] D --> F[BioImage Archive
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 public servers such as the IDR. Jupyter widgets Connect to any OMERO server, here the public IDR. Choose a project, dataset, plate or screen. 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.
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/ / _ /; 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.
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).
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.
Developed at the Leiden Cell Observatory within the NL-BioImaging infrastructure, funded by NWO.
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.
Both files in this release have provenance metadata.
omero microscopy segmentation ai annotation sam micro-sam
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
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 verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.
Both files in this release have been uploaded with provenance metadata.
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.




