Skip to content

cv_face_FaceRecognizer_read erro #27

@FranciscoMaiungulo

Description

@FranciscoMaiungulo

Hey guys.
I'm here with this bug in my code and I can't even find a solution for it.
I've already used "load" instead of "read", but still an error appears. When I change the opencv version, I can't create the training "yml" file anymore.
Below is my code with the "yml" file already created.

from PIL import Image
import cv2
import numpy as np
import os

lbph_face_classifier = cv2.face.LBPHFaceRecognizer_create()
lbph_face_classifier.read('/train/lbph_classifier.yml')
imagem_teste = ('C:/Users/MD Francisco/Desktop/Expert/dlib/Reconhecimento/yalefaces/test/subject10.sad.gif')
imagem = Image.open(imagem_teste).convert('L')
imagem_np = np.array('uint8')
print(imagem_np)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions