Fixed Chinese path not recognize bug

Fixed the bug where Chinese path pictures were not recognized
pull/6983/head
edencfc 2022-07-25 11:35:05 +08:00 committed by GitHub
parent db5d66f9de
commit cb9d7866d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -2115,7 +2115,7 @@ class MainWindow(QMainWindow):
self.init_key_list(self.Cachelabel)
def reRecognition(self):
img = cv2.imread(self.filePath)
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.imread(self.filePath)
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: