prepare_for_submission.py 文件源码

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

项目:brats17 作者: xf4j 项目源码 文件源码
def clean_contour(prob, c_input):
    # Smaller areas with lower prob are very likely to be false positives
    wt_mor = binary_dilation((c_input > 0).astype(np.float32), iterations=10)
    labels = measure.label(wt_mor)
    w_area = []
    for l in range(1, np.amax(labels) + 1):
        w_area.append(np.sum(prob[labels == l]))
    if len(w_area) > 0:
        max_area = np.amax(w_area)
        for l in range(len(w_area)):
            if w_area[l] < max_area / 2.0:
                c_input[labels == l + 1] = 0
    return c_input
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号