### 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.
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"
"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
+}
"!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
+}
% 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);
# 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(