Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleClas
提交
1c31010b
P
PaddleClas
项目概览
PaddlePaddle
/
PaddleClas
接近 2 年 前同步成功
通知
116
Star
4999
Fork
1114
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
19
列表
看板
标记
里程碑
合并请求
6
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleClas
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
19
Issue
19
列表
看板
标记
里程碑
合并请求
6
合并请求
6
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
1c31010b
编写于
5月 05, 2022
作者:
H
HydrogenSulfate
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refine code
上级
16f910b4
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
16 addition
and
3 deletion
+16
-3
ppcls/configs/Pedestrian/strong_baseline_baseline.yaml
ppcls/configs/Pedestrian/strong_baseline_baseline.yaml
+3
-0
ppcls/configs/Pedestrian/strong_baseline_m1.yaml
ppcls/configs/Pedestrian/strong_baseline_m1.yaml
+3
-0
ppcls/configs/Pedestrian/strong_baseline_m1_centerloss.yaml
ppcls/configs/Pedestrian/strong_baseline_m1_centerloss.yaml
+4
-1
ppcls/data/preprocess/__init__.py
ppcls/data/preprocess/__init__.py
+1
-0
ppcls/data/preprocess/ops/operators.py
ppcls/data/preprocess/ops/operators.py
+2
-0
ppcls/engine/engine.py
ppcls/engine/engine.py
+3
-2
未找到文件。
ppcls/configs/Pedestrian/strong_baseline_baseline.yaml
浏览文件 @
1c31010b
...
...
@@ -71,6 +71,7 @@ DataLoader:
-
ResizeImage
:
size
:
[
128
,
256
]
return_numpy
:
False
backend
:
"
pil"
-
RandFlipImage
:
flip_code
:
1
-
Pad
:
...
...
@@ -101,6 +102,7 @@ DataLoader:
-
ResizeImage
:
size
:
[
128
,
256
]
return_numpy
:
False
backend
:
"
pil"
-
ToTensor
:
-
Normalize
:
mean
:
[
0.485
,
0.456
,
0.406
]
...
...
@@ -124,6 +126,7 @@ DataLoader:
-
ResizeImage
:
size
:
[
128
,
256
]
return_numpy
:
False
backend
:
"
pil"
-
ToTensor
:
-
Normalize
:
mean
:
[
0.485
,
0.456
,
0.406
]
...
...
ppcls/configs/Pedestrian/strong_baseline_m1.yaml
浏览文件 @
1c31010b
...
...
@@ -90,6 +90,7 @@ DataLoader:
-
ResizeImage
:
size
:
[
128
,
256
]
return_numpy
:
False
backend
:
"
pil"
-
RandFlipImage
:
flip_code
:
1
-
Pad
:
...
...
@@ -126,6 +127,7 @@ DataLoader:
-
ResizeImage
:
size
:
[
128
,
256
]
return_numpy
:
False
backend
:
"
pil"
-
ToTensor
:
-
Normalize
:
mean
:
[
0.485
,
0.456
,
0.406
]
...
...
@@ -149,6 +151,7 @@ DataLoader:
-
ResizeImage
:
size
:
[
128
,
256
]
return_numpy
:
False
backend
:
"
pil"
-
ToTensor
:
-
Normalize
:
mean
:
[
0.485
,
0.456
,
0.406
]
...
...
ppcls/configs/Pedestrian/strong_baseline_m1_centerloss.yaml
浏览文件 @
1c31010b
...
...
@@ -64,7 +64,7 @@ Loss:
weight
:
0.0005
num_classes
:
*class_num
feat_dim
:
*feat_dim
feat_from
:
"
backbone"
feat
ure
_from
:
"
backbone"
Eval
:
-
CELoss
:
weight
:
1.0
...
...
@@ -101,6 +101,7 @@ DataLoader:
-
ResizeImage
:
size
:
[
128
,
256
]
return_numpy
:
False
backend
:
"
pil"
-
RandFlipImage
:
flip_code
:
1
-
Pad
:
...
...
@@ -137,6 +138,7 @@ DataLoader:
-
ResizeImage
:
size
:
[
128
,
256
]
return_numpy
:
False
backend
:
"
pil"
-
ToTensor
:
-
Normalize
:
mean
:
[
0.485
,
0.456
,
0.406
]
...
...
@@ -160,6 +162,7 @@ DataLoader:
-
ResizeImage
:
size
:
[
128
,
256
]
return_numpy
:
False
backend
:
"
pil"
-
ToTensor
:
-
Normalize
:
mean
:
[
0.485
,
0.456
,
0.406
]
...
...
ppcls/data/preprocess/__init__.py
浏览文件 @
1c31010b
...
...
@@ -25,6 +25,7 @@ from ppcls.data.preprocess.ops.operators import DecodeImage
from
ppcls.data.preprocess.ops.operators
import
ResizeImage
from
ppcls.data.preprocess.ops.operators
import
CropImage
from
ppcls.data.preprocess.ops.operators
import
RandCropImage
from
ppcls.data.preprocess.ops.operators
import
RandCropImageV2
from
ppcls.data.preprocess.ops.operators
import
RandFlipImage
from
ppcls.data.preprocess.ops.operators
import
NormalizeImage
from
ppcls.data.preprocess.ops.operators
import
ToCHWImage
...
...
ppcls/data/preprocess/ops/operators.py
浏览文件 @
1c31010b
...
...
@@ -63,6 +63,8 @@ class UnifiedResize(object):
resample
=
random
.
choice
(
resample
)
if
isinstance
(
src
,
np
.
ndarray
):
pil_img
=
Image
.
fromarray
(
src
)
else
:
pil_img
=
src
pil_img
=
pil_img
.
resize
(
size
,
resample
)
if
return_numpy
:
return
np
.
asarray
(
pil_img
)
...
...
ppcls/engine/engine.py
浏览文件 @
1c31010b
...
...
@@ -254,8 +254,9 @@ class Engine(object):
world_size
=
dist
.
get_world_size
()
self
.
config
[
"Global"
][
"distributed"
]
=
world_size
!=
1
if
self
.
mode
==
"train"
:
std_gpu_num
=
8
if
self
.
config
[
"Optimizer"
][
"name"
]
==
"AdamW"
else
4
std_gpu_num
=
8
if
isinstance
(
self
.
config
[
"Optimizer"
],
dict
)
and
self
.
config
[
"Optimizer"
][
"name"
]
==
"AdamW"
else
4
if
world_size
!=
std_gpu_num
:
msg
=
f
"The training strategy provided by PaddleClas is based on
{
std_gpu_num
}
gpus. But the number of gpu is
{
world_size
}
in current training. Please modify the stategy (learning rate, batch size and so on) if use this config to train."
logger
.
warning
(
msg
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录