未验证 提交 b1c36d9c 编写于 作者: W wangxinxin08 提交者: GitHub

increase trt workspace size to 32M while using dcn trt plugin (#4629)

上级 7325d4ab
...@@ -537,7 +537,7 @@ def load_predictor(model_dir, ...@@ -537,7 +537,7 @@ def load_predictor(model_dir,
} }
if run_mode in precision_map.keys(): if run_mode in precision_map.keys():
config.enable_tensorrt_engine( config.enable_tensorrt_engine(
workspace_size=1 << 10, workspace_size=1 << 25,
max_batch_size=batch_size, max_batch_size=batch_size,
min_subgraph_size=min_subgraph_size, min_subgraph_size=min_subgraph_size,
precision_mode=precision_map[run_mode], precision_mode=precision_map[run_mode],
...@@ -680,7 +680,7 @@ def predict_video(detector, camera_id): ...@@ -680,7 +680,7 @@ def predict_video(detector, camera_id):
if not os.path.exists(FLAGS.output_dir): if not os.path.exists(FLAGS.output_dir):
os.makedirs(FLAGS.output_dir) os.makedirs(FLAGS.output_dir)
out_path = os.path.join(FLAGS.output_dir, video_out_name) out_path = os.path.join(FLAGS.output_dir, video_out_name)
fourcc = cv2.VideoWriter_fourcc(*'mp4v') fourcc = cv2.VideoWriter_fourcc(* 'mp4v')
writer = cv2.VideoWriter(out_path, fourcc, fps, (width, height)) writer = cv2.VideoWriter(out_path, fourcc, fps, (width, height))
index = 1 index = 1
while (1): while (1):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册