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

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

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