Unrestricted Facial Geometry Reconstruction Using Image-to-Image Translation

Overview

Unrestricted Facial Geometry Reconstruction Using Image-to-Image Translation

[Arxiv] [Video]

Evaluation code for Unrestricted Facial Geometry Reconstruction Using Image-to-Image Translation. Given a single image, the code outputs the reconstructed mesh.

Recent Updates

2020.05.07: We have released a PyTorch version of this repository and encourage you to give it a try!

2018.07.20: Spiltted postprocess into the different steps composing the pipeline, changed models to float to save space.

Setup & Usage

The project was tested on Ubuntu 14.04 LTS with Matlab R2015b, to run it follow these instructions:

  • Make sure you have Torch installed on your machine.

  • Install the mattorch and nngraph packages.

    luarocks install mattorch    
    luarocks install nngraph
  • Download the model files and extract them into the models directroy.

  • Run the runme.m script in Matlab.

Citation

If you use this code for your research, please cite our paper Unrestricted Facial Geometry Reconstruction Using Image-to-Image Translation:

@article{sela2017unrestricted,
  title={Unrestricted Facial Geometry Reconstruction Using Image-to-Image Translation},
  author={Sela, Matan and Richardson, Elad and Kimmel, Ron},
  journal={arxiv},
  year={2017}
}
Comments
  • Problem about 'postprocess.p' output

    Problem about 'postprocess.p' output

    The code could run successfully, but the output is random. The output of the deep network is good but when doing 'Affine Align', the alignment results between the depth and 3D template are random. The results are different when running the code several times. Sometimes only partial face is reconstructed. I think this may be the depth cannot align well with the template. The 'postprocess.p' is protected so I cannot figure out the problem.

    opened by Fanziapril 9
  • I get some troubles when running net...

    I get some troubles when running net...

    I use GPU and change the run_net.lua file : output = model:cuda():forward(in_im:cuda()):double() but I still got errors:

    Running Net...//torch/install/bin/luajit: //torch/install/share/lua/5.1/torch/Tensor.lua:238: attempt to index a nil value stack traceback: //torch/install/share/lua/5.1/torch/Tensor.lua:238: in function 'type' ./torch/install/share/lua/5.1/nngraph/gmodule.lua:233: in function 'recursiveType' **/torch/install/share/lua/5.1/nngraph/gmodule.lua:247: in function 'applyTypeToTable' **/torch/install/share/lua/5.1/nngraph/gmodule.lua:252: in function 'cuda' run_net.lua:27: in main chunk [C]: in function 'dofile' /torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk [C]: at 0x00405d50 Error using load Unable to read file '//pix2vertex-master/imgs/2327-3-res.mat'. No such file or directory.

    Error in run_net (line 13) net_res = load(resname);

    Error in runme (line 26) im_pncc = run_net( img, '/**/pix2vertex-master/models/pncc_net.t7', im_file(1:end-4));

    Do you know how to fix it?

    opened by PolarisD 6
  • Separate Non-Rigid Registration and Fine-Details Recon

    Separate Non-Rigid Registration and Fine-Details Recon

    Hi Matan and Elad,

    Thanks for an awesome work! In your paper Fig.9, you show results of each one of your 3 steps results. However, in the code, the non-rigid registration and fine-details reconstruction are packed into a single post-processing function. Is it possible that you provide them as two separate functions?

    That would be really helpful in many scenarios; i.e if ground truth coarse shape is given, it's can be feed to your refinement module to do further processing.

    Thanks

    opened by tranluan 2
  • symbol lookup error

    symbol lookup error

    Hello,

    when compiling the code, I found out that the line system(['OMP_NUM_THREADS=1 th run_net.lua -model ' net_path ' -inputs ' matname ' -res ' resname ]); in "run_net.m" doesn't work for me. When typing this: [f,k]=system(['OMP_NUM_THREADS=1 th run_net.lua -model ' net_path ' -inputs ' matname ' -res ' resname ]) I get these results:

    k =

    127

    f =

    '/mnt/appl/software/Torch/1.0-goolfc-2018a/bin/luajit: symbol lookup error: /home.others/eb/easybuild/software/Torch/1.0-goolfc-2018a/lib/libTH.so.0: undefined symbol: dgemm_
     '
    

    Does anyone know how to fix this?

    Thanks in adavance.

    opened by khmariem 1
  • Can I open the postprocess.p file?

    Can I open the postprocess.p file?

    Thanks for you sharing this code, it's quite incredible, however, I cannot open and edit the postprocess.p file, is these any way to open and edit this file.

    Any help will be gratefully appreciated!

    opened by happsky 1
  • Error using repmat in postprocess.p

    Error using repmat in postprocess.p

    Hi! First of all, great paper, awesome results! Never had much interest in machine learning, but this paper actually inspired me to learn more and try it out. I've tried to run this implementation, following the instructions in Readme, but I've stumbled an issue when running the code in Matlab (on Ubuntu 16.04 and Matlab R2012a, latest version of Torch). At the postprocessing step I get error:

    Error using **repmat**
    Too many input arguments.
    
    Error in /home/user/pix2vertex/postprocess.p>postprocess (line 38)
    
    Error in **runme** (line 42)
    [vertex, face, texture] = postprocess(img, im_pncc, im_depth, show_figs);
    

    I don't have much experience with Matlab, but according to docs, .p file is a protected file, so I don't really have access and can't really debug what's going on down there. Would be great if you give some pointers!

    My best, Ilja

    opened by the-lay 1
  • how can I get different viewpoints?

    how can I get different viewpoints?

    The code runs successfully, but only the front view reconstruction effect can be generated, and the reconstruction of multiple viewpoints in the paper cannot be realized. What can I do to observe the reconstruction model from different viewpoints? like this: 11

    opened by PolarisD 0
  • Negative index access

    Negative index access

    Hello,

    I get the following error in some cases (not image specific, encounter it when I run on multiple images)

    Starting Detail Extraction
    Attempted to access imgh(-0,163); index must be a positive integer or logical.
    Error in mesh2fine>ZBuffer (line 635)
    Error in mesh2fine>mesoscopic_deformation (line 80)
    Error in mesh2fine (line 25)
    Error in runme (line 58)
        [ fine_result ] = mesh2fine(pipeline_args); %% 7
    
    opened by vikasTmz 0
  • Porting to Octave? Improve python code?

    Porting to Octave? Improve python code?

    Hello all,

    I've been experimenting with your code in pytorch, and it is my understanding that there is a final step that is not applied using the python/torch method you've published. The results in this repo seem to be way more accurate than pytorch is able to provide. In that light I have two questions:

    1. Is this code runnable using Octave? or alternatively:
    2. Taking into account the Matlab version produces much better results. What is the difference between this code and and the pytorch one, does it change any steps for to account for the increase accuracy and result quality, or it misses any final step completely? If yes, which ones, so that I can promptly check that out.

    Thank you,

    opened by MarlNox 1
  • Final Output issue

    Final Output issue

    I am glad to check and run this code. I figure out that the final output is somehow not clear and most of the face area is not covered. You can check the attached image. On the other hand in the paper, the same image mesh output is clear and fulllength., Screenshot from 2019-12-20 12-54-05

    opened by sajjadafridi 0
Owner
Matan Sela
Software Engineer
Matan Sela
Automatically measure the facial Width-To-Height ratio and get facial analysis results provided by Microsoft Azure

fwhr-calc-website This project is to automatically measure the facial Width-To-Height ratio and get facial analysis results provided by Microsoft Azur

SoohyunPark 1 Feb 7, 2022
Adversarial Color Enhancement: Generating Unrestricted Adversarial Images by Optimizing a Color Filter

ACE Please find the preliminary version published at BMVC 2020 in the folder BMVC_version, and its extended journal version in Journal_version. Datase

null 28 Dec 25, 2022
Attack classification models with transferability, black-box attack; unrestricted adversarial attacks on imagenet

Attack classification models with transferability, black-box attack; unrestricted adversarial attacks on imagenet, CVPR2021 安全AI挑战者计划第六期:ImageNet无限制对抗攻击 决赛第四名(team name: Advers)

null 51 Dec 1, 2022
transfer attack; adversarial examples; black-box attack; unrestricted Adversarial Attacks on ImageNet; CVPR2021 天池黑盒竞赛

transfer_adv CVPR-2021 AIC-VI: unrestricted Adversarial Attacks on ImageNet CVPR2021 安全AI挑战者计划第六期赛道2:ImageNet无限制对抗攻击 介绍 : 深度神经网络已经在各种视觉识别问题上取得了最先进的性能。

null 25 Dec 8, 2022
Multiview Neural Surface Reconstruction by Disentangling Geometry and Appearance

Multiview Neural Surface Reconstruction by Disentangling Geometry and Appearance Project Page | Paper | Data This repository contains an implementatio

Lior Yariv 521 Dec 30, 2022
Self-Supervised Monocular 3D Face Reconstruction by Occlusion-Aware Multi-view Geometry Consistency[ECCV 2020]

Self-Supervised Monocular 3D Face Reconstruction by Occlusion-Aware Multi-view Geometry Consistency(ECCV 2020) This is an official python implementati

null 304 Jan 3, 2023
A Planar RGB-D SLAM which utilizes Manhattan World structure to provide optimal camera pose trajectory while also providing a sparse reconstruction containing points, lines and planes, and a dense surfel-based reconstruction.

ManhattanSLAM Authors: Raza Yunus, Yanyan Li and Federico Tombari ManhattanSLAM is a real-time SLAM library for RGB-D cameras that computes the camera

null 117 Dec 28, 2022
"MST++: Multi-stage Spectral-wise Transformer for Efficient Spectral Reconstruction" (CVPRW 2022) & (Winner of NTIRE 2022 Challenge on Spectral Reconstruction from RGB)

MST++: Multi-stage Spectral-wise Transformer for Efficient Spectral Reconstruction (CVPRW 2022) Yuanhao Cai, Jing Lin, Zudi Lin, Haoqian Wang, Yulun Z

Yuanhao Cai 274 Jan 5, 2023
Script that receives an Image (original) and a set of images to be used as "pixels" in reconstruction of the Original image using the set of images as "pixels"

picinpics Script that receives an Image (original) and a set of images to be used as "pixels" in reconstruction of the Original image using the set of

RodrigoCMoraes 1 Oct 24, 2021
Implementation of ICCV19 Paper "Learning Two-View Correspondences and Geometry Using Order-Aware Network"

OANet implementation Pytorch implementation of OANet for ICCV'19 paper "Learning Two-View Correspondences and Geometry Using Order-Aware Network", by

Jiahui Zhang 225 Dec 5, 2022
Spontaneous Facial Micro Expression Recognition using 3D Spatio-Temporal Convolutional Neural Networks

Spontaneous Facial Micro Expression Recognition using 3D Spatio-Temporal Convolutional Neural Networks Abstract Facial expression recognition in video

Bogireddy Sai Prasanna Teja Reddy 103 Dec 29, 2022
Keeping it safe - AI Based COVID-19 Tracker using Deep Learning and facial recognition

Keeping it safe - AI Based COVID-19 Tracker using Deep Learning and facial recognition

Vansh Wassan 15 Jun 17, 2021
A facial recognition doorbell system using a Raspberry Pi

Facial Recognition Doorbell This project expands on the person-detecting doorbell system to allow it to identify faces, and announce names accordingly

rydercalmdown 22 Apr 15, 2022
GazeScroller - Using Facial Movements to perform Hands-free Gesture on the system

GazeScroller Using Facial Movements to perform Hands-free Gesture on the system

null 2 Jan 5, 2022
Python implementation of 3D facial mesh exaggeration using the techniques described in the paper: Computational Caricaturization of Surfaces.

Python implementation of 3D facial mesh exaggeration using the techniques described in the paper: Computational Caricaturization of Surfaces.

Wonjong Jang 8 Nov 1, 2022
GANimation: Anatomically-aware Facial Animation from a Single Image (ECCV'18 Oral) [PyTorch]

GANimation: Anatomically-aware Facial Animation from a Single Image [Project] [Paper] Official implementation of GANimation. In this work we introduce

Albert Pumarola 1.8k Dec 28, 2022
Facial Image Inpainting with Semantic Control

Facial Image Inpainting with Semantic Control In this repo, we provide a model for the controllable facial image inpainting task. This model enables u

Ren Yurui 8 Nov 22, 2021
PyTorch implementation of "Image-to-Image Translation Using Conditional Adversarial Networks".

pix2pix-pytorch PyTorch implementation of Image-to-Image Translation Using Conditional Adversarial Networks. Based on pix2pix by Phillip Isola et al.

mrzhu 383 Dec 17, 2022
This repository contains several image-to-image translation models, whcih were tested for RGB to NIR image generation. The models are Pix2Pix, Pix2PixHD, CycleGAN and PointWise.

RGB2NIR_Experimental This repository contains several image-to-image translation models, whcih were tested for RGB to NIR image generation. The models

null 5 Jan 4, 2023