Coder Social home page Coder Social logo

lishang6257 / cmr Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chenyuntc/cmr

0.0 0.0 0.0 29.15 MB

Project repo for Learning Category-Specific Mesh Reconstruction from Image Collections (Python3/PyTorch)

License: Other

Python 81.54% MATLAB 5.22% C++ 2.25% Cuda 10.98%

cmr's Introduction

TL;DR

This repo migrate the following work to Python3 and latest PyTorch [v1.3]:

  1. Learning Category-Specific Mesh Reconstruction from Image Collections (ECCV 2018)
  2. Neural 3D Mesh Renderer (CVPR 2018)

Special thanks to the them and neural_renderer_pytorch.

What's new here:

  • update the code [Python2 -> Python3, PyTorch 0.x -> PyTorch 1.3].
  • Remove Chainer/Cupy dependancy (Chainer is depreciated and it's painful to install cupy).
  • Simplify the environment setup.
  • Slightly reorg and simplify the code.

Neural Render

CMR

Requirements

  • Python 3 [Python2 may work as well]
  • PyTorch tested on version 1.3.0

Installation

Setup python

conda create -n cmr python=3
conda activate cmr
conda install pytorch torchvision -c pytorch
pip install -r requirements.txt

install neural_renderer

export CUDA_HOME=/path/to/cuda/ 

Install CUDA here with the same version as PyTorch python -c 'import torch;print(torch.version.cuda)'. You may skip it if you alreadly have it in your machine.

Make sure you set the right CUDA_HOME (e.g. ls $CUDA_HOME/bin/nvcc works.) and then build extension

python setup.py install # install to sys.path
python setup.py build develop # install to workspace

Demo

  1. From the cmr directory, download the trained model:
cd misc && wget https://people.eecs.berkeley.edu/~kanazawa/cachedir/cmr/model.tar.gz && tar -vzxf model.tar.gz && cd ..

You should see misc/cachedir/snapshots/bird_net/

  1. Run the demo:
python demo.py --name bird_net --num_train_epoch 500 --img_path misc/demo_data/img1.jpg
python demo.py --name bird_net --num_train_epoch 500 --img_path misc/demo_data/birdie.jpg

Training

Please see train.md

Citation

If you use this code for your research, please consider citing:

@inProceedings{cmrKanazawa18,
  title={Learning Category-Specific Mesh Reconstruction
  from Image Collections},
  author = {Angjoo Kanazawa and
  Shubham Tulsiani
  and Alexei A. Efros
  and Jitendra Malik},
  booktitle={ECCV},
  year={2018}
}
@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}
}

cmr's People

Contributors

nkolot avatar hiroharu-kato avatar chenyuntc avatar shubhtuls avatar akanazawa avatar czw0078 avatar nitish11 avatar 0xsuu avatar lotayou avatar shunsukesaito 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.