Summary
Add a dedicated PercentageBar annotation renderer to visualize detection confidence scores, model tracking probabilities, or custom progression values as proportional metric bars anchored to detection bounding boxes.
Motivation & Use Cases
- Many computer vision applications benefit from showing model confidence or metric percentages directly on bounding boxes without cluttering text labels.
- Supports flexible placement options (Top, Bottom, InsideTop, InsideBottom), configurable dimensions, border strokes, and custom opacity.
- Preserves the session-first presentation model where renderers remain presentation-only and decoupled from core detection semantics.
Proposed Solution
-
Core Styles & Contracts:
- Introduce PercentageBarStyle, PercentageBarPlacement, and PercentageBarDrawInstruction types.
- Implement BasePercentageBarStyle with automatic value clamping in [0, 1], bounding box offset math, and placement alignment.
- Provide the annotationRenderers.percentageBar({ style }) factory and presentation normalizers.
-
Vector Layer Lowering:
- Lower PercentageBarDrawInstruction into closed background tracks and progress fill paths rendered via Pixi vector layers.
- Wire percentageBarStyle through MediaRendererPresentation and the vector renderer layer.
-
Documentation & Playground:
- Add a dedicated documentation page with an interactive live playground.
- Expose playground controls (height, fill opacity, placement) in the demo workbench.
Summary
Add a dedicated PercentageBar annotation renderer to visualize detection confidence scores, model tracking probabilities, or custom progression values as proportional metric bars anchored to detection bounding boxes.
Motivation & Use Cases
Proposed Solution
Core Styles & Contracts:
Vector Layer Lowering:
Documentation & Playground: