show_images.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:CNNbasedMedicalSegmentation 作者: BRML 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号