Coder Social home page Coder Social logo

hiyyg / mesh_reconstruction Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hiroharu-kato/mesh_reconstruction

0.0 1.0 0.0 116 KB

Code of single-image 3D reconstruction "Neural 3D Mesh Renderer" by H. Kato, Y. Ushiku, and T. Harada.

Home Page: http://hiroharu-kato.com/projects_en/neural_renderer.html

License: MIT License

Shell 5.22% Python 94.78%

mesh_reconstruction's Introduction

Single-Image 3D Reconstruction using Neural Renderer

This is the code for 3D reconstruction in the paper Neural 3D Mesh Renderer (CVPR 2018) by Hiroharu Kato, Yoshitaka Ushiku, and Tatsuya Harada.

Related repositories:

Requirements

Please install neural renderer.

# install neural_renderer
git clone https://github.com/hiroharu-kato/neural_renderer.git
cd neural_renderer
python setup.py install --user
# or, sudo python setup.py install

Testing pre-trained models

First, you need download pre-trained models.

bash download_models.sh

Reconstructing shapes

You can reconstruct a 3D model (*.obj) and multi-view images by the following commands.

python mesh_reconstruction/reconstruct.py -d ./data/models -eid singleclass_02691156 -i ./data/examples/airplane_in.png -oi ./data/examples/airplane_out.png -oo ./data/examples/airplane_out.obj
python mesh_reconstruction/reconstruct.py -d ./data/models -eid singleclass_02958343 -i ./data/examples/car_in.png -oi ./data/examples/car_out.png -oo ./data/examples/car_out.obj
python mesh_reconstruction/reconstruct.py -d ./data/models -eid singleclass_03001627 -i ./data/examples/chair_in.png -oi ./data/examples/chair_out.png -oo ./data/examples/chair_out.obj

Input

Output

Evaluating voxel IoU

You can evaluate voxel IoU of a model on test set by the following command.

python mesh_reconstruction/test.py -d ./data/models -eid multiclass

Mean IoU of pre-trained model is 0.5988, which is slightly different from that in the paper (0.6031). This is mainly because of random initialization of networks.

Training

First, you need download datasets rendered using ShapeNet dataset.

bash download_dataset.sh

This dataset is created by render.py using Blender.

You can train models by the following command.

bash train.sh

This produces almost the same models as the pre-trained models. It takes about three days on Tesla P100 GPU.

Citation

@inproceedings{kato2018renderer
    title={Neural 3D Mesh Renderer},
    author={Kato, Hiroharu and Ushiku, Yoshitaka and Harada, Tatsuya},
    booktitle={The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
    year={2018}
}

mesh_reconstruction's People

Contributors

hiroharu-kato avatar

Watchers

James Cloos 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.