当前位置:网站首页>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语义分割标注
边栏推荐
- oracle tablespace and user creation
- 一、Jmeter环境部署
- (1) Construction of a real-time performance monitoring platform (Grafana+Influxdb+Jmeter)
- 课堂练习--0708
- You must understand - the nine built-in objects and four domain objects of JSP
- 博客目录管理 :机器学习 深度学习 nlp
- 2022 Quality Officer-Civil Construction Direction-General Basic (Quality Officer) Exam Mock 100 Questions and Online Mock Exam
- arraylist之与linkedlist
- (三)Redis 如何进行压测
- vftpd本地可以连接,远程连接超时的解决
猜你喜欢

Trilium使用总结

Flask框架学习:路由的尾部斜杠

【分享】一个免费语料库

(3) Construction of a real-time performance monitoring platform (Grafana+Prometheus+Node_explorer+Jmeter)

task06 PyTorch生态

RK3399上的Tengine实践笔记

家·谱——人脸识别家谱系统

Core Data 多线程设计

【动态代理】CGLIB 动态代理的使用及原理
![[Embedded open source library] The use of cJSON, an efficient and streamlined json parsing library](/img/11/26ec988a23b239d7b01e2e29e3e32d.png)
[Embedded open source library] The use of cJSON, an efficient and streamlined json parsing library
随机推荐
博客目录管理 :机器学习 深度学习 nlp
flask框架学习:debug与配置项
IDEA中配置checkstyle
[Verilog] I2S Master Test Bench
(一)Docker安装Redis实战(一主二从三哨兵)
ARM Architecture 4: Embedded Hardware Platform Interface Development
LeetCode刷题Top100之两数之和
面试宝典一: code题目记录
切分字符串进行输出显示
for循环使用多线程优化
Solidrun hummingboard制作SD卡
MySQL事务的概念
Redis - the solution to the failure of connecting to the redis server in linux using jedis
2022 coal mine gas inspection test, simulation test question and answer
2022年Android面试中最常问的问题是什么?
家·谱——人脸识别家谱系统
代理模式(简要介绍)
华为od德科面试数据算法解析 2022-8-10 迷宫问题
宝塔Linux环境下redis开启多端口
第二篇 DS5 Armv8 样例工程报错之GCC编译










