1、下载:pip install labelme

2、将需要标注的图像存入images目录,cd到images目录的父目录

3、新建labels.txt文件,ansi编码,其中录入类别

__ignore__
_background_
aeroplane
bicycle
bird
boat
bottle
bus
car
cat
chair
cow
diningtable
dog
horse
motorbike
person
potted plant
sheep
sofa
train
tv/monitor

4、命令行启动labelme

labelme images --labels labels.txt --nodata

将所有图片标注完毕,退出labelme

5、下载批量转换py代码

进入https://github.com/wkentaro/labelme/tree/master/examples/semantic_segmentation页面,下载labelme2voc.py

6、转换

python.exe ./labelme2voc.py images data_dataset_voc --labels ./labels.txt

转换后效果如下图:

Logo

DAMO开发者矩阵,由阿里巴巴达摩院和中国互联网协会联合发起,致力于探讨最前沿的技术趋势与应用成果,搭建高质量的交流与分享平台,推动技术创新与产业应用链接,围绕“人工智能与新型计算”构建开放共享的开发者生态。

更多推荐