Object Detection
Transformers
ONNX
Chinese
English
document-ai
document-layout-analysis
patent
pdf
hiro
patsnap
Instructions to use PatSnap/Hiro-Layout with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PatSnap/Hiro-Layout with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("object-detection", model="PatSnap/Hiro-Layout")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("PatSnap/Hiro-Layout", dtype="auto") - Notebooks
- Google Colab
- Kaggle
Open Source Release Checklist
Use this checklist before publishing Hiro-Layout to Hugging Face or GitHub.
Repository Metadata
- Confirm final public model name and repo id, for example
PatSnap/Hiro-Layout. - Confirm model task and Hugging Face
pipeline_tag. - Confirm model architecture, parameter count, input resolution, and output schema.
- Confirm whether the release includes weights, inference code, configs, examples, and evaluation assets.
- Confirm whether
layout_model/RT-DETR_25.onnxis the final public model artifact. - Confirm all large binary files are tracked with Git LFS.
Legal and License
- Confirm Apache-2.0 is approved for this model and code release.
- Confirm model weights can be released under the same license or document a separate model license.
- Confirm training data, evaluation data, and benchmark summaries are cleared for public disclosure.
- Confirm the Excel benchmark file can be publicly shared.
- Review
NOTICEfor trademark language. - Review
DISCLAIMER.mdfor product, legal, and compliance requirements.
Model Card
- Replace the minimal ONNXRuntime inspection snippet with the final working inference API.
- Add installation instructions.
- Add hardware and runtime requirements.
- Add preprocessing details for PDF rendering and image normalization.
- Add output schema, including bounding box format and confidence score semantics.
- Confirm
labels.jsonmatches the class-id order used bylayout_model/RT-DETR_25.onnx. - Add example image and example prediction if public samples are available.
- Confirm benchmark numbers in
README.md,README_zh.md, andEVALUATION.md.
Release Assets
- Add model weights, config, tokenizer/processor files, and custom code if needed.
- Add
requirements.txt,pyproject.toml, or environment instructions. - Add minimal smoke-test script.
- Add citation metadata if there is a paper, blog, or technical report.
- Add a changelog or release notes.
Final Validation
- Clone the public repo into a clean environment.
- Run the documented installation steps.
- Run the documented inference example.
- Verify README links render correctly on Hugging Face.
- Verify the license badge and model metadata render correctly on Hugging Face.