制作自己的图片数据集(VOC2007格式)
来源:互联网 发布:好的炒作公司网络推手 编辑:程序博客网 时间:2024/05/16 23:35
制作自己的图片数据集(VOC2007格式),用于训练需要的模型,用于faster-rcnn,YOLO等
一. 获取数据(自行拍照或爬虫下载,不详述)Get data(telephone or spam,No more details)
二. 标注图片数据(Label Image Data)
rename_images.py create_trainval.py delete_file_firstRow.py等文件在make_own_dataset
或者直接git clone https://github.com/hyzhan/make_own_dataset.git
非常感谢tzutalin提供的标注工具 github
Thanks to tzutalin.
LabelImg
LabelImg is a graphical image annotation tool.
It is written in Python and uses Qt for its graphical interface.
The annotation file will be saved as an XML file. The annotation format is PASCAL VOC format, and the format is the same as ImageNet
Dependencies
- Linux/Ubuntu/Mac
Requires at least Python 2.6 and has been tested with PyQt
4.8.
In order to build the resource and assets, you need to install pyqt4-dev-tools and lxml:
$ sudo apt-get install pyqt4-dev-tools$ sudo pip install lxml$ make all$ ./labelImg.py
Mac requires “$ brew install libxml2” when installing lxml
- Windows
Need to download and setup Python 2.6 or later and PyQt4. Also, you need to install other python dependencies.
Open cmd and go to [labelImg]
$ pyrcc4 -o resources.py resources.qrc$ python labelImg.py
Usage
After cloning the code, you should run $ make all
to generate the resource file.
You can then start annotating by running $ ./labelImg.py
. For usage
instructions you can see Here
At the moment annotations are saved as an XML file. The format is PASCAL VOC format, and the format is the same as ImageNet
You can also see ImageNet Utils to download image, create a label text for machine learning, etc
General steps from scratch
Build and launch:
$ make all; python labelImg.py
Click ‘Change default saved annotation folder’ in Menu/File
Click ‘Open Dir’
Click ‘Create RectBox’
The annotation will be saved to the folder you specify
Create pre-defined classes
You can edit the data/predefined_classes.txt to load pre-defined classes
Hotkeys
Ctrl + r : Change the defult target dir which saving annotation files
Ctrl + n : Create a bounding box
Ctrl + s : Save
n : Next image
p : Previous image
How to contribute
Send a pull request
License
License
(1).安装依赖库
$ sudo apt-get install pyqt4-dev-tools$ sudo pip install lxml$ make all
(2).图片名称批量修改
将图片名称统一后方便后期工作,执行:
python rename_images.py
默认图片存放路径是在JPEGImages下,执行成功后会在该文件夹下生成tmp文件夹,里面有重命名后
的图片文件,备份或删除原图片,在JPEGImages下仅保留重命名后的图片文件
(3). 修改标签文件
修改data文件下的predefined_classes.txt文件,改成自己所需要分类的类别名称,限英文
(4).执行标注程序
./labelImg.py
PS.快捷键
* Ctrl + r : Change the defult target dir which saving annotation files
Ctrl + n : Create a bounding box
Ctrl + s : Save
n : Next image
p : Previous image
建议用opendir打开图片所在文件夹后再按Ctrl + r选择保存xml文件的位置(建议放在xml文件夹下),
以免与图片混合起来,方便后期工作.
(5). 格式化xml文件(可选)
部分机器会在生成的xml文件加上版本号,后期训练时需要将生成的xml文件的首行
- 制作自己的图片数据集(VOC2007格式)
- Faster RCNN 训练自己的数据集(Matlab,python版本)及制作VOC2007格式数据集
- 仿照VOC2007数据集格式制作自己的目标检测数据集
- 目标检测制作自己的VOC2007数据集
- VOC2007数据集的制作
- 用SSD训练自己的数据集(VOC2007格式)
- 将自己的数据集改为PASCAL VOC2007格式用于
- VOC2007数据集制作
- VOC2007数据集制作
- win10 tensorflow faster rcnn训练自己的数据集(一、制作VOC2007数据集)
- 制作VOC2007格式数据集用于Faster-RCNN训练
- 仿照VOC2007制作自己的数据集,并在Caffe上训练Faster-RCNN
- 用faster-rcnn训练自己的数据集(VOC2007格式,python版)
- 用faster-rcnn训练自己的数据集(VOC2007格式,python版)
- voc2007数据集制作之批量修改文件夹JPEGImages中图片的名字
- VOC2007数据集图片画框
- 将自己的数据做成Faster RCNN的格式(VOC2007格式)
- SSD(Single Shot MultiBox Detector):ubuntu16安装及训练自己的数据集(VOC2007格式)过程记录
- AngularJS 动画
- iText7彻底解决中文问题、特殊字符(如......省略号报错问题,其他的自测)
- Android 6.0动态获取权限,根据官方总结的最简单有效解决方法
- js 获取URL地址附带参数 获得请求链接参数
- APP原型设计之初
- 制作自己的图片数据集(VOC2007格式)
- java从入门到弃坑数据库终
- JSON字符串与JSON对象转换
- 深入浅出Android Gradle构建系统(一:简介)
- Java语言基础简介(三)
- 性能测试的时间间隔获取方法
- Web基础之Servlet+JDBC+JSP项目实战记录(三)
- 单元测试遇到的坑
- Redis持久化RDB与AOF(笔记)