Simple example for how to train a classifier recognizing objects in images based on Convolutional Neural Network features (from layer fc8).
You can just click on CNNexp.ipynb, and take a look at the code
In order to actually run it, you will need to install/download
- Python 2.7
- Jupyter / IPython notebook
- Python libraries: sklearn, matplotlib, PIL (Python imaging library)
- The Caffe deep learning framework
- bvlc_googlenet (or bvlc_reference_caffenet) from Caffe ModelZoo
After installing/downloading these, download this project, uncompress all zip files, and then start "ipython notebook" within the folder you downloaded this project to. Then open CNNexp.ipynb, and follow the instructions there.
Tested with Ubuntu 12.04 (caffe doesn't work well with Windows)
For more information and more detailed tutorials, please see
- caffe examples, especially classification, which visualizes what CNN features look like
- The caffe Tutorial
- Linux, Python & caffe installation tutorial
- finally, for developing intuitions on deep learning, see Neural Networks, Manifolds, and Topology