Skip to content
This repository has been archived by the owner on Jun 15, 2022. It is now read-only.

Commit

Permalink
fix a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Naoki Kato committed Feb 8, 2018
1 parent b2a3ba2 commit 6c8aafa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion coco_data_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def random_rotate_img(self, img, mask, poses):
R[0, 2] += bbox[0] / 2 - center[0]
R[1, 2] += bbox[1] / 2 - center[1]
rotate_img = cv2.warpAffine(img, R, (int(bbox[0]+0.5), int(bbox[1]+0.5)), flags=cv2.INTER_CUBIC,
borderMode=cv2.BORDER_CONSTANT, borderValue=127.5)
borderMode=cv2.BORDER_CONSTANT, borderValue=[127.5, 127.5, 127.5])
rotate_mask = cv2.warpAffine(mask.astype('uint8')*255, R, (int(bbox[0]+0.5), int(bbox[1]+0.5))) > 0

tmp_poses = np.ones_like(poses)
Expand Down

0 comments on commit 6c8aafa

Please sign in to comment.