PaddlePaddle/PP-DocBlockLayout_onnx
01.9k
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.
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-gpuCLI Usage
paddleocr layout_detection -i ./demo.jpg --model_name PP-DocBlockLayout --engine onnxruntimePython 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")