drop models/ in favor of examples/
authorEvan Shelhamer <shelhamer@imaginarynumber.net>
Tue, 18 Mar 2014 20:54:17 +0000 (13:54 -0700)
committerEvan Shelhamer <shelhamer@imaginarynumber.net>
Tue, 18 Mar 2014 21:03:05 +0000 (14:03 -0700)
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.

docs/getting_pretrained_models.md
docs/imagenet_training.md
examples/filter_visualization.ipynb
examples/imagenet/get_caffe_reference_imagenet_model.sh [moved from models/get_caffe_reference_imagenet_model.sh with 100% similarity]
examples/imagenet/imagenet_deploy.prototxt [moved from models/imagenet.prototxt with 100% similarity]
examples/selective_search_demo.ipynb
matlab/caffe/matcaffe_demo.m
models/.gitignore [deleted file]
python/caffe/detection/detector.py

index fb10812..56a6445 100644 (file)
@@ -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.
index 140ee68..a1553dd 100644 (file)
@@ -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"
index 30cf8b7..881f44b 100644 (file)
@@ -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()"
      ],
    "metadata": {}
   }
  ]
-}
\ No newline at end of file
+}
index 1e0d1d9..6891a9e 100644 (file)
@@ -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": {},
    "metadata": {}
   }
  ]
-}
\ No newline at end of file
+}
index 459fef9..c034172 100644 (file)
@@ -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 (file)
index e69de29..0000000
index dd9b527..9355274 100644 (file)
@@ -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(