Giter Site home page Giter Site logo

nerf2mesh-nerfstudio's Introduction

Aim

This project aims to integrate the nerf2mesh method suggested by Jiaxiang Tang et al, with NerfStudio.

Installation

Pre-requisite Installation

  1. Torch and Torchvision
pip install torch torchvision
  1. tinycudann
pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch
  1. pytorch3d
pip install git+https://github.com/facebookresearch/pytorch3d.git@stable
  1. Install Package
pip install -e .

Train

Using nerfstudio cli

Stage 0

NERFSTUDIO_METHOD_CONFIGS=nerf2mesh=nerf2mesh.config:nerf2mesh ns-train nerf2mesh \
--stage \
0 \
--output-dir \
outputs/ \
--logging.local-writer.max-log-size=0 \
--pipeline.model.coarse-mesh-path \
outputs/chair/nerf2mesh/meshes/mesh_0.ply \
meshes/stage_0_n2m/mesh_0.ply \
--pipeline.model.mark-unseen-triangles \
True \ 
--data \
~/datasets/nerf_synthetic/chair/

Stage 1

NOTE: The load dir needs to be updated to the path of nerfstudio_models in stage 0

NERFSTUDIO_METHOD_CONFIGS=nerf2mesh=nerf2mesh.config:nerf2mesh ns-train nerf2mesh \
--stage \
1 \
--output-dir \
outputs/chair+mesh/nerf2mesh \
--load_dir \
outputs/chair+mesh/nerf2mesh/chair/nerf2mesh/2024-02-16_132246/nerfstudio_models \
--max_num_iterations=10000 \
--logging.local-writer.max-log-size=0 \
--pipeline.model.coarse-mesh-path \
outputs/chair+mesh/nerf2mesh/meshes/mesh_0.ply \
meshes/stage_0_n2m/mesh_0.ply \
--pipeline.model.fine-mesh-path \
outputs/chair+mesh/nerf2mesh/meshes/stage_1/ \
--pipeline.model.mark-unseen-triangles \
False \ 
--project_name=nerf2mesh_nerfstudio \
--experiment_name=chair \
--vis=viewer \
--data \
~/datasets/nerf_synthetic_small/nerf_synthetic/chair/

Using script

Train both stages

python3.10 end_to_end_train.py --data path_to_transform.json --output_dir path_to_output_dir

You can also use the launch.json in the .vscode for starting debugging sessions.

Example result

Chair Mesh

Chair Mesh

Acknowledgements

This code is adapted directly from the original implementation of Nerf2mesh

nerf2mesh-nerfstudio's People

Contributors

iammohitm avatar motwanimohit 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.