Basics · Tensor & Mask Internals

Inside PP-DocLayoutV3

Look straight at the three inputs and three outputs of alex-dinh/PP-DocLayoutV3-ONNX (object-detection, 130.50 MB fp32, Apache-2.0, CPU WASM): the warped 800×800 0..1 RGB tensor, the 300-row [300, 7] detection + reading-order matrix, the confidence threshold sweep, and each region's 200×200 binary instance mask.

On-device model

Live Tensor & Mask Probe

Initialise PP-DocLayoutV3 to inspect live tensors and 200×200 instance masks.

1. Input Tensor: 800×800 RGB (0..1)

Waiting for inference…

2. Selected Region 200×200 Instance Mask

No region inspected yet.

3. Threshold Sweep (300 DETR Queries)

Counts of candidate rows in fetch_name_0 surviving each confidence threshold:

Live decoded rows from fetch_name_0 [300, 7] sorted by learned reading order
Rank Raw Row Class ID Label Score Box [x0, y0, x1, y1] Col 6 (Order) Mask Cells
Run the tensor probe to inspect raw DETR output rows.
Show the code — Decoding fetch_name_0/1/2 + reading-order sort (decodeDocLayoutOutputs)
Show the code — Tracing 200×200 binary mask contours (extractInstanceMaskGeometry)