hxngiee/DiffFace

Error "AttributeError: _2D"

yerang823 opened this issue ยท 3 comments

Traceback (most recent call last):
File "/data/docker/yerang/DiffFace/main.py", line 6, in
image_editor = ImageEditor(args)
File "/data/docker/yerang/DiffFace/optimization/image_editor.py", line 123, in init
self.fa = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D, flip_input=False)
File "/opt/conda/lib/python3.9/enum.py", line 429, in getattr
raise AttributeError(name) from None
AttributeError: _2D

Solution:
Replace image_editor.py file
"_2D" -> "TWO_D"

It works!!!!!! ๐Ÿ‘๐Ÿ‘๐Ÿ”ฅ

ๆœ‰ๆ•ˆ

Traceback (most recent call last):
File "/data/docker/yerang/DiffFace/main.py", line 6, in
image_editor = ImageEditor(args)
File "/data/docker/yerang/DiffFace/optimization/image_editor.py", line 123, in init
self.fa = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D, flip_input=False)
File "/opt/conda/lib/python3.9/enum.py", line 429, in getattr
raise AttributeError(name) from None
AttributeError: _2D

Solution: Replace image_editor.py file "_2D" -> "TWO_D"

It works!!!!!! ๐Ÿ‘๐Ÿ‘๐Ÿ”ฅ

Work!! THX

can you explain how exactly you fixed this error