0

I'm using python 2.7.16 OpenCV 4.1.1 when I run my error is python 'module' object has no attribute 'createEigenFaceRecognizer' I already searched this error because Version of OpenCV but I can't find createEigenFaceRecognizer() in OpenCV 4.1.1 help me pleas.

I have try "cv2.face.createEigenFaceRecognizer()" and "cv2.face_LBPHFaceRecognizer()" but have same error

This my function that error

def train_model(path):

    [images, labels, people]= get_images(sys.argv[1], (256, 256))

    labels= np.asarray(labels, dtype= np.int32)

    print("Initializing eigen FaceRecognizer and training...")
    sttime= time.clock()
    eigen_model= cv2.createEigenFaceRecognizer()
    eigen_model.train(images, labels)
    print("\tCompleted training in "+ str(time.clock()- sttime)+ " Secs!")

    return [eigen_model, people]

this when I call function

    arg_one= sys.argv[1]
    eigen_model, people= train_model(arg_one)
3

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.