Skip to content

Commit

Permalink
Merge pull request jwyang#457 from YuanmingLeee/master
Browse files Browse the repository at this point in the history
fix bug
  • Loading branch information
jwyang committed Mar 5, 2019
2 parents 0f970d2 + dab0859 commit 9291e09
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,8 @@ def _get_image_blob(im):
pred_boxes = clip_boxes(pred_boxes, im_info.data, 1)
else:
# Simply repeat the boxes, once for each class
pred_boxes = np.tile(boxes, (1, scores.shape[1]))
_ = torch.from_numpy(np.tile(boxes, (1, scores.shape[1])))
pred_boxes = _.cuda() if args.cuda > 0 else _

pred_boxes /= im_scales[0]

Expand Down
3 changes: 2 additions & 1 deletion test_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ def parse_args():
pred_boxes = clip_boxes(pred_boxes, im_info.data, 1)
else:
# Simply repeat the boxes, once for each class
pred_boxes = np.tile(boxes, (1, scores.shape[1]))
_ = torch.from_numpy(np.tile(boxes, (1, scores.shape[1])))
pred_boxes = _.cuda() if args.cuda > 0 else _

pred_boxes /= data[1][0][2].item()

Expand Down

0 comments on commit 9291e09

Please sign in to comment.