pythonface-recognition

Issue FaceRecognition


Trying to run FaceRecognition-GUI-APP-master
program but this error is coming up

Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Users\PC World\AppData\Local\Programs\Python\Python310\lib\tkinter\__init__.py", line 1921, in __call__
    return self.func(*args)
  File "c:\Users\PC World\PycharmProjects\FaceRecognition-GUI-APP-master\app-gui.py", line 186, in trainmodel
    train_classifer(self.controller.active_name)
  File "c:\Users\PC World\PycharmProjects\FaceRecognition-GUI-APP-master\create_classifier.py", line 37, in train_classifer
    clf = cv2.face.LBPHFaceRecognizer_create()
AttributeError: module 'cv2' has no attribute 'face'

Solution

  • It seems that either you have missed the installation of opencv-contrib module or you have installed the outdated version of the same. Install opencv-contrib using:

    pip install opencv-contrib-python
    

    If it's already installed upgrade it using:

    pip install opencv-contrib-python --upgrade