Ask Your Question

face recognition with opencv

asked 2013-05-15 05:26:12 -0600

owen gravatar image

updated 2013-05-15 07:56:00 -0600

hi there, I am completely new to opencv.

I am considering a project that will require matching face images to an existing database of face images. The images will generally be frontal and of reasonable quality. for example, a person taking their own picture with a front camera of a mobile phone.

Whenever a new image is added, I would like it to be matched against the existing database of about 100,000 images (maybe more). Ideally I would like to get results for likelyness and matching score if possible.

Is opencv an appropriate root to explore?

I personally do not have the skills to make that assessment. If the project is viable I intend to hand it over to someone who is capable of executing it. At the moment I am just trying to assess it viability.

Thank you!

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2013-05-15 15:58:51 -0600

updated 2013-05-15 16:33:17 -0600

If you are new to OpenCV (and computer vision probably), then tackling such a problem is optimistic I would say.

The algorithms I have added are nowhere to be suited for datasets of 100,000 images. If you are going to run the Eigenfaces or Fisherfaces algorithm, you won't be able to allocate that much memory. Algorithms like Local Binary Patterns don't need to allocate that much memory, but finding the best match is going to be very time consuming as it's a Nearest Neighbor Search over the entire dataset.

Coming up with a solution that scales is far from trivial. While I can't offer source code and algorithm implementations, I think there are interesting papers available. Among them is one of the team (a company quite successful in this area):

  • Yaniv Taigman, Lior Wolf "Leveraging Billions of Faces to Overcome Performance Barriers in Unconstrained Face Recognition" (Online available on

As for similarity measures I suggest looking into algorithms like One Shot Similarity Kernels, as I think they still provide state of the art results for similarity measures. There's a great paper by Lior Wolf, Tal Hassner and Yaniv Taigman ( Founder/CTO);

  • Lior Wolf, Tal Hassner and Yaniv Taigman "Effective Unconstrained Face Recognition by Combining Multiple Descriptors and Learned Background Statistics". IEEE Transactions on Pattern Analysis and Machine Intelligence archive, Volume 33, Issue 10, October 2011 (PDF online available)

You can find some MATLAB Code on the project page for One Shot Similarity Kernels:

So do I think such a project feasible, if you are working alone and don't have a (very strong) background in computer vision? I know, that such a project requires a lot of tough problems to be solved in order to create a robust and efficient (and useful) face recognition system. In my opinion way too many tough problems for one person.

edit flag offensive delete link more

answered 2013-05-15 07:57:38 -0600

I am guessing that the following class, FaceRecognizer, does about everything you would want. Many examples of this class are on the internet for your use.

edit flag offensive delete link more



thanks! i tried to figure out the capabilities of FaceRecognizer, and how to use it, but i could not figure it out. i will look into it further.

owen gravatar imageowen ( 2013-05-15 12:26:48 -0600 )edit

Question Tools


Asked: 2013-05-15 05:26:12 -0600

Seen: 1,271 times

Last updated: May 15 '13