Metadata-Version: 2.4
Name: omero-annotate-ai
Version: 0.2.8
Summary: OMERO integration for AI-powered image annotation and segmentation workflows
Author-email: Maarten Paul <m.w.paul@lumc.nl>
Maintainer-email: Maarten Paul <m.w.paul@lumc.nl>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/Leiden-Cell-Observatory/omero_annotate_ai
Project-URL: Repository, https://github.com/Leiden-Cell-Observatory/omero_annotate_ai.git
Project-URL: Issues, https://github.com/Leiden-Cell-Observatory/omero_annotate_ai/issues
Project-URL: Documentation, https://github.com/Leiden-Cell-Observatory/omero_annotate_ai#readme
Project-URL: Changelog, https://github.com/Leiden-Cell-Observatory/omero_annotate_ai/releases
Keywords: omero,microscopy,segmentation,ai,annotation,sam,micro-sam
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Scientific/Engineering :: Image Processing
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
Classifier: Environment :: Console
Classifier: Environment :: Other Environment
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy<2.0,>=1.21.0
Requires-Dist: pandas>=1.3.0
Requires-Dist: imageio>=2.9.0
Requires-Dist: dask>=2021.6.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: typing-extensions>=4.0.0
Requires-Dist: ezomero>=3.1.0
Requires-Dist: opencv-python
Requires-Dist: tifffile
Provides-Extra: notebooks
Requires-Dist: ipywidgets>=7.6.0; extra == "notebooks"
Requires-Dist: ipykernel; extra == "notebooks"
Requires-Dist: pixi-kernel<0.7,>=0.6.6; extra == "notebooks"
Requires-Dist: marimo<0.20,>=0.19.2; extra == "notebooks"
Requires-Dist: keyring>=23.0.0; extra == "notebooks"
Provides-Extra: microsam
Requires-Dist: napari>=0.4.15; extra == "microsam"
Provides-Extra: dev
Requires-Dist: pytest>=6.0; extra == "dev"
Requires-Dist: pytest-cov>=2.0; extra == "dev"
Requires-Dist: black>=22.0; extra == "dev"
Requires-Dist: isort>=5.0; extra == "dev"
Requires-Dist: flake8>=4.0; extra == "dev"
Provides-Extra: docs
Requires-Dist: mkdocs>=1.5.3; extra == "docs"
Requires-Dist: mkdocs-material>=9.5.9; extra == "docs"
Requires-Dist: mkdocstrings>=0.24.0; extra == "docs"
Requires-Dist: mkdocstrings-python>=1.7.0; extra == "docs"
Requires-Dist: mkdocs-gen-files>=0.5.0; extra == "docs"
Requires-Dist: mkdocs-literate-nav>=0.6.1; extra == "docs"
Requires-Dist: mkdocs-section-index>=0.3.8; extra == "docs"
Requires-Dist: mkdocs-autorefs>=0.5.0; extra == "docs"
Requires-Dist: griffe-pydantic>=1.1.7; extra == "docs"
Provides-Extra: all
Requires-Dist: omero-annotate-ai[microsam,notebooks]; extra == "all"
Dynamic: license-file

# OMERO Annotate.AI

[![Pixi Badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/prefix-dev/pixi/main/assets/badge/v0.json)](https://pixi.sh)
[![PyPI version](https://img.shields.io/pypi/v/omero-annotate-ai)](https://pypi.org/project/omero-annotate-ai/)
[![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)
[![Python versions](https://img.shields.io/pypi/pyversions/omero-annotate-ai)](https://pypi.org/project/omero-annotate-ai/)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Leiden-Cell-Observatory/omero_annotate_ai/HEAD?urlpath=%2Fdoc%2Ftree%2Fnotebooks%2Fannotation%2Fomero-annotate-ai-annotation-widget.ipynb)
[![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)
[![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/)
[![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)

Package to support reproducible image annotation workflows for AI training using OMERO data repositories. This Python package provides Jupyter widgets and tools for reproducible annotation, training, and inference using micro-SAM, Cellpose, and other AI models directly with OMERO datasets.

## Key Features

- **Interactive Jupyter widgets** for OMERO connection and workflow configuration
- **AI-assisted annotation** using micro-SAM integration 
- **Reproducible workflows** with YAML configuration tracking
- **Training data preparation** for BiaPy and DL4MicEverywhere
- **Direct OMERO integration** with automatic result storage

## Quick Start

### Installation

```bash
# Recommended: Using pixi
pixi init myproject && cd myproject
pixi add micro-sam
pixi add --pypi omero-annotate-ai
pixi shell

# Alternative: Conda + pip
conda install -c conda-forge micro-sam
pip install omero-annotate-ai
```

📖 See [Installation Guide](https://leiden-cell-observatory.github.io/omero_annotate_ai/installation/) for detailed instructions and troubleshooting.

### Basic Usage

**OMERO Connection Widget**
![OMERO Connection Widget](images/omero_connect_widget.png)

**Annotation Pipeline Widget** 
![Annotation Pipeline Widget](images/omero_annotation_widget.png)

```python
from omero_annotate_ai import create_omero_connection_widget, create_workflow_widget, create_pipeline

# Connect to OMERO
conn_widget = create_omero_connection_widget()
conn_widget.display()
conn = conn_widget.get_connection()

# Configure annotation workflow  
workflow_widget = create_workflow_widget(connection=conn)
workflow_widget.display()
config = workflow_widget.get_config()

# Run annotation pipeline
pipeline = create_pipeline(config, conn)
table_id, processed_images = pipeline.run_full_workflow()
```

### Example Notebooks

Try these example notebooks to get started:
- [Widget-based annotation workflow](notebooks/annotation/omero-annotate-ai-annotation-widget.ipynb)
- [YAML-based configuration](notebooks/annotation/omero-annotate-ai-from-yaml.ipynb)
- [Training with BiaPy](notebooks/training/omero-training_biapy.ipynb)

### Alternative: YAML Configuration

For batch processing and reproducible workflows, you can also use YAML configuration files:

```python
from omero_annotate_ai.core.annotation_config import load_config
from omero_annotate_ai.core.annotation_pipeline import create_pipeline

# Load configuration from YAML
config = load_config("annotation_config.yaml")
conn = create_connection(host="omero.server.com", user="username")

# Run annotation pipeline
pipeline = create_pipeline(config, conn)
results = pipeline.run_full_workflow()
```

See the [YAML Configuration Guide](docs/configuration.md) for complete documentation.

## Documentation

📚 **[Complete Documentation](docs/index.md)**

- **[Installation Guide](docs/installation.md)** - Detailed installation instructions and troubleshooting
- **[micro-SAM Tutorial](docs/tutorials/microsam-annotation-pipeline.md)** - Step-by-step annotation workflow tutorial
- **[YAML Configuration Guide](docs/configuration.md)** - Complete YAML configuration reference and examples
- **[API Reference](docs/api/index.md)** - Complete API documentation
- **[Examples](notebooks/)** - Jupyter notebook tutorials

## Links

- **[GitHub Repository](https://github.com/Leiden-Cell-Observatory/omero_annotate_ai)**
- **[PyPI Package](https://pypi.org/project/omero-annotate-ai/)**
- **[Issues & Support](https://github.com/Leiden-Cell-Observatory/omero_annotate_ai/issues)**

## Contributing

We welcome contributions! For development setup:

1. Fork the repository
2. Clone and set up development environment:
   ```bash
   git clone https://github.com/YOUR_USERNAME/omero_annotate_ai.git
   cd omero_annotate_ai
   pixi install
   ```
3. Make changes and run tests: `pixi run pytest`
4. Submit a pull request

See [Installation Guide - Development Setup](https://leiden-cell-observatory.github.io/omero_annotate_ai/installation#development-setup) for detailed instructions.

## Contact

**Maarten Paul** - m.w.paul@lacdr.leidenuniv.nl

**Acknowledgments**: Developed within the [NL-BioImaging](https://github.com/NL-BioImaging) infrastructure, funded by NWO.
