We provide the code and data to reproduce all experiments of our CVPR'12 paper Large Scale Metric Learning from Equivalence Constraints. In this paper, we raise important issues on scalability and the required degree of supervision of existing Mahalanobis metric learning methods. Often rather tedious optimization procedures are applied that become computationally intractable on a large scale. With our Keep It Simple and Straightforward MEtric (KISSME) we introduce a simple though effective strategy to learn a distance metric from equivalence constraints. Our method is orders of magnitudes faster than comparable methods.
If you use this code, please cite our paper:
BibTeX reference for convenience:
The best thing is to check out the inline documentation of the MATLAB files. For all experiments a main file (LFW, ToyCars, VIPeR, PubFig) describes the used features and database. Our method is described in LearnAlgoKISSME.m, in particular in the learnPairWise method.
In order to run the experiments presented in the paper, we assume basic knowlege of Matlab. The code is tested under Linux (x64) and Windows (x32,x64), should also work on other platforms with minor modifications. Reproducing the results of our method should not take more than five minutes, including installation.
To download and unpack the needed files run the following code snipet in Matlab. Alternatively, click the links; download and unpack the archives to a directory of your choice.
The provided features cover everything that is needed to reproduce the experiments. If you want to use the original extracted features (before PCA compression) download the kissme_features_full.zip (890 MB) archive.
The experiments described in the paper benchmark our method (KISSME) to other metric learning methods (LMNN, ITML, LDML, SVMs). Due to different licenses these are not pre-installed by default. If you agree to these install the code with the following matlab snipet.
Change the directory to KISSME, workflows, CVPR.
Pick the experiment of your choice and run the according script, e.g. demo_viper.m.
Note: For LFW and PubFig only KISSME is enabled per default. For some of the other algorithms it takes quite long to complete. If you want to train all installed learning algorithms uncomment the respective code. Check the inline comments for details, e.g. in demo_lfw_sift.m.
The toolbox code is licensed under the BSD 3-Clause License ("modified BSD license"). If you use the code, i.e. our algorithm in a scientific publication please cite this paper. For the provided data please check the included copyright notice as it is partly based on other data.