-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpreprocessing.sh
More file actions
executable file
·59 lines (47 loc) · 1.64 KB
/
preprocessing.sh
File metadata and controls
executable file
·59 lines (47 loc) · 1.64 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
set -e
echo "=========================================="
echo "YCB Dataset Download & Preparation Script"
echo "=========================================="
if ! command -v gdown &> /dev/null; then
echo "Installing gdown..."
pip install gdown
fi
if ! command -v unzip &> /dev/null; then
echo "Installing unzip..."
apt-get update && apt-get install -y unzip
fi
BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
DATA_DIR="${BASE_DIR}/data"
mkdir -p "${DATA_DIR}"
cd "${DATA_DIR}"
echo ""
echo "Data directory: ${DATA_DIR}"
echo ""
# Download Real Data
echo "Downloading YCBSight-Real-Reorganized.zip..."
REAL_FILE_ID="1GWT7qZBtIc4_5yzX7AajSAbD991e3PjU"
gdown "https://drive.google.com/uc?id=${REAL_FILE_ID}" -O YCBSight-Real-Reorganized.zip
# Download Sim Train
echo "Downloading YCBSight-Sim-Reorganized-train.zip..."
SIM_TRAIN_FILE_ID="1wXsODxrkDzlSMO2p6rqe-SpvYvUmEQTu"
gdown "https://drive.google.com/uc?id=${SIM_TRAIN_FILE_ID}" -O YCBSight-Sim-Reorganized-train.zip
# Download Sim Val
echo "Downloading YCBSight-Sim-Reorganized-val.zip..."
SIM_VAL_FILE_ID="1KPKzjl5acBs-m4MBlLWkO0KxxObwaPaP"
gdown "https://drive.google.com/uc?id=${SIM_VAL_FILE_ID}" -O YCBSight-Sim-Reorganized-val.zip
# Extract all zip files (replace existing files)
echo ""
echo "Extracting all datasets..."
for zip_file in *.zip; do
if [ -f "$zip_file" ]; then
echo " Extracting: $zip_file"
unzip -o -q "$zip_file"
echo " Done: $zip_file"
fi
done
echo ""
echo "=========================================="
echo "Download and extraction complete!"
echo "Data location: ${DATA_DIR}"
echo "=========================================="