Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Brave-peng opened this issue Dec 6, 2020 · 2 comments
Closed

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

Brave-peng opened this issue Dec 6, 2020 · 2 comments
Labels

Comments

@Brave-peng
Copy link

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
Copy link
Owner

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants