From 1ad52a9ad4029c9b47d9106c9b7907b398383855 Mon Sep 17 00:00:00 2001 From: dium6i <75460093+dium6i@users.noreply.github.com> Date: Wed, 31 Aug 2022 21:15:07 +0800 Subject: [PATCH] Update PPOCRLabel.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 解决了导出 JSON 文件时,L2534 将 "cells" 写成 "cell" 的问题。否则在训练载入数据时会报 keyerror 的错误。 --- PPOCRLabel/PPOCRLabel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PPOCRLabel/PPOCRLabel.py b/PPOCRLabel/PPOCRLabel.py index c17db91a..d0d2bb72 100644 --- a/PPOCRLabel/PPOCRLabel.py +++ b/PPOCRLabel/PPOCRLabel.py @@ -2531,7 +2531,7 @@ class MainWindow(QMainWindow): 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 -- GitLab