PaddlePaddle / RT-DETR-H_layout_3cls

huggingface.co
Total runs: 301
24-hour runs: 0
7-day runs: -26
30-day runs: -106
Model's Last Updated: July 22 2025
image-to-text

Introduction of RT-DETR-H_layout_3cls

Model Details of RT-DETR-H_layout_3cls

RT-DETR-H_layout_3cls

Introduction

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
  1. 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/

For details about PaddlePaddle installation, please refer to the PaddlePaddle official website .

  1. PaddleOCR

Install the latest version of the PaddleOCR inference package from PyPI:

python -m pip install paddleocr
Model Usage

You can quickly experience the functionality with a single command:

paddleocr layout_detection \
    --model_name RT-DETR-H_layout_3cls \
    -i https://cdn-uploads.huggingface.co/production/uploads/63d7b8ee07cd1aa3c49a2026/N5C68HPVAI-xQAWTxpbA6.jpeg

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")

After running, the obtained result is as follows:

{'res': {'input_path': '/root/.paddlex/predict_input/N5C68HPVAI-xQAWTxpbA6.jpeg', 'page_index': None, 'boxes': [{'cls_id': 1, 'label': 'table', 'score': 0.9491576552391052, 'coordinate': [73.66756, 105.629265, 322.29645, 299.0941]}, {'cls_id': 1, 'label': 'table', 'score': 0.9472811222076416, 'coordinate': [437.03156, 105.77351, 663.26776, 313.97778]}]}}

The visualized image is as follows:

image/jpeg

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.

paddleocr pp_chatocrv4_doc -i vehicle_certificate-1.png -k 驾驶室准乘人数 --qianfan_api_key your_api_key

If save_path is specified, the visualization results will be saved under save_path .

The command-line method is for quick experience. For project integration, also only a few codes are needed as well:

from paddleocr import PPChatOCRv4Doc

chat_bot_config = {
    "module_name": "chat_bot",
    "model_name": "ernie-3.5-8k",
    "base_url": "https://qianfan.baidubce.com/v2",
    "api_type": "openai",
    "api_key": "api_key",  # your api_key
}

retriever_config = {
    "module_name": "retriever",
    "model_name": "embedding-v1",
    "base_url": "https://qianfan.baidubce.com/v2",
    "api_type": "qianfan",
    "api_key": "api_key",  # your api_key
}

mllm_chat_bot_config = {
    "module_name": "chat_bot",
    "model_name": "PP-DocBee2",
    "base_url": "http://127.0.0.1:8080/",  # your local mllm service url
    "api_type": "openai",
    "api_key": "api_key",  # your api_key
}

pipeline = PPChatOCRv4Doc()

visual_predict_res = pipeline.visual_predict(
    input="vehicle_certificate-1.png",
    use_doc_orientation_classify=False,
    use_doc_unwarping=False,
    use_common_ocr=True,
    use_seal_recognition=True,
    use_table_recognition=True,
)

visual_info_list = []
for res in visual_predict_res:
    visual_info_list.append(res["visual_info"])
    layout_parsing_result = res["layout_parsing_result"]

vector_info = pipeline.build_vector(
    visual_info_list, flag_save_bytes_vector=True, retriever_config=retriever_config
)
mllm_predict_res = pipeline.mllm_pred(
    input="vehicle_certificate-1.png",
    key_list=["驾驶室准乘人数"],
    mllm_chat_bot_config=mllm_chat_bot_config,
)
mllm_predict_info = mllm_predict_res["mllm_res"]
chat_result = pipeline.chat(
    key_list=["驾驶室准乘人数"],
    visual_info=visual_info_list,
    vector_info=vector_info,
    mllm_predict_info=mllm_predict_info,
    chat_bot_config=chat_bot_config,
    retriever_config=retriever_config,
)
print(chat_result)

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 .

Links

PaddleOCR Repo

PaddleOCR Documentation

Runs of PaddlePaddle RT-DETR-H_layout_3cls on huggingface.co

301
Total runs
0
24-hour runs
0
3-day runs
-26
7-day runs
-106
30-day runs

More Information About RT-DETR-H_layout_3cls huggingface.co Model

More RT-DETR-H_layout_3cls license Visit here:

https://choosealicense.com/licenses/apache-2.0

RT-DETR-H_layout_3cls huggingface.co

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 Url

https://huggingface.co/PaddlePaddle/RT-DETR-H_layout_3cls

PaddlePaddle RT-DETR-H_layout_3cls online free

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:

https://huggingface.co/PaddlePaddle/RT-DETR-H_layout_3cls

RT-DETR-H_layout_3cls install

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:

https://huggingface.co/PaddlePaddle/RT-DETR-H_layout_3cls

Url of RT-DETR-H_layout_3cls

RT-DETR-H_layout_3cls huggingface.co Url

Provider of RT-DETR-H_layout_3cls huggingface.co

PaddlePaddle
ORGANIZATIONS

Other API from PaddlePaddle

huggingface.co

Total runs: 588.6K
Run Growth: 37.6K
Growth Rate: 6.39%
Updated:July 22 2025
huggingface.co

Total runs: 393
Run Growth: 167
Growth Rate: 42.49%
Updated:July 22 2025