DocLayout-YOLO β€” ONNX with dynamic axes

Re-export of juliozhao/DocLayout-YOLO-DocStructBench and the DocLayNet-pretrained variant to ONNX with dynamic batch + spatial dimensions, which the upstream releases do not provide.

Why dynamic axes?

The official DocLayout-YOLO ONNX exports use fixed input shapes (e.g. 1024Γ—1024). Dynamic axes let downstream tools batch arbitrary page sizes without re-exporting per resolution β€” convenient for desktop OCR pipelines that hit pages of mixed DPI.

Variants

Subdir Source Use case
doclayout_yolo_onnx_dynamic/ DocStructBench (academic + business mix) Primary β€” used by ScanIndex layout_analyzer
doclayout_yolo_doclaynet_onnx_dynamic/ DocLayNet (annotated diverse docs) Auxiliary for non-table region routing

Each subdir contains the .onnx + .onnx.data (external weights) + a .names.json for class id β†’ label mapping.

Loading

import onnxruntime as ort
from huggingface_hub import snapshot_download
local = snapshot_download("welcomyou/doclayout-yolo-onnx-dynamic", local_dir="models")
sess = ort.InferenceSession(f"{local}/doclayout_yolo_onnx_dynamic/doclayout_yolo_docstructbench_imgsz1024_dynamic.onnx")
# input "images": (N, 3, H, W) where H, W must be multiples of 32

Re-export reproduction

See train-convert/doclayoutyolo/convert/export_doclayout_yolo_to_onnx.py.

License

AGPL-3.0, inherited from upstream DocLayout-YOLO. Commercial use requires complying with AGPL terms or obtaining an alternative license from the authors.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for welcomyou/doclayout-yolo-onnx-dynamic

Quantized
(2)
this model

Collection including welcomyou/doclayout-yolo-onnx-dynamic