GithubHelp home page GithubHelp logo

irisjae / latent-paint-mesh Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nasirkhalid24/latent-paint-mesh

0.0 0.0 0.0 6.31 MB

NVDiffrast based implementation of Latent-Paint

Python 100.00%

latent-paint-mesh's Introduction

Latent-Paint-Mesh

NVDiffrast based implementation of Latent-Paint from Latent-NeRF

Use text to edit textures of a 3D model or create new ones - powered by Stable Diffusion

Creating texture with prompt "Goldfish"

Goldfish-gif

Editing an existing texture with prompt "Air Jordan 1"

Sneaker-gif

Quickstart

Use the following Google Colab notebook to get started - creating a texture map for 3d car model using text prompt "Lightning McQueen" (~5 mins)

Setup

git clone https://github.com/NasirKhalid24/Latent-Paint-Mesh.git
cd Latent-Paint-Mesh
pip install -r requirements.txt

# Create a TOKEN file with your huggingface token from https://huggingface.co/settings/tokens
echo -n YOUR_TOKEN_HERE >> TOKEN

Usage

python main.py --mesh data/blub/blub_triangulated.obj --text "Goldfish" --epochs 2500 --log 250
  optional arguments:
  --gpu GPU            GPU index (default 0)
  --mesh MESH          Path to .obj must have uv unwrapped
  --material MATERIAL  Path to starting material, if none will randomly initialize
  --text TEXT          Text prompt
  --lr LR              Learning rate
  --scale SCALE        Factor by which to scale up 64x64 texture map (default 2)
  --log LOG            Log every x epochs, set to -1 to disable logging (much faster)
  --dist_min DIST_MIN  Minimum camera distance
  --dist_max DIST_MAX  Maximum camera distance
  --azim_min AZIM_MIN  Minimum camera azimuth in degrees
  --azim_max AZIM_MAX  Maximum camera azimuth in degrees
  --elev_min ELEV_MIN  Minimum camera elevation in degrees wrt x plane (use -x and +x for elevation)
  --elev_max ELEV_MAX  Maximum camera elevation in degrees wrt x plane (use -x and +x for elevation)
  --fov_min FOV_MIN    Minimum FOV in degrees
  --fov_max FOV_MAX    Maximum FOV in degrees
  --offset             Offset mesh from center
  --colab              Enable for google colab logging
  --prompt_aug         Prompt augmentatio (side, back)
  --auto_cam           Automatically calculate camera params
  --epochs EPOCHS      How many iterations to run for
  --guidance GUIDANCE  Guidance scale for cfg (0 to 1)

latent-paint-mesh's People

Contributors

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