1adrianb / face-alignment

:fire: 2D and 3D Face alignment library build using pytorch
https://www.adrianbulat.com
BSD 3-Clause "New" or "Revised" License
7.11k stars 1.35k forks source link

SystemError: CPUDispatcher(<function _get_preds_fromhm at 0x7fc50e018440>) returned a result with an error set #288

Open shash29-dev opened 3 years ago

shash29-dev commented 3 years ago

installed using setup.py and, running ---> preds = fa.get_landmarks(input) gives error: TypeError: expected dtype object, got 'numpy.dtype[float32]'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/vision3d/anaconda3/lib/python3.7/site-packages/face_alignment-1.3.4-py3.7.egg/face_alignment/api.py", line 110, in get_landmarks
  File "/home/vision3d/anaconda3/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 15, in decorate_context
    return func(*args, **kwargs)
  File "/home/vision3d/anaconda3/lib/python3.7/site-packages/face_alignment-1.3.4-py3.7.egg/face_alignment/api.py", line 170, in get_landmarks_from_image
  File "/home/vision3d/anaconda3/lib/python3.7/site-packages/face_alignment-1.3.4-py3.7.egg/face_alignment/utils.py", line 201, in get_preds_fromhm
SystemError: CPUDispatcher(<function _get_preds_fromhm at 0x7fc50e018440>) returned a result with an error set

info: Ubuntu 16 nvidia-smi 465 drivers cuda-8.0 python 3.7

what may be the issue and how to resolve?

1adrianb commented 3 years ago

This is likely due to an incompatibility between numba and numpy. Please make sure you are using the latest versions.

iiHeys commented 2 years ago

This is likely due to an incompatibility between numba and numpy. Please make sure you are using the latest versions.

Problem solved.Thank you!