OpenTalker / SadTalker

[CVPR 2023] SadTalker:Learning Realistic 3D Motion Coefficients for Stylized Audio-Driven Single Image Talking Face Animation
https://sadtalker.github.io/
Other
11.18k stars 2.1k forks source link

I encountered a problem at runtime: AttributeError: _2D, how can I solve it? #611

Open LGDJCY opened 10 months ago

LGDJCY commented 10 months ago

The full problem is described below:

Traceback (most recent call last): File "inference.py", line 158, in main(args) File "inference.py", line 55, in main preprocess_model = CropAndExtract(path_of_lm_croper, path_of_net_recon_model, dir_of_BFM_fitting, device) File "G:\aaa_jcy\SadTalker\src\utils\preprocess.py", line 46, in init self.kp_extractor = KeypointExtractor(device) File "G:\aaa_jcy\SadTalker\src\face3d\extract_kp_videos.py", line 16, in init self.detector = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D, device=device) File "F:\Program_Files\Anaconda\envs\sadtalker\lib\enum.py", line 384, in getattr raise AttributeError(name) from None AttributeError: _2D

zero-or-one commented 10 months ago

@LGDJCY Go to File "/Users/yangboz/git/SadTalker/src/face3d/extract_kp_videos.py", line 16, in init and change face_alignment.LandmarksType._2D to face_alignment.LandmarksType.TWO_D

mayowaosibodu commented 10 months ago

You could also try pip install face-alignment==1.3.4

Apparently the ._2D and ._3D (which was what I had in my case) attributes are not compatible with face-alignment>1.3.4.

LGDJCY commented 10 months ago

You could also try pip install face-alignment==1.3.4

Apparently the ._2D and ._3D (which was what I had in my case) attributes are not compatible with face-alignment>1.3.4.

OK,thankyou!

LGDJCY commented 10 months ago

@LGDJCY Go to File "/Users/yangboz/git/SadTalker/src/face3d/extract_kp_videos.py", line 16, in init and change face_alignment.LandmarksType._2D to face_alignment.LandmarksType.TWO_D

I see. Thank you!

icomefrom commented 3 months ago

You could also try pip install face-alignment==1.3.4

Apparently the ._2D and ._3D (which was what I had in my case) attributes are not compatible with face-alignment>1.3.4.

it gets solved, but another problem comes out.

(base) root@iZf8zejm0dnzfmwm21d3e2Z:~/Projects/SadTalker-Video-Lip-Sync# python inference.py --driven_audio /examples/driven_audio/chinese_poem1.wav --source_video /examples/driven_vedio/1.mp4 ./checkpoints/epoch_20.pth ./checkpoints/auido2pose_00140-model.pth ./checkpoints/auido2exp_00300-model.pth ./checkpoints/facevid2vid_00189-model.pth.tar ./checkpoints/mapping_00109-model.pth.tar Killed

I don't know how to deal with it.

manhdan226 commented 1 month ago

change _2D -> TWO_D / _3D -> THREE_D