PaddlePaddle/PP-DocBlockLayout_onnx

🤗 Hugging Face 来源image-to-textapache-2.0129 MBother✓ 1 个校验和今天更新
一条命令提交

在你的模型文件夹旁边运行它。它会制作种子、将文件与 Hugging Face 比对,然后提交。你只需开始做种,并粘贴你账户中的密钥。它只读取你的文件,绝不修改。如果愿意,可以先阅读脚本。

curl -fsSL https://pirateface.co/package.sh | bash -s -- --repo PaddlePaddle/PP-DocBlockLayout_onnx ./model-folder
需要做种者 →

PP-DocBlockLayout

Introduction

A layout block localization model trained on a self-built dataset containing Chinese and English papers, PPT, multi-layout magazines, contracts, books, exams, ancient books and research reports using RT-DETR-L. The layout detection model includes 1 category: Region.

Model mAP(0.5) (%)
PP-DocBlockLayout 95.9

Note: the evaluation set of the above precision indicators is the self built version sub area detection data set, including Chinese and English papers, magazines, newspapers, research reports PPT、 1000 document type pictures such as test papers and textbooks.

Model Usage

Install Dependencies

pip install -U paddleocr
pip install -U onnxruntime-gpu

CLI Usage

paddleocr layout_detection -i ./demo.jpg --model_name PP-DocBlockLayout --engine onnxruntime

Python API Usage

from paddleocr import LayoutDetection

model = LayoutDetection(
    model_name="PP-DocBlockLayout",
    engine="onnxruntime",
)
output = model.predict("./demo.jpg", batch_size=1)
for res in output:
    res.print()
    res.save_to_img(save_path="./output/")
    res.save_to_json(save_path="./output/res.json")