From ee9c1bcfc9b35b4145ca14f6bcc449cf593e7ea1 Mon Sep 17 00:00:00 2001 From: Leif <4603009@qq.com> Date: Tue, 9 Feb 2021 15:15:38 +0800 Subject: [PATCH] Fix 4 points and shortcut bugs --- PPOCRLabel/PPOCRLabel.py | 2 +- PPOCRLabel/README.md | 1 - PPOCRLabel/README_ch.md | 1 - PPOCRLabel/libs/shape.py | 5 +---- 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/PPOCRLabel/PPOCRLabel.py b/PPOCRLabel/PPOCRLabel.py index 09f1586d..99c3cce7 100644 --- a/PPOCRLabel/PPOCRLabel.py +++ b/PPOCRLabel/PPOCRLabel.py @@ -435,7 +435,7 @@ class MainWindow(QMainWindow, WindowMixin): ######## New actions ####### AutoRec = action(getStr('autoRecognition'), self.autoRecognition, - 'Ctrl+Shift+A', 'Auto', getStr('autoRecognition'), enabled=False) + '', 'Auto', getStr('autoRecognition'), enabled=False) reRec = action(getStr('reRecognition'), self.reRecognition, 'Ctrl+Shift+R', 'reRec', getStr('reRecognition'), enabled=False) diff --git a/PPOCRLabel/README.md b/PPOCRLabel/README.md index 7b1682ef..c93c720f 100644 --- a/PPOCRLabel/README.md +++ b/PPOCRLabel/README.md @@ -109,7 +109,6 @@ python3 PPOCRLabel.py | Shortcut keys | Description | | ------------------------ | ------------------------------------------------ | -| Ctrl + Shift + A | Automatically label all unchecked images | | Ctrl + Shift + R | Re-recognize all the labels of the current image | | W | Create a rect box | | Q | Create a four-points box | diff --git a/PPOCRLabel/README_ch.md b/PPOCRLabel/README_ch.md index 84294e7e..7bc78800 100644 --- a/PPOCRLabel/README_ch.md +++ b/PPOCRLabel/README_ch.md @@ -96,7 +96,6 @@ python3 PPOCRLabel.py --lang ch | 快捷键 | 说明 | | ---------------- | ---------------------------- | -| Ctrl + shift + A | 自动标注所有未确认过的图片 | | Ctrl + shift + R | 对当前图片的所有标记重新识别 | | W | 新建矩形框 | | Q | 新建四点框 | diff --git a/PPOCRLabel/libs/shape.py b/PPOCRLabel/libs/shape.py index 6a0711fc..ef8e09be 100644 --- a/PPOCRLabel/libs/shape.py +++ b/PPOCRLabel/libs/shape.py @@ -83,10 +83,7 @@ class Shape(object): def addPoint(self, point): if not self.reachMaxPoints(): # 4个点时发出close信号 - if self.points and point == self.points[0]: - self.close() - else: - self.points.append(point) + self.points.append(point) def popPoint(self): if self.points: -- GitLab