video_to_bvh icon indicating copy to clipboard operation
video_to_bvh copied to clipboard

TypeError: `default_name` type (<type 'list'>) is not a string type. You likely meant to pass this into the `values` kwarg.

Open xamxixixo opened this issue 5 years ago • 7 comments

Hello I am stuck at step "Processing video", actually every command in this step has it's error but I fixed it thanks to the Issues. But I can't do anything with this following error:

When I run `#3d pose estimation os.chdir('..') !bash hmr/3dpose_estimate.sh

#convert estimated .csv files to bvh !blender --background hmr/csv_to_bvh.blend -noaudio -P hmr/csv_to_bvh.py`

This error occurred.

Traceback (most recent call last): File "hmr/demo.py", line 211, in main(config.img_path, config.json_path) File "hmr/demo.py", line 125, in main model = RunModel(config, sess=sess) File "/content/drive/My Drive/AI_COLLAB/video_to_bvh/hmr/src/RunModel.py", line 62, in init self.build_test_model_ief() File "/content/drive/My Drive/AI_COLLAB/video_to_bvh/hmr/src/RunModel.py", line 82, in build_test_model_ief reuse=False) File "/content/drive/My Drive/AI_COLLAB/video_to_bvh/hmr/src/models.py", line 40, in Encoder_resnet with tf.name_scope("Encoder_resnet", [x]): File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 6450, in init "pass this into the values kwarg." % type(default_name)) TypeError: default_name type (<type 'list'>) is not a string type. You likely meant to pass this into the values kwarg. Done Read blend: /content/drive/My Drive/AI_COLLAB/video_to_bvh/hmr/csv_to_bvh.blend OSError: Python file "/content/drive/My Drive/AI_COLLAB/video_to_bvh/hmr/csv_to_bvh.py" could not be opened: No such file or directory

Blender quit src/tcmalloc.cc:283] Attempt to free invalid pointer 0x7f1fa500e400

How to fix it? Thank you.

xamxixixo avatar Sep 08 '19 15:09 xamxixixo

So, I have fixed it by downgrade tensorflow to 1.11

xamxixixo avatar Sep 12 '19 09:09 xamxixixo

@xamxixixo How did you downgrade tensorflow on google colab? Did you run pip install --upgrade tensorflow==1.11.0 on colab and everything worked fine?

kazux2 avatar Sep 16 '19 06:09 kazux2

I did this:

pip uninstall tensorflow
pip install tensorflow==1.11

Colab will tell you (in the pip install process) there will be packages that won't go well with that old tensorflow, you should downgrade them too

xamxixixo avatar Sep 16 '19 08:09 xamxixixo

@xamxixixo I see. Thanks! (I didn't downgrade other depended packages and couldn't run the process without error) Apparently, in the newer tensorflow, the function tf.name_scope has different arguments and absl-py started comming with it and has colliding flag name 'log_dir' and these were making errors.

kazux2 avatar Sep 16 '19 12:09 kazux2

See this solution in the original hmr code, it solves the problem without having to change tensorflow: https://github.com/akanazawa/hmr/issues/69#issuecomment-503765527.

Using the TensorFlow documentation for tf.name_scope, I resolved the issue by prepending [x] with values=. That is change with tf.name_scope("Encoder_resnet", [x]): to with tf.name_scope("Encoder_resnet", values=[x]):. This error also occurs in a few places over in batch_lbs.py which I fixed in the same way.

Duthopi avatar Sep 18 '19 19:09 Duthopi

I got this bug, and tensorflow 1.11 doesn't work for me. @Duthopi could you tell me where is the batch_lbs.py so that I can try it out ?

wine3603 avatar Nov 27 '19 10:11 wine3603

It's under the /content/hmr/src/tf_smpl/ folder

Duthopi avatar Nov 28 '19 19:11 Duthopi