1212 <a href =" https://github.com/RapidAI/TableStructureRec/blob/c41bbd23898cb27a957ed962b0ffee3c74dfeff1/LICENSE " ><img alt =" GitHub " src =" https://img.shields.io/badge/license-Apache 2.0-blue " ></a >
1313</div >
1414
15- ### 简介
15+ ### 最近更新
16+ - ** 2024.9.26**
17+ - 修正RapidTable默认英文模型导致的测评结果错误。
18+ - 补充测评数据集,补充开源社区更多模型的测评结果
1619
20+ ### 简介
1721💖该仓库是用来对文档中表格做结构化识别的推理库,包括来自paddle的表格识别模型,
1822阿里读光有线和无线表格识别模型,llaipython(微信)贡献的有线表格模型,网易Qanything内置表格分类模型等。
1923
3337
3438### 指标结果
3539
36- [ TableRecognitionMetric 评测工具] ( https://github.com/SWHL/TableRecognitionMetric ) [ 评测数据集] ( https://huggingface.co/datasets/SWHL/table_rec_test_dataset ) [ Rapid OCR] ( https://github.com/RapidAI/RapidOCR )
40+ [ TableRecognitionMetric 评测工具] ( https://github.com/SWHL/TableRecognitionMetric ) [ huggingface数据集] ( https://huggingface.co/datasets/SWHL/table_rec_test_dataset ) [ modelscope 数据集] ( https://www.modelscope.cn/datasets/jockerK/TEDS_TEST/files ) [ Rapid OCR] ( https://github.com/RapidAI/RapidOCR )
41+
42+ 注: StructEqTable 输出为 latex,只取成功转换为html并去除样式标签后进行测评
43+
44+ | 方法 | TEDS | TEDS-only-structure |
45+ | :---------------------------------------------------------------------------------------------------------------------------| :-----------:| :-------------------:|
46+ | [ deepdoctection(rag-flow)] ( https://github.com/deepdoctection/deepdoctection?tab=readme-ov-file ) | 0.59975 | 0.69918 |
47+ | [ ppstructure_table_master] ( https://github.com/PaddlePaddle/PaddleOCR/tree/main/ppstructure ) | 0.61606 | 0.73892 |
48+ | [ ppsturcture_table_engine] ( https://github.com/PaddlePaddle/PaddleOCR/tree/main/ppstructure ) | 0.67924 | 0.78653 |
49+ | table_cls + wired_table_rec v1 + lineless_table_rec | 0.68507 | 0.75140 |
50+ | [ StructEqTable] ( https://github.com/UniModal4Reasoning/StructEqTable-Deploy ) | 0.67310 | ** 0.81210** |
51+ | [ RapidTable] ( https://github.com/RapidAI/RapidStructure/blob/b800b156015bf5cd6f5429295cdf48be682fd97e/docs/README_Table.md ) | 0.71654 | 0.81067 |
52+ | table_cls + wired_table_rec v2 + lineless_table_rec | ** 0.73702** | 0.80210 |
3753
38- | 方法 | TEDS | TEDS-only-structure |
39- | :---------------------------------------------------------------------------------------------------------------------------| :-------:| :-------------------:|
40- | [ RapidTable] ( https://github.com/RapidAI/RapidStructure/blob/b800b156015bf5cd6f5429295cdf48be682fd97e/docs/README_Table.md ) | 0.59765 | 0.68996 |
41- | ppstructure_table_master | 0.59835 | 0.68996 |
42- | table_cls + wired_table_rec v1 + lineless_table_rec | 0.74692 | 0.83049 |
43- | ppsturcture_table_engine | 0.76835 | 0.83296 |
44- | table_cls + wired_table_rec v2 + lineless_table_rec | 0.80890 | 0.88011 |
4554
4655### 安装
4756
@@ -69,9 +78,15 @@ if cls == 'wired':
6978 table_engine = wired_engine
7079else :
7180 table_engine = lineless_engine
81+
7282html, elasp, polygons, logic_points, ocr_res = table_engine(img_path)
7383print (f " elasp: { elasp} " )
7484
85+ # 使用其他ocr模型
86+ # ocr_engine =RapidOCR(det_model_dir="xxx/det_server_infer.onnx",rec_model_dir="xxx/rec_server_infer.onnx")
87+ # ocr_res, _ = ocr_engine(img_path)
88+ # html, elasp, polygons, logic_points, ocr_res = table_engine(img_path, ocr_result=ocr_res)
89+
7590# output_dir = f'outputs'
7691# complete_html = format_html(html)
7792# os.makedirs(os.path.dirname(f"{output_dir}/table.html"), exist_ok=True)
@@ -105,8 +120,7 @@ cv2.imwrite(f'img_rotated.jpg', img)
105120 - 答:该项目暂时不支持偏移图片识别,请先修正图片,也欢迎提pr来解决这个问题。
106121
1071222 . ** 问:识别框丢失了内部文字信息**
108- -
109- 答:默认使用的rapidocr小模型,如果需要更高精度的效果,可以从 [ 模型列表] ( https://rapidai.github.io/RapidOCRDocs/model_list/#_1 )
123+ - 答:默认使用的rapidocr小模型,如果需要更高精度的效果,可以从 [ 模型列表] ( https://rapidai.github.io/RapidOCRDocs/model_list/#_1 )
110124 下载更高精度的ocr模型,在执行时传入ocr_result即可
111125
1121263 . ** 问:模型支持 gpu 加速吗?**
@@ -116,8 +130,9 @@ cv2.imwrite(f'img_rotated.jpg', img)
116130
117131### TODO List
118132
119- - [ ] 识别前图片偏移修正(完成有线表格小角度偏移修正)
120- - [ ] 增加数据集数量,增加更多评测对比
133+ - [x] 图片小角度偏移修正方法补充
134+ - [x] 增加数据集数量,增加更多评测对比
135+ - [ ] 补充复杂场景表格检测和提取,解决旋转和透视导致的低识别率
121136- [ ] 优化无线表格模型
122137
123138### 处理流程
0 commit comments