Skip to content

Instantly share code, notes, and snippets.

@sampathweb
Created March 18, 2018 16:48
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sampathweb/780df25b076493d45cec5681d0c37a7d to your computer and use it in GitHub Desktop.
Save sampathweb/780df25b076493d45cec5681d0c37a7d to your computer and use it in GitHub Desktop.
Fastai - V2 - Pascal Download Script
#!/usr/bin/env bash
## Steps
# Go to fastai/courses/dl2
# Create a data directory and copy this file into the data direcotry
# run the following script via >>>sh <pascal_download>.sh
## Datasource: https://pjreddie.com/projects/pascal-voc-dataset-mirror/
## Script credit: https://github.com/noklam/fastaipart2v2helpder
mkdir pascal
cd pascal/
mkdir tmp
wget "https://raw.githubusercontent.com/noklam/fastaipart2v2helpder/master/data/pascal/pascal_test2007.json"
wget "https://raw.githubusercontent.com/noklam/fastaipart2v2helpder/master/data/pascal/pascal_train2007.json"
wget "https://raw.githubusercontent.com/noklam/fastaipart2v2helpder/master/data/pascal/pascal_train2012.json"
wget "https://raw.githubusercontent.com/noklam/fastaipart2v2helpder/master/data/pascal/pascal_val2007.json"
wget "https://raw.githubusercontent.com/noklam/fastaipart2v2helpder/master/data/pascal/pascal_val2012.json"
curl "https://pjreddie.com/media/files/VOCtrainval_11-May-2012.tar" -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" --compressed -H "Accept-Language: en-US,en;q=0.5" -H "Connection: keep-alive" -H "Cookie: __utma=134107727.855222601.1521361366.1521361366.1521361366.1; __utmb=134107727.1.10.1521361366; __utmc=134107727; __utmz=134107727.1521361366.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utmt=1" -H "Host: pjreddie.com" -H "Upgrade-Insecure-Requests: 1" -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0" -O "VOCtrainval_11-May-2012.tar"
curl "https://pjreddie.com/media/files/VOCtrainval_06-Nov-2007.tar" -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" --compressed -H "Accept-Language: en-US,en;q=0.5" -H "Connection: keep-alive" -H "Cookie: __utma=134107727.855222601.1521361366.1521361366.1521361366.1; __utmb=134107727.1.10.1521361366; __utmc=134107727; __utmz=134107727.1521361366.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utmt=1" -H "Host: pjreddie.com" -H "Upgrade-Insecure-Requests: 1" -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0" -O "VOCtrainval_06-Nov-2007.tar"
tar -xvf VOCtrainval_06-Nov-2007.tar
tar -xvf VOCtrainval_11-May-2012.tar
mv VOCdevkit/VOC2007 .
mv VOCdevkit/VOC2012 .
rm -rf VOCdevkit/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment