ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • [논문리뷰] ViDAR : Visual Point Cloud Forecasting enables Scalable Autonomous Driving (1)
    논문 스터디 2024. 3. 14. 20:53

     

     

    논문 링크 : https://arxiv.org/pdf/2312.17655.pdf

     

     

    이번 학기에 해야하는 주제이다. 무엇을 접목할 수 있을까? 어떤 걸 접목하면 문제가 더 쉽게 풀릴까? 아니면 정확도가 높아질까? 기존 논문의 문제는 뭘까? 이런 생각들을 정리하려면 먼저 첫 논문을 자세히 들여다봐야 될 것 같아 리뷰로 남긴다. 

    Introduction

    논문의 motivation은 self-supervised learning에서 시작한다. 보통 2D image의 downstream task에서는 self-supervised learning으로 pretrain 된 모델을 다시한번 supervised learning으로 학습시킨다. 그렇게 하면 모델은 좀더 물체의 특징을 정교하게 기억하는 것 같다.(??? 뇌피셜이다. 근거를 찾아보겠다) 아무튼 정확도가 높아진다. 

     

    그래서 camera 기반의 3D vision downstream task의 정확도를 높이기 위해 pretext task를 pointcloud forecasting으로 삼은 것이 이 논문이다. pointcloud forecasting을 통해 semantics, 3D geometry information과 temporal information을 모델이 학습하게 만드는 것이다. 그래서 general하게 사용할 수 있는 pretrained 모델을 만드는 것이 목표이다. 

     

    근데 조금 의문인건 여기서는 baseline을 bevformer를 사용했는데 그럼 모든 downstream task들은 bevformer로 bevfeature를 만든건가? 라는 생각이 들고, pretrained 모델을 다시 downstream task에 train 하려면 모델이 같아야 하는데 그럼 모든 task들이 같은 네트워크를 공유하나 싶고, 그러면 여기서는 정교한 bev feature를 만드는 bevformer를 만들기 위해 bevformer를 pretrain하는 architecture와 loss를 가지는건가 싶다. 그러니까 내말은 pretrain하는 bevformer만 업데이트하는가? 또 그건 아닐것이다. latent rendering 부분이랑 future decoder도 train하는 걸텐데 bev feature를 만드는 bevformer를 pretrain하는 모델이 먼저 train되어 있거나, bevformer가 먼저 train 되어있어야 빨리끝나거나 효과적이지 않을까?

     

    다시 본론으로 돌아와서, 기존에 대부분의 모델들은 3D object detection이나 occupancy 와 같은 supervised pretraining에 의존했다고 한다. 아마도 motion forecasting이나 planning 등의 task의 모델들을 말하는 것 같다. 몇몇 approach들은 depth estimation, rendering masked scenes와 같이 image-lidar pair로 annotation free pretraining을 했다. 하지만, 이 방법들은 3D geometry와 temporal information을 모델링하는데 어려움이 있었다. 

     

    depth estimation은 image로부터 depth를 추출하는데, 이는 multi-view geometry에 한계가 있었고(?  왜인지는 모르겠다. depth estimation도 위치정보를 만들 수 있지 않나? multi-view depth estimation 하면 안되나?) temporal modeling을 못했다. scene rendering 은 temporal modeling을 못한다고 하는데 redering은 object를 reconstruct 하지만 temporal modeling이 어렵다. (? 이전의 이미지들로도 reconstruct 할 순 없을까?)  

     

    아무튼 이런 이유들로 end-to-end 시스템을 위한 pretraining이 충분하지 않다. 따라서 이 논문의 궁극적 목표는 perception 뿐만아니라 prediction과 planning도 가능하게 하는 pretrained model을 만드는 것이다. 그래서 pretext task로 visual pointcloud forecasting을 하고 historical visual image들로 future pointcloud를 예측한다. 이를 통해 3D geometry, semantics, temporal information이 동시에 supervise된다. 사실 알듯말듯 하지만 여기서는 모델을 history로부터 future를 예측하게 만듦으로 이것은 temporal modeling과 future estimatino에 필수적인 scene flow와 object motion의 extraction을 supervise한다..라고 하는데 이건 무슨말인지 모르겠다.  

     

    그리고 image로부터 pointcloud를 reconstruction하는 과정을 통해 multi-view geometry와 semantic modeling이 된다고 한다. 그래서 다양한 downstream task에 베네핏이 된다는 이야기를 하는데 저자들의 뇌피셜인 것 같다. 아직은 단언하기 이르지 않을까? 

     

    아무튼 ViDAR는 3 파트로 구분된다. History Encoder, Latent Rendering operator, Future Decoder 이다. History encoder는 pretraining의 target structure이다. 그래서 BEV encoder가 되고 여기서 만들어진 BEV feature는 Latent Rendering 된다. Latent Rendering은 ViDAR가 위의 장점들을 가지는데 중요한 역할을 하는데, 3D geometry latent space를 만들고 encoder와 decoder를 연결한다. Future Decoder는 auto regressive transformer로 historical BEV feature를 입력으로 받아 future pointcloud를 임의의 timestamp에 predict한다. 그래서 이게 supervise라는 건지, self-supervised 면 뭘로 정답을 주는지를 아직 잘 모르겠다. 

    Methods

    Notation은 아래와 같다. 

     

    $\mathcal{I} : \text{visual sequence inputs} $
    $\mathcal{F}_{bev} : \text{BEV embeddings}$

    $\hat{\mathcal{F}}_{bev} : \text{geometric embedding}$
    $\hat{\mathcal{F}}_{t} : \text{future BEV features}$
    $\mathcal{P}_t : \text{3D occupancy volume}$

     

    Overall flow는 아래와 같다. 

     

    $\mathcal{F}_{bev} = \text{Encoder}(\mathcal{I}) $
    $\hat{\mathcal{F}}_{bev} = \text{LatentRender}(\mathcal{F}_{bev})$
    $\hat{\mathcal{F}}_{t} = \text{Decoder}(\hat{\mathcal{F}}_{t-1})\text{  where  } \hat{\mathcal{F}}_{0} = \hat{\mathcal{F}}_{bev} $
    $\mathcal{P}_t = \text{Projection}(\hat{\mathcal{F}}_t)$

     

    History encoder는 target structure이자 visual image sequences 로 부터 bev embedding $\mathcal{F}_{bev}$를 만들고, Latent rendering은 geometric embedding $\hat{\mathcal{F}}_{bev}$을 얻기위해 volume rendering operation을 simulation하는 operation이다. 그리고 Future decoder는 BEV features $\hat{\mathcal{F}}_t$ at timestamps $t$  를 auto regressive manner로 predict한다. 마지막으로 prediction head는 $\hat{\mathcal{F}}_t$를 3D occupancy volume $\mathcal{P}_t$에 project 한다. 

     

     

    여기서 auto regressive라는 말은 변수의 과거값의 선형 조합을 이용해 관심있는 변수를 예측한다. 따라서 과거 시점의 자기 자신의 데이터가 현 시점의 자기 자신에게 영향을 미치는 모델로, RNN, masked self attention을 이용한 transformer의 decoder 가 있다. 

     

    다시 본론으로 돌아와서, visual point cloud forecasting fore pretraining의 straightforward solution은 History encoder와 Future Decoder를 differentiable ray casting을 사용하여 직접 incorporate하는 것이다..라고 한다. 이해가 아직 잘 안가는 건, 갑자기 differentiable ray casting이 왜 나왔고 이게 무슨 역할을 하는 건지 모르겠다. pointcloud forecasting을 위한 장치라면 future decoder에서 나온게 future bev feature이고 이거를 굳이 projection하는 이유도 모르겠다. 예측한 t초의 bev feature와 bevformer로 만든 t 초의 bev feature를 비교하면 안되나? 물론 정답이 아닐 순 있겠으나.. 

     

    일단 differentiable ray casting의 역할은 pointcloud를 predicted occupancy volume으로부터 render하고 backpropagation을 위해 loss를 계산하는 pointcloud forecasting에서 crucial한 부분이라고 한다. 근데 differentiable ray casting은 downstream task에 적용했을 때 오히려 악영향을 끼친다. defective geometric feature modeing ability 때문에.

     

    가장 마지막에 projection을 하는 이유가 마지막에 future bev feature로부터 predicted occupancy volume을 얻고 differentiable ray casting이든 뭐든을 이용해 loss를 계산한다는 것 같다. 근데 이해가 또 안되는건, bev feature에서 predicted occupancy volume으로 project하고 differentiable ray casting으로 pointcloud로 만들어 loss를 구하는 건 비효율적이지 않나? 근데 아마도 뭔가 내가 놓친 것 같은 점은 Latent rendering 이 앞부분에 설명으로 volume rendering process를 simulate하는 것이라고 하니 좀더 이해해보자. 

     

    Premliminary

    diffentiable ray casting에 대해 조금 더 자세히 들여다보자. 내가 읽어본 differentiable ray casting 논문이랑 이 논문에서 설명하는 differentiable ray casting방법이 조금 다른 것 같다. 아무튼 여기서 설명하는 내용부터 보자. differentiable ray casting은 occupancy volume을 input으로 수행하는 volume rendering process 이다. 여기서 occupancy volume을 $\mathcal{P}\in \mathbb{R}^{L\times H\times W}$. 이 방법은 various rays의 depth를 render한 다음 depth를 ray direction과 일치하는 point cloud로 convert한다. 근데 여기서 설명하는 식을 보면 그다지 pointcloud로 바꾸는 것 같진 않다. 

     

    식을 설명하면, 처음에 origin sensor position $\textbf{o}$ 에서 differentiable ray casting은 $n$ 개의 ray를 various direction $\textbf{d}$ 으로 casting한다. 각 $i$ 번째 ray에 대해서, 3D space의 boundary에 reach 할 때까지 different distance $\lambda^{(j)}, j\in \{1,2,3,...m\}$에 있는 $m$ 개의 waypoints를 uniformly sample 한다. waypoints들의 coordinate은 다음과 같이 계산된다.

    $$\textbf{x}^{(i,j)} = \textbf{o} + \lambda^{(j)}\textbf{d}^{(i)}$$

    이 waypoint coordinat은 occupancy value를 계산하는데 사용된다. occupancy value는 점유되어있으면 1, 점유되어있지 않으면 0이다. 근데 3D space의 boundary에 닿을 때까지 m개의 point를 sample하는데 어떻게 way point만 가지고 점유되어있는지를 어떻게 알지? 아무튼 occupancy value를 계산하는데 사용되고 이 process는 quantize 된다.  waypoint가 occupancy volume grid에 discretize 된다는 뜻이다.

     

    그러면 waypoint의 occupancy value는 associated values of volume grid들에 의해 계산된다. 이 값은 $\textbf{p}^{(i,j)} = \mathcal{P}([\textbf{x}^{(i,j)}])$ 이고, i번째 ray의 j번째 waypoint coordinate $\textbf{x}^{(i,j)}$ 에서의 value 값이다. (아마도..? 그리고 무슨 value인데..?? ) 또한 여기서 $[\cdot]$ 은 waypoint를 discretizing하기 위한 rounding operation이다. 이 $\textbf{p}$ 를 이용하여 integral process로 $i$번째 ray의 depth와 일치하도록 rendering 할 수 있다. (?? 그래서 rendering 한 결과가 뭔데;;)   

    $$\hat{\textbf{p}}^{(i,j)} = [\prod_{k=1}^{j-1}(1-\textbf{p}^{(i,k)})]\textbf{p}^{(i,j)} $$ $$ \hat{\lambda}^{(i)} = \sum_{j=1}^{m}\hat{\textbf{p}}^{(i,j)}\lambda^{(j)}$$

    식을 풀어서 설명하면, $ \textbf{p} $는 waypoint에서 물체가 있을 확률이다. 그럼 물체가 $j-1$번째 waypoint 위치까지는 없고 $j$ 번째부터 있을 확률은 $ \hat{\textbf{p}} $ 가 된다. $j$번째 waypoint 에 물체가 있을 확률을 구했으니, $i$ 번째 ray에 distance의 expectation을 나타내는 $\hat{\lambda}^{(i)}$이다. 위의 첫번째 식을 conditional probability function 이라고 하고 두번째 식을 distance expectation function 이라고 하자. 

     

    differential raycasting은 pointcloud forecasting에서는 좋은 성능을 거뒀으나, downstream task에 적용했을 때는 성능이 좋지 않았다. 여기서는 ray shaped feature 때문이라고 한다. 근데 ray shaped feature가 어디서의 feature를 말하는 건지 모르겠다. 같은 ray에 걸쳐있는 grid들이 similar feature를 possess하는 경향이 있다고 해서 그렇다고 하는 것 같다. 근데 기존 논문에서는 그런 걸 말을 안했고 feature도 깔끔하게 나오는 걸 실어놨는데 어디서 찾은걸까?

     

    위의 경향에 대한 이유?는 3d space에서 same ray에 걸쳐있는 waypoint들이  same pixel in visual image와 같기 때문이고 이로 인해 similar feature를 배우는 tendency가 생긴다고 한다. 그래서 결론적으로 ray shaped feature는 discriminative 하고 representative 한 feature를 만들지 못한다.

     

    (2)에 계속...

Designed by Tistory.