Robot Vision Assignment 2b/3a
-
Create a directory called c:\AdaBoost.
-
Download the following file containing sample database:
http://www.cs.okstate.edu/~katchou/AdaBoost.zip
-
AdaBoost.zip contains positive.zip and scenery.zip. Unpack contents of
positive.zip to c:\AdaBoost\positive\. Unpack scenery.zip over to
c:\AdaBoost\scenery\
-
The rest of the instructions assume that you are using Microsoft Visual
Studio versions 6 and higher. Create the following 2
Win32 Console projects: c:\AdaBoost\vboost and c:\AdaBoost\vdetect. Both should
initially be empty.
-
Create the following subdirectories: c:\AdaBoost\vboost\classifiers
c:\AdaBoost\vboost\weights and c:\AdaBoost\vboost\histograms
-
Download vboost.cpp to
c:\AdaBoost\vboost and add to vboost project.
-
Download vdetect-scale.cpp to
c:\AdaBoost\vdetect and add to vdetect project. Make sure both projects
compile.
-
Run vboost to create a team of 100 classifiers. It is recommended to use at
least 500 positive and 500 negative samples, the more the better: vboost
new.cls 500 500 1 100. This takes about 20 minutes on a 3GHz P4 computer.
-
Optionally, run vboost new.cls 500 500 1 100 again to produce a classifier file
in text format and view it in text editor. The file name will be new.txt
-
Copy new.cls and/or new.txt over to c:\AdaBoost\vdetect
-
Download some group
photograps in pgm format
to c:\adaboost\vdetect
-
Run detector program on each of them: vdetect.exe -i new.cls <photo
name>. The following output will be produced:
- 1) scale.pgm - a scaled
version of your image.
- 2)detected.pgm - a file showing detection results.
-
The following parameters affect performance of your detection:
- 1) vdetect-scale.cpp line 893, classifier.thresh = 0.62 - try to
experiment with threshold values from 0.4 to 0.8 and observe results.
- 2) vdetect-scale.cpp line 411, double scale = 1.1; - try to
experiment with scale values from 0.8 to 1.4 and observe results.
-
Once you are satisfied with results, go back to c:\adaboost\vboost and remove
or rename new.cls. Your next task is to create a team of classifiers that
only uses 3 different types of features.
-
Go back to vboost.cpp and modify int generate_features_18k(int max_h,int
max_w) to produce only 3 types of features. This can be achieved by
commenting out one of the loop blocks starting with type =. Repeat
steps 7-13 and observe results. Good luck.