paddlex 使用-11 实例图像分割

 

 

 

参考:https://paddlex.readthedocs.io/zh_CN/develop/data/annotation/instance_segmentation.html

因为机子最近从做过,所以需要从新配置环境

1、新建一个bat文件,使用上一节生成的图片和json文件

paddlex --data_conversion --source labelme --to MSCOCO --pics C:\Users\zgj\Desktop\InstanceSeg1\JPEGImages 
--annotations C:\Users\zgj\Desktop\InstanceSeg1\annotations
--save_dir C:\Users\zgj\Desktop\InstanceSeg1\output

2、在python环境下运行

2.1、运行时报错 no moudle paddle:

pip install paddlepaddle -i https://pypi.tuna.tsinghua.edu.cn/simple/

如果安装时报opencv-python版本错误,请pip uninstall该python版本,然后再安装兼容版本

2.2、报pycocotools错误

不管

pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI

或者

pip install pycocotools

如果不安装VisualC++14.0的话都会报错,先安装VisualC++14.0,4个G,在vs2015中

 

 再次安装成功

 

 3、再次执行bat文件,会生成如下目录和json文件(需要几分钟)

 

 4、然后就可以在飞桨里使用实例分割了。

 

posted @ 2020-12-10 17:47  zhaogaojian  阅读(695)  评论(0编辑  收藏  举报