Rémi Flamary

Professional website

Large Margin Filtering


This code is an implementation of the large margin filtering method for both 1D sequence labeling and 2D pixel classification in images. It is the code that has been used in the paper Large Margin Filtering.

In addition the package contains an updated version of the Toolbox SVM-KM (with classifiers defined as a structure and not a bunch of matrices), and general function for validation/cross validation.

This package contains:

  • SVM-KM : SVM and kernel methods toolbox (see here)
  • Wrappers function svmclass2 that permits to learn different SVM
  • Solvers (libsvm, monqp, svqp2, ...)
  • Other methods: GMM (using netlabs)


Current version : 0.9

Download : FilterSVM.zip


Quick version:

  • Add all the paths and subpath to matlab.
  • Execute make.m to compile the mex file (to use libsvm/svqp2)
  • Entry file : Dataset_Toy/Test_FilterSVM.m


Source code hierarchy

  • 'costs/' : functions to compute SVM costs
  • 'gradients/' : functions returning SVM gradients (for filtersvm)
  • 'netlab/' : netlab toolbox + gmmclass/gmmval functions
  • 'optim/' : optimisation functions (gradient descent, solvers)
  • 'probasolvers/' : proba functions, platt svm to proba transform
  • 'svmsolvers/' : several SVM/MKL toolboxes and wrappers: svmclass2
  • 'utils/' : several utils functions
  • 'validation/' : validation/cross-validation loops functions
  • 'visu/' : visualization functions

  • 'Dataset_*' : test functions on different datasets for filtersvm