postprocessing.py 文件源码

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

项目:segmentation_DLMI 作者: imatge-upc 项目源码 文件源码
def morphological_opening_background(x):
    # Compute an opening, which is the combination of an erosion and a dilation (morphological operators).
    for i in range(x.shape[0]):
        background_predictions = x[i, BACKGROUND_CLASS, :, :, :]
        binarized_predictions = np.array(background_predictions > 0, dtype=np.int32)
        opened_predictions = binary_opening(binarized_predictions, np.ones((MORPHOLOGICAL_STRUCTURE_SIZE,) * 3))
        x[i, BACKGROUND_CLASS, :, :, :] *= opened_predictions
    return x
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号