From 60a2dcdfb6a0da084296adfe7ee47d79b3ca8162 Mon Sep 17 00:00:00 2001
From: edencfc <39668828+edencfc@users.noreply.github.com>
Date: Tue, 26 Jul 2022 15:42:52 +0800
Subject: [PATCH] Update PPOCRLabel.py

---
 PPOCRLabel/PPOCRLabel.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PPOCRLabel/PPOCRLabel.py b/PPOCRLabel/PPOCRLabel.py
index f439efd8e..aeed6435a 100644
--- a/PPOCRLabel/PPOCRLabel.py
+++ b/PPOCRLabel/PPOCRLabel.py
@@ -2115,7 +2115,7 @@ class MainWindow(QMainWindow):
         self.init_key_list(self.Cachelabel)
 
     def reRecognition(self):
-        img = cv2.imdecode(np.fromfile(self.filePath,dtype=np.uint8),-1)
+        img = cv2.imdecode(np.fromfile(self.filePath,dtype=np.uint8),1)
         # org_box = [dic['points'] for dic in self.PPlabel[self.getImglabelidx(self.filePath)]]
         if self.canvas.shapes:
             self.result_dic = []
@@ -2184,7 +2184,7 @@ class MainWindow(QMainWindow):
             QMessageBox.information(self, "Information", "Draw a box!")
 
     def singleRerecognition(self):
-        img = cv2.imdecode(np.fromfile(self.filePath,dtype=np.uint8),-1)
+        img = cv2.imdecode(np.fromfile(self.filePath,dtype=np.uint8),1)
         for shape in self.canvas.selectedShapes:
             box = [[int(p.x()), int(p.y())] for p in shape.points]
             if len(box) > 4: