Metadata-Version: 2.4
Name: ai-parrot-pipelines
Version: 1.2.0
Summary: Pipelines for AI-Parrot planogram and vision workflows
Author-email: Jesus Lara <jesuslara@phenobarbital.info>
License-Expression: MIT
Project-URL: Homepage, https://github.com/phenobarbital/ai-parrot
Project-URL: Repository, https://github.com/phenobarbital/ai-parrot
Project-URL: Documentation, https://github.com/phenobarbital/ai-parrot/
Keywords: ai,pipelines,planogram,vision,compliance,agents
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: POSIX :: Linux
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Framework :: AsyncIO
Classifier: Typing :: Typed
Requires-Python: <3.14,>=3.11
Description-Content-Type: text/markdown
Requires-Dist: ai-parrot>=1.1.0
Requires-Dist: opencv-python-headless>=4.8
Requires-Dist: numpy
Requires-Dist: pillow>=12.3.0
Requires-Dist: rapidfuzz>=3.0
Provides-Extra: planogram
Requires-Dist: rapidocr>=3.9; extra == "planogram"
Requires-Dist: onnxruntime>=1.20; extra == "planogram"

# AI-Parrot Pipelines

**ai-parrot-pipelines** provides planogram compliance and vision workflows for
[AI-Parrot](https://pypi.org/project/ai-parrot/) agents.

## Installation

```bash
pip install ai-parrot-pipelines
```

Install the optional local-OCR dependencies when needed:

```bash
pip install "ai-parrot-pipelines[planogram]"
```

## Features

- **Planogram Compliance** — a perceive → identify → compare cycle for six types
- **Layout Profiles** — validated, per-type geometry and identification settings
- **Optional Local OCR** — RapidOCR is auto-detected when the `planogram` extra is installed
- **Migration Utility** — converts and preflights six planogram configuration types

## Available Pipelines

| Pipeline/type | Description |
|---|---|
| `PlanogramCompliance` | Planogram compliance pipeline |
| `ProductOnShelves` | Product-facing shelves |
| `InkWall` | Price-tag-anchored ink walls |
| `EndcapBacklitMultitier` | Multi-tier endcaps |
| `EndcapNoShelvesPromotional` | Zone-based promotional endcaps |
| `GraphicPanelDisplay` | Zone-only graphic panels |
| `ProductCounter` | Product and zone counters |

## Quick Start

```python
from parrot_pipelines.planogram.plan import PlanogramCompliance
from parrot_pipelines.models import PlanogramConfig

config = PlanogramConfig(
    config_name="example",
    planogram_type="product_on_shelves",
    planogram_config={},
    slots_definition={
        "version": "1",
        "shelves": [
            {
                "shelf_id": "shelf_1",
                "shelf_number": 1,
                "facings": [
                    {
                        "facing_id": "facing_1",
                        "shelf_id": "shelf_1",
                        "slot": 1,
                        "product": "example_product",
                        "descriptors": {"display_name": "Example product"},
                    }
                ],
            }
        ],
        "zones": [],
    },
)

pipeline = PlanogramCompliance(planogram_config=config, llm="openai:gpt-4o-mini")
result = await pipeline.run("shelf_photo.jpg")
```

Provide a complete, validated slots definition and rule bindings before a production run. See the
[cycle reference](../../docs/pipelines/planogram-compliance-cycle.md) and the
[migration runbook](../../docs/pipelines/planogram-cycle-migration.md).

## Dependencies

- Python >= 3.11
- [ai-parrot](https://pypi.org/project/ai-parrot/) >= 0.24.2
- [opencv-python-headless](https://pypi.org/project/opencv-python-headless/) >= 4.8
- Optional `planogram` extra: `rapidocr` and `onnxruntime`

## 1.1.0 breaking changes

The removed detector APIs and required configuration migration are documented in the
[migration runbook](../../docs/pipelines/planogram-cycle-migration.md).

## License

MIT
