FelzenszwalbDetectionCode
Discriminatively Trained Deformable Part Models
Felzenszwalb, Girshick, McAllester and Ramanan released their code for part-based object detection, for which the won the VOC "Lifetime Achievement" Prize.
You can download version 4 of the code here.
You can download the code plus some data for learning a star cascade (faster than the normal model?) here.
Installing
I tried to run the main software on Ubuntu 11.04/Matlab 2010a/gcc 5.4.2, but I got the following warning and error (plus others):
You are using gcc version "4.5.2-8ubuntu4)". The version currently supported with MEX is "4.2.3". /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/cc1plus: /opt/MatlabR2010a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /usr/lib/libppl_c.so.2)
For fixing this I needed to change some of the libraries Matlab links to when building mex files:
- make a backup copy of the directory $MATLAB/sys/os/glnxa64
cd /opt/MatlabR2010a/sys/os/ sudo cp -r glnxa64 ~
- remove two files from that directory
cd glnxa64 sudo rm libstdc++.so.6 sudo rm libstdc++.so.6.0.9
- substitute the two files with links to the version currently in use on the system
sudo ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6* .
Running
You can test the detector by running the demo.m file, or you can test the pedestrian detector on any image like this:
close all, clear; load('INRIA/inriaperson_final'); %load the model im=imread('000061.jpg'); %load the image [dets, boxes] = imgdetect(im, model, -0.3); %perform the detection %post process output: only show bounding boxes (no parts) and apply non-maximum suppression bbox = bboxpred_get(model.bboxpred, dets, reduceboxes(model, boxes)); bbox = clipboxes(im, bbox); top = nms(bbox, 0.5); showboxes(im, bbox(top,:));