docling-layout-heron-101 (ONNX)
ONNX export of docling-layout-heron-101, an RT-DETRv2 document layout detector from the Docling project. Unofficial export, not maintained by docling-project.
Files
model.onnx-- fp32 model, postprocessing includedconfig.json,preprocessor_config.json-- copied from the base model
Input / output
- Inputs:
images(float32,[N,3,H,W], output of the HFAutoImageProcessorat its normal defaults -- resize + rescale + normalize all included),orig_target_sizes(int64,[N,2],[width, height]) - Outputs:
labels(int64,[N,300]),boxes(float32,[N,300,4], xyxy pixels),scores(float32,[N,300]) - Not thresholded -- filter by
scoresyourself.
Usage
import numpy as np, onnxruntime as ort
from PIL import Image
from transformers import AutoImageProcessor
processor = AutoImageProcessor.from_pretrained("<this-repo-id>")
session = ort.InferenceSession("model.onnx")
image = Image.open("page.png").convert("RGB")
inputs = processor(images=[image], return_tensors="np")
orig_sizes = np.array([[image.width, image.height]], dtype=np.int64)
labels, boxes, scores = session.run(
None, {"images": inputs["pixel_values"], "orig_target_sizes": orig_sizes}
)
License
Apache 2.0, inherited from the base model.
- Downloads last month
- 163
Model tree for STomoya/docling-layout-heron-101-onnx
Base model
docling-project/docling-layout-heron-101