Active Basis C++ Code

QuickStart| Implementation | Usage | Consistency | Screen Shot
Version problem: The package compiles in CMake 2.4 and VC 9.0. If you use CMake 2.6, some workaround is needed. If you use an older version of VC, a full version of boost is needed.

1. QuickStart

Follow the following steps to start playing
  1. Download the code at active_basis_release_1, unzip it to some folder (say active_basis_cpp_dir).
  2. Download and install CMake.
  3. Open CMake,
  4. Open 'active_basis_cpp_dir\build\ACTIVE_BASIS_Prj.sln', switch to release configuration and compile all projects.
  5. [Exp1] Go to folder 'active_basis_cpp_dir\data\ex1_car' and
  6. [Exp3] Go to folder 'active_basis_cpp_dir\data\ex3_horse' and
  7. [Exp4] Go to folder 'active_basis_cpp_dir\data\ex4_hs_hrs_butf' and

2. Implementation

I use the following libraries, and pack them together in the compressed package, so you need not to download them yourself. I use CMake to generate the project files. CMake is a very small and neat tool.
I convert all double data to float, which results in nearly no accuracy loss but reduces computation and storage.

Open the project, you will find 6 main projects:

The project also contains 3 visulization projects: Additionally, it also contains 3 support projects:

3. Usage

How to debug in VC: The command-line options. All executables accepts several of the following options An example:
active_basis_em_test --test_pos_dir=%ddir%\posTest --test_neg_dir=%ddir%\negTest --param_file=%ddir%\param.ini --model_dir=%ddir%\model\

4. Consistency with Matlab Code

I test the code on 'Head-Shoulder' data and 'Header-Shoulder-Horse-Butterfly' mixtrain data.
  1. For single template version, if I import the filtering results from matlab, the learned templates and final ROC will be exactly the same.
  2. For EM version, if I import the filtering results from matlab, the learned templates may be have minor differences due to double -float conversion, but C++ version has higher coding gain. For each template, there may exist one sketch has 2 pixels deviation.
  3. For single template version, if I use OpenCV filtering, the learned templates scores and final ROC will have minor differences.
  4. For EM testing, there is no Matlab code for comparison.

5. Screen Shot

PlPlot is really a good tool for scientific plotting, I recomend everyone to use it.

Tilt


Learn


Test


Learn EM


QuickStart| Implementation | Usage | Consistency | Screen Shot


Haifeng GONG