/ Модель

Характеристики

Лицензия
Apache 2.0
Библиотека
PaddleOCR
Опубликована
6 июн 2025

RT-DETR-H_layout_17cls

Описание изображенийИзображение → текст7 профессий

Модель PaddleOCR на базе RT-DETR-H обнаруживает 17 типов областей макета в изображениях китайских и англоязычных документов.

41скачиваний за 30 дней2лайкавеса обновлены22 июл 2025

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

RT-DETR-H_layout_17cls — модель PaddleOCR для локализации областей макета в изображениях документов. Она обучена PaddlePaddle на собственном наборе данных из 892 изображений китайских и англоязычных статей, журналов и исследовательских отчётов. Модель обнаруживает 17 типов областей: заголовки документа и разделов, текст, изображения, формулы, таблицы и их подписи, ссылки, сноски, колонтитулы, алгоритмы, печати и другие элементы.

Модель предназначена для выделения структуры страниц перед распознаванием текста или обработкой таблиц; её можно подключить как модуль обнаружения макета в конвейере PP-TableMagic. В README указано значение mAP@0.5 98,3%. Лицензия репозитория — Apache-2.0. Метаданные относят модель к image-to-text и указывают английский и китайский языки.

Сценарии применения

  • выделение текстовых блоков и заголовков в научных статьях
  • обнаружение таблиц, формул и подписей к рисункам на страницах документов
  • разметка структуры журналов и исследовательских отчётов
  • предварительное выделение областей документа для OCR
  • обнаружение сносок, колонтитулов и списка литературы

Ограничения

Модель локализует области макета, но сама по себе не распознаёт текст и содержимое таблиц. Оценка качества приведена для собственного набора из 892 изображений китайских и англоязычных документов, поэтому перенос на другие типы страниц может отличаться.

Для каких профессий подходит7

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

RT-DETR-H_layout_17cls

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 17-Class Area Detection Model, including 17 common layout categories: Paragraph Title, Image, Text, Number, Abstract, Content, Figure Caption, Formula, Table, Table Caption, References, Document Title, Footnote, Header, Algorithm, Footer, and Seal. The key metrics are as follow:

ModelmAP(0.5) (%)
RT-DETR-H_layout_17cls98.3

Note: Paddleocr's self built layout area detection data set contains 892 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_17cls \
    -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_17cls")
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': 8, 'label': 'table', 'score': 0.9912393093109131, 'coordinate': [435.64767, 105.309265, 662.8984, 313.5123]}, {'cls_id': 8, 'label': 'table', 'score': 0.990542471408844, 'coordinate': [71.72168, 104.943596, 322.20175, 298.0071]}, {'cls_id': 2, 'label': 'text', 'score': 0.9888639450073242, 'coordinate': [35.285786, 350.7265, 360.89682, 612.0047]}, {'cls_id': 2, 'label': 'text', 'score': 0.9886889457702637, 'coordinate': [35.6621, 648.2065, 360.35577, 849.99054]}, {'cls_id': 2, 'label': 'text', 'score': 0.9880586862564087, 'coordinate': [386.79614, 347.20154, 712.9174, 460.22733]}, {'cls_id': 2, 'label': 'text', 'score': 0.9834797978401184, 'coordinate': [386.9635, 736.2906, 712.5422, 851.08307]}, {'cls_id': 2, 'label': 'text', 'score': 0.9647906422615051, 'coordinate': [386.95007, 497.8405, 713.4789, 699.4109]}, {'cls_id': 9, 'label': 'table_title', 'score': 0.9521941542625427, 'coordinate': [35.65011, 21.414091, 361.0532, 77.568085]}, {'cls_id': 2, 'label': 'text', 'score': 0.9295578598976135, 'coordinate': [388.43976, 717.0956, 526.74976, 730.4071]}, {'cls_id': 2, 'label': 'text', 'score': 0.9274019002914429, 'coordinate': [36.738716, 628.7795, 187.91776, 642.0003]}, {'cls_id': 2, 'label': 'text', 'score': 0.9150785207748413, 'coordinate': [36.569218, 331.93774, 143.65463, 345.63232]}, {'cls_id': 9, 'label': 'table_title', 'score': 0.7173759937286377, 'coordinate': [386.58502, 21.287352, 714.23517, 76.551476]}, {'cls_id': 2, 'label': 'text', 'score': 0.7161796689033508, 'coordinate': [387.91153, 477.7165, 701.8612, 491.80142]}]}}

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-TableMagic (table_recognition_v2)

The General Table Recognition v2 pipeline (PP-TableMagic) is designed to tackle table recognition tasks, identifying tables in images and outputting them in HTML format. PP-TableMagic includes the following 8 modules:

  • Table Structure Recognition Module
  • Table Classification Module
  • Table Cell Detection Module
  • Text Detection Module
  • Text Recognition Module
  • Layout Region Detection Module (optional)
  • Document Image Orientation Classification Module (optional)
  • Text Image Unwarping Module (optional)

You can quickly experience the PP-TableMagic pipeline with a single command.

paddleocr table_recognition_v2 -i https://cdn-uploads.huggingface.co/production/uploads/63d7b8ee07cd1aa3c49a2026/tuY1zoUdZsL6-9yGG0MpU.jpeg \
    --layout_detection_model_name RT-DETR-H_layout_17cls \
    --use_doc_orientation_classify False \
    --use_doc_unwarping False \
    --save_path ./output \
    --device gpu:0 

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 TableRecognitionPipelineV2

pipeline = TableRecognitionPipelineV2(
    layout_detection_model_name=RT-DETR-H_layout_17cls,
    use_doc_orientation_classify=False,   # Use use_doc_orientation_classify to enable/disable document orientation classification model
    use_doc_unwarping=False, # Use use_doc_unwarping to enable/disable document unwarping module
    device="gpu:0", # Use device to specify GPU for model inference
    )

output = pipeline.predict("tuY1zoUdZsL6-9yGG0MpU.jpeg")
for res in output:
    res.print() ## Print the predicted structured output
    res.save_to_img("./output/")
    res.save_to_xlsx("./output/")
    res.save_to_html("./output/")
    res.save_to_json("./output/")

The default model used in pipeline is PP-DocLayout-L, so it is needed that specifing to RT-DETR-H_layout_17cls by argument layout_detection_model_name. And you can also use the local model file by argument layout_detection_model_dir. For details about usage command and descriptions of parameters, please refer to the Document.

Links

PaddleOCR Repo

PaddleOCR Documentation

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · PaddleOCR

Нельзя запустить

Модели PaddlePaddle рантайм не загружает.

Ревизия весов
b190533

0 моделей