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

AttributeError: _2D #43

Open
komilaria opened this issue Aug 9, 2023 · 4 comments
Open

AttributeError: _2D #43

komilaria opened this issue Aug 9, 2023 · 4 comments

Comments

@komilaria
Copy link

(StyleHEAT2) C:\Users\USER\Desktop\aria\StyleHEAT-styleheat>python inference.py --config configs/inference.yaml --video_source=./docs/demo/videos/RD_Radio34_003_512.mp4 --image_source=./docs/demo/images/100.jpg --cross_id --if_extract --output_dir=./docs/demo/output
Traceback (most recent call last):
File "inference.py", line 5, in
import utils.inference_util as inference_util
File "C:\Users\USER\Desktop\aria\StyleHEAT-styleheat\utils\inference_util.py", line 10, in
from data.inference_dataset import TempVideoDataset, ImageDataset
File "C:\Users\USER\Desktop\aria\StyleHEAT-styleheat\data\inference_dataset.py", line 5, in
from utils.video_preprocess.extract_landmark import get_landmark
File "C:\Users\USER\Desktop\aria\StyleHEAT-styleheat\utils\video_preprocess\extract_landmark.py", line 6, in
detector = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D)
File "C:\Users\USER\miniconda3\envs\StyleHEAT2\lib\enum.py", line 354, in getattr
raise AttributeError(name) from None
AttributeError: _2D

hello dears

who can solve this issue?

@mcramos68
Copy link

sed -i -e 's/_2D/TWO_D/g' $(find . -name *.py)

make sure you're in the right directory

@1315382539
Copy link

It's possible that the issue is related to the version of face_alignment. I recommend switching to face_alignment version 1.3.2. You can do this by running the following command: pip install face_alignment==1.3.2

@yeruiqian
Copy link

this is the problem caused by different version of face_alignment, you can change the function from face_alignment.LandmarksType._2D to face_alignment.LandmarksType.TWO_D

@mrbig0
Copy link

mrbig0 commented Jan 31, 2024

It's possible that the issue is related to the version of face_alignment. I recommend switching to face_alignment version 1.3.2. You can do this by running the following command: pip install face_alignment==1.3.2

Yes that was basically the problem.

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

5 participants