bibr-layout-onnx
An ONNX Runtime export of PaddlePaddle/PP-DocLayoutV3_safetensors
(revision 97d101e6db2642e162a1d05392d1b0231c91033e), published so that
bibr can detect page layout without
installing PyTorch.
bibr loads this bundle when ML_RUNTIME=onnx (or auto with no torch present).
The core install needs only onnxruntime; preprocessing is reimplemented in numpy
against the preprocessing block of onnx/bibr_onnx.json.
Contents
| File | Purpose |
|---|---|
onnx/model.onnx |
opset 17 graph, pixel_values [batch, 3, 800, 800] โ logits, pred_boxes (cxcywh, normalized), order_logits |
onnx/bibr_onnx.json |
preprocessing parameters, IO signature, and the exact source revision and toolchain |
Parity
Checked against the PyTorch model on validation pages: 112 regions across 6 pages, 0 pages differing, maximum bounding-box delta 0.
The 2D sinusoidal position embedding is folded into a constant at export time โ
it is computed in float64, and ONNX Runtime has no float64 Sin/Cos kernel, so
the traced graph would otherwise fail to load.
Image resizing must match torchvision's uint8 bicubic path, which rounds and saturates between the horizontal and vertical passes. Matching float bicubic instead shifts pixels by up to 20 grey levels and changes the detected regions.
License
Apache-2.0, inherited from the upstream model. This repository redistributes a format conversion; the weights and the original work are PaddlePaddle's.
Model tree for scienceverse/bibr-layout-onnx
Base model
PaddlePaddle/PP-DocLayoutV3