PatSnap/Hiro-Layout
Hiro-Layout: Document Layout Analysis for Patent and Technical PDFs
English | 简体中文

Hiro-Layout is a document layout analysis model for patent and technical PDF pages. It detects and classifies page regions such as text, titles, headers, footers, tables, formulas, chemical structures, figures, captions, search reports, bibliographies, and other patent-specific layout elements.
Highlights
- Patent-focused layout understanding: covers common patent PDF regions and patent-specific structures.
- Technical document coverage: evaluated on both patent PDFs and NPD PDFs.
- Fine-grained taxonomy: 25 layout categories across figure, text, and complex document elements.
Model Overview
Layout Taxonomy
Benchmarks
Metrics are reported as Precision, Recall, and F1.
Patent PDF
NPD PDF
Online Demo
Hiro-Layout is used by Hiro-Smart-Doc for full document layout analysis and OCR. You can try the hosted demo on Hugging Face Spaces:
Usage
The current model artifact is an ONNX export:
layout_model/RT-DETR_25.onnxDownload the repository from the Hugging Face Hub and load the ONNX model with ONNXRuntime:
from pathlib import Path
from huggingface_hub import snapshot_download
import onnxruntime as ort
repo_dir = snapshot_download("PatSnap/Hiro-Layout")
model_path = Path(repo_dir) / "layout_model" / "RT-DETR_25.onnx"
session = ort.InferenceSession(str(model_path))
print("inputs:", [i.name for i in session.get_inputs()])
print("outputs:", [o.name for o in session.get_outputs()])Use labels.json for the 25-class label mapping.
Repository Files
Limitations
- Layout predictions may be inaccurate on low-resolution scans, heavily rotated pages, handwritten documents, unusual patent formats, or unseen page templates.
- Small objects and sparse categories can have unstable metrics when the evaluation set has very few labels.
- The model should not be used as the sole source of truth for legal, compliance, filing, archival, or customer-facing workflows without human review.
- Users are responsible for ensuring they have the right to process and share any documents used with this model.
License
This project is released under the Apache License 2.0. See LICENSE.
Copyright Notice
Copyright (c) 2026 Patsnap. All rights reserved except as expressly licensed under the applicable license terms.
Hiro-Layout, Hiro, Patsnap, and any associated names, logos, product names, service names, designs, and slogans are trademarks or registered trademarks of Patsnap or its affiliates. No trademark license is granted under the open source license or any model license unless expressly stated.
