未验证 提交 b797f13a 编写于 作者: G Guanghua Yu 提交者: GitHub

fix yolo series act run.py (#1426)

上级 74c99613
...@@ -60,7 +60,7 @@ def eval_function(exe, compiled_test_program, test_feed_names, test_fetch_list): ...@@ -60,7 +60,7 @@ def eval_function(exe, compiled_test_program, test_feed_names, test_fetch_list):
score_threshold=0.001, score_threshold=0.001,
nms_threshold=0.65, nms_threshold=0.65,
multi_label=True, multi_label=True,
num_top_k=global_config.get('nms_num_top_k', 30000)) nms_top_k=global_config.get('nms_num_top_k', 30000))
with tqdm( with tqdm(
total=len(val_loader), total=len(val_loader),
bar_format='Evaluation stage, Run batch:|{bar}| {n_fmt}/{total_fmt}', bar_format='Evaluation stage, Run batch:|{bar}| {n_fmt}/{total_fmt}',
...@@ -71,10 +71,7 @@ def eval_function(exe, compiled_test_program, test_feed_names, test_fetch_list): ...@@ -71,10 +71,7 @@ def eval_function(exe, compiled_test_program, test_feed_names, test_fetch_list):
feed={test_feed_names[0]: data_all['image']}, feed={test_feed_names[0]: data_all['image']},
fetch_list=test_fetch_list, fetch_list=test_fetch_list,
return_numpy=False) return_numpy=False)
res = postprocess( res = postprocess(np.array(outs[0]), data_all['scale_factor'])
np.array(outs[0]),
data_all['scale_factor'],
nms_top_k=global_config.get('nms_num_top_k', 30000))
bboxes_list.append(res['bbox']) bboxes_list.append(res['bbox'])
bbox_nums_list.append(res['bbox_num']) bbox_nums_list.append(res['bbox_num'])
image_id_list.append(np.array(data_all['im_id'])) image_id_list.append(np.array(data_all['im_id']))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册