forked from saeid-h/bts-fully-tf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init_kitti_files.sh
20 lines (20 loc) · 1.12 KB
/
init_kitti_files.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
rm -r sample_data/
mkdir dataset
mkdir dataset/kitti
# Install dependencies for parallel downloading and unzipping
apt-get install dos2unix parallel
# Download the official KITTI depth maps used in the paper
wget https://s3.eu-central-1.amazonaws.com/avg-kitti/data_depth_annotated.zip
unzip -q data_depth_annotated.zip -d ./dataset/kitti/
# Remove original zip file and unused images to save >20GB disk space
rm data_depth_annotated.zip
rm -rf dataset/kitti/*/*/*/*/image_03/
# Strip unnecessary line feeds from KITTI image archive list
dos2unix kitti_archives_to_download.txt
# Only unzip used image types and delete orginal zip files to save >100GB disk space
cat kitti_archives_to_download.txt | parallel --compress "wget -nv {} && unzip -q {/} '*/{/.}/image_02/*' -d ./dataset/kitti/ && rm {/}"
# Unzip calibration files which don't have 'image_02' directories in the archive
ls *calib.zip | parallel 'unzip {/} -d ./dataset/kitti/ && rm {/}'
# Merge KITTI ground truth depth maps together into one directory
mkdir dataset/kitti/data_depth_annotated/
mv ./dataset/kitti/train/* ./dataset/kitti/val/* ./dataset/kitti/data_depth_annotated/