Fisher Vector encoding (FV)

fisher.h implements the Fisher Vectors (FV) image representation [23] [24] . A FV is a statistics capturing the distribution of a set of vectors, usually a set of local image descriptors.

Getting started demonstrates how to use the C API to compute the FV representation of an image. For further details refer to:

# Getting started

The Fisher Vector encoding of a set of features is obtained by using the function vl_fisher_encode. Note that the function requires a Gaussian Mixture Model (GMM) of the encoded feature distribution. In the following code, the result of the coding process is stored in the enc array and the improved fisher vector normalization is used.

float * means ;
float * covariances ;
float * priors ;
float * posteriors ;
float * enc;
// create a GMM object and cluster input data to get means, covariances
// and priors of the estimated mixture
vl_gmm_cluster (gmm, data, dimension, numData, numClusters);
// allocate space for the encoding
enc = vl_malloc(sizeof(float) * 2 * dimension * numClusters);
// run fisher encoding
(enc, VL_F_TYPE,
vl_gmm_get_means(gmm), dimension, numClusters,
dataToEncode, numDataToEncode,
) ;

The performance of the standard Fisher Vector can be significantly improved [24] by using appropriate Normalization and improved Fisher vectors normalizations. These are controlled by the flag parameter of vl_fisher_encode.