evaluate_segmentation.py 文件源码

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

项目:luna16 作者: gzuidhof 项目源码 文件源码
def process_image(name, do_closing, closing_structure):
    image_train,_,_ = image_read_write.load_itk_image(name)
    name = name.replace("mask","truth")
    image_truth,_,_ = image_read_write.load_itk_image(name)
    truth = np.zeros(image_truth.shape, dtype=np.uint8)
    truth[image_truth >0]=1
    if do_closing:
        image_train = binary_closing(image_train, closing_structure,1)

    image_train = binary_closing(image_train, [[[1]],[[1]],[[1]],[[1]],[[1]]],1)

    score = calculate_dice(image_train,truth, name)

    return score
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号