PAMIR

Passive-Aggresive Model for Image Retrieval

David Grangier Samy Bengio  
  Google Inc. Idiap Research Institute
  lastname@google.com info@idiap.ch

PAMIR is a machine learning algorithm to learn a ranking function, i.e. a function which orders documents given a query. It has been primarily designed for multimodal retrieval, such as the retrieval of images from text queries. Its main advantages are scalability (it relies on online learning, which allows training from large datasets) and discriminative training (its training procedure optimizes a loss related to the final retrieval quality). Pamir is also a mountain range in Central Asia, but that's a different story...

Introduction

PAMIR is described in the following papers,

Code

The source code of PAMIR is free, distributed under BSD license. It is simple C++, built upon the Torch machine learning library. Hence, your first step to use it is to install Torch3, as instructed on the Torch3 website. Then, you simply add the PAMIR package to Torch, and that it ! The package comes with a README file that describes the class hierarchy. The two main example files trainImg2.cc and testImg2.cc can be compiled with the same methodology as the examples provided with Torch.

Documentation

Data format

All data files should be provided as sparse matrices (see SparseMatrix.h), which are binary files containing Note that the component of each row should be sorted by ascending indexes.

Training and Testing

Two main files are provided as examples with the package, trainImg2 and testImg2.

trainImg2 can train a model, it takes as arguments

The following options can be provided to measure performance during training,

testImg2 can test a model, it takes as arguments

Example Rankings

We provide examples, comparing PAMIR to alternative solutions, such as Support Vector Machines (SVM) and Probabilistic Latent Semantic Analysis (PLSA) over the Corel dataset. Details on these experiments can be found in [Grangier and Bengio, 2008], see above.

Acknowledgments

This work has been supported by the Swiss NSF through the MULTI project and by the Swiss OFES through the PASCAL European Network of Excellence. Part of this research has been performed while Samy Bengio was at the IDIAP Research Institute.