max-processor-output-viewer
v1.0.0
Published
Visualize the JSON output of the max-processor-output service: bounding boxes (group/block/shelf/product), product dots, and the full data structure in an interactive browser viewer.
Maintainers
Readme
max-processor-output-viewer
Interactive visualizer for the JSON output of the max-processor-output service
(omniplatform/OmniServices/max-processor-output). It draws every bounding box —
group / block / shelf / product — plus product dots in the original pixel coordinate
space, and lets you inspect the full data structure of any item.
Zero dependencies — just Node (>= 14). Runs via npx, opens a local page in your browser.
Usage
# from a file
npx max-processor-output-viewer output.json
# from a pipe (e.g. straight from curl / a log)
cat output.json | npx max-processor-output-viewer
# no input — paste JSON in the browser
npx max-processor-output-viewerDuring local development (from this directory):
node cli.js path/to/output.jsonOptions
| Option | Description |
| --- | --- |
| -p, --port <n> | Port to listen on (default: a random free port) |
| --no-open | Don't auto-open the browser |
| -h, --help | Show help |
What it shows
- Bounding boxes for groups (dashed grey), blocks (colored, labeled
block N · shelves×columns), shelves (S<n>), and products (colored, labeled with SKU). - Product dots (
productDot) placed in the inferred image space. - Reference product (
referenceProduct) marked with a ★. - Empty facings (
isEmpty) drawn dashed; unclassified products drawn with a dotted border.
Interaction
- Scroll to zoom, drag to pan, Fit to reset the view.
- Hover a product for a quick tooltip; click it for a full detail panel (all fields + raw JSON).
- Structure tree (block → shelf → column → product) on the left; click a leaf to select and center it.
- Color by block, group, confidence (
cossum, red→green gradient), or SKU. - Search SKU to highlight all matching facings and dim the rest.
- Layer toggles for groups / blocks / shelves / products / dots / labels / empty facings / reference.
- Summary stats: block/shelf/product/unique-SKU counts, average
cossum, low-confidence count, empty facings, groups.
Input format
Accepts either the full response wrapper ({ "data": { … }, "taskId": … }) or a bare
data object. Multiple concatenated JSON documents (batch output) are supported —
a document selector appears in the header, and stray/garbage fragments between documents
are skipped.
How coordinates are interpreted
All boxes use the service's pixel coordinates (x, y, w, h) with y increasing
downward, matching image space. productDot is normalized 0..1; the viewer infers the
image dimensions from the products' box centers vs. their dots to place the dots and draw
a dashed image frame.
