coco与voc数据集下载与准备
coco与voc数据集下载
在远程服务器上测试目标检测算法需要用到测试集,最常用的是coco2014/2017和voc07/12数据集。
coco数据集的地址为http://cocodataset.org/#download
voc和coco的镜像为https://pjreddie.com/projects/pascal-voc-dataset-mirror/
本文做一次记录,方便以后使用。
具体的文件夹结构与detectron2相似:
voc
VOC_ROOT
|__ VOC2007
|_ JPEGImages
|_ Annotations
|_ ImageSets
|_ SegmentationClass
|__ VOC2012
|_ JPEGImages
|_ Annotations
|_ ImageSets
|_ SegmentationClass
|__ ...
mkdir voc && cd voc
# voc 2012
wget http://pjreddie.com/media/files/VOCtrainval_11-May-2012.tar && tar -xvf VOCtrainval_11-May-2012.tar && rm VOCtrainval_11-May-2012.tar
wget http://pjreddie.com/media/files/VOC2012test.tar && tar -xvf VOC2012test.tar && rm VOC2012test.tar
mv VOCdevkit/VOC2012/ ./
# voc 2007
wget http://pjreddie.com/media/files/VOCtrainval_06-Nov-2007.tar && tar -xvf VOCtrainval_06-Nov-2007.tar && rm VOCtrainval_06-Nov-2007.tar
wget http://pjreddie.com/media/files/VOCtest_06-Nov-2007.tar && tar -xvf VOCtest_06-Nov-2007.tar && rm VOCtest_06-Nov-2007.tar
mv VOCdevkit/VOC2007/ ./
rm -rf VOCdevkit
coco
COCO_ROOT
|__ annotations
|_ instances_valminusminival2014.json
|_ instances_minival2014.json
|_ instances_train2014.json
|_ instances_val2014.json
|_ ...
|__ train2014
|_ <im-1-name>.jpg
|_ ...
|_ <im-N-name>.jpg
|__ val2014
|_ <im-1-name>.jpg
|_ ...
|_ <im-N-name>.jpg
|__ ...
# coco2017 train118k val5k
wget -c http://images.cocodataset.org/zips/train2017.zip &&
unzip train2017.zip && rm train2017.zip &&
wget -c http://images.cocodataset.org/annotations/annotations_trainval2017.zip &&
unzip annotations_trainval2017.zip && rm annotations_trainval2017.zip &&
wget -c http://images.cocodataset.org/zips/val2017.zip &&
unzip val2017.zip && rm val2017.zip
# coco2014 train83k val 41k
wget http://images.cocodataset.org/zips/train2014.zip && unzip train2014.zip && rm train2014.zip
wget http://images.cocodataset.org/zips/val2014.zip && unzip val2014.zip && rm val2014.zip
wget http://images.cocodataset.org/annotations/annotations_trainval2014.zip && unzip annotations_trainval2014.zip && rm annotations_trainval2014.zip
## 5k image 'minival' subset and val2014 (set) minus minival (~35k images)
wget https://dl.dropboxusercontent.com/s/s3tw5zcg7395368/instances_valminusminival2014.json.zip?dl=0 && unzip instances_valminusminival2014.json.zip\?dl\=0
mv instances_valminusminival2014.json annotations/ && rm instances_valminusminival2014.json.zip\?dl\=0
wget https://dl.dropboxusercontent.com/s/o43o90bna78omob/instances_minival2014.json.zip?dl=0 && unzip instances_minival2014.json.zip?dl=0
mv instances_minival2014.json annotations/ && rm instances_minival2014.json.zip?dl=0
coco2014也有镜像
## mirror
wget https://pjreddie.com/media/files/train2014.zip && unzip train2014.zip && rm train2014.zip
wget https://pjreddie.com/media/files/val2014.zip && unzip val2014.zip && rm val2014.zip
wget https://pjreddie.com/media/files/instances_train-val2014.zip && unzip instances_train-val2014.zip && rm instances_train-val2014.zip