def rotate_3d_scipy(image, gt):
#if image.dtype != 'float32':
# image = np.asarray(image, dtype='float32')
#if gt.dtype != 'float32':
# gt = np.asarray(gt, dtype='float32')
ang = np.random.uniform(0, 360)
axes = (1,2)#np.random.permutation(3)[:2]
rot_im = rotate_scipy(image, ang, axes=axes, order=1, reshape=False)
rot_gt = rotate_scipy(gt, ang, axes=axes, order=0, reshape=False)
return rot_im, rot_gt
评论列表
文章目录