heatmap.py 文件源码

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

项目:GuidedLabelling 作者: coallaoh 项目源码 文件源码
def heatmap2segconf(heat_maps, imshape_original, gt_cls):
    heat_maps_os = nd.zoom(heat_maps,
                           [1,
                            float(imshape_original[0]) / heat_maps.shape[1],
                            float(imshape_original[1]) / heat_maps.shape[2]],
                           order=1)
    heat_maps_norm = heat_maps_os / heat_maps_os.max(axis=1).max(axis=1).reshape((-1, 1, 1))
    confidence = heat_maps_norm.max(0)
    seg = gt_cls[heat_maps_norm.argmax(axis=0)]

    return seg, confidence
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号