import_labelme.py 文件源码

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

项目:facade-segmentation 作者: jfemiani 项目源码 文件源码
def outline_polygons(self, width=EDGE_WIDTH, color=LABEL_EDGE):
        from skimage.morphology import binary_dilation, disk
        im = np.asarray(self.image).copy()
        outset = binary_dilation(im == LABEL_POSITIVE, disk(width / 2))
        inset = binary_dilation(im != LABEL_POSITIVE, disk(width - width / 2))
        boundary = outset & inset
        im[boundary] = color
        self.image = Image.fromarray(im)
        self.artist = ImageDraw.Draw(self.image)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号