
Attention-Driven Parts-Based Object Detection, supplemental code

version 1.0, 28.Jun.2004

Ilkka Autio & J.T. Lindgren


http://www.cs.helsinki.fi/group/porr/


NOTES

The included m-files contain scripts and functions that we used in the 
experiments described in the paper 'Attention-Driven Parts-Based Object 
Detection', published in the ECAI 2004 proceedings. We release these 
code snippets to the public in the hopes that: 
  * Someone might salvage some useful components from the code.
  * Someone might replicate our results (made a bit more complicated by 
    the fact that we do not have the permission to re-distribute the data 
    to third parties. Please see the paper for references and contact 
    the people maintaining the datasets if you are interested in 
    acquiring the data).
  * Someone might be interested to try our method out with some
    other datasets or problems

DISCLAIMERS

  * All included files are released under GNU General Public License v2,
    detailed in the file COPYING.
  * Still, this is research code rather than "software".
    Hence, the code might be dirty, inefficient, poorly designed, 
    hastily written, etc. The code is designed for the testing of 
    specific hypotheses on specific datasets with minimal effort,
    which means that the actual instantiations of the algorithms 
    might not be "generic" enough for your purposes, and you might 
    have to do some tweaking.
  * In case you are living someplace where rampant litigation is commonplace,
    you might wonder if we are responsible for financial losses, losses 
    of reputation, losses of facial hair, impotence or other maladies  
    somehow bizarrely caused (either directly, indirectly or vice versa)
    by the use of our code. In accord with the GPL license, we do not 
    accept any responsibility for any damages caused by the code.
  * Some of the comments in the code might be outdated.
  * The code has been developed and used solely on Linux (redhat). 
    We do not know what it takes to use it on some other platform.

INSTRUCTIONS

With the included scripts, you could exactly replicate the
main results presented in our paper - if you had the data. 
More specifically, the results given in the columns A2, RP, 
SVM1 and SVM2 of table 1 are replicable. If you'd wish to 
replicate the RandomForest experiments, you could rely on the 
implementation provided by WEKA (http://www.cs.waikato.ac.nz/ml/weka/) 
which we utilized, or use the randomForest package available 
for R (http://www.r-project.org/). There should not be great 
differences between the two.

1. The top-level scripts assume the following subdirectories 
with the following contents:

Seeds/Seed_one.mat  : Contains the random seed (for exact duplication of tests
                      involving pseudorandomness).

datasets/synth_pos_all_b.mat  : Contains a 40*200*932 array 'positives' 
                                of faces with synthetic backgrounds.
datasets/bio_neg_b.mat        : Contains a 40*200*6687 array 'negatives' 
                                of non-faces.
datasets/carsL.mat            : Contains array 'positives' and 'negatives' 
                                both of which are 40*100*499.
osu_svm/                      : Contains the osu_svm toolbox that can 
                                be downloaded from 
                                http://www.ece.osu.edu/~maj/osu_svm/
results/                      : Initially empty, but most of the test
                                results will be saved here.


2. The experiments

Should you wish to replicate our experiments per ce, you can
do them in the following order. (In general, they cannot be 
performed in arbitrary order, as the functions can rely on the 
previous snippet generating some piece of preprocessed data etc.)

2.1 roth_alternative2_10fold.m      => row 'cars',  column A2 + the SVM columns
2.2 faces_alternative2_10fold.m     => row 'faces', column A2 + the SVM columns
2.3 roth_basic_10fold.m             => row 'cars',  column RP
2.4 faces_basic_10fold.m            => row 'faces', column RP
2.5 faces_alternative3_10fold.m     => preprocessor for the next step
2.6 multi_test1.m                   => row 'multi', column A2 + the SVM columns
2.7 roth_alternative2blur_10fold.m  => C sigma1, A2 + SVM columns
2.8 faces_alternative2blur_10fold.m => F sigma1, A2 + SVM columns
(Other degrees of blurring can be tried by tweaking 2.7, 2.8:
 simply locate calls to 'imfilter' and plug in the values you want)

Also note that the call appearing at the end of many of the above scripts:

final_stats = validation_stats(folds,1,'r*');    ,

only calculates the stats for the column A2.
To get the corresponding stats for the SVM-columns, you must:
a) do a small loop replacing each 
       folds(idx).test_stat
       with
       folds(idx).test_stat_raw1  (or raw2 for poly svms)
b) call validation_stats manually.


ADDITIONAL COMMENTS

The most useful part of these scripts could be the fragment 
selection code. By taking any of the A2-related test scripts 
as the starting point, you can probably figure out how the 
whole works and adapt some part of it to your own use. Running 
some of the methods on some other datasets (ie. having images 
in different resolution, different objects, and/or something 
like that) shouldn't be a problem. Simply replace the 
dataset files. You may have to adjust some coefficients around 
the .m files though, to produce meaningful results.


CONTACT

Should you have comments, problems with the code, 
suggestions, etc, you can send email to prefix
'porr-list' combined with postfix "cs.helsinki.fi"
using the standard address separator character.

We will probably react better to mail that implies that
the sender has spent some resources on thinking about 
the issue before mailing. :)


