the-machine-project / the-machine

Welcome to the machine...
http://www.themachineproject.org
76 stars 25 forks source link

Camera 2 doesn't recognize faces trained in Camera 1 #37

Open roccodev opened 8 years ago

roccodev commented 8 years ago

Hi. Today I connected a second camera to my computer. Everything works well, except than that camera is unable to recognize my face. So I tried a retrain (changing permissions), so I trained my face in Camera 2. And it works. But now my face is not getting recognized in Camera 1. (Build from GitHub) Tried to modify source code but nothing. Help please!

roccodev commented 8 years ago

The problem is another. I got the 2 cameras recognizing me by putting them on the same place. How can I get recognized by cameras but from different places?

Xymanek commented 8 years ago

How can I get recognized by cameras but from different places

I've already posted that before, the only thing to do is improve face recognition, which isn't easy

roccodev commented 8 years ago

You can make (concept) a facial recognition based on PNG files, so the training happens with a white background, and then transparency is maked, so you can recognize faces with multiple backgrounds.

devloop0 commented 8 years ago

This is partially my fault. Considering I do not have 2 webcams, there is absolutely no way that I can test multiple webcams on my computer. For the forseeable future, if someone finds a bug like this, they will have to debug it. I can try helping you though. There are some possibilities as to why this is happening:

  1. The image qualities/the light each camera captures, are different. If someone is trained on one camera, and is switched to another, the machine won't recognize you. This is pretty difficult to fix, although maybe adding a white background could be good. I can look into that, but I'm currently working on UI enhancements.
  2. If you have two machine instances open at the same time, one may not load all the files. I'm not 100% sure about this, you will have to debug this on your computer. Let me know what you find. If the second thing is the problem, I would be glad to take a look at it. I'm not sure how complicated adding a transparent background to the image captured during training is (it will definitely involved some form of edge detection, as OpenCV just provides you with a square containing the face), but you can definitely try. Let me know if there is anything else I can do/anything I missed.