RapidAI / RapidStructure

版面分析 | 表格识别 | 文档方向分类
Apache License 2.0
182 stars 14 forks source link

如何输出表格html时,单元格tag里带上坐标? #3

Closed nissansz closed 1 year ago

nissansz commented 1 year ago

请您详细描述想要添加的新功能或者是新特性 (Please describe in detail the new function or new feature you want to add)

如何输出表格html时,单元格tag里带上坐标?

SWHL commented 1 year ago

参考号这里: https://github.com/RapidAI/RapidStructure/blob/7ea591b4fe483f35faa3b14a8474002fb8c7337d/rapid_table/table_structure/table_structure.py#L49

nissansz commented 1 year ago

这个调用代码好像没引入[table_structure.py]

python脚本运行

import cv2 from rapid_table import RapidTable

RapidTable类提供model_path参数,可以自行指定上述2个模型,默认是en_ppstructure_mobile_v2_SLANet.onnx

table_engine = RapidTable(model_path='ch_ppstructure_mobile_v2_SLANet.onnx')

table_engine = RapidTable()

img = cv2.imread('test_images/table.jpg') table_htmlstr, = table_engine(img) print(table_html_str)

SWHL commented 1 year ago
nissansz commented 1 year ago

在rapid_table.py里得到dt_boxes后用其他onnx再次识别,更新rec_res就可以实现了