Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
6bf1b443
P
PaddleDetection
项目概览
s920243400
/
PaddleDetection
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleDetection
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
6bf1b443
编写于
10月 15, 2021
作者:
F
Feng Ni
提交者:
GitHub
10月 15, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[benchmark] add jde/fairmot model training benchmark (#4307)
上级
e14387f8
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
20 addition
and
9 deletion
+20
-9
benchmark/README.md
benchmark/README.md
+2
-2
benchmark/prepare.sh
benchmark/prepare.sh
+7
-0
benchmark/run_all.sh
benchmark/run_all.sh
+4
-2
benchmark/run_benchmark.sh
benchmark/run_benchmark.sh
+7
-5
未找到文件。
benchmark/README.md
浏览文件 @
6bf1b443
...
@@ -33,7 +33,7 @@ bash benchmark/run_all.sh
...
@@ -33,7 +33,7 @@ bash benchmark/run_all.sh
### 运行指定模型
### 运行指定模型
*
Usage:bash run_benchmark.sh ${run_mode} ${batch_size} ${fp_item} ${max_epoch} ${model_name}
*
Usage:bash run_benchmark.sh ${run_mode} ${batch_size} ${fp_item} ${max_epoch} ${model_name}
*
model_name: faster_rcnn, fcos, deformable_detr, gfl
*
model_name: faster_rcnn, fcos, deformable_detr, gfl
, hrnet, higherhrnet, solov2, jde, fairmot
```
```
git clone https://github.com/PaddlePaddle/PaddleDetection.git
git clone https://github.com/PaddlePaddle/PaddleDetection.git
cd PaddleDetection
cd PaddleDetection
...
@@ -42,5 +42,5 @@ bash benchmark/prepare.sh
...
@@ -42,5 +42,5 @@ bash benchmark/prepare.sh
# 单卡
# 单卡
CUDA_VISIBLE_DEVICES=0 bash benchmark/run_benchmark.sh sp 2 fp32 1 faster_rcnn
CUDA_VISIBLE_DEVICES=0 bash benchmark/run_benchmark.sh sp 2 fp32 1 faster_rcnn
# 多卡
# 多卡
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 bash run_benchmark.sh mp 2 fp32 1 faster_rcnn
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 bash
benchmark/
run_benchmark.sh mp 2 fp32 1 faster_rcnn
```
```
benchmark/prepare.sh
浏览文件 @
6bf1b443
...
@@ -2,8 +2,15 @@
...
@@ -2,8 +2,15 @@
pip3.7
install
-U
pip Cython
pip3.7
install
-U
pip Cython
pip3.7
install
-r
requirements.txt
pip3.7
install
-r
requirements.txt
mv
./dataset/coco/download_coco.py
.
&&
rm
-rf
./dataset/coco/
*
&&
mv
./download_coco.py ./dataset/coco/
mv
./dataset/coco/download_coco.py
.
&&
rm
-rf
./dataset/coco/
*
&&
mv
./download_coco.py ./dataset/coco/
# prepare lite train data
# prepare lite train data
wget
-nc
-P
./dataset/coco/ https://paddledet.bj.bcebos.com/data/coco_benchmark.tar
wget
-nc
-P
./dataset/coco/ https://paddledet.bj.bcebos.com/data/coco_benchmark.tar
cd
./dataset/coco/
&&
tar
-xvf
coco_benchmark.tar
&&
mv
-u
coco_benchmark/
*
.
cd
./dataset/coco/
&&
tar
-xvf
coco_benchmark.tar
&&
mv
-u
coco_benchmark/
*
.
rm
-rf
coco_benchmark/
rm
-rf
coco_benchmark/
rm
-rf
./dataset/mot/
*
# prepare mot mini train data
wget
-nc
-P
./dataset/mot/ https://paddledet.bj.bcebos.com/data/mot_benchmark.tar
cd
./dataset/mot/
&&
tar
-xvf
mot_benchmark.tar
&&
mv
-u
mot_benchmark/
*
.
rm
-rf
mot_benchmark/
benchmark/run_all.sh
浏览文件 @
6bf1b443
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
# run prepare.sh
# run prepare.sh
bash benchmark/prepare.sh
bash benchmark/prepare.sh
model_name_list
=(
faster_rcnn fcos deformable_detr gfl
)
model_name_list
=(
faster_rcnn fcos deformable_detr gfl
hrnet higherhrnet solov2 jde fairmot
)
fp_item_list
=(
fp32
)
fp_item_list
=(
fp32
)
max_epoch
=
1
max_epoch
=
1
...
@@ -22,6 +22,8 @@ for model_name in ${model_name_list[@]}; do
...
@@ -22,6 +22,8 @@ for model_name in ${model_name_list[@]}; do
hrnet
)
bs_list
=(
64 160
)
;;
hrnet
)
bs_list
=(
64 160
)
;;
higherhrnet
)
bs_list
=(
20 24
)
;;
higherhrnet
)
bs_list
=(
20 24
)
;;
solov2
)
bs_list
=(
2 4
)
;;
solov2
)
bs_list
=(
2 4
)
;;
jde
)
bs_list
=(
4 14
)
;;
fairmot
)
bs_list
=(
6 22
)
;;
*
)
echo
"wrong model_name"
;
exit
1
;
*
)
echo
"wrong model_name"
;
exit
1
;
esac
esac
for
bs_item
in
${
bs_list
[@]
}
for
bs_item
in
${
bs_list
[@]
}
...
@@ -29,7 +31,7 @@ for model_name in ${model_name_list[@]}; do
...
@@ -29,7 +31,7 @@ for model_name in ${model_name_list[@]}; do
echo
"index is speed, 1gpus, begin,
${
model_name
}
"
echo
"index is speed, 1gpus, begin,
${
model_name
}
"
run_mode
=
sp
run_mode
=
sp
CUDA_VISIBLE_DEVICES
=
0 bash benchmark/run_benchmark.sh
${
run_mode
}
${
bs_item
}
\
CUDA_VISIBLE_DEVICES
=
0 bash benchmark/run_benchmark.sh
${
run_mode
}
${
bs_item
}
\
${
fp_item
}
${
max_epoch
}
${
model_name
}
# (5min)
${
fp_item
}
${
max_epoch
}
${
model_name
}
sleep
60
sleep
60
echo
"index is speed, 8gpus, run_mode is multi_process, begin,
${
model_name
}
"
echo
"index is speed, 8gpus, run_mode is multi_process, begin,
${
model_name
}
"
...
...
benchmark/run_benchmark.sh
浏览文件 @
6bf1b443
#!/usr/bin/env bash
#!/usr/bin/env bash
set
-xe
set
-xe
# Usage:CUDA_VISIBLE_DEVICES=0 bash run_benchmark.sh ${run_mode} ${batch_size} ${fp_item} ${max_epoch} ${model_name}
# Usage:CUDA_VISIBLE_DEVICES=0 bash
benchmark/
run_benchmark.sh ${run_mode} ${batch_size} ${fp_item} ${max_epoch} ${model_name}
python
=
"python3.7"
python
=
"python3.7"
# Parameter description
# Parameter description
function
_set_params
(){
function
_set_params
(){
run_mode
=
${
1
:-
"sp"
}
# sp|mp
run_mode
=
${
1
:-
"sp"
}
# sp|mp
batch_size
=
${
2
:-
"2"
}
#
batch_size
=
${
2
:-
"2"
}
fp_item
=
${
3
:-
"fp32"
}
# fp32|fp16
fp_item
=
${
3
:-
"fp32"
}
# fp32|fp16
max_epoch
=
${
4
:-
"1"
}
#
max_epoch
=
${
4
:-
"1"
}
model_name
=
${
5
:-
"model_name"
}
model_name
=
${
5
:-
"model_name"
}
run_log_path
=
${
TRAIN_LOG_DIR
:-
$(
pwd
)
}
# TRAIN_LOG_DIR
run_log_path
=
${
TRAIN_LOG_DIR
:-
$(
pwd
)
}
device
=
${
CUDA_VISIBLE_DEVICES
//,/
}
device
=
${
CUDA_VISIBLE_DEVICES
//,/
}
arr
=(
${
device
}
)
arr
=(
${
device
}
)
...
@@ -29,6 +29,8 @@ function _train(){
...
@@ -29,6 +29,8 @@ function _train(){
hrnet
)
model_yml
=
"configs/keypoint/hrnet/hrnet_w32_256x192.yml"
;;
hrnet
)
model_yml
=
"configs/keypoint/hrnet/hrnet_w32_256x192.yml"
;;
higherhrnet
)
model_yml
=
"configs/keypoint/higherhrnet/higherhrnet_hrnet_w32_512.yml"
;;
higherhrnet
)
model_yml
=
"configs/keypoint/higherhrnet/higherhrnet_hrnet_w32_512.yml"
;;
solov2
)
model_yml
=
"configs/solov2/solov2_r50_fpn_1x_coco.yml"
;;
solov2
)
model_yml
=
"configs/solov2/solov2_r50_fpn_1x_coco.yml"
;;
jde
)
model_yml
=
"configs/mot/jde/jde_darknet53_30e_1088x608.yml"
;;
fairmot
)
model_yml
=
"configs/mot/fairmot/fairmot_dla34_30e_1088x608.yml"
;;
*
)
echo
"Undefined model_name"
;
exit
1
;
*
)
echo
"Undefined model_name"
;
exit
1
;
esac
esac
...
@@ -50,7 +52,7 @@ function _train(){
...
@@ -50,7 +52,7 @@ function _train(){
log_parse_file
=
"mylog/workerlog.0"
;;
log_parse_file
=
"mylog/workerlog.0"
;;
*
)
echo
"choose run_mode(sp or mp)"
;
exit
1
;
*
)
echo
"choose run_mode(sp or mp)"
;
exit
1
;
esac
esac
#
timeout
15m
${
train_cmd
}
>
${
log_file
}
2>&1
timeout
15m
${
train_cmd
}
>
${
log_file
}
2>&1
if
[
$?
-ne
0
]
;
then
if
[
$?
-ne
0
]
;
then
echo
-e
"
${
train_cmd
}
, FAIL"
echo
-e
"
${
train_cmd
}
, FAIL"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录