Giter VIP home page Giter VIP logo

devrf's Introduction

DeVRF: Fast Deformable Voxel Radiance Fields for Dynamic Scenes

Project page | arXiv

TL;DR: A novel representation and learning paradigm for dynamic radiance fields reconstruction -- 100x faster, no loss in dynamic novel view synthesis quality.

DeVRF

๐Ÿ“ข News

  • [2022.10.10] We release the first-version of DeVRF code and dataset!

  • [2022.9.15] DeVRF got accepted by NeurIPS 2022!

  • [2022.6.1] We release the arXiv paper.

๐Ÿ“ Preparation

Installation

git clone https://github.com/showlab/DeVRF.git
cd DeVRF
pip install -r requirements.txt

Pytorch and torch_scatter installation is machine dependent, please install the correct version for your machine.

Dependencies (click to expand)
  • PyTorch, numpy, torch_scatter, pytorch3d: main computation.

  • scipy, lpips: SSIM and LPIPS evaluation.

  • tqdm: progress bar.

  • mmcv: config system.

  • opencv-python: image processing.

  • imageio, imageio-ffmpeg: images and videos I/O.

  • Ninja: to build the newly implemented torch extention just-in-time.

  • einops: torch tensor shaping with pretty api.

DeVRF dataset

We release all the synthetic and real-world DeVRF dataset on link. DeVRF dataset consists of 5 inward-facing synthetic scenes (lego|floating_robot|kuka|daisy|glove), 1 inward-facing real-world scene (flower_360), and 3 forward-facing real-world scenes (plant|rabbit|pig_toy). For each scene, we release the static data, dynamic data, and optical flow estimated using RAFT. Please refer to the following data structure for an overview of DeVRF dataset.

    DeVRF dataset
    โ”œโ”€โ”€ inward-facing
    โ”‚   โ””โ”€โ”€ [lego|floating_robot|kuka|daisy|glove|flower_360]
    โ”‚       โ”œโ”€โ”€ static    
    โ”‚       โ”‚	โ”œโ”€โ”€ [train|val|test]
    โ”‚       โ”‚	โ””โ”€โ”€ transforms_[train|val|test].json
    โ”‚       โ””โ”€โ”€ dynamic_4views    
    โ”‚        	โ”œโ”€โ”€ [train|val|test]
    โ”‚        	โ”œโ”€โ”€ transforms_[train|val|test].json   
    โ”‚        	โ”œโ”€โ”€ train_flow              
    โ”‚        	โ””โ”€โ”€ train_flow_png  
    โ”‚          
    โ””โ”€โ”€ forward-facing
        โ””โ”€โ”€ [plant|rabbit|pig_toy]
            โ”œโ”€โ”€ static    
            โ”‚	โ”œโ”€โ”€ [images|images_4|images_8]
            โ”‚	โ””โ”€โ”€ poses_bounds.npy
            โ””โ”€โ”€ dynamic_4views    
             	โ”œโ”€โ”€ bds.npy  
             	โ”œโ”€โ”€ poses.npy                        
             	โ””โ”€โ”€ [view1|view2|view3|view4]
	                โ”œโ”€โ”€ [images|images_4|images_8]
             	 	โ”œโ”€โ”€ images_4_flow
             	 	โ””โ”€โ”€ images_4_flow_png

We additionally provide a light version of DeVRF dataset without optical flow on link.

๐Ÿ‹๏ธโ€๏ธ Experiment

Training

Stage 1: Train the static model using static scene data. The static model part is almost the same as DirectVoxGO. The main difference is that we add an accumulated transmittance loss to encourage a clean background for forward-facing scenes. Please refer to DirectVoxGO for more details.

Note: Please enlarge the world_bound_scale in config file to establish a larger bounding box for dynamic scene modelling in the second stage. For DeVRF dataset, the world_bound_scale parameter is set within [1.05, 2.0].

$ cd static_DirectVoxGO
$ python run.py --config configs/inward-facing/lego.py --render_test

Stage 2: Train the dynamic model using dynamic scene data and the trained static model.

$ cd ..
$ python run.py --config configs/inward-facing/lego.py --render_test

Evaluation

To only evaluate the testset PSNR, SSIM, and LPIPS of the trained lego without re-training, run:

$ python run.py --config configs/inward-facing/lego.py --render_only --render_test \

--eval_ssim --eval_lpips_vgg --eval_lpips_alex

Use --eval_lpips_alex or --eval_lpips_vgg to evaluate LPIPS with pre-trained Alex net or VGG net.

Render video

$ python run.py --config configs/inward-facing/lego.py --render_only --render_video

Reproduction: all config files to reproduce our results.

(click to expand)
$ ls configs/*

configs/inward-facing:
lego.py floating_robot.py kuka.py daisy.py glove.py flower_360.py

configs/forward-facing:
plant.py rabbit.py pig_toy.py

๐ŸŽ“ Citation

If you find our work helps, please cite our paper.

@article{liu2022devrf,

title={DeVRF: Fast Deformable Voxel Radiance Fields for Dynamic Scenes},

author={Liu, Jia-Wei and Cao, Yan-Pei and Mao, Weijia and Zhang, Wenqiao and Zhang, David Junhao and Keppo, Jussi and Shan, Ying and Qie, Xiaohu and Shou, Mike Zheng},

journal={arXiv preprint arXiv:2205.15723},

year={2022}

}

โœ‰๏ธ Contact

This repo is maintained by Jiawei Liu. Questions and discussions are welcome via [email protected].

๐Ÿ™ Acknowledgements

This codebase is based on DirectVoxGO.

LICENSE

GPL

devrf's People

Contributors

jia-wei-liu 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.