read_images.py 文件源码

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

项目:CNNbasedMedicalSegmentation 作者: BRML 项目源码 文件源码
def process_gt(gt, n_classes, downsize=False):
    if downsize:
        gt = zoom(gt, 0.5, order=0)
        gt = np.asarray(gt, dtype='int8')
    gt = np.transpose(gt, (1, 2, 0))
    l = np.reshape(gt, (-1,))
    l = np.reshape(one_hot(l, n_classes), (-1, n_classes))
    return l
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号