una-dinosauria / 3d-pose-baseline

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

ValueError: cannot reshape array of size 107874 into shape (96) #192

Closed Brave-peng closed 3 years ago

Brave-peng commented 3 years ago

Thanks for your research, and I think it is very good!

Now I have a problem running your code. When I try to run a quick demo, I find I can't reshape my array. That's the stact trace.

Traceback (most recent call last): File "src/predict_3dpose.py", line 524, in tf.compat.v1.app.run() File "/home/zp/miniconda3/envs/env/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 40, in run _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef) File "/home/zp/miniconda3/envs/env/lib/python3.6/site-packages/absl/app.py", line 303, in run _run_main(main, args) File "/home/zp/miniconda3/envs/env/lib/python3.6/site-packages/absl/app.py", line 251, in _run_main sys.exit(main(argv)) File "src/predict_3dpose.py", line 519, in main sample() File "src/predict_3dpose.py", line 401, in sample actions, FLAGS.data_dir, FLAGS.camera_frame, rcams, FLAGS.predict_14 ) File "/home/zp/code/pycharm/3d-pose-baseline-master/3d-pose-baseline-master/src/data_utils.py", line 341, in read_3d train_set = transform_world_to_camera( train_set, rcams ) File "/home/zp/code/pycharm/3d-pose-baseline-master/3d-pose-baseline-master/src/data_utils.py", line 169, in transfo camera_coord = np.reshape( camera_coord, [-1, len(H36M_NAMES)3] ) File "<__array_function__ internals>", line 6, in reshape File "/home/zp/miniconda3/envs/env/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 301, in reshape return _wrapfunc(a, 'reshape', newshape, order=order) File "/home/zp/miniconda3/envs/env/lib/python3.6/site-packages/numpy/core/fromnumeric.py", line 61, in _wrapfunc return bound(args, **kwds) ValueError: cannot reshape array of size 107874 into shape (96)

And this is my envirment.

system:Ubuntu 16.04.6 tf.version: 2.3.0 python.version 3.6.12

And, I find the structure of my datasets is "H36m/S1/MyPoseFeatures/D3_Angles" , and not is "H36m/S1/MyPoseFeatures/D3_Positions". Maybe it is the reason?

Looking forward to your advice.

una-dinosauria commented 3 years ago

And, I find the structure of my datasets is "H36m/S1/MyPoseFeatures/D3_Angles" , and not is "H36m/S1/MyPoseFeatures/D3_Positions". Maybe it is the reason?

That is very likely the reason

Brave-peng commented 3 years ago

Thanks you helpness, it is the reason and I have reseloved it.