A high-precision layout area localization model trained on a self-built dataset of Chinese and English papers, magazines, and research reports using RT-DETR-H. It is a 3-Class Layout Detection Model, including Table, Image, and Seal. The key metrics are as follow:
Model
mAP(0.5) (%)
RT-DETR-H_layout_3cls
95.8
Note
: Paddleocr's self built layout area detection data set contains 1154 common document type images such as Chinese and English papers, magazines and research papers.
Quick Start
Installation
PaddlePaddle
Please refer to the following commands to install PaddlePaddle using pip:
# for CUDA11.8
python -m pip install paddlepaddle-gpu==3.0.0 -i https://www.paddlepaddle.org.cn/packages/stable/cu118/
# for CUDA12.6
python -m pip install paddlepaddle-gpu==3.0.0 -i https://www.paddlepaddle.org.cn/packages/stable/cu126/
# for CPU
python -m pip install paddlepaddle==3.0.0 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/
You can also integrate the model inference of the layout detection module into your project. Before running the following code, please download the sample image to your local machine.
from paddleocr import LayoutDetection
model = LayoutDetection(model_name="RT-DETR-H_layout_3cls")
output = model.predict("N5C68HPVAI-xQAWTxpbA6.jpeg", batch_size=1, layout_nms=True)
for res in output:
res.print()
res.save_to_img(save_path="./output/")
res.save_to_json(save_path="./output/res.json")
For details about usage command and descriptions of parameters, please refer to the
Document
.
Pipeline Usage
The ability of a single model is limited. But the pipeline consists of several models can provide more capacity to resolve difficult problems in real-world scenarios.
PP-ChatOCRv4-doc
PP-ChatOCRv4-doc is a unique document and image intelligent analysis solution from PaddlePaddle, combining LLM, MLLM, and OCR technologies to address complex document information extraction challenges such as layout analysis, rare characters, multi-page PDFs, tables, and seal recognition. Integrated with ERNIE Bot, it fuses massive data and knowledge, achieving high accuracy and wide applicability.
The Document Scene Information Extraction v4 pipeline includes modules for Layout Region Detection, Table Structure Recognition, Table Classification, Table Cell Localization, Text Detection, Text Recognition, Seal Text Detection, Text Image Rectification, and Document Image Orientation Classification.
You can quickly experience the PP-ChatOCRv4-doc pipeline with a single command.
The default model used in pipeline is
RT-DETR-H_layout_3cls
. For details about usage command and descriptions of parameters, please refer to the
Document
.
RT-DETR-H_layout_3cls huggingface.co is an AI model on huggingface.co that provides RT-DETR-H_layout_3cls's model effect (), which can be used instantly with this PaddlePaddle RT-DETR-H_layout_3cls model. huggingface.co supports a free trial of the RT-DETR-H_layout_3cls model, and also provides paid use of the RT-DETR-H_layout_3cls. Support call RT-DETR-H_layout_3cls model through api, including Node.js, Python, http.
RT-DETR-H_layout_3cls huggingface.co is an online trial and call api platform, which integrates RT-DETR-H_layout_3cls's modeling effects, including api services, and provides a free online trial of RT-DETR-H_layout_3cls, you can try RT-DETR-H_layout_3cls online for free by clicking the link below.
PaddlePaddle RT-DETR-H_layout_3cls online free url in huggingface.co:
RT-DETR-H_layout_3cls is an open source model from GitHub that offers a free installation service, and any user can find RT-DETR-H_layout_3cls on GitHub to install. At the same time, huggingface.co provides the effect of RT-DETR-H_layout_3cls install, users can directly use RT-DETR-H_layout_3cls installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
RT-DETR-H_layout_3cls install url in huggingface.co: