Skip to content

Commit

Permalink
Update PPOCRLabel.py
Browse files Browse the repository at this point in the history
解决了导出 JSON 文件时,L2534 将 "cells" 写成 "cell" 的问题。因如下代码取的是cells,否则在训练载入数据时会报 keyerror 的错误。
https://github.com/PaddlePaddle/PaddleOCR/blob/282eebbd660886c38d4ae91bcbcd70b5cdc03f75/ppocr/data/pubtab_dataset.py#L102
  • Loading branch information
dium6i committed Sep 1, 2022
1 parent b2bd75a commit 3273a19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PPOCRLabel/PPOCRLabel.py
Original file line number Diff line number Diff line change
Expand Up @@ -2531,7 +2531,7 @@ def exportJSON(self):
split = 'test'

# 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})
imgid += 1

Expand Down

0 comments on commit 3273a19

Please sign in to comment.