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

Error reading the RCR model "data/rcr/face_landmarks_model_rcr_22.bin": Failed to read 8 bytes from input stream! Read 0 #16

Closed
avisingh599 opened this issue Sep 18, 2015 · 9 comments

Comments

@avisingh599
Copy link

Hi Patrick,

Awesome project, thanks for sharing it. I cloned the repository, and compiled it with cmake (with all the required libraries already installed). The compilation went fine, but when I try to run it, I get the following error:

Error reading the RCR model "data/rcr/face_landmarks_model_rcr_22.bin": Failed to read 8 bytes from input stream! Read 0

I am using Ubuntu 14.04. Also, I am testing it on OpenCV 3.0, but that does not seem to be problem here, as far as I can see.

Thanks,
Avi

@patrikhuber
Copy link
Owner

Hi Avi!

Thank you! Hmm, are you running it from the build directory? In that case you need to adjust the path to the model. Can you try to run it by giving it the whole path to the model? E.g.:

rcr-detect -m /home/blabla/path_to_software/face_landmarks_model_rcr_22.bin

(and don't forget the rest of the arguments.)

Cheers,
Patrik

@avisingh599
Copy link
Author

That works! Thanks a lot.

@patrikhuber
Copy link
Owner

Awesome!

(Just for reference: If you run the install target (don't forget to set CMAKE_INSTALL_PREFIX), then all files will get copied to the chosen install directory and the app will work as expected with default arguments.)

Edit: Opened #17 to improve the error message.

Patrik

@Coding4mejie
Copy link

Coding4mejie commented May 19, 2016

Hi Patrick,
@patrikhuber I meet the same error with avisingh599 ,but my problem is "data/rcr/face_landmarks_model_rcr_68.bin",but there's no 68.bin in the document,I am working on windows,could you tell me how to solve it?
Thanks.
Jie

@patrikhuber
Copy link
Owner

@Coding4mejie Can you try with the model under master/apps/rcr/data/face_landmarks_model_rcr_22.bin?

Alternatively, you can run it with the model from 4dface, which you can obtain either through there or from here.

I think in your case the issue is just that you're passing an invalid path to the app, make sure you pass a path to an actual model.

@Coding4mejie
Copy link

@patrikhuber Thanks for your help,I have another question,I hope your can help me.I compile the 4dface project,but the document downloaded from your github don't have ../share/haarcascade_frontalface_alt2.xml,where can I get this file?Sorry for having so many questions.

@shrekdad
Copy link

find the file in opencv directories, it's a model file for face detector.

@patrikhuber
Copy link
Owner

Yea, if you're on Ubuntu, just follow the manual:
sudo apt-get install [...] opencv-data

@Coding4mejie
Copy link

@patrikhuber @datangguo Thank you.I have solve it.

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

4 participants