From 3b52e3acc1410df95a4c83a5042d54ed56df085d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B6=E8=B5=B7=E8=B7=91=E7=BA=BF?= Date: Thu, 22 Feb 2024 04:36:48 +0000 Subject: [PATCH] =?UTF-8?q?PPOCRLable=E7=9A=84=E8=A1=A8=E6=A0=BC=E8=AF=86?= =?UTF-8?q?=E5=88=AB=E6=94=AF=E6=8C=81=E4=B8=AD=E6=96=87=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 零起跑线 --- PPOCRLabel/PPOCRLabel.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PPOCRLabel/PPOCRLabel.py b/PPOCRLabel/PPOCRLabel.py index 6c8154d1c..af54cee18 100644 --- a/PPOCRLabel/PPOCRLabel.py +++ b/PPOCRLabel/PPOCRLabel.py @@ -22,6 +22,7 @@ import platform import subprocess import sys import xlrd +import numpy as np from functools import partial from PyQt5.QtCore import QSize, Qt, QPoint, QByteArray, QTimer, QFileInfo, QPointF, QProcess @@ -2291,7 +2292,7 @@ class MainWindow(QMainWindow): import time start = time.time() - img = cv2.imread(self.filePath) + img = cv2.imdecode(np.fromfile(self.filePath,dtype=np.uint8),-1) res = self.table_ocr(img, return_ocr_result_in_table=True) TableRec_excel_dir = self.lastOpenDir + '/tableRec_excel_output/' -- Gitee