Giter VIP home page Giter VIP logo

style_transfer_3d's Introduction

2D-to-3D style transfer using Neural Renderer

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

Related repositories:

Installation

# 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

Example

bash ./examples/run.sh

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

style_transfer_3d's People

Contributors

hiroharu-kato avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

style_transfer_3d's Issues

Code compatibility without GPU

I am working on AWS Deep Learning instance without GPU.

Is this code compatible with only GPU? Why this part of code is important ? Can this function be replaced with CPU compatible VGG trained-model and feature extraction? Let me know the feasibility and challenges, I can raise a PR for the same.

Failure to use save_obj() function to save mesh model with textures

Hi, I tried to save style transferred mesh using save_obj() function like following.

...

# draw object
model.renderer.background_color = (1, 1, 1)
loop = tqdm.tqdm(range(0, 360, 4))
for num, azimuth in enumerate(loop):
    loop.set_description('Drawing')
    model.renderer.eye = neural_renderer.get_points_from_angles(2.732, 30, azimuth)
    images = model.renderer.render(*model.mesh.get_batch(1))
    image = images.data.get()[0].transpose((1, 2, 0))
    scipy.misc.toimage(image, cmin=0, cmax=1).save('%s/_tmp_%04d.png' % (directory_output, num))
make_gif(directory_output, args.filename_output)

# save model using save_obj() function
vertices = model.mesh.vertices.data
faces = model.mesh.faces
textures = model.mesh.textures.data
neural_renderer.save_obj("output.obj", vertices, faces, textures=textures)

But outputted texture is not same as renderred image.

  • Renderred image(gif)
    teapot_gris
  • Outputted mesh (I used Meshlab to view this.)
    test

My environment is

  • Ubuntu16.04
  • Python3.5
  • Chainer4.1.0
  • Cupy4.1.0
  • Cuda9.2,
  • Cudnn 7.3.1.20
  • nccl2 2.3.5-2

Do you have any idea to solve this?

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.