8000 GitHub - leoShen917/DoF-Gaussian: (CVPR 2025) DoF-Gaussian: Controllable Depth-of-Field for 3D Gaussian Splatting
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

leoShen917/DoF-Gaussian

Repository files navigation

DoF-Gaussian: Controllable Depth-of-Field for 3D Gaussian Splatting

Liao Shen    Tianqi Liu    Huiqiang Sun    Jiaqi Li    Zhiguo Cao    Wei Li✉    Chen Change Loy

Project Page |Arxiv |Video

CVPR 2025

Install dependencies.

  1. Clone the repository and create an environment.
git clone https://github.com/leoShen917/DoF-Gaussian.git --recursive 
conda activate -n dofgs python=3.9
conda activate dofgs
  1. install pytorch and other dependencies.
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
pip install -r requirements.txt
pip install submodules/
823E
diff-gaussian-rasterization
pip install -r requirements.txt
  • We use COLMAP to calculate poses and sparse depths. However, original COLMAP does not have fusion mask for each view. Thus, we add masks to COLMAP and denote it as a submodule. Please follow https://colmap.github.io/install.html to install COLMAP in ./colmap folder (Note that do not cover colmap folder with the original version).

Preparation

Please download datasets at here. This dataset is originally produced by Deblur-NeRF. You can organize your own dataset as:

real_defocus_blur
│
└─── defocuscupcake
│   │
|   └─── sparse
│   │
|   └─── images_4
│   │
|   └─── images
│   │
|   └─── hold = 8
│ 
└─── defocuscups
│   │
......

Run Colmap

sh colmap.sh <path to dataset>

Training

python train.py -s <path to dataset> -m <output folder> --eval -r <downsample_res> --llffhold <llffhold>

// ex. python train.py -s real_defocus_blur/defocuscupcake -m output/defocuscupcake --eval -r 4 --llffhold 8

Evaluation

To calculate metrics, namely PSNR, SSIM, and LPIPS, we could execute the following code:

python metric.py -m <output folder> -r <downsample_res>

If testing on Deblur-NeRF datasets, we should also add -t deblur-nerf at the end of the code chunk above.

Applications

(coming soon)

Acknowledge

We thank the authors of Gaussian Splatting, Mip-Splatting, RadeGS, DoF-NeRF, and the repos for their great works.

Citation

If you find our work useful in your research, please consider to cite our paper:

@article{shen2025dof,
  title={DoF-Gaussian: Controllable Depth-of-Field for 3D Gaussian Splatting},
  author={Shen, Liao and Liu, Tianqi and Sun, Huiqiang and Li, Jiaqi and Cao, Zhiguo and Li, Wei and Loy, Chen Change},
  journal={arXiv preprint arXiv:2503.00746},
  year={2025}
}

About

(CVPR 2025) DoF-Gaussian: Controllable Depth-of-Field for 3D Gaussian Splatting

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0