Skip to content

Commit

Permalink
Update PPOCRLabel.py
Browse files Browse the repository at this point in the history
  • Loading branch information
edencfc committed Jul 26, 2022
1 parent cb9d786 commit 60a2dcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PPOCRLabel/PPOCRLabel.py
Original file line number Diff line number Diff line change
Expand Up @@ -2115,7 +2115,7 @@ def autoRecognition(self):
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 = []
Expand Down Expand Up @@ -2184,7 +2184,7 @@ def reRecognition(self):
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:
Expand Down

0 comments on commit 60a2dcd

Please sign in to comment.