Skip to content

API Reference parrot_pipelines.planogram.comparison.registration

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_pipelines.planogram.comparison.registration

View source

Deterministic per-image registration of observed slot rows against the slots definition (FEAT-574).

Pure functions: no I/O, no LLM. Same input, identical output.

Alias FacingDefinition

Re-exported from parrot_pipelines.planogram.comparison.definition.FacingDefinition.

Attribute GAP_END_DEFINITION

Attribute GAP_END_OBSERVED

Attribute GAP_INTERIOR

Alias Identification

Re-exported from parrot_pipelines.planogram.contracts.Identification.

Class ImageRegistration

Result of registering ONE image against the slots definition.

Fields:

Field Type Default Description
image_id str
row_to_shelf Dict[int, str] row_index -> shelf_id
assignments Dict[str, str] Identification.shape_id -> facing_id
ambiguous bool False

Attribute MARGIN_LOW

Attribute PRIOR_CONSECUTIVE

Attribute PRIOR_FULL_HEIGHT

Attribute SCORE_BRAND

Attribute SCORE_BRAND_FAMILY

Attribute SCORE_NEUTRAL

Attribute SCORE_OTHER_BRAND

Attribute SCORE_SAME_PRODUCT

Alias ShelfDefinition

Re-exported from parrot_pipelines.planogram.comparison.definition.ShelfDefinition.

Alias Slot

Re-exported from parrot_pipelines.planogram.contracts.Slot.

Alias SlotsDefinition

Re-exported from parrot_pipelines.planogram.comparison.definition.SlotsDefinition.

Attribute logger

Function register_image

Register every slot row of one image to a shelf and every identified slot to a facing.

Ambiguous or unsupported alignment => ambiguous=True and NO assignments (facings stay not_assessed / not_visible). Candidate identity can never force a facing assignment.

register_image(image_id: str, slots: Sequence[Slot], identifications: Sequence[Identification], definition: SlotsDefinition) -> ImageRegistration

Parameter Type Default Description
image_id str Image whose slots/identifications are considered; others are ignored.
slots Sequence[Slot] On-fixture slots (membership already applied by the caller).
identifications Sequence[Identification] Identifications of any image; filtered by image_id.
definition SlotsDefinition Validated slots definition.

Returns: ImageRegistration — The best strictly-increasing row->shelf assignment, or an ambiguous empty registration.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally