mask_coco2voc.py 文件源码

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

项目:focal-loss 作者: unsky 项目源码 文件源码
def mask_coco2voc(coco_masks, im_height, im_width):
    voc_masks = np.zeros((len(coco_masks), im_height, im_width))
    for i, ann in enumerate(coco_masks):
        if type(ann) == list:
            # polygon
            m = segToMask(ann, im_height, im_width)
        else:
            # rle
            m = decodeMask(ann)
        voc_masks[i,:,:]=m;
    return voc_masks
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号