una-dinosauria / 3d-pose-baseline

A simple baseline for 3d human pose estimation in tensorflow. Presented at ICCV 17.
MIT License
1.42k stars 354 forks source link

Issue running the code on Windows 10 #46

Closed noxxomatik closed 6 years ago

noxxomatik commented 6 years ago

Hello,

I wanted to try out your code but run into some trouble on Windows 10. I downloaded the pre-trained model and executed the given command for that. It seems to have issues finding the right paths. This is the output after it´s done reading and normalizing the data:

2018-02-21 15:51:17.191069: W C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\framework\op_kernel.cc:1192] Not found: NewRandomAccessFile failed to Create/Open: experiments\All\dropout_0.5\epochs_200\lr_0.001\residual\depth_2\linear_size1024\batch_size_64\no_procrustes\maxnorm\batch_normalization\use_stacked_hourglass\predict_17\checkpoint-4874200.data-00000-of-00001 : Das System kann den angegebenen Pfad nicht finden. ; No such process

This output shows several times. After that this error appears:

Traceback (most recent call last): File "C:\Users\Sven\AppData\Local\conda\conda\envs\python3\lib\site-packages\tensorflow\python\client\session.py", line 1323, in _do_call return fn(*args) File "C:\Users\Sven\AppData\Local\conda\conda\envs\python3\lib\site-packages\tensorflow\python\client\session.py", line 1302, in _run_fn status, run_metadata) File "C:\Users\Sven\AppData\Local\conda\conda\envs\python3\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 473, in exit c_api.TF_GetCode(self.status.status)) tensorflow.python.framework.errors_impl.NotFoundError: NewRandomAccessFile failed to Create/Open: experiments\All\dropout_0.5\epochs_200\lr_0.001\residual\depth_2\linear_size1024\batch_size_64\no_procrustes\maxnorm\batch_normalization\use_stacked_hourglass\predict_17\checkpoint-4874200.data-00000-of-00001 : Das System kann den angegebenen Pfad nicht finden. ; No such process [[Node: save/RestoreV2_79 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2_79/tensor_names, save/RestoreV2_79/shape_and_slices)]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "src/predict_3dpose.py", line 537, in tf.app.run() File "C:\Users\Sven\AppData\Local\conda\conda\envs\python3\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File "src/predict_3dpose.py", line 532, in main sample() File "src/predict_3dpose.py", line 424, in sample model = create_model(sess, actions, batch_size) File "src/predict_3dpose.py", line 133, in create_model model.saver.restore( session, ckpt.model_checkpoint_path ) File "C:\Users\Sven\AppData\Local\conda\conda\envs\python3\lib\site-packages\tensorflow\python\training\saver.py", line 1666, in restore {self.saver_def.filename_tensor_name: save_path}) File "C:\Users\Sven\AppData\Local\conda\conda\envs\python3\lib\site-packages\tensorflow\python\client\session.py", line 889, in run run_metadata_ptr) File "C:\Users\Sven\AppData\Local\conda\conda\envs\python3\lib\site-packages\tensorflow\python\client\session.py", line 1120, in _run feed_dict_tensor, options, run_metadata) File "C:\Users\Sven\AppData\Local\conda\conda\envs\python3\lib\site-packages\tensorflow\python\client\session.py", line 1317, in _do_run options, run_metadata) File "C:\Users\Sven\AppData\Local\conda\conda\envs\python3\lib\site-packages\tensorflow\python\client\session.py", line 1336, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.NotFoundError: NewRandomAccessFile failed to Create/Open: experiments\All\dropout_0.5\epochs_200\lr_0.001\residual\depth_2\linear_size1024\batch_size_64\no_procrustes\maxnorm\batch_normalization\use_stacked_hourglass\predict_17\checkpoint-4874200.data-00000-of-00001 : Das System kann den angegebenen Pfad nicht finden. ; No such process [[Node: save/RestoreV2_79 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2_79/tensor_names, save/RestoreV2_79/shape_and_slices)]]

Caused by op 'save/RestoreV2_79', defined at: File "src/predict_3dpose.py", line 537, in tf.app.run() File "C:\Users\Sven\AppData\Local\conda\conda\envs\python3\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File "src/predict_3dpose.py", line 532, in main sample() File "src/predict_3dpose.py", line 424, in sample model = create_model(sess, actions, batch_size) File "src/predict_3dpose.py", line 110, in create_model dtype=tf.float16 if FLAGS.use_fp16 else tf.float32) File "C:\Users\Sven\Documents\Kinetek\Projekte\3d-pose-baseline\src\linear_model.py", line 151, in init self.saver = tf.train.Saver( tf.global_variables(), max_to_keep=10 ) File "C:\Users\Sven\AppData\Local\conda\conda\envs\python3\lib\site-packages\tensorflow\python\training\saver.py", line 1218, in init self.build() File "C:\Users\Sven\AppData\Local\conda\conda\envs\python3\lib\site-packages\tensorflow\python\training\saver.py", line 1227, in build self._build(self._filename, build_save=True, build_restore=True) File "C:\Users\Sven\AppData\Local\conda\conda\envs\python3\lib\site-packages\tensorflow\python\training\saver.py", line 1263, in _build build_save=build_save, build_restore=build_restore) File "C:\Users\Sven\AppData\Local\conda\conda\envs\python3\lib\site-packages\tensorflow\python\training\saver.py", line 751, in _build_internal restore_sequentially, reshape) File "C:\Users\Sven\AppData\Local\conda\conda\envs\python3\lib\site-packages\tensorflow\python\training\saver.py", line 427, in _AddRestoreOps tensors = self.restore_op(filename_tensor, saveable, preferred_shard) File "C:\Users\Sven\AppData\Local\conda\conda\envs\python3\lib\site-packages\tensorflow\python\training\saver.py", line 267, in restore_op [spec.tensor.dtype])[0]) File "C:\Users\Sven\AppData\Local\conda\conda\envs\python3\lib\site-packages\tensorflow\python\ops\gen_io_ops.py", line 1020, in restore_v2 shape_and_slices=shape_and_slices, dtypes=dtypes, name=name) File "C:\Users\Sven\AppData\Local\conda\conda\envs\python3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper op_def=op_def) File "C:\Users\Sven\AppData\Local\conda\conda\envs\python3\lib\site-packages\tensorflow\python\framework\ops.py", line 2956, in create_op op_def=op_def) File "C:\Users\Sven\AppData\Local\conda\conda\envs\python3\lib\site-packages\tensorflow\python\framework\ops.py", line 1470, in init self._traceback = self._graph._extract_stack() # pylint: disable=protected-access

NotFoundError (see above for traceback): NewRandomAccessFile failed to Create/Open: experiments\All\dropout_0.5\epochs_200\lr_0.001\residual\depth_2\linear_size1024\batch_size_64\no_procrustes\maxnorm\batch_normalization\use_stacked_hourglass\predict_17\checkpoint-4874200.data-00000-of-00001 : Das System kann den angegebenen Pfad nicht finden. ; No such process [[Node: save/RestoreV2_79 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2_79/tensor_names, save/RestoreV2_79/shape_and_slices)]]

  1. Your operating system Windows 10 Pro 64Bit
  2. Your tensorflow version 1.4.0
  3. Your python version 3.6
  4. The stack trace of the error that you see See above

If somebody managed to get the code running on Windows I would appreciate an advice. Thanks!

una-dinosauria commented 6 years ago

I don't have access to a windows machine so please take this with a grain of salt.

There seems to be an issue with windows and long directory names, you may want to try out this PR: https://github.com/una-dinosauria/3d-pose-baseline/pull/42 -- you won't get a nice directory with all the hyperparameters in it but you probably don't need it if you're not doing lots of experiments (like I was).

Cheers,

noxxomatik commented 6 years ago

The long directory name was the problem. I moved the project to a shorter path (C:\3d-pose-baseline) and it worked. Thank you for your help!