Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleX
提交
9665d51a
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看板
提交
9665d51a
编写于
7月 11, 2020
作者:
J
jiangjiajun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
beauty tutorials' code
上级
b1ff0a34
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
82 addition
and
67 deletion
+82
-67
tutorials/train/image_classification/alexnet.py
tutorials/train/image_classification/alexnet.py
+4
-2
tutorials/train/image_classification/mobilenetv2.py
tutorials/train/image_classification/mobilenetv2.py
+4
-2
tutorials/train/image_classification/mobilenetv3_small_ssld.py
...ials/train/image_classification/mobilenetv3_small_ssld.py
+4
-2
tutorials/train/image_classification/resnet50_vd_ssld.py
tutorials/train/image_classification/resnet50_vd_ssld.py
+4
-2
tutorials/train/image_classification/shufflenetv2.py
tutorials/train/image_classification/shufflenetv2.py
+4
-2
tutorials/train/instance_segmentation/mask_rcnn_hrnet_fpn.py
tutorials/train/instance_segmentation/mask_rcnn_hrnet_fpn.py
+5
-5
tutorials/train/instance_segmentation/mask_rcnn_r50_fpn.py
tutorials/train/instance_segmentation/mask_rcnn_r50_fpn.py
+7
-7
tutorials/train/object_detection/faster_rcnn_hrnet_fpn.py
tutorials/train/object_detection/faster_rcnn_hrnet_fpn.py
+7
-7
tutorials/train/object_detection/faster_rcnn_r50_fpn.py
tutorials/train/object_detection/faster_rcnn_r50_fpn.py
+5
-5
tutorials/train/object_detection/yolov3_darknet53.py
tutorials/train/object_detection/yolov3_darknet53.py
+7
-9
tutorials/train/object_detection/yolov3_mobilenetv1.py
tutorials/train/object_detection/yolov3_mobilenetv1.py
+2
-4
tutorials/train/object_detection/yolov3_mobilenetv3.py
tutorials/train/object_detection/yolov3_mobilenetv3.py
+7
-9
tutorials/train/semantic_segmentation/deeplabv3p_mobilenetv2.py
...als/train/semantic_segmentation/deeplabv3p_mobilenetv2.py
+6
-3
tutorials/train/semantic_segmentation/fast_scnn.py
tutorials/train/semantic_segmentation/fast_scnn.py
+6
-3
tutorials/train/semantic_segmentation/hrnet.py
tutorials/train/semantic_segmentation/hrnet.py
+6
-3
tutorials/train/semantic_segmentation/unet.py
tutorials/train/semantic_segmentation/unet.py
+4
-2
未找到文件。
tutorials/train/image_classification/alexnet.py
浏览文件 @
9665d51a
...
...
@@ -7,12 +7,14 @@ pdx.utils.download_and_decompress(veg_dataset, path='./')
# 定义训练和验证时的transforms
train_transforms
=
transforms
.
Compose
([
transforms
.
RandomCrop
(
crop_size
=
224
),
transforms
.
RandomHorizontalFlip
(),
transforms
.
RandomCrop
(
crop_size
=
224
),
transforms
.
RandomHorizontalFlip
(),
transforms
.
Normalize
()
])
eval_transforms
=
transforms
.
Compose
([
transforms
.
ResizeByShort
(
short_size
=
256
),
transforms
.
CenterCrop
(
crop_size
=
224
),
transforms
.
Normalize
()
transforms
.
CenterCrop
(
crop_size
=
224
),
transforms
.
Normalize
()
])
# 定义训练和验证所用的数据集
...
...
tutorials/train/image_classification/mobilenetv2.py
浏览文件 @
9665d51a
...
...
@@ -8,12 +8,14 @@ pdx.utils.download_and_decompress(veg_dataset, path='./')
# 定义训练和验证时的transforms
train_transforms
=
transforms
.
Compose
([
transforms
.
RandomCrop
(
crop_size
=
224
),
transforms
.
RandomHorizontalFlip
(),
transforms
.
RandomCrop
(
crop_size
=
224
),
transforms
.
RandomHorizontalFlip
(),
transforms
.
Normalize
()
])
eval_transforms
=
transforms
.
Compose
([
transforms
.
ResizeByShort
(
short_size
=
256
),
transforms
.
CenterCrop
(
crop_size
=
224
),
transforms
.
Normalize
()
transforms
.
CenterCrop
(
crop_size
=
224
),
transforms
.
Normalize
()
])
# 定义训练和验证所用的数据集
...
...
tutorials/train/image_classification/mobilenetv3_small_ssld.py
浏览文件 @
9665d51a
...
...
@@ -8,12 +8,14 @@ pdx.utils.download_and_decompress(veg_dataset, path='./')
# 定义训练和验证时的transforms
train_transforms
=
transforms
.
Compose
([
transforms
.
RandomCrop
(
crop_size
=
224
),
transforms
.
RandomHorizontalFlip
(),
transforms
.
RandomCrop
(
crop_size
=
224
),
transforms
.
RandomHorizontalFlip
(),
transforms
.
Normalize
()
])
eval_transforms
=
transforms
.
Compose
([
transforms
.
ResizeByShort
(
short_size
=
256
),
transforms
.
CenterCrop
(
crop_size
=
224
),
transforms
.
Normalize
()
transforms
.
CenterCrop
(
crop_size
=
224
),
transforms
.
Normalize
()
])
# 定义训练和验证所用的数据集
...
...
tutorials/train/image_classification/resnet50_vd_ssld.py
浏览文件 @
9665d51a
...
...
@@ -8,12 +8,14 @@ pdx.utils.download_and_decompress(veg_dataset, path='./')
# 定义训练和验证时的transforms
train_transforms
=
transforms
.
Compose
([
transforms
.
RandomCrop
(
crop_size
=
224
),
transforms
.
RandomHorizontalFlip
(),
transforms
.
RandomCrop
(
crop_size
=
224
),
transforms
.
RandomHorizontalFlip
(),
transforms
.
Normalize
()
])
eval_transforms
=
transforms
.
Compose
([
transforms
.
ResizeByShort
(
short_size
=
256
),
transforms
.
CenterCrop
(
crop_size
=
224
),
transforms
.
Normalize
()
transforms
.
CenterCrop
(
crop_size
=
224
),
transforms
.
Normalize
()
])
# 定义训练和验证所用的数据集
...
...
tutorials/train/image_classification/shufflenetv2.py
浏览文件 @
9665d51a
...
...
@@ -8,12 +8,14 @@ pdx.utils.download_and_decompress(veg_dataset, path='./')
# 定义训练和验证时的transforms
train_transforms
=
transforms
.
Compose
([
transforms
.
RandomCrop
(
crop_size
=
224
),
transforms
.
RandomHorizontalFlip
(),
transforms
.
RandomCrop
(
crop_size
=
224
),
transforms
.
RandomHorizontalFlip
(),
transforms
.
Normalize
()
])
eval_transforms
=
transforms
.
Compose
([
transforms
.
ResizeByShort
(
short_size
=
256
),
transforms
.
CenterCrop
(
crop_size
=
224
),
transforms
.
Normalize
()
transforms
.
CenterCrop
(
crop_size
=
224
),
transforms
.
Normalize
()
])
# 定义训练和验证所用的数据集
...
...
tutorials/train/instance_segmentation/mask_rcnn_hrnet_fpn.py
浏览文件 @
9665d51a
...
...
@@ -11,15 +11,15 @@ pdx.utils.download_and_decompress(xiaoduxiong_dataset, path='./')
# 定义训练和验证时的transforms
train_transforms
=
transforms
.
Compose
([
transforms
.
RandomHorizontalFlip
(),
transforms
.
Normalize
(),
transforms
.
ResizeByShort
(
short_size
=
800
,
max_size
=
1333
),
transforms
.
Padding
(
coarsest_stride
=
32
)
transforms
.
RandomHorizontalFlip
(),
transforms
.
Normalize
(),
transforms
.
ResizeByShort
(
short_size
=
800
,
max_size
=
1333
),
transforms
.
Padding
(
coarsest_stride
=
32
)
])
eval_transforms
=
transforms
.
Compose
([
transforms
.
Normalize
(),
transforms
.
ResizeByShort
(
short_size
=
800
,
max_size
=
1333
),
transforms
.
ResizeByShort
(
short_size
=
800
,
max_size
=
1333
),
transforms
.
Padding
(
coarsest_stride
=
32
),
])
...
...
tutorials/train/instance_segmentation/mask_rcnn_r50_fpn.py
浏览文件 @
9665d51a
...
...
@@ -11,16 +11,16 @@ pdx.utils.download_and_decompress(xiaoduxiong_dataset, path='./')
# 定义训练和验证时的transforms
train_transforms
=
transforms
.
Compose
([
transforms
.
RandomHorizontalFlip
(),
transforms
.
Normalize
(),
transforms
.
ResizeByShort
(
short_size
=
800
,
max_size
=
1333
),
transforms
.
Padding
(
coarsest_stride
=
32
)
transforms
.
RandomHorizontalFlip
(),
transforms
.
Normalize
(),
transforms
.
ResizeByShort
(
short_size
=
800
,
max_size
=
1333
),
transforms
.
Padding
(
coarsest_stride
=
32
)
])
eval_transforms
=
transforms
.
Compose
([
transforms
.
Normalize
(),
transforms
.
ResizeByShort
(
short_size
=
800
,
max_size
=
1333
),
transforms
.
Padding
(
coarsest_stride
=
32
),
transforms
.
Normalize
(),
transforms
.
ResizeByShort
(
short_size
=
800
,
max_size
=
1333
),
transforms
.
Padding
(
coarsest_stride
=
32
)
])
# 定义训练和验证所用的数据集
...
...
tutorials/train/object_detection/faster_rcnn_hrnet_fpn.py
浏览文件 @
9665d51a
...
...
@@ -11,16 +11,16 @@ pdx.utils.download_and_decompress(insect_dataset, path='./')
# 定义训练和验证时的transforms
train_transforms
=
transforms
.
Compose
([
transforms
.
RandomHorizontalFlip
(),
transforms
.
Normalize
(),
transforms
.
ResizeByShort
(
short_size
=
800
,
max_size
=
1333
),
transforms
.
Padding
(
coarsest_stride
=
32
)
transforms
.
RandomHorizontalFlip
(),
transforms
.
Normalize
(),
transforms
.
ResizeByShort
(
short_size
=
800
,
max_size
=
1333
),
transforms
.
Padding
(
coarsest_stride
=
32
)
])
eval_transforms
=
transforms
.
Compose
([
transforms
.
Normalize
(),
transforms
.
ResizeByShort
(
short_size
=
800
,
max_size
=
1333
),
transforms
.
Padding
(
coarsest_stride
=
32
),
transforms
.
Normalize
(),
transforms
.
ResizeByShort
(
short_size
=
800
,
max_size
=
1333
),
transforms
.
Padding
(
coarsest_stride
=
32
)
])
# 定义训练和验证所用的数据集
...
...
tutorials/train/object_detection/faster_rcnn_r50_fpn.py
浏览文件 @
9665d51a
...
...
@@ -8,15 +8,15 @@ pdx.utils.download_and_decompress(insect_dataset, path='./')
# 定义训练和验证时的transforms
train_transforms
=
transforms
.
Compose
([
transforms
.
RandomHorizontalFlip
(),
transforms
.
Normalize
(),
transforms
.
ResizeByShort
(
short_size
=
800
,
max_size
=
1333
),
transforms
.
Padding
(
coarsest_stride
=
32
)
transforms
.
RandomHorizontalFlip
(),
transforms
.
Normalize
(),
transforms
.
ResizeByShort
(
short_size
=
800
,
max_size
=
1333
),
transforms
.
Padding
(
coarsest_stride
=
32
)
])
eval_transforms
=
transforms
.
Compose
([
transforms
.
Normalize
(),
transforms
.
ResizeByShort
(
short_size
=
800
,
max_size
=
1333
),
transforms
.
ResizeByShort
(
short_size
=
800
,
max_size
=
1333
),
transforms
.
Padding
(
coarsest_stride
=
32
),
])
# 定义训练和验证所用的数据集
...
...
tutorials/train/object_detection/yolov3_darknet53.py
浏览文件 @
9665d51a
...
...
@@ -8,20 +8,18 @@ pdx.utils.download_and_decompress(insect_dataset, path='./')
# 定义训练和验证时的transforms
train_transforms
=
transforms
.
Compose
([
transforms
.
MixupImage
(
mixup_epoch
=
250
),
transforms
.
MixupImage
(
mixup_epoch
=
250
),
transforms
.
RandomDistort
(),
transforms
.
RandomExpand
(),
transforms
.
RandomCrop
(),
transforms
.
Resize
(
target_size
=
608
,
interp
=
'RANDOM'
),
transforms
.
RandomExpand
(),
transforms
.
RandomCrop
(),
transforms
.
Resize
(
target_size
=
608
,
interp
=
'RANDOM'
),
transforms
.
RandomHorizontalFlip
(),
transforms
.
Normalize
()
,
transforms
.
Normalize
()
])
eval_transforms
=
transforms
.
Compose
([
transforms
.
Resize
(
target_size
=
608
,
interp
=
'CUBIC'
),
transforms
.
Normalize
(),
transforms
.
Resize
(
target_size
=
608
,
interp
=
'CUBIC'
),
transforms
.
Normalize
()
])
# 定义训练和验证所用的数据集
...
...
tutorials/train/object_detection/yolov3_mobilenetv1.py
浏览文件 @
9665d51a
...
...
@@ -12,15 +12,13 @@ train_transforms = transforms.Compose([
transforms
.
RandomDistort
(),
transforms
.
RandomExpand
(),
transforms
.
RandomCrop
(),
transforms
.
Resize
(
target_size
=
608
,
interp
=
'RANDOM'
),
transforms
.
Resize
(
target_size
=
608
,
interp
=
'RANDOM'
),
transforms
.
RandomHorizontalFlip
(),
transforms
.
Normalize
(),
])
eval_transforms
=
transforms
.
Compose
([
transforms
.
Resize
(
target_size
=
608
,
interp
=
'CUBIC'
),
transforms
.
Resize
(
target_size
=
608
,
interp
=
'CUBIC'
),
transforms
.
Normalize
(),
])
...
...
tutorials/train/object_detection/yolov3_mobilenetv3.py
浏览文件 @
9665d51a
...
...
@@ -8,20 +8,18 @@ pdx.utils.download_and_decompress(insect_dataset, path='./')
# 定义训练和验证时的transforms
train_transforms
=
transforms
.
Compose
([
transforms
.
MixupImage
(
mixup_epoch
=
250
),
transforms
.
MixupImage
(
mixup_epoch
=
250
),
transforms
.
RandomDistort
(),
transforms
.
RandomExpand
(),
transforms
.
RandomCrop
(),
transforms
.
Resize
(
target_size
=
608
,
interp
=
'RANDOM'
),
transforms
.
RandomExpand
(),
transforms
.
RandomCrop
(),
transforms
.
Resize
(
target_size
=
608
,
interp
=
'RANDOM'
),
transforms
.
RandomHorizontalFlip
(),
transforms
.
Normalize
()
,
transforms
.
Normalize
()
])
eval_transforms
=
transforms
.
Compose
([
transforms
.
Resize
(
target_size
=
608
,
interp
=
'CUBIC'
),
transforms
.
Normalize
(),
transforms
.
Resize
(
target_size
=
608
,
interp
=
'CUBIC'
),
transforms
.
Normalize
()
])
# 定义训练和验证所用的数据集
...
...
tutorials/train/semantic_segmentation/deeplabv3p_mobilenetv2.py
浏览文件 @
9665d51a
...
...
@@ -11,12 +11,15 @@ pdx.utils.download_and_decompress(optic_dataset, path='./')
# 定义训练和验证时的transforms
train_transforms
=
transforms
.
Compose
([
transforms
.
RandomHorizontalFlip
(),
transforms
.
ResizeRangeScaling
(),
transforms
.
RandomPaddingCrop
(
crop_size
=
512
),
transforms
.
Normalize
()
transforms
.
RandomHorizontalFlip
(),
transforms
.
ResizeRangeScaling
(),
transforms
.
RandomPaddingCrop
(
crop_size
=
512
),
transforms
.
Normalize
()
])
eval_transforms
=
transforms
.
Compose
([
transforms
.
ResizeByLong
(
long_size
=
512
),
transforms
.
Padding
(
target_size
=
512
),
transforms
.
ResizeByLong
(
long_size
=
512
),
transforms
.
Padding
(
target_size
=
512
),
transforms
.
Normalize
()
])
...
...
tutorials/train/semantic_segmentation/fast_scnn.py
浏览文件 @
9665d51a
...
...
@@ -12,12 +12,15 @@ pdx.utils.download_and_decompress(optic_dataset, path='./')
# 定义训练和验证时的transforms
# API说明: https://paddlex.readthedocs.io/zh_CN/latest/apis/transforms/seg_transforms.html#composedsegtransforms
train_transforms
=
transforms
.
Compose
([
transforms
.
RandomHorizontalFlip
(),
transforms
.
ResizeRangeScaling
(),
transforms
.
RandomPaddingCrop
(
crop_size
=
512
),
transforms
.
Normalize
()
transforms
.
RandomHorizontalFlip
(),
transforms
.
ResizeRangeScaling
(),
transforms
.
RandomPaddingCrop
(
crop_size
=
512
),
transforms
.
Normalize
()
])
eval_transforms
=
transforms
.
Compose
([
transforms
.
ResizeByLong
(
long_size
=
512
),
transforms
.
Padding
(
target_size
=
512
),
transforms
.
ResizeByLong
(
long_size
=
512
),
transforms
.
Padding
(
target_size
=
512
),
transforms
.
Normalize
()
])
...
...
tutorials/train/semantic_segmentation/hrnet.py
浏览文件 @
9665d51a
...
...
@@ -11,12 +11,15 @@ pdx.utils.download_and_decompress(optic_dataset, path='./')
# 定义训练和验证时的transforms
train_transforms
=
transforms
.
Compose
([
transforms
.
RandomHorizontalFlip
(),
transforms
.
ResizeRangeScaling
(),
transforms
.
RandomPaddingCrop
(
crop_size
=
512
),
transforms
.
Normalize
()
transforms
.
RandomHorizontalFlip
(),
transforms
.
ResizeRangeScaling
(),
transforms
.
RandomPaddingCrop
(
crop_size
=
512
),
transforms
.
Normalize
()
])
eval_transforms
=
transforms
.
Compose
([
transforms
.
ResizeByLong
(
long_size
=
512
),
transforms
.
Padding
(
target_size
=
512
),
transforms
.
ResizeByLong
(
long_size
=
512
),
transforms
.
Padding
(
target_size
=
512
),
transforms
.
Normalize
()
])
...
...
tutorials/train/semantic_segmentation/unet.py
浏览文件 @
9665d51a
...
...
@@ -11,8 +11,10 @@ pdx.utils.download_and_decompress(optic_dataset, path='./')
# 定义训练和验证时的transforms
train_transforms
=
transforms
.
Compose
([
transforms
.
RandomHorizontalFlip
(),
transforms
.
ResizeRangeScaling
(),
transforms
.
RandomPaddingCrop
(
crop_size
=
512
),
transforms
.
Normalize
()
transforms
.
RandomHorizontalFlip
(),
transforms
.
ResizeRangeScaling
(),
transforms
.
RandomPaddingCrop
(
crop_size
=
512
),
transforms
.
Normalize
()
])
eval_transforms
=
transforms
.
Compose
([
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录