Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

测试的时候发现对前两张人脸的重建时间远长于对之后的人脸进行重建,是什么原因? #46

Open
HaoxuFang opened this issue Sep 28, 2023 · 2 comments

Comments

@HaoxuFang
Copy link

您好,非常感谢您将模型开源!
在使用过程中,我发现模型在进行重建时,对于输入的前两张人脸平均重建时间达到了15秒左右,而后续人脸的重建时间只需要1到2秒,与Readme中提到的一致,具体可见这一个log(我已对结果存储部分代码进行修改,没有选择存储全部结果,所以存储时间很快):

  0%|                                                               | 0/19 [00:00<?, ?it/s]save results 0.21760940551757812
  5%|█████▌                                                 | 1/19 [00:15<04:45, 15.87s/it]save results 0.2519359588623047
 11%|███████████                                            | 2/19 [00:30<04:19, 15.24s/it]save results 0.21797394752502441
 16%|████████████████▌                                      | 3/19 [00:32<02:25,  9.11s/it]save results 0.2182457447052002
 21%|██████████████████████                                 | 4/19 [00:34<01:33,  6.21s/it]save results 0.22073841094970703
 26%|███████████████████████████▋                           | 5/19 [00:36<01:04,  4.63s/it]

请问具体是什么原因造成的?有什么方法可以避免这一点吗?

@dreamcubeblock
Copy link

遇到了同样的问题,有没有可能进一步压缩重建效率?

@Lotayou
Copy link

Lotayou commented May 27, 2024

主要耗时在face_alignment库里面,有一些不必要的numba编译,第一次在编译numba算子,把所有带@jit(nopython=True)的装饰器去掉可以提升效率。另外在util/render.py里面把GLContext换成CudaContext可进一步加速。极限可以到0.3s每张图

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants