diff options
author | Evan Shelhamer <shelhamer@imaginarynumber.net> | 2014-03-18 13:54:17 -0700 |
---|---|---|
committer | Evan Shelhamer <shelhamer@imaginarynumber.net> | 2014-03-18 14:03:05 -0700 |
commit | d124b8ffe8b9680fa4e0339a0a698622472a0610 (patch) | |
tree | e96297bf8ce03667b8a8e96d1c9e2d50fca18717 | |
parent | c5ab83781fa136ffc77be0bbabc4a55a60b2285d (diff) | |
download | caffe-d124b8ffe8b9680fa4e0339a0a698622472a0610.tar.gz caffe-d124b8ffe8b9680fa4e0339a0a698622472a0610.tar.bz2 caffe-d124b8ffe8b9680fa4e0339a0a698622472a0610.zip |
drop models/ in favor of examples/
Move the Caffe reference imagenet model and script to fetch it to
examples/imagenet.
Caffe bundles reference models, but it makes more sense to keep them
close to examples.
-rw-r--r-- | docs/getting_pretrained_models.md | 2 | ||||
-rw-r--r-- | docs/imagenet_training.md | 2 | ||||
-rw-r--r-- | examples/filter_visualization.ipynb | 6 | ||||
-rwxr-xr-x | examples/imagenet/get_caffe_reference_imagenet_model.sh (renamed from models/get_caffe_reference_imagenet_model.sh) | 0 | ||||
-rw-r--r-- | examples/imagenet/imagenet_deploy.prototxt (renamed from models/imagenet.prototxt) | 0 | ||||
-rw-r--r-- | examples/selective_search_demo.ipynb | 4 | ||||
-rw-r--r-- | matlab/caffe/matcaffe_demo.m | 4 | ||||
-rw-r--r-- | models/.gitignore | 0 | ||||
-rw-r--r-- | python/caffe/detection/detector.py | 4 |
9 files changed, 11 insertions, 11 deletions
diff --git a/docs/getting_pretrained_models.md b/docs/getting_pretrained_models.md index fb108129..56a64457 100644 --- a/docs/getting_pretrained_models.md +++ b/docs/getting_pretrained_models.md @@ -12,6 +12,6 @@ This page will be updated as more models become available. ### ImageNet -Our reference implementation of the AlexNet model trained on ILSVRC-2012 can be downloaded (232.57MB) by running `models/get_caffe_reference_imagenet_model.sh` from the Caffe root directory. +Our reference implementation of the AlexNet model trained on ILSVRC-2012 can be downloaded (232.57MB) by running `examples/imagenet/get_caffe_reference_imagenet_model.sh` from the Caffe root directory. Additionally, you will probably eventually need some auxiliary data (mean image, synset list, etc.): run `data/ilsvrc12/get_ilsvrc_aux.sh` from the root directory to obtain it. diff --git a/docs/imagenet_training.md b/docs/imagenet_training.md index 140ee68d..a1553dd6 100644 --- a/docs/imagenet_training.md +++ b/docs/imagenet_training.md @@ -52,7 +52,7 @@ which will make `data/ilsvrc12/imagenet_mean.binaryproto`. Network Definition ------------------ -The network definition follows strictly the one in Krizhevsky et al. You can find the detailed definition at `examples/imagenet/imagenet.prototxt`. Note that the paths in the data layer - if you have not followed the exact paths in this guide you will need to change the following lines: +The network definition follows strictly the one in Krizhevsky et al. You can find the detailed definition at `examples/imagenet/imagenet_train.prototxt`. Note the paths in the data layer - if you have not followed the exact paths in this guide you will need to change the following lines: source: "ilvsrc12_train_leveldb" meanfile: "../../data/ilsvrc12/imagenet_mean.binaryproto" diff --git a/examples/filter_visualization.ipynb b/examples/filter_visualization.ipynb index 30cf8b7a..881f44b4 100644 --- a/examples/filter_visualization.ipynb +++ b/examples/filter_visualization.ipynb @@ -59,8 +59,8 @@ "cell_type": "code", "collapsed": false, "input": [ - "net = caffe.imagenet.ImageNetClassifier(caffe_root + 'models/imagenet.prototxt',\n", - " caffe_root + 'models/caffe_reference_imagenet_model')\n", + "net = caffe.imagenet.ImageNetClassifier(caffe_root + 'examples/imagenet/imagenet_deploy.prototxt',\n", + " caffe_root + 'examples/imagenet/caffe_reference_imagenet_model')\n", "net.caffenet.set_phase_test()\n", "net.caffenet.set_mode_cpu()" ], @@ -615,4 +615,4 @@ "metadata": {} } ] -}
\ No newline at end of file +} diff --git a/models/get_caffe_reference_imagenet_model.sh b/examples/imagenet/get_caffe_reference_imagenet_model.sh index 0d65dd68..0d65dd68 100755 --- a/models/get_caffe_reference_imagenet_model.sh +++ b/examples/imagenet/get_caffe_reference_imagenet_model.sh diff --git a/models/imagenet.prototxt b/examples/imagenet/imagenet_deploy.prototxt index 0b1f41ab..0b1f41ab 100644 --- a/models/imagenet.prototxt +++ b/examples/imagenet/imagenet_deploy.prototxt diff --git a/examples/selective_search_demo.ipynb b/examples/selective_search_demo.ipynb index 1e0d1d9a..6891a9e1 100644 --- a/examples/selective_search_demo.ipynb +++ b/examples/selective_search_demo.ipynb @@ -27,7 +27,7 @@ "!mkdir _temp\n", "!curl http://farm1.static.flickr.com/220/512450093_7717fb8ce8.jpg > _temp/cat.jpg\n", "!echo `pwd`/_temp/cat.jpg > _temp/cat.txt\n", - "!python ../python/caffe/detection/detector.py --crop_mode=selective_search --pretrained_model=../models/caffe_reference_imagenet_model --model_def=../models/imagenet.prototxt _temp/cat.txt _temp/cat.h5" + "!python ../python/caffe/detection/detector.py --crop_mode=selective_search --pretrained_model=../examples/imagenet/caffe_reference_imagenet_model --model_def=../examples/imagenet/imagenet_deploy.prototxt _temp/cat.txt _temp/cat.h5" ], "language": "python", "metadata": {}, @@ -692,4 +692,4 @@ "metadata": {} } ] -}
\ No newline at end of file +} diff --git a/matlab/caffe/matcaffe_demo.m b/matlab/caffe/matcaffe_demo.m index 459fef9c..c034172f 100644 --- a/matlab/caffe/matcaffe_demo.m +++ b/matlab/caffe/matcaffe_demo.m @@ -20,9 +20,9 @@ function scores = matcaffe_demo(im, use_gpu) % scores = matcaffe_demo(im, 1); % [score, class] = max(scores); -model_def_file = '../../models/imagenet.prototxt'; +model_def_file = '../../examples/imagenet/imagenet_deploy.prototxt'; % NOTE: you'll have to get the pre-trained ILSVRC network -model_file = '../../models/caffe_reference_imagenet_model'; +model_file = '../../examples/imagenet/caffe_reference_imagenet_model'; % init caffe network (spews logging info) caffe('init', model_def_file, model_file); diff --git a/models/.gitignore b/models/.gitignore deleted file mode 100644 index e69de29b..00000000 --- a/models/.gitignore +++ /dev/null diff --git a/python/caffe/detection/detector.py b/python/caffe/detection/detector.py index dd9b527c..9355274c 100644 --- a/python/caffe/detection/detector.py +++ b/python/caffe/detection/detector.py @@ -371,12 +371,12 @@ if __name__ == "__main__": # Optional arguments. parser.add_argument( "--model_def", - default="../../../models/imagenet.prototxt", + default="../../../examples/imagenet/imagenet_deploy.prototxt", help="Model definition file." ) parser.add_argument( "--pretrained_model", - default="../../../models/caffe_reference_imagenet_model", + default="../../../examples/imagenet/caffe_reference_imagenet_model", help="Trained model weights file." ) parser.add_argument( |