Zz-ww/SadTalker-Video-Lip-Sync

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

Opened this issue · 4 comments

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

In src\extract_kp_videos.py line 16

replace:

face_alignment.LandmarksType._2D

by:

face_alignment.LandmarksType.TWO_D

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

  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