Commit 2ef01a9c authored by Ross Girshick's avatar Ross Girshick

VGG16 name normalization

parent 3648893d
......@@ -21,13 +21,13 @@
Train a Fast R-CNN detector. For example, train a VGG 16 network on VOC 2007 trainval:
```
./tools/train_net.py --gpu 0 --solver models/VGG_16/solver.prototxt --weights /data/reference_caffe_nets/VGG_ILSVRC_16_layers.v2.caffemodel
./tools/train_net.py --gpu 0 --solver models/VGG16/solver.prototxt --weights data/imagenet_models/VGG16.v2.caffemodel
```
Test a Fast R-CNN detector. For example, test the VGG 16 network on VOC 2007 test:
```
./tools/test_net.py --gpu 1 --def models/VGG_16/test.prototxt --net snapshots/vgg16_fast_rcnn_iter_40000.caffemodel
./tools/test_net.py --gpu 1 --def models/VGG16/test.prototxt --net output/voc_2007_trainval/vgg16_fast_rcnn_iter_40000.caffemodel
```
Test output is written underneath `$FRCNN/output`.
......@@ -35,5 +35,5 @@ Test output is written underneath `$FRCNN/output`.
Compress a Fast R-CNN model using SVD on the fully-connected layers:
```
./tools/compress_model.py --def models/VGG_16/test.prototxt --def-svd models/VGG_16/compressed/test.prototxt --net snapshots/vgg16_fast_rcnn_iter_40000.caffemodel
./tools/compress_model.py --def models/VGG16/test.prototxt --def-svd models/VGG16/compressed/test.prototxt --net output/voc_2007_trainval/vgg16_fast_rcnn_iter_40000.caffemodel
```
......@@ -11,7 +11,7 @@ echo Logging output to "$LOG"
time ./tools/train_net.py --gpu $1 \
--solver models/VGG16/solver.prototxt \
--weights data/imagenet_models/VGG_ILSVRC_16_layers.v2.caffemodel \
--weights data/imagenet_models/VGG16.v2.caffemodel \
--imdb voc_2007_trainval
time ./tools/test_net.py --gpu $1 \
......
......@@ -11,7 +11,7 @@ echo Logging output to "$LOG"
time ./tools/train_net.py --gpu $1 \
--solver models/VGG16/no_bbox_reg/solver.prototxt \
--weights data/imagenet_models/VGG_ILSVRC_16_layers.v2.caffemodel \
--weights data/imagenet_models/VGG16.v2.caffemodel \
--imdb voc_2007_trainval \
--cfg experiments/cfgs/no_bbox_reg.yml
......
......@@ -106,11 +106,11 @@ __C.TEST.BBOX_REG = True
# some boxes that are distinct in image space to become identical in feature
# coordinates. If DEDUP_BOXES > 0, then DEDUP_BOXES is used as the scale factor
# for identifying duplicate boxes.
# 1/16 is correct for {Alex,Caffe}Net, VGG_CNN_M_1024, and VGG_16
# 1/16 is correct for {Alex,Caffe}Net, VGG_CNN_M_1024, and VGG16
__C.DEDUP_BOXES = 1./16.
# Pixel mean values (BGR order) as a (1, 1, 3) array
# These are the values originally used for training VGG_16
# These are the values originally used for training VGG16
__C.PIXEL_MEANS = np.array([[[102.9801, 115.9465, 122.7717]]])
# For reproducibility
......
train_net: "models/VGG_16/fc_only/train.prototxt"
train_net: "models/VGG16/fc_only/train.prototxt"
base_lr: 0.001
lr_policy: "step"
gamma: 0.1
......
train_net: "models/VGG_16/no_bbox_reg/train.prototxt"
train_net: "models/VGG16/no_bbox_reg/train.prototxt"
base_lr: 0.001
lr_policy: "step"
gamma: 0.1
......
train_net: "models/VGG_16/piecewise/train.prototxt"
train_net: "models/VGG16/piecewise/train.prototxt"
base_lr: 0.001
lr_policy: "step"
gamma: 0.1
......
train_net: "models/VGG_16/train.prototxt"
train_net: "models/VGG16/train.prototxt"
base_lr: 0.001
lr_policy: "step"
gamma: 0.1
......
......@@ -62,11 +62,11 @@ def compress_weights(W, l):
def main():
args = parse_args()
# prototxt = 'models/VGG_16/test.prototxt'
# prototxt = 'models/VGG16/test.prototxt'
# caffemodel = 'snapshots/vgg16_fast_rcnn_iter_40000.caffemodel'
net = caffe.Net(args.prototxt, args.caffemodel, caffe.TEST)
# prototxt_svd = 'models/VGG_16/svd/test_fc6_fc7.prototxt'
# prototxt_svd = 'models/VGG16/svd/test_fc6_fc7.prototxt'
# caffemodel = 'snapshots/vgg16_fast_rcnn_iter_40000.caffemodel'
net_svd = caffe.Net(args.prototxt_svd, args.caffemodel, caffe.TEST)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment