4D Gaussian Splatting:用于实时的动态场景渲染

4D-GaussianSplatting提出了一种新的实时动态场景渲染技术,基于3D-GS并引入变形场,能在高分辨率下实现800×800分辨率下70FPS的渲染,同时保持高质量视图。研究利用神经体素和轻量级MLP高效表示场景运动和形变。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Paper: Wu G, Yi T, Fang J, et al. 4d gaussian splatting for real-time dynamic scene rendering[J]. arXiv preprint arXiv:2310.08528, 2023.
Introduction: https://guanjunwu.github.io/4dgs/
Code: https://github.com/hustvl/4DGaussians

4D-GS 在 3D-GS 出来半年后问世,在 3D-GS 的基础上引入变形场来建模三维动态场景。变形场在每个时间戳将 Gaussians 变换到一个新位置,来模拟场景内元素的运动和形变。实验表明,4D-GS 能够在高分辨率下实现实时渲染(在 RTX 3090 上以 800×800 的分辨率达到 70 FPS),并保持相当高的视图质量。

在这里插入图片描述

更多参考资料如下:

一. 研究思路

  • 新视图合成 (Novel View Synthesis, NVS) 在 3D 视觉领域非常常见,快速且高质量地表示和渲染动态场景一直是一项重要且具有挑战性的任务。
  • NeRFs 变体能够渲染动态场景,但是训练和渲染的效率太低;3D-GS 能够达到实时的渲染速度,但仅限于静态场景。
  • 文中提出了一种新方法 —— 4D Gaussian Splatting,在保持训练和渲染效率的同时,能够紧凑地表示三维动态场景,从而实现实时渲染和高质量的渲染效果。

4D-GS 在 3D-GS 的基础上,引入 变形场 (deformation field) 来表示 Gaussians 的运动和形变,包括一个多分辨率特征平面 (multi-resolution HexPlane) 和一个轻量级 MLP。在每个时间戳 (timestamp),变形场会将 Gaussians 转换到一个具有新形状的新位置,该变换相当于 Gaussian 的运动和形变。HexPlane 通过计算体素特征进行编码,来建立相邻 Gaussians 之间的关系,从而提高运动和形变预测的准确性;MLP 对特征进行解码并获得 Gaussians 变换后的新位置。最后将变换后的 Gaussians 按时间戳做 Splatting,就能够得到连续的三维动态场景渲染视频。
在这里插入图片描述

二. 4D Gaussian Splatting

虽然 4D Gaussian 本该在每一个时间戳 t t t 都使用一组 Gaussians,但 4D Gaussian Splatting 只保留一组标准的 3D Gaussians S \mathcal{S} S,然后使用变形场 F \mathcal{F} F 预测每一个时间戳 t t t 时 3D Gaussians 的运动和形变状态:
在这里插入图片描述

因此想要表示动态场景只需要学习 S \mathcal{S} S F \mathcal{F} F 即可,并且有:
S ′ = F ( S , t ) \mathcal{S}' = \mathcal{F}(\mathcal{S}, t) S=F(S,t)

其中 3D Gaussians 的信息 S \mathcal{S} S 包括三维位置 X \mathcal{X} X 和协方差矩阵 Σ \Sigma Σ,协方差矩阵 Σ \Sigma Σ 则是由缩放矩阵 S S S 和旋转矩阵 R R R 构成 1。因此学习 3D Gaussians 的 S \mathcal{S} S 就是学习 X \mathcal{X} X S S S R R R 的过程。

为了在保持高渲染质量和快速渲染速度的前提下捕捉相邻 Gaussians 之间的信息,文中采用了多分辨率神经体素 (multi-resolution neural voxels) 来建立 Gaussians 之间的关系。这种方法仅使用四个相邻点对单位体素网格内的变形场进行编码,从而减少了内存消耗。随后引入了一种紧凑的 MLP,与多分辨率神经体素相结合,有效地融合了变形特征,并确保了渲染过程中快速的前向传播速度。

三. Gaussian 变形场

如前文所述,变形场包括多分辨率神经体素和一个轻量级 MLP g g g。多分辨率神经体素其实就是前文所说的多分辨率特征平面 HexPlane 的一个模块,用来编码每个 Gaussian 在时间戳 t t t 时的体素特征;MLP 用来解码,以获得每个 Gaussian 在时间戳 t t t 时的 S ′ \mathcal{S}' S

1. 3D Gaussian Neural Voxel Encoding

在这里插入图片描述

如图所示,空间相邻的 Gaussians 在运动和形变上具有相似的特征,同一个 Gaussian 在相邻时间也会呈现相似的变化特性。并且相隔较远的 Gaussians 之间也具有一定的关联。因此,文中采用 多分辨率特征平面体素模块 (multi-resolution HexPlane voxel module) 对单元体素中的每个Gaussian 的空间和时间信息进行编码。

每个体素模块定义为 R ( i , j ) , i , j ∈ { ( x , y ) , ( x , z ) , ( y , z ) , ( x , t ) , ( y , t ) , ( z , t ) } . R(i, j), {i, j} ∈ \{(x, y),(x, z),(y, z),(x, t),(y, t),(z, t)\}. R(i,j),i,j{(x,y),(x,z),(y,z),(x,t),(y,t),(z,t)}. 这样的编码方式将 4D 信息编码进 6 个二维体素平面。计算每个体素特征的公式如下:
f voxel  = ⋃ l ∏ P ( i , j ) ,  where  P ( i , j ) = interp ⁡ ( R ( i , j ) ) f_{\text {voxel }}=\bigcup_l \prod P(i, j), \text { where } P(i, j)=\operatorname{interp}(R(i, j)) fvoxel =lP(i,j), where P(i,j)=interp(R(i,j))

f voxel  f_{\text {voxel }} fvoxel  是神经体素的隐特征,利用双线性插值 (bilinear interpolation) 对附近的四个查询体素特征进行插值。

2. Gaussians Deformation Computation

MLP 用来解码和整合有用的特征信息,然后计算 X \mathcal{X} X S S S R R R 的变化量:
Δ X , Δ r , Δ s = g ( f voxel ) \Delta \mathcal{X}, \Delta r, \Delta s=g\left(f_{\text {voxel}}\right) ΔX,Δr,Δs=g(fvoxel)

于是可以计算 X ′ \mathcal{X}' X S ′ S' S R ′ R' R
( X ′ , r ′ , s ′ ) = ( X + Δ X , r + Δ r , s + Δ s ) \left(\mathcal{X}^{\prime}, r^{\prime}, s^{\prime}\right)=(\mathcal{X}+\Delta \mathcal{X}, r+\Delta r, s+\Delta s) (X,r,s)=(X+ΔX,r+Δr,s+Δs)

3. 优化

文中采取了两阶段训练策略:静态场景初始化和变形场微调;

  • 初始化阶段:主要优化静态场景的表示,即只优化 3D Gaussians 的参数;
  • 微调阶段:主要学习变形场的表示,即优化多分辨率神经体素和 MLP;
    在这里插入图片描述

使用重建损失来监督训练过程,并添加基于网格的 TV 损失 L t v \mathcal{L}_{tv} Ltv 到损失函数中:
L = ( C ^ − C ) 2 + L t v \mathcal{L}=(\hat{C}-C)^2+\mathcal{L}_{t v} L=(C^C)2+Ltv

四. 实验结果

4D-GS 在合成数据集和真实数据集上都进行测试,并根据图像的分辨率和场景的复杂性评估了渲染速度。对于合成数据集,4D-GS 在 RTX 3090 GPU 上以 800×800 的分辨率实现了 70 FPS 的渲染速度;对于真实数据集,4D-GS 在 RTX 3090 GPU 上以 1352×1014 的分辨率实现了 36 FPS 的渲染速度。通过实验表明,4D-GS 在实现实时渲染的同时保持了高质量的渲染效果。

1. 数据集

  • 合成数据集:使用 D-NeRF 中的 8 个合成场景,包括 Hell Warrior、Mutant、Hook、Bouncing Balls、Lego、T-Rex、Stand Up、Jumping Jacks。
  • 真实数据集:使用 Nerfies 和 DyNeRF 的真实场景数据集。

2. 对比实验

文中使用 PSNR、L-PIPS、SSIM 作为模型的评价指标,将 4D Gaussian Splatting 和 TiNeuVox-B、KPlanes、HexPlane-Slim、3D Gaussian Splatting 做了对比。定量结果见下表:
在这里插入图片描述

定性结果如图:
在这里插入图片描述

在这里插入图片描述

3. 消融实验

在这里插入图片描述

在这里插入图片描述

五. 总结

4D-GS 参考 D-NeRF(或 Nerfies)中的 deformation,在 3D-GS 的基础上引入变形场来建模三维动态场景。变形场在每个时间戳将 Gaussians 变换到一个新位置,来模拟场景内元素的运动和形变。

六. 复现

4D Gaussian Splatting 使用 Pytorch 框架:

  • 平台:AutoDL
  • 显卡:RTX 3090 24G
  • 镜像:PyTorch 1.11.0、Python 3.8(ubuntu20.04)、Cuda 11.3
  • 源码:https://github.com/hustvl/4DGaussians

(README 中要求 pytorch=1.13.1+cu116,AutoDL 上高于 pytorch 1.10 的版本只有 2.0,对应 CUDA11.8,但超过了 3090 显卡最高支持 CUDA11.5 版本。因此复现时使用 pytorch=1.11.0+cu113,可以成功跑完。也可以在 Colab 里运行 demo

实验记录

  1. 创建完 Gaussians4D 虚拟环境后,使用 conda activate 指令无法激活环境,改为 source activate 即可;

  2. 下载可用的数据集,并将其上传至正确的位置 4DGaussians/data/dnerf/bouncingballs 以供调用。复现时使用的是 D-NeRF 的合成场景 Bouncing Balls;

  3. 随后开始训练:
    在这里插入图片描述
    在这里插入图片描述

  4. 训练完成后,场景的点云表示被存入 4DGaussians/output/dnerf/bouncingballs/point_cloud 中。由于此前环境安装中没有安装 imageio,因此需要 conda install imageio 安装环境以进行渲染。然后再执行 render.py 后就可以渲染动态场景并合成 mp4 2
    在这里插入图片描述

实验结果

实验证明,4D Gaussian Splatting 的训练和渲染确实又快又准。仅仅经过 10 分钟 2w 轮迭代,就可以完成高质量的三维动态重建。Bouncing Balls 的动态渲染视图如下:


  1. 3D Gaussian Splatting:用于实时的辐射场渲染 ↩︎

  2. https://colab.research.google.com/github/hustvl/4DGaussians/blob/master/4DGaussians.ipynb#scrollTo=RTBK98DNl7_W ↩︎

### 4D-GS Compared to 3D-GS Optimizations and Improvements In the context of Gaussian Splatting (GS), transitioning from three-dimensional (3D) space to four-dimensional (4D) space involves significant advancements that address limitations inherent in traditional 3D models. The enhancements introduced by 4D-GS focus on improving both computational efficiency and visual fidelity. #### Enhanced Dimensionality Handling The introduction of an additional dimension allows for more sophisticated representation of temporal or other dynamic properties within scenes. This extra axis facilitates better handling of motion blur, time-varying effects, and complex transformations over sequences of frames rather than static images alone[^1]. #### Improved Differentiable Rasterization FlashGS, as mentioned earlier, focuses heavily on optimizing differentiable rasterization processes specifically tailored towards 3D Gaussian splatting. Extending this concept into higher dimensions would imply even greater precision during forward passes while maintaining gradient information necessary for backpropagation through spatial-temporal configurations. #### Algorithmic and Kernel-Level Optimizations To support these advanced features effectively without compromising speed, extensive modifications at lower levels are required. These include but are not limited to specialized algorithms designed explicitly around managing increased complexity brought about by adding another degree of freedom; alongside highly optimized kernels capable of executing operations efficiently across multiple GPUs when scaling up computations beyond what single devices could handle individually[^2]. #### Performance Profiling Tools Integration For ensuring optimal utilization of resources available throughout such intensive tasks involving high dimensional data processing, integration with robust monitoring systems becomes crucial. Such tools provide valuable feedback regarding bottlenecks encountered along various stages of execution paths taken by applications leveraging 4D-Gaussian Splatting techniques[^3]. ```python import torch from flashgs import FlashGSRasterizer def render_4d_scene(scene_data): """ Renders a scene using 4D Gaussian Splatting. Args: scene_data (dict): Dictionary containing all relevant parameters needed for rendering including geometry, lighting conditions etc. Returns: rendered_image (torch.Tensor): Final output image tensor after applying 4D GS optimization. """ device = 'cuda' if torch.cuda.is_available() else 'cpu' renderer = FlashGSRasterizer(dimensions=4).to(device) # Assuming `scene_data` contains properly formatted tensors ready for use rendered_image = renderer.render(**scene_data) return rendered_image ``` --related questions-- 1. What specific challenges arise when implementing real-time rendering pipelines utilizing 4D Gaussian Splatting? 2. How do current hardware architectures impact the feasibility of deploying large-scale projects relying on multi-dimensional graphical representations like those seen in 4D-GS? 3. Can existing deep learning frameworks be adapted easily enough to accommodate training models built upon principles outlined here concerning extended-dimension graphics processing methods? 4. In terms of application areas outside traditional computer vision tasks, where might one expect substantial benefits derived directly from adopting technologies similar to 4D-GS described above?
评论 14
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值