PyTorch implementation of paper Detachable Novel Views Synthesis of Dynamic Scenes Using Distribution-Driven Neural Radiance Fields.
Representing and synthesizing novel views in real-world dynamic scenes from casual monocular videos is a long-standing problem. Existing solutions typically approach dynamic scenes by applying geometry techniques or utilizing temporal information between several adjacent frames without considering the underlying background distribution in the entire scene or the transmittance over the ray dimension, limiting their performance on static and occlusion areas. Our approach Distribution-Driven neural radiance fields offers high-quality view synthesis and a 3D solution to Detach the background from the entire Dynamic scene, which is called
The code is trained with Python == 3.8.8, Pytorch == 1.11.0 and CUDA == 11.3, the dependencies include:
- scikit-image
- opencv
- imageio
- cupy
- kornia
- configargparse
Then download NVIDIA Dynamic and Urban Driving datasets. The whole file structure should be:
D4NeRF
├── configs
├── logs
├── models
├── data
| └── NVIDIA
| └── URBAN
| └── others
...
python train.py --config configs/config_Handcart.txt
The evaluation on NVIDIA dataset focuses on synthesis across different viewpoints, while evaluation on Urban driving dataset aims to interpolate time intervals (frames).
Evaluation on Urban Driving Scenes
python evaluation_NV.py --config configs/config_Balloon1.txt
Evaluation on NVIDIA Dynamic Scenes
python evaluation_urban.py --config configs/config_Handcart.txt
fixed time and view interpolation:
python view_render.py --config configs/config_Handcart.txt --fixed_time --target_idx 15
time interpolation and fixed view:
python view_render.py --config configs/config_Handcart.txt --fixed_view --target_idx 15
time interpolation and view interpolation:
python view_render.py --config configs/config_Handcart.txt --no_fixed --target_idx 15
Use COLMAP to acquire camera poses and intrinsics. Then download scripts to obtain the flow and depth estimation models, RAFT and Midas. The pre-trained weights have been added to the directory.
Pose transformation
python save_poses_nerf.py --data_path "/xxx/dense" #data_path is the path of COLMAP estimation results.
Depth estimation
python run_midas.py --data_path "/xxx/dense" --resize_height 272
Flow estimation
python run_flows_video.py --model models/raft-things.pth --data_path /xxx/dense
The code is built upon:
Thanks for their great work.