qrect在图片上显示矩形框_Mac上用LabelImg手动标记图片

fbf9ea50498a95b52c061a0e36d5673b.png

LabelImg用于图像检测数据集的制作,使用python编写,Qt作为图形接口。

Annotation的结果以PASCAL VOC格式,存储为XML文件,同时也支持YOLO格式。

项目地址:

tzutalin/labelImg​github.com
ebffac59c08964ec571cff8be095921b.png

安装

推荐环境:python3 + Qt5 Terminal运行以下命令。

  1. Python2+Qt4 安装 (本人未实践
brew install qt qt4
brew install libxml2
make qt4py2
python labelImg.py
python labelImg.py [IMAGE_PATH] [PRE-DEFINED CLASS FILE]

2. Python3 + Qt5 (推荐

brew install qt 
brew install libxml2
brew install pyqt5
make qt5py3

# 下载上面链接的zip解压,cd到这个文件夹的位置
python3 labelImg.py

运行成功会出现图形操作界面。

3. Python Virtualenv (推荐

virtual环境可以避免python和Qt的一些版本问题

brew install python3
pip3 install pipenv
pipenv --three # or pipenv install pyqt5 lxml
pipenv run pip install pyqt5 lxml
pipenv run make qt5py3
python3 labelImg.py

使用

视频demo:

https://www.bilibili.com/video/av58221619?from=search&seid=15277283772013665755​www.bilibili.com

整体界面:

e8abcc63c6981d577b2c9884cc7192ae.png

点击open dir,打开你的图片文件夹读取图片。

92e70d381ab7b91502fdb9cc743e6608.png

创建标记框:点击Create/nRecBox,选出来图片的目标,输入label,保存annotation为xml文件。

13cd013cb8dd20d895b33982cb460d53.png

快捷键

Command + U 倒入文件目录的所有图片

Command + R 更换anaotation保存路径

Command + S 保存

Command + D 复制当前label和矩形框

Space flag当前图片作为verified (verify image:When pressing space, the user can flag the image as verified, a green background will appear. This is used when creating a dataset automatically, the user can then through all the pictures and flag them instead of annotate them.)

W 创建矩形框

D 下一张图

A 上一张图

Delete 删除选中的矩形框

Command + + 放大

Command + - 缩小

⬆⬇⬅➡ 移动矩形框

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值