Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
4a5c3714
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2302
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
4a5c3714
编写于
7月 13, 2017
作者:
W
wanghaoshuang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix python dependency for voc2012 dataset
上级
24376310
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
8 addition
and
5 deletion
+8
-5
python/paddle/v2/dataset/voc_seg.py
python/paddle/v2/dataset/voc_seg.py
+6
-4
python/setup.py.in
python/setup.py.in
+2
-1
未找到文件。
python/paddle/v2/dataset/voc_seg.py
浏览文件 @
4a5c3714
...
@@ -22,7 +22,7 @@ with segmentation has been increased from 7,062 to 9,993.
...
@@ -22,7 +22,7 @@ with segmentation has been increased from 7,062 to 9,993.
import
tarfile
import
tarfile
import
io
import
io
import
numpy
as
np
import
numpy
as
np
from
common
import
download
from
paddle.v2.dataset.
common
import
download
from
paddle.v2.image
import
*
from
paddle.v2.image
import
*
from
PIL
import
Image
from
PIL
import
Image
...
@@ -36,6 +36,8 @@ SET_FILE = 'VOCdevkit/VOC2012/ImageSets/Segmentation/{}.txt'
...
@@ -36,6 +36,8 @@ SET_FILE = 'VOCdevkit/VOC2012/ImageSets/Segmentation/{}.txt'
DATA_FILE
=
'VOCdevkit/VOC2012/JPEGImages/{}.jpg'
DATA_FILE
=
'VOCdevkit/VOC2012/JPEGImages/{}.jpg'
LABEL_FILE
=
'VOCdevkit/VOC2012/SegmentationClass/{}.png'
LABEL_FILE
=
'VOCdevkit/VOC2012/SegmentationClass/{}.png'
CACHE_DIR
=
'voc2012'
def
reader_creator
(
filename
,
sub_name
):
def
reader_creator
(
filename
,
sub_name
):
...
@@ -66,18 +68,18 @@ def train():
...
@@ -66,18 +68,18 @@ def train():
"""
"""
Create a train dataset reader containing 2913 images in HWC order.
Create a train dataset reader containing 2913 images in HWC order.
"""
"""
return
reader_creator
(
download
(
VOC_URL
,
'voc_seg'
,
VOC_MD5
),
'trainval'
)
return
reader_creator
(
download
(
VOC_URL
,
CACHE_DIR
,
VOC_MD5
),
'trainval'
)
def
test
():
def
test
():
"""
"""
Create a test dataset reader containing 1464 images in HWC order.
Create a test dataset reader containing 1464 images in HWC order.
"""
"""
return
reader_creator
(
download
(
VOC_URL
,
'voc_seg'
,
VOC_MD5
),
'train'
)
return
reader_creator
(
download
(
VOC_URL
,
CACHE_DIR
,
VOC_MD5
),
'train'
)
def
val
():
def
val
():
"""
"""
Create a val dataset reader containing 1449 images in HWC order.
Create a val dataset reader containing 1449 images in HWC order.
"""
"""
return
reader_creator
(
download
(
VOC_URL
,
'voc_seg'
,
VOC_MD5
),
'val'
)
return
reader_creator
(
download
(
VOC_URL
,
CACHE_DIR
,
VOC_MD5
),
'val'
)
python/setup.py.in
浏览文件 @
4a5c3714
...
@@ -19,7 +19,8 @@ setup_requires=["requests",
...
@@ -19,7 +19,8 @@ setup_requires=["requests",
"recordio",
"recordio",
"matplotlib",
"matplotlib",
"rarfile",
"rarfile",
"scipy>=0.19.0"]
"scipy>=0.19.0",
"Pillow"]
if '${CMAKE_SYSTEM_PROCESSOR}' not in ['arm', 'armv7-a', 'aarch64']:
if '${CMAKE_SYSTEM_PROCESSOR}' not in ['arm', 'armv7-a', 'aarch64']:
setup_requires+=["opencv-python"]
setup_requires+=["opencv-python"]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录