Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_41840029
PaddleOCR
提交
e8edb437
P
PaddleOCR
项目概览
weixin_41840029
/
PaddleOCR
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleOCR
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleOCR
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
e8edb437
编写于
2月 20, 2022
作者:
HinGwenWoong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add Right click change key class
上级
ad904fca
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
20 addition
and
4 deletion
+20
-4
PPOCRLabel/PPOCRLabel.py
PPOCRLabel/PPOCRLabel.py
+16
-2
PPOCRLabel/resources/strings/strings-en.properties
PPOCRLabel/resources/strings/strings-en.properties
+2
-1
PPOCRLabel/resources/strings/strings-zh-CN.properties
PPOCRLabel/resources/strings/strings-zh-CN.properties
+2
-1
未找到文件。
PPOCRLabel/PPOCRLabel.py
浏览文件 @
e8edb437
...
@@ -464,6 +464,9 @@ class MainWindow(QMainWindow):
...
@@ -464,6 +464,9 @@ class MainWindow(QMainWindow):
undo
=
action
(
getStr
(
"undo"
),
self
.
undoShapeEdit
,
undo
=
action
(
getStr
(
"undo"
),
self
.
undoShapeEdit
,
'Ctrl+Z'
,
"undo"
,
getStr
(
"undo"
),
enabled
=
False
)
'Ctrl+Z'
,
"undo"
,
getStr
(
"undo"
),
enabled
=
False
)
change_cls
=
action
(
getStr
(
"keyChange"
),
self
.
change_box_key
,
'Ctrl+B'
,
"undo"
,
getStr
(
"keyChange"
),
enabled
=
False
)
lock
=
action
(
getStr
(
"lockBox"
),
self
.
lockSelectedShape
,
lock
=
action
(
getStr
(
"lockBox"
),
self
.
lockSelectedShape
,
None
,
"lock"
,
getStr
(
"lockBoxDetail"
),
None
,
"lock"
,
getStr
(
"lockBoxDetail"
),
enabled
=
False
)
enabled
=
False
)
...
@@ -525,14 +528,15 @@ class MainWindow(QMainWindow):
...
@@ -525,14 +528,15 @@ class MainWindow(QMainWindow):
shapeLineColor
=
shapeLineColor
,
shapeFillColor
=
shapeFillColor
,
shapeLineColor
=
shapeLineColor
,
shapeFillColor
=
shapeFillColor
,
zoom
=
zoom
,
zoomIn
=
zoomIn
,
zoomOut
=
zoomOut
,
zoomOrg
=
zoomOrg
,
zoom
=
zoom
,
zoomIn
=
zoomIn
,
zoomOut
=
zoomOut
,
zoomOrg
=
zoomOrg
,
fitWindow
=
fitWindow
,
fitWidth
=
fitWidth
,
fitWindow
=
fitWindow
,
fitWidth
=
fitWidth
,
zoomActions
=
zoomActions
,
saveLabel
=
saveLabel
,
zoomActions
=
zoomActions
,
saveLabel
=
saveLabel
,
change_cls
=
change_cls
,
undo
=
undo
,
undoLastPoint
=
undoLastPoint
,
open_dataset_dir
=
open_dataset_dir
,
undo
=
undo
,
undoLastPoint
=
undoLastPoint
,
open_dataset_dir
=
open_dataset_dir
,
rotateLeft
=
rotateLeft
,
rotateRight
=
rotateRight
,
lock
=
lock
,
rotateLeft
=
rotateLeft
,
rotateRight
=
rotateRight
,
lock
=
lock
,
fileMenuActions
=
(
opendir
,
open_dataset_dir
,
saveLabel
,
resetAll
,
quit
),
fileMenuActions
=
(
opendir
,
open_dataset_dir
,
saveLabel
,
resetAll
,
quit
),
beginner
=
(),
advanced
=
(),
beginner
=
(),
advanced
=
(),
editMenu
=
(
createpoly
,
edit
,
copy
,
delete
,
singleRere
,
None
,
undo
,
undoLastPoint
,
editMenu
=
(
createpoly
,
edit
,
copy
,
delete
,
singleRere
,
None
,
undo
,
undoLastPoint
,
None
,
rotateLeft
,
rotateRight
,
None
,
color1
,
self
.
drawSquaresOption
,
lock
),
None
,
rotateLeft
,
rotateRight
,
None
,
color1
,
self
.
drawSquaresOption
,
lock
),
beginnerContext
=
(
create
,
edit
,
copy
,
delete
,
singleRere
,
rotateLeft
,
rotateRight
,
lock
),
beginnerContext
=
(
create
,
edit
,
copy
,
delete
,
singleRere
,
rotateLeft
,
rotateRight
,
lock
,
change_cls
),
advancedContext
=
(
createMode
,
editMode
,
edit
,
copy
,
advancedContext
=
(
createMode
,
editMode
,
edit
,
copy
,
delete
,
shapeLineColor
,
shapeFillColor
),
delete
,
shapeLineColor
,
shapeFillColor
),
onLoadActive
=
(
create
,
createMode
,
editMode
),
onLoadActive
=
(
create
,
createMode
,
editMode
),
...
@@ -984,6 +988,7 @@ class MainWindow(QMainWindow):
...
@@ -984,6 +988,7 @@ class MainWindow(QMainWindow):
self
.
actions
.
copy
.
setEnabled
(
n_selected
)
self
.
actions
.
copy
.
setEnabled
(
n_selected
)
self
.
actions
.
edit
.
setEnabled
(
n_selected
==
1
)
self
.
actions
.
edit
.
setEnabled
(
n_selected
==
1
)
self
.
actions
.
lock
.
setEnabled
(
n_selected
)
self
.
actions
.
lock
.
setEnabled
(
n_selected
)
self
.
actions
.
change_cls
.
setEnabled
(
n_selected
)
def
addLabel
(
self
,
shape
):
def
addLabel
(
self
,
shape
):
shape
.
paintLabel
=
self
.
displayLabelOption
.
isChecked
()
shape
.
paintLabel
=
self
.
displayLabelOption
.
isChecked
()
...
@@ -2178,6 +2183,15 @@ class MainWindow(QMainWindow):
...
@@ -2178,6 +2183,15 @@ class MainWindow(QMainWindow):
self
.
autoSaveNum
=
5
# Used for backup
self
.
autoSaveNum
=
5
# Used for backup
print
(
'The program will automatically save once after confirming 5 images (default)'
)
print
(
'The program will automatically save once after confirming 5 images (default)'
)
def
change_box_key
(
self
):
key_text
,
_
=
self
.
keyDialog
.
popUp
(
self
.
key_previous_text
)
if
key_text
is
None
:
return
self
.
key_previous_text
=
key_text
for
shape
in
self
.
canvas
.
selectedShapes
:
shape
.
key_cls
=
key_text
self
.
_update_shape_color
(
shape
)
def
undoShapeEdit
(
self
):
def
undoShapeEdit
(
self
):
self
.
canvas
.
restoreShape
()
self
.
canvas
.
restoreShape
()
self
.
labelList
.
clear
()
self
.
labelList
.
clear
()
...
...
PPOCRLabel/resources/strings/strings-en.properties
浏览文件 @
e8edb437
...
@@ -108,4 +108,5 @@ autoSaveMode=Auto Export Label Mode
...
@@ -108,4 +108,5 @@ autoSaveMode=Auto Export Label Mode
lockBox
=
Lock selected box/Unlock all box
lockBox
=
Lock selected box/Unlock all box
lockBoxDetail
=
Lock selected box/Unlock all box
lockBoxDetail
=
Lock selected box/Unlock all box
keyListTitle
=
Key List
keyListTitle
=
Key List
keyDialogTip
=
Enter object label
keyDialogTip
=
Enter object label
\ No newline at end of file
keyChange
=
Change Box Key
PPOCRLabel/resources/strings/strings-zh-CN.properties
浏览文件 @
e8edb437
...
@@ -108,4 +108,5 @@ autoSaveMode=自动导出标记结果
...
@@ -108,4 +108,5 @@ autoSaveMode=自动导出标记结果
lockBox
=
锁定框/解除锁定框
lockBox
=
锁定框/解除锁定框
lockBoxDetail
=
若当前没有框处于锁定状态则锁定选中的框,若存在锁定框则解除所有锁定框的锁定状态
lockBoxDetail
=
若当前没有框处于锁定状态则锁定选中的框,若存在锁定框则解除所有锁定框的锁定状态
keyListTitle
=
关键词列表
keyListTitle
=
关键词列表
keyDialogTip
=
请输入类型名称
keyDialogTip
=
请输入类型名称
\ No newline at end of file
keyChange
=
更改Box关键字类别
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录