nuscenes_unzip.sh 531 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env bash

DOWNLOAD_DIR=$1  # The directory where the downloaded data set is stored
DATA_ROOT=$2  # The root directory of the converted dataset

for split in $DOWNLOAD_DIR/nuScenes/raw/*; do
    for tgz_file in $split/*; do
        if [[ $tgz_file == *.tgz ]]
        then
            echo "Unzipping $tgz_file to $DATA_ROOT ......"
            unzip -oq $tgz_file -d $DATA_ROOT/
            echo "[Done] Unzip $tgz_file to $DATA_ROOT"
        fi
        # delete the original files
        rm -f $tgz_file
    done
done