Skip to content

API Reference parrot_pipelines.planogram.types.product_counter

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

parrot_pipelines.planogram.types.product_counter

View source

ProductCounter — product-on-counter displays on the shared cycle (FEAT-612).

Products are expected facings; the promotional background and the information label are configured zones. Scores use the shared product/text/visual weighting with the configured ShelfConfig weights.

Alias AbstractPlanogramType

Re-exported from parrot_pipelines.planogram.types.abstract.AbstractPlanogramType.

Alias AnchorRule

Re-exported from parrot_pipelines.planogram.perception.slots.AnchorRule.

Alias ComparisonResult

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

Alias CycleContext

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

Alias IdentificationResult

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

Alias IdentifyStrategy

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

Alias LayoutProfile

Re-exported from parrot_pipelines.planogram.layout.LayoutProfile.

Alias PerceptionResult

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

Class ProductCounter

Counter/podium display: products as facings, background and information label as zones.

Legacy planogram_config["scoring_weights"] is accepted and ignored; the config converter maps it to ShelfConfig weights, which the shared scorer applies.

Attributes:

Attribute Type Description
requires_slots_definition bool
uses_enhanced_image bool
min_usable_shapes int

Method ProductCounter.default_layout_profile

Body + zone profiles, shape-is-slot, full image, CV first, threshold 1 (spec §2 defaults table).

default_layout_profile() -> LayoutProfile

Returns: LayoutProfile — A fresh profile with a neutral, non-mandatory descriptor vocabulary.

Method ProductCounter.perceive

Shared CV perception (product bodies + zones) with ctx.layout.

perceive(image: Image.Image, image_id: str, ctx: CycleContext) -> PerceptionResult

Parameter Type Default Description
image Image.Image
image_id str
ctx CycleContext

Returns: PerceptionResult

Method ProductCounter.identify

Shared OCR/vision identification plus neutral zone evidence.

identify(image: Image.Image, perception: PerceptionResult, ctx: CycleContext) -> IdentificationResult

Parameter Type Default Description
image Image.Image
perception PerceptionResult
ctx CycleContext

Returns: IdentificationResult

Method ProductCounter.compare

Deterministic facing + zone comparison with configured weights; no provider call.

compare(perceptions: Sequence[PerceptionResult], identifications: Sequence[IdentificationResult], ctx: CycleContext) -> ComparisonResult

Parameter Type Default Description
perceptions Sequence[PerceptionResult]
identifications Sequence[IdentificationResult]
ctx CycleContext

Returns: ComparisonResult

Alias ReportingPolicy

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

Alias ShapeKind

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

Alias ShapeProfile

Re-exported from parrot_pipelines.planogram.perception.profiles.ShapeProfile.

Alias compare_observations

Re-exported from parrot_pipelines.planogram.stages.compare.compare_observations.

Alias identify_image

Re-exported from parrot_pipelines.planogram.stages.identify.identify_image.

Alias perceive_image

Re-exported from parrot_pipelines.planogram.stages.perceive.perceive_image.

Alias resolve_layout_profile

Re-exported from parrot_pipelines.planogram.layout.resolve_layout_profile.

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