utils.py 文件源码

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

项目:DeepCellSeg 作者: arbellea 项目源码 文件源码
def plot_segmentation(I,GT,Seg, fig=None):

    I = np.squeeze(I)
    GT = np.squeeze(GT)
    Seg = np.squeeze(Seg)

    GTC = np.logical_and(GT, np.logical_not(ndimage.binary_erosion(GT)))
    SegC = np.logical_and(Seg, np.logical_not(ndimage.binary_erosion(Seg)))

    plt.figure(fig)
    maskedGT = np.ma.masked_where(GTC == 0, GTC)
    maskedSeg = np.ma.masked_where(SegC == 0, SegC)
    plt.imshow(I, cmap=cm.gray)
    plt.imshow(maskedGT, cmap=cm.jet, interpolation='none')
    plt.imshow(maskedSeg*100, cmap=cm.hsv, interpolation='none')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号