Closed tjthejuggler closed 4 years ago
You are getting a permission denied error. So can you make sure you have not placed your model in root directories where you typically won't have write permissions. Also, can you verify that you are using Tensorflow>2? Also, I have NumPy version=1.19.1 installed so if you have an older version you can update it.
That did it! It works now, thank you so much! Really looking forward to playing around with this, I imagined this exact thing and was stoked to see it already existed.
Just for the record, this is exactly what I did -
pip show numpy Version: 1.17.0 pip install numpy --upgrade Version: 1.19.1 installed python head_pose_estimation.py (attempt to run) Same error as before pip show tensorflow Version: 1.5.0 pip install tensorflow --upgrade Version 2.3.0 installed this uninstalled numpy 1.19.1 and put 1.18.5 in its place python head_pose_estimation.py (attempt to run) Works beautifully!
Thanks again!!
Hi, I am getting similar error , but error msg is 'Is a directory '. Any suggestions?
Traceback (most recent call last):
File "head_pose_estimation.py", line 131, in
Name: numpy Version: 1.19.2
Name:tensorflow Version:2.0.0-alpha0
I'm getting this error when trying to run it. Only possible lead I have found is that maybe saved_model.pb is corrupt, but I really have no idea.
C:\Users\Thursday\Anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:493: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint8 = np.dtype([("qint8", np.int8, 1)]) C:\Users\Thursday\Anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:494: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint8 = np.dtype([("quint8", np.uint8, 1)]) C:\Users\Thursday\Anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:495: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint16 = np.dtype([("qint16", np.int16, 1)]) C:\Users\Thursday\Anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:496: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint16 = np.dtype([("quint16", np.uint16, 1)]) C:\Users\Thursday\Anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:497: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint32 = np.dtype([("qint32", np.int32, 1)]) C:\Users\Thursday\Anaconda3\lib\site-packages\tensorflow\python\framework\dtypes.py:502: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. np_resource = np.dtype([("resource", np.ubyte, 1)]) Traceback (most recent call last): File "head_pose_estimation.py", line 128, in
landmark_model = get_landmark_model()
File "C:\Users\Thursday\Projects\Proctoring-AI\face_landmarks.py", line 30, in get_landmark_model
model = keras.models.load_model(saved_model)
File "C:\Users\Thursday\Anaconda3\lib\site-packages\tensorflow\python\keras_impl\keras\models.py", line 240, in load_model
with h5py.File(filepath, mode='r') as f:
File "C:\Users\Thursday\Anaconda3\lib\site-packages\h5py_hl\files.py", line 408, in init
swmr=swmr)
File "C:\Users\Thursday\Anaconda3\lib\site-packages\h5py_hl\files.py", line 173, 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 88, in h5py.h5f.open
OSError: Unable to open file (unable to open file: name = 'models/pose_model', errno = 13, error message = 'Permission denied', flags = 0, o_flags = 0)