修改文件

找到your anaconda path/envs/labelme/lib/python3.6/site-packages/labelme/label_file.py文件
在111行处加入一下代码:
if '\\' in data["imagePath"] and os.name == 'posix':
   data["imagePath"]=data["imagePath"].replace('\\','/')
if '/' in data["imagePath"] and os.name == 'nt':
   data["imagePath"]=data["imagePath"].replace('/','\\')

代码片段截图:
在这里插入图片描述


版权声明:本文为guo1988kui原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/guo1988kui/article/details/126126078