2025年标注工具labelme_数据标注从哪里接单

标注工具labelme_数据标注从哪里接单Labelme 版本 3 11 2 文章目录 1 Labelme 是什么 2 Labelme 能干啥 3 Labelme 安装要求 4 Labelme 安装方法 5 Labelme 使用教程 5 1 分类标注 5 2 目标检测标注 5 3 场景分割标注 5 4 实例分割标注 5 5 视频标注 5 6 其它形式的标注 5 7 命令行工具 6 Labelme 常见问题 7

Labelme 版本:3.11.2

文章目录

1. Labelme 是什么?

2. Labelme 能干啥?

3. Labelme 安装要求

4. Labelme 安装方法

5. Labelme 使用教程

5.1 分类标注

5.2 目标检测标注

5.3 场景分割标注

5.4 实例分割标注

5.5 视频标注

5.6 其它形式的标注

5.7 命令行工具

6. Labelme 常见问题

7. Testing

8. Developing

9. 将 labelme 打包成可执行文件

致谢

1. Labelme 是什么?

Labelme 是一个图形界面的图像标注软件。其的设计灵感来自于 http://labelme.csail.mit.edu/ 。它是用 Python 语言编写的,图形界面使用的是 Qt(PyQt)。


实例分割样例(VOC)


其它样例(场景分割,目标检测,分类)


各形状标注样例(多边形,矩形,圆形,多段线,线段,点)

2. Labelme 能干啥?

对图像进行多边形,矩形,圆形,多段线,线段,点形式的标注(可用于目标检测,图像分割,等任务)。

对图像进行进行 flag 形式的标注(可用于图像分类 和 清理 任务)。

视频标注

生成 VOC 格式的数据集(for semantic / instance segmentation)

生成 COCO 格式的数据集(for instance segmentation)

3. Labelme 安装要求

Ubuntu / macOS / Windows

Python2 / Python3

PyQt4 / PyQt5 / PySide2

4. Labelme 安装方法

Labelme 安装方法大体可分为两大类:

通用安装方法(各平台都适用):Anaconda,Docker。

各平台上的安装方法:Ubuntu,macOS,Windows。

4.1 Anaconda
首先安装 Anaconda,然后运行下列命令:

##################
## for Python 2 ##
##################
conda create --name=labelme python=2.7
source activate labelme
# conda install -c conda-forge pyside2
conda install pyqt
pip install labelme
# 如果想安装最新版本,请使用下列命令安装:
# pip install git+https://github.com/wkentaro/labelme.git

##################
## for Python 3 ##
##################
conda create --name=labelme python=3.6
source activate labelme
# conda install -c conda-forge pyside2
# conda install pyqt
pip install pyqt5 # pyqt5 can be installed via pip on python3
pip install labelme


4.2 Docker
首先安装 Docker,然后运行下列命令:

wget https://raw.githubusercontent.com/wkentaro/labelme/master/labelme/cli/on_docker.py -O labelme_on_docker
chmod u+x labelme_on_docker

# Maybe you need http://sourabhbajaj.com/blog/2017/02/07/gui-applications-docker-mac/ on macOS
./labelme_on_docker examples/tutorial/apc2016_obj3.jpg -O examples/tutorial/apc2016_obj3.json
./labelme_on_docker examples/semantic_segmentation/data_annotated


4.3 Ubuntu

# Ubuntu 14.04 / Ubuntu 16.04
# Python2
# sudo apt-get install python-qt4 # PyQt4
sudo apt-get install python-pyqt5 # PyQt5
sudo pip install labelme
# Python3
sudo apt-get install python3-pyqt5 # PyQt5
sudo pip3 install labelme


4.4 macOS

# macOS Sierra
brew install pyqt # maybe pyqt5
pip install labelme # both python2/3 should work

# or install standalone executable / app
brew install wkentaro/labelme/labelme
brew cask install wkentaro/labelme/labelme


4.5 Windows
首先按照4.1的操作安装,然后进行如下操作:

# Windows 上的 Pillow5 会导致 dll 加载错误,所以请安装 Pillow4。
# 详情见:https://github.com/wkentaro/labelme/pull/174
conda install pillow=4.0.0

----

5. Labelme 使用教程

Labelme 能够进行多种形式的图像数据标注。Labelme 以 JSON 文件存储标注信息。下面介绍一些 labelme 软件的基本操作。

labelme  # 打开labelme软件

labelme apc2016_obj3.jpg # 指定图像文件
labelme apc2016_obj3.jpg -O apc2016_obj3.json # 保存后关闭labelme
labelme apc2016_obj3.jpg --nodata # JSON文件不包含图像数据,而包含图像的相对路径
labelme apc2016_obj3.jpg \
--labels highland_6539_self_stick_notes,mead_index_cards,kong_air_dog_squeakair_tennis_ball # 指定 label list

labelme data_annotated/ # 指定图像文件夹
labelme data_annotated/ --labels labels.txt # 使用文件指定 label list

labelme 常用的命令行参数:

--flags: comma separated list of flags 或者 file containing flags

--labels:comma separated list of labels 或者 file containing labels

--nodata:stop storing image data to JSON file

--nosortlabels:stop sorting labels

--output:指定输出文件夹

关于命令行参数的更多信息,可以使用 labelme --help 命令查看。

5.1 分类标注

使用 labelme 进行图像分类标注的教程详见:labelme_classification

5.2 目标检测标注

使用 labelme 进行目标检测标注的教程详见:labelme_bbox_detection

5.3 场景分割标注

使用 labelme 进行场景分割标注的教程详见:labelme_semantic_segmentation

5.4 实例分割标注

使用 labelme 进行实例分割标注的教程详见:labelme_instance_segmentation

5.5 视频标注

使用 labelme 进行视频标注的教程详见:labelme_video_annotation

5.6 其它形式的标注

Labelme 除了能进行上面形式的标注,还能进行下面形式的标注:

多边形

矩形

圆形

多段线

线段

使用 labelme 进行其它形式的标注的教程详见:labelme_primitives

5.7 命令行工具

1. labelme_draw_json:
使用该命令可以快速查看JSON格式的标注。
2. labelme_json_to_dataset:
使用该命令可以将JSON文件转为一组图像和标签文本文件。
3. labelme_draw_label_png:
将label文本文件以图例的形式绘制到PNG格式的标签上,并显示出来。

关于上面三个命令的详细使用的方法见:命令行工具

6. Labelme 常见问题

如何将 JSON 文件转换为 NumPy 数组?请查阅 examples/tutorial。

如何加载 PNG 标签文件?请查阅 examples/tutorial。

如何获取语义分割的标注?请查阅 examples/semantic_segmentation。

如何获取实例分割的标注?请查阅 examples/instance_segmentation。

7. Testing

pip install hacking pytest pytest-qt
flake8 .
pytest -v tests

----

8. Developing

git clone https://github.com/wkentaro/labelme.git
cd labelme

# Install anaconda3 and labelme
curl -L https://github.com/wkentaro/dotfiles/raw/master/local/bin/install_anaconda3.sh | bash -s .
source .anaconda3/bin/activate
pip install -e .

9. 将 labelme 打包成可执行文件

----

下面的代码说明了如何构建独立可执行文件(Linux,Windows,macOS)。当然,我们也发布了预编译版本。

# Setup conda
conda create --name labelme python==3.6.0
conda activate labelme

# Build the standalone executable
pip install .
pip install pyinstaller
pyinstaller labelme.spec
dist/labelme --version

致谢

labelme 是在 mpitid/pylabelme 的基础上开发而成,但后者已经停止开发了。

参考资料

https://github.com/wkentaro/labelme/tree/v3.11.2

编程小号
上一篇 2025-01-24 13:30
下一篇 2025-02-06 10:51

相关推荐

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/hz/145727.html