OMERO Annotate.AI
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.
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
| Connect to any OMERO server. | Pick a container, then start a new training set or continue one: progress per split and the notes of earlier sessions. |
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.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| omero_annotate_ai-0.5.2.tar.gz | 282.3 kB | With provenance | Details for omero_annotate_ai-0.5.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| omero_annotate_ai-0.5.2-py3-none-any.whl | Python 3 | none | any | Details for omero_annotate_ai-0.5.2-py3-none-any.whl |
Total release size: 475.3 kB
Release files / omero_annotate_ai-0.5.2.tar.gz
| Download URL | omero_annotate_ai-0.5.2.tar.gz |
|---|---|
| Size | 282.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4630bfd3663b9ab3190aa66f60e25b69a99f2a0b0b9360e3381be11a610e9f85
|
|
BLAKE2b-256 checksum How to use checksums |
1c9c0809e2e374aff5487bfc658fbd6fe73ac200452e395b8fed73ca9aa08898
|
| 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 logRelease files / omero_annotate_ai-0.5.2-py3-none-any.whl
| Download URL | omero_annotate_ai-0.5.2-py3-none-any.whl |
|---|---|
| Size | 192.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
337f26b786006c0abf1c1f851243a7598fb0d6b894a3837f581c945b8b19578c
|
|
BLAKE2b-256 checksum How to use checksums |
9a3cbbc4a921f046b490ef1c73bb1a58e9fb59dc838944911b8e5677879a1c13
|
| 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 logSecurity for omero-annotate-ai 0.5.2
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.
Attestation for omero_annotate_ai-0.5.2.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 logA 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.