utils.py 文件源码

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

项目:Multi-views-fusion 作者: luogongning 项目源码 文件源码
def rotation_augmentation(X, angle_range):
    progbar = Progbar(X.shape[0])  # progress bar for augmentation status tracking

    X_rot = np.copy(X)
    for i in range(len(X)):
        angle = np.random.randint(-angle_range, angle_range)
        for j in range(X.shape[1]):
            X_rot[i, j] = ndimage.rotate(X[i, j], angle, reshape=False, order=1)
        progbar.add(1)
    return X_rot
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号