这是一个非常炫酷的成就,能将人脸特征重建为三维空间的模型。

预训练模型最初是用torch实现的。

此代码是把torch实现的VRN模型转换为keras的模型。

依赖:

keras,custom_layers,h5py

1.下载预训练模型。

位置参见http://cs.nott.ac.uk/~psxasj/download.php?file=vrn-unguided.t7

2.使用样例:

输入是3x192x192的图像

参见Example-Usage.ipynb。

样例代码:

from keras.models import load_model

import custom_layers

custom_objects = {

'Conv': custom_layers.Conv,

'BatchNorm': custom_layers.BatchNorm,

'UpSamplingBilinear': custom_layers.UpSamplingBilinear

}

model = load_model('vrn-unguided-keras.h5', custom_objects=custom_objects)

3.转换结果的keras模型


位置参见https://drive.google.com/file/d/1oh8Zpe4wh00iXcm8ztRsi5ZL6GMkHdjj/view?usp=sharing

4.Tensorflow的模型


位置参见https://drive.google.com/file/d/1THX-x6TR8Qg7zFfaFXU3cFd9PCZp22IY/view?usp=sharing


友情链接
KaDraw流程图
API参考文档
OK工具箱
云服务器优惠
阿里云优惠券
腾讯云优惠券
华为云优惠券
站点信息
问题反馈
邮箱:ixiaoyang8@qq.com
QQ群:637538335
关注微信