All Projects → VisionSystemsInc → Pix2face

VisionSystemsInc / Pix2face

3D human face estimation and rendering from a single image

Projects that are alternatives of or similar to Pix2face

Objectron
Objectron is a dataset of short, object-centric video clips. In addition, the videos also contain AR session metadata including camera poses, sparse point-clouds and planes. In each video, the camera moves around and above the object and captures it from different views. Each object is annotated with a 3D bounding box. The 3D bounding box describes the object’s position, orientation, and dimensions. The dataset contains about 15K annotated video clips and 4M annotated images in the following categories: bikes, books, bottles, cameras, cereal boxes, chairs, cups, laptops, and shoes
Stars: ✭ 1,352 (+1419.1%)
Mutual labels:  jupyter-notebook, 3d-reconstruction
Ransac Flow
(ECCV 2020) RANSAC-Flow: generic two-stage image alignment
Stars: ✭ 265 (+197.75%)
Mutual labels:  jupyter-notebook, 3d-reconstruction
Nerf pl
NeRF (Neural Radiance Fields) and NeRF in the Wild using pytorch-lightning
Stars: ✭ 362 (+306.74%)
Mutual labels:  jupyter-notebook, 3d-reconstruction
Kaggle House Prices Advanced Regression Techniques
Udacity capstone project: Kaggle competition on house prices prediction using advanced regression techniques
Stars: ✭ 90 (+1.12%)
Mutual labels:  jupyter-notebook
Kafka Sparkstreaming Cassandra
Docker container for Kafka - Spark Streaming - Cassandra
Stars: ✭ 90 (+1.12%)
Mutual labels:  jupyter-notebook
Dsrl
Dual Super-Resolution Learning for Semantic Segmentation
Stars: ✭ 91 (+2.25%)
Mutual labels:  jupyter-notebook
Plotly.py
The interactive graphing library for Python (includes Plotly Express) ✨
Stars: ✭ 10,701 (+11923.6%)
Mutual labels:  jupyter-notebook
Beauty.torch
Understanding facial beauty with deep learning.
Stars: ✭ 90 (+1.12%)
Mutual labels:  jupyter-notebook
H2o Tutorials
Tutorials and training material for the H2O Machine Learning Platform
Stars: ✭ 1,305 (+1366.29%)
Mutual labels:  jupyter-notebook
Courses
Python courses for the scientific researcher
Stars: ✭ 90 (+1.12%)
Mutual labels:  jupyter-notebook
Monte carlo ray tracer
A program with an implemented Monte Carlo Ray Tracer algorithm for global illumination of a virtual 3D scene.
Stars: ✭ 90 (+1.12%)
Mutual labels:  rendering
Music Generation
An RNN implementation to generate music
Stars: ✭ 90 (+1.12%)
Mutual labels:  jupyter-notebook
Fast Scnn
Implementation of Fast-SCNN using Tensorflow 2.0
Stars: ✭ 91 (+2.25%)
Mutual labels:  jupyter-notebook
Sci Pype
A Machine Learning API with native redis caching and export + import using S3. Analyze entire datasets using an API for building, training, testing, analyzing, extracting, importing, and archiving. This repository can run from a docker container or from the repository.
Stars: ✭ 90 (+1.12%)
Mutual labels:  jupyter-notebook
Python3 Cookbook
《Python Cookbook》 3rd Edition Translation
Stars: ✭ 9,689 (+10786.52%)
Mutual labels:  jupyter-notebook
Python For Signal Processing
Notebooks for "Python for Signal Processing" book
Stars: ✭ 1,296 (+1356.18%)
Mutual labels:  jupyter-notebook
Benchmarking Gnns
Repository for benchmarking graph neural networks
Stars: ✭ 1,297 (+1357.3%)
Mutual labels:  jupyter-notebook
Nbinclude.jl
import code from IJulia Jupyter notebooks into Julia programs
Stars: ✭ 90 (+1.12%)
Mutual labels:  jupyter-notebook
Allenai
Stars: ✭ 90 (+1.12%)
Mutual labels:  jupyter-notebook
Encoder4editing
Official implementation of "Desinging an Encoder for StyleGAN Image Manipulation" https://arxiv.org/abs/2102.02766
Stars: ✭ 91 (+2.25%)
Mutual labels:  jupyter-notebook

pix2face

The complete pix2face pipeline, including:

  • The pix2face dense face alignment and 3D estimation network (pix2face_net)
  • The camera/pose and face coefficient estimation contained in the face3d repository
  • Rendering of novel viewpoints and expressions

Requirements

You have two options for running: within a docker container, or natively on your system. The only requirement for the former is docker itself. The requirements for building and running natively are:

  • CMake (version 3.10 or higher)
  • Python (version 3.6 has been tested)
  • numpy, Pillow, scikit-image
  • pytorch (versions 0.4 and 1.0 have been tested), including torchvision
  • opencv (opencv-python-headless)

Optional:

  • CUDA (for GPU acceleration of pix2face network and coefficient estimation)

For a full list of system packages required, consult the Dockerfile.

Setup and Running (Docker)

See the README.md in the docker directory of this repository.

Setup (Native)

Clone this repository to $PIX2FACE_SRC_DIR. If you did not clone recursively, you'll need to run:

cd $PIX2FACE_SRC_DIR
git submodule update --init --recursive --progress

Activate your favorite python virtualenv if not using your system's python. This will ensure that the build process will link against the correct python libraries.

Install the python requirements file.

pip install -r $PIX2FACE_SRC_DIR/requirements.txt

Create a build directory and run Cmake:

mkdir $PIX2FACE_BUILD_DIR
cd $PIX2FACE_BUILD_DIR
cmake $PIX2FACE_SRC_DIR

Note: Depending on the location of your graphics libraries, you may have to set CMAKE_PREFIX_PATH. For example:

cmake -DCMAKE_PREFIX_PATH=/usr/lib64/nvidia $PIX2FACE_SRC_DIR

By default, the compiled python modules will be installed in the active python site. If you want to change this, add -DPYTHON_SITE=${INSTALL_DIR} to the cmake command line and add ${INSTALL_DIR} to your PYTHONPATH.

Build the face3d and vxl compiled python modules:

make install

Configure your python path: Source the env script:

cd $PIX2FACE_SRC_DIR
source ./pix2face_env.bsh

Or, manually:

export PYTHONPATH=${PIX2FACE_SRC_DIR}/pix2face_net:${PIX2FACE_SRC_DIR}/python

Download the required data files to their correct locations by running the download_data.bsh script. Note that the numpy and eos_py packages are needed for the script to work correctly but they should already be in your python evironment if the requirements.txt file was used to create a python environment.

cd ${PIX2FACE_SRC_DIR}
./download_data.bsh

Running (Native)

To exercise the full pipeline, you can run the demo script:

python scripts/pix2face_demo.py

This will estimate face geometry from a test image and render images with new pose and expression. Rendered images will be saved directly to the scripts directory.

The scripts directory also contains several examples of pose and coefficient estimation. For example, to generate a CSV file $POSE_CSV_FNAME with yaw, pitch, and roll (in degrees) of every face image listed (one per line) in the text file $IMAGE_PATHS_FILE:

python scripts/estimate_pose_batch.py $IMAGE_PATHS_FILE $POSE_CSV_FNAME

Note that the examples in the scripts directory generally set a variable cuda_device, which is defaulted to None. The value of None will cause the pix2face network to run on the CPU. Set cuda_device to an integer value to run on the corresponding GPU device for increased processing speed.

Citation

If you find this software useful, please consider referencing:

@INPROCEEDINGS{pix2face2017,
author = {Daniel Crispell and Maxim Bazik},
booktitle = {2017 IEEE International Conference on Computer Vision Workshop (ICCVW)},
title = {Pix2Face: Direct 3D Face Model Estimation},
year = {2017},
pages = {2512-2518},
ISSN = {2473-9944},
month={Oct.}
}

Contact

Daniel Crispell [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].