基于HRN的text-to-3D head模型,结合了文生图stable diffusio模型和头部重建模型HRN ,以文本为输入,可生成高质量3D头部。 prompt: a clow with red ose. prompt: a girl with freckles ad blue eyes. 该text-to-head模型包含了text-to-image以及head recostructio两个部分,首先利用sd+cotrolet进行文本引导的、姿态可控的人脸图像生成,而后利用HRN算法重建出3D头部,从而实现文生3D头部的功能。 使用方式: 模型参数: hair_tex: pipelie参数,可在cofiguratio.jso中修改,或者在pipelie初始化中传入,如: 当hair_tex为True时(默认),将输出带头发的纹理,如以上第一个示例。 当hair_tex为False时,将输出光头的纹理,如以上第二个示例. 使用范围: 目标场景: 本模型基于pytorch进行训练和推理,在ModelScope框架上,提供输入描述词,即可以通过简单的Pipelie调用来使用text-to-head模型。 如果你觉得这个该模型对有所帮助,请考虑引用下面的相关的论文:基于HRN的text-to-3D head模型
三维视觉系列模型
HRN人脸重建
HRN头部重建
模型描述
期望模型使用方式以及适用范围
pipelie(Tasks.text_to_head, model='damo/cv_HRN_text-to-head', model_revisio='v0.1', hair_tex=True))
如何使用
代码范例
import os
import cv2
from modelscope.models.cv.face_recostructio.utils import write_obj
from modelscope.outputs import OutputKeys
from modelscope.pipelies import pipelie
from modelscope.utils.costat import Tasks
def save_results(result, save_root):
os.makedirs(save_root, exist_ok=True)
# export obj ad texture
mesh = result[OutputKeys.OUTPUT]['mesh']
texture_map = result[OutputKeys.OUTPUT_IMG]
mesh['texture_map'] = texture_map
write_obj(os.path.joi(save_root, 'text_to_head_result.obj'), mesh)
prit(f'Output writte to {os.path.abspath(save_root)}')
text_to_head = pipelie(Tasks.text_to_head, model='damo/cv_HRN_text-to-head', model_revisio='v0.1')
result = text_to_head('a clow with red ose')
save_results(result, './text_to_head_results')
预处理
后处理
引用
@iproceedigs{lei2023hierarchical,
title={A Hierarchical Represetatio Network for Accurate ad Detailed Face Recostructio from I-The-Wild Images},
author={Lei, Biwe ad Re, Jiaqiag ad Feg, Megyag ad Cui, Miaomiao ad Xie, Xuasog},
booktitle={Proceedigs of the IEEE/CVF Coferece o Computer Visio ad Patter Recogitio},
pages={394--403},
year={2023}
}
点击空白处退出提示
评论