This code is for vehicle classification using DNN features.
Before running the code:
-
Download this project to your computer.
-
Install VLFeat for generate fisher vector.
-
LIBSVM is already installed in reference folder. You may follow the instructions if you want to compile on your computer.
-
Run run.m in script folder, then wait for a while, you can get the result.
If you want to generate DNN feature by yourself, follow the following procedure:
-
Download the vehicle dataset.
-
Modify the code in set_dir.m so that [dirs.vehicle] points to the vehicle dataset. You may also set a new [dirs.feature] to where you want to store the generated feature.
-
Install Caffe for feature extraction on Alexnet. Also you need to install Matcaffe.
-
Download caffemodel for Alexnet and save it to your corresponding caffe model directory. Also copy the deploy_single.prototxt to the caffe model directory.
-
Modify the corresponding code in set_dir.m, regarding the directory of your caffe root directory.
-
Run run.m in script folder, then you can get the generated feature and accuracy result.