Everything works. I’m just stupid as hell and didn’t add the classes to the other modules.
Read the statement by Michael Teeuw here.
Posts made by Antagonist
-
RE: MMM-Face-Reco-DNN doesn't work
-
RE: MMM-Face-Reco-DNN doesn't work
@sdetweil unfortunately there is nothing which would help.
Has anybody else an idea? -
RE: MMM-Face-Reco-DNN doesn't work
@sdetweil Ok but where can I adjust the path to link it properly with opencv? And thank you, you have been a great help so far!
-
RE: MMM-Face-Reco-DNN doesn't work
@sdetweil I have Python version 3.7.3.
And I have OpenCV 4.1.1 installed:(cv) pi@raspberrypi:~ $ python Python 3.7.3 (default, Apr 3 2019, 05:39:12) [GCC 8.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import cv2 >>> cv2.__version__ '4.1.1'
Thanks for your help!
-
RE: MMM-Face-Reco-DNN doesn't work
@sdetweil Yes, I think I installed all dependencies accordingly and followed this instruction for opencv.
-
RE: MMM-Face-Reco-DNN doesn't work
@Blauenfeldt Ahh that doesn’t sound very good. I’ve installed python in an virtual environment. Do you know a solution for this problem? Thanks a lot!
-
RE: MMM-Face-Reco-DNN doesn't work
Error log:
SyntaxError: Unexpected token T in JSON at position 0 at JSON.parse (<anonymous>) at PythonShell.asJson (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:358:21) at /home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:310:42 at Array.forEach (<anonymous>) at PythonShell.recieveInternal (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:306:15) at PythonShell.receiveStderr (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:290:21) at Socket.<anonymous> (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:108:18) at Socket.emit (events.js:182:13) at addChunk (_stream_readable.js:279:12) at readableAddChunk (_stream_readable.js:260:13) { Error: ModuleNotFoundError: No module named 'cv2' at PythonShell.parseError (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:246:21) at terminateIfNeeded (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:129:32) at ChildProcess.<anonymous> (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:121:13) at ChildProcess.emit (events.js:182:13) at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12) ----- Python Traceback ----- File "modules/MMM-Face-Reco-DNN/tools/facerecognition.py", line 5, in <module> from stream import VideoStream File "/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/tools/stream.py", line 2, in <module> from webcam import WebcamVideoStream File "/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/tools/webcam.py", line 3, in <module> import cv2 traceback: 'Traceback (most recent call last):\n File "modules/MMM-Face-Reco-DNN/tools/facerecognition.py", line 5, in <module>\n from stream import VideoStream\n File "/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/tools/stream.py", line 2, in <module>\n from webcam import WebcamVideoStream\n File "/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/tools/webcam.py", line 3, in <module>\n import cv2\nModuleNotFoundError: No module named \'cv2\'\n', executable: 'python3', options: null, script: 'modules/MMM-Face-Reco-DNN/tools/facerecognition.py', args: [ '--cascade=modules/MMM-Face-Reco-DNN/tools/haarcascade_frontalface_default.xml', '--encodings=modules/MMM-Face-Reco-DNN/tools/encodings.pickle', '--usePiCamera=1', '--method=dnn', '--detectionMethod=hog', '--interval=2000', '--output=0', '--extendDataset=False', '--dataset=modules/MMM-Face-Reco-DNN/dataset/' ], exitCode: 1 } SyntaxError: Unexpected token T in JSON at position 0 at JSON.parse (<anonymous>) at PythonShell.asJson (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:358:21) at /home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:310:42 at Array.forEach (<anonymous>) at PythonShell.recieveInternal (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:306:15) at PythonShell.receiveStderr (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:290:21) at Socket.<anonymous> (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:108:18) at Socket.emit (events.js:182:13) at addChunk (_stream_readable.js:279:12) at readableAddChunk (_stream_readable.js:260:13) { Error: ModuleNotFoundError: No module named 'cv2' at PythonShell.parseError (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:246:21) at terminateIfNeeded (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:129:32) at ChildProcess.<anonymous> (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:121:13) at ChildProcess.emit (events.js:182:13) at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12) ----- Python Traceback ----- File "modules/MMM-Face-Reco-DNN/tools/facerecognition.py", line 5, in <module> from stream import VideoStream File "/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/tools/stream.py", line 2, in <module> from webcam import WebcamVideoStream File "/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/tools/webcam.py", line 3, in <module> import cv2 traceback: 'Traceback (most recent call last):\n File "modules/MMM-Face-Reco-DNN/tools/facerecognition.py", line 5, in <module>\n from stream import VideoStream\n File "/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/tools/stream.py", line 2, in <module>\n from webcam import WebcamVideoStream\n File "/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/tools/webcam.py", line 3, in <module>\n import cv2\nModuleNotFoundError: No module named \'cv2\'\n', executable: 'python3', options: null, script: 'modules/MMM-Face-Reco-DNN/tools/facerecognition.py', args: [ '--cascade=modules/MMM-Face-Reco-DNN/tools/haarcascade_frontalface_default.xml', '--encodings=modules/MMM-Face-Reco-DNN/tools/encodings.pickle', '--usePiCamera=1', '--method=dnn', '--detectionMethod=hog', '--interval=2000', '--output=0', '--extendDataset=False', '--dataset=modules/MMM-Face-Reco-DNN/dataset/' ], exitCode: 1 } TypeError: Cannot read property 'childProcess' of undefined at Class.destroy (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_helper.js:84:18) at Class.python_stop (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_helper.js:79:10) at Class.stop (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_helper.js:102:10) at App.stop (/home/pi/MagicMirror/js/app.js:247:16) at process.App.process.on (/home/pi/MagicMirror/js/app.js:261:8) at process.emit (events.js:182:13) SyntaxError: Unexpected token T in JSON at position 0 at JSON.parse (<anonymous>) at PythonShell.asJson (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:358:21) at /home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:310:42 at Array.forEach (<anonymous>) at PythonShell.recieveInternal (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:306:15) at PythonShell.receiveStderr (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:290:21) at Socket.<anonymous> (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:108:18) at Socket.emit (events.js:182:13) at addChunk (_stream_readable.js:279:12) at readableAddChunk (_stream_readable.js:260:13) { Error: ModuleNotFoundError: No module named 'cv2' at PythonShell.parseError (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:246:21) at terminateIfNeeded (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:129:32) at ChildProcess.<anonymous> (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:121:13) at ChildProcess.emit (events.js:182:13) at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12) ----- Python Traceback ----- File "modules/MMM-Face-Reco-DNN/tools/facerecognition.py", line 5, in <module> from stream import VideoStream File "/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/tools/stream.py", line 2, in <module> from webcam import WebcamVideoStream File "/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/tools/webcam.py", line 3, in <module> import cv2 traceback: 'Traceback (most recent call last):\n File "modules/MMM-Face-Reco-DNN/tools/facerecognition.py", line 5, in <module>\n from stream import VideoStream\n File "/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/tools/stream.py", line 2, in <module>\n from webcam import WebcamVideoStream\n File "/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/tools/webcam.py", line 3, in <module>\n import cv2\nModuleNotFoundError: No module named \'cv2\'\n', executable: 'python3', options: null, script: 'modules/MMM-Face-Reco-DNN/tools/facerecognition.py', args: [ '--cascade=modules/MMM-Face-Reco-DNN/tools/haarcascade_frontalface_default.xml', '--encodings=modules/MMM-Face-Reco-DNN/tools/encodings.pickle', '--usePiCamera=1', '--method=dnn', '--detectionMethod=hog', '--interval=2000', '--output=0', '--extendDataset=False', '--dataset=modules/MMM-Face-Reco-DNN/dataset/' ], exitCode: 1 } TypeError: Cannot read property 'childProcess' of undefined at Class.destroy (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_helper.js:84:18) at Class.python_stop (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_helper.js:79:10) at Class.stop (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_helper.js:102:10) at App.stop (/home/pi/MagicMirror/js/app.js:247:16) at App.app.on (/home/pi/MagicMirror/js/electron.js:110:7) at App.emit (events.js:182:13) at Object.exports.execute (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/browser/api/menu-item-roles.js:263:19) at MenuItem.click (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/browser/api/menu-item.js:53:16) at Function.executeCommand (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/browser/api/menu.js:30:13) SyntaxError: Unexpected token T in JSON at position 0 at JSON.parse (<anonymous>) at PythonShell.asJson (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:358:21) at /home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:310:42 at Array.forEach (<anonymous>) at PythonShell.recieveInternal (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:306:15) at PythonShell.receiveStderr (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:290:21) at Socket.<anonymous> (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:108:18) at Socket.emit (events.js:182:13) at addChunk (_stream_readable.js:279:12) at readableAddChunk (_stream_readable.js:260:13) { Error: ModuleNotFoundError: No module named 'cv2' at PythonShell.parseError (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:246:21) at terminateIfNeeded (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:129:32) at ChildProcess.<anonymous> (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:121:13) at ChildProcess.emit (events.js:182:13) at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12) ----- Python Traceback ----- File "modules/MMM-Face-Reco-DNN/tools/facerecognition.py", line 5, in <module> from stream import VideoStream File "/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/tools/stream.py", line 2, in <module> from webcam import WebcamVideoStream File "/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/tools/webcam.py", line 3, in <module> import cv2 traceback: 'Traceback (most recent call last):\n File "modules/MMM-Face-Reco-DNN/tools/facerecognition.py", line 5, in <module>\n from stream import VideoStream\n File "/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/tools/stream.py", line 2, in <module>\n from webcam import WebcamVideoStream\n File "/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/tools/webcam.py", line 3, in <module>\n import cv2\nModuleNotFoundError: No module named \'cv2\'\n', executable: 'python3', options: null, script: 'modules/MMM-Face-Reco-DNN/tools/facerecognition.py', args: [ '--cascade=modules/MMM-Face-Reco-DNN/tools/haarcascade_frontalface_default.xml', '--encodings=modules/MMM-Face-Reco-DNN/tools/encodings.pickle', '--usePiCamera=1', '--method=dnn', '--detectionMethod=hog', '--interval=2000', '--output=0', '--extendDataset=False', '--dataset=modules/MMM-Face-Reco-DNN/dataset/' ], exitCode: 1 } TypeError: Cannot read property 'childProcess' of undefined at Class.destroy (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_helper.js:84:18) at Class.python_stop (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_helper.js:79:10) at Class.stop (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_helper.js:102:10) at App.stop (/home/pi/MagicMirror/js/app.js:247:16) at process.App.process.on (/home/pi/MagicMirror/js/app.js:261:8) at process.emit (events.js:182:13) TypeError: Cannot read property 'childProcess' of undefined at Class.destroy (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_helper.js:84:18) at Class.python_stop (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_helper.js:79:10) at Class.stop (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_helper.js:102:10) at App.stop (/home/pi/MagicMirror/js/app.js:247:16) at process.App.process.on (/home/pi/MagicMirror/js/app.js:261:8) at process.emit (events.js:182:13) SyntaxError: Unexpected token T in JSON at position 0 at JSON.parse (<anonymous>) at PythonShell.asJson (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:358:21) at /home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:310:42 at Array.forEach (<anonymous>) at PythonShell.recieveInternal (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:306:15) at PythonShell.receiveStderr (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:290:21) at Socket.<anonymous> (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:108:18) at Socket.emit (events.js:182:13) at addChunk (_stream_readable.js:279:12) at readableAddChunk (_stream_readable.js:260:13) { Error: ModuleNotFoundError: No module named 'cv2' at PythonShell.parseError (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:246:21) at terminateIfNeeded (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:129:32) at ChildProcess.<anonymous> (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:121:13) at ChildProcess.emit (events.js:182:13) at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12) ----- Python Traceback ----- File "modules/MMM-Face-Reco-DNN/tools/facerecognition.py", line 5, in <module> from stream import VideoStream File "/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/tools/stream.py", line 2, in <module> from webcam import WebcamVideoStream File "/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/tools/webcam.py", line 3, in <module> import cv2 traceback: 'Traceback (most recent call last):\n File "modules/MMM-Face-Reco-DNN/tools/facerecognition.py", line 5, in <module>\n from stream import VideoStream\n File "/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/tools/stream.py", line 2, in <module>\n from webcam import WebcamVideoStream\n File "/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/tools/webcam.py", line 3, in <module>\n import cv2\nModuleNotFoundError: No module named \'cv2\'\n', executable: 'python3', options: null, script: 'modules/MMM-Face-Reco-DNN/tools/facerecognition.py', args: [ '--cascade=modules/MMM-Face-Reco-DNN/tools/haarcascade_frontalface_default.xml', '--encodings=modules/MMM-Face-Reco-DNN/tools/encodings.pickle', '--usePiCamera=1', '--method=dnn', '--detectionMethod=hog', '--interval=2000', '--output=0', '--extendDataset=False', '--dataset=modules/MMM-Face-Reco-DNN/dataset/' ], exitCode: 1 } TypeError: Cannot read property 'childProcess' of undefined at Class.destroy (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_helper.js:84:18) at Class.python_stop (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_helper.js:79:10) at Class.stop (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_helper.js:102:10) at App.stop (/home/pi/MagicMirror/js/app.js:247:16) at App.app.on (/home/pi/MagicMirror/js/electron.js:110:7) at App.emit (events.js:182:13) SyntaxError: Unexpected token T in JSON at position 0 at JSON.parse (<anonymous>) at PythonShell.asJson (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:358:21) at /home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:310:42 at Array.forEach (<anonymous>) at PythonShell.recieveInternal (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:306:15) at PythonShell.receiveStderr (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:290:21) at Socket.<anonymous> (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:108:18) at Socket.emit (events.js:182:13) at addChunk (_stream_readable.js:279:12) at readableAddChunk (_stream_readable.js:260:13) { Error: ModuleNotFoundError: No module named 'cv2' at PythonShell.parseError (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:246:21) at terminateIfNeeded (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:129:32) at ChildProcess.<anonymous> (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:121:13) at ChildProcess.emit (events.js:182:13) at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12) ----- Python Traceback ----- File "modules/MMM-Face-Reco-DNN/tools/facerecognition.py", line 5, in <module> from stream import VideoStream File "/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/tools/stream.py", line 2, in <module> from webcam import WebcamVideoStream File "/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/tools/webcam.py", line 3, in <module> import cv2 traceback: 'Traceback (most recent call last):\n File "modules/MMM-Face-Reco-DNN/tools/facerecognition.py", line 5, in <module>\n from stream import VideoStream\n File "/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/tools/stream.py", line 2, in <module>\n from webcam import WebcamVideoStream\n File "/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/tools/webcam.py", line 3, in <module>\n import cv2\nModuleNotFoundError: No module named \'cv2\'\n', executable: 'python3', options: null, script: 'modules/MMM-Face-Reco-DNN/tools/facerecognition.py', args: [ '--cascade=modules/MMM-Face-Reco-DNN/tools/haarcascade_frontalface_default.xml', '--encodings=modules/MMM-Face-Reco-DNN/tools/encodings.pickle', '--usePiCamera=1', '--method=dnn', '--detectionMethod=hog', '--interval=2000', '--output=0', '--extendDataset=False', '--dataset=modules/MMM-Face-Reco-DNN/dataset/' ], exitCode: 1 } TypeError: Cannot read property 'childProcess' of undefined at Class.destroy (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_helper.js:84:18) at Class.python_stop (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_helper.js:79:10) at Class.stop (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_helper.js:102:10) at App.stop (/home/pi/MagicMirror/js/app.js:247:16) at process.App.process.on (/home/pi/MagicMirror/js/app.js:261:8) at process.emit (events.js:182:13) TypeError: Cannot read property 'childProcess' of undefined at Class.destroy (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_helper.js:84:18) at Class.python_stop (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_helper.js:79:10) at Class.stop (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_helper.js:102:10) at App.stop (/home/pi/MagicMirror/js/app.js:247:16) at process.App.process.on (/home/pi/MagicMirror/js/app.js:261:8) at process.emit (events.js:182:13) TypeError: Cannot read property 'childProcess' of undefined at Class.destroy (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_helper.js:84:18) at Class.python_stop (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_helper.js:79:10) at Class.stop (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_helper.js:102:10) at App.stop (/home/pi/MagicMirror/js/app.js:247:16) at process.App.process.on (/home/pi/MagicMirror/js/app.js:261:8) at process.emit (events.js:182:13) { Error: spawn home/pi/.virtualenvs/cv/bin/python3.7 ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:229:19) at onErrorNT (internal/child_process.js:406:16) at process._tickCallback (internal/process/next_tick.js:63:19) errno: 'ENOENT', code: 'ENOENT', syscall: 'spawn home/pi/.virtualenvs/cv/bin/python3.7', path: 'home/pi/.virtualenvs/cv/bin/python3.7', spawnargs: [ 'modules/MMM-Face-Reco-DNN/tools/facerecognition.py', '--cascade=modules/MMM-Face-Reco-DNN/tools/haarcascade_frontalface_default.xml', '--encodings=modules/MMM-Face-Reco-DNN/tools/encodings.pickle', '--usePiCamera=1', '--method=dnn', '--detectionMethod=hog', '--interval=2000', '--output=0', '--extendDataset=False', '--dataset=modules/MMM-Face-Reco-DNN/dataset/' ] } TypeError: Cannot read property 'childProcess' of undefined at Class.destroy (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_helper.js:84:18) at Class.python_stop (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_helper.js:79:10) at Class.stop (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_helper.js:102:10) at App.stop (/home/pi/MagicMirror/js/app.js:247:16) at process.App.process.on (/home/pi/MagicMirror/js/app.js:261:8) at process.emit (events.js:182:13) { Error: spawn home/pi/.virtualenvs/cv/bin/python3 ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:229:19) at onErrorNT (internal/child_process.js:406:16) at process._tickCallback (internal/process/next_tick.js:63:19) errno: 'ENOENT', code: 'ENOENT', syscall: 'spawn home/pi/.virtualenvs/cv/bin/python3', path: 'home/pi/.virtualenvs/cv/bin/python3', spawnargs: [ 'modules/MMM-Face-Reco-DNN/tools/facerecognition.py', '--cascade=modules/MMM-Face-Reco-DNN/tools/haarcascade_frontalface_default.xml', '--encodings=modules/MMM-Face-Reco-DNN/tools/encodings.pickle', '--usePiCamera=1', '--method=dnn', '--detectionMethod=hog', '--interval=2000', '--output=0', '--extendDataset=False', '--dataset=modules/MMM-Face-Reco-DNN/dataset/' ] }
Config.js:
/* Magic Mirror Config Sample * * By Michael Teeuw http://michaelteeuw.nl * MIT Licensed. * * For more information how you can configurate this file * See https://github.com/MichMich/MagicMirror#configuration * */ var config = { address: "localhost", // Address to listen on, can be: // - "localhost", "127.0.0.1", "::1" to listen on loopback interface // - another specific IPv4/6 to listen on a specific interface // - "", "0.0.0.0", "::" to listen on any interface // Default, when address config is left out, is "localhost" port: 8080, ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses // or add a specific IPv4 of 192.168.1.5 : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"], // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"], language: "de", timeFormat: 24, units: "metric", modules: [ { module: "alert", }, { module: "updatenotification", position: "top_bar" }, { module: "clock", position: "top_left" }, { module: "calendar", header: "Torbens Kalender", position: "top_left", config: { calendars: [ { symbol: "calendar-check", url: "https://calendar.google.com/calendar/ical/basic.ics", maximumEntries: "5", auth: { user: "user", pass: "mypass", method: "basic" } } ] } }, { module: "compliments", disabled: true, position: "lower_third", config: { compliments: { anytime: [ "Hallo" ], morning: [ "Guten Morgen!", "Gut geschlafen?", ], afternoon: [ "Guten Tag", ], evening: [ "Guten Abend", ] } } }, { module: "currentweather", position: "top_right", config: { locationID: "2895044", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city appid: "myappid" } }, { module: "weatherforecast", position: "top_right", header: "Vorhersage", config: { locationID: "2895044", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city appid: "myappid" } }, { module: "newsfeed", position: "bottom_bar", config: { feeds: [ { title: "Spiegel", url: "https://www.spiegel.de/schlagzeilen/tops/index.rss" } ], showSourceTitle: true, showPublishDate: true, broadcastNewsFeeds: true, broadcastNewsUpdates: true, showDescription: true, updateInterval: "20000" } }, { module: 'MMM-Face-Reco-DNN', config: { // Logout 15 seconds after user was not detecte anymore, if they will be detected between this 15 Seconds, they delay will start again logoutDelay: 15000, // How many time the recognition starts, with a RasPi 3+ it would be good every 2 seconds checkInterval: 2000, // Module set used for strangers and if no user is detected defaultClass: 'default', // Set of modules which should be shown for every user everyoneClass: 'everyone', // XML to recognize with haarcascae cascade: 'modules/MMM-Face-Reco-DNN/tools/haarcascade_frontalface_default.xml', // Pre encoded pickle with the faces encodings: 'modules/MMM-Face-Reco-DNN/tools/encodings.pickle', // You wanna use pi camera or usb / builtin (1 = raspi camera, 0 = other camera) usePiCamera: 1, // Method of face detection (dnn = deep neural network, haar = haarcascade) method: 'dnn', // Which face detection model to use. "hog" is less accurate but faster on CPUs. "cnn" is a more accurate deep-learning model which is GPU/CUDA accelerated (if available). detectionMethod: 'hog', // How fast in ms should the modules hide and show (face effect) animationSpeed: 0, // Path to Python to run the face recognition (null / '' means default path) pythonPath: '/home/pi/.virtualenvs/cv/bin/python3.7', // Should shown welcome message over alert module from MagicMirror welcomeMessage: true, // Save some pictures from recognized people, if unknown we save it in folder "unknown" // So you can extend your dataset and retrain it afterwards for better recognitions extendDataset: false, // if extenDataset is set, you need to set the full path of the dataset dataset: 'modules/MMM-Face-Reco-DNN/dataset/' } }, ] }; /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") {module.exports = config;}
I don’t know but I’ve attached the error log and you can find my config.js above. Thank you and sorry for the long message.
-
MMM-Face-Reco-DNN doesn't work
Everything works fine without the module integration in the MagicMirror/config.js but with the additional text there is no response and the monitor is black. I installed python in a virtual environment but I changed the pythonpath accordingly so I don’t know if this is the problem.
If somebody could kindly show their config.js with the module enabled this would be extremly helpful. -
RE: Azure Cognitive Services API
@Sean Thank you. I assume this would’t make a lot of sense since opencv is free and azure has a limited number of recognitions. Nevertheless an emotion detector would be cool. Because of your fancy Module Developer Icon I think you have a lot more experience with this stuff so do you know if something like this currently exists?