1 labelimg

labelimg可以用来标注目标检测的数据集, 提供多种格式的输出, 如Pascal Voc, YOLO等。

1.1 安装

pip install labelimg

1.2 使用

命令行直接输入labelimg即可打开软件主界面进行操作。 使用非常简单, 不做过细的介绍,关注下面红圈标出的即可。

需要注意的是, 如果是Windows系统,需要添加环境变量, 否则会提示命令不存在。 方法是找到安装路径, 把labelimg.exe所在的路径添加到Path环境变量中。 比如我的安装路径就是:C:\Users\leo\AppData\Roaming\Python\Python39\Scripts
在这里插入图片描述

也可以用该工具打开已有的标注数据查看, 方法是打开图像路径,然后选择修改保存路径打开标签文件。 但是需要注意, 如果是空标签文件, 不能有多余的空行, 否则会报错。

2 labelme

lebelme可以用来标注目标检测、语义分割、实例分割的数据。

2.1 安装

pip install labelme

2.2 使用

命令行直接输入labelme即可打开软件主界面进行操作。 使用非常简单, 不做过细的介绍,关注下面红圈标出的即可。

需要注意的是, 如果是Windows系统,需要添加环境变量, 否则会提示命令不存在。 方法是找到安装路径, 把labelme.exe所在的路径添加到Path环境变量中。 比如我的安装路径就是:C:\Users\leo\AppData\Roaming\Python\Python39\Scripts
在这里插入图片描述

3 比较

labelme的功能更多一些, 可以标注检测, 分割数据集, labelimg只能标注检测数据, 但对检测数据标注, labelimg比labelme更好用。

4 FAQ

运行过程可能出现无法显示可视化界面的问题:

2025-03-07 17:32:11.910 | INFO     | labelme.config:get_config:66 - Loading config file from: C:\Users\PINEFIELD-01\.labelmerc
QObject::moveToThread: Current thread (0x17c09cc0120) is not the object's thread (0x17c09fd1c60).
Cannot move to target thread (0x17c09cc0120)

qt.qpa.plugin: Could not load the Qt platform plugin "windows" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: minimal, offscreen, webgl, windows.

解决方法是重新安装py-qt5.

pip uninstall pyqt5 pyqt5-tools pyqt5-qt5 pyqt5-sip
pip install pyqt5
Logo

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

更多推荐