Read the statement by Michael Teeuw here.
MMM-Facial-Recognition-OCV3 cant run toold.capture.py
-
Hi!
I followed the steps for installation. I have not had any problems.
However, when I run the tools.capture.py file I get the following error.RESTART: /home/pi/MagicMirror/modules/MMM-Facial-Recognition-OCV3/tools.capture.py
Traceback (most recent call last):
File “/home/pi/MagicMirror/modules/MMM-Facial-Recognition-OCV3/tools.capture.py”, line 9, in
from lib.tools.capture import ToolsCapture
File “/home/pi/MagicMirror/modules/MMM-Facial-Recognition-OCV3/lib/tools/capture.py”, line 19, in
from config import ToolsConfig
ImportError: No module named ‘config’Can you help me?
-
Hello ,
i had the same Problem. Clean Install from here…
" https://github.com/normyx/MMM-Facial-Recognition-OCV3 "pi@raspberrypi:~/MagicMirror/modules/MMM-Facial-Recognition-OCV3 $ sudo python3 tools.capture.py
Traceback (most recent call last):
File “tools.capture.py”, line 9, in
from lib.tools.capture import ToolsCapture
File “/home/pi/MagicMirror/modules/MMM-Facial-Recognition-OCV3/lib/tools/capture.py”, line 19, in
from config import ToolsConfig
ImportError: cannot import name ‘ToolsConfig’ -
I found the issue.
Change in capture.py
from config import ToolsConfig -> from .config import ToolsConfig
-
@Sebi76 said in MMM-Facial-Recognition-OCV3 cant run toold.capture.py:
from .config import ToolsConfig
Well this solved the first of two problems for me. I have been getting the same error on capture since i installed. Thanks!
Now however, i get this error when trying to train:
OpenCV Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /home/pi/opencv/modules/imgproc/src/imgwarp.cpp, line 3483 Traceback (most recent call last): File "tools.train.py", line 14, in <module> ToolsTrain().train() File "/home/pi/MagicMirror/modules/MMM-Facial-Recognition-OCV3/lib/tools/train.py", line 53, in train faces.append(self.prepareImage(filename)) File "/home/pi/MagicMirror/modules/MMM-Facial-Recognition-OCV3/lib/tools/train.py", line 29, in prepareImage return self.face.resize(cv2.imread(filename, cv2.IMREAD_GRAYSCALE),ToolsConfig.FACE_WIDTH, ToolsConfig.FACE_HEIGHT) File "/home/pi/MagicMirror/modules/MMM-Facial-Recognition-OCV3/lib/common/face.py", line 113, in resize return cv2.resize(image, (face_width, face_height), interpolation=cv2.INTER_LANCZOS4) cv2.error: /home/pi/opencv/modules/imgproc/src/imgwarp.cpp:3483: error: (-215) ssize.width > 0 && ssize.height > 0 in function resizeAny idea what that’s about???
-
Nevermind, I just fixed it! It was an outdated PIP that wasn’t getting updated without SUDO.
sudo pip install future --upgrade
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login