Skip to content

API Reference parrot_pipelines.planogram.perception.shapes

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

parrot_pipelines.planogram.perception.shapes

View source

Profile-driven classical-CV shape proposer (FEAT-574). Pure and picklable.

Alias ShapeCandidate

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

Alias ShapeProfile

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

Attribute logger

Function propose_shapes

Propose rectangles for every profile on a BGR image.

Pure, synchronous and picklable (runs inside a process pool). Coordinates are scaled back to the source image and clipped to it.

propose_shapes(image: np.ndarray, profiles: Sequence[ShapeProfile], *, work_width: int = 2048) -> List[ShapeCandidate]

Parameter Type Default Description
image np.ndarray BGR uint8 array (HxWx3) or gray (HxW).
profiles Sequence[ShapeProfile] Profiles to evaluate; each is de-duplicated independently.
work_width int 2048 Detection runs on a copy downscaled to this width when the image is wider.

Returns: List[ShapeCandidate] — Candidates grouped by profile order, best score first inside a profile. [] when nothing qualifies or profiles is empty. Never raises on a valid image.

Raises:

  • ValueError — image is not a non-empty uint8 HxW / HxWx3 array, or work_width < 1.

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