By TechieBoy101

2018-03-13 15:56:04 8 Comments

I have created a simple face recognition program on the very background of SVM(Machine Learning Algorithm) in Python using scikit learn.I have created 50 images of per person for the training data,but still it's not giving me correct results(Out of 10 people,it would identify just 1 correctly).I am just a newbie in machine learning.So what am I missing here?By the program is just simple.It takes pixel values of images and train the data and then predict on the real time image.Please help me here.


@J_P 2018-03-13 16:01:14

Apart from the design of the machine learning program itself (which we don't know), with the information you show this is an issue for sure:

50 images could be enough (and not very accurate) for training to recognize if a image is a face or not.

But to train a system to recognize different faces it'll take a much bigger training dataset.

I'm sure the faces size, position, inclination, etc. will be very different even for the same person, so the amount of pictures per person should be much more bigger than 50 to train the system...

Using a neural network, the number of layers, the design, and a good number of training samples are key for a good learning.

If your number of training samples is too much you are overfitting (the system will work perfect in your training but not out of it), and if it's too less you are underfitting (you don't have enough samples to have a good learning), what I think is your case.

Another thing you could do is feed your system not with the raw images as inputs, and use data extracted for those images instead, as relationship between eye to mouth eye to chin distances, etc. In that case you could use a short number of samples per face, so 50 (even less) will be more than enough. But you need to preprocess the image first with the right algorithms to feed your system

@TechieBoy101 2018-03-13 16:06:07

Sir,but I have seen people creating so advanced face recognition with just 2 images.How do they do it?

@J_P 2018-03-13 16:07:38

Training just with 2 images is not possible to build a face recognition system for sure

@J_P 2018-03-13 16:21:47

If they use just 2 images, probably they extract the information that makes a face different first, instead of feeding the system with the raw image. In this way is possible, but not giving the images as input data for learning.

Related Questions

Sponsored Content

17 Answered Questions

[SOLVED] What are metaclasses in Python?

21 Answered Questions

[SOLVED] Difference between append vs. extend list methods in Python

15 Answered Questions

[SOLVED] Accessing the index in Python 'for' loops

  • 2009-02-06 22:47:54
  • Joan Venge
  • 1182843 View
  • 2322 Score
  • 15 Answer
  • Tags:   python loops list

24 Answered Questions

[SOLVED] What is the difference between @staticmethod and @classmethod in Python?

18 Answered Questions

[SOLVED] Difference between __str__ and __repr__ in Python

  • 2009-09-17 04:27:45
  • Casebash
  • 426653 View
  • 1944 Score
  • 18 Answer
  • Tags:   python repr

46 Answered Questions

[SOLVED] Calling an external command in Python

3 Answered Questions

[SOLVED] Simple Digit Recognition OCR in OpenCV-Python

12 Answered Questions

[SOLVED] Does Python have a string 'contains' substring method?

19 Answered Questions

3 Answered Questions

[SOLVED] How to use SVM for People Recognition?

Sponsored Content