Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
a82faaa2
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看板
未验证
提交
a82faaa2
编写于
7月 09, 2021
作者:
G
George Ni
提交者:
GitHub
7月 09, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[MOT] fix deepsort deploy trt infer (#3652)
上级
8a66e2d7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
10 addition
and
0 deletion
+10
-0
deploy/python/mot_sde_infer.py
deploy/python/mot_sde_infer.py
+5
-0
deploy/python/utils.py
deploy/python/utils.py
+5
-0
未找到文件。
deploy/python/mot_sde_infer.py
浏览文件 @
a82faaa2
...
...
@@ -193,6 +193,7 @@ class SDE_ReID(object):
model_dir
,
device
=
'CPU'
,
run_mode
=
'fluid'
,
batch_size
=
50
,
trt_min_shape
=
1
,
trt_max_shape
=
1088
,
trt_opt_shape
=
608
,
...
...
@@ -203,6 +204,7 @@ class SDE_ReID(object):
self
.
predictor
,
self
.
config
=
load_predictor
(
model_dir
,
run_mode
=
run_mode
,
batch_size
=
batch_size
,
min_subgraph_size
=
self
.
pred_config
.
min_subgraph_size
,
device
=
device
,
use_dynamic_shape
=
self
.
pred_config
.
use_dynamic_shape
,
...
...
@@ -214,10 +216,12 @@ class SDE_ReID(object):
enable_mkldnn
=
enable_mkldnn
)
self
.
det_times
=
Timer
()
self
.
cpu_mem
,
self
.
gpu_mem
,
self
.
gpu_util
=
0
,
0
,
0
self
.
batch_size
=
batch_size
assert
pred_config
.
tracker
,
"Tracking model should have tracker"
self
.
tracker
=
DeepSORTTracker
()
def
preprocess
(
self
,
crops
):
crops
=
crops
[:
self
.
batch_size
]
inputs
=
{}
inputs
[
'crops'
]
=
np
.
array
(
crops
).
astype
(
'float32'
)
return
inputs
...
...
@@ -423,6 +427,7 @@ def main():
FLAGS
.
reid_model_dir
,
device
=
FLAGS
.
device
,
run_mode
=
FLAGS
.
run_mode
,
batch_size
=
FLAGS
.
reid_batch_size
,
trt_min_shape
=
FLAGS
.
trt_min_shape
,
trt_max_shape
=
FLAGS
.
trt_max_shape
,
trt_opt_shape
=
FLAGS
.
trt_opt_shape
,
...
...
deploy/python/utils.py
浏览文件 @
a82faaa2
...
...
@@ -114,6 +114,11 @@ def argsparser():
default
=
None
,
help
=
(
"Directory include:'model.pdiparams', 'model.pdmodel', "
"'infer_cfg.yml', created by tools/export_model.py."
))
parser
.
add_argument
(
"--reid_batch_size"
,
type
=
int
,
default
=
50
,
help
=
"max batch_size for reid model inference."
)
parser
.
add_argument
(
'--use_dark'
,
type
=
bool
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录