본문 바로가기

Computer Graphics

NeRFactor: Neural Factorization of Shape and Reflectance under an Unknown Illumination (TOG 2021)

반응형

 

오늘 notion을 긁어 모아 올릴 논문은 NeRFactor 입니다.

처음 박사 컨텍을 할 때 다루는 한국 연구실이 별로 없어 절망했을 만큼, illumination이나 relighting, decomposition 은 한국에서 상대적으로 인기 없는 주제인 듯 한데요..

조금이라도 더 많은 학생들이 뛰어들어 같이 고생했으면 하는 마음으로 정리해봅니다. 

https://xiuming.info/projects/nerfactor/

 

NeRFactor

Project page for NeRFactor.

xiuming.info

 

Abstract

camera pose를 알고 있는, single unknown illumination (아마도 environment light) 환경에 놓인 object에 대해 scene을 surface normal light visibility, albedo, material map으로 factorize 한다.

논문의 abstract에서는 이를 기존 NeRF Pepresentaton에서 volumetric geometry 정보를 버려버리고 (distill) surface representaiton 으로 변환해준 뒤, geometry를 svbrdf, lighting을 구하는 과정에서 jointly refine 한 것이라고 말하고 있다. 말만 들으면 projection 시켜서 풀었다는 것처럼 느껴지는 데 정확히 volumetric geometry 를 증류시켰다는 게 어떤 뜻인지 확인해 볼 것.

 

Supervision?

사용하지 않음. re-rendering loss, smoothness prior, data-driven BRDF PRIOR 사용했다고 언급.

* data-driven BRDF prior 이면 기존 MERL 데이터 셋같은 것을 이용해서 data class 를 학습해놓고 가장 가까운 곳으로 fitting 시키는 방식을 사용했을 것으로 추정. 

explicitly modeled light visibility 를 이용해 shadow removal / shadow generation 모두 잘 된다고 언급.

ultimate goal: mateiral editing, free-viewpoint relighting

 

Introduction

  • 기존 방식은 known geometry / known light source / controlled light stage / prior assumption 등을 사용했음

논문에서 지적하는 NeRF의 Relighting task 적용에서의한계점

  • volumetric representaiton 방식이기 때문에, 전체 full hemisphere를 이루는 각 camera ray 에 대해 point wise 로 shading, visibility 를 모두 계산해야 함 - computation expensive
  • hard surface assumption 사용. termination depth 의 single point에서만 계산했다
  • NeRF의 geometry - high freqency contents 들이 문제가 된다. viewy synthesis ㅇ서는 티가 안나지만 relighting에서는 문제가 된다고 : 각 3d location에 대해 light visibility / surface normal 을 MLP를 이용해 continusou / smooth function으로 근사. high frequency content 가 단순히 view synthesis에서는 잘 드러나지 않는 noise 들을 지칭하는 것인지, 다른 의미가 있는 것인지 의문. 이 의미를 제대로 이해 못하니까 이 MLP 기반 continuous surface representation이 이 문제를 어떻게 해결했다는건지도 잘 모르게씀. 

Technical Contribution

  • Unknown Lighting Condition 에서 object image를 shape / reflectance / illumination 으로 factorizing: free-viewpoint relighting 과 shadow / material editing이 가능하도록 함. 
  • NeRF 기반 volume density → surface geometry (+ normal + light visibility) 로 distill / initialization 하는 technique.
  • real measured BRDF로 training한 latent code model >> data-driven BRDF prior.Input

Input

single unknown illumination 에서 촬영된 camera pose를 알고 있는 multi view 이미지

Output

surface normal / light visibility / albedo / svbrdf / environment lighting.

Assumption

hard surface (single intersection point per ray) *즉, scattering, transparency, translucency 없이 direct illumination 만 고려. *materials with achromatic specular reflectance. (metallic material 고려 x) - specular color model을 고려하면 쉽게 확장은 가능하다고 언급.

** NeRV 혹은 NeRD와 구분되는 차이점 >> multiple lkight source condition이 필요하지 않다는 게 차이라고 언급. single unknown lighting condition이면 된다고 하고 있다. 그리고 기존 single light condition input 기반의 경우 light visibility 를 고려하지 않았다는 - lighting occlusion / light shadowing 고려 x - 한계점이 있다고 언급,.

 

Proposed Method

NeRFactor는 svbrdf, shape 등을 mlp를 이용해 set of observed input view를 만족하는 방향으로 continuous 한 3D field로 표현한다.

 

Shape

input 형태가 NeRF와 동일하므로, NeRF를 initial geometry 얻어내는 용도로 사용. NeRF가 하는 일: mlp 를 이용, 3d spatial coordinate 에 대해 2d viewing direction 을 기반으로 각 point에 대한 volume density와 view-vzriant colorㅇ를 encoding 한다.

이 estimated geometry 정보를 distilling 시켜 continuous surface representation으로 변환해 사용. 다시 말하면, 기존 nerf를 어떤 camera ray 와 그에 상응하는 surface location에 대해 위에서 말했던 output들을 얻어낼 수 있도록 변형. 

** 어떻게 이 정보들을 MLP를 이용해 re-parametrize 했는지?

 

Surface Points

떤 ray에 대해 camera o에서 시작해 direction d로 뻣어나가는 것으로 정의한 뒤, NeRF에 의해 정의된 volume density로 termination point 'x_{surf}를 다음과 같이 정의한다.

T(t)는 어떤 ray가 distance t에서 block 될 probability. 전체 full volumetric representation 을 유지하는 대신 이 blocked surface 를 기준으로 distill 시킨다 (아마도 특정 ray 방향으로 모든 surface point들을 다 고려하는 것이 아니라, hard surface assumption을 가정해 termination point까지는 ray를 계산하고 나머지 volumetric representation을 날려버린다는 의미 인 듯)

because we can compute the outgoing radiance just at each camera ray's expected termination location instread of every point along each camera ray.

 

Surface Normals

surface normal $n_a(x)$ = negative normalized gradient of NeRF's volume density (NeRD에서 사용한 방식과 동일).

문제점 >> NeRF volume density의 negative normalized gradient 로 만들어 낸 normal은 noisy 했다.

해결하기 위해 reparametrize noraml using MLP (어떤 3d location을 denoised surfae normal로 mapping 하는)

NeRF의 joint optimization 과정에서

1. stay close to the normals produced from the pretrained NeRF

2. to vary smoothly in the 3D space

3. reproduce the observed appearance of the object. 

x는 random 3D displacement from x_surf. sampled from zero-mean Gaussian

 

Light Visibility

각 point에서 light location으로 NeRF volume 상에서 marching 하면서 visibility 계산. Neural Reflectance Fields for Appearance Acquisition 에서 사용한 방법이랑 똑같다고 하느데 흠.. 어쨋든 중요한 사실은, surface normal estimation과 동일하게 NeRF의 volume density에서 그대로 사용하는 것은 too noisy 하다는 것. 

같은 방식으로 다른 MLP를 이용해 reparameterize. optimizaton은 surface normal과 유사하게 다음 loss를 따른다.

  1. recovered visibility to be close to the visibility traced from the NeRF
  2. to be spatially smooth
  3. to reproduce the observed appearance.

 

논문 발췌

전체 optimization 전에 visibility MLP 랑 normal MLP 는 pre-training - smooth term 없이 NeRF 결과 reproduce 하도록 (reasonable initialization). i.e. visibility map의 초기화를 어느 정도 reasonable 하도록 제한함으로써 Albedo 나 BRDF MLP 가 잘못된 visibility 정보를 바탕으로 (shadow 까지 포함한) modeling을 하지 않도록 방지해준다. (결국 light visibility 정보가 간접적인 lighting 정보일테니. 

This provides a reasonable initialization of the visibility maps, which prevents the albedo or BRDF MLP from mistakenly attempting to explain way shadows as being modeled as 'painted on' reflectance variation

 

Reflectance

BRDF model = diffuse component(Albedo) + specular SVBRDF. 이 때, specular SVBRDF 는 어떤 surface point x_surf에 대해서도 incoming + outgoing direction으로 정의. 기존 NeRF-like setting에서 BRDF 를 derive 하는 방식 - analytic microfacet model (ex) NeRV)

말 어렵게 해놔서 뭔 소린지 모르겠는 부분이 상당히 많음..

기존 mirofacet 기반 Neural Representation의 문제점을 parameter optimization 과정에서 어떤 prior도 사용하지 않는데에 있다고 지적 - microfacet 모델 상에서 표현 가능한 모든 material 을 우선순위없이 모두 같은 weight 로 고려한다. 또한, analytic microfacet model은 recover할 대상 material을 한정짓는다는 단점 또한 존재. ( cannot fully represent / model real-world reflectance functions)

analytic model 대신 data-driven empirically observed real-world reflectance fun ction을 pre-train 해서 사용한다는데 이게 analytic model이랑 뭐가 다르다는 건지 모르겠땅

왜 이런 prior를 사용하는 게 중요한지 (어떤 차이가 있는지) : 단일한 unknowni illumination 아래에서 관찰한 input image들 + highly-illposed ( lighting 정보가 확실하지 않으므로 material 정보를 확정짓기가 쉽지 않음) + disambiguate the most likely factorization of the scene from the set of all possible factorizations.

 

Albedo

albedo 경우에도 마찬가지로 개별 MLP 사용. direct supervision이 없음 + single illumination → spatial smoothness 만 가지고 함. (굉장히 부실한losS)

 

Learning Priors from Real-World BRDFs

specular component의 경우, rea-world BRDF 의 latent space를 학습하고, 이 latent space z_{BRDF}를 4D BRDF 로 다시 decoding 하는 decoder 까지 학습. Generative Latent Optimization을 사용하고, MERL Dataset 사용해 pre-trained (MERL - isotropic material assumption), isotropic assumption으로 4 degree of freedom 대신 3 degree of freedom 사용. 

** 저 3 dof coordinate 를 Rusinkiewicz coordinate 이라고 함. h는 아마도 half vector?

논문에서 사용된 reflectance model에서는 color 정보를 별도의 albedo prediction으로 따로 처리하기 때문에, MRL dataset으로 pretraining 할 때 color 정보를 achormatic 하게 바꾸고 실험했다.

** 이론적으로는 사용된 MERL dataset에 대해 diffuse / specular component를 separation 한 후, specular lobe에 대해서만 prior 를 배우도록 하는 게 정확하지만, 이렇게 바꿔서 실험했을 때가 오히려 결과가 좋지 않았다고 말하고 있음. 

근데 나눴을 때 결과가 더 안 좋다 = 명확한 의미의 apearance를 배우지 못하고 있는 게 아닌지?

We optimize the BRDF identity MLP to minimize the re0rendering loss as well as the same spatil smoothness prior as in albedo

i.e. a sum of Lambertian component + specular component

 

Illumination

HDR Light probe image model.

hard cast shadow + high frequency lighting.. (x indirecct one)

 

오늘도 용두사미로 끝나는 포스팅. 끝

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

반응형