未验证 提交 f7890b1b 编写于 作者: S shangliang Xu 提交者: GitHub

[TIPC] fix pose benchmark shell and txt (#6564)

上级 0d481790
......@@ -68,20 +68,18 @@ class DetDataset(Dataset):
return self
def __getitem__(self, idx):
n = len(self.roidbs)
if self.repeat > 1:
idx %= self.repeat
idx %= n
# data batch
roidb = copy.deepcopy(self.roidbs[idx])
if self.mixup_epoch == 0 or self._epoch < self.mixup_epoch:
n = len(self.roidbs)
idx = np.random.randint(n)
roidb = [roidb, copy.deepcopy(self.roidbs[idx])]
elif self.cutmix_epoch == 0 or self._epoch < self.cutmix_epoch:
n = len(self.roidbs)
idx = np.random.randint(n)
roidb = [roidb, copy.deepcopy(self.roidbs[idx])]
elif self.mosaic_epoch == 0 or self._epoch < self.mosaic_epoch:
n = len(self.roidbs)
roidb = [roidb, ] + [
copy.deepcopy(self.roidbs[np.random.randint(n)])
for _ in range(4)
......
......@@ -166,6 +166,7 @@ else
fi
if [[ ${model_name} =~ "higherhrnet" ]] || [[ ${model_name} =~ "hrnet" ]] || [[ ${model_name} =~ "tinypose" ]];then
echo "${model_name} run on full coco dataset"
epoch=$(set_dynamic_epoch $device_num $epoch)
else
epoch=1
......
......@@ -53,7 +53,7 @@ inference:./deploy/python/infer.py
batch_size:2|8
fp_items:fp32|fp16
epoch:1
repeat:1
repeat:3
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:null
===========================infer_benchmark_params===========================
......
......@@ -53,7 +53,7 @@ inference:./deploy/python/infer.py
batch_size:2|8
fp_items:fp32|fp16
epoch:1
repeat:1
repeat:3
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:null
===========================infer_benchmark_params===========================
......
......@@ -53,6 +53,6 @@ inference:./deploy/python/infer.py
batch_size:2|8
fp_items:fp32|fp16
epoch:1
repeat:1
repeat:3
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:null
\ No newline at end of file
......@@ -52,7 +52,7 @@ inference:./deploy/python/keypoint_infer.py
===========================train_benchmark_params==========================
batch_size:20|24
fp_items:fp32|fp16
epoch:20
epoch:1
repeat:1
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:null
......
......@@ -52,7 +52,7 @@ null:null
===========================train_benchmark_params==========================
batch_size:64|160
fp_items:fp32|fp16
epoch:40
epoch:1
repeat:1
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:null
......
......@@ -49,12 +49,12 @@ inference:./deploy/python/keypoint_infer.py
--save_log_path:null
--run_benchmark:False
null:null
===========================infer_benchmark_params===========================
random_infer_input:[{float32,[3,128,96]}]
===========================train_benchmark_params==========================
batch_size:512
fp_items:fp32|fp16
epoch:25
epoch:1
repeat:1
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:null
\ No newline at end of file
flags:null
===========================infer_benchmark_params===========================
random_infer_input:[{float32,[3,128,96]}]
\ No newline at end of file
......@@ -49,5 +49,12 @@ inference:./deploy/python/infer.py
--save_log_path:null
--run_benchmark:False
--trt_max_shape:1600
===========================train_benchmark_params==========================
batch_size:2|4
fp_items:fp32|fp16
epoch:1
repeat:2
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:null
===========================infer_benchmark_params===========================
numpy_infer_input:3x800x1344.npy
\ No newline at end of file
......@@ -53,7 +53,7 @@ inference:./deploy/python/infer.py
batch_size:2|4
fp_items:fp32|fp16
epoch:1
repeat:1
repeat:2
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:null
===========================infer_benchmark_params===========================
......
......@@ -50,10 +50,10 @@ inference:./deploy/pptracking/python/mot_jde_infer.py
--run_benchmark:False
--trt_max_shape:1600
===========================train_benchmark_params==========================
batch_size:6|22
batch_size:6|20
fp_items:fp32|fp16
epoch:1
repeat:2
repeat:1
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:null
===========================infer_benchmark_params===========================
......
......@@ -50,7 +50,7 @@ inference:./deploy/pptracking/python/mot_jde_infer.py
--run_benchmark:False
--trt_max_shape:1600
===========================train_benchmark_params==========================
batch_size:4|14
batch_size:4|12
fp_items:fp32|fp16
epoch:1
repeat:1
......
......@@ -49,12 +49,12 @@ inference:./deploy/python/infer.py
--save_log_path:null
--run_benchmark:False
null:null
===========================infer_benchmark_params===========================
numpy_infer_input:3x416x416_2.npy
===========================train_benchmark_params==========================
batch_size:80
fp_items:fp32|fp16
epoch:1
repeat:1
repeat:30
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:null
\ No newline at end of file
flags:null
===========================infer_benchmark_params===========================
numpy_infer_input:3x416x416_2.npy
\ No newline at end of file
......@@ -6,7 +6,7 @@ use_gpu:True
auto_cast:null
epoch:lite_train_lite_infer=1|lite_train_whole_infer=1|whole_train_whole_infer=300
save_dir:null
TrainReader.batch_size:lite_train_lite_infer=2|lite_train_whole_infer=2|whole_train_whole_infer=128
TrainReader.batch_size:lite_train_lite_infer=2|lite_train_whole_infer=2|whole_train_whole_infer=64
pretrain_weights:https://paddledet.bj.bcebos.com/models/picodet_s_320_coco_lcnet.pdparams
trained_model_name:model_final.pdparams
train_infer_img_dir:./dataset/coco/test2017/
......@@ -49,12 +49,12 @@ inference:./deploy/python/infer.py
--save_log_path:null
--run_benchmark:False
null:null
===========================infer_benchmark_params===========================
numpy_infer_input:3x320x320_2.npy
===========================train_benchmark_params==========================
batch_size:128
batch_size:64
fp_items:fp32|fp16
epoch:1
repeat:1
repeat:25
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:null
\ No newline at end of file
flags:null
===========================infer_benchmark_params===========================
numpy_infer_input:3x320x320_2.npy
\ No newline at end of file
......@@ -49,12 +49,12 @@ inference:./deploy/python/infer.py
--save_log_path:null
--run_benchmark:False
null:null
===========================infer_benchmark_params===========================
numpy_infer_input:3x320x320_2.npy
===========================train_benchmark_params==========================
batch_size:128
fp_items:fp32|fp16
epoch:1
repeat:1
repeat:50
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:null
\ No newline at end of file
flags:null
===========================infer_benchmark_params===========================
numpy_infer_input:3x320x320_2.npy
\ No newline at end of file
......@@ -49,12 +49,12 @@ inference:./deploy/python/infer.py
--save_log_path:null
--run_benchmark:False
null:null
===========================infer_benchmark_params===========================
numpy_infer_input:3x320x320.npy
===========================train_benchmark_params==========================
batch_size:24
fp_items:fp32|fp16
epoch:1
repeat:1
repeat:10
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:null
\ No newline at end of file
flags:null
===========================infer_benchmark_params===========================
numpy_infer_input:3x320x320.npy
\ No newline at end of file
......@@ -49,12 +49,12 @@ inference:./deploy/python/infer.py
--save_log_path:null
--run_benchmark:False
null:null
===========================infer_benchmark_params===========================
numpy_infer_input:3x608x608.npy
===========================train_benchmark_params==========================
batch_size:24
fp_items:fp32|fp16
epoch:1
repeat:1
repeat:10
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:null
\ No newline at end of file
flags:null
===========================infer_benchmark_params===========================
numpy_infer_input:3x608x608.npy
\ No newline at end of file
......@@ -49,12 +49,12 @@ inference:./deploy/python/infer.py
--save_log_path:null
--run_benchmark:False
null:null
===========================infer_benchmark_params===========================
numpy_infer_input:3x320x320.npy
===========================train_benchmark_params==========================
batch_size:32
fp_items:fp32|fp16
epoch:1
repeat:1
repeat:12
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:null
\ No newline at end of file
flags:null
===========================infer_benchmark_params===========================
numpy_infer_input:3x320x320.npy
\ No newline at end of file
......@@ -49,12 +49,12 @@ inference:./deploy/python/infer.py
--save_log_path:null
--run_benchmark:False
null:null
===========================infer_benchmark_params===========================
numpy_infer_input:3x640x640.npy
===========================train_benchmark_params==========================
batch_size:12
fp_items:fp32|fp16
epoch:1
repeat:1
repeat:5
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:null
\ No newline at end of file
flags:null
===========================infer_benchmark_params===========================
numpy_infer_input:3x640x640.npy
\ No newline at end of file
......@@ -49,12 +49,12 @@ inference:./deploy/python/infer.py
--save_log_path:null
--run_benchmark:False
--trt_max_shape:1600
===========================infer_benchmark_params===========================
numpy_infer_input:3x640x640.npy
===========================train_benchmark_params==========================
batch_size:32
fp_items:fp32|fp16
epoch:1
repeat:1
repeat:12
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:null
\ No newline at end of file
flags:null
===========================infer_benchmark_params===========================
numpy_infer_input:3x640x640.npy
\ No newline at end of file
......@@ -53,7 +53,7 @@ inference:./deploy/python/infer.py
batch_size:2|4
fp_items:fp32|fp16
epoch:1
repeat:1
repeat:2
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:null
===========================infer_benchmark_params===========================
......
......@@ -53,7 +53,7 @@ null:null
batch_size:8
fp_items:fp32|fp16
epoch:1
repeat:1
repeat:3
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:null
===========================infer_benchmark_params===========================
......
......@@ -86,18 +86,25 @@ elif [ ${MODE} = "benchmark_train" ];then
pip install -U pip
pip install Cython
pip install -r requirements.txt
# prepare lite benchmark coco data
wget -nc -P ./dataset/coco/ https://paddledet.bj.bcebos.com/data/coco_benchmark.tar --no-check-certificate
cd ./dataset/coco/ && tar -xvf coco_benchmark.tar
mv -u coco_benchmark/* ./
ls ./
cd ../../
# prepare lite benchmark mot data
wget -nc -P ./dataset/mot/ https://paddledet.bj.bcebos.com/data/mot_benchmark.tar --no-check-certificate
cd ./dataset/mot/ && tar -xvf mot_benchmark.tar
mv -u mot_benchmark/* ./
ls ./
cd ../../
if [[ ${model_name} =~ "higherhrnet" ]] || [[ ${model_name} =~ "hrnet" ]] || [[ ${model_name} =~ "tinypose" ]];then
wget -nc -P ./dataset/ https://bj.bcebos.com/v1/paddledet/data/coco.tar --no-check-certificate
cd ./dataset/ && tar -xf coco.tar
ls ./coco/
cd ../
else
# prepare lite benchmark coco data
wget -nc -P ./dataset/coco/ https://paddledet.bj.bcebos.com/data/coco_benchmark.tar --no-check-certificate
cd ./dataset/coco/ && tar -xf coco_benchmark.tar
mv -u coco_benchmark/* ./
ls ./
cd ../../
# prepare lite benchmark mot data
wget -nc -P ./dataset/mot/ https://paddledet.bj.bcebos.com/data/mot_benchmark.tar --no-check-certificate
cd ./dataset/mot/ && tar -xf mot_benchmark.tar
mv -u mot_benchmark/* ./
ls ./
cd ../../
fi
elif [ ${MODE} = "paddle2onnx_infer" ];then
# install paddle2onnx
${python} -m pip install paddle2onnx
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册