Code Monkey home page Code Monkey logo

Comments (4)

Blauenfeldt avatar Blauenfeldt commented on June 30, 2024

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.

from mmm-facial-recognition-ocv3.

Blauenfeldt avatar Blauenfeldt commented on June 30, 2024

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

from mmm-facial-recognition-ocv3.

JahFyahh avatar JahFyahh commented on June 30, 2024

@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
ToolsTrain().train()
File "/home/pi/MagicMirror/modules/MMM-Facial-Recognition-OCV3/lib/tools/train.py", line 74, in train
model.write(ToolsConfig.TRAINING_FILE)
AttributeError: 'cv2.face_LBPHFaceRecognizer' object has no attribute 'write'

EDIT:
Replacing model.write with model.save in the file /home/pi/MagicMirror/modules/MMM-Facial-Recognition-OCV3/lib/tools/train.py helped

from mmm-facial-recognition-ocv3.

Blauenfeldt avatar Blauenfeldt commented on June 30, 2024

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.

from mmm-facial-recognition-ocv3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.