Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about the project #7

Open
so-park opened this issue Feb 1, 2019 · 7 comments
Open

Question about the project #7

so-park opened this issue Feb 1, 2019 · 7 comments

Comments

@so-park
Copy link

so-park commented Feb 1, 2019

Hi @povilasb

I'm working on researching PCA for face recognition and I came across your codes.
It is very neat and I would love to use it, however, I'm not able to train the program for some reason.
It stops after "enter the name: " part. I also wasn't able to press keys to take another picture, it seemed like the train part terminates after a certain period of time. When I try to demo it, it says "not enough values to unpack". I made sure that I install all the dependencies, do you have any idea why this would be happening? Or any suggestions as to how I can fix this problem and use the program?

Thank you so much!!
I attached a screenshot as well. Thank you!
screen shot 2019-01-31 at 7 53 30 pm

@povilasb
Copy link
Owner

povilasb commented Feb 1, 2019

I haven't tested it for ages! Let me see :)
Anyway, keep in mind that this is a very toy project. Personally eigenfaces didn't work very well for me in practice. It's a simple algorithm that compares face similarity pixel by pixel. So even a change of lighting will have a huge impact. See the previous discussions: #1 (comment)

@povilasb
Copy link
Owner

povilasb commented Feb 1, 2019

mm, I should have created requirements.txt with specific dependencies. From what I see, numpy has changed it's API and you're probably using latest numpy.
Here's a list of dependency versions I've been using:

cycler==0.10.0
decorator==4.0.11
matplotlib==2.0.0
networkx==1.11
numpy==1.12.1
olefile==0.44
Pillow==4.1.0
pyparsing==2.2.0
python-dateutil==2.6.0
pytz==2017.2
PyWavelets==0.5.2
scikit-image==0.13.0
scipy==0.19.0
six==1.10.0

See if installing exactly those versions help. If so, I'll commit requirements.txt file. Feel free to do so yourself and create a PR :)

@so-park
Copy link
Author

so-park commented Feb 1, 2019 via email

@povilasb
Copy link
Owner

povilasb commented Feb 2, 2019

mmm, my webcam currently is broke, I can't really test it. If by any chance you're at https://fosdem.org/ this weekend, let's meet ;) Otherwise I'll get some webcam and debug this later :) But sure, I'm pretty positive the dependencies can be updated relatively easy.

@so-park
Copy link
Author

so-park commented Feb 4, 2019 via email

@povilasb
Copy link
Owner

Hey, sorry for the delay, busy with the rest of my life...
Anyway, just tested the implementation. It works, although it's fragile. So

  1. make sure you train your face before running demo
  2. when training terminates too fast, that means you don't position your camera towards your face. See
    for face in webcam.capture().faces():
    - train command immediately takes an image and tries to detect face in it. If no face is detected within an image, it will simply retry. It will attempt to take 10 images but all of the retries can fail.
  3. you can play around with code interactively, e.g.
img = webcam.capture()
img.show()

for face in webcam.capture().faces():
    face.show()

@so-park
Copy link
Author

so-park commented Mar 6, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants