Makeup Extraction of 3D Representation via Illumination-Aware Image Decomposition (Eurographics2023)
The PyTorch code for the following paper:
Makeup Extraction of 3D Representation via Illumination-Aware Image Decomposition,
Xingchao Yang, Takafumi Taketomi, Yoshihiro Kanamori,
Computer Graphics Forum (Proc. of Eurographics 2023)
- Python3
- PyTorch with CUDA
- Nvdiffrast
Run the following commands for installing other packages:
pip install -r requirements.txt
Download 3DMM model from FLAME and put them into resources
folder
We need the following models for our project:
albedoModel2020_FLAME_albedoPart.npz
FLAME_masks.pkl
FLAME_texture.npz
generic_model.pkl (from FLAME2020)
Put the trained models to checkpoints/
.
Perform a sequence of processes on sample_img.jpg
in the sample
folder
- Detect the landmark, and crop the image so that it aligns with the face. Then obtain an image of the skin area:
python step_0_preprocess.py
- Coarse Facial Material Reconstruction corresponds to section 3.1 in the original paper.
python step_1_coarse_reconstruction.py
- UV Completion and Facial Material Refinement corresponds to section 3.2 in the original paper.
python step_2_uv_completion.py
python step_3_material_refinement.py
- Makeup Extraction corresponds to section 3.3 in the original paper.
python step_4_makeup_extraction.py
- Render face using extracted textures
python step_5_render_texture.py
The results of the execution can be found in the results
folder
If you find our work useful for your research, please consider citing our paper:
@article{makeup-extraction,
author = {Yang, Xingchao and Taketomi, Takafumi and Kanamori, Yoshihiro},
title = {Makeup Extraction of 3D Representation via Illumination-Aware Image Decomposition},
journal = {Computer Graphics Forum},
volume = {42},
number = {2},
pages = {293-307},
year = {2023}
}
Here are some of the resources we benefit from: