Skip to content

API Reference parrot_pipelines.planogram.perception.membership

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

parrot_pipelines.planogram.perception.membership

View source

Evidence-based fixture membership: on / off / uncertain (FEAT-574). Pure and deterministic.

Expected-SKU agreement is deliberately NOT an input: membership comes from spatial evidence only.

Alias FixtureMembership

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

Alias Shape

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

Function assign_membership

Label every shape on_fixture / off_fixture / uncertain from spatial evidence.

assign_membership(shapes: Sequence[Shape], zones: Sequence[Shape], image_size: Tuple[int, int], *, llm_hints: Optional[Dict[str, FixtureMembership]] = None) -> List[Shape]

Parameter Type Default Description
shapes Sequence[Shape] Observations of ONE image (row_index set when row structure exists).
zones Sequence[Shape] Zone anchors of the same image (header/backlit/poster, box stack). May be empty — anchors are evidence, not gates.
image_size Tuple[int, int] (width, height) of the source image.
llm_hints Optional[Dict[str, FixtureMembership]] None Optional shape_id -> membership suggestions. Recorded as evidence; may only resolve shapes that are still uncertain, never flip a deterministic decision.

Returns: List[Shape] — Copies of shapes (same order) with membership and membership_evidence set. Pure and deterministic; inputs are never mutated.

Function usable_shapes

on_fixture only — the count the fallback threshold is compared against.

Distractor (off-fixture or uncertain) counts can never suppress the fallback.

usable_shapes(shapes: Sequence[Shape]) -> List[Shape]

Parameter Type Default Description
shapes Sequence[Shape] Shapes with membership assigned.

Returns: List[Shape] — The ON_FIXTURE subset, in order.

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