nischi / MMM-Face-Reco-DNN

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

No Face Recognition after update #73

Closed SdeGeata closed 3 years ago

SdeGeata commented 3 years ago

Hello again Thierry;

Today I updated my MM modules, its been too long. As far as the Facial Recognition module goes; i did a git pull & npm install from the module's folder and it all went off without a hitch. I updated the config.js too with the updated info, and rebooted.

Starting the mirror works, but throws the following error in terminal logs:

0|mm | [2020-11-12 17:17:13.256] [ERROR] 0|mm | Whoops! There was an uncaught exception... 0|mm | [2020-11-12 17:17:13.261] [ERROR] 0|mm | PythonShellError: TypeError: __init__() got an unexpected keyword argument 'rotation' 0|mm | at PythonShell.parseError (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:246:21) 0|mm | at terminateIfNeeded (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:129:32) 0|mm | at ChildProcess.<anonymous> (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:121:13) 0|mm | at ChildProcess.emit (events.js:200:13) 0|mm | at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12) 0|mm | ----- Python Traceback ----- 0|mm | File "modules/MMM-Face-Reco-DNN/tools/facerecognition.py", line 80, in <module> 0|mm | vs = VideoStream(usePiCamera=True, rotation=args["rotateCamera"]).start() { 0|mm | traceback: 'Traceback (most recent call last):\n File ' + 0|mm | '"modules/MMM-Face-Reco-DNN/tools/facerecognition.py", line 80, in ' + 0|mm | '<module>\n vs = VideoStream(usePiCamera=True, ' + 0|mm | 'rotation=args["rotateCamera"]).start()\nTypeError: __init__() got ' + 0|mm | "an unexpected keyword argument 'rotation'\n", 0|mm | executable: 'python3', 0|mm | options: null, 0|mm | script: 'modules/MMM-Face-Reco-DNN/tools/facerecognition.py', 0|mm | args: [ 0|mm | '--cascade=modules/MMM-Face-Reco-DNN/tools/haarcascade_frontalface_default.xml', 0|mm | '--encodings=modules/MMM-Face-Reco-DNN/tools/encodings.pickle', 0|mm | '--usePiCamera=1', 0|mm | '--source=0', 0|mm | '--rotateCamera=0', 0|mm | '--method=haar', 0|mm | '--detectionMethod=hog', 0|mm | '--interval=2000', 0|mm | '--output=0', 0|mm | '--extendDataset=False', 0|mm | '--dataset=modules/MMM-Face-Reco-DNN/dataset/', 0|mm | '--tolerance=0.6' 0|mm | ], 0|mm | exitCode: 1 0|mm | } 0|mm | [2020-11-12 17:17:13.306] [ERROR] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?

Any idea what could be happening? Do I need to recode my encodings.pickle?

nischi commented 3 years ago

I do not think you need to recode the encodings. The rotation function is more a function from the camera. Maybe you need to upgrade the dependencies as well? imutils maybe, not sure i did not the rotation feature and not 100% sure what this need.

SdeGeata commented 3 years ago

Hello again;

I checked the version of Imutils installed - it is current. I did an install --upgrade and suddenly now it works. Strange, but whatever. Thanks.