未验证 提交 896d149e 编写于 作者: E Evezerest 提交者: GitHub

Merge pull request #6135 from PeterH0323/fix-label

[PPOCRLable] Fix 3 Bugs 🐛 
...@@ -1439,8 +1439,8 @@ class MainWindow(QMainWindow): ...@@ -1439,8 +1439,8 @@ class MainWindow(QMainWindow):
DEFAULT_LOCK_COLOR, key_cls, box['difficult'])) DEFAULT_LOCK_COLOR, key_cls, box['difficult']))
if imgidx in self.PPlabel.keys(): if imgidx in self.PPlabel.keys():
for box in self.PPlabel[imgidx]: for box in self.PPlabel[imgidx]:
key_cls = None if not self.kie_mode else box['key_cls'] key_cls = None if not self.kie_mode else box.get('key_cls', 'None')
shapes.append((box['transcription'], box['points'], None, key_cls, box['difficult'])) shapes.append((box['transcription'], box['points'], None, key_cls, box.get('difficult', False)))
self.loadLabels(shapes) self.loadLabels(shapes)
self.canvas.verified = False self.canvas.verified = False
...@@ -1584,7 +1584,7 @@ class MainWindow(QMainWindow): ...@@ -1584,7 +1584,7 @@ class MainWindow(QMainWindow):
for image, info in label_dict.items(): for image, info in label_dict.items():
for box in info: for box in info:
if "key_cls" not in box: if "key_cls" not in box:
continue box.update({"key_cls": "None"})
self.existed_key_cls_set.add(box["key_cls"]) self.existed_key_cls_set.add(box["key_cls"])
if len(self.existed_key_cls_set) > 0: if len(self.existed_key_cls_set) > 0:
for key_text in self.existed_key_cls_set: for key_text in self.existed_key_cls_set:
...@@ -1606,8 +1606,6 @@ class MainWindow(QMainWindow): ...@@ -1606,8 +1606,6 @@ class MainWindow(QMainWindow):
fit_to_content={'column': True, 'row': False}, fit_to_content={'column': True, 'row': False},
flags=None flags=None
) )
else:
self.keyDialog.labelList.addItems(self.existed_key_cls_set)
def importDirImages(self, dirpath, isDelete=False): def importDirImages(self, dirpath, isDelete=False):
if not self.mayContinue() or not dirpath: if not self.mayContinue() or not dirpath:
......
...@@ -12,6 +12,7 @@ PPOCRLabel is a semi-automatic graphic annotation tool suitable for OCR field, w ...@@ -12,6 +12,7 @@ PPOCRLabel is a semi-automatic graphic annotation tool suitable for OCR field, w
- Add KIE Mode by using `--kie`, for [detection + identification + keyword extraction] labeling. - Add KIE Mode by using `--kie`, for [detection + identification + keyword extraction] labeling.
- 2022.01:(by [PeterH0323](https://github.com/peterh0323) - 2022.01:(by [PeterH0323](https://github.com/peterh0323)
- Improve user experience: prompt for the number of files and labels, optimize interaction, and fix bugs such as only use CPU when inference - Improve user experience: prompt for the number of files and labels, optimize interaction, and fix bugs such as only use CPU when inference
- New functions: Support using `C` or `X` to rotate box.
- 2021.11.17: - 2021.11.17:
- Support install and start PPOCRLabel through the whl package (by [d2623587501](https://github.com/d2623587501)) - Support install and start PPOCRLabel through the whl package (by [d2623587501](https://github.com/d2623587501))
- Dataset segmentation: Divide the annotation file into training, verification and testing parts (refer to section 3.5 below, by [MrCuiHao](https://github.com/MrCuiHao)) - Dataset segmentation: Divide the annotation file into training, verification and testing parts (refer to section 3.5 below, by [MrCuiHao](https://github.com/MrCuiHao))
......
...@@ -11,7 +11,8 @@ PPOCRLabel是一款适用于OCR领域的半自动化图形标注工具,内置P ...@@ -11,7 +11,8 @@ PPOCRLabel是一款适用于OCR领域的半自动化图形标注工具,内置P
- 2022.02:(by [PeterH0323](https://github.com/peterh0323) - 2022.02:(by [PeterH0323](https://github.com/peterh0323)
- 新增:使用 `--kie` 进入 KIE 功能,用于打【检测+识别+关键字提取】的标签 - 新增:使用 `--kie` 进入 KIE 功能,用于打【检测+识别+关键字提取】的标签
- 2022.01:(by [PeterH0323](https://github.com/peterh0323) - 2022.01:(by [PeterH0323](https://github.com/peterh0323)
- 提升用户体验:新增文件与标记数目提示、优化交互、修复gpu使用等问题 - 提升用户体验:新增文件与标记数目提示、优化交互、修复gpu使用等问题。
- 新增功能:使用 `C``X` 对标记框进行旋转。
- 2021.11.17: - 2021.11.17:
- 新增支持通过whl包安装和启动PPOCRLabel(by [d2623587501](https://github.com/d2623587501) - 新增支持通过whl包安装和启动PPOCRLabel(by [d2623587501](https://github.com/d2623587501)
- 标注数据集切分:对标注数据进行训练、验证与测试集划分(参考下方3.5节,by [MrCuiHao](https://github.com/MrCuiHao) - 标注数据集切分:对标注数据进行训练、验证与测试集划分(参考下方3.5节,by [MrCuiHao](https://github.com/MrCuiHao)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册