Ask Your Question
0

What kind of features can be uses to recognise face.

asked 2017-12-20 03:25:08 -0500

Shivanshu gravatar image

updated 2017-12-20 05:33:20 -0500

berak gravatar image

I am using opencv 3.0.0 with visual studio 2012 ,I want to write a program related to face recog.. I don't want to use prebuild face recogniser provided with open cv 3.0.0,But I am having problem ,that what features of face must be used for classification..Internet says corners, edge and shape discriptors are good features but how?i.is there anything else can someone help in this?

edit retag flag offensive close merge delete

Comments

3.0.0 is quite old. really, update to latest 3.4, so you can use more advanced features, like e.g. BIF.

there is also a pretrained FaceNet available in the dnn module, that can be used for transfer-learning (with your own data)

besides that, what kind of problem are you trying to solve here ? identification (closest from adb), authentification(is that me?), verification (are those 2 persons the same ?) ? please clarify.

also, have a look here

berak gravatar imageberak ( 2017-12-20 03:31:46 -0500 )edit
1

may be you can read bibliography given in this tutorial

LBerger gravatar imageLBerger ( 2017-12-20 03:32:10 -0500 )edit

Berak.I said I want to create my own recogniser using ML and face features.I have visual studio 2012 .opencv 3.4 might be incompitable

Shivanshu gravatar imageShivanshu ( 2017-12-20 09:59:03 -0500 )edit

you just have to build it from src, see answer here

also, you answered none of my questions.

berak gravatar imageberak ( 2017-12-20 11:41:26 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2017-12-21 12:16:23 -0500

berak gravatar image

updated 2017-12-22 11:51:54 -0500

you probably won't like my answer, but, it is almost 2018 now:

 you should use transfer learning with a pretrained dnn, like the facenet one.

(believe me, i have been, where you are now, and i probably have seen it all, from lbp variants to rootsift to gabor filters, fishervectors, learned lpqdisc, CDIKP, to whatnot.)

and it would be fairly easy, too !

download https://raw.githubusercontent.com/pya...

(~30mb, but you won't regret it, i promise !)

#include <opencv2/dnn.hpp>

dnn::Net net = dnn::readNetFromTorch("openface.nn4.small2.v1.t7");

Mat process(const Mat &image)
{
    Mat inputBlob = dnn::blobFromImage(image, 1./255, Size(96,96), Scalar(), true, false);
    net.setInput(inputBlob);
    return net.forward();
}

then just feed (color!) images into it, and use those resulting (1 x 128 float) features, to train any ml of your choice.

(you'll want some proper cropping(cascadeclassifier) and face-alignment (so the eyes are on a horizontal line) before that)

in the end, it's just a giant, "fixed function feature processor".

( added a complete example here )

you can test it in your web browser tutorial_dnn_javascript

edit flag offensive delete link more

Comments

2

@Shivanshu, i knew, you would not like it.

it'll take you half a year of research and broken attempts (none of that visible in your question, so you obviously did not try anything on your own before, btw), then you'll come back to this ...

again, if your question was about "human feature engineering" -- too late. the dnn folks won that race. just accept that.

berak gravatar imageberak ( 2017-12-21 13:07:29 -0500 )edit

You have very good experience in computer vision but I have no idea on deep neural network,and I don't even have good internet speed to download visual studio 2017 or 2015 so..

Shivanshu gravatar imageShivanshu ( 2017-12-21 22:45:10 -0500 )edit

I am currently on SVM ,KNN and approaching towards neural network.. then deep neural net

Shivanshu gravatar imageShivanshu ( 2017-12-21 22:49:38 -0500 )edit

"and I don't even have good internet speed to download visual studio 2017 or 2015" -- i do understand that, but the fix is NOT to use an outdated opencv version, but build latest from src, locally.

berak gravatar imageberak ( 2017-12-22 02:16:42 -0500 )edit

thanks, @sturkmen !

(i was kinda hesitating to quote the js sample, because it also requires downloading the pretrained face-detection network, another XX mb download.)

berak gravatar imageberak ( 2017-12-22 11:58:27 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-12-20 03:25:08 -0500

Seen: 164 times

Last updated: Dec 22 '17