未验证 提交 3273a198 编写于 作者: D dium6i 提交者: GitHub

Update PPOCRLabel.py

解决了导出 JSON 文件时,L2534 将 "cells" 写成 "cell" 的问题。因如下代码取的是cells,否则在训练载入数据时会报 keyerror 的错误。
https://github.com/PaddlePaddle/PaddleOCR/blob/282eebbd660886c38d4ae91bcbcd70b5cdc03f75/ppocr/data/pubtab_dataset.py#L102
上级 b2bd75a1
...@@ -2531,7 +2531,7 @@ class MainWindow(QMainWindow): ...@@ -2531,7 +2531,7 @@ class MainWindow(QMainWindow):
split = 'test' split = 'test'
# save dict # save dict
html = {'structure': {'tokens': token_list}, 'cell': cells} html = {'structure': {'tokens': token_list}, 'cells': cells}
json_results.append({'filename': os.path.basename(image_path), 'split': split, 'imgid': imgid, 'html': html}) json_results.append({'filename': os.path.basename(image_path), 'split': split, 'imgid': imgid, 'html': html})
imgid += 1 imgid += 1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册