AniPortrait icon indicating copy to clipboard operation
AniPortrait copied to clipboard

vid2pose错误

Open afatpig opened this issue 1 year ago • 2 comments

安装并执行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

afatpig avatar Mar 29 '24 12:03 afatpig

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

Zejun-Yang avatar Mar 30 '24 00:03 Zejun-Yang

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

stormcenter avatar Mar 31 '24 14:03 stormcenter

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

已修复,可更新代码。

Zejun-Yang avatar Apr 02 '24 08:04 Zejun-Yang