Commit 54d2576f authored by Ross Girshick's avatar Ross Girshick

RPN layers, Faster R-CNN training, misc improvements

parent b0758d0a
*.pyc
.ipynb_checkpoints
utils/*.c
utils/*.so
lib/build
Fast R-CNN
Faster R-CNN
Copyright (c) Microsoft Corporation
The MIT License (MIT)
Copyright (c) 2015 Microsoft Corporation
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
************************************************************************
THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
This project, Faster R-CNN, incorporates material from the project(s)
listed below (collectively, "Third Party Code"). Microsoft is not the
original author of the Third Party Code. The original copyright notice
and license under which Microsoft received such Third Party Code are set
out below. This Third Party Code is licensed to you under their original
license terms set forth below. Microsoft reserves all other rights not
expressly granted, whether by implication, estoppel or otherwise.
1. Caffe, (https://github.com/BVLC/caffe/)
COPYRIGHT
All contributions by the University of California:
Copyright (c) 2014, 2015, The Regents of the University of California (Regents)
All rights reserved.
MIT License
All other contributions:
Copyright (c) 2014, 2015, the respective contributors
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
Caffe uses a shared copyright model: each contributor holds copyright
over their contributions to Caffe. The project versioning records all
such contribution and copyright details. If a contributor wants to
further mark their specific copyright on a particular contribution,
they should indicate their copyright solely in the commit message of
the change when it is committed.
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
The BSD 2-Clause License
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
************END OF THIRD-PARTY SOFTWARE NOTICES AND INFORMATION**********
This diff is collapsed.
Subproject commit bcd9b4eadc7d8fbc433aeefd564e82ec63aaf69c
Subproject commit 4115385deb3b907fcd428ac0ab53b694d741a3c4
This directory holds (*after you download them*):
- Pre-computed object proposals
- Caffe models pre-trained on ImageNet
- Fast R-CNN models
- Faster R-CNN models
- Symlinks to datasets
To download precomputed Selective Search proposals for PASCAL VOC 2007 and 2012, run:
```
./data/scripts/fetch_selective_search_data.sh
```
This script will populate `data/selective_search_data`.
To download Caffe models (CaffeNet, VGG_CNN_M_1024, VGG16) pre-trained on ImageNet, run:
To download Caffe models (ZF, VGG16) pre-trained on ImageNet, run:
```
./data/scripts/fetch_imagenet_models.sh
......@@ -20,13 +11,13 @@ To download Caffe models (CaffeNet, VGG_CNN_M_1024, VGG16) pre-trained on ImageN
This script will populate `data/imagenet_models`.
To download Fast R-CNN models trained on VOC 2007, run:
To download Faster R-CNN models trained on VOC 2007, run:
```
./data/scripts/fetch_fast_rcnn_models.sh
./data/scripts/fetch_faster_rcnn_models.sh
```
This script will populate `data/fast_rcnn_models`.
This script will populate `data/faster_rcnn_models`.
In order to train and test with PASCAL VOC, you will need to establish symlinks.
From the `data` directory (`cd data`):
......@@ -39,7 +30,7 @@ ln -s /your/path/to/VOC2007/VOCdevkit VOCdevkit2007
ln -s /your/path/to/VOC2012/VOCdevkit VOCdevkit2012
```
Since you'll likely be experimenting with multiple installs of Fast R-CNN in
Since you'll likely be experimenting with multiple installs of Fast/er R-CNN in
parallel, you'll probably want to keep all of this data in a shared place and
use symlinks. On my system I create the following symlinks inside `data`:
......@@ -51,6 +42,7 @@ ln -s /data/fast_rcnn_shared/cache
ln -s /data/fast_rcnn_shared/imagenet_models
# move the selective search data to a shared location and symlink to them
# (only applicable to Fast R-CNN training)
ln -s /data/fast_rcnn_shared/selective_search_data
ln -s /data/VOC2007/VOCdevkit VOCdevkit2007
......
......@@ -3,9 +3,9 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../" && pwd )"
cd $DIR
FILE=fast_rcnn_models.tgz
URL=http://www.cs.berkeley.edu/~rbg/fast-rcnn-data/$FILE
CHECKSUM=5f7dde9f5376e18c8e065338cc5df3f7
FILE=faster_rcnn_models.tgz
URL=http://www.cs.berkeley.edu/~rbg/faster-rcnn-data/$FILE
CHECKSUM=ac116844f66aefe29587214272054668
if [ -f $FILE ]; then
echo "File already exists. Checking md5..."
......@@ -23,7 +23,7 @@ if [ -f $FILE ]; then
fi
fi
echo "Downloading Fast R-CNN demo models (0.96G)..."
echo "Downloading Faster R-CNN demo models (695M)..."
wget $URL -O $FILE
......
......@@ -4,8 +4,8 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../" && pwd )"
cd $DIR
FILE=imagenet_models.tgz
URL=http://www.cs.berkeley.edu/~rbg/fast-rcnn-data/$FILE
CHECKSUM=8b1d4b9da0593fc70ef403284f810adc
URL=http://www.cs.berkeley.edu/~rbg/faster-rcnn-data/$FILE
CHECKSUM=ed34ca912d6782edfb673a8c3a0bda6d
if [ -f $FILE ]; then
echo "File already exists. Checking md5..."
......
Scripts to reproduce (most) of the experiments in the paper.
Scripts are under `experiments/scripts`.
Each script saves a log file under `experiments/logs`.
......
EXP_DIR: faster_rcnn_alt_opt
TEST:
HAS_RPN: True
EXP_DIR: faster_rcnn_end2end
TRAIN:
HAS_RPN: True
IMS_PER_BATCH: 1
BBOX_NORMALIZE_TARGETS_PRECOMPUTED: True
RPN_POSITIVE_OVERLAP: 0.7
RPN_BATCHSIZE: 256
PROPOSAL_METHOD: gt
TEST:
HAS_RPN: True
EXP_DIR: fc_only
TRAIN:
SNAPSHOT_INFIX: fc_only
EXP_DIR: multiscale
TRAIN:
SCALES: !!python/tuple [480, 576, 688, 864, 1200]
MAX_SIZE: 2000
SNAPSHOT_INFIX: multiscale
TEST:
SCALES: !!python/tuple [480, 576, 688, 864, 1200]
MAX_SIZE: 2000
EXP_DIR: "no_bbox_reg"
TRAIN:
BBOX_REG: False
SNAPSHOT_INFIX: no_bbox_reg
TEST:
BBOX_REG: False
EXP_DIR: piecewise
TRAIN:
SNAPSHOT_INFIX: piecewise
EXP_DIR: svm
TRAIN:
# don't use flipped examples when training SVMs for two reasons:
# 1) R-CNN didn't
# 2) I've tried and it doesn't help, yet makes SVM training take 2x longer
USE_FLIPPED: False
TEST:
SVM: True
#!/bin/bash
set -e
GPU=$1
NET=caffenet
./experiments/scripts/default_${NET}.sh $GPU
./experiments/scripts/multiscale_${NET}.sh $GPU
./experiments/scripts/multitask_no_bbox_reg_${NET}.sh $GPU
./experiments/scripts/no_bbox_reg_${NET}.sh $GPU
./experiments/scripts/piecewise_${NET}.sh $GPU
./experiments/scripts/svd_${NET}.sh $GPU
./experiments/scripts/svm_${NET}.sh $GPU
#!/bin/bash
set -e
GPU=$1
NET=vgg16
./experiments/scripts/default_${NET}.sh $GPU
./experiments/scripts/fc_only_${NET}.sh $GPU
./experiments/scripts/multitask_no_bbox_reg_${NET}.sh $GPU
./experiments/scripts/no_bbox_reg_${NET}.sh $GPU
./experiments/scripts/piecewise_${NET}.sh $GPU
./experiments/scripts/svd_${NET}.sh $GPU
./experiments/scripts/svm_${NET}.sh $GPU
#!/bin/bash
set -e
GPU=$1
NET=vgg_cnn_m_1024
./experiments/scripts/default_${NET}.sh $GPU
./experiments/scripts/multiscale_${NET}.sh $GPU
./experiments/scripts/multitask_no_bbox_reg_${NET}.sh $GPU
./experiments/scripts/no_bbox_reg_${NET}.sh $GPU
./experiments/scripts/piecewise_${NET}.sh $GPU
./experiments/scripts/svd_${NET}.sh $GPU
./experiments/scripts/svm_${NET}.sh $GPU
#!/bin/bash
set -x
set -e
export PYTHONUNBUFFERED="True"
LOG="experiments/logs/default_caffenet.txt.`date +'%Y-%m-%d_%H-%M-%S'`"
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/train_net.py --gpu $1 \
--solver models/CaffeNet/solver.prototxt \
--weights data/imagenet_models/CaffeNet.v2.caffemodel \
--imdb voc_2007_trainval
time ./tools/test_net.py --gpu $1 \
--def models/CaffeNet/test.prototxt \
--net output/default/voc_2007_trainval/caffenet_fast_rcnn_iter_40000.caffemodel \
--imdb voc_2007_test
#!/bin/bash
set -x
set -e
export PYTHONUNBUFFERED="True"
LOG="experiments/logs/default_vgg16.txt.`date +'%Y-%m-%d_%H-%M-%S'`"
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/train_net.py --gpu $1 \
--solver models/VGG16/solver.prototxt \
--weights data/imagenet_models/VGG16.v2.caffemodel \
--imdb voc_2007_trainval
time ./tools/test_net.py --gpu $1 \
--def models/VGG16/test.prototxt \
--net output/default/voc_2007_trainval/vgg16_fast_rcnn_iter_40000.caffemodel \
--imdb voc_2007_test
#!/bin/bash
set -x
set -e
export PYTHONUNBUFFERED="True"
LOG="experiments/logs/default_vgg_cnn_m_1024.txt.`date +'%Y-%m-%d_%H-%M-%S'`"
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/train_net.py --gpu $1 \
--solver models/VGG_CNN_M_1024/solver.prototxt \
--weights data/imagenet_models/VGG_CNN_M_1024.v2.caffemodel \
--imdb voc_2007_trainval
time ./tools/test_net.py --gpu $1 \
--def models/VGG_CNN_M_1024/test.prototxt \
--net output/default/voc_2007_trainval/vgg_cnn_m_1024_fast_rcnn_iter_40000.caffemodel \
--imdb voc_2007_test
#!/bin/bash
# Usage:
# ./experiments/scripts/default.sh GPU NET [options args to {train,test}_net.py]
# Example:
# ./experiments/scripts/default.sh 0 CaffeNet \
# --set EXP_DIR foobar RNG_SEED 42 TRAIN.SCALES "[400, 500, 600, 700]"
set -x
set -e
export PYTHONUNBUFFERED="True"
GPU_ID=$1
NET=$2
NET_lc=${NET,,}
array=( $@ )
len=${#array[@]}
EXTRA_ARGS=${array[@]:2:$len}
EXTRA_ARGS_SLUG=${EXTRA_ARGS// /_}
LOG="experiments/logs/default_${NET}_${EXTRA_ARGS_SLUG}.txt.`date +'%Y-%m-%d_%H-%M-%S'`"
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/train_net.py --gpu ${GPU_ID} \
--solver models/${NET}/fast_rcnn/solver.prototxt \
--weights data/imagenet_models/${NET}.v2.caffemodel \
--imdb voc_2007_trainval \
${EXTRA_ARGS}
set +x
NET_FINAL=`grep -B 1 "done solving" ${LOG} | grep "Wrote snapshot" | awk '{print $4}'`
set -x
time ./tools/test_net.py --gpu ${GPU_ID} \
--def models/${NET}/fast_rcnn/test.prototxt \
--net ${NET_FINAL} \
--imdb voc_2007_test \
${EXTRA_ARGS}
#!/bin/bash
# Usage:
# ./experiments/scripts/default_faster_rcnn_alt_opt.sh GPU NET [--set ...]
# Example:
# ./experiments/scripts/default_faster_rcnn_alt_opt.sh 0 ZF \
# --set EXP_DIR foobar RNG_SEED 42 TRAIN.SCALES "[400,500,600,700]"
set -x
set -e
export PYTHONUNBUFFERED="True"
GPU_ID=$1
NET=$2
NET_lc=${NET,,}
array=( $@ )
len=${#array[@]}
EXTRA_ARGS=${array[@]:2:$len}
EXTRA_ARGS_SLUG=${EXTRA_ARGS// /_}
LOG="experiments/logs/faster_rcnn_alt_opt_${NET}_${EXTRA_ARGS_SLUG}.txt.`date +'%Y-%m-%d_%H-%M-%S'`"
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/train_faster_rcnn_alt_opt.py --gpu ${GPU_ID} \
--net_name ${NET} \
--weights data/imagenet_models/${NET}.v2.caffemodel \
--imdb voc_2007_trainval \
--cfg experiments/cfgs/faster_rcnn_alt_opt.yml \
${EXTRA_ARGS}
set +x
NET_FINAL=`grep "Final model:" ${LOG} | awk '{print $3}'`
set -x
time ./tools/test_net.py --gpu ${GPU_ID} \
--def models/${NET}/faster_rcnn_alt_opt/faster_rcnn_test.pt \
--net ${NET_FINAL} \
--imdb voc_2007_test \
--cfg experiments/cfgs/faster_rcnn_alt_opt.yml \
${EXTRA_ARGS}
#!/bin/bash
set -x
set -e
export PYTHONUNBUFFERED="True"
LOG="experiments/logs/fc_only_vgg16.txt.`date +'%Y-%m-%d_%H-%M-%S'`"
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/train_net.py --gpu $1 \
--solver models/VGG16/fc_only/solver.prototxt \
--weights data/imagenet_models/VGG16.v2.caffemodel \
--imdb voc_2007_trainval \
--cfg experiments/cfgs/fc_only.yml
time ./tools/test_net.py --gpu $1 \
--def models/VGG16/test.prototxt \
--net output/fc_only/voc_2007_trainval/vgg16_fast_rcnn_fc_only_iter_40000.caffemodel \
--imdb voc_2007_test \
--cfg experiments/cfgs/fc_only.yml
#!/bin/bash
set -x
set -e
export PYTHONUNBUFFERED="True"
LOG="experiments/logs/multiscale_caffenet.txt.`date +'%Y-%m-%d_%H-%M-%S'`"
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/train_net.py --gpu $1 \
--solver models/CaffeNet/solver.prototxt \
--weights data/imagenet_models/CaffeNet.v2.caffemodel \
--imdb voc_2007_trainval \
--cfg experiments/cfgs/multiscale.yml
time ./tools/test_net.py --gpu $1 \
--def models/CaffeNet/test.prototxt \
--net output/multiscale/voc_2007_trainval/caffenet_fast_rcnn_multiscale_iter_40000.caffemodel \
--imdb voc_2007_test \
--cfg experiments/cfgs/multiscale.yml
#!/bin/bash
set -x
set -e
export PYTHONUNBUFFERED="True"
LOG="experiments/logs/multiscale_vgg_cnn_m_1024.txt.`date +'%Y-%m-%d_%H-%M-%S'`"
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/train_net.py --gpu $1 \
--solver models/VGG_CNN_M_1024/solver.prototxt \
--weights data/imagenet_models/VGG_CNN_M_1024.v2.caffemodel \
--imdb voc_2007_trainval \
--cfg experiments/cfgs/multiscale.yml
time ./tools/test_net.py --gpu $1 \
--def models/VGG_CNN_M_1024/test.prototxt \
--net output/multiscale/voc_2007_trainval/vgg_cnn_m_1024_fast_rcnn_multiscale_iter_40000.caffemodel \
--imdb voc_2007_test \
--cfg experiments/cfgs/multiscale.yml
#!/bin/bash
set -x
set -e
export PYTHONUNBUFFERED="True"
LOG="experiments/logs/multitask_no_bbox_reg_caffenet.txt.`date +'%Y-%m-%d_%H-%M-%S'`"
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/test_net.py --gpu $1 \
--def models/CaffeNet/test.prototxt \
--net output/default/voc_2007_trainval/caffenet_fast_rcnn_iter_40000.caffemodel \
--imdb voc_2007_test \
--cfg experiments/cfgs/no_bbox_reg.yml
#!/bin/bash
set -x
set -e
export PYTHONUNBUFFERED="True"
LOG="experiments/logs/multitask_no_bbox_reg_vgg16.txt.`date +'%Y-%m-%d_%H-%M-%S'`"
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/test_net.py --gpu $1 \
--def models/VGG16/test.prototxt \
--net output/default/voc_2007_trainval/vgg16_fast_rcnn_iter_40000.caffemodel \
--imdb voc_2007_test \
--cfg experiments/cfgs/no_bbox_reg.yml
#!/bin/bash
set -x
set -e
export PYTHONUNBUFFERED="True"
LOG="experiments/logs/multitask_no_bbox_reg_vgg_cnn_m_1024.txt.`date +'%Y-%m-%d_%H-%M-%S'`"
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/test_net.py --gpu $1 \
--def models/VGG_CNN_M_1024/test.prototxt \
--net output/default/voc_2007_trainval/vgg_cnn_m_1024_fast_rcnn_iter_40000.caffemodel \
--imdb voc_2007_test \
--cfg experiments/cfgs/no_bbox_reg.yml
#!/bin/bash
set -x
set -e
export PYTHONUNBUFFERED="True"
LOG="experiments/logs/no_bbox_reg_caffenet.txt.`date +'%Y-%m-%d_%H-%M-%S'`"
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/train_net.py --gpu $1 \
--solver models/CaffeNet/no_bbox_reg/solver.prototxt \
--weights data/imagenet_models/CaffeNet.v2.caffemodel \
--imdb voc_2007_trainval \
--cfg experiments/cfgs/no_bbox_reg.yml
time ./tools/test_net.py --gpu $1 \
--def models/CaffeNet/no_bbox_reg/test.prototxt \
--net output/no_bbox_reg/voc_2007_trainval/caffenet_fast_rcnn_no_bbox_reg_iter_40000.caffemodel \
--imdb voc_2007_test \
--cfg experiments/cfgs/no_bbox_reg.yml
#!/bin/bash
set -x
set -e
export PYTHONUNBUFFERED="True"
LOG="experiments/logs/no_bbox_reg_vgg16.txt.`date +'%Y-%m-%d_%H-%M-%S'`"
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/train_net.py --gpu $1 \
--solver models/VGG16/no_bbox_reg/solver.prototxt \
--weights data/imagenet_models/VGG16.v2.caffemodel \
--imdb voc_2007_trainval \
--cfg experiments/cfgs/no_bbox_reg.yml
time ./tools/test_net.py --gpu $1 \
--def models/VGG16/no_bbox_reg/test.prototxt \
--net output/no_bbox_reg/voc_2007_trainval/vgg16_fast_rcnn_no_bbox_reg_iter_40000.caffemodel \
--imdb voc_2007_test \
--cfg experiments/cfgs/no_bbox_reg.yml
#!/bin/bash
set -x
set -e
export PYTHONUNBUFFERED="True"
LOG="experiments/logs/no_bbox_reg_vgg_cnn_m_1024.txt.`date +'%Y-%m-%d_%H-%M-%S'`"
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/train_net.py --gpu $1 \
--solver models/VGG_CNN_M_1024/no_bbox_reg/solver.prototxt \
--weights data/imagenet_models/VGG_CNN_M_1024.v2.caffemodel \
--imdb voc_2007_trainval \
--cfg experiments/cfgs/no_bbox_reg.yml
time ./tools/test_net.py --gpu $1 \
--def models/VGG_CNN_M_1024/no_bbox_reg/test.prototxt \
--net output/no_bbox_reg/voc_2007_trainval/vgg_cnn_m_1024_fast_rcnn_no_bbox_reg_iter_40000.caffemodel \
--imdb voc_2007_test \
--cfg experiments/cfgs/no_bbox_reg.yml
#!/bin/bash
set -x
set -e
export PYTHONUNBUFFERED="True"
LOG="experiments/logs/piecewise_caffenet.txt.`date +'%Y-%m-%d_%H-%M-%S'`"
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/train_net.py --gpu $1 \
--solver models/CaffeNet/piecewise/solver.prototxt \
--weights output/no_bbox_reg/voc_2007_trainval/caffenet_fast_rcnn_no_bbox_reg_iter_40000.caffemodel \
--imdb voc_2007_trainval \
--cfg experiments/cfgs/piecewise.yml
time ./tools/test_net.py --gpu $1 \
--def models/CaffeNet/test.prototxt \
--net outpu