37
使用LabelImg标注图片
source link: http://mp.weixin.qq.com/s?__biz=MzI3MzQ3NDMzNw%3D%3D&%3Bmid=2247483937&%3Bidx=1&%3Bsn=91f9b07d072c1aed087d714adfb44fe9
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
要训练自己的模型、需要标注图片,好在现在标注工具比较简单几乎傻瓜化了。这里使用LabelImg对图片进行标注;
LabelImg安装
conda create -n labelImg python=3 conda activate labelImg conda install pyqt=5 conda install lxml
git clone https://github.com/tzutalin/labelImg.git
进入程序目录:
pyrcc5 -o libs/resources.py resources.qrc
启动 labelImage
python labelImg.py
LabelImg 使用
LabelImg目前支持Pascal VOC、YOLO、CreateML三种图片的标注;
OpenDir:选择图片目录
ChangeSaveDir:标注后数据存储的路径
CreateRectBox:创建标注框
Save:保存标注信息
部分快捷键:
Ctrl + u:图片加载目录
Ctrl + r:标注保存目录
Ctrl + s:保持标注信息
Ctrl + d:复制标注
Ctrl + Shift + d:删除图片
Space:标记当前图片已经验证过
w:创建标注框
框住需要标注的部位后再输入框中输入标注的类型即可
可同时标注多个
点击保存后生成的图片标注文件,包含了图片的信息,所标注的框位置信息;
<folder>images</folder> <filename>zidane.jpg</filename> <path>E:\xxx\xxx\yolov5\inference\images\zidane.jpg</path> <source> <database>Unknown</database> </source> <size> <width>1280</width> <height>720</height> <depth>3</depth> </size> <segmented>0</segmented> <object> <name>tie</name> <pose>Unspecified</pose> <truncated>0</truncated> <difficult>0</difficult> <bndbox> <xmin>440</xmin> <ymin>452</ymin> <xmax>491</xmax> <ymax>718</ymax> </bndbox> </object> <object> <name>ear</name> <pose>Unspecified</pose> <truncated>0</truncated> <difficult>0</difficult> <bndbox> <xmin>498</xmin> <ymin>294</ymin> <xmax>551</xmax> <ymax>360</ymax> </bndbox> </object> </annotation>
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK