Face Parametrization through Neural Netwoks
November 4, 2019
The goal of the thesis is twofold:
build a database of synthetic faces with their parametrization;
train a neural network to provide the parametrization from the images.
The goals naturally identifies two main tasks. The second task can be faced in a second step. Focus on the database generation task first.
1 Generate the database of faces
This task is realized using MakeHuman MH 1, a free and open source 3D computer graphics middleware designed for the prototyping of photorealistic humanoids 2. In particular, MH allows to customize the appearance of a face given a set of parameters. It also allows to obtain a simple rendering, or to export the model for being processed by Blender 3, an open source complete 3D creation pipeline.
In the simplest implementation, the rendering in MH can be used. Since the face database will contain thousands of entries, their manual generation cannot be considered. Instead, a processing chain with the highest level of automatization has to be set up, compatibly with the constraints of the used applications.
The models in MH are described in a text file which contains all the parameters and the additional information to customize the model wrt. the default model, as well as the scene setup position, direction, optical properties of the camera, background rendering.
Since in the current MH version 1.1.1 there is no native support for rendering from command line, the automation should be based on MH scripts. In fact, MH is a Python script and its functionalities are accessible from scripts that can be run from inside MH. Hence the generation of faces database task can be realized in the following steps:
generate the model files .mhm;
run the rendering script for all the models in one session of MH;collect model files and corresponding images in a suitable DB.
1.1 Model files generation
The files containing the models parameters can be generated easily, since they are just text files. The content is readable using any text editor. By default, they are put in the v1models subfolder of the MH user installation. Hence, starting from the default model, few modifications at time can be applied and the corresponding lines can be identified in the saved model file. Also, the suitable camera settings can be found by positioning manually the camera in MH and recovering the numerical properties of the camera from the model file.
The following macro parameters accessible through the ModellingMain menu in MH can be considered:
Gender The gender is described by a continuous parameter macrodetailsGender in 0, 1, 0 for female and 1 for male; possible values: 0, 0.25, 0.75, and 1 minimal: 0 and 1.
1
Ethnicity TheethnicityiscontrolledthroughthreeweightsmacrodetailsAfrican,macrodetailsAsian, and macrodetailsCaucasian which sum up to 1; one of them can be set to 1 the other to 0.
Age The age is controlled by a parameter macrodetailsAge in 0, 1, 0 for 1 year, 1 for 90 years; the suitable values could be between 0.355 18 years and 1 90 years, but shorter interval can also be considered.
Weight The weight is controlled by a parameter macrodetailsWeight in 0, 1; three or four values in this interval can be used minimal: 0.5.
The parameters to modify the face appearance accessible through the ModellingFace menu in MH are numerous and subdivided in different categories head shape, head size, forehead, . . . . Only a selection of them can be considered; for each of them, two or three different values can be tried.
The model files can be generated through a script that creates the text file with any combination of the parameters values. For example, considering only the four macro parameters above mentioned, the structure of the script could be:
count0;
for gender0.0; gender 1.0; gender0.25
1.2
for ethnicity0; ethnicity 2; ethnicity1 for age0.355; age1.0; age0.215
for weight0.0; weight 1.0; weight0.5
generate a file name
sprintffilename , modeld.mhm, count;
ffopenmodel.mhm, w;
fprintff, modifier macrodetailsGender fn, gender;
fclosef;
count ;
Run the rendering script
The rendering should be run in the MH program UtilitiesScripting menu. The script should, for each model:
load the model;
set the rendering parameters;run the rendering;
save the rendering.
The script has to be written in Python.
The details on how the subtasks can be realized have to be investigated. Proper functions should
be possibly found in the example MH scripts.
1.3 Summary
Summarizing, the following script have to be realized:the script for generating the models;
the script for rendering.
To set up the process, only the macro parameters can be considered. Also, the images can be of small size e.g., 512512.
2
References
1 Makehuman community. Online. Available: http:www.makehumancommunity.org
2 Makehuman, from wikipedia, the free encyclopedia. Online. Available: https:en.wikipedia.orgwikiMakeHuman
3 Makehuman community. Online. Available: https:www.blender.org
3
Reviews
There are no reviews yet.