Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
597ee656
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
大约 1 年 前同步成功
通知
695
Star
11112
Fork
2696
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
184
列表
看板
标记
里程碑
合并请求
40
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
184
Issue
184
列表
看板
标记
里程碑
合并请求
40
合并请求
40
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
597ee656
编写于
5月 09, 2023
作者:
D
duanyanhui
提交者:
GitHub
5月 09, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix npu tipc script (#8213)
上级
73291012
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
9 addition
and
7 deletion
+9
-7
deploy/pptracking/python/mot_jde_infer.py
deploy/pptracking/python/mot_jde_infer.py
+3
-3
deploy/pptracking/python/mot_sde_infer.py
deploy/pptracking/python/mot_sde_infer.py
+3
-3
deploy/pptracking/python/mot_utils.py
deploy/pptracking/python/mot_utils.py
+1
-1
test_tipc/test_train_inference_python_npu.sh
test_tipc/test_train_inference_python_npu.sh
+2
-0
未找到文件。
deploy/pptracking/python/mot_jde_infer.py
浏览文件 @
597ee656
...
@@ -45,7 +45,7 @@ class JDE_Detector(Detector):
...
@@ -45,7 +45,7 @@ class JDE_Detector(Detector):
"""
"""
Args:
Args:
model_dir (str): root path of model.pdiparams, model.pdmodel and infer_cfg.yml
model_dir (str): root path of model.pdiparams, model.pdmodel and infer_cfg.yml
device (str): Choose the device you want to run, it can be: CPU/GPU/XPU, default is CPU
device (str): Choose the device you want to run, it can be: CPU/GPU/XPU
/NPU
, default is CPU
run_mode (str): mode of running(paddle/trt_fp32/trt_fp16)
run_mode (str): mode of running(paddle/trt_fp32/trt_fp16)
batch_size (int): size of pre batch in inference
batch_size (int): size of pre batch in inference
trt_min_shape (int): min shape for dynamic shape in trt
trt_min_shape (int): min shape for dynamic shape in trt
...
@@ -502,7 +502,7 @@ if __name__ == '__main__':
...
@@ -502,7 +502,7 @@ if __name__ == '__main__':
FLAGS
=
parser
.
parse_args
()
FLAGS
=
parser
.
parse_args
()
print_arguments
(
FLAGS
)
print_arguments
(
FLAGS
)
FLAGS
.
device
=
FLAGS
.
device
.
upper
()
FLAGS
.
device
=
FLAGS
.
device
.
upper
()
assert
FLAGS
.
device
in
[
'CPU'
,
'GPU'
,
'XPU'
assert
FLAGS
.
device
in
[
'CPU'
,
'GPU'
,
'XPU'
,
'NPU'
],
"device should be CPU, GPU or XPU"
],
"device should be CPU, GPU
, NPU
or XPU"
main
()
main
()
deploy/pptracking/python/mot_sde_infer.py
浏览文件 @
597ee656
...
@@ -46,7 +46,7 @@ class SDE_Detector(Detector):
...
@@ -46,7 +46,7 @@ class SDE_Detector(Detector):
Args:
Args:
model_dir (str): root path of model.pdiparams, model.pdmodel and infer_cfg.yml
model_dir (str): root path of model.pdiparams, model.pdmodel and infer_cfg.yml
tracker_config (str): tracker config path
tracker_config (str): tracker config path
device (str): Choose the device you want to run, it can be: CPU/GPU/XPU, default is CPU
device (str): Choose the device you want to run, it can be: CPU/GPU/XPU
/NPU
, default is CPU
run_mode (str): mode of running(paddle/trt_fp32/trt_fp16)
run_mode (str): mode of running(paddle/trt_fp32/trt_fp16)
batch_size (int): size of pre batch in inference
batch_size (int): size of pre batch in inference
trt_min_shape (int): min shape for dynamic shape in trt
trt_min_shape (int): min shape for dynamic shape in trt
...
@@ -946,7 +946,7 @@ if __name__ == '__main__':
...
@@ -946,7 +946,7 @@ if __name__ == '__main__':
FLAGS
=
parser
.
parse_args
()
FLAGS
=
parser
.
parse_args
()
print_arguments
(
FLAGS
)
print_arguments
(
FLAGS
)
FLAGS
.
device
=
FLAGS
.
device
.
upper
()
FLAGS
.
device
=
FLAGS
.
device
.
upper
()
assert
FLAGS
.
device
in
[
'CPU'
,
'GPU'
,
'XPU'
assert
FLAGS
.
device
in
[
'CPU'
,
'GPU'
,
'XPU'
,
'NPU'
],
"device should be CPU, GPU or XPU"
],
"device should be CPU, GPU
, NPU
or XPU"
main
()
main
()
deploy/pptracking/python/mot_utils.py
浏览文件 @
597ee656
...
@@ -64,7 +64,7 @@ def argsparser():
...
@@ -64,7 +64,7 @@ def argsparser():
"--device"
,
"--device"
,
type
=
str
,
type
=
str
,
default
=
'cpu'
,
default
=
'cpu'
,
help
=
"Choose the device you want to run, it can be: CPU/GPU/XPU, default is CPU."
help
=
"Choose the device you want to run, it can be: CPU/GPU/XPU
/NPU
, default is CPU."
)
)
parser
.
add_argument
(
parser
.
add_argument
(
"--use_gpu"
,
"--use_gpu"
,
...
...
test_tipc/test_train_inference_python_npu.sh
浏览文件 @
597ee656
...
@@ -33,6 +33,8 @@ FILENAME=$1
...
@@ -33,6 +33,8 @@ FILENAME=$1
# change gpu to npu in tipc txt configs
# change gpu to npu in tipc txt configs
sed
-i
"s/use_gpu:True/use_npu:True/g"
$FILENAME
sed
-i
"s/use_gpu:True/use_npu:True/g"
$FILENAME
sed
-i
"s/--device:gpu|cpu/--device:npu|cpu/g"
$FILENAME
sed
-i
"s/--device:gpu|cpu/--device:npu|cpu/g"
$FILENAME
sed
-i
"s/--device:gpu/--device:npu/g"
$FILENAME
sed
-i
"s/--device:cpu|gpu/--device:cpu|npu/g"
$FILENAME
sed
-i
"s/trainer:pact_train/trainer:norm_train/g"
$FILENAME
sed
-i
"s/trainer:pact_train/trainer:norm_train/g"
$FILENAME
sed
-i
"s/trainer:fpgm_train/trainer:norm_train/g"
$FILENAME
sed
-i
"s/trainer:fpgm_train/trainer:norm_train/g"
$FILENAME
sed
-i
"s/--slim_config _template_pact/ /g"
$FILENAME
sed
-i
"s/--slim_config _template_pact/ /g"
$FILENAME
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录