Coder Social home page Coder Social logo

wolfball / plenvdb Goto Github PK

View Code? Open in Web Editor NEW
73.0 5.0 3.0 19.42 MB

PlenVDB: Memery Efficient VDB-Based Radiance Fields for Fast Training and Rendering (CVPR2023)

License: Mozilla Public License 2.0

Python 1.87% CMake 2.09% Shell 0.15% PowerShell 0.05% C 1.21% C++ 92.05% Cuda 1.03% Lex 0.10% Yacc 0.16% Batchfile 1.29%

plenvdb's Introduction

PlenVDB: Memory Efficient VDB-Based Radiance Fields for Fast Training and Rendering (CVPR2023)

teaser

Code release for the CVPR 2023 paper "PlenVDB: Memory Efficient VDB-Based Radiance Fields for Fast Training and Rendering"

Han Yan, Celong Liu, Chao Ma, Xing Mei

Visualization

Download pretrained DensityVDB and then you can check the geometry of the objects in the Blender.

blender

Table of Contents:

News

  • [2023/05/29] Code initial release v1.0
  • [2023/02/28] PlenVDB is accepted by CVPR 2023.

File Tree

File tree (click to expand)
.PlenVDB  
├── doc  
│   └── additional_cmds.md  
├── figs  
│   └── teaser.png  
├── openvdb  
│   └── ...  
├── plenvdb  
│   ├── configs  
│   │   └── ...  
│   ├── cuda  
│   ├── lib  
│   │   ├── ...  
│   │   └── vdb  
│   │       ├── CMakeLists.txt  
│   │       ├── colorvdb.cu  
│   │       ├── densityvdb.cu  
│   │       ├── plenvdb.cpp  
│   │       ├── plenvdb.cu  
│   │       ├── plenvdb.cuh  
│   │       ├── plenvdb.h  
│   │       └── renderer.cu  
│   ├── LICENSE  
│   ├── requirements.txt  
│   ├── run.py  
│   ├── tools  
│   └── vdb_compression.py  
└── README.md  

Installation

Requirements

  • Ubuntu, python==3.7, g++>=6.3.1, gcc>=6.3.1, CMake>=3.18.0, Boost>=1.70, TBB>=2019.0, Blosc>=1.7.0
  • pytorch and torch-scatter is dependent on CUDA, please install the correct version for your machine

1. Compile OpenVDB, NanoVDB, PyOpenVDB

First, let's compile OpenVDB, NanoVDB and the python module. We mainly focus on PlenVDB/openvdb directory, which is an old version of OpenVDB library. We have tested on g++7.5.0, gcc7.5.0, make3.18.0,libboost1.74 tbb2019 and libblosc1.7.0. And you can go to PlenVDB/openvdb/cmake/config/OpenVDBVersions.cmake for detailed version requirements about the dependencies. If you have some trouble with the dependencies, we hope the commands in the Additional Commands will help.

When all dependencies are ready, run

cd PlenVDB/openvdb
mkdir build
cd build
cmake -DOPENVDB_BUILD_NANOVDB=ON -DOPENVDB_BUILD_PYTHON_MODULE=ON -DUSE_NUMPY=ON ..
sudo make -j4
sudo make install

2. Env Setting

Second, let's create an environment for running. Here we give the CUDA10.2 version.

# cd PlenVDB/plenvdb/
conda create -n plenvdb python=3.7
conda activate plenvdb
conda install pytorch==1.10.1 torchvision==0.11.2 torchaudio==0.10.1 cudatoolkit=10.2 -c pytorch
pip install -r requirements.txt
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/  pytest
pip install torch-scatter -f https://data.pyg.org/whl/torch-1.10.1+cu102.html
pip install imageio-ffmpeg

3. Compile PlenVDB

Third, let's compile the plenvdb.so, which is a VDB-based data structure.

cd PlenVDB/plenvdb/lib/vdb/
mkdir build
cd build
cmake ..
make -j4

If you meet with some difficulties in compilation, I recommende you to read its repository or document.

Prepare Datasets

Download NeRF-Synthetic, NSVF, BlendedMVS, DeepVoxels.

Modify configurations in PlenVDB/plenvdb/configs to indicate the datadir.

Training

Run for mic and get finedensity.vdb and finecolor.vdb

cd PlenVDB/plenvdb/
python run.py --config configs/nerf/mic.py 

Merge two VDBs into one: mergedidxs.vdb and mergeddata.npz

python vdb_compression.py --basedir logs/nerf_synthetic/ --scenes mic

Render video with merged VDB

python run.py --config configs/nerf/mic.py --render_video --render_only --use_mergedvdb

TODO List

  • Update the dependency to OpenVDB10.0.2 (OpenVDB9.1.1 at now).
  • Support renderer for face-forward and unbounded scenes.
  • Release code for rendering VDB on multiply platforms, e.g. iOS, Android, etc.
  • Support pytorch extension.

Citation

Please cite the following paper if you use this repository in your reseach.

@inproceedings{hyan2023plenvdb,
      title={PlenVDB: Memory Efficient VDB-Based Radiance Fields for Fast Training and Rendering },
      author={Han Yan and Celong Liu and Chao Ma and Xing Mei},
      year={2023},
      booktitle={CVPR},
}

Acknowledgement

This code is built upon the publicly available code DVGO and OpenVDB. Thanks the authors of DVGO and OpenVDB for making their excellent work and codes publicly available.

plenvdb's People

Contributors

wolfball avatar

Stargazers

SongShuangfu avatar Antlitz.ai avatar  avatar  avatar Zhiyong Wang avatar  avatar  avatar Codeknightarth avatar Khoa Nguyen-Tuan avatar Pan lei avatar SatouMikan avatar YangXiuyu avatar Dan Smith avatar Fan Yang avatar Linhan Wang avatar  avatar  avatar Shuo avatar Qiyu Dai avatar  avatar  avatar  avatar  avatar lisong avatar ruining tang avatar  avatar Turcan Tuna avatar zmf2022 avatar  avatar lizhan avatar  avatar lambdald avatar  avatar Zhen Xu avatar Vincent Ho avatar Houzhan Zhang avatar  avatar  avatar Zhuoyang Pan avatar Milan van Wouden avatar davci avatar  avatar damon lin avatar Cameron F. avatar LukeLook avatar Penghao Wang avatar Zhili avatar Sandalots avatar 爱可可-爱生活 avatar Yujie Yuan avatar  avatar Xu Cheng avatar Syed Zeeshan Ahmed avatar Shuyuan Mao avatar  avatar  avatar Wang Shuheng avatar Sicheng Li avatar  avatar Yu Zihao avatar Giseop Kim avatar Jiahui Zhang avatar Liu Nuozhi (Ronnie) avatar Zilong Chen avatar hrz avatar kiui avatar Tong Wu avatar  avatar Ruilong Li(李瑞龙) avatar Linker avatar  avatar YiChenCityU avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

plenvdb's Issues

Question for the VDB

Great paper.
And I have a question, VDB has four layers, How do you know where to split the VDB?

For example, we know a voxel have something, How to decide if he's going to keep splitting down to the leefnode or if it's an internal node.

Thanks

Unbounded scene?

Hi, thanks for making this project available!
I have the examples loading into a game engine.

Will this work on unbounded scenes as well as objects?
Is there a way to include color information as well as the geometry?

Thanks!

how to deploy on mobile device

Hello, I salute your outstanding work. May I ask when you will open source the relevant code that can be deployed on mobile devices?

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.