windows+anaconda+labelme安装


1.先下载安装anacondahttps://www.anaconda.com/download/选择适合自己Python版本的

2.安装好在程序里选择prompt,就相当于windows下的cmd,只不过运行目录直接在anaconda
3.prompt里依次输入

conda create --name=labelme python=2.7(这一步python=*选择自己的Python版本)
activate labelme(这一步Ubuntu系统source activate labelme
conda install pyqt
pip install labelme

4.执行labelme

5.保存时出现错误,参考解决

https://github.com/wkentaro/labelme/issues/25

Thanks, @l02i08u 's way works for me as well while saving a file (Python 3.6 on Windows).However, when opening a json file saved in this way, the following code inlabelFile.py should also be modified, otherwise similar encoding issues wouldoccur:
(under def load(self, filename):)

  • with open(filename, 'rb') as f: should bewith open(filename, 'r') as f:
  • imageData = b64decode(data['imageData']).decode('utf-8') should beimageData = b64decode(bytes(data['imageData'], 'utf-8'))

·        defsave(self,filename,shapes,imagePath,imageData,
       
lineColor=None,fillColor=None):
   
try:
       
with open(filename,'w')as f:
           
if six.PY3:
               
imageData = str(b64encode(imageData),'utf-8')
               
#imageData = b64encode(imageData.encode('utf-8'))
           
elif six.PY2:
               
imageData =b64encode(imageData)
            else:
               
raise RuntimeError('Unsupported Python version.')
           
json.dump(dict(
                shapes=shapes,
               
lineColor=lineColor,fillColor=fillColor,
               
imagePath=imagePath,
               
imageData=imageData),
               
f,ensure_ascii=True,indent=2)
   
except Exceptionase:
       
raise LabelFileError(e)

@staticmethod

 6. labelme 闪退问题
  在使用labelme的时候,如果标记的第一个点与第二个点重合,程序会闪退,为了解决这个问题,在labelme\Lib\site-packages\libs\shape.py  文件中,注释掉assert len(self.points)>2

7.使用

在anaconda prompt中打开

就可以打开窗口了

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值