Skip to content
Snippets Groups Projects
Unverified Commit 189d6097 authored by Kai Chen's avatar Kai Chen Committed by GitHub
Browse files

Merge pull request #390 from animebing/master

modify the range of bbox in BboxTransform
parents 70383d46 b1034740
No related branches found
No related tags found
No related merge requests found
......@@ -76,8 +76,8 @@ class BboxTransform(object):
gt_bboxes = bboxes * scale_factor
if flip:
gt_bboxes = bbox_flip(gt_bboxes, img_shape)
gt_bboxes[:, 0::2] = np.clip(gt_bboxes[:, 0::2], 0, img_shape[1])
gt_bboxes[:, 1::2] = np.clip(gt_bboxes[:, 1::2], 0, img_shape[0])
gt_bboxes[:, 0::2] = np.clip(gt_bboxes[:, 0::2], 0, img_shape[1] - 1)
gt_bboxes[:, 1::2] = np.clip(gt_bboxes[:, 1::2], 0, img_shape[0] - 1)
if self.max_num_gts is None:
return gt_bboxes
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment