본문 바로가기

Computer Graphics

PixelNeRF: Neural Radiance Fields from One or Few Images (CVPR 2021)

반응형

일 하기 싫을 때마다 조금씩 notion 에 쌓인 논문 정리들을 긁어다 옮겨보는 중인데요 (갑자기 몰아서 올라와도 그냥 그러려니..)

오늘 긁어 올릴 논문은 CVPR 2021 에서 발표된 PixelNeRF 입니다.

https://github.com/sxyu/pixel-nerf

 

GitHub - sxyu/pixel-nerf: PixelNeRF Official Repository

PixelNeRF Official Repository. Contribute to sxyu/pixel-nerf development by creating an account on GitHub.

github.com

 

이 논문은 제가 현재 연구 주제로 들어가게 되는 터닝 포인트가 됐던 논문입니다. 내용이 대단해서라기 보다는, 수업 프로젝트로 접했다가 few-shot NeRF 는 다른 NeRF 에 비해 만만해보여서 아직 할 일이 많아 보여 끌렸던 케이스였죠. 물론 구글 상대로 만만한 게 어딨냐고 피 보는 중이지만.. 

역시 논문 정리 내용은 저 혼자 보기 위해 정리했던 내용이므로 좀 뒤죽박죽입니다. 미리 양해 부탁드립니다,. 

 

논문 발췌

Contribution / Novelty

존 NeRF의 몇 가지 잘 알려진 Shortcomings 를 지적하고 해결 방식을 제시 (단, target scene 이 상대적으로 단순하다는건 어쩔 수 없는 듯 - shapenet category 에 의존적으로 학습했으므로)

Original NeRF의 shortcomings?

  1. scene-wise optimization
  2. requring many calibrated views
  3. significant computation time
  4. canonical space based representation

기존 NeRF 에 spatial feature ecoder 를 추가로 사용,기존 NeRF 에 spatial feature condition 을 더한다는 아이디어로 scene 은 single image input 을 기본으로 + sparse set으로 확장가능하면서 동시에 absolute camera pose 대신 relative camera pose 만으로 계산 가능하다는 장점이 있다. 

오히려 single view 인 경우보다 multiview 인 경우, 각 view-space상에서 featutre를 뽑고 사용하는 ResNet backbone 의 layer에서 알아서 multiview feature aggregation 을 한다고 해, 어떻게 가능한 것인지 명확하지 않음.

 

Introduction

기존 NeRF에서는 scene에 대한 prior 를 제대로 활용하지 못헀다. + few input scene에서는 제대로 작동을 하지 못함.

 ~ make use of any prior knowledge of the world to accelerate reconstruction or for shape completion

Rough 한 Procedure

  1. Input Image 에서 fully convolutional image feature grid 를 계산
  2. 각 view coordinate frame 의 query spatial point x, viewing direction d 에 대해 projection / bilinear interpolation 으로 대응되는 image feature 를 sampling 한다
  3. NeRF input 으로 spatial point x와 viewing direction d가 input 으로 들어가고 network residual 로 sampling 된 image feature가 들어간다. output 은 동일.
  4. 이 때, single 이 아닌 multi-view input 일때는 각 camaera coordinate frame 내에서 latent representation 으로 encoding 된 후, network 의 intermediate layer 에서 aggregation 된다.

 

Advantages?

  1. gt 3d shape / object mask 같은 supervision 없이 일단 mv dataset image 로 학습이 가능하다.
  2. NeRF와는 다르게 canonical space 에서가 아닌 input image 에서의 camera coordinate system에서의 NeRF representation 을 학습. 기존 clear canonical space 로 학습할 경우, 학습은 쉽지만, unseen + real + multiple object scene에 대해서는 robust 하지 않게 된다. 결과적으로 flexibility 가 올라감
  3. fc manner 로 학습하므로, output 3d representation과 이미지의 spatial alignment 간 consistency 를 유지해준다.
  4. 별도의 test-time optimization 없이 variable number of posed input view 를 handling 할 수 있다.
  5. category-specific case 뿐 아니라 category-agnostic case까지 handling 가능.

 

View-Centric 3D Reconstruction

3d learning task 에서 학습의 기준이 되는 coordinate space는 두 가지로 나뉜다 - viewer-centered coordinate (view space) 와 object-centered coordinate (canonical space)

canonical space의 경우 모두 같은 orientation 으로 align 되어 있기 때문에 sptail regularities를 쉽게 학습할 수 있다.

하지만 그만큼 unseen objectd categories and scene에 대해서는 잘 predict 하지 못함.

PixelNeRF에서는 이런 상황을 막고 + training set에 대한 memorization 을 막기 위해 view-centric space를 사용한다.

 

Single-Image PixelNeRF

논문 발췌

*coordinate system 은 view space로 고정

  1. Input Image I 로부터 Feature Volume W를 추출.
  2. sampling 하는 camera ray 상의 point x에 대해 해당 위치에 대응하는 image feature를 x 를 image plane 으로 projection 시켜 (image coordinate 로. known intrinsic), projection 된 위치의 pixelwise feature 간 bilinear interpolation 으로 구한다 - W(pi(x))
  3. 구해진 corresponding feautre는 모두 view space 좌표로 구성된 pisiton, view direction 정보와 함께 NeRF network의 input으로 들어간다.

** few-shot view synthesis 에서는 query view direction 이 particularly important image feature 를 결정할 때 중요한 정보 - viewing direction ~ query direction 이면 정확도가 올라가므로) - 를 제공한다. 

Incorporating Multiple Views

여전히 world space (canonical space) 를 사용하지 않고, input order 도 상관없음. - relative camera pose 만 요구됨.

arbitrary world space에서 각 카메라의 view space로 의 camera transform - Rt

즉, multiview setup 에서의 새로운 target (sampling) camera ray 에 대해 query point 와 view direction d를 각 input view의 coordinate 로 world to camera transform 을 적용한다.

direction 은 왜 rotation 만 적용하지?

>> output density, color 를 얻기 위해 각 frame 에 대응하는 input feature 들을 다 따로 계산한 뒤, NeRF network 안에서 aggregate across view. 

i.e. feature volume 은 input image 갯수만큼 가지게 된다.

특정 view i에서 sampling 된 view-space point x^{(i)}에 대해 projected image coordinate \pi(x^{(i)})의 corresponding image feature 를 찾는다. 이 feature를 NeRF의 initial layer f1으로 보내 intermediate vector 를 얻어낸다.

intermediate vector 는 average pooling operator 를 이용해 aggregated 된 뒤 final layer 로 넘어간다. output = density & color.

용두사미식 논문 정리 죄송합니다.. 뒷부분은 피피티에 정리했지마 공개하기가 애매해서..

부족한 글 읽어주셔서 감사합니다. 

반응형