use SVM to class face images [closed]

asked 2014-03-26 04:05:49 -0600

Bekhouche gravatar image

updated 2014-03-26 04:17:11 -0600

Hello, I need an exemple of using svm to class face images for exemple 2 classes in 100 images ...

int main(array<System::String ^> ^args)

{ IplImage *img;

        img=cvLoadImage("image.jpg");

        // SVM


Console::WriteLine(L"\n Exit ...");
Console::ReadLine();
return 0;

}

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by sturkmen
close date 2020-10-06 15:18:02.642348

Comments

1

oh dear, since you seem to be a new to this,

  • stick with plain c++ for a start
  • avoid the outdated c-api ( IplImages, cv* functions )
  • avoid cli / managed c++
berak gravatar imageberak ( 2014-03-26 04:21:00 -0600 )edit
1

As a second comment, OpenCV does have a SVM module which could be used for this, but you are far from training an SVM and predicting faces with it. Basically these are the steps to follow, find some info on them and report back if you have problems.

  1. Find a set of training images for each face
  2. Transform the images into feature descriptors of each face
  3. Calculate an average face descriptor for each face using multiple images of that face
  4. Use a set of face descriptors versus a set of non face descriptors to train an SVM
  5. Use the SVM to predict the outcome of a new face window!
StevenPuttemans gravatar imageStevenPuttemans ( 2014-03-26 04:45:04 -0600 )edit

@berak , do you mean that the Java bindings do not have the full functionality in order to implement this approach?

Will Stewart gravatar imageWill Stewart ( 2014-03-26 10:17:52 -0600 )edit

might as well work from java, too

berak gravatar imageberak ( 2014-03-26 11:36:35 -0600 )edit

@Will Stewart, what @berak means is that you have to stick to a specific choice of bindings. Either go for C, C++ or java, but mixing everything up is not a good idea!

StevenPuttemans gravatar imageStevenPuttemans ( 2014-03-27 03:47:54 -0600 )edit