Code Monkey home page Code Monkey logo

text2mesh's Introduction

Text2Mesh [Project Page]

arXiv Pytorch crochet candle Text2Mesh is a method for text-driven stylization of a 3D mesh, as described in "Text2Mesh: Text-Driven Neural Stylization for Meshes" (forthcoming).

Getting Started

Installation

Note: The below installation will fail if run on something other than a CUDA GPU machine.

conda env create --file text2mesh.yml
conda activate text2mesh

If you experience an error installing kaolin saying something like nvcc not found, you may need to set your CUDA_HOME environment variable to the 11.3 folder i.e. export CUDA_HOME=/usr/local/cuda-11.3, then rerunning the installation.

System Requirements

  • Python 3.7
  • CUDA 11
  • GPU w/ minimum 8 GB ram

Run examples

Call the below shell scripts to generate example styles.

# cobblestone alien
./demo/run_alien_cobble.sh
# shoe made of cactus 
./demo/run_shoe.sh
# lamp made of brick
./demo/run_lamp.sh
# ...

The outputs will be saved to results/demo, with the stylized .obj files, colored and uncolored render views, and screenshots during training.

Outputs

alien alien geometry alien style

alien alien geometry alien style

candle candle geometry candle style

person ninja geometry ninja style

shoe shoe geometry shoe style

vase vase geometry vase style

lamp lamp geometry lamp style

horse horse geometry horse style

Important tips for running on your own meshes

Text2Mesh learns to produce color and displacements over the input mesh vertices. The mesh triangulation effectively defines the resolution for the stylization. Therefore, it is important that the mesh triangles are small enough such that they can accurately potray the color and displacement. If a mesh contains large triangles, the stylization will not contain sufficent resolution (and leads to low quality results). For example, the triangles on the seat of the chair below are too large.

large-triangles

You should remesh such shapes as a pre-process in to create smaller triangles which are uniformly dispersed over the surface. Our example remeshing script can be used with the following command (and then use the remeshed shape with Text2Mesh):

python3 remesh.py --obj_path [the mesh's path] --output_path [the full output path]

For example, to remesh a file name called chair.obj, the following command should be run:

python3 remesh.py --obj_path chair.obj --output_path chair-remesh.obj

Other implementations

Kaggle Notebook (by neverix)

External projects using Text2Mesh

Citation

@InProceedings{Michel_2022_CVPR,
    author    = {Michel, Oscar and Bar-On, Roi and Liu, Richard and Benaim, Sagie and Hanocka, Rana},
    title     = {Text2Mesh: Text-Driven Neural Stylization for Meshes},
    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
    month     = {June},
    year      = {2022},
    pages     = {13492-13502}
}

text2mesh's People

Contributors

cpacker avatar ddecatur avatar factoryofthesun avatar luke23571113 avatar mfrashad avatar ranahanocka avatar roibaron 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.