question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issues when running sandbox version of 3d pose baseline with posenet-python ? (setting an array element with a sequence. /home/tm/pf/posenet-python-final/000000000000_keypoints.json setting an array element with a sequence.)

See original GitHub issue

Hi , after porting the code of posenet-python https://github.com/rwightman/posenet-python to fit according to the 3d-pose.baseline. I am unable to get predicted 3d pose . The sample output of the 2d joint detections are as follows . (for one of the files)

openpose_3dpose_sandbox as input

{"people": [{"pose_keypoints_2d": [[65.83929879324776, 225.61339058925535, 59.41166279478843, 228.55210823006283, 60.82692164071598, 222.30894846404712, 60.806538362680755, 231.52718520576977, 62.76157592394337, 212.95569881188416, 82.17437222877645, 236.26046220220908, 80.74839289884389, 215.0094041362353, 99.23341810333062, 248.18655674680292, 94.74878248961075, 203.9242716924542, 97.9518383334142, 241.0167779707991, 90.32739378650736, 203.03192621778862, 120.93708346349112, 234.44128364633934, 119.30266528396132, 216.48404405356277, 155.9352742070737, 244.5989955321315, 151.30534438613037, 206.35645879263694, 194.62511536497507, 247.81470595099108, 188.79508184350055, 203.35007549404685, 0.0, 0.0]]}]}

The error message is as follows for realtime visualzation

  File "src/openpose_3dpose_sandbox_realtime.py", line 237, in <module>
    tf.app.run()
  File "/home/tm/.local/lib/python3.5/site-packages/tensorflow/python/platform/app.py", line 125, in run
    _sys.exit(main(argv))
  File "src/openpose_3dpose_sandbox_realtime.py", line 83, in main
    logger.debug("found {0} for frame {1}".format(xy, str(frame)))
KeyboardInterrupt

And the following for openpose_3dpose_sandbox.py the following is noted

  File "src/openpose_3dpose_sandbox.py", line 232, in main
    smoothed = read_openpose_json()
  File "src/openpose_3dpose_sandbox.py", line 129, in read_openpose_json
    drop_curves_plot = show_anim_curves(cache, plt)
  File "src/openpose_3dpose_sandbox.py", line 32, in show_anim_curves
    y = val[:,o+1]
IndexError: index 1 is out of bounds for axis 1 with size 1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
basicvisualcommented, Apr 26, 2019

@ArashHosseini , i think i might have noticed another problem in my implementation. I have not arranged the 2D keypoints , to human 3.6 order. The keypoint order for posenet is as follows

https://github.com/tensorflow/tfjs-models/blob/master/posenet/src/keypoints.ts

For Posenet 'nose', 0 'leftEye', 1 'rightEye', 2 'leftEar', 3 'rightEar', 4 'leftShoulder', 5 'rightShoulder', 6 'leftElbow', 7 'rightElbow', 8 'leftWrist', 9 'rightWrist', 10 'leftHip', 11 'rightHip', 12 'leftKnee', ' 13 rightKnee', 14 'leftAnkle', 15 'rightAnkle' 16

Currently looking into that .

0reactions
basicvisualcommented, May 17, 2019

@ArashHosseini , do you know the reason why the image is on another plane ? To comply with open pose i just took the mean , of right shoulder (x1,y1) and left shoulder (x2,y2) and rearranged as per the open pose keypoint ordering

https://github.com/una-dinosauria/3d-pose-baseline/issues/128#issue-444309532

Read more comments on GitHub >

github_iconTop Results From Across the Web

ValueError: setting an array element with a sequence
Possible reason 1: trying to create a jagged array. You may be creating an array from a list that isn't shaped like a...
Read more >
Valueerror: Setting an Array Element with a Sequence ( Solved )
In python Valueerror: Setting an Array Element with a Sequence means you are creating a NumPy array of different types of elements in...
Read more >
Valueerror Setting an Array Element With a Sequence.: Fix It ...
The valueerror setting an array element with a sequence. problem is fixed by equaling the length on both arrays. Follow these steps to...
Read more >
Setting an Array Element With A Sequence Easily - Python Pool
In this tutorial, we will be discussing the concept of setting an array element with a sequence. When we try to access some...
Read more >
How to fix “ValueError: setting an array element with a ... - Reddit
I am just confused why the code below is giving me a value error and saying that setting a pad_sequences parameter to a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found