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

请问模型是从哪里下载的? #2

Open
taotaoyuhust opened this issue Feb 12, 2020 · 8 comments
Open

请问模型是从哪里下载的? #2

taotaoyuhust opened this issue Feb 12, 2020 · 8 comments

Comments

@taotaoyuhust
Copy link

input.txt中的路径
D:\database\bfm\3DMM_model\BaselFaceModel_mod.h5
哪里可以下载到呢,谢谢!

@Bemfool
Copy link
Owner

Bemfool commented Feb 14, 2020

你好,我是用的是老师提供的模型所以不方便放出来,但是理论上使用官网的模型也是可行的,只是出于时间关系我还没有测试过,可能会存在一些bug。
你可以使用官方的2017年版本或者2019年版本进行测试,不过同时也需要修改input.txt文件中其他的数据集名称。(2009年版本不可行因为其中不包括表情数据)
过两天如果有时间我会修改进行测试一下。
希望能够帮到你 :)

@taotaoyuhust
Copy link
Author

多谢回复,我下载了2019的模型,直接运行程序生成不了人脸,看来是需要修改input.txt,不过还没找到另外几行的参数,我再找找看!

@Bemfool
Copy link
Owner

Bemfool commented Feb 15, 2020

我尝试了一下2017版本的,上传了一个inputs-2017.txt你可以参考一下,2019我还在下载中网速好慢q...不过应该大同小异,规则参见:https://github.com/Great-Keith/BFM-tools
还有代码中有几个地方需要修改:

  1. tex_mu是否需要乘以255(即color/model/mean中的颜色范围是01还是0255,代码默认0~255)
  2. triangle list的矩阵是否需要转置(代码中默认(n_face,3))
  3. triangle list的起始下标是0还是1(代码默认1)

我修改这些部分后就可以生成平均脸了。
不过我还没有将代码修改到完全兼容各种模型,所以没有push上来,你可以自己再试试看。

@taotaoyuhust
Copy link
Author

好的,我试试看,多谢!

@taotaoyuhust
Copy link
Author

我尝试了一下2017版本的,上传了一个inputs-2017.txt你可以参考一下,2019我还在下载中网速好慢q...不过应该大同小异,规则参见:https://github.com/Great-Keith/BFM-tools
还有代码中有几个地方需要修改:

  1. tex_mu是否需要乘以255(即color/model/mean中的颜色范围是01还是0255,代码默认0~255)
  2. triangle list的矩阵是否需要转置(代码中默认(n_face,3))
  3. triangle list的起始下标是0还是1(代码默认1)

我修改这些部分后就可以生成平均脸了。
不过我还没有将代码修改到完全兼容各种模型,所以没有push上来,你可以自己再试试看。

inputs-2017中的最后几行pca相关的路径也是你自己生成的吗?官网只有一个h5的model啊

@Bemfool
Copy link
Owner

Bemfool commented Feb 17, 2020

我尝试了一下2017版本的,上传了一个inputs-2017.txt你可以参考一下,2019我还在下载中网速好慢q...不过应该大同小异,规则参见:Great-Keith/BFM-tools
还有代码中有几个地方需要修改:

  1. tex_mu是否需要乘以255(即color/model/mean中的颜色范围是01还是0255,代码默认0~255)
  2. triangle list的矩阵是否需要转置(代码中默认(n_face,3))
  3. triangle list的起始下标是0还是1(代码默认1)

我修改这些部分后就可以生成平均脸了。
不过我还没有将代码修改到完全兼容各种模型,所以没有push上来,你可以自己再试试看。

inputs-2017中的最后几行pca相关的路径也是你自己生成的吗?官网只有一个h5的model啊

这些指的是.h5数据文件内具体数据集的路径,你可以通过HDFView查看其中内部的名称。如果懒得下载可以用inputs-2017.txt里面的,和2019是一样的。

@taotaoyuhust
Copy link
Author

按照你说的这几个修改之后终于可以出来正常的人脸了。
不过2017的要注释掉表情的部分
current_blendshape = current_shape;// +current_expr;
并且滑动块调节似乎对scale参数很敏感,一不小心就会出现奇奇怪怪的画面-_-||

@Bemfool
Copy link
Owner

Bemfool commented Feb 21, 2020

按照你说的这几个修改之后终于可以出来正常的人脸了。
不过2017的要注释掉表情的部分
current_blendshape = current_shape;// +current_expr;
并且滑动块调节似乎对scale参数很敏感,一不小心就会出现奇奇怪怪的画面-_-||

哈哈尴尬 大概也是因为模型PC比例不太一样的。

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

2 participants