当前位置:网站首页>labelme工具,对类别标注,再进行细致的分割
labelme工具,对类别标注,再进行细致的分割
2022-08-11 05:15:00 【melally】
1.下载lebelme
直接在pycharm里面创建一个属于自己的环境直接在下面终端进行操作
在下面终端中直接输入命令
pip install labelme
如果出现 pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out. Read time out 等字样说明网络有问题,可以换源(中间的包名可以换成任意的想要下载的包)
- 清华源:
pip --default-timeout=100 install labelme -i https://pypi.tuna.tsinghua.edu.cn/simple
- 豆瓣源:
pip --default-timeout=100 install labelme -i https://pypi.douban.com/simple
2.使用labelme进行标注
在下载完成后,直接再终端输入labelme,会出现以下UI界面
在标完类别后,点击 save 保存,保存的格式是 json文件
3.分割标签——数据转换
在数据标注好后,需要转化label格式,可以使用labelme进行转换,有两大类语义分割(Semantic Segmentation)和实例分割(Instance Segmentation)需要github下载
git clone https://github.com/wkentaro/labelme
,也可以直接复制链接GitHub - wkentaro/labelme: Image Polygonal Annotation with Python (polygon, rectangle, circle, line, point and image-level flag annotation). 下载到本地,下载不了的可以用我的网盘 链接:百度网盘 请输入提取码 提取码:king ,之后放到pycharm里自己创建的项目中
实例分割
- 进入到 labelme\examples\instance_segmentation 文件夹,有支持转换COCO 及VOC 格式的代码,以下是转coco的,在labelme2coco.py下面就是转voc格式的代码:
- 将data_annotated文件夹下的.jpg和.json文件换成自己标注好的文件
- labels.txt文件中__ignore__, _background_不能少,下边的标签换成自己的类别
- 然后在下面终端终端中,切换到目录下
- 输入命令 python labelme2voc.py <data> <data_output> --labels <label.txt path> ;<data>放标定文件和图片的; <data_output>放输出分割好文件的;<label.txt path>放刚刚写好的txt文档。(切记要把官方的文件删掉,再放自己的文件),然后回车,就在data_output文件里面看到想要的效果了
成功结束了!!!
结束语:
语义分割和实例分割转coco格式和上面一摸一样,只是用不同的代码跑罢了,在label_main文件中都有。voc格式和coco格式只是效果不一样,根据需求来吧
coco格式出来的效果
voc格式出来的效果
参考目录:
(16条消息) 语义分割与实例分割 Labelme标注教学_求则得之,舍则失之的博客-CSDN博客_labelme语义分割标注
边栏推荐
- 一个月闭关直接面进大厂,这份Android面试笔记是真的牛逼
- Django--20 implements Redis support, context, and interaction of context and interface
- 阿里天池学习赛 新闻文本分类
- 性能效率测试
- [Embedded open source library] The use of cJSON, an efficient and streamlined json parsing library
- selenuim使用cookie登录京东
- imx6 yocto编译备忘
- Keras与tensorflow 使用基础
- 切分字符串进行输出显示
- Mysql introductory exercise
猜你喜欢
随机推荐
四大函数式接口
Idea提升工作效率的必备技巧
The most complete installation tutorial of Pytorch (one step)
如何设置pip安装的国内源
Day38 LeetCode
MySQL事务的概念
批量修改数据库等视频文件名称
【win10+cuda7.5+cudnn6.0安装caffe①】安装cuda和cudnn
tensorflow代码翻译成pytorch代码 -详细教程+案例
flaks框架学习:在 URL 中添加变量
Tips to improve your productivity, you have to know - Navitcat shortcuts
Redis详解
Apache Commons OGNL语法说明_翻译
【网站小白】mySQL数据库异常断开
代理模式(简要介绍)
(三)性能实时监控平台搭建(Grafana+Prometheus+Node_explorer+Jmeter)
(一)Docker安装Redis实战(一主二从三哨兵)
【网站小白】Hibernate插入数据成功,不报错,但是数据库中没有值
软件测试风险识别
Redis - the solution to the failure of connecting to the redis server in linux using jedis