3
$\begingroup$

I am currently implementing a CNN to recognise the identity of people given a portrait picture of the person. The objective is to maximise the clf.score function in sklearn, the database is composed of 144 images of 70 different individuals. The program will be tested on a database of images of the same 70 individuals, which I do not have access to.

For most of the pictures, my facial recognition algorithm (openCV) will detect and crop out the background, leaving only the face, but in certain cases, it does not find a face.

What solution will return the best classification score?

Options I've considered are:

  • Leaving the picture as is (Useless background info isn't removed)
  • Cropping a predefined area (Could risk cropping out parts of the face)
$\endgroup$
5
  • $\begingroup$ As the question stands, that's a business (product) problem, not a technical one, so we can not answer it. Welcome to the site! $\endgroup$
    – Emre
    Commented Nov 24, 2017 at 19:07
  • $\begingroup$ @Emre What do you mean? I'm not sure I follow. $\endgroup$
    – JS Lavertu
    Commented Nov 24, 2017 at 19:10
  • $\begingroup$ The 'preferred' solution is not up to us to decide, and we don't know enough about your application to even make relevant suggestions. For example, what is the cost of misdetection?, is it online?, is the consumer a user who can provide feedback? etc. $\endgroup$
    – Emre
    Commented Nov 24, 2017 at 19:12
  • 1
    $\begingroup$ @Emre I've modified the question to hopefully give enough detail for an answer. $\endgroup$
    – JS Lavertu
    Commented Nov 24, 2017 at 19:18
  • $\begingroup$ @JSLavertu as Emre said this is a business problem and what we suggest might not be the optimal solution to your problem. The only thing that I can suggest is that you pass each image through a convnet, store the features extracted in your database and when you want to compare your test image, just check the L2 distance between the test image features and the features stored in the database. $\endgroup$
    – enterML
    Commented Nov 25, 2017 at 6:31

2 Answers 2

1
$\begingroup$

I guess you have a learning problem that has low number of training data. I recommend you a two-step solution.

  1. First you need to do error analysis. Find the images that your classifier does not recognize and try to compare with those which your classifier correctly classified them. find the features that your classifier can not do well on them and try to add features that your classifier can discriminate those, I mean try to find yourself what prompts your classifier to make mistake on those images and why you don't make mistake during recognizing them. Try to add those features that you care but your classifier does not and add them as input.
  2. Try to augment your data using data augmentation for both you mistake and those which you don't. There is an important fact here. don't change the distribution of your data. I mean if one class has two times bigger population than the other class, after augmentation try to keep this ratio. The reason is that maybe after equalizing the number of population of classes you reduce the Bayes error but at borders of classes the answers would be random.
$\endgroup$
1
$\begingroup$

For most of the pictures, my facial recognition algorithm (openCV) will detect and crop out the background, leaving only the face, but in certain cases, it does not find a face.

enter image description here

One alternate solution to approach your problem is to use D-lib facial landmark points instead of OpenCV haar cascades. D-lib facial landmarks provide 68 distinct points on the face, so as per the option that you have considered you can crop the region of interest (face) accurately.

Here is the link to sample code.

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.