Face recognition using SVM

asked 2014-09-22 22:29:10 -0500

rosy gravatar image

Now am trying to train SVM with SURF features.But now I have some doubt about training sets. I want to train around 100 people. So for that I take 40 images per each person and for each set of images I labeled as 1,2,3,4 etc.. So at the time of prediction, when the system is detected a person but that person is not in the training sets I want to show that the person is an unknown person. So my question is, how should I prepare my training sets in order to show results like this.plaese help me...

edit retag flag offensive close merge delete

Comments

I already go through this link.It talks only about binary classification of SVM (1 for +ve sample and -1 for negative samples). But I need multiple classification of SVM.

rosy gravatar imagerosy ( 2014-09-22 23:34:21 -0500 )edit

that's a bit a limitation of the svm approach. in the prediction, all you get is a float value, and the closest integer item is your predicted label. even adding 'negative/unknown ' persons won't help much, as you can never tell a good from a bad prediction.

you still can do multi-class recognition with an svm. it got better for me, when using POLY instead of RBF, experiment with the params

but i'm curious, how you feed the SURF features into the svm. do you add each feature seperately (with a label) ? (each image will have a different number of features)

berak gravatar imageberak ( 2014-09-23 01:28:03 -0500 )edit

Basically the existing SVM implementation is best suited for single class detection. If I need multiple class classification SVM, then I use the 1 versus all approach. That means that you build a set of SVM's, one for each person using the others as negative. Than at each new image apply your range of SVM classifiers.

As to @berak his remark. What I mostly do is take the 100 top strongest features detected and combine those into a single feature vector. Since you do not know how many features there will be in advance, there is no possibility of using them simply all.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-09-23 04:21:58 -0500 )edit

@StevenPuttemans, there's something i never understood with that multiple SVM approach:

svm1 predicts true (yes, it was label1), svm2 predicts true(thinks, it was label2), svm3 predicts false(not label3). now how to decide ? afaik, we can't just take the 'fractional' part of the prediction as a distance/confidence value. or can we ? (that would make a huge difference between multi-class and multi-svm)

berak gravatar imageberak ( 2014-09-23 04:39:27 -0500 )edit
2

Yes you do. The more it goes to 1 the better the prediction. That what I always took as starting point. Besides that, the goals is to try and train SVM's that do not guess wrong, but indeed that is not always possible. In order to get rid of that effect you can do a combination SVM setup, like in this 3 class case. SVM 1 classifies between class1 and class 2, SVM2 classifies between class 2 and class 3, SVM 3 classifies between class 3 and class 1. Now each class can get two possible votes. You can then use the majority voting to get the desired result. The more classes, the better this majority voting works.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-09-23 05:50:39 -0500 )edit

But I do not know if you can grab some sort of distance to the decision plane in the openCV SVM implementation. Haven't looked enough at it.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-09-23 06:00:37 -0500 )edit

Why I need multiple SVM approach is , when system detected particular person I want to show that person with his/her name on the screen.

rosy gravatar imagerosy ( 2014-09-23 06:09:45 -0500 )edit

I would never use SVMs for that. Face detection based on Viola and Jones algorithm than using the facerecognizer interface with the fisherfaces will yield a way better result!

StevenPuttemans gravatar imageStevenPuttemans ( 2014-09-23 06:14:33 -0500 )edit

Actually my question is about Multi class SVM not multiple SVM. SVM deals with binary classification. But I need more than two classification in an SVM.So I want to know whether this approach is suitable for Real time face recognition.

rosy gravatar imagerosy ( 2014-09-23 06:27:39 -0500 )edit