Giter Site home page Giter Site logo

smohammedshafeeqhameed / pix2vertex.pytorch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eladrich/pix2vertex.pytorch

0.0 0.0 0.0 5.27 MB

An official pyTorch port of the pix2vertex paper from ICCV2017

License: MIT License

Python 88.63% Jupyter Notebook 11.37%

pix2vertex.pytorch's Introduction

Unrestricted Facial Geometry Reconstruction Using Image-to-Image Translation - Official PyTorch Implementation

Binder PyPI version License: MIT

[Arxiv] [Video]

Evaluation code for Unrestricted Facial Geometry Reconstruction Using Image-to-Image Translation. Finally ported to PyTorch!

Recent Updates

2020.10.27: Added STL support

2020.05.07: Added a wheel package!

2020.05.06: Added myBinder version for quick testing of the model

2020.04.30: Initial pyTorch release

What's in this release?

The original pix2vertex repo was composed of three parts

  • A network to perform the image to depth + correspondence maps trained on synthetic facial data
  • A non-rigid ICP scheme for converting the output maps to a full 3D Mesh
  • A shape-from-shading scheme for adding fine mesoscopic details

This repo currently contains our image-to-image network with weights and model to PyTorch and a simple python postprocessing scheme.

  • The released network was trained on a combination of synthetic images and unlabeled real images for some extra robustness :)

Installation

Installation from PyPi

    $ pip install pix2vertex

Installation from source

    $ git clone https://github.com/eladrich/pix2vertex.pytorch.git
    $ cd pix2vertex.pytorch
    $ python setup.py install

Usage

The quickest way to try p2v is using the reconstruct method over an input image, followed by visualization or STL creation.

 import pix2vertex as p2v
 from imageio import imread

 image = imread(<some image file>)
 result, crop = p2v.reconstruct(image)

# Interactive visualization in a notebook
 p2v.vis_depth_interactive(result['Z_surface'])

# Static visualization using matplotlib
p2v.vis_depth_matplotlib(crop, result['Z_surface'])

# Export to STL
p2v.save2stl(result['Z_surface'], 'res.stl')

For a more complete example see the reconstruct_pipeline notebook. You can give it a try without any installations using our binder port.

Pretrained Model

Models can be downloaded from these links:

If no model path is specified the package automagically downloads the required models.

TODOs

  • Port Torch model to PyTorch
  • Release an inference notebook (using K3D)
  • Add requirements
  • Pack as wheel
  • Ported to MyBinder
  • Add a simple method to export a stl file for printing
  • Port the Shape-from-Shading method used in our matlab paper
  • Write a short blog about the revised training scheme

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}
}

pix2vertex.pytorch's People

Contributors

eladrich avatar matan-mirrori avatar

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.