de-code / python-tf-bodypix

A Python implementation of the bodypix model.
MIT License
124 stars 20 forks source link

get pose IndexError (BUG) #175

Closed pykeras closed 2 years ago

pykeras commented 2 years ago

Hi

using the code from repo readme, arises error on get_pose function as follow:

~/.venvs/tf/lib/python3.8/site-packages/tf_bodypix/bodypix_js_utils/multi_person/decode_pose.py in getDisplacement(edgeId, point, displacements)
     33     # LOGGER.debug('point=%s, edgeId=%s, numEdges=%s', point, edgeId, numEdges)
     34     return Vector2D(
---> 35         y=displacements[point.y, point.x, edgeId],
     36         x=displacements[point.y, point.x, numEdges + edgeId]
     37     )

IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices

OS: Linux base Python: 3.8 Installation method: pip install tf-bodypix[all] clean environment installation: false

de-code commented 2 years ago

Thank you for raising the issue. I believe this was fixed as a side effect of https://github.com/de-code/python-tf-bodypix/pull/161 I just released a new version (https://github.com/de-code/python-tf-bodypix/releases/tag/v0.3.9). Could you please check whether it is fixed for you as well?