The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "scripts/align_68.py", line 110, in
main()
File "scripts/align_68.py", line 106, in main
align_folder(args.folder_path, save_img_path)
File "scripts/align_68.py", line 50, in align_folder
preds = fa.get_landmarks_from_directory(folder_path)
File "/home/ruanjiyang/anaconda3/lib/python3.7/site-packages/face_alignment/api.py", line 238, in get_landmarks_from_directory
preds = self.get_landmarks_from_image(image, bounding_boxes)
File "/home/ruanjiyang/anaconda3/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 26, in decorate_context
return func(*args, **kwargs)
File "/home/ruanjiyang/anaconda3/lib/python3.7/site-packages/face_alignment/api.py", line 154, in get_landmarks_from_image
pts, pts_img = get_preds_fromhm(out, center.numpy(), scale)
File "/home/ruanjiyang/anaconda3/lib/python3.7/site-packages/face_alignment/utils.py", line 199, in get_preds_fromhm
preds, preds_orig = _get_preds_fromhm(hm, idx, center, scale)
SystemError: CPUDispatcher(<function _get_preds_fromhm at 0x7f5d8140b050>) returned a result with an error set
您好,我在执行人脸对齐的时候,遇到如下错误,请问如何解决?谢谢。
python scripts/align_68.py --folder_path ./misc/Input/517600055 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 1.87it/s] 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 "scripts/align_68.py", line 110, in
main()
File "scripts/align_68.py", line 106, in main
align_folder(args.folder_path, save_img_path)
File "scripts/align_68.py", line 50, in align_folder
preds = fa.get_landmarks_from_directory(folder_path)
File "/home/ruanjiyang/anaconda3/lib/python3.7/site-packages/face_alignment/api.py", line 238, in get_landmarks_from_directory
preds = self.get_landmarks_from_image(image, bounding_boxes)
File "/home/ruanjiyang/anaconda3/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 26, in decorate_context
return func(*args, **kwargs)
File "/home/ruanjiyang/anaconda3/lib/python3.7/site-packages/face_alignment/api.py", line 154, in get_landmarks_from_image
pts, pts_img = get_preds_fromhm(out, center.numpy(), scale)
File "/home/ruanjiyang/anaconda3/lib/python3.7/site-packages/face_alignment/utils.py", line 199, in get_preds_fromhm
preds, preds_orig = _get_preds_fromhm(hm, idx, center, scale)
SystemError: CPUDispatcher(<function _get_preds_fromhm at 0x7f5d8140b050>) returned a result with an error set