未验证 提交 c0ea753f 编写于 作者: D d2623587501 提交者: GitHub

Modify the output bug of PaddleOCR==2.6.1 update. (#8391)

上级 931edad1
...@@ -1177,7 +1177,7 @@ class MainWindow(QMainWindow): ...@@ -1177,7 +1177,7 @@ class MainWindow(QMainWindow):
# print('rm empty label') # print('rm empty label')
return return
item = self.shapesToItems[shape] item = self.shapesToItems[shape]
item.setText(shape.label) item.setText(shape.label[0])
self.updateComboBox() self.updateComboBox()
# ADD: # ADD:
......
...@@ -40,7 +40,7 @@ class Worker(QThread): ...@@ -40,7 +40,7 @@ class Worker(QThread):
if self.model == 'paddle': if self.model == 'paddle':
h, w, _ = cv2.imdecode(np.fromfile(Imgpath, dtype=np.uint8), 1).shape h, w, _ = cv2.imdecode(np.fromfile(Imgpath, dtype=np.uint8), 1).shape
if h > 32 and w > 32: if h > 32 and w > 32:
self.result_dic = self.ocr.ocr(Imgpath, cls=True, det=True) self.result_dic = self.ocr.ocr(Imgpath, cls=True, det=True)[0]
else: else:
print('The size of', Imgpath, 'is too small to be recognised') print('The size of', Imgpath, 'is too small to be recognised')
self.result_dic = None self.result_dic = None
......
...@@ -237,7 +237,7 @@ class Canvas(QWidget): ...@@ -237,7 +237,7 @@ class Canvas(QWidget):
self.hShape.highlightClear() self.hShape.highlightClear()
self.hVertex, self.hShape = None, shape self.hVertex, self.hShape = None, shape
self.setToolTip( self.setToolTip(
"Click & drag to move shape '%s'" % shape.label) "Click & drag to move shape '%s'" % shape.label[0])
self.setStatusTip(self.toolTip()) self.setStatusTip(self.toolTip())
self.overrideCursor(CURSOR_GRAB) self.overrideCursor(CURSOR_GRAB)
self.update() self.update()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册