A computer vision practical by the Oxford Visual Geometry group, authored by Andrea Vedaldi and Andrew Zisserman.
Start from doc/instructions.html
.
Note that this practical requires compiling the (included) MatConvNet library. This should happen automatically (see the
setup.m
script), but make sure that the compilation succeeds on the laboratory computers.
The practical consists of four exercises, organized in the following files:
exercise1.m
-- Part 1: CNN fundamentalsexercise2.m
-- Part 2: Derivatives and backpropagationexercise3.m
-- Part 3: Learning a tiny CNNexercise4.m
-- Part 4: Learning a CNN to recognize charactersexercise5.m
-- Part 5: Using a pretrained CNN
The practical runs in MATLAB and uses MatConvNet. This package contains the following MATLAB functions:
extractBlackBlobs.m
: extract black blobs from an image.tinycnn.m
: implements a very simple CNN.initializeCharacterCNN.m
: initialize a CNN to recognize characters.decodeCharacters.m
: visualize the output of the character CNN.imsmooth.m
: apply a Gaussian filter to an image.vl_imarray.m
andvl_imarraysc.m
: compose images in a mosaic.setup.m
: setup MATLAB environment.
The practical requires both VLFeat and MatConvNet. VLFeat comes with pre-built binaries, but MatConvNet does not.
- Set the current directory to the practical base directory.
- From Bash:
- Run
./extras/download.sh
. This will download theimagenet-vgg-verydeep-16.mat
model as well as a binary copy of the VLFeat library and a copy of MatConvNet. - Run
./extra/genfonts.sh
. This will download the Google Fonts and extract them as PNG files. - Run
./extra/genstring.sh
. This will createdata/sentence-lato.png
.
- Run
- From MATLAB run
addpath extra ; packFonts ;
. This will createdata/charsdb.mat
. - Test the practical: from MATLAB run all the exercises in order.
- 2017a - Removes dependency on VLFeat and upgrades MatConvNet.
- 2015a - Initial edition
Copyright (c) 2015 Andrea Vedaldi
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.