Commit 470cf95e authored by Ross Girshick's avatar Ross Girshick

cleanup script files

parent d30beb6f
#! /bin/bash
#!/bin/bash
set -x
set -e
export PYTHONUNBUFFERED="True"
# -----------------------------------------------------------------------------
LOG="experiments/logs/default_caffenet.txt.`date +'%Y-%m-%d_%H-%M-%S'`"
exec 3>&1 4>&2 &> >(tee -a "$LOG")
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/train_net.py --gpu $1 \
......@@ -18,7 +18,3 @@ 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
# restore stdout/err
exec 1>&3 2>&4
# -----------------------------------------------------------------------------
#! /bin/bash
#!/bin/bash
set -x
set -e
export PYTHONUNBUFFERED="True"
# -----------------------------------------------------------------------------
LOG="experiments/logs/default_vgg16.txt.`date +'%Y-%m-%d_%H-%M-%S'`"
exec 3>&1 4>&2 &> >(tee -a "$LOG")
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/train_net.py --gpu $1 \
......@@ -18,7 +18,3 @@ 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
# restore stdout/err
exec 1>&3 2>&4
# -----------------------------------------------------------------------------
#! /bin/bash
#!/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 3>&1 4>&2 &> >(tee -a "$LOG")
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/train_net.py --gpu $1 \
......@@ -18,7 +18,3 @@ 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
# restore stdout/err
exec 1>&3 2>&4
# -----------------------------------------------------------------------------
#! /bin/bash
#!/bin/bash
set -x
set -e
export PYTHONUNBUFFERED="True"
# -----------------------------------------------------------------------------
LOG="experiments/logs/multiscale_caffenet.txt.`date +'%Y-%m-%d_%H-%M-%S'`"
exec 3>&1 4>&2 &> >(tee -a "$LOG")
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/train_net.py --gpu $1 \
......@@ -20,7 +20,3 @@ time ./tools/test_net.py --gpu $1 \
--net output/multiscale/voc_2007_trainval/caffenet_fast_rcnn_multiscale_iter_40000.caffemodel \
--imdb voc_2007_test \
--cfg experiments/cfgs/multiscale.yml
# restore stdout/err
exec 1>&3 2>&4
# -----------------------------------------------------------------------------
#! /bin/bash
#!/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 3>&1 4>&2 &> >(tee -a "$LOG")
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/train_net.py --gpu $1 \
......@@ -20,7 +20,3 @@ time ./tools/test_net.py --gpu $1 \
--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
# restore stdout/err
exec 1>&3 2>&4
# -----------------------------------------------------------------------------
#! /bin/bash
#!/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 3>&1 4>&2 &> >(tee -a "$LOG")
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/test_net.py --gpu $1 \
......@@ -14,7 +14,3 @@ time ./tools/test_net.py --gpu $1 \
--net output/default/voc_2007_trainval/caffenet_fast_rcnn_iter_40000.caffemodel \
--imdb voc_2007_test \
--cfg experiments/cfgs/no_bbox_reg.yml
# restore stdout/err
exec 1>&3 2>&4
# -----------------------------------------------------------------------------
#! /bin/bash
#!/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 3>&1 4>&2 &> >(tee -a "$LOG")
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/test_net.py --gpu $1 \
......@@ -14,7 +14,3 @@ time ./tools/test_net.py --gpu $1 \
--net output/default/voc_2007_trainval/vgg16_fast_rcnn_iter_40000.caffemodel \
--imdb voc_2007_test \
--cfg experiments/cfgs/no_bbox_reg.yml
# restore stdout/err
exec 1>&3 2>&4
# -----------------------------------------------------------------------------
#! /bin/bash
#!/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 3>&1 4>&2 &> >(tee -a "$LOG")
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/test_net.py --gpu $1 \
......@@ -14,7 +14,3 @@ time ./tools/test_net.py --gpu $1 \
--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
# restore stdout/err
exec 1>&3 2>&4
# -----------------------------------------------------------------------------
#! /bin/bash
#!/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 3>&1 4>&2 &> >(tee -a "$LOG")
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/train_net.py --gpu $1 \
......@@ -20,7 +20,3 @@ time ./tools/test_net.py --gpu $1 \
--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
# restore stdout/err
exec 1>&3 2>&4
# -----------------------------------------------------------------------------
#! /bin/bash
#!/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 3>&1 4>&2 &> >(tee -a "$LOG")
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/train_net.py --gpu $1 \
......@@ -20,7 +20,3 @@ time ./tools/test_net.py --gpu $1 \
--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
# restore stdout/err
exec 1>&3 2>&4
# -----------------------------------------------------------------------------
#! /bin/bash
#!/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 3>&1 4>&2 &> >(tee -a "$LOG")
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/train_net.py --gpu $1 \
......@@ -20,7 +20,3 @@ time ./tools/test_net.py --gpu $1 \
--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
# restore stdout/err
exec 1>&3 2>&4
# -----------------------------------------------------------------------------
#! /bin/bash
#!/bin/bash
set -x
set -e
export PYTHONUNBUFFERED="True"
# -----------------------------------------------------------------------------
LOG="experiments/logs/piecewise_caffenet.txt.`date +'%Y-%m-%d_%H-%M-%S'`"
exec 3>&1 4>&2 &> >(tee -a "$LOG")
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/train_net.py --gpu $1 \
......@@ -20,7 +20,3 @@ time ./tools/test_net.py --gpu $1 \
--net output/piecewise/voc_2007_trainval/caffenet_fast_rcnn_piecewise_iter_40000.caffemodel \
--imdb voc_2007_test \
--cfg experiments/cfgs/piecewise.yml
# restore stdout/err
exec 1>&3 2>&4
# -----------------------------------------------------------------------------
#! /bin/bash
#!/bin/bash
set -x
set -e
export PYTHONUNBUFFERED="True"
# -----------------------------------------------------------------------------
LOG="experiments/logs/piecewise_vgg16.txt.`date +'%Y-%m-%d_%H-%M-%S'`"
exec 3>&1 4>&2 &> >(tee -a "$LOG")
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/train_net.py --gpu $1 \
......@@ -20,7 +20,3 @@ time ./tools/test_net.py --gpu $1 \
--net output/piecewise/voc_2007_trainval/vgg16_fast_rcnn_piecewise_iter_40000.caffemodel \
--imdb voc_2007_test \
--cfg experiments/cfgs/piecewise.yml
# restore stdout/err
exec 1>&3 2>&4
# -----------------------------------------------------------------------------
#! /bin/bash
#!/bin/bash
set -x
set -e
export PYTHONUNBUFFERED="True"
# -----------------------------------------------------------------------------
LOG="experiments/logs/piecewise_vgg_cnn_m_1024.txt.`date +'%Y-%m-%d_%H-%M-%S'`"
exec 3>&1 4>&2 &> >(tee -a "$LOG")
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/train_net.py --gpu $1 \
......@@ -20,7 +20,3 @@ time ./tools/test_net.py --gpu $1 \
--net output/piecewise/voc_2007_trainval/vgg_cnn_m_1024_fast_rcnn_piecewise_iter_40000.caffemodel \
--imdb voc_2007_test \
--cfg experiments/cfgs/piecewise.yml
# restore stdout/err
exec 1>&3 2>&4
# -----------------------------------------------------------------------------
#! /bin/bash
#!/bin/bash
set -x
set -e
export PYTHONUNBUFFERED="True"
# -----------------------------------------------------------------------------
LOG="experiments/logs/svd_caffenet.txt.`date +'%Y-%m-%d_%H-%M-%S'`"
exec 3>&1 4>&2 &> >(tee -a "$LOG")
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/compress_net.py \
......@@ -18,7 +18,3 @@ time ./tools/test_net.py --gpu $1 \
--def models/CaffeNet/compressed/test.prototxt \
--net output/default/voc_2007_trainval/caffenet_fast_rcnn_iter_40000_svd_fc6_1024_fc7_256.caffemodel \
--imdb voc_2007_test
# restore stdout/err
exec 1>&3 2>&4
# -----------------------------------------------------------------------------
#! /bin/bash
#!/bin/bash
set -x
set -e
export PYTHONUNBUFFERED="True"
# -----------------------------------------------------------------------------
LOG="experiments/logs/svd_vgg16.txt.`date +'%Y-%m-%d_%H-%M-%S'`"
exec 3>&1 4>&2 &> >(tee -a "$LOG")
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/compress_net.py \
......@@ -18,7 +18,3 @@ time ./tools/test_net.py --gpu $1 \
--def models/VGG16/compressed/test.prototxt \
--net output/default/voc_2007_trainval/vgg16_fast_rcnn_iter_40000_svd_fc6_1024_fc7_256.caffemodel \
--imdb voc_2007_test
# restore stdout/err
exec 1>&3 2>&4
# -----------------------------------------------------------------------------
#! /bin/bash
set -x
set -e
export PYTHONUNBUFFERED="True"
# -----------------------------------------------------------------------------
LOG="experiments/logs/svd_vgg_cnn_m_1024.txt.`date +'%Y-%m-%d_%H-%M-%S'`"
exec 3>&1 4>&2 &> >(tee -a "$LOG")
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/compress_net.py \
......@@ -18,7 +18,3 @@ time ./tools/test_net.py --gpu $1 \
--def models/VGG_CNN_M_1024/compressed/test.prototxt \
--net output/default/voc_2007_trainval/vgg_cnn_m_1024_fast_rcnn_iter_40000_svd_fc6_1024_fc7_256.caffemodel \
--imdb voc_2007_test
# restore stdout/err
exec 1>&3 2>&4
# -----------------------------------------------------------------------------
#! /bin/bash
#!/bin/bash
set -x
set -e
export PYTHONUNBUFFERED="True"
# -----------------------------------------------------------------------------
LOG="experiments/logs/svm_caffenet.txt.`date +'%Y-%m-%d_%H-%M-%S'`"
exec 3>&1 4>&2 &> >(tee -a "$LOG")
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/train_svms.py --gpu $1 \
......@@ -20,7 +20,3 @@ time ./tools/test_net.py --gpu $1 \
--net output/default/voc_2007_trainval/caffenet_fast_rcnn_iter_40000_svm.caffemodel \
--imdb voc_2007_test \
--cfg experiments/cfgs/svm.yml
# restore stdout/err
exec 1>&3 2>&4
# -----------------------------------------------------------------------------
#! /bin/bash
#!/bin/bash
set -x
set -e
export PYTHONUNBUFFERED="True"
# -----------------------------------------------------------------------------
LOG="experiments/logs/svm_vgg16.txt.`date +'%Y-%m-%d_%H-%M-%S'`"
exec 3>&1 4>&2 &> >(tee -a "$LOG")
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/train_svms.py --gpu $1 \
......@@ -20,7 +20,3 @@ time ./tools/test_net.py --gpu $1 \
--net output/default/voc_2007_trainval/vgg16_fast_rcnn_iter_40000_svm.caffemodel \
--imdb voc_2007_test \
--cfg experiments/cfgs/svm.yml
# restore stdout/err
exec 1>&3 2>&4
# -----------------------------------------------------------------------------
#! /bin/bash
#!/bin/bash
set -x
set -e
export PYTHONUNBUFFERED="True"
# -----------------------------------------------------------------------------
LOG="experiments/logs/svm_vgg_cnn_m_1024.txt.`date +'%Y-%m-%d_%H-%M-%S'`"
exec 3>&1 4>&2 &> >(tee -a "$LOG")
exec &> >(tee -a "$LOG")
echo Logging output to "$LOG"
time ./tools/train_svms.py --gpu $1 \
......@@ -20,7 +20,3 @@ time ./tools/test_net.py --gpu $1 \
--net output/default/voc_2007_trainval/vgg_cnn_m_1024_fast_rcnn_iter_40000_svm.caffemodel \
--imdb voc_2007_test \
--cfg experiments/cfgs/svm.yml
# restore stdout/err
exec 1>&3 2>&4
# -----------------------------------------------------------------------------
......@@ -76,9 +76,7 @@ class RoIDataLayer(caffe.Layer):
self._name_to_top_map = {
'data': 0,
'rois': 1,
'labels': 2,
'bbox_targets': 3,
'bbox_loss_weights': 4}
'labels': 2}
# data blob: holds a batch of N images, each with 3 channels
# The height and width (100 x 100) are dummy values
......@@ -93,13 +91,17 @@ class RoIDataLayer(caffe.Layer):
# classes plus background
top[2].reshape(1)
# bbox_targets blob: R bounding-box regression targets with 4 targets
# per class
top[3].reshape(1, self._num_classes * 4)
if cfg.TRAIN.BBOX_REG:
self._name_to_top_map['bbox_targets'] = 3
self._name_to_top_map['bbox_loss_weights'] = 4
# bbox_loss_weights blob: At most 4 targets per roi are active; this
# binary vector sepcifies the subset of active targets
top[4].reshape(1, self._num_classes * 4)
# bbox_targets blob: R bounding-box regression targets with 4
# targets per class
top[3].reshape(1, self._num_classes * 4)
# bbox_loss_weights blob: At most 4 targets per roi are active;
# thisbinary vector sepcifies the subset of active targets
top[4].reshape(1, self._num_classes * 4)
def forward(self, bottom, top):
"""Get blobs and copy them into this layer's top blob vector."""
......
name: "CaffeNet"
input: "data"
input_shape {
dim: 1
dim: 3
dim: 227
dim: 227
}
input: "rois"
input_shape {
dim: 1 # to be changed on-the-fly to num ROIs
dim: 5 # [batch ind, x1, y1, x2, y2] zero-based indexing
}
input: "labels"
input_shape {
dim: 1 # to be changed on-the-fly to match num ROIs
layer {
name: 'data'
type: 'Python'
top: 'data'
top: 'rois'
top: 'labels'
python_param {
module: 'roi_data_layer.layer'
layer: 'RoIDataLayer'
param_str: "'num_classes': 21"
}
}
layer {
name: "conv1"
......
name: "CaffeNet"
input: "data"
input_shape {
dim: 1
dim: 3
dim: 227
dim: 227
}
input: "rois"
input_shape {
dim: 1 # to be changed on-the-fly to num ROIs
dim: 5 # [batch ind, x1, y1, x2, y2] zero-based indexing
}
input: "labels"
input_shape {
dim: 1 # to be changed on-the-fly to match num ROIs
}
input: "bbox_targets"
input_shape {
dim: 1 # to be changed on-the-fly to match num ROIs
dim: 84 # 4 * K (=21) classes
}
input: "bbox_loss_weights"
input_shape {
dim: 1 # to be changed on-the-fly to match num ROIs
dim: 84 # 4 * K (=21) classes
layer {
name: 'data'
type: 'Python'
top: 'data'
top: 'rois'
top: 'labels'
top: 'bbox_targets'
top: 'bbox_loss_weights'
python_param {
module: 'roi_data_layer.layer'
layer: 'RoIDataLayer'
param_str: "'num_classes': 21"
}
}
layer {
name: "conv1"
......
name: "VGG_ILSVRC_16_layers"
input: "data"
input_shape {
dim: 1
dim: 3
dim: 224
dim: 224
}
input: "rois"
input_shape {
dim: 1 # to be changed on-the-fly to num ROIs
dim: 5 # [batch ind, x1, y1, x2, y2] zero-based indexing
dim: 1
dim: 1
}
input: "labels"
input_shape {
dim: 1 # to be changed on-the-fly to match num ROIs
dim: 1
dim: 1
dim: 1
}
input: "bbox_targets"
input_shape {
dim: 1 # to be changed on-the-fly to match num ROIs
dim: 84 # 4 * K (=21) classes
dim: 1
dim: 1
}
input: "bbox_loss_weights"
input_shape {
dim: 1 # to be changed on-the-fly to match num ROIs
dim: 84 # 4 * K (=21) classes
dim: 1
dim: 1
}
layer {
name: 'data'
type: 'Python'
top: 'data'
top: 'rois'
top: 'labels'
top: 'bbox_targets'
top: 'bbox_loss_weights'
python_param {
module: 'roi_data_layer.layer'
layer: 'RoIDataLayer'
param_str: "'num_classes': 21"
}
}
layer {
name: "conv1_1"
type: "Convolution"
......
name: "VGG_ILSVRC_16_layers"
input: "data"
input_shape {
dim: 1
dim: 3
dim: 224
dim: 224
}
input: "rois"
input_shape {
dim: 1 # to be changed on-the-fly to num ROIs
dim: 5 # [batch ind, x1, y1, x2, y2] zero-based indexing
}
input: "labels"
input_shape {
dim: 1 # to be changed on-the-fly to match num ROIs
}
layer {
name: 'data'
type: 'Python'
top: 'data'
top: 'rois'
top: 'labels'
python_param {
module: 'roi_data_layer.layer'
layer: 'RoIDataLayer'
param_str: "'num_classes': 21"
}
}
layer {
name: "conv1_1"
type: "Convolution"
......
name: "VGG_ILSVRC_16_layers"
input: "data"
input_shape {
dim: 1
dim: 3
dim: 224
dim: 224
}
input: "rois"
input_shape {
dim: 1 # to be changed on-the-fly to num ROIs