microsoft / voxelpose-pytorch

Official implementation of "VoxelPose: Towards Multi-Camera 3D Human Pose Estimation in Wild Environment"
MIT License
480 stars 90 forks source link

ValueError: setting an array element with a sequence. #55

Open hagonata opened 1 year ago

hagonata commented 1 year ago

Error after python run/train_3d.py --cfg configs/shelf/prn64_cpn80x80x20.yaml


=> load /media/user/LaCie/DataSet/voxel-data/data/Shelf/pred_shelf_maskrcnn_hrnet_coco.pkl
Traceback (most recent call last):
  File "run/train_3d.py", line 160, in <module>
    main()
  File "run/train_3d.py", line 87, in main
    test_dataset = eval('dataset.' + config.DATASET.TEST_DATASET)(
  File "/home/user/voxelpose-pytorch/run/../lib/dataset/shelf.py", line 70, in __init__
    self.db = self._get_db()
  File "/home/user/voxelpose-pytorch/run/../lib/dataset/shelf.py", line 92, in _get_db
    actor_3d = np.array(np.array(data['actor3D'].tolist()).tolist()).squeeze()  # num_person * num_frame
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 4 dimensions. The detected shape was (1, 4, 3200, 1) + inhomogeneous part.

My pip list :

pip list Package Version Editable project location


addict 2.4.0 aliyun-python-sdk-core 2.13.36 aliyun-python-sdk-kms 2.16.1 attrs 23.1.0 brotlipy 0.7.0 certifi 2023.7.22 cffi 1.15.1 charset-normalizer 2.1.1 chumpy 0.70 click 8.1.7 colorama 0.4.6 contourpy 1.1.0 coverage 7.3.0 crcmod 1.7 cryptography 38.0.3 cycler 0.11.0 Cython 3.0.2 easydict 1.10 exceptiongroup 1.1.3 filelock 3.12.3 flake8 6.1.0 fonttools 4.42.1 idna 3.4 importlib-metadata 6.8.0 importlib-resources 6.0.1 iniconfig 2.0.0 interrogate 1.5.0 isort 4.3.21 Jinja2 3.1.2 jmespath 0.10.0 json-tricks 3.17.3 kiwisolver 1.4.5 Markdown 3.4.4 markdown-it-py 3.0.0 MarkupSafe 2.1.3 matplotlib 3.7.2 mccabe 0.7.0 mdurl 0.1.2 mmcv 2.0.0rc4 mmdet 3.1.0 mmengine 0.8.4 mmpose 1.1.0 /home/user/mmpose model-index 0.1.11 mpmath 1.3.0 munkres 1.1.4 networkx 3.1 numpy 1.24.4 opencv-python 4.8.0.76 opendatalab 0.0.10 openmim 0.3.9 openxlab 0.0.23 ordered-set 4.1.0 oss2 2.17.0 packaging 23.1 pandas 2.0.3 parameterized 0.9.0 pbr 5.11.1 Pillow 9.2.0 pip 23.2.1 platformdirs 3.10.0 pluggy 1.3.0 protobuf 4.24.2 py 1.11.0 pycocotools 2.0.7 pycodestyle 2.11.0 pycparser 2.21 pycryptodome 3.18.0 pyflakes 3.1.0 Pygments 2.16.1 pyOpenSSL 22.1.0 pyparsing 3.0.9 PySocks 1.7.1 pytest 7.4.1 pytest-runner 6.0.0 python-dateutil 2.8.2 pytz 2023.3.post1 PyYAML 6.0.1 requests 2.28.2 rich 13.4.2 scipy 1.10.1 setuptools 68.1.2 shapely 2.0.1 six 1.16.0 sympy 1.12 tabulate 0.9.0 tensorboardX 2.6.2.2 termcolor 2.3.0 terminaltables 3.1.10 testresources 2.0.1 toml 0.10.2 tomli 2.0.1 torch 1.11.0 torchvision 0.12.0a0+9b5a3fe tqdm 4.65.2 typing_extensions 4.7.1 tzdata 2023.3 urllib3 1.26.11 wheel 0.38.4 xdoctest 1.1.1 xtcocotools 1.14 yapf 0.40.1 zipp 3.16.2

Machine: Jetson Orin AGX

atonalfreerider commented 10 months ago

Changing the code to this allowed me to get past this error:

actor_3d = data['actor3D']
processed_actor_3d = [np.array(person_data) for person_data in actor_3d]
actor_3d = np.array(processed_actor_3d).squeeze()  # num_person * num_frame

Still getting other array issues with r2 and einsum

hagonata commented 10 months ago

At least thanks for this)