提交 975975d3 编写于 作者: qq_25193841's avatar qq_25193841

Update PPOCRLabel

Update PPOCRLabel
上级 aa2e2835
......@@ -2285,7 +2285,7 @@ class MainWindow(QMainWindow):
'''
Table Recegnition
'''
from paddleocr.ppstructure.table.predict_table import to_excel
from paddleocr import to_excel
import time
......@@ -2309,7 +2309,7 @@ class MainWindow(QMainWindow):
# ONLY SUPPORT ONE TABLE in one image
hasTable = False
for region in res:
if region['type'] == 'Table':
if region['type'] == 'table':
if region['res']['boxes'] is None:
msg = 'Can not recognise the detection box in ' + self.filePath + '. Please change manually'
QMessageBox.information(self, "Information", msg)
......@@ -2336,8 +2336,8 @@ class MainWindow(QMainWindow):
rec_text = region['res']['rec_res'][i][0]
# polys to rectangles
x1, y1 = np.min(bbox[:, 0]), np.min(bbox[:, 1])
x2, y2 = np.max(bbox[:, 0]), np.max(bbox[:, 1])
x1, y1 = np.min(bbox[0::2]), np.min(bbox[::1])
x2, y2 = np.max(bbox[0::2]), np.max(bbox[::1])
rext_bbox = [[x1, y1], [x2, y1], [x2, y2], [x1, y2]]
# save bbox to shape
......
......@@ -17,5 +17,5 @@ __version__ = paddleocr.VERSION
__all__ = [
'PaddleOCR', 'PPStructure', 'draw_ocr', 'draw_structure_result',
'save_structure_res', 'download_with_progressbar', 'sorted_layout_boxes',
'convert_info_docx'
'convert_info_docx', 'to_excel'
]
......@@ -39,15 +39,15 @@ from ppocr.utils.utility import check_and_read, get_image_file_list
from ppocr.utils.network import maybe_download, download_with_progressbar, is_link, confirm_model_dir_url
from tools.infer.utility import draw_ocr, str2bool, check_gpu
from ppstructure.utility import init_args, draw_structure_result
from ppstructure.predict_system import StructureSystem, save_structure_res
from ppstructure.predict_system import StructureSystem, save_structure_res, to_excel
__all__ = [
'PaddleOCR', 'PPStructure', 'draw_ocr', 'draw_structure_result',
'save_structure_res', 'download_with_progressbar'
'save_structure_res', 'download_with_progressbar', 'to_excel'
]
SUPPORT_DET_MODEL = ['DB']
VERSION = '2.6'
VERSION = '2.6.0.1'
SUPPORT_REC_MODEL = ['CRNN', 'SVTR_LCNet']
BASE_DIR = os.path.expanduser("~/.paddleocr/")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册