1adrianb / 1adrianb/face-alignment
SystemError: CPUDispatcher(<function _get_preds_fromhm at 0x7fc50e018440>) returned a result with an error set
- 主要语言
- Python
- 星标
- 7.5k
- 派生
- 1.4k
- PR 合并指标
- 30 天内没有已合并 PR
描述
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 "", line 1, in
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() 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?
贡献指南
这个仓库没有索引到贡献指南
调研方向
错误发生在 face_alignment/utils.py 第 201 行的 get_preds_fromhm 中,涉及 CPUDispatcher 和 dtype 不匹配。首先检查 utils.py 中的 _get_preds_fromhm 函数以及 numpy/torch 数据类型处理。检查输入张量的 dtype 和预期的对象 dtype。使用提供的输入运行失败的测试以重现问题,然后跟踪数据流以确定 dtype 转换失败的位置。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- numpy, python, pytorch
- 领域
- ai, computer-vision
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100