Code for performing Hough voting with explaining away using the PC/BC-DIM algorithm.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
mwspratling 6d092b466b
1st release May 2016
2 months ago
LICENSE 1st release May 2016 2 months ago
README.md 1st release May 2016 2 months ago
accuracy_hough_lines.m 1st release May 2016 2 months ago
accuracy_ism_cars.m 1st release May 2016 2 months ago
accuracy_ism_carsScale.m 1st release May 2016 2 months ago
calc_f1score.m 1st release May 2016 2 months ago
centroid.m 1st release May 2016 2 months ago
class_ism_norb.m 1st release May 2016 2 months ago
class_ism_usps.m 1st release May 2016 2 months ago
convert_car_coordinates.m 1st release May 2016 2 months ago
convert_polar_to_cartesian.m 1st release May 2016 2 months ago
dim_activation.m 1st release May 2016 2 months ago
dim_find_peaks.m 1st release May 2016 2 months ago
distance_measure.m 1st release May 2016 2 months ago
expand_affine_image_set.m 1st release May 2016 2 months ago
expand_car_image_scales.m 1st release May 2016 2 months ago
expand_horse_image_set.m 1st release May 2016 2 months ago
extract_coords.m 1st release May 2016 2 months ago
extract_keypoints.m 1st release May 2016 2 months ago
extract_patch.m 1st release May 2016 2 months ago
figured.m 1st release May 2016 2 months ago
gauss2D.m 1st release May 2016 2 months ago
gauss3D.m 1st release May 2016 2 months ago
hough_find_peaks.m 1st release May 2016 2 months ago
hough_lines_compare_methods.m 1st release May 2016 2 months ago
hough_lines_dim.m 1st release May 2016 2 months ago
image_dot_lines.m 1st release May 2016 2 months ago
ism_compare_methods.m 1st release May 2016 2 months ago
ism_dim.m 1st release May 2016 2 months ago
ism_dim_conv.m 1st release May 2016 2 months ago
lines_detection_accuracy.m 1st release May 2016 2 months ago
load_data_norb.m 1st release May 2016 2 months ago
load_data_usps.m 1st release May 2016 2 months ago
load_image_101.m 1st release May 2016 2 months ago
load_image_car.m 1st release May 2016 2 months ago
load_image_horse.m 1st release May 2016 2 months ago
plot_RFPPI.m 1st release May 2016 2 months ago
plot_bounding_box.m 1st release May 2016 2 months ago
plot_codebook.m 1st release May 2016 2 months ago
plot_errors.m 1st release May 2016 2 months ago
plot_precision_recall.m 1st release May 2016 2 months ago
postprocess_codebook.m 1st release May 2016 2 months ago
preprocess_usps_image.m 1st release May 2016 2 months ago
stats_hough_lines.m 1st release May 2016 2 months ago
stats_ism_cars.m 1st release May 2016 2 months ago
stats_ism_carsScale.m 1st release May 2016 2 months ago
stats_ism_horses.m 1st release May 2016 2 months ago
stats_ism_usps.m 1st release May 2016 2 months ago
test_hough_lines.m 1st release May 2016 2 months ago
test_ism_cars.m 1st release May 2016 2 months ago
test_ism_carsScale.m 1st release May 2016 2 months ago
test_ism_horses.m 1st release May 2016 2 months ago
test_ism_norb.m 1st release May 2016 2 months ago
test_ism_usps.m 1st release May 2016 2 months ago
train_ism.m 1st release May 2016 2 months ago

README.md

This code implements the simulation results reported in:

M. W. Spratling (2016), A neural implementation of the Hough Transform and the advantages of explaining away, Image and Vision Computing, 52:15-24.

Please cite this paper if this code is used in, or to motivate, any publications.


USAGE


This code was tested with MATLAB Version 8.5.0.197613 (R2015a), the Image Processing Toolbox (Version 9.2), and the Statistics and Machine Learning Toolbox (Version 10.0) running on Ubuntu Linux version 14.04. It also uses the third-party VLFeat Toolbox (http://www.vlfeat.org/) for SIFT keypoint detection. These toolboxes should thus be installed somewhere on your matlab path. To run the experiments on car detection, it is necessary to install the UIUC dataset (https://cogcomp.cs.illinois.edu/Data/Car/). The first line of the function "load_image_car" should be modified to contain the path to this dataset.

The following MATLAB functions can be used to perfom the experiments described in the paper.

Figs. 1 to 5 can be reproduced using the command:

    test_hough_lines(f);

where f is an integer between 1 and 5 corresponding to the figure number of the experiment (note that in Figs 4 and 5 the input images are randomly generated, so will not look identical to those in the article).

The precision recall curves in Figs. 4 and 5 can be reproduced using the command:

    stats_hough_lines(imNoise);

where imNoise=0 for Fig. 4 and imNoise=0.01 for Fig. 5.

Fig. 7 can be reproduced using the command:

    accuracy_hough_lines;

For Fig. 8 it is necessary to generate a codebook using the following command:

    train_ism('cars');

The precision recall curve can then be generated by running:

    stats_ism_cars;

Detection results for individual images can be generated using

    test_ism_cars(imageNum);

where imageNum is the number of the image in the test set that is to be processed.

For Fig. 9 it is necessary to generate a codebook using the following command:

    train_ism('carsScale');

The precision recall curve can then be generated by running:

    stats_ism_carsScale;

Detection results for individual images can be generated using

    test_ism_carsScale(imageNum);

where imageNum is the number of the image in the test set that is to be processed.