mirror of
https://github.com/PaddlePaddle/PaddleOCR.git
synced 2025-11-02 02:39:16 +00:00
Modify the output bug of PaddleOCR==2.6.1 update. (#8391)
This commit is contained in:
parent
931edad131
commit
c0ea753f17
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user