preprocessing.py 文件源码

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

项目:bird-species-classification 作者: johnmartinsson 项目源码 文件源码
def smooth_mask(mask):
    """ Smooths a binary mask using 4x4 dilation
        # Arguments
            mask : the binary mask
        # Returns
            mask : a smoother binary mask
    """
    n_hood = np.ones(4)
    mask = morphology.binary_dilation(mask, n_hood)
    mask = morphology.binary_dilation(mask, n_hood)

    # type casting is a bitch
    return mask
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号