nischi / MMM-Face-Reco-DNN

Face recognition with opencv and deep neural network
MIT License
91 stars 46 forks source link

'toLowerCase' error #12

Closed SdeGeata closed 4 years ago

SdeGeata commented 5 years ago

Hello again;

After some time away on other projects, I have finally gotten back to straightening out my last installation of your module.

python3 facerecognition.py < runs the facial recognition fine and recognizes me - this in a nice change from the other installations I tried. However, I am getting this new error from the electron console on the mirror:

Uncaught TypeError: Cannot read property 'toLowerCase' of undefined at main.js:398 at Array.filter (<anonymous>) at modulesByClass (main.js:397) at Array.withClass (main.js:369) at Class.login_user (:8080/modules/MMM-Fa…Face-Reco-DNN.js:67) at Class.socketNotificationReceived (:8080/modules/MMM-Fa…ace-Reco-DNN.js:137) at module.js:246 at r.<anonymous> (socketclient.js:25) at r.emit (socket.io.js:6) at r.onevent (socket.io.js:8) main.js:398 Uncaught TypeError: Cannot read property 'toLowerCase' of undefined at main.js:398 at Array.filter (<anonymous>) at modulesByClass (main.js:397) at Array.withClass (main.js:369) at Class.logout_user (:8080/modules/MMM-Fa…ace-Reco-DNN.js:106) at :8080/modules/MMM-Fa…ace-Reco-DNN.js:152

nischi commented 5 years ago

Have you changed something that this error pops up?

SdeGeata commented 5 years ago

No, I didn't change a thing. Once i finally got all the things to install, I only tested it by running with python - not on the mirror directly, then I became busy with another project.

Should I uninstall and do a clean installation of Facial Recognition? Do you think that would help?

SdeGeata commented 5 years ago

So I reinstalled Facial Recognition, as well as your module. I am still getting the same error.

nischi commented 5 years ago

Okay, strange. Can you please send me a screenshot of your folderstructure, specialy where you have your images in?

SdeGeata commented 5 years ago

Hello again Thierry;

So this is the folder structure from Magic Mirror on down. Hopefully we can easily find the problem.

On Aug 26, 2019, at 12:59 AM, Thierry Nischelwitzer notifications@github.com wrote:

Okay, strange. Can you please send me a screenshot of your folderstructure, specialy where you have your images in?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nischi/MMM-Face-Reco-DNN/issues/12?email_source=notifications&email_token=ABMKFZ5LE4KHNY65JTOEQGLQGNPLJA5CNFSM4IOZM43KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5DIO7Q#issuecomment-524715902, or mute the thread https://github.com/notifications/unsubscribe-auth/ABMKFZ35HBAARR43B3VP4DDQGNPLJANCNFSM4IOZM43A.

nischi commented 5 years ago

@SdeGeata Hmmm strange, the Attachment has not working via mail, i do not see them, sorry.

SdeGeata commented 5 years ago

Sorry about that. I guess the direct response link doesn't work with attachments. Here's the screen grab.

Screen Shot 2019-08-26 at 3 14 28 PM

nischi commented 5 years ago

Thanks, looks fine to me so far. will check that this week whats going on.

nischi commented 5 years ago

do you have a message like "[MMM-Face-Reco-DNN] Users [SOMETHING] logged in." in the log? I do not find the issue. I will try to add a check, but that only solve the symptom.

nischi commented 5 years ago

@SdeGeata I have pushed a fix to master. Can you test it, please? I can't reproduce the issue but that should solve it.

SdeGeata commented 4 years ago

Hello Thierry;

So I'm back at it again. I did a clean install of the module, re-encoded the dataset and tried it again. It is still not revealing my module, and is throwing the following 2 errors in electron console:

main.js:398 Uncaught TypeError: Cannot read property 'toLowerCase' of undefined at main.js:398 at Array.filter (<anonymous>) at modulesByClass (main.js:397) at Array.withClass (main.js:369) at Class.login_user (MMM-Face-Reco-DNN.js:72) at Class.socketNotificationReceived (MMM-Face-Reco-DNN.js:143) at module.js:246 at r.<anonymous> (socketclient.js:25) at r.emit (index.js:83) at r.onevent (index.js:83) main.js:398 Uncaught TypeError: Cannot read property 'toLowerCase' of undefined at main.js:398 at Array.filter (<anonymous>) at modulesByClass (main.js:397) at Array.withClass (main.js:369) at Class.logout_user (MMM-Face-Reco-DNN.js:111) at MMM-Face-Reco-DNN.js:160

I tested with the facerecognition.py, that works fine:

pi@betyar:~/MagicMirror/modules/MMM-Face-Reco-DNN/tools $ python3 facerecognition.py {"status": "loading encodings + face detector..."} {"status": "starting video stream..."} {"login": {"names": ["Stiofan"]}} {"logout": {"names": ["Stiofan"]}} {"login": {"names": ["Stiofan"]}} {"logout": {"names": ["Stiofan"]}} {"login": {"names": ["Stiofan"]}} {"logout": {"names": ["Stiofan"]}} {"login": {"names": ["Gab"]}} {"logout": {"names": ["Gab"]}} ^C {"status": "elasped time: 167.27"} {"status": "approx. FPS: 0.25"}

I really am at a loss here. I just want this thing to work.

nischi commented 4 years ago

Really strange. What hardware do you have?

SdeGeata commented 4 years ago

Raspberry pi 3b+ running Stretch with a Picam noir 2. All prerequisites for your module are installed. Strange indeed.

nischi commented 4 years ago

The hardware shouldn't be a problem then. Hmm.... can you send me your full MM Config?

SdeGeata commented 4 years ago

Sure, how can I pm you?

nischi commented 4 years ago

Send me a mail to github@nischi.ch

SdeGeata commented 4 years ago

Sent!