Search code examples
matlabvlfeat

How do I binarize Fisher Vectors?


I'm working on a school project and, between many tasks, I need to binarize Fisher Vectors following what is written in this paper. I was given the vl_feat library to use with Matlab and I implementd this simple tutorial to return fisher vectors given some features.

Everything works fine and I successfully updated the vl_fisher function to raise each dimension of the Fisher vector to the power of a value α ∈ [0, 1] as stated in section 4.1. With α = 0 I can have a Fisher vector with values {-1,0,1} which is a ternary encosing.

The second part of section 4.1 explains how to turn this ternary encoding into an equivalent binary encoding. I got a little lost in there, mainly due to the fact that I'm using a library to return the fisher vector representation. This representation consists of a vector of doubles and it makes it trickier to follow the paper description.

So my question is, how do I binarize fisher vectors with vl_feat library on Matlab ? Do I simply have to binarize the ternary encoding ? Should I compute fisher vectors in another way to make them more suitable for a following binarization ?

Thanks in advance for your time!


Solution

  • There are 2 possible solutions to this problem:

    1. You put your hand on the open source library code and make it return what you need
    2. You implement your own way to binarize fisher vectors

    I ended up following the second step in Matlab instead of putting my hands on the C library. Keep in mind that this article was very useful when it comes to compute the GMM in the log domain. I'll release my implementation as open source as soon as I'm done with the project.