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 be with open(filename, 'r') as f:
  • imageData = b64decode(data['imageData']).decode('utf-8') should be imageData = b64decode(bytes(data['imageData'], 'utf-8'))

·        def save(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 Exceptionas e:
       
raise LabelFileError(e)

@staticmethod

 

6.使用

在anaconda prompt中打开

就可以打开窗口了

猜你喜欢

转载自blog.csdn.net/qq_32799915/article/details/79081556