Matlab Implementation of the image retrieval system based on the paper:

Gonzalez-Diaz, I.; Baz-Hormigos, C.E.; Diaz-de-Maria, F.
A Generative Model for Concurrent Image Retrieval and ROI Segmentation
IEEE Transactions on Multimedia, vol.16, no.1, pp.169,183, Jan. 2014

To use the code
===============
The main function of the Generative Model is gm.m. 

The code is self-contained unless for the segmentation algorithm needed in case Segmentation-based Spatial Consistency is activated. 
If so, our code uses the implementation of the following paper:

Efficient Graph-Based Image Segmentation 
Pedro F. Felzenszwalb and Daniel P. Huttenlocher
International Journal of Computer Vision, 59(2) September 2004.

You can download the code from http://cs.brown.edu/~pff/segment/ and change the segPath parameter correspondingly.
 

To run the Demo
===============
In order to to show the utilization of the generative model, we additionally provide a small demo for image retrieval.
The demo (not the code gm.m) makes use of VLFEAT toolbox (http://www.vlfeat.org/).

To run the demo, change the first line of the demo.m file, that originally looks like:

run('vlfeat-0.9.18/toolbox/vl_setup');

by the corresponding path to your vlfeat implementation.
