RT DETR L Wireless Table Cell Det
RT-DETR-L_wireless_table_cell_det 是一個高精度的表格單元格檢測模型,專為表格識別任務設計,能夠準確定位和標記表格圖像中的每個單元格區域。
下載量 1,144
發布時間 : 6/6/2025
模型概述
該模型是表格識別任務的關鍵組成部分,負責定位和標記表格圖像中的每個單元格區域,其性能直接影響整個表格識別過程的準確性和效率。
模型特點
高精度檢測
模型在表格單元格檢測任務中具有較高的準確率,Top1 Acc 達到 82.7%。
多模式推理
支持 GPU 和 CPU 推理,並且提供常規模式和高性能模式,滿足不同場景的需求。
豐富的管道
提供通用表格識別 V2 管道和 PP-StructureV3 管道,可解決複雜的表格識別問題。
模型能力
表格單元格檢測
多模式推理
表格識別
使用案例
文檔處理
表格識別
從圖像中提取表格信息並以 HTML 或 Excel 格式輸出。
高精度識別表格結構和內容。
辦公自動化
報銷單據處理
自動識別和提取報銷單據中的表格信息。
提高辦公效率,減少人工輸入錯誤。
🚀 RT-DETR-L_wireless_table_cell_det
表格單元格檢測模塊是表格識別任務的關鍵組成部分,負責定位和標記表格圖像中的每個單元格區域,其性能直接影響整個表格識別過程的準確性和效率。
🚀 快速開始
本項目提供了表格單元格檢測模型 RT-DETR-L_wireless_table_cell_det
,同時介紹了相關的安裝步驟、使用示例以及不同的使用管道,幫助你快速上手錶格識別任務。
✨ 主要特性
- 高精度檢測:
RT-DETR-L_wireless_table_cell_det
模型在表格單元格檢測任務中具有較高的準確率,Top1 Acc 達到 82.7%。 - 多模式推理:支持 GPU 和 CPU 推理,並且提供常規模式和高性能模式,滿足不同場景的需求。
- 豐富的管道:提供通用表格識別 V2 管道和 PP-StructureV3 管道,可解決複雜的表格識別問題。
📦 安裝指南
1. 安裝 PaddlePaddle
請參考以下命令,使用 pip 安裝 PaddlePaddle:
# 適用於 CUDA11.8
python -m pip install paddlepaddle-gpu==3.0.0 -i https://www.paddlepaddle.org.cn/packages/stable/cu118/
# 適用於 CUDA12.6
python -m pip install paddlepaddle-gpu==3.0.0 -i https://www.paddlepaddle.org.cn/packages/stable/cu126/
# 適用於 CPU
python -m pip install paddlepaddle==3.0.0 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/
PaddlePaddle 安裝詳情請參考 PaddlePaddle 官方網站。
2. 安裝 PaddleOCR
從 PyPI 安裝最新版本的 PaddleOCR 推理包:
python -m pip install paddleocr
💻 使用示例
基礎用法
你可以通過以下命令快速體驗模型功能:
paddleocr table_cells_detection \
--model_name RT-DETR-L_wireless_table_cell_det \
-i https://cdn-uploads.huggingface.co/production/uploads/681c1ecd9539bdde5ae1733c/6rfhb-CXOHowonjpBsaUJ.png
你也可以將表格分類模塊的模型推理集成到你的項目中。在運行以下代碼之前,請將示例圖像下載到本地:
from paddleocr import TableCellsDetection
model = TableCellsDetection(model_name="RT-DETR-L_wireless_table_cell_det")
output = model.predict("6rfhb-CXOHowonjpBsaUJ.png", threshold=0.3, batch_size=1)
for res in output:
res.print(json_format=False)
res.save_to_img("./output/")
res.save_to_json("./output/res.json")
運行後,得到的結果如下:
{'res': {'input_path': '6rfhb-CXOHowonjpBsaUJ.png', 'page_index': None, 'boxes': [{'cls_id': 0, 'label': 'cell', 'score': 0.9398849606513977, 'coordinate': [54.36941, 112.458046, 199.20259, 148.8335]}, {'cls_id': 0, 'label': 'cell', 'score': 0.9389436841011047, 'coordinate': [54.376297, 38.66652, 200.09431, 75.04275]}, {'cls_id': 0, 'label': 'cell', 'score': 0.93695068359375, 'coordinate': [54.526768, 75.07727, 199.69261, 112.47577]}, {'cls_id': 0, 'label': 'cell', 'score': 0.9276502132415771, 'coordinate': [256.82742, 112.23729, 327.20367, 148.69609]}, {'cls_id': 0, 'label': 'cell', 'score': 0.9260919690132141, 'coordinate': [392.2286, 112.35808, 494.87323, 148.67969]}, {'cls_id': 0, 'label': 'cell', 'score': 0.926089882850647, 'coordinate': [55.078747, 148.77213, 198.78673, 181.62665]}, {'cls_id': 0, 'label': 'cell', 'score': 0.9243109822273254, 'coordinate': [256.32922, 74.816475, 327.04968, 112.294014]}, {'cls_id': 0, 'label': 'cell', 'score': 0.9232685565948486, 'coordinate': [54.62298, 6.616625, 199.83049, 38.849678]}, {'cls_id': 0, 'label': 'cell', 'score': 0.9232298135757446, 'coordinate': [327.01968, 112.26065, 392.36826, 148.74333]}, {'cls_id': 0, 'label': 'cell', 'score': 0.9225671291351318, 'coordinate': [256.76163, 39.040295, 326.9102, 74.86264]}, {'cls_id': 0, 'label': 'cell', 'score': 0.9212655425071716, 'coordinate': [326.59286, 74.8661, 392.7218, 112.223015]}, {'cls_id': 0, 'label': 'cell', 'score': 0.9207153916358948, 'coordinate': [392.2682, 74.9181, 494.8996, 112.21204]}, {'cls_id': 0, 'label': 'cell', 'score': 0.9201209545135498, 'coordinate': [393.05807, 39.280144, 494.52887, 74.76607]}, {'cls_id': 0, 'label': 'cell', 'score': 0.9167036414146423, 'coordinate': [326.6303, 38.908886, 392.46747, 74.80093]}, {'cls_id': 0, 'label': 'cell', 'score': 0.9165226817131042, 'coordinate': [198.91599, 112.36962, 256.72226, 148.70464]}, {'cls_id': 0, 'label': 'cell', 'score': 0.9159488081932068, 'coordinate': [200.06506, 38.73822, 256.86224, 74.968956]}, {'cls_id': 0, 'label': 'cell', 'score': 0.9144055843353271, 'coordinate': [199.15344, 74.948166, 256.92688, 112.3458]}, {'cls_id': 0, 'label': 'cell', 'score': 0.909517228603363, 'coordinate': [256.9021, 148.65999, 327.34952, 180.787]}, {'cls_id': 0, 'label': 'cell', 'score': 0.9079439043998718, 'coordinate': [392.5967, 148.63753, 494.56372, 180.72824]}, {'cls_id': 0, 'label': 'cell', 'score': 0.9076585173606873, 'coordinate': [393.64462, 6.3321157, 494.12646, 38.97421]}, {'cls_id': 0, 'label': 'cell', 'score': 0.9043015837669373, 'coordinate': [256.7985, 6.373327, 326.6927, 39.124607]}, {'cls_id': 0, 'label': 'cell', 'score': 0.9015249609947205, 'coordinate': [327.21558, 148.66805, 392.69656, 180.74384]}, {'cls_id': 0, 'label': 'cell', 'score': 0.8990758061408997, 'coordinate': [199.04855, 6.3791466, 256.9587, 38.893078]}, {'cls_id': 0, 'label': 'cell', 'score': 0.8976367712020874, 'coordinate': [326.987, 6.264301, 393.08954, 39.058624]}, {'cls_id': 0, 'label': 'cell', 'score': 0.8959962129592896, 'coordinate': [198.89633, 148.7314, 256.86224, 181.1719]}, {'cls_id': 0, 'label': 'cell', 'score': 0.8942931294441223, 'coordinate': [7.233109, 112.34024, 55.069206, 148.63686]}, {'cls_id': 0, 'label': 'cell', 'score': 0.8866638541221619, 'coordinate': [7.6031237, 75.04754, 54.86649, 112.31445]}, {'cls_id': 0, 'label': 'cell', 'score': 0.8835263848304749, 'coordinate': [7.8346314, 38.471584, 54.338577, 75.0842]}, {'cls_id': 0, 'label': 'cell', 'score': 0.8768432140350342, 'coordinate': [6.3656106, 148.65721, 55.30119, 181.48982]}, {'cls_id': 0, 'label': 'cell', 'score': 0.8766786456108093, 'coordinate': [8.270618, 6.590586, 54.000782, 38.58467]}]}}
可視化圖像如下:
使用命令和參數說明詳情請參考 文檔。
高級用法
單個模型的能力有限,但由多個模型組成的管道可以提供更強的能力,以解決現實場景中的難題。
通用表格識別 V2 管道
通用表格識別 V2 管道用於解決表格識別任務,通過從圖像中提取信息並以 HTML 或 Excel 格式輸出。管道中包含 8 個模塊:
- 表格分類模塊
- 表格結構識別模塊
- 表格單元格檢測模塊
- 文本檢測模塊
- 文本識別模塊
- 佈局區域檢測模塊(可選)
- 文檔圖像方向分類模塊(可選)
- 文本圖像去畸變模塊(可選) 運行以下命令可快速體驗通用表格識別 V2 管道:
paddleocr table_recognition_v2 -i https://cdn-uploads.huggingface.co/production/uploads/681c1ecd9539bdde5ae1733c/mabagznApI1k9R8qFoTLc.png \
--use_doc_orientation_classify False \
--use_doc_unwarping False \
--save_path ./output \
--device gpu:0
結果將打印到終端:
{'res': {'input_path': 'mabagznApI1k9R8qFoTLc.png', 'page_index': None, 'model_settings': {'use_doc_preprocessor': False, 'use_layout_detection': True, 'use_ocr_model': True}, 'layout_det_res': {'input_path': None, 'page_index': None, 'boxes': [{'cls_id': 8, 'label': 'table', 'score': 0.86655592918396, 'coordinate': [0.0125130415, 0.41920784, 1281.3737, 585.3884]}]}, 'overall_ocr_res': {'input_path': None, 'page_index': None, 'model_settings': {'use_doc_preprocessor': False, 'use_textline_orientation': False}, 'dt_polys': array([[[ 9, 21],
...,
[ 9, 59]],
...,
[[1046, 536],
...,
[1046, 573]]], dtype=int16), 'text_det_params': {'limit_side_len': 960, 'limit_type': 'max', 'thresh': 0.3, 'box_thresh': 0.6, 'unclip_ratio': 2.0}, 'text_type': 'general', 'textline_orientation_angles': array([-1, ..., -1]), 'text_rec_score_thresh': 0, 'rec_texts': ['部門', '報銷人', '報銷事由', '批准人:', '單據', '張', '合計金額', '元', '車費票', '其', '火車費票', '飛機票', '中', '旅住宿費', '其他', '補貼'], 'rec_scores': array([0.99958128, ..., 0.99317062]), 'rec_polys': array([[[ 9, 21],
...,
[ 9, 59]],
...,
[[1046, 536],
...,
[1046, 573]]], dtype=int16), 'rec_boxes': array([[ 9, ..., 59],
...,
[1046, ..., 573]], dtype=int16)}, 'table_res_list': [{'cell_box_list': [array([ 0.13052222, ..., 73.08310249]), array([104.43082511, ..., 73.27777413]), array([319.39041221, ..., 73.30439308]), array([424.2436837 , ..., 73.44736794]), array([580.75836265, ..., 73.24003914]), array([723.04370201, ..., 73.22717598]), array([984.67315757, ..., 73.20420387]), array([1.25130415e-02, ..., 5.85419208e+02]), array([984.37072837, ..., 137.02281502]), array([984.26586998, ..., 201.22290352]), array([984.24017417, ..., 585.30775765]), array([1039.90606773, ..., 265.44664314]), array([1039.69549644, ..., 329.30540779]), array([1039.66546714, ..., 393.57319954]), array([1039.5122689 , ..., 457.74644783]), array([1039.55535972, ..., 521.73030403]), array([1039.58612144, ..., 585.09468392])], 'pred_html': '<html><body><table><tbody><tr><td>部門</td><td></td><td>報銷人</td><td></td><td>報銷事由</td><td></td><td colspan="2">批准人:</td></tr><tr><td colspan="6" rowspan="8"></td><td colspan="2">單據 張</td></tr><tr><td colspan="2">合計金額 元</td></tr><tr><td rowspan="6">其 中</td><td>車費票</td></tr><tr><td>火車費票</td></tr><tr><td>飛機票</td></tr><tr><td>旅住宿費</td></tr><tr><td>其他</td></tr><tr><td>補貼</td></tr></tbody></table></body></html>', 'table_ocr_pred': {'rec_polys': array([[[ 9, 21],
...,
[ 9, 59]],
...,
[[1046, 536],
...,
[1046, 573]]], dtype=int16), 'rec_texts': ['部門', '報銷人', '報銷事由', '批准人:', '單據', '張', '合計金額', '元', '車費票', '其', '火車費票', '飛機票', '中', '旅住宿費', '其他', '補貼'], 'rec_scores': array([0.99958128, ..., 0.99317062]), 'rec_boxes': array([[ 9, ..., 59],
...,
[1046, ..., 573]], dtype=int16)}}]}}
如果指定了 save_path
,可視化結果將保存到 save_path
目錄下。可視化輸出如下:
命令行方法適用於快速體驗。對於項目集成,也只需幾行代碼:
from paddleocr import TableRecognitionPipelineV2
pipeline = TableRecognitionPipelineV2(
use_doc_orientation_classify=False, # 使用 use_doc_orientation_classify 啟用/禁用文檔方向分類模型
use_doc_unwarping=False, # 使用 use_doc_unwarping 啟用/禁用文檔去畸變模塊
)
# pipeline = TableRecognitionPipelineV2(use_doc_orientation_classify=True) # 使用 use_doc_orientation_classify 指定是否使用文檔方向分類模型
# pipeline = TableRecognitionPipelineV2(use_doc_unwarping=True) # 使用 use_doc_unwarping 指定是否使用文本圖像去畸變模塊
# pipeline = TableRecognitionPipelineV2(device="gpu") # 使用 device 指定使用 GPU 進行模型推理
output = pipeline.predict("https://cdn-uploads.huggingface.co/production/uploads/681c1ecd9539bdde5ae1733c/mabagznApI1k9R8qFoTLc.png")
for res in output:
res.print() ## 打印預測的結構化輸出
res.save_to_img("./output/")
res.save_to_xlsx("./output/")
res.save_to_html("./output/")
res.save_to_json("./output/")
使用命令和參數說明詳情請參考 文檔。
PP-StructureV3
佈局分析是一種從文檔圖像中提取結構化信息的技術。PP-StructureV3 包含以下六個模塊:
- 佈局檢測模塊
- 通用 OCR 管道
- 文檔圖像預處理管道(可選)
- 表格識別管道(可選)
- 印章識別管道(可選)
- 公式識別管道(可選) 運行以下命令可快速體驗 PP-StructureV3 管道:
paddleocr pp_structurev3 -i https://cdn-uploads.huggingface.co/production/uploads/681c1ecd9539bdde5ae1733c/mG4tnwfrvECoFMu-S9mxo.png \
--use_doc_orientation_classify False \
--use_doc_unwarping False \
--use_textline_orientation False \
--device gpu:0
結果將打印到終端。如果指定了 save_path
,結果將保存到 save_path
目錄下。
只需幾行代碼即可體驗管道推理。以 PP-StructureV3 管道為例:
from paddleocr import PPStructureV3
pipeline = PPStructureV3(
use_doc_orientation_classify=False, # 使用 use_doc_orientation_classify 啟用/禁用文檔方向分類模型
use_doc_unwarping=False, # 使用 use_doc_unwarping 啟用/禁用文檔去畸變模塊
use_textline_orientation=False, # 使用 use_textline_orientation 啟用/禁用文本行方向分類模型
device="gpu:0", # 使用 device 指定使用 GPU 進行模型推理
)
output = pipeline.predict("./pp_structure_v3_demo.png")
for res in output:
res.print() # 打印結構化預測輸出
res.save_to_json(save_path="output") ## 以 JSON 格式保存當前圖像的結構化結果
res.save_to_markdown(save_path="output") ## 以 Markdown 格式保存當前圖像的結果
使用命令和參數說明詳情請參考 文檔。
📚 詳細文檔
屬性 | 詳情 |
---|---|
模型類型 | RT-DETR-L_wireless_table_cell_det |
訓練數據 | 未提及 |
📄 許可證
本項目採用 Apache-2.0 許可證。
🔗 鏈接
Table Transformer Structure Recognition
MIT
基於PubTables1M數據集訓練的表格變換器模型,用於從非結構化文檔中提取表格結構
文字識別
Transformers

T
microsoft
1.2M
186
Trocr Small Handwritten
TrOCR是一個基於Transformer的光學字符識別模型,專門用於手寫文本圖像的識別。
文字識別
Transformers

T
microsoft
517.96k
45
Table Transformer Structure Recognition V1.1 All
MIT
基於Transformer的表格結構識別模型,用於檢測文檔中的表格結構
文字識別
Transformers

T
microsoft
395.03k
70
Trocr Large Printed
基於Transformer的光學字符識別模型,適用於單行印刷體文本識別
文字識別
Transformers

T
microsoft
295.59k
162
Texify
Texify 是一個 OCR 工具,專門用於將公式圖片和文本轉換為 LaTeX 格式。
文字識別
Transformers

T
vikp
206.53k
15
Trocr Base Printed
TrOCR是基於Transformer的光學字符識別模型,專為單行文本圖像識別設計,採用編碼器-解碼器架構
文字識別
Transformers

T
microsoft
184.84k
169
Manga Ocr Base
Apache-2.0
專為日語文本設計的光學字符識別工具,主要針對日本漫畫場景優化。
文字識別
Transformers 日語

M
kha-white
130.36k
145
Tiny Random Internvl2
專注於將圖像中的文本信息提取並轉化為可編輯的文本內容
文字識別
Safetensors
T
katuni4ka
73.27k
0
Trocr Large Handwritten
TrOCR是基於Transformer的光學字符識別模型,專為手寫文本識別設計,在IAM數據集上進行了微調。
文字識別
Transformers

T
microsoft
59.17k
115
Trocr Small Printed
TrOCR是一個基於Transformer的光學字符識別模型,適用於單行文本圖像的OCR任務。
文字識別
Transformers

T
microsoft
20.88k
40
精選推薦AI模型
Llama 3 Typhoon V1.5x 8b Instruct
專為泰語設計的80億參數指令模型,性能媲美GPT-3.5-turbo,優化了應用場景、檢索增強生成、受限生成和推理任務
大型語言模型
Transformers 支持多種語言

L
scb10x
3,269
16
Cadet Tiny
Openrail
Cadet-Tiny是一個基於SODA數據集訓練的超小型對話模型,專為邊緣設備推理設計,體積僅為Cosmo-3B模型的2%左右。
對話系統
Transformers 英語

C
ToddGoldfarb
2,691
6
Roberta Base Chinese Extractive Qa
基於RoBERTa架構的中文抽取式問答模型,適用於從給定文本中提取答案的任務。
問答系統 中文
R
uer
2,694
98