Ask Your Question

How I can extract a face features as vector

asked 2017-01-12 12:23:28 -0500

as9993 gravatar image

updated 2017-01-12 12:33:16 -0500

berak gravatar image

Hello! I use OpenCV with Python to detect faces in images (with Haar cascade detector). Everything work fine, but I have a question. How I can extract a face features and put them into vector or array? For example - I detect a face, get coordinates of the face in the image, extract the face, normalize it and then I want to extract the features that differs from face to face. For me doesn't matter what is exactly meaning of the integers from feature vector, I only want to be different between two faces. How I can done this? Any suggestions? BR, Alex

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2017-01-13 08:32:27 -0500

pi-null-mezon gravatar image

There is many kinds of features have been proposed in literature. Some of them has been implemented in opencv_face module from the opencv_contrib repo. Start from cv::face::FaceRecognizer class.

edit flag offensive delete link more


Hi pi-null-mezon! Thank you for your answer. I forgot to mention, that I don't have a training set for every people i.e. the face is found only once so I cannot use a classical approach to this problem (with using a training set and train Eigenface algorithm to recognize the face and extract the vector of internal state of the algorithm). Should I use FaceRecognizer class for this task and if so, what training set I can use? Thank you! P.S. (Here) is something useful, but I'm not sure if it's correct to use some example database for training and then pass the mine face that I extracted previously to the algorithm only to get the vector and then use this vector to calculate some metrics algorithm.

as9993 gravatar imageas9993 ( 2017-01-15 04:58:24 -0500 )edit

Yes, you can use FaceRecognizer even in this case. As DB for feature space training you can use almost every open database. This is the one of the most popular megaface.

pi-null-mezon gravatar imagepi-null-mezon ( 2017-01-16 02:52:01 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-01-12 12:23:28 -0500

Seen: 1,308 times

Last updated: Jan 13 '17