Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleX
提交
83210bc9
P
PaddleX
项目概览
PaddlePaddle
/
PaddleX
通知
138
Star
4
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
43
列表
看板
标记
里程碑
合并请求
5
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleX
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
43
Issue
43
列表
看板
标记
里程碑
合并请求
5
合并请求
5
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
83210bc9
编写于
8月 11, 2020
作者:
J
Jason
提交者:
GitHub
8月 11, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #273 from mamingjie-China/develop
添加数据切分过程中的校验,当图片与标注文件不对应时,提示错误
上级
bae72f97
cf479e8a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
6 addition
and
0 deletion
+6
-0
paddlex/tools/dataset_split/seg_split.py
paddlex/tools/dataset_split/seg_split.py
+3
-0
paddlex/tools/dataset_split/voc_split.py
paddlex/tools/dataset_split/voc_split.py
+3
-0
未找到文件。
paddlex/tools/dataset_split/seg_split.py
浏览文件 @
83210bc9
...
...
@@ -39,6 +39,9 @@ def split_seg_dataset(dataset_dir, val_percent, test_percent, save_dir):
anno_name
=
replace_ext
(
image_file
,
"PNG"
)
if
osp
.
exists
(
osp
.
join
(
dataset_dir
,
"Annotations"
,
anno_name
)):
image_anno_list
.
append
([
image_file
,
anno_name
])
else
:
logging
.
error
(
"The annotation file {} doesn't exist!"
.
format
(
anno_name
))
if
not
osp
.
exists
(
osp
.
join
(
dataset_dir
,
"labels.txt"
)):
for
image_anno
in
image_anno_list
:
...
...
paddlex/tools/dataset_split/voc_split.py
浏览文件 @
83210bc9
...
...
@@ -47,6 +47,9 @@ def split_voc_dataset(dataset_dir, val_percent, test_percent, save_dir):
cname
=
obj
.
find
(
'name'
).
text
if
not
cname
in
label_list
:
label_list
.
append
(
cname
)
else
:
logging
.
error
(
"The annotation file {} doesn't exist!"
.
format
(
anno_name
))
random
.
shuffle
(
image_anno_list
)
image_num
=
len
(
image_anno_list
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录