Zejun-Yang / AniPortrait

AniPortrait: Audio-Driven Synthesis of Photorealistic Portrait Animation
Apache License 2.0
4.6k stars 576 forks source link

vid2pose错误 #46

Closed afatpig closed 6 months ago

afatpig commented 7 months ago

安装并执行audio2vid成功,但在执行vid2pose时报错:

# python -m scripts.vid2pose --video_path 2fe655a671ecb61f93d54d6ad2729951.mp4
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
W0000 00:00:1711714173.841578   36856 face_landmarker_graph.cc:174] Sets FaceBlendshapesGraph acceleration to xnnpack by default.
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
  0%|                                                                                         | 0/1065 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "E:\wsp\ML\AniPortrait\scripts\vid2pose.py", line 42, in <module>
    lmks = face_result['lmks'].astype(np.float32)
TypeError: 'NoneType' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "E:\wsp\ML\AniPortrait\env\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "E:\wsp\ML\AniPortrait\env\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "E:\wsp\ML\AniPortrait\scripts\vid2pose.py", line 46, in <module>
    pose_img = kps_results[-1]
IndexError: list index out of range
Zejun-Yang commented 7 months ago

看起来应该是输入视频2fe655a671ecb61f93d54d6ad2729951.mp4中存在一些帧无法检测到人脸,我们会尽快修复这一bug。感谢提出!

stormcenter commented 7 months ago

应该是输入视频尺寸的问题

Zejun-Yang commented 6 months ago

https://github.com/Zejun-Yang/AniPortrait/blob/4de88f12a24cff107e7bce19194a0e9e05dab2be/scripts/generate_ref_pose.py#L60

已修复,可更新代码。