forked from damaggu/TADP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrain_tadv_tsh_mpii.sh
executable file
·43 lines (38 loc) · 1.55 KB
/
train_tadv_tsh_mpii.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
PROJ_ROOT="/home/marco/dev/tadv"
SCRIPT="${PROJ_ROOT}/BEAR/benchmark/BEAR-Standard/tools/train.py"
CONFIG="${PROJ_ROOT}/custom_mm_configs/tadv_mm_config.py"
SOURCE=$1
TARGET=$2
if [ "$SOURCE" = "mpii" ]; then
DATA_ROOT="$PROJ_ROOT/BEAR/datasets/MPII-Cooking/frames/"
TRAIN_FILE="$PROJ_ROOT/BEAR/benchmark/BEAR-UDA/data/toyota_smarthome_mpii_cooking/mpii_cooking_da_train.csv"
fi
if [ "$SOURCE" = "tsh" ]; then
DATA_ROOT="$PROJ_ROOT/BEAR/datasets/ToyotaSmarthome/frames/"
TRAIN_FILE="$PROJ_ROOT/BEAR/benchmark/BEAR-UDA/data/toyota_smarthome_mpii_cooking/toyota_smarthome_da_train.csv"
fi
if [ "$TARGET" = "mpii" ]; then
DATA_ROOT_VAL="$PROJ_ROOT/BEAR/datasets/MPII-Cooking/frames/"
TEST_FILE="$PROJ_ROOT/BEAR/benchmark/BEAR-UDA/data/toyota_smarthome_mpii_cooking/mpii_cooking_da_test.csv"
fi
if [ "$TARGET" = "tsh" ]; then
DATA_ROOT_VAL="$PROJ_ROOT/BEAR/datasets/ToyotaSmarthome/frames/"
TEST_FILE="$PROJ_ROOT/BEAR/benchmark/BEAR-UDA/data/toyota_smarthome_mpii_cooking/toyota_smarthome_da_test.csv"
fi
timestamp=$(date +"%Y-%m-%d_%H_%M_%S")
WORK_DIR="${PROJ_ROOT}/out/tadv/$SOURCE-$TARGET/$timestamp"
mkdir $WORK_DIR
export PYTHONPATH="$(dirname $SCRIPT)/..":$PYTHONPATH
export CUDA_VISIBLE_DEVICES=$3
python $SCRIPT $CONFIG \
--validate \
--test-last \
--cfg-options \
data.train.data_prefix=$DATA_ROOT \
data.train.ann_file=$TRAIN_FILE \
data.val.data_prefix=$DATA_ROOT_VAL \
data.val.ann_file=$TEST_FILE \
data.test.data_prefix=$DATA_ROOT_VAL \
data.test.ann_file=$TEST_FILE \
work_dir=$WORK_DIR