forked from endernewton/tf-faster-rcnn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
806 additions
and
28,325 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
EXP_DIR: res101 | ||
TRAIN: | ||
HAS_RPN: True | ||
IMS_PER_BATCH: 1 | ||
BBOX_NORMALIZE_TARGETS_PRECOMPUTED: True | ||
RPN_POSITIVE_OVERLAP: 0.7 | ||
RPN_BATCHSIZE: 256 | ||
PROPOSAL_METHOD: gt | ||
BG_THRESH_LO: 0.0 | ||
DISPLAY: 20 | ||
BATCH_SIZE: 256 | ||
TEST: | ||
HAS_RPN: True | ||
POOLING_MODE: crop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#!/bin/bash | ||
|
||
set -x | ||
set -e | ||
|
||
export PYTHONUNBUFFERED="True" | ||
|
||
GPU_ID=$1 | ||
DATASET=$2 | ||
NET=$3 | ||
|
||
array=( $@ ) | ||
len=${#array[@]} | ||
EXTRA_ARGS=${array[@]:3:$len} | ||
EXTRA_ARGS_SLUG=${EXTRA_ARGS// /_} | ||
|
||
case ${DATASET} in | ||
pascal_voc) | ||
TRAIN_IMDB="voc_2007_trainval" | ||
TEST_IMDB="voc_2007_test" | ||
ITERS=70000 | ||
;; | ||
pascal_voc_0712) | ||
TRAIN_IMDB="voc_2007_trainval+voc_2012_trainval" | ||
TEST_IMDB="voc_2007_test" | ||
ITERS=25000 | ||
;; | ||
coco) | ||
TRAIN_IMDB="coco_2014_train+coco_2014_valminusminival" | ||
TEST_IMDB="coco_2014_minival" | ||
ITERS=490000 | ||
;; | ||
*) | ||
echo "No dataset given" | ||
exit | ||
;; | ||
esac | ||
|
||
LOG="experiments/logs/test_${NET}_${TRAIN_IMDB}_${EXTRA_ARGS_SLUG}.txt.`date +'%Y-%m-%d_%H-%M-%S'`" | ||
exec &> >(tee -a "$LOG") | ||
echo Logging output to "$LOG" | ||
|
||
set +x | ||
if [[ ! -z ${EXTRA_ARGS_SLUG} ]]; then | ||
NET_FINAL=output/${NET}/${TRAIN_IMDB}/${EXTRA_ARGS_SLUG}/${NET}_faster_rcnn_iter_${ITERS}.ckpt | ||
else | ||
NET_FINAL=output/${NET}/${TRAIN_IMDB}/default/${NET}_faster_rcnn_iter_${ITERS}.ckpt | ||
fi | ||
set -x | ||
|
||
if [[ ! -z ${EXTRA_ARGS_SLUG} ]]; then | ||
CUDA_VISIBLE_DEVICES=${GPU_ID} time python ./tools/test_net.py \ | ||
--imdb ${TEST_IMDB} \ | ||
--weight data/imagenet_weights/${NET}.weights \ | ||
--model ${NET_FINAL} \ | ||
--cfg experiments/cfgs/${NET}.yml \ | ||
--tag ${EXTRA_ARGS_SLUG} \ | ||
--net ${NET} \ | ||
--set ${EXTRA_ARGS} | ||
else | ||
CUDA_VISIBLE_DEVICES=${GPU_ID} time python ./tools/test_net.py \ | ||
--imdb ${TEST_IMDB} \ | ||
--weight data/imagenet_weights/${NET}.weights \ | ||
--model ${NET_FINAL} \ | ||
--cfg experiments/cfgs/${NET}.yml \ | ||
--net ${NET} \ | ||
--set ${EXTRA_ARGS} | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#!/bin/bash | ||
|
||
set -x | ||
set -e | ||
|
||
export PYTHONUNBUFFERED="True" | ||
|
||
GPU_ID=$1 | ||
DATASET=$2 | ||
NET=$3 | ||
|
||
array=( $@ ) | ||
len=${#array[@]} | ||
EXTRA_ARGS=${array[@]:3:$len} | ||
EXTRA_ARGS_SLUG=${EXTRA_ARGS// /_} | ||
|
||
case ${DATASET} in | ||
pascal_voc) | ||
TRAIN_IMDB="voc_2007_trainval" | ||
TEST_IMDB="voc_2007_test" | ||
STEPSIZE=50000 | ||
ITERS=70000 | ||
;; | ||
pascal_voc_0712) | ||
TRAIN_IMDB="voc_2007_trainval+voc_2012_trainval" | ||
TEST_IMDB="voc_2007_test" | ||
STEPSIZE=50000 | ||
ITERS=70000 | ||
;; | ||
coco) | ||
TRAIN_IMDB="coco_2014_train+coco_2014_valminusminival" | ||
TEST_IMDB="coco_2014_minival" | ||
STEPSIZE=350000 | ||
ITERS=490000 | ||
;; | ||
*) | ||
echo "No dataset given" | ||
exit | ||
;; | ||
esac | ||
|
||
LOG="experiments/logs/${NET}_${TRAIN_IMDB}_${EXTRA_ARGS_SLUG}_${NET}.txt.`date +'%Y-%m-%d_%H-%M-%S'`" | ||
exec &> >(tee -a "$LOG") | ||
echo Logging output to "$LOG" | ||
|
||
set +x | ||
if [[ ! -z ${EXTRA_ARGS_SLUG} ]]; then | ||
NET_FINAL=output/${NET}/${TRAIN_IMDB}/${EXTRA_ARGS_SLUG}/${NET}_faster_rcnn_iter_${ITERS}.ckpt | ||
else | ||
NET_FINAL=output/${NET}/${TRAIN_IMDB}/default/${NET}_faster_rcnn_iter_${ITERS}.ckpt | ||
fi | ||
set -x | ||
|
||
if [ ! -f ${NET_FINAL}.index ]; then | ||
if [[ ! -z ${EXTRA_ARGS_SLUG} ]]; then | ||
CUDA_VISIBLE_DEVICES=${GPU_ID} time python ./tools/trainval_net.py \ | ||
--weight data/imagenet_weights/${NET}.ckpt \ | ||
--imdb ${TRAIN_IMDB} \ | ||
--imdbval ${TEST_IMDB} \ | ||
--iters ${ITERS} \ | ||
--cfg experiments/cfgs/${NET}.yml \ | ||
--tag ${EXTRA_ARGS_SLUG} \ | ||
--net ${NET} \ | ||
--set TRAIN.STEPSIZE ${STEPSIZE} ${EXTRA_ARGS} | ||
else | ||
CUDA_VISIBLE_DEVICES=${GPU_ID} time python ./tools/trainval_net.py \ | ||
--weight data/imagenet_weights/${NET}.ckpt \ | ||
--imdb ${TRAIN_IMDB} \ | ||
--imdbval ${TEST_IMDB} \ | ||
--iters ${ITERS} \ | ||
--cfg experiments/cfgs/${NET}.yml \ | ||
--net ${NET} \ | ||
--set TRAIN.STEPSIZE ${STEPSIZE} ${EXTRA_ARGS} | ||
fi | ||
fi | ||
|
||
./experiments/scripts/test_faster_rcnn.sh $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.