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

Error with pose estimation models on videos with multiple people #754

Open
leeping-ng opened this issue Aug 20, 2023 · 0 comments
Open

Error with pose estimation models on videos with multiple people #754

leeping-ng opened this issue Aug 20, 2023 · 0 comments

Comments

@leeping-ng
Copy link
Contributor

leeping-ng commented Aug 20, 2023

Hi guys, I encountered the following error when using MoveNet (multipose) and HRNet on videos with multiple people:

2023-08-20 12:05:49 root  ERROR:  Traceback (most recent call last):
   File "demo.py", line 146, in <module>
    pose_pipeline(args.video_path, args.save_dir)
   File "demo.py", line 99, in pose_pipeline
    runner.run()
   File "/home/leeping/miniconda3/envs/pkd/lib/python3.8/site-packages/peekingduck/runner.py", line 127, in run
    outputs = node.run(inputs)
   File "/home/leeping/miniconda3/envs/pkd/lib/python3.8/site-packages/peekingduck/pipeline/nodes/model/hrnet.py", line 74, in run
    keypoints, keypoint_scores, keypoint_conns = self.model.predict(
   File "/home/leeping/miniconda3/envs/pkd/lib/python3.8/site-packages/peekingduck/pipeline/nodes/model/hrnetv1/hrnet_model.py", line 65, in predict
    return self.detector.predict(frame, detected_bboxes)
   File "/home/leeping/miniconda3/envs/pkd/lib/python3.8/site-packages/peekingduck/pipeline/nodes/model/hrnetv1/hrnet_files/detector.py", line 81, in predict
    poses, keypoint_scores, keypoint_conns = self._postprocess(
   File "/home/leeping/miniconda3/envs/pkd/lib/python3.8/site-packages/peekingduck/pipeline/nodes/model/hrnetv1/hrnet_files/detector.py", line 144, in _postprocess
    keypoint_conns = get_keypoint_conns(normalized_keypoints, kp_masks)
   File "/home/leeping/miniconda3/envs/pkd/lib/python3.8/site-packages/peekingduck/pipeline/nodes/model/hrnetv1/hrnet_files/postprocessing.py", line 126, in get_keypoint_conns
    return np.array(compiled_connections)
 
2023-08-20 12:05:49 root  ERROR:  ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (15,) + inhomogeneous part.

From Stack Overflow, the root cause seems to be the numpy version. I encountered the crash with numpy==1.24.4 when I did a fresh install of PeekingDuck, and upon downgrading to numpy==1.21.1, the issue was fixed. Perhaps you can consider adding an upper limit to the numpy version numpy >= 1.17.3, <=1.21.2 in requirements.txt. Cheers!

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

No branches or pull requests

1 participant