Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于 No module named 'face_alignment' 的问题 #43

Open
wangaocheng opened this issue Oct 22, 2024 · 1 comment
Open

关于 No module named 'face_alignment' 的问题 #43

wangaocheng opened this issue Oct 22, 2024 · 1 comment

Comments

@wangaocheng
Copy link

首先需要安装一下 pip install face_alignment

但是 crop_video.py 里面的 84行会报错:

_==> croping pose_video
Traceback (most recent call last):
File "data_preprocess/crop_video.py", line 84, in
fa = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D, flip_input=False, device=device)
File "E:\Env\edtalk\lib\enum.py", line 384, in getattr
raise AttributeError(name) from None
AttributeError: 2D

修改84行:
fa = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D, flip_input=False, device=device)
为:
fa = face_alignment.FaceAlignment(face_alignment.LandmarksType.TWO_D, flip_input=False, device=device)

应该是作者开发的时候用了face_alignment的老版本。

@torracxiaokeai
Copy link

你好,我在执行如下代码时,
python data_preprocess/data_preprocess_for_train/extract_bbox.py

发生了如下报错,这个你遇到了吗
Traceback (most recent call last):
File "/root/avatar_project/EDTalk/data_preprocess/data_preprocess_for_train/extract_bbox.py", line 32, in
fa = [face_detection.FaceAlignment(face_detection.LandmarksType.TWO_D, flip_input=False,
File "/root/avatar_project/EDTalk/data_preprocess/data_preprocess_for_train/extract_bbox.py", line 32, in
fa = [face_detection.FaceAlignment(face_detection.LandmarksType.TWO_D, flip_input=False,
AttributeError: module 'face_detection' has no attribute 'FaceAlignment'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants