-
Notifications
You must be signed in to change notification settings - Fork 0
/
get_bdataset.sh
26 lines (22 loc) · 919 Bytes
/
get_bdataset.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
# blenderRenderer 2020
# Download command: bash data/scripts/get_bdataset.sh
# Train command: python train.py --data bdataset.yaml
# Default dataset location is next to /unsupervised-segmentation:
# /parent_folder
# /bdataset
# /unsupervised-segmentation
start=$(date +%s)
mkdir -p ../tmp
cd ../tmp/
# Download/unzip images and labels
d='..' # unzip directory
filename="bdataset.zip"
fileid="19TeFDaf2tmrnNsD5bTz1rH3ElWtDNfaN"
echo 'Downloading' $url$f '...'
curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}" > /dev/null
curl -Lb ./cookie "https://drive.google.com/uc?export=download&confirm=`awk '/download/ {print $NF}' ./cookie`&id=${fileid}" -o ${filename} && unzip -q ${filename} -d $d && rm ${filename} & # download, unzip, remove in background
wait # finish background tasks
end=$(date +%s)
runtime=$((end - start))
echo "Completed in" $runtime "seconds"