filter_area.py 文件源码

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

项目:segmentation_DLMI 作者: imatge-upc 项目源码 文件源码
def dice_enhance(y,y_pred):
    y_enhance = np.zeros(y.shape)
    y_enhance[np.where(y == 4)[0]] = 1
    y_pred_enhance = np.zeros(y_pred.shape)
    y_pred_enhance[np.where( y_pred == 4)[0]] = 1

    return (2. * np.sum(y_pred_enhance * y_enhance) + np.finfo(float).eps ) / (np.sum(y_enhance) + np.sum(y_pred_enhance) + np.finfo(float).eps)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号