Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

raise exception when concatenate error #264

Merged
merged 2 commits into from
Jun 24, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
raise exception when concatenate error
  • Loading branch information
dyning committed Jun 24, 2020
commit 6a6c97f92b37ed35b26e1c6dcbb6c1d459bfee7e
8 changes: 7 additions & 1 deletion tools/eval_utils/eval_det_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,13 @@ def cal_det_res(exe, config, eval_info_dict):
img_list.append(data[ino][0])
ratio_list.append(data[ino][1])
img_name_list.append(data[ino][2])
img_list = np.concatenate(img_list, axis=0)
try:
img_list = np.concatenate(img_list, axis=0)
except:
err = "concatenate error usually caused by different input image shapes.\n \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

增加测试阶段吧

Please set \"test_batch_size_per_card\" in main yml as 1\n \
or add \"test_image_shape: [h, w]\" in reader yml for EvalReader."
raise Exception(err)
outs = exe.run(eval_info_dict['program'], \
feed={'image': img_list}, \
fetch_list=eval_info_dict['fetch_varname_list'])
Expand Down