Plenoxels


Introduction

Plenoxels는 NeRF와 다르게 Neural Network를 이용하지 않는, view-dependent한 sparse voxel grid를 기반으로 하는 explicit한 volumetric representation이다. optimization 시간은 bounded scene에서 NeRF가 하루가 걸린다면, Plenoxels은 100배 빠르게 11분, unbounded scene에 대해서는 NeRF가 4일 걸린다면 Plenoxels는 27분 걸렸다. 다만 렌더링은 최적화 되지 않았다고 한다.

 

Plenoxels는 opacity(불투명도)와 Spherical Harmonic coefficients를 저장하는 sparse voxel grid를 이용한다. SH coefficient는 interpolation 되고, high resolution을 얻기 위해 비어있는 voxel을 제거하는 최적화 과정을 거친다.

 

논문에서 강조하는 것은 Neural Radience Field의 key가 MLP가 아니라 differentiable한 Volume Redender 라는 것!


Related works

Volume reconstruction을 위한 Classical한 방법은 Voxel grid와 multiplane image이다. 다만 Voxel grid는 high resolution에서 메모리 문제가 발생할 수 있다. 이에 대한 해결법은 Octree 구조를 이용하여 hierarchical structure를 인코딩하여 메모리를 줄이는 방법이 있다. 여기에 view dependent를 나타내기 위해 Spherical Harmoncis를 이용한다. 

 

NeRF는 opacity를 예측하기 위해 coordinated 기반의 MLP를 train 하지만, 모든 픽셀은 Ray를 따라 수백개의 Sample에서 MLP query를 수행해야 한다. 이 논문에서는 Voxel grid를 사용하여 Voxel grid를 direct하게 optimize하고 warping 되는 function 없이 Pruning과 coare to fine optimization을 통해 High resolution을 얻을 수 있다고 한다.

 

Plenoxel은 PlenOctrees을 generalization한 버전이고, trilinear interpolation으로 sparse voxel structure를 구현한다.


Method

Overview of sparse Plenoxel model

 

Plenoxel Pipeline

  1. Reconstruct a sparse voxel(Plenoxel) grid with density and SH coefficeints at each voxel
  2. Compute the color and opacity of each sample point via trilinear interpolation of the neighboring voxel coefficeints
  3. Differentiable volume rendering (following success of NeRF)
  4. Optimize voxel coefficeints with MSE reconstruction loss and total variation regularizer

 

Sparse Voxel Grid of sparse Plenoxel model

 

Plenoxel은 Sparse voxel grid의 모서리가 가지고 있는 각 color에 대한 scalar opacity(σ)와 Spherical Harmonics(SH) coefficient를 저장하는 구조이다. opacity(σ)와 color는 인접한 voxel에 저장된 값을 trilinear interpolation 하고, viewing direction에서 SH를 evaluate 함으로써 결정된다.


Volume Rendering

NeRF와 같은 Volume Rendering을 사용한다. Neural Radiance Fields 를 이용하는 Neural Rendering 은 scene 에 대한 projected color 를 ray casting 방식으로써 계산한다. Discreatized 된 color는 아래와 같이 쓸 수 있다.

 

 

위의 식에서 ci의 color는 각 color 채널에 대한 SH basis의 합이며, 해당 optimized coefficient로 weight를 부여한다.


Voxel Grid with Spherical Harmonics

PlenOctrees와 마찬가지로 모델에 sparse voxel grid를 사용한다. 다른 점은 trilinear interpolation을 하기 위해 octree 구조를 사용하지 않는다는 것이다. 대신 포인터와 occupied voxel에 대한 값을 가진 dense 3D index array를 사용한다. 이 array는 scalar opacity(σ)와 spherical harmonic coefficients 벡터에 대한 정보를 가지고 있다. 

 

논문에서는 2 degree의 SH를 사용하고, 이 SH는 voxel당 총 27개의 SH coefficient를 가지며, color 채널 당 9개의 coefficient가 필요하다. PlencOctrees의 benefit만 사용한 것이다. SH function에서 low degree harmonics는 smooth한 색상 변화(Lambertian)를 인코딩하고, high degree harmonics는 high frequency effect를 인코딩한다. 

 

그러나 opacity와 SH coefficient가 일정하게 유지된다고 가정하는 PlenOctrees와 다르게, Plenoxels 에서는 volume 전체에 대해 trilinear interpolation을 사용하기 위한 plenoptic function을 정의한다. 이는 volume을 optimize 하는 데에 중요한 요소이다.  


Interpolation

각 point의 opacity와 color는 voxel에 저장된 opacity와 SH coefficienttrilinear interpolation으로 계산된다. interpolation을 하면 sub-voxel variation의 opacity와 color를 표현하여 resolution을 높이고 optimization에 도움된다. KNN 보다도 더 좋은 효과를 나타낸다고 한다.

Ablation over interpolation method


Coarse to Fine

low resolution의 dense grid에서부터 시작해서 optimize, pruning, refining voxel 하는 coarse to fine strategy를 이용하여 high resolution으로 만든다. 여기서 pruning은 PlenOctrees의 방법을 사용한다.

 

각각의 점에 대해서 occupancy를 구했을 때, 모든 값에 대해서 일정 threshold 보다 낮으면 해당 Voxel에 대해서 Pruning 한다. 하나라도 차있다고 계산되면 Pruning 하지 않는다. 아래 그림과 같이 계속 비어있는 부분은 pruning 하고, 계속 세밀한 Voxel에 대해서 같은 과정을 반복해서 진행한다.

단, 해당 voxel과 그 voxel의 neighbors가 모두 비어있을 때에만 pruning 된다. 


Optimization

voxel opacity와 SH coefficient에 대해서 optmization을 진행한다. Loss function은 아래와 같다.

Loss function

 

MSE reconstruction losstotal variation regularization 두가지로 이루어진다.

MSE reconstruction loss & total variation regularization

 

(v, d)는 voxel (i, j, k)와 (i+1, j, k)에서 d번째 값 사이에서의 squared difference 이다. 즉, voxel opacity와 SH coefficient에 대한 weight를 사용한다.

 

Ablation over TV regularization

 

하지만 Hessian이 너무 커서 high dimensional optimization은 어렵다고 한다. 


Regularization

Sparsity prior는 SNeRG에서 사용한 Loss를 이용한다.

Sparsity prior loss

 

PlenOctrees에서 사용되는 Sparsity prior와 유사하며 메모리 절약에 용이하다.

 

또한 transmittance를 위해 추가적으로 beta distribution regularizer를 사용하는데, foreground와 background를 decomposition 하는데에 용이하다.

 

beta loss


Implementation

Sparse voxel volume rendering은 autodiff 라이브러리에서 지원되지 않아서 파이토치 라이브러리를 만들어서 사용했다. 

 

Gradient sparsity

위의 그래프의 Gradient Sparsity를 보면 구현 속도가 매우 빠른 것을 확인할 수 있다. 


Result         

PSNR(Peak Signal to Noise Ratio) : Resolution에 대한 손실 정보

SSIM(Structure similarity) : luminance, contrast, structural 

LPIPS (Learned perceptual image patch similarity)

                                                                                                                                              

8 synthetic scenes, forward-facing scenes, 360◦ scenes from Tanks and Temples

 

synthetic scences : 800x800 resolution, 100 ground truth

Synthetic, bounded scenes

 

 

forward-facing scenes : 1008 x 756 휴대폰으로 캡처한 20~60개의 이미지를 사용했다. 7/8은 train set으로 사용했다.

Real, forward-facing scenes

 

 

논문에서 강조하는 건 성능 향상에 중요한 건 MLP가 아니라 Rendering function이며, Plenoxels에서 사용한 differentiable한 Rendering 방법은 Spherical Harmonics를 이용한 모델, trilinear interpolation, regularization 이다. NeRF에서도 positional encoding의 length나 레이어 수에 대한 파라미터를 조정하면 성능이 올라갈 것이라고 생각한다.


Ref

Plenoxels github : https://github.com/sxyu/svox2

Plenoxels web site : https://alexyu.net/plenoxels

Plenoxels arXiv: https://arxiv.org/abs/2112.05131

.

 

 

 

복사했습니다!