StyleHEAT icon indicating copy to clipboard operation
StyleHEAT copied to clipboard

AttributeError: _2D

Open komilaria opened this issue 1 year ago • 4 comments

(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?

komilaria avatar Aug 09 '23 02:08 komilaria

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

make sure you're in the right directory

mcramos68 avatar Aug 09 '23 22:08 mcramos68

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

1315382539 avatar Aug 11 '23 16:08 1315382539

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

yeruiqian avatar Jan 08 '24 09:01 yeruiqian

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.

mrbig0 avatar Jan 31 '24 06:01 mrbig0