5

I am programming a face recognition program using OpenCV.

When generating the eigenfaces:

  • do I need to use a big database of unknown faces ?
  • do I need to use only photos of the people I want my system to recognize ?
  • do I need to use both ?

I am talking about the eigenfaces generation, this is the "learning" step.

And how many photos do I need to use to have decent accuracy ? More like 20, or 2000 ?

Thanks

2 Answers 2

3
+50

Eigenfaces works by projecting the faces into a particular "face basis" using principal component analysis or PCA. The basis does not have to include photos of people you want to recognize.

Instead, I would encourage you to train based upon a big database (at least 10k faces) that is well registered (eigenfaces doesn't work well with images that are shifted). The original paper by Turk and Pentland was remarkable partly due to the large pin registered face database they released. I would also say that try to have the lighting normalized to the same between the database and your test inputs.

In terms of testing, first 20 components should be sufficient to reconstruct a human recognizable face and first 100 components should be enough to discriminate between any two face for essentially arbitrarily large dataset.

Sign up to request clarification or add additional context in comments.

2 Comments

Should the initial training set be composed of unique individuals, or is it useful to have multiple images per individual? And if multiples are permissible, should every individual have roughly the same number of training images?
I don't think uniqueness matters all that much. Having a reasonable distribution is of course good. You get exactly the input you train for in machine learning. If the data set composes of 80%+ of images of you, then you may be building more of a you detector rather than generic human face detector. Rather than building your own dataset, there are multiple good ones online which satisfy most desired criteria.
0

You don't need too many random faces to compose a human face; somewhere close to 20 should give good results, maybe go with more if you can. They should all be lined up as much as possible to one another, front facing, and photos in grayscale under the same lighting conditions.

1 Comment

Thanks for your answer. Do you mean then that I need to use only random faces, not the one I wish to identify ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.