Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleOCR
提交
6c455245
P
PaddleOCR
项目概览
PaddlePaddle
/
PaddleOCR
大约 1 年 前同步成功
通知
1528
Star
32962
Fork
6643
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
108
列表
看板
标记
里程碑
合并请求
7
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleOCR
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
108
Issue
108
列表
看板
标记
里程碑
合并请求
7
合并请求
7
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
6c455245
编写于
7月 06, 2021
作者:
锦鲤AI幸运
🎯
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加打开的数据集文件夹的功能
上级
66a76f68
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
26 addition
and
3 deletion
+26
-3
PPOCRLabel/PPOCRLabel.py
PPOCRLabel/PPOCRLabel.py
+24
-3
PPOCRLabel/resources/strings/strings-zh-CN.properties
PPOCRLabel/resources/strings/strings-zh-CN.properties
+1
-0
PPOCRLabel/resources/strings/strings.properties
PPOCRLabel/resources/strings/strings.properties
+1
-0
未找到文件。
PPOCRLabel/PPOCRLabel.py
浏览文件 @
6c455245
...
...
@@ -360,6 +360,9 @@ class MainWindow(QMainWindow, WindowMixin):
opendir
=
action
(
getStr
(
'openDir'
),
self
.
openDirDialog
,
'Ctrl+u'
,
'open'
,
getStr
(
'openDir'
))
open_dataset_dir
=
action
(
getStr
(
'openDatasetDir'
),
self
.
openDatasetDirDialog
,
'Ctrl+p'
,
'open'
,
getStr
(
'openDatasetDir'
),
enabled
=
False
)
save
=
action
(
getStr
(
'save'
),
self
.
saveFile
,
'Ctrl+V'
,
'verify'
,
getStr
(
'saveDetail'
),
enabled
=
False
)
...
...
@@ -519,9 +522,9 @@ class MainWindow(QMainWindow, WindowMixin):
zoom
=
zoom
,
zoomIn
=
zoomIn
,
zoomOut
=
zoomOut
,
zoomOrg
=
zoomOrg
,
fitWindow
=
fitWindow
,
fitWidth
=
fitWidth
,
zoomActions
=
zoomActions
,
saveLabel
=
saveLabel
,
undo
=
undo
,
undoLastPoint
=
undoLastPoint
,
undo
=
undo
,
undoLastPoint
=
undoLastPoint
,
open_dataset_dir
=
open_dataset_dir
,
fileMenuActions
=
(
opendir
,
saveLabel
,
resetAll
,
quit
),
opendir
,
open_dataset_dir
,
saveLabel
,
resetAll
,
quit
),
beginner
=
(),
advanced
=
(),
editMenu
=
(
createpoly
,
edit
,
copy
,
delete
,
singleRere
,
None
,
undo
,
undoLastPoint
,
None
,
color1
,
self
.
drawSquaresOption
),
...
...
@@ -563,7 +566,7 @@ class MainWindow(QMainWindow, WindowMixin):
self
.
autoSaveOption
.
triggered
.
connect
(
self
.
autoSaveFunc
)
addActions
(
self
.
menus
.
file
,
(
opendir
,
None
,
saveLabel
,
saveRec
,
self
.
autoSaveOption
,
None
,
resetAll
,
deleteImg
,
quit
))
(
opendir
,
open_dataset_dir
,
None
,
saveLabel
,
saveRec
,
self
.
autoSaveOption
,
None
,
resetAll
,
deleteImg
,
quit
))
addActions
(
self
.
menus
.
help
,
(
showSteps
,
showInfo
))
addActions
(
self
.
menus
.
view
,
(
...
...
@@ -1448,6 +1451,23 @@ class MainWindow(QMainWindow, WindowMixin):
self
.
lastOpenDir
=
targetDirPath
self
.
importDirImages
(
targetDirPath
)
def
openDatasetDirDialog
(
self
,
_value
=
False
):
#1458
if
not
self
.
mayContinue
():
return
if
self
.
lastOpenDir
and
os
.
path
.
exists
(
self
.
lastOpenDir
):
os
.
startfile
(
self
.
lastOpenDir
)
defaultOpenDirPath
=
self
.
lastOpenDir
else
:
if
self
.
lang
==
'ch'
:
self
.
actions
.
open_dataset_dir
.
setEnabled
(
False
)
self
.
msgBox
.
warning
(
self
,
"提示"
,
"
\n
原文件夹已不存在,请从新选择数据集路径!"
)
defaultOpenDirPath
=
os
.
path
.
dirname
(
self
.
filePath
)
if
self
.
filePath
else
'.'
else
:
self
.
actions
.
open_dataset_dir
.
setEnabled
(
False
)
self
.
msgBox
.
warning
(
self
,
"Warn"
,
"
\n
The original folder no longer exists, please choose the data set path again!"
)
defaultOpenDirPath
=
os
.
path
.
dirname
(
self
.
filePath
)
if
self
.
filePath
else
'.'
def
importDirImages
(
self
,
dirpath
,
isDelete
=
False
):
if
not
self
.
mayContinue
()
or
not
dirpath
:
return
...
...
@@ -1495,6 +1515,7 @@ class MainWindow(QMainWindow, WindowMixin):
self
.
reRecogButton
.
setEnabled
(
True
)
self
.
actions
.
AutoRec
.
setEnabled
(
True
)
self
.
actions
.
reRec
.
setEnabled
(
True
)
self
.
actions
.
open_dataset_dir
.
setEnabled
(
True
)
def
openPrevImg
(
self
,
_value
=
False
):
...
...
PPOCRLabel/resources/strings/strings-zh-CN.properties
浏览文件 @
6c455245
...
...
@@ -31,6 +31,7 @@ save=确认
saveAs
=
另存为
fitWinDetail
=
缩放到当前窗口大小
openDir
=
打开目录
openDatasetDir
=
打开数据集路径
copyPrevBounding
=
复制当前图像中的上一个边界框
showHide
=
显示/隐藏标签
changeSaveFormat
=
更改存储格式
...
...
PPOCRLabel/resources/strings/strings.properties
浏览文件 @
6c455245
...
...
@@ -3,6 +3,7 @@ openFileDetail=Open image or label file
quit
=
Quit
quitApp
=
Quit application
openDir
=
Open Dir
openDatasetDir
=
open DatasetDir
copyPrevBounding
=
Copy previous Bounding Boxes in the current image
changeSavedAnnotationDir
=
Change default saved Annotation dir
openAnnotation
=
Open Annotation
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录