AniPortrait icon indicating copy to clipboard operation
AniPortrait copied to clipboard

Data preparation error

Open 1595813520 opened this issue 10 months ago • 7 comments

WARNING: All log messages before absl::InitializeLog() is called are written to STDERR I0000 00:00:1711775950.511664 83072 task_runner.cc:85] GPU suport is not available: INTERNAL: ; RET_CHECK failure (mediapipe/gpu/gl_context_egl.cc:77) display != EGL_NO_DISPLAYeglGetDisplay() returned error 0x300c W0000 00:00:1711775950.512722 83072 face_landmarker_graph.cc:174] Sets FaceBlendshapesGraph acceleration to xnnpack by default. INFO: Created TensorFlow Lite XNNPACK delegate for CPU. I0000 00:00:1711775950.569749 83072 task_runner.cc:85] GPU suport is not available: INTERNAL: ; RET_CHECK failure (mediapipe/gpu/gl_context_egl.cc:77) display != EGL_NO_DISPLAYeglGetDisplay() returned error 0x300c

请问这是怎么回事呢?是Mediapipe或TensorFlow的底层实现有问题吗?我是按照readme配置的环境,前面的三个推理都能正常运行。但运行 python -m scripts.preprocess_dataset 来处理hdtf数据集时时出现如上所示的报错,网上搜不到类似的情况和解决方法,只好冒昧来请教作者,非常感谢

1595813520 avatar Mar 30 '24 07:03 1595813520

如图所示 微信图片_20240330152354

1595813520 avatar Mar 30 '24 07:03 1595813520

我也遇到了,用cpu模式就好了,face_landmarker_v2_with_blendshapes这个任务只支持cpu跑

FacePoluke avatar Mar 30 '24 08:03 FacePoluke

我也遇到了,用cpu模式就好了,face_landmarker_v2_with_blendshapes这个任务只支持cpu跑

感谢您的解答!!请问具体是如何操作的呢?我改变了环境变量来指定只使用cpu: export CUDA_VISIBLE_DEVICES=-1 export TF_FORCE_GPU_ALLOW_GROWTH=true 但仍然报错:INFO: Created TensorFlow Lite XNNPACK delegate for CPU. I0000 00:00:1711794813.234487 94528 task_runner.cc:85] GPU suport is not available: INTERNAL: ; RET_CHECK failure (mediapipe/gpu/gl_context_egl.cc:77) display != EGL_NO_DISPLAYeglGetDisplay() returned error 0x300c 看起来程序仍然在尝试使用 GPU 相关的操作orz 期待您的回复❀

1595813520 avatar Mar 30 '24 10:03 1595813520

确保 utils/mp_models 下的模型没动过,然后mp_utils.py的这行 是CPU模式 https://github.com/Zejun-Yang/AniPortrait/blob/4e6c6aafc77d1285732008b536e025e5412a4550/src/utils/mp_utils.py#L24 这一行还有一个bug,把后面的[:600, 650:1350]删掉。https://github.com/Zejun-Yang/AniPortrait/blob/4e6c6aafc77d1285732008b536e025e5412a4550/scripts/preprocess_dataset.py#L99 其他地方我没有改动,可以正常跑通

FacePoluke avatar Mar 30 '24 11:03 FacePoluke

不好意思作者,看到您关闭了这个issue,但我还是没有解决这个问题,我使用的ssh远程服务器,ubuntu系统,不知道和报错有没有关系?代码没有任何变动,报错为:GPU suport is not available: INTERNAL: ; RET_CHECK failure (mediapipe/gpu/gl_context_egl.cc:77) display != EGL_NO_DISPLAYeglGetDisplay() returned error 0x300c 我在本地电脑上(windows系统)也运行不起来,报错是: Sets FaceBlendshapesGraph acceleration to xnnpack by default. INFO: Created TensorFlow Lite XNNPACK delegate for CPU.

1595813520 avatar Apr 01 '24 08:04 1595813520

本地电脑的报错: image

1595813520 avatar Apr 01 '24 08:04 1595813520

确保 utils/mp_models 下的模型没动过,然后mp_utils.py的这行 是CPU模式

https://github.com/Zejun-Yang/AniPortrait/blob/4e6c6aafc77d1285732008b536e025e5412a4550/src/utils/mp_utils.py#L24

这一行还有一个bug,把后面的[:600, 650:1350]删掉。 https://github.com/Zejun-Yang/AniPortrait/blob/4e6c6aafc77d1285732008b536e025e5412a4550/scripts/preprocess_dataset.py#L99

其他地方我没有改动,可以正常跑通

这是我们的项目开发成员,您可以参考他的答复。另外我们也已经更新了preprocess_dataset.py文件。

Zejun-Yang avatar Apr 01 '24 10:04 Zejun-Yang

确保 utils/mp_models 下的模型没动过,然后mp_utils.py的这行 是CPU模式

https://github.com/Zejun-Yang/AniPortrait/blob/4e6c6aafc77d1285732008b536e025e5412a4550/src/utils/mp_utils.py#L24

这一行还有一个bug,把后面的[:600, 650:1350]删掉。 https://github.com/Zejun-Yang/AniPortrait/blob/4e6c6aafc77d1285732008b536e025e5412a4550/scripts/preprocess_dataset.py#L99

其他地方我没有改动,可以正常跑通

感谢您的回复,我使用的ssh远程连接服务器,ubuntu系统,不知道和报错有没有关系?代码没有任何变动。 我在本地电脑上(windows系统)也运行不起来,报错是: Sets FaceBlendshapesGraph acceleration to xnnpack by default. INFO: Created TensorFlow Lite XNNPACK delegate for CPU. image

1595813520 avatar Apr 02 '24 06:04 1595813520

你这看着好像没有报错,请检查一下你的图片格式,是jpg还是png。还有视频目录组织方式,这份代码适用input_dir下多个子目录,每个子目录下是一系列png图片。如果与这个格式不对,请自己修改代码适配

FacePoluke avatar Apr 02 '24 07:04 FacePoluke

你这看着好像没有报错,请检查一下你的图片格式,是jpg还是png。还有视频目录组织方式,这份代码适用input_dir下多个子目录,每个子目录下是一系列png图片。如果与这个格式不对,请自己修改代码适配

好的,我解决啦,非常感谢您的回答!!我输入的视频目录是: image

修改为逐帧提取,请问处理好的输出是这种格式吗?每张png图片对应有四个文件: image

1595813520 avatar Apr 02 '24 09:04 1595813520

是的

FacePoluke avatar Apr 03 '24 02:04 FacePoluke

Hi @FacePoluke , How can I use preprocess_dataset.py for the CelebV-HQ dataset? This code seems to be used for the image directory. image

Thank you.

triton99 avatar Apr 24 '24 08:04 triton99