Read the statement by Michael Teeuw here.
MMM-Facial-Recognition-OCV3 -> tools.train.py Problem
-
Hello guys,
its my first post here. I am not that firm in Python but already had done some things in C. So lets say i´m a beginner in coding and a beginner in Raspberrys.I installed MM2 and some modules, which are working after some tweaking. But currently i´m having big problems with the Facial Recognition Module (OCV3).
“Everything” installed, did it two times on two rasps and got to the same error:
python tools.capture.py
does work. I´m capturing images, they are saved and cropped and whatever.But when i try
python train.tools.py
i get:Remember to set the name list environment variable FACE_USERS Reading training images... -------------------- Assign label 1 to xxx Assign label 2 to xxc -------------------- Read 43 positive images and 400 negative images. 7 images from subject xxx 36 images from subject xxc -------------------- Training model with threshold 80 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 71, in train model = ToolsConfig.model() File "/home/pi/MagicMirror/modules/MMM-Facial-Recognition-OCV3/lib/tools/config.py", line 99, in model return CommonConfig.model(cls.POSITIVE_THRESHOLD) File "/home/pi/MagicMirror/modules/MMM-Facial-Recognition-OCV3/lib/common/commonconfig.py", line 51, in model model = cv2.face.LBPHFaceRecognizer_create(threshold=thresh) AttributeError: 'module' object has no attribute 'face'and with
python3 tools.train.pyTraceback (most recent call last): File "tools.train.py", line 10, in <module> from lib.tools.train import ToolsTrain File "/home/pi/MagicMirror/modules/MMM-Facial-Recognition-OCV3/lib/tools/train.py", line 17, in <module> import cv2 File "/usr/local/lib/python3.5/dist-packages/cv2/__init__.py", line 3, in <module> from .cv2 import * ImportError: libhdf5_serial.so.100: cannot open shared object file: No such file or directorypython2 tools.train.py
gives the same result as
pythonI am directly writing on the rasp, not connected by ssh or so.
opencv, opencv_contrib are installed, pip is there.
It looks like cv2 is not there … when i usepythonand thenimport cv2
there is no error. But when i then ask for help(cv2.face) the error appears:
AttributeError: module object has no attribute faceI got Python 2 (ver 2.7.13) and Python 3 (ver 3.5.3), numpy (ver 1.12.1), OpenCV (ver 3.3.0)
Maybe i did not install everything needed? But it worked till the train part. Maybe some links are missing or wrong?
I hope you can bring up some ideas or at best a working solution ^^.Thanks
Nec -
Im having the exact same error readings. Frustrating. Has anyone managed to tackle or solve this issue?
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