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

unable load weights models/pose_model #28

Closed
shilezhang opened this issue Oct 27, 2020 · 2 comments
Closed

unable load weights models/pose_model #28

shilezhang opened this issue Oct 27, 2020 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@shilezhang
Copy link

Hello, when I run eye_tracker.py, I got the error:
File "eye_tracker.py", line 154, in <module> landmark_model = get_landmark_model()
File "~/Proctoring-AI/face_landmarks.py", line 30, in get_landmark_model model = keras.models.load_model(saved_model)
File "~/.virtualenvs/cv/lib/python3.6/site-packages/tensorflow/python/keras/_impl/keras/engine/saving.py", line 235, in load_model
with h5py.File(filepath, mode='r') as f:
File "~/.virtualenvs/cv/lib/python3.6/site-packages/h5py/_hl/files.py", line 394, in __init__ swmr=swmr)
File "~/.virtualenvs/cv/lib/python3.6/site-packages/h5py/_hl/files.py", line 170, in make_fid fid = h5f.open(name, flags, fapl=fapl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5f.pyx", line 85, in h5py.h5f.open
OSError: Unable to open file (file read failed: time = Tue Oct 27 14:43:05 2020 , filename = 'models/pose_model', file descriptor = 3, errno = 21, error message = 'Is a directory', buf = 0x7fff830498d0, total read size = 8, bytes this sub-read = 8, bytes actually read = 18446744073709551615, offset = 0)
I think the weights for detecting facial landmarks has a problem. I tried to download from pre-trained CNN weights https://github.com/yinguobing/head-pose-estimation and still not working.
Can anyone pls offer a clue?

@vardanagarwal vardanagarwal added the duplicate This issue or pull request already exists label Oct 27, 2020
@vardanagarwal
Copy link
Owner

@shilezhang pls have a look here

@shilezhang
Copy link
Author

@shilezhang pls have a look here

Hi Vardan, thanks for replying. I tried to put the weights file in current path but it's not working. Finally upgrading TensorFlow to 2+ solved my problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants