#!/bin/bash # Usage: # ./experiments/scripts/default_faster_rcnn.sh GPU NET [--set ...] # Example: # ./experiments/scripts/default_faster_rcnn.sh 0 ZF \ # --set EXP_DIR foobar RNG_SEED 42 TRAIN.SCALES "[400,500,600,700]" #This is for VKF dataset!!! set -x set -e export PYTHONUNBUFFERED="True" GPU_ID=$1 NET=$2 NET_lc=${NET,,} ITERS=190000 DATASET_TRAIN=kitti_kittitrain DATASET_TEST=kitti_kittitest SOLVER=models/pvanet/example_train_384/solver.prototxt #NET_INIT=models/pvanet/full/test.model NET_INIT=models/pvanet/imagenet/original.model array=( $@ ) len=${#array[@]} EXTRA_ARGS=${array[@]:2:$len} EXTRA_ARGS_SLUG=${EXTRA_ARGS// /_} LOG="experiments/logs/PVANET_${NET}_${EXTRA_ARGS_SLUG}.txt.`date +'%Y-%m-%d_%H-%M-%S'`" exec &> >(tee -a "$LOG") echo Logging output to "$LOG" time python ./tools/train_net.py --gpu ${GPU_ID} \ --solver ${SOLVER} \ --weights ${NET_INIT} \ --imdb ${DATASET_TRAIN} \ --iters ${ITERS} \ --cfg models/pvanet/cfgs/train.yml \ ${EXTRA_ARGS} # --weights ${NET_INIT} \ set +x NET_FINAL=`grep -B 1 "done solving" ${LOG} | grep "Wrote snapshot" | awk '{print $4}'` set -x time python ./tools/test_net.py --gpu ${GPU_ID} \ --def models/pvanet/example_train_384/test.prototxt \ --net ${NET_FINAL} \ --imdb ${DATASET_TEST} \ --cfg models/pvanet/cfgs/submit_160715.yml \ ${EXTRA_ARGS}