Skip to content

Commit

Permalink
Merge branch 'dygraph' of https://github.com/PaddlePaddle/PaddleOCR i…
Browse files Browse the repository at this point in the history
…nto drrg_branch
  • Loading branch information
zhiminzhang0830 committed Oct 8, 2022
2 parents 1f9400d + 4c00402 commit 03802c7
Show file tree
Hide file tree
Showing 33 changed files with 1,916 additions and 151 deletions.
3 changes: 3 additions & 0 deletions PPOCRLabel/PPOCRLabel.py
Original file line number Diff line number Diff line change
Expand Up @@ -2715,6 +2715,9 @@ def change_box_key(self):

self._update_shape_color(shape)
self.keyDialog.addLabelHistory(key_text)

# save changed shape
self.setDirty()

def undoShapeEdit(self):
self.canvas.restoreShape()
Expand Down
2 changes: 1 addition & 1 deletion PPOCRLabel/README_ch.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# PPOCRLabelv2

PPOCRLabel是一款适用于OCR领域的半自动化图形标注工具,内置PP-OCR模型对数据自动标注和重新识别。使用Python3和PyQT5编写,支持矩形框标注和四点标注模式,导出格式可直接用于PaddleOCR检测和识别模型的训练。
PPOCRLabel是一款适用于OCR领域的半自动化图形标注工具,内置PP-OCR模型对数据自动标注和重新识别。使用Python3和PyQT5编写,支持矩形框标注、表格标注、不规则文本标注、关键信息标注模式,导出格式可直接用于PaddleOCR检测和识别模型的训练。

| 常规标注 | 表格标注 |
| :-------------------------------------------------: | :--------------------------------------------: |
Expand Down
6 changes: 3 additions & 3 deletions PPOCRLabel/libs/canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,8 +611,8 @@ def paintEvent(self, event):

if self.drawing() and not self.prevPoint.isNull() and not self.outOfPixmap(self.prevPoint):
p.setPen(QColor(0, 0, 0))
p.drawLine(self.prevPoint.x(), 0, self.prevPoint.x(), self.pixmap.height())
p.drawLine(0, self.prevPoint.y(), self.pixmap.width(), self.prevPoint.y())
p.drawLine(int(self.prevPoint.x()), 0, int(self.prevPoint.x()), self.pixmap.height())
p.drawLine(0, int(self.prevPoint.y()), self.pixmap.width(), int(self.prevPoint.y()))

self.setAutoFillBackground(True)
if self.verified:
Expand Down Expand Up @@ -909,4 +909,4 @@ def isShapeRestorable(self):
def updateShapeIndex(self):
for i in range(len(self.shapes)):
self.shapes[i].idx = i
self.update()
self.update()
2 changes: 1 addition & 1 deletion PPOCRLabel/resources/strings/strings-en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,4 @@ keyDialogTip=Enter object label
keyChange=Change Box Key
TableRecognition=Table Recognition
cellreRecognition=Cell Re-Recognition
exportJSON=Export Excel Label(PubTabNet)
exportJSON=Export Table Label
2 changes: 1 addition & 1 deletion PPOCRLabel/resources/strings/strings-zh-CN.properties
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,4 @@ keyDialogTip=请输入类型名称
keyChange=更改Box关键字类别
TableRecognition=表格识别
cellreRecognition=单元格重识别
exportJSON=导出表格JSON标注
exportJSON=导出表格标注
Loading

0 comments on commit 03802c7

Please sign in to comment.