Giter VIP home page Giter VIP logo

neuface's Introduction

NeuFace: Realistic 3D Neural Face Rendering from Multi-view Images [CVPR 2023]

Mingwu Zheng, Haiyu Zhang, Hongyu Yang, Di Huang

Official code for CVPR 2023 paper NeuFace: Realistic 3D Neural Face Rendering from Multi-view Images.

The paper presents a novel 3D face rendering model, namely NeuFace, to learn accurate and physically-meaningful underlying 3D representations by neural rendering techniques.

NeuFace naturally incorporates low-rank neural BRDFs into physically based rendering, allowing it to capture facial geometry and complex appearance properties collaboratively, which enhances its robustness against specular reflections. Additionally, NeuFace exhibits commendable generalization abilities when applied to common objects.

Installation Requirmenets

The code is compatible with python 3.6.13 and pytorch 1.9.1. To create an anaconda environment named neuface with the required dependencies, run:

conda create -n neuface python==3.6.13
conda activate neuface
pip install -r requirement.txt

Usage

Data and shape prior

For human face, We use data from FaceScape Dataset to evaluate our model. The detailed 3D mesh is used to generate a mask of each image's face area. The ImFace model can be download from pretrained-model.

  • Mesh preprocess To obtain the preprocessed mesh, run:
python data_preprocess/cut_mesh.py

Please make sure the path in the file is correct.

  • Image and mask rendering Once you have the preprocessed mesh, you can render the mask and image by running:
python data_preprocess/render_mask.py

Please make sure the path in the file is correct.

For common objects, the DTU dataset is used for model evaluation.

Train on Facescape

To train NeuFace on Facescape dataset, run:

python scripts/train_pl.py

Make sure that the variables in your config file are correct. Results can be found in {out_dir}/{expname}. The trained model can be downloaded from (FaceScape's author allows to release the trained model):

Trained Model Description
NeuFace_1_id_2_exp train on 1 id with 2 exp (smile) of Facescape dataset

If you want to use our trained model, please place the downloaded file in exp_pl/ckpt/{trained_model}.

Evaluation on Facescape

To evaluate the novel view metrics, run:

 python scripts/eval_pl.py --ckpt [ckpt_path] --out_dir [our_dir]

Results can be found in {our_dir}/test/{expname}.

Train on DTU

To train NeuFace on DTU dataset, run:

cd common_object
python training/exp_runner.py --conf ./confs/dtu_fixed_cameras.conf --scan_id [scan_id] --gpu [GPU_ID]

Make sure that [dataset.data_dir] in your config file is correct. The results can be found in common_object/exps/{train.expname}/{timestamp}. The trained model can be downloaded from:

Trained Model Description
NeuFace_DTU_65 train on 65 scan of DTU dataset
NeuFace_DTU_110 train on 110 scan of DTU dataset
NeuFace_DTU_118 train on 118 scan of DTU dataset

If you want to use our trained model, please place the downloaded file in common_object/exps/{trained_model}.

Evaluation on DTU

To evaluate the training view metrics, run:

cd common_object
python evaluation/eval.py  --conf ./confs/dtu_fixed_cameras.conf --scan_id [SCAN_ID] --eval_rendering --gpu [GPU_INDEX]

Results can be found in common_object/evals/{train.expname}/rendering.

Citation

If you find our work useful in your research, please consider citing:

@inproceedings{zheng2023neuface,
title={NeuFace: Realistic 3D Neural Face Rendering from Multi-view Images},
author={Zheng, Mingwu and Zhang Haiyu and Yang, Hongyu and Huang, Di},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
year={2023}
}

Acknowledgments

  • The codebase is developed based on VolSDF and IDR of Lior et al. Many thanks to their great contributions!
  • This paper is based on ImFace (CVPR 2022), welcome to pay attention!

neuface's People

Contributors

aejion avatar mingwuzheng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

neuface's Issues

Expression Transfer

Great work; thanks for this - how can we do expression transfer between 2 identities here?

The process of reconstructing a 3D model using multi-view images of my face

To reconstruct a 3D model using my facial images, I've seen that using ImFace is necessary for cropping the face mesh and rendering a mask for facial images.

Is it correct to use the "NeuFace/data_preprocess/cut_mesh.py" and "NeuFace/data_preprocess/render_mask.py" codes for the necessary steps in that process?

In cut_mesh.py code,
tu_mesh_path = '' # tu model path
high_mesh_path = '' # origin mesh path (high quality)
output_mesh_path = '' # output mesh path

What kind of file should I put in the tu model path?
Is it appropriate to put multi-view images on the original mesh path?

In render_mask.py code,
origin_path = r'' # origin image path
mask_path = r'./mask' # output mask path
mask_image_path = r'./image' # output image path
ply_path = r'' # cut mesh path (high quality)
tu_mesh_path = '' # tu mesh path

I would appreciate it if you could let me know what files go into each of the paths mentioned above.

How to export texture?

Thanks for your great work!

My goal: is to import highly detailed meshes and textures into 3D software like Blender, Unreal for rendering

How do export mesh and textures (diffuse, specular, normal)?

image

Like image

image

about training data preparation

Hi~
I have some questions on the training data preparation.

According to README, the training data is from the Facescape dataset. Here → https://facescape.nju.edu.cn/Page_Data/ describes the Facescape dataset, and which part is useful (should be downloaded) for NeuFace? And after the data is acquired, which data preprocess script should I run to proprocess the data properly?

Looking forward to your reply, thank you!

Code converts SH to environment map

Hi, thanks so much for this amazing work!

I'm trying to visualize the environment map from the recovered lighting, and was not sure what is the right convention / coordinate system to use for correct visualization. So I was wondering if you could provide some info on how you converted SH to environment map and environment map to SH? Thanks so much!

Unable to train DTU dataset

Hello, your work is very excellent, but I have some problems when I want to use the DTU dataset for training. I hope you can help me answer them, if you have time.

image

code release about relight the reconstructed scene

Hi, thanks for your great work and code.

I find there is only a novel view synthesis evaluation code. Do you have a plan to release the code to relight the reconstructed scene under a given environment map?

About dataset

Hi~  It's a really fascinating achievement!
I have some questions.After I preprocess facescape with python data_preprocess/preprocess.py in imface,do I get imface_image and image_model?
Should I use python run/train.py [--config file's name] to train imface in the next step to get imface_mask?
Because after I run train_pl.py he reports AttributeError: 'NoneType' object has no attribute 'shape'

Train NeuFace on captured multi-view images but do not use ImFace prior

Hi, thanks for your great work and code!

I try to run NeuFace on a multi-view face image dataset capture by myself. It contains multi-view images of a single identity.

By reading through the issues, I find that its not very easy to follow the "Train on FaceScape" pipeline. It seems that a lot of processing task should be done, including align the mesh to the ImFace coordinates, crop the face mesh, etc. So I want to follow the "Train on DTU" pipeline.

My question is that, have you tried to train NeuFace on the same identity from the FaceScape dataset, with and without the ImFace prior (in my understanding "Train on FaceScape" is the one with prior while "Train on DTU" is the one without prior)? If without the ImFace prior, can we obtain plausible relightable face reconstruction results? What about the performance drop compared to the one with prior?

Thanks.

Training problem help

Hi, I met a problem about training.

I training the processed dataset with 11 images as test set as illustrated in paper. The training results: training PSNR about 14.5 and the evaluated PSNR is about 25. At the beginning, I doubt the dataset has some problem. But when I evaluate the dataset by your released model(id=1, exp=2), the results are reasonable, i.e. PSNR=31.49 (in the train dataset) and PSRN=30.71(in the test dataset). Can you give me a help?

Some missing input files

Hi,

It's a fascinating piece of work.

When I tried to run NeuFace on the Facescape dataset, I found some input files were missing. For example, "Rt_scale_dict.json".

How could I get these files or do I need some preprocessing on the dataset?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.