File size: 839 Bytes
e6ac593
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#/usr/bin/env bash

# get the data (zipped)
# wget -r https://datasets.epfl.ch/disk-data/index.html

cd datasets.epfl.ch/disk-data;

# check for MD5 match
# md5sum -c md5sum.txt;
# if [ $? ]; then
#     echo "MD5 mismatch (corrupt download)";
#     return 1;
# fi

# create a crude progress counter
ITER=1;
TOTAL=138;
# unzip test scenes
cd imw2020-val/scenes;
for SCENE_TAR in *.tar.gz; do
    echo "Unzipping $SCENE_TAR ($ITER / $TOTAL)";
    tar -xz --strip-components=3 -f $SCENE_TAR;
    rm $SCENE_TAR;
    ITER=$(($ITER+1));
done

# unzip megadepth scenes
cd ../../megadepth/scenes;
for SCENE_TAR in *.tar; do
    echo "Unzipping $SCENE_TAR ($ITER / $TOTAL)";
    tar -x --strip-components=3 -f $SCENE_TAR;
    rm $SCENE_TAR;
    ITER=$(($ITER+1));
done

cd ../../../../

mv datasets.epfl.ch/disk-data ./
rm -rf datasets.epfl.ch