This package contains the Matlab codes implementing the HSR algorithm described in the paper "Hierarchical Sparse Representations for Object Recognition".

The algorithm mainly consists of the following parts:

1.Image preprocessing: preprocess.m
2.Learning low level dictionary: learn_s1_dictionary.m
3.Extracting low level sparse feature maps: build_s1_layer.m
4.Extracting mid level features: build_c1_layer.m
5.Learning mid level dictionary: learn_s2_dictionary.m
6.Extracting object level features: build_s2_layer.m
7.Learning saliency map: learn_saliency.m
8.Multi scale max pooling: build_c2_layer.m
9.Classification using linear svm: linear_svm.m

This package also includes two important tools:
\spare coding: see Lee, H., Battle, A., Raina, R., Ng, A.Y.: Ecient sparse coding algorithms. In: Advances in Neural Information Processing Systems. (2006)
\liblinear-1.51: see Chang, C.C., Lin, C.J.: LIBSVM: a library for support vector machines. (2001) Software available at http://www.csie.ntu.edu.tw/ cjlin/libsvm.

main.m gives an implementation entry of whole algorithm.

For any questions, feel free to email me at: jyang44@ucmerced.edu
