<a href="https://arxiv.org/abs/2403.11831"><img src="https://yellow-cdn.veclightyear.com/835a84d5/cb468e25-3858-42bb-ab1d-4a6775abd13a.svg"></a> <a href="https://lingzhezhao.github.io/BAD-Gaussians/"><img src="https://yellow-cdn.veclightyear.com/835a84d5/cd955ff3-24cd-4525-ad8c-c1904c1215be.svg"/></a>
这是我们 arXiv 2024 论文 BAD-Gaussians: Bundle Adjusted Deblur Gaussian Splatting 的官方实现,基于 nerfstudio 框架。
在 Deblur-NeRF 的真实世界运动模糊数据上的去模糊和新视角合成结果:
<video src="https://github.com/WU-CVGL/BAD-Gaussians/assets/43722188/703fbf8d-adb8-4472-b685-6dbe45bb0057"></video>
左:BAD-Gaussians 去模糊的新视角渲染结果;
右:输入图像。
你可以查看原始 nerfstudio 仓库了解先决条件和依赖项。
目前,我们的代码库已在 nerfstudio v1.0.3 上进行测试。
简而言之:你可以通过以下方式安装 nerfstudio:
# (可选) 创建一个新的 conda 环境 conda create --name nerfstudio -y "python<3.11" conda activate nerfstudio # 安装依赖 pip install --upgrade pip setuptools pip install "torch==2.1.2+cu118" "torchvision==0.16.2+cu118" --extra-index-url https://download.pytorch.org/whl/cu118 conda install -c "nvidia/label/cuda-11.8.0" cuda-toolkit pip install ninja git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch # 安装 nerfstudio! pip install nerfstudio==1.0.3
然后你可以将此仓库作为 Python 包安装:
pip install git+https://github.com/WU-CVGL/BAD-Gaussians
如之前 BAD-NeRF 论文所述,我们对 Deblur-NeRF 的合成数据集进行了重新渲染,每张模糊图像有 51 个插值。
此外,在之前的 BAD-NeRF 论文中,我们直接在只有模糊图像的情况下运行 COLMAP,既没有真实相机内参也没有清晰的新视角图像。我们发现这对 COLMAP 来说相当具有挑战性 - 它可能无法重建场景,我们需要多次重新运行 COLMAP。为此,我们提供了一组新数据,其中我们使用真实相机内参在模糊和清晰的新视角图像上运行 COLMAP,命名为 bad-nerf-gtK-colmap-nvs:
你可以直接从 Deblur-NeRF 下载 real_camera_motion_blur 文件夹。
使用 Nerfstudio 的 ns-process-data 工具 处理 deblur-nerf 训练图像。
例如,如果 BAD-NeRF 的数据集 在 llff_data 中,执行:
ns-process-data images \
--data llff_data/blurtanabata/images \
--output-dir data/my_data/blurtanabata
文件夹 data/my_data/blurtanabata 已准备就绪。
注意:尽管 nerfstudio 不为 LLFF 数据建模 NDC 场景收缩,但我们发现
scale_factor = 0.25在 LLFF 数据集上效果很好。 如果你的数据是以 LLFF 方式 捕获的(即前向视角),而不是像 Mip-NeRF 360 那样以物体为中心, 你可以将scale_factor = 0.25参数传递给 nerfstudio 数据解析器(在我们的DeblurNerfDataParser中已设置为默认值), 例如,ns-train bad-gaussians --data data/my_data/my_seq --vis viewer+tensorboard nerfstudio-data --scale_factor 0.25
对于 Deblur-NeRF 合成 数据集,使用以下命令训练:
ns-train bad-gaussians \ --data data/bad-nerf-gtK-colmap-nvs/blurtanabata \ --pipeline.model.camera-optimizer.mode "linear" \ --vis viewer+tensorboard \ deblur-nerf-data
其中
--data data/bad-nerf-gtK-colmap-nvs/blurtanabata 是数据序列的相对路径;--pipeline.model.camera-optimizer.mode "linear" 启用线性相机姿态插值--vis viewer+tensorboard 启用查 看器和 tensorboard 指标保存deblur-nerf-data 选择 DeblurNerfDataparser对于 Deblur-NeRF 真实 数据集,使用 downscale_factor=4 训练:
ns-train bad-gaussians \ --data data/real_camera_motion_blur/blurdecoration \ --pipeline.model.camera-optimizer.mode "cubic" \ --vis viewer+tensorboard \ deblur-nerf-data \ --downscale_factor 4
其中
--pipeline.model.camera-optimizer.mode "cubic" 启用三次 B 样条;--downscale_factor 4 在 deblur-nerf-data 之后告诉 DeblurNerfDataparser 将图像的宽度和高度缩小到原始的 1/4。对于 Deblur-NeRF 真实 数据集,使用全分辨率训练:
ns-train bad-gaussians \ --data data/real_camera_motion_blur/blurdecoration \ --pipeline.model.camera-optimizer.mode "cubic" \ --pipeline.model.camera-optimizer.num_virtual_views 15 \ --pipeline.model.num_downscales 2 \ --pipeline.model.resolution_schedule 3000 \ --vis viewer+tensorboard \ deblur-nerf-data
其中
--pipeline.model.camera-optimizer.mode "cubic" 启用三次 B 样条;--pipeline.model.camera-optimizer.num_virtual_views 15 将虚拟相机数量增加到 15;--pipeline.model.num_downscales 2 和 --pipeline.model.resolution_schedule 3000 启用粗到细训练。对于使用 ns-process-data 处理的自定义数据,使用以下命令训练:
ns-train bad-gaussians \ --data data/my_data/blurtanabata \ --vis viewer+tensorboard \ nerfstudio-data --eval_mode "all"
注意:为了提高自定义数据集的重建质量,你可能需要添加一些参数以启用三次 B 样条、更多虚拟相机和粗到细训练,如上面的示例所示。
此命令将生成一个轨迹,使用训练图像的相机姿态,保持它们的原始顺序,在相邻图像之间插入 10 帧,帧率为 30。它将加载 config.yml 并将视频保存到 renders/<your_filename>.mp4。
ns-render interpolate \ --load-config outputs/blurtanabata/bad-gaussians/<your_experiment_date_time>/config.yml \ --pose-source train \ --frame-rate 30 \ --interpolation-steps 10 \ --output-path renders/<your_filename>.mp4
注意1:你可以添加
--render-nearest-camera True选项来与模糊的输入进行比较,但这会显著降低渲染速度。注意2:执行此命令时的工作目录必须是
outputs的父目录,即与训练时相同的目录。注意3:你可以在 nerfstudio 文档 中找到更多关于这个命令的信息。
此命令将加载 config.yml 并在同一文件夹中导出 splat.ply:
ns-export gaussian-splat \ --load-config outputs/blurtanabata/bad-gaussians/<你的实验日期时间>/config.yml \ --output-dir outputs/blurtanabata/bad-gaussians/<你的实验日期时间>
注意1:我们默认使用
rasterize_mode = antialiased。但是,如果你想导出3D高斯分布,由于大多数3D-GS查看器不支持antialiased模式(即 Mip-Splatting),最好在训练时使用以下命令关闭它:--pipeline.model.rasterize_mode "classic"注意2:执行此命令时的工作目录必须是
outputs的父目录,即与训练时相同的目录。
然后你可以使用任何查看器来可视化这个文件,例如 WebGL 查看器。
用你的IDE打开这个仓库,创建一个配置,并将执行的Python脚本路径设置为
<nerfstudio_路径>/nerfstudio/scripts/train.py,并使用上述参数。
如果你觉得这个工作有用,请考虑引用:
@article{zhao2024badgaussians, title={Bad-gaussians: Bundle adjusted deblur gaussian splatting}, author={Zhao, Lingzhe and Wang, Peng and Liu, Peidong}, journal={arXiv preprint arXiv:2403.11831}, year={2024} }
感谢 Nerfstudio 和 gsplat 的贡献者们的出色工作:
@inproceedings{nerfstudio, title = {Nerfstudio: A Modular Framework for Neural Radiance Field Development}, author = { Tancik, Matthew and Weber, Ethan and Ng, Evonne and Li, Ruilong and Yi, Brent and Kerr, Justin and Wang, Terrance and Kristoffersen, Alexander and Austin, Jake and Salahi, Kamyar and Ahuja, Abhik and McAllister, David and Kanazawa, Angjoo }, year = 2023, booktitle = {ACM SIGGRAPH 2023 Conference Proceedings}, series = {SIGGRAPH '23} } @software{Ye_gsplat, author = {Ye, Vickie and Turkulainen, Matias, and the Nerfstudio team}, title = {{gsplat}}, url = {https://github.com/nerfstudio-project/gsplat} } @misc{ye2023mathematical, title={Mathematical Supplement for the $\texttt{gsplat}$ Library}, author={Vickie Ye and Angjoo Kanazawa}, year={2023}, eprint={2312.02121}, archivePrefix={arXiv}, primaryClass={cs.MS} }
感谢 pypose 的贡献者们的出色库:
@inproceedings{wang2023pypose, title = {{PyPose}: A Library for Robot Learning with Physics-based Optimization}, author = {Wang, Chen and Gao, Dasong and Xu, Kuan and Geng, Junyi and Hu, Yaoyu and Qiu, Yuheng and Li, Bowen and Yang, Fan and Moon, Brady and Pandey, Abhinav and Aryan and Xu, Jiahe and Wu, Tianhao and He, Haonan and Huang, Daning and Ren, Zhongqiang and Zhao, Shibo and Fu, Taimeng and Reddy, Pranay and Lin, Xiao and Wang, Wenshan and Shi, Jingnan and Talak, Rajat and Cao, Kun and Du, Yi and Wang, Han and Yu, Huai and Wang, Shanzhao and Chen, Siyu and Kashyap, Ananth and Bandaru, Rohan and Dantu, Karthik and Wu, Jiajun and Xie, Lihua and Carlone, Luca and Hutter, Marco and Scherer, Sebastian}, booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)}, year = {2023} }


AI一键生成PPT,就用博思AIPPT!
博思AIPPT,新一代的AI生成PPT平台,支持智能生成PPT、AI美化PPT、文本&链接生成PPT、导入Word/PDF/Markdown文档生成PPT等,内置海量精美PPT模板,涵盖商务、教育、科技等不同风格,同时针对每个页面提供多种版式,一键自适应切换,完美适配各种办公场景。


AI赋能电商视觉革命,一站式智能商拍平台
潮际好麦深耕服装行业,是国内AI试衣效果最好的软件。使用先进AIGC能力为电商卖家批量提供优质的、低成本的商拍图。合作品牌有Shein、Lazada、安踏、百丽等65个国内外头部品牌,以及国内10万+淘宝、天猫、京东等主流平台的品牌商家,为卖家节省将近85%的出图成本,提升约3倍出图效率,让品牌能够快速上架。


企业专属的AI法律顾问
iTerms是法大大集团旗下法律子品牌,基于最先进的大语言模型(LLM)、专业的法律知识库和强大的智能体架构,帮助企业扫清合规障碍,筑牢风控防线,成为您企业专属的AI法律顾问。


稳定高效的流量提升解决方案,助力品牌曝光
稳定高效的流量提升解决方案,助力品牌曝光


最新版Sora2模型免费使用,一键生成无水印视频
最新版Sora2模型免费使用,一键生成无水印视频


实时语音翻译/同声传译工具
Transly是一个多场景的AI大语言模型驱动的同声传译、专业翻译助手,它拥有超精准的音频识别翻译能力,几乎零延迟的使用体验和支持多国语言可以让你带它走遍全球,无论你是留学生、商务人士、韩剧美剧爱好者,还是出国游玩、多国会议、跨国追星等等,都可以满足你所有需要同传的场景需求,线上线下通用,扫除语言障碍,让全世界的语言交流不再有国界。


选题、配图、成文,一站式创作,让内容运营更高效
讯飞绘文,一个AI集成平台,支持写作、选题、配图、排版和发布。高效生成适用于各类媒体的定制内容,加速品牌传播,提升内容营销效果。


AI辅助编程,代码自动修复
Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。


最强AI数据分析助手
小浣熊家族Raccoon,您的AI智能助手,致力于通过先进的人工智能技术,为用户提供高效、便捷的智能服务。无论是日常咨询还是专业问题解答,小浣熊都能以快速、准确的响应满足您的需求,让您的生活更加智能便捷。


像人一样思考的AI智能体
imini 是一款超级AI智能体,能根据人类指令,自主思考、自主完成、并且交付结果的AI智能体。