Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File can't be opened for reading! in function 'cv::face::FaceRecognizer::read' #27

Open
Jyothsna2795 opened this issue Feb 27, 2020 · 4 comments

Comments

@Jyothsna2795
Copy link

I have been trying basic example provided in read.me i got below error. Please help me

(libfaceid_env) E:\assignment\training\Image_recognition\libfaceid-master>python TRY1.PY
Traceback (most recent call last):
File "TRY1.PY", line 10, in
face_encoder = FaceEncoder(model=FaceEncoderModels.DEFAULT, path=INPUT_DIR_MODEL_ENCODING, path_training=INPUT_DIR_MODEL_TRAINING, training=False)
File "E:\assignment\training\Image_recognition\libfaceid-master\libfaceid\encoder.py", line 48, in init
self._base = FaceEncoder_LBPH(path, path_training, training)
File "E:\assignment\training\Image_recognition\libfaceid-master\libfaceid\encoder.py", line 98, in init
self._clf.read(self._path_training + OUTPUT_LBPH_CLASSIFIER)
cv2.error: OpenCV(4.2.0) C:\projects\opencv-python\opencv_contrib\modules\face\src\facerec.cpp:61: error: (-2:Unspecified error) File can't be opened for reading! in function 'cv::face::FaceRecognizer::read'

@richmondu
Copy link
Owner

richmondu commented Feb 27, 2020

Haven't tried with OpenCV 4. This repo is still using:
opencv-python==3.4.3.18
opencv-contrib-python==3.4.3.18

Refer to https://github.com/richmondu/libfaceid/blob/master/requirements.txt

Try installing opencv-contrib-python==4.2.0

@harshsp31
Copy link

Hi @richmondu ,
Thanks for sharing the great work. I am facing the same problem. I also tried downgrading OpenCV to 3.4.3.18 but I still faced the same error. Please help!

@FahriBilici
Copy link

I have same error

@MeenakshiArumugam
Copy link

I'm also facing the same issue could you help pls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants