Open 666Necrom opened 5 years ago
Still nobody have found a way to this problem? I have it myself, and it's kinda annoying, after that i have been using multiple days to figure out the cv2 can't be found problem.
I fixed the issue by replacing: cv2.face.LBPHFaceRecognizer_create(threshold=thresh) with: cv2.face.createLBPHFaceRecognizer(threshold=thresh) in the file: MMM-Facial-Recognition-OCV3/lib/common/commonconfig.py
@Blauenfeldt your fix helped, but then I ended up with the following. Is there a solution for this one?
Training model with threshold 80
Traceback (most recent call last):
File "tools.train.py", line 14, in
EDIT: Replacing model.write with model.save in the file /home/pi/MagicMirror/modules/MMM-Facial-Recognition-OCV3/lib/tools/train.py helped
I got it all working that time. the problem is, as I can remember, that from Python, as it was programmed in, to Python3.1 there was some changes to got things are spelled. Like @JahFyahh said, "write" was used in Python, and in Python3.1 "save" is used instead. @666Necrom I think you can mark this as solved.
Once again me ... another problem:
When i start training i get the following result:
python tools.train.py
Pictures and names are recognized .. but then this follows:
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'