{
  "name": "omero-annotate-ai",
  "display_name": "OMERO Annotate AI",
  "visibility": "public",
  "icon": null,
  "categories": [
    "Annotation",
    "Segmentation"
  ],
  "schema_version": "0.3.0",
  "on_activate": null,
  "on_deactivate": null,
  "contributions": {
    "commands": [
      {
        "id": "omero-annotate-ai.annotate",
        "title": "Annotate a training set with micro-SAM",
        "python_name": "omero_annotate_ai.napari_plugin._widget:OMEROAnnotateDock",
        "short_title": null,
        "category": null,
        "icon": null,
        "enablement": null
      }
    ],
    "readers": null,
    "writers": null,
    "widgets": [
      {
        "command": "omero-annotate-ai.annotate",
        "display_name": "Annotate training set",
        "autogenerate": false,
        "default_dock_area": "right",
        "tabify": false
      }
    ],
    "sample_data": null,
    "themes": null,
    "menus": {},
    "submenus": null,
    "keybindings": null,
    "configurations": {}
  },
  "package_metadata": {
    "metadata_version": "2.4",
    "name": "omero-annotate-ai",
    "version": "0.5.2",
    "dynamic": [
      "license-file"
    ],
    "platform": null,
    "supported_platform": null,
    "summary": "OMERO integration for AI-powered image annotation and segmentation workflows",
    "description": "# OMERO Annotate.AI\n\n[![PyPI version](https://img.shields.io/pypi/v/omero-annotate-ai)](https://pypi.org/project/omero-annotate-ai/)\n[![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat)](http://bioconda.github.io/recipes/omero-annotate-ai/README.html)\n[![Python versions](https://img.shields.io/pypi/pyversions/omero-annotate-ai)](https://pypi.org/project/omero-annotate-ai/)\n[![CI/CD](https://github.com/Leiden-Cell-Observatory/omero_annotate_ai/actions/workflows/ci.yml/badge.svg)](https://github.com/Leiden-Cell-Observatory/omero_annotate_ai/actions)\n[![Documentation](https://github.com/Leiden-Cell-Observatory/omero_annotate_ai/actions/workflows/docs.yml/badge.svg)](https://leiden-cell-observatory.github.io/omero_annotate_ai/)\n[![Pixi Badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/prefix-dev/pixi/main/assets/badge/v0.json)](https://pixi.sh)\n[![License](https://img.shields.io/github/license/Leiden-Cell-Observatory/omero_annotate_ai)](https://github.com/Leiden-Cell-Observatory/omero_annotate_ai/blob/main/LICENSE)\n\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"docs/images/logo-dark.svg\">\n  <img src=\"docs/images/logo.svg\" alt=\"OMERO Annotate.AI logo\" width=\"120\" align=\"right\">\n</picture>\n\n**Reproducible AI-assisted annotation of OMERO data, from image selection to training-ready datasets.**\n\nPick images from an OMERO project, dataset, plate or screen. Annotate them in napari with\n[micro-SAM](https://github.com/computational-cell-analytics/micro-sam) or prepare them for\n[Cellpose](https://www.cellpose.org). The masks, ROIs and a tracking table go back to OMERO.\nEvery run is described by one YAML file, so you can resume it, repeat it or share it.\n<br clear=\"right\">\n\n![micro-SAM segmentation of a Cell Painting field in napari](docs/images/napari_microsam.jpg)\n<sub>micro-SAM (`vit_b_lm`) instance segmentation of nuclei in a Cell Painting field from the BioImage Archive (S-BIAD855), shown in napari.</sub>\n\n## How it works\n\n```mermaid\nflowchart LR\n    A[OMERO<br/>project · dataset · plate · screen] --> B[Select images<br/>train / val / test split]\n    B --> C[Annotate in napari<br/>micro-SAM or Cellpose]\n    C --> D[Back to OMERO<br/>masks · ROIs · tracking table]\n    D --> E[Training data<br/>micro-SAM · BiaPy · DL4MicEverywhere]\n    D --> F[BioImage Archive<br/>MIFA export]\n```\n\n- **Jupyter widgets** to connect to OMERO and create a training set or open one to continue, no code needed.\n- **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.\n- **Review and correct** earlier annotations with their saved masks; record a note per session.\n- **Flexible sampling:** timepoints, z-slices, 3D volumes, random patches, and filtering plate wells on their key-value pairs.\n- **Training-ready output:** one folder layout for micro-SAM, BiaPy and DL4MicEverywhere, with images and labels paired by name.\n- **FAIR by default:** the config carries study and method metadata and exports to the BioImage Archive (MIFA).\n- **Local-only storage** (`storage: local`) for data you cannot write to, such as public [IDR](https://idr.openmicroscopy.org) OME-Zarr.\n\n## Jupyter widgets\n\n<table>\n  <tr>\n    <td width=\"45%\"><img src=\"docs/images/widget_connect.png\" alt=\"OMERO connection widget\"></td>\n    <td width=\"55%\"><img src=\"docs/images/widget_open_set.png\" alt=\"Opening a training set in the workflow widget: progress per split and session notes\"></td>\n  </tr>\n  <tr>\n    <td><sub>Connect to any OMERO server.</sub></td>\n    <td><sub>Pick a container, then start a new training set or continue one: progress per split and the notes of earlier sessions.</sub></td>\n  </tr>\n</table>\n\n## napari plugin (experimental)\n\nAnnotate in your own napari window: **Plugins → OMERO Annotate AI → Annotate training\nset** (install with `pip install \"omero-annotate-ai[napari]\"`). It opens existing\ntraining sets on OMERO or in a local folder, saves each accepted image straight away,\nand can review annotated images starting from their saved masks. See the\n[napari plugin guide](https://leiden-cell-observatory.github.io/omero_annotate_ai/napari-plugin/).\n\n## Installation\n\n```bash\n# Recommended: pixi\npixi init myproject && cd myproject\npixi add micro_sam jupyterlab\npixi add --pypi \"omero-annotate-ai[notebooks]\"\n\n# Or: conda + pip\nconda install -c conda-forge micro_sam jupyterlab\npip install \"omero-annotate-ai[notebooks]\"\n\n# Or: pip only (micro-SAM and napari from PyPI)\npip install \"omero-annotate-ai[microsam,notebooks]\" jupyterlab\n```\n\nSee the [installation guide](https://leiden-cell-observatory.github.io/omero_annotate_ai/installation/) for details and troubleshooting.\n\n## Quick start\n\n**With widgets** (in Jupyter):\n\n```python\nfrom omero_annotate_ai import create_omero_connection_widget, create_workflow_widget\n\nconn_widget = create_omero_connection_widget()\nconn_widget.display()\nconn = conn_widget.get_connection()\n\nworkflow_widget = create_workflow_widget(connection=conn)\nworkflow_widget.display()  # New training set, or Open one to continue\n\nts = workflow_widget.training_set()\nworkflow_widget.annotate(note=\"nuclei only, small debris skipped\")\n```\n\n**From a YAML config** (scripts, batch runs, or repeating a run):\n\n```python\nfrom omero_annotate_ai import TrainingSet, load_config\n\nconfig = load_config(\"annotation_config.yaml\")\nts = TrainingSet.create(config, conn)\nts.annotate()\n```\n\n**Continue later** (after closing napari, or a crash): open the set by its table ID and\nannotate what is left; anything a crash left half-done is repaired first.\n\n```python\nts = TrainingSet.open(12345, conn)\nts.extend(train_n=10)  # optional: add images to the same table\nts.annotate(note=\"second round\")\n```\n\nEach training set keeps its files in one folder: images, masks, `config.yaml` (with the\nsessions and their notes) and a local copy of the tracking table. By default that is\n`~/omero_annotate_ai/<server>/<table id>_<name>/`; set `OMERO_ANNOTATE_AI_HOME` (or pass\n`home=` to `TrainingSet.create` / `open`) to keep the sets elsewhere.\n`ts.review()` reopens annotated images with their masks to correct them.\nOpen the same set on another computer to carry on there; two people can even annotate\nit at the same time, because each session claims the images it shows (your own claims,\ne.g. after a dropped connection, never block you).\n`create_pipeline(config, conn).run_full_micro_sam_workflow()` from 0.4 still works but\nis deprecated.\n\nThe [configuration guide](https://leiden-cell-observatory.github.io/omero_annotate_ai/configuration/) lists every option.\n\n## Example notebooks\n\n| | Jupyter | marimo |\n|---|---|---|\n| Annotate with micro-SAM or Cellpose | [widget workflow](notebooks/jupyter/annotation/omero-annotate-ai-annotation-widget.ipynb) | [annotation](notebooks/marimo/omero-annotate-ai-annotation.py) |\n| Run from YAML (OMERO or OME-Zarr) | | [from YAML](notebooks/marimo/annotate-from-yaml.py) |\n| Train micro-SAM | | [micro-SAM](notebooks/marimo/omero-training-microsam.py) |\n| Export for BiaPy / DL4MicEverywhere | [export](notebooks/jupyter/training/omero-training-export.ipynb) | |\n| Export to the BioImage Archive | [BIA export](notebooks/jupyter/export_annotations/omero-table-to-bioimage-archive.ipynb) | |\n| Try it on public data | | [IDR OME-Zarr demo](notebooks/marimo/idr-zarr-demo.py) |\n\n## Documentation\n\nUpgrading from 0.4? The [release notes](https://leiden-cell-observatory.github.io/omero_annotate_ai/release-notes/) list the changes and how to migrate.\n\nFull documentation: **https://leiden-cell-observatory.github.io/omero_annotate_ai/**\n([micro-SAM tutorial](https://leiden-cell-observatory.github.io/omero_annotate_ai/tutorials/microsam-annotation-pipeline/),\n[API reference](https://leiden-cell-observatory.github.io/omero_annotate_ai/api/)).\n\n## Contributing\n\n```bash\ngit clone https://github.com/Leiden-Cell-Observatory/omero_annotate_ai.git\ncd omero_annotate_ai\npixi install                         # default env: everything to run the notebooks\npixi run -e dev install-hooks        # once per clone: ruff + notebook-output hooks\npixi run -e dev pytest tests/        # dev env adds test, lint and type-check tools\n```\n\nIssues and pull requests are welcome on [GitHub](https://github.com/Leiden-Cell-Observatory/omero_annotate_ai/issues).\n\n## Contact and acknowledgements\n\n**Maarten Paul**, m.w.paul@lacdr.leidenuniv.nl\n\nDeveloped at the [Leiden Cell Observatory](https://github.com/Leiden-Cell-Observatory) within the\n[NL-BioImaging](https://github.com/NL-BioImaging) infrastructure, funded by NWO.\n\n## License\n\nGNU General Public License v2.0 or later (GPL-2.0-or-later); see [LICENSE](LICENSE).\nThe package builds on [omero-py](https://github.com/ome/omero-py) (GPL-2.0-or-later) and\n[ezomero](https://github.com/TheJacksonLaboratory/ezomero) (GPL-2.0), so it uses a compatible\nlicense. Releases up to and including 0.4.x were published under Apache-2.0.\n",
    "description_content_type": "text/markdown",
    "keywords": "omero,microscopy,segmentation,ai,annotation,sam,micro-sam",
    "home_page": null,
    "download_url": null,
    "author": null,
    "author_email": "Maarten Paul <m.w.paul@lacdr.leidenuniv.nl>",
    "maintainer": null,
    "maintainer_email": "Maarten Paul <m.w.paul@lacdr.leidenuniv.nl>",
    "license": null,
    "classifier": [
      "Development Status :: 3 - Alpha",
      "Intended Audience :: Science/Research",
      "Operating System :: OS Independent",
      "Programming Language :: Python :: 3",
      "Programming Language :: Python :: 3.11",
      "Programming Language :: Python :: 3.12",
      "Programming Language :: Python :: Implementation :: CPython",
      "Framework :: napari",
      "Topic :: Scientific/Engineering :: Image Processing",
      "Topic :: Scientific/Engineering :: Bio-Informatics",
      "Topic :: Scientific/Engineering :: Artificial Intelligence",
      "Topic :: Scientific/Engineering :: Medical Science Apps.",
      "Environment :: Console",
      "Environment :: Other Environment"
    ],
    "requires_dist": [
      "numpy>=1.21.0",
      "pandas>=1.3.0",
      "imageio>=2.9.0",
      "dask>=2021.6.0",
      "pyyaml>=6.0",
      "pydantic>=2.0.0",
      "typing-extensions>=4.0.0",
      "ezomero>=3.1.0",
      "opencv-python",
      "tifffile",
      "ipywidgets>=7.6.0; extra == \"notebooks\"",
      "ipykernel; extra == \"notebooks\"",
      "pixi-kernel<0.7,>=0.6.6; extra == \"notebooks\"",
      "marimo<0.20,>=0.19.2; extra == \"notebooks\"",
      "keyring>=23.0.0; extra == \"notebooks\"",
      "micro-sam>=1.8; extra == \"microsam\"",
      "micro-sam<1.9,>=1.8; extra == \"napari\"",
      "qtpy>=2.4; extra == \"napari\"",
      "pytest>=6.0; extra == \"dev\"",
      "pytest-cov>=2.0; extra == \"dev\"",
      "ruff>=0.17; extra == \"dev\"",
      "pyright>=1.1.414; extra == \"dev\"",
      "zensical>=0.0.73; extra == \"docs\"",
      "mkdocstrings>=1.0.8; extra == \"docs\"",
      "mkdocstrings-python>=1.18; extra == \"docs\"",
      "griffe-pydantic>=1.1.7; extra == \"docs\"",
      "ome-zarr>=0.16; extra == \"zarr\"",
      "iscc-lib<0.8,>=0.7; extra == \"provenance\"",
      "omero-annotate-ai[microsam,notebooks,provenance,zarr]; extra == \"all\""
    ],
    "requires_python": ">=3.11",
    "requires_external": null,
    "project_url": [
      "Homepage, https://github.com/Leiden-Cell-Observatory/omero_annotate_ai",
      "Repository, https://github.com/Leiden-Cell-Observatory/omero_annotate_ai.git",
      "Issues, https://github.com/Leiden-Cell-Observatory/omero_annotate_ai/issues",
      "Documentation, https://leiden-cell-observatory.github.io/omero_annotate_ai/",
      "Changelog, https://github.com/Leiden-Cell-Observatory/omero_annotate_ai/releases"
    ],
    "provides_extra": [
      "notebooks",
      "microsam",
      "napari",
      "dev",
      "docs",
      "zarr",
      "provenance",
      "all"
    ],
    "provides_dist": null,
    "obsoletes_dist": null
  },
  "npe1_shim": false
}