参考视频链接:PASCAL VOC2012数据集讲解与制作自己的数据集_哔哩哔哩_bilibili
voc2012数据集网盘链接:链接:https://pan.baidu.com/s/1qvlMYCBL8O8ml8QNfQArpw
提取码:k5hr
一、voc文件夹整体结构
针对目标检测的流程:首先读取Main下面的train.txt文件,根据文件名依次读取Annotations文件下的xml标注信息,最后将原图(JPEGImages)读取到内存中。
voc2012数据集网盘链接:链接:https://pan.baidu.com/s/1qvlMYCBL8O8ml8QNfQArpw
提取码:k5hr
二、构建自己的数据集
首先下载labelImg,github链接:GitHub - tzutalin/labelImg: 🖍️ LabelImg is a graphical image annotation tool and label object bounding boxes in images
我是采用的annocaoda+虚拟环境+pip
(1)创建一个虚拟环境并激活
conda create -n torch38 python=3.8
conda activate torch38
(2)使用pip+豆瓣换源安装
pip install labelImg -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
(3)进入labelImg的安装目录,使用python labelImg.py打开软件。
(4)选择图片进行标注,标注前提前准备好文件夹。应该包含要存放的标签文件夹,原图文件夹以及类别的txt。 然后进行标注存放即可。