Coder Social home page Coder Social logo

asetsuna / softras Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shichenliu/softras

2.0 2.0 0.0 10.51 MB

Project page of paper "Soft Rasterizer: A Differentiable Renderer for Image-based 3D Reasoning"

License: MIT License

Python 49.77% C++ 7.30% Cuda 42.93%

softras's Introduction

Soft Rasterizer (SoftRas)

This repository contains the code (in PyTorch) for "Soft Rasterizer: A Differentiable Renderer for Image-based 3D Reasoning" paper by Shichen Liu, Tianye Li, Weikai Chen and Hao Li.

Contents

  1. Introduction
  2. Usage
  3. Applications
  4. Contacts

Introduction

Soft Rasterizer (SoftRas) is a truly differentiable renderer framework with a novel formulation that views rendering as a differentiable aggregating process that fuses probabilistic contributions of all mesh triangles with respect to the rendered pixels. Thanks to such "soft" formulation, our framework is able to (1) directly render colorized mesh using differentiable functions and (2) back-propagate efficient supervision signals to mesh vertices and their attributes (color, normal, etc.) from various forms of image representations, including silhouette, shading and color images.

Usage

The code is built on Python3 and PyTorch 0.4. CUDA is needed in order to install the module. Our code is extended on the basis of this repo.

To install the module, using

python setup.py install

Applications

0. Rendering

We demonstrate the rendering effects provided by SoftRas. Realistic rendering results (1st and 2nd columns) can be achieved with a proper setting of sigma and gamma. With larger sigma and gamma, one can obtain renderings with stronger transparency and blurriness (3rd and 4th column).

python examples/demo_render.py

(More demos are coming soon)

1. 3D Unsupervised Single-view Mesh Reconstruction

By incorporating SoftRas with a simple mesh generator, one can train the network with multi-view images only, without requiring any 3D supervision. At test time, one can reconstruct the 3D mesh, along with the mesh texture, from a single RGB image. Below we show the results of single-view mesh reconstruction on ShapeNet.

2. Image-based Shape Deformation

SoftRas provides strong supervision for image-based mesh deformation. We visualize the deformation process from a sphere to a car model and then to a plane given supervision from multi-view silhouette images.

3. Pose Optimization for Rigid Objects

With scheduled blurry renderings, one can obtain smooth energy landscape that avoids local minima. Below we demonstrate how a color cube is fitted to the target image in the presence of large occlusions. The blurry rendering and the corresponding rendering losses are shown in the 3rd and 4th columns respectively.

4. Non-rigid Shape Fitting

We fit the parametric body model (SMPL) to a target image where the part (right hand) is entirely occluded in the input view.

Contacts

Shichen Liu: [email protected]

Any discussions or concerns are welcomed!

Citation

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

@article{liu2019softras,
  title={Soft Rasterizer: A Differentiable Renderer for Image-based 3D Reasoning},
  author={Liu, Shichen and Li, Tianye and Chen, Weikai and Li, Hao},
  journal={arXiv preprint arXiv:1904.01786},
  year={2019}
}

softras's People

Contributors

shichenliu avatar chenweikai avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.