Zz-ww / SadTalker-Video-Lip-Sync

本项目基于SadTalkers实现视频唇形合成的Wav2lip。通过以视频文件方式进行语音驱动生成唇形,设置面部区域可配置的增强方式进行合成唇形(人脸)区域画面增强,提高生成唇形的清晰度。使用DAIN 插帧的DL算法对生成视频进行补帧,补充帧间合成唇形的动作过渡,使合成的唇形更为流畅、真实以及自然。
1.89k stars 324 forks source link

如何解决 推理目录运行错误 "AttributeError: _2D" #37

Open HaSaKiYasuooo opened 1 year ago

HaSaKiYasuooo commented 1 year ago

image

chanchanalina commented 1 year ago

俺也一样 @HaSaKiYasuooo 你找到解法了么

RobinBrackez commented 1 year ago

In src\extract_kp_videos.py line 16

replace:

face_alignment.LandmarksType._2D

by:

face_alignment.LandmarksType.TWO_D

GarrettConway commented 1 year ago

Alternatively, install face_alignment==1.3.4 instead of face_alignment==1.3.5

slavakurilyak commented 11 months ago
  1. Navigate to the Directory (required)

    cd src/face3d
  2. Run the sed Command (required) Use sed to replace face_alignment.LandmarksType._2D with face_alignment.LandmarksType.TWO_D in the file:

    sed -i 's/face_alignment.LandmarksType._2D/face_alignment.LandmarksType.TWO_D/g' extract_kp_videos.py
  3. Verify the Changes (optional) To confirm the changes, you can use grep:

    grep "face_alignment.LandmarksType.TWO_D" extract_kp_videos.py

Inspired by @RobinBrackez