代码拉取完成,页面将自动刷新
#!/usr/bin/env bash
## DOWNLOAD from JOSEPHS WEBSITE (SLOWER DOWNLOAD)
#wget https://pjreddie.com/media/files/VOCtrainval_11-May-2012.tar
#wget https://pjreddie.com/media/files/VOCtrainval_06-Nov-2007.tar
#wget https://pjreddie.com/media/files/VOCtest_06-Nov-2007.tar
## OR DOWNLOAD FROM HERE (FASTER DOWNLOAD)
# VOC2007 DATASET
wget http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtrainval_06-Nov-2007.tar
wget http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtest_06-Nov-2007.tar
# VOC2012 DATASET
wget http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCtrainval_11-May-2012.tar
# Extract tar files
tar xf VOCtrainval_11-May-2012.tar
tar xf VOCtrainval_06-Nov-2007.tar
tar xf VOCtest_06-Nov-2007.tar
# Need voc_label.py to clean up data from xml files
wget https://pjreddie.com/media/files/voc_label.py
# Run python file to clean data from xml files
python voc_label.py
# Get train by using train+val from 2007 and 2012
# Then we only test on 2007 test set
# Unclear from paper what they actually just as a dev set
cat 2007_train.txt 2007_val.txt 2012_*.txt > train.txt
cp 2007_test.txt test.txt
# Move txt files we won't be using to clean up a little bit
mkdir old_txt_files
mv 2007* 2012* old_txt_files/
python generate_csv.py
mkdir data
mkdir data/images
mkdir data/labels
cp VOCdevkit/*.jpg data/images/
cp VOCdevkit/VOC2007/labels/*.txt data/labels/
cp VOCdevkit/VOC2012/labels/*.txt data/labels/
mkdir data
mkdir data/images
mkdir data/labels
mv VOCdevkit/VOC2007/JPEGImages/*.jpg data/images/
mv VOCdevkit/VOC2012/JPEGImages/*.jpg data/images/
mv VOCdevkit/VOC2007/labels/*.txt data/labels/
mv VOCdevkit/VOC2012/labels/*.txt data/labels/
# We don't need VOCdevkit folder anymore, can remove
# in order to save some space
rm -rf VOCdevkit/
mv test.txt old_txt_files/
mv train.txt old_txt_files/
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。