wbenbihi / hourglasstensorflow

Tensorflow implementation of Stacked Hourglass Networks for Human Pose Estimation
MIT License
479 stars 177 forks source link

self.HG = HourglassModel(nFeat= self.params['nfeats'], nStack = self.params['nstacks'], KeyError: 'nfeats' #33

Closed monajalal closed 2 years ago

monajalal commented 6 years ago

I previously mentioned this error here but got no response. I followed the steps you mentioned and downloaded the pre-trained weight into the main directory and got the keyerror as you see below. Can you please suggest a solution? https://github.com/wbenbihi/hourglasstensorlfow/issues/29

[jalal@goku hourglasstensorlfow]$ vi predictClass.py 
[jalal@goku hourglasstensorlfow]$ ls
000003072.jpg                              config.cfg                          hourglass_tiny.pyc    sjn-test-include-from-cwd.py
005808361.jpg                              config.py                           inference.py          sjn-test-include-from-explicit-file.py
DHPE-RegularHG-01283493-Walid-BENBIHI      datagen.py                          inference.pyc         test.py
DHPE-RegularHG-01283493-Walid-BENBIHI.zip  dataset.txt                         mona.jpg              timer.py
README.md                                  filters.py                          opencv_ffmpeg.dll     train_launcher.py
README.txt                                 hg_refined_200.data-00000-of-00001  opencv_ffmpeg_64.dll  v0.1
YOLO_small.ckpt                            hg_refined_200.index                p4frames.mat          yolo_net.py
__pycache__                                hg_tiny                             pckhfULL.png
another_test.py                            hourglass_tiny.py                   predictClass.py
[jalal@goku hourglasstensorlfow]$ python predictClass.py 
/scratch/sjn/anaconda/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6
  return f(*args, **kwds)
/scratch/sjn/anaconda/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
Traceback (most recent call last):
  File "predictClass.py", line 1283, in <module>
    predict = PredictProcessor(params)
  File "predictClass.py", line 63, in __init__
    self.HG = HourglassModel(nFeat= self.params['nfeats'], nStack = self.params['nstacks'], 
KeyError: 'nfeats'
nvnnghia commented 6 years ago

I got the same error. Any suggestion?

weixinxu666 commented 4 years ago

In author's scrips,he wrote 'config_tiny.cfg', you must rewrite it as 'config.cfg', and the problem can be solved!!!!!!