michalfaber / keras_Realtime_Multi-Person_Pose_Estimation

Keras version of Realtime Multi-Person Pose Estimation project
Other
780 stars 372 forks source link

Can't Load the Weights #11

Open zhipeng-fan opened 7 years ago

zhipeng-fan commented 7 years ago

Hi! I am new to this project and Keras. I have downloaded the weights file from the dropbox into /model/keras/model.h5. However, I kept getting this error:

$ python demo_image.py --image sample_images/ski.jpg Using TensorFlow backend. start processing... Traceback (most recent call last): File "demo_image.py", line 245, in model.load_weights(keras_weights_file) File "/home/zf606/miniconda3/lib/python3.6/site-packages/keras/engine/topology.py", line 2613, in load_weights f = h5py.File(filepath, mode='r') File "/home/zf606/miniconda3/lib/python3.6/site-packages/h5py/_hl/files.py", line 271, in init fid = make_fid(name, mode, userblock_size, fapl, swmr=swmr) File "/home/zf606/miniconda3/lib/python3.6/site-packages/h5py/_hl/files.py", line 101, 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 78, in h5py.h5f.open OSError: Unable to open file (Unable to lock file, errno = 5, error message = 'input/output error')

Any ideas on how to fix this?

michalfaber commented 7 years ago

@zhipeng-fan It seems that there is a problem with opening the file. "....Unable to lock file" Check file access permissions on your machine.

zhipeng-fan commented 7 years ago

@michalfaber Yeah. It could run on my own laptop but not the cluster. I guess it is the permission problems. Thanks any way! Great job to transfer the original work into Keras!

QiLiaoDE commented 7 years ago

@michalfaber

Hi Michal,

I also came across some problem with load_weights() using the downloaded file from the dropbox /model/keras/model.h5 The error I got is as follows:

ValueError: Dimension 0 in both shapes must be equal, but are 1 and 38 for 'Assign_140' (op: 'Assign') with input shapes: [1,1,128,19], [38,128,1,1].

And my kerns.json is set to

{ "epsilon": 1e-07, "floatx": "float32", "image_data_format": "channels_last", "backend": "tensorflow" }

Any suggestions? Thank you so much!