Is there an open source implementation for bag-of-visual words? I'm not quite sure I understand the bag-of-visual-words representation, so I may misformulate my question.

What I'm currently looking for is an open source library (possibly with python API). I give it pictures as input, and its output is a set of (sparse) features, so that I can perform my stuff base on this features. Idealy, I would like this piece of software to work without internet connection (so that I can work with it while in the plane).

EDIT: I just learnt that facebook recently (summer 2016) released some of its image recognition code (namely multipathnet, deepmask and sharpmask)
There is one implementation of BoVW in openCV. You can find the documentation here :

http://docs.opencv.org/2.4/modules/features2d/doc/object_categorization.html