Home ZoeDepth
Post
Cancel

ZoeDepth

ZoeDepth: Zero-shot Transfer by Combining Relative and Metric Depth

요약

  • 결합된 접근 방식: 상대적 깊이와 메트릭 깊이 추정을 통합하여 일반화 성능과 정확한 메트릭 스케일을 모두 달성하고자 함
  • 다중 데이터셋 사전 훈련 및 미세 조정: 12개 데이터셋에서 상대적 깊이로 사전 훈련되고, 특정 데이터셋에서 메트릭 깊이로 미세 조정되어 각 도메인에 최적화된 성능을 제공
  • 경량화된 헤드와 자동 경로 설정: 각 도메인에 맞춤화된 경량화된 헤드와 메트릭 빈 모듈을 사용하며, 입력 이미지를 적절한 헤드로 자동으로 경로 설정하는 잠재 분류기 포함
  • 혁신적인 모델 아키텍처: 각 도메인별로 특화된 새로운 ‘메트릭 빈 모듈’을 통해 더 정밀하고 효율적인 깊이 추정을 가능하게 하는 독특한 아키텍처를 채택
  • 향상된 성능 및 일반화: NYU Depth v2 및 기타 데이터셋에서 상대 절대 오류를 크게 감소시키고, 실내 및 실외 도메인의 여러 데이터셋에 대한 제로샷 일반화 성능을 제공

목표

  • 상대적 및 측정적 깊이 추정 방법을 통합하여 보다 정밀하고 신뢰할 수 있는 깊이 정보를 제공
  • 다양한 환경에서의 깊이 추정의 정확도를 개선
  • 특히 도시 환경과 같이 복잡한 실외 환경에서의 성능 향상
    • 이를 위해 다양한 데이터셋에서 사전 학습된 모델을 사용
    • 특정 데이터셋에서 미세 조정하여 모델의 일반화 능력 강화

방법론

  • Relative 및 Metric Depth Estimation의 결합을 통해 깊이 추정 방법론 혁신
  • ZoeDepth는 MiDaS 모델을 기반으로 하여 깊이 추정의 정확도 향상
  • 새로운 ‘metric bins module’을 통한 깊이 추정의 개선
    • 이 모듈은 깊이 추정의 정밀도를 높이는 데 중요한 역할을 함
    • 다양한 환경에서의 깊이 추정 정확도를 위해 설계됨

모델 아키텍처

  • 기존 MiDaS 깊이 추정 프레임워크와 DPT 아키텍처를 결합하여 구축
  • RGB 이미지를 처리하여 다양한 해상도에서 깊이 정보 추출
  • MiDaS 디코더는 상대적 깊이 정보를 생성하기 위해 다양한 크기의 특징 맵을 결합
  • ‘metric bins module’은 픽셀별 깊이 bin 중심을 계산하고 이를 선형 결합하여 측정적 깊이 정보를 도출
  • 다양한 트랜스포머 백본, 예를 들어 BEiT와 Swin Transformer를 MiDaS 인코더에 적용하여 깊이 추정의 정확도 및 성능 개선

Backbone

metric bins module

  • ZoeDepth에서 ‘metric bins module’은 깊이 추정의 정확도를 혁신적으로 향상시키는 핵심 요소입니다.
  • 이 모듈은 각 픽셀별로 깊이 bin의 중심을 예측하는 기능을 함으로써, 보다 세밀한 깊이 계산을 가능하게 합니다.
  • 깊이 추정의 정밀도를 높이는 데 중요한 역할을 하며, 다양한 환경에서의 깊이 추정 정확도 향상에 기여합니다.

    데이터셋과 사전 훈련

  • 12개의 다양한 데이터셋을 사용
  • 주요 데이터셋으로는 실내 환경에는 NYU Depth v2, 실외 환경에는 KITTI 사용
  • 추가적으로 Relative Depth Estimation을 위한 백본 사전 훈련으로 HRWSI, BlendedMVS, ReDWeb, DIML-Indoor, 3D Movies, MegaDepth, WSVD, TartanAir, ApolloScape, IRS 등의 데이터셋 사용
  • 이들 데이터셋은 모델의 다양한 환경에 대한 일반화 능력을 강화하기 위해 선택

Loss Function and Evaluation Metrics

  1. Absolute Relative Error (REL): \(\quad \text{REL} = \frac{1}{M} \sum_{i=1}^{M} \left| \frac{d_i - \hat{d}_i}{d_i} \right|\)
  2. Root Mean Squared Error (RMSE): \(\quad \text{RMSE} = \sqrt{\frac{1}{M} \sum_{i=1}^{M} \left| d_i - \hat{d}_i \right|^2}\)

  3. Average Log10 Error: \(\quad \text{Average Log10 Error} = \frac{1}{M} \sum_{i=1}^{M} \left| \log_{10}(d_i) - \log_{10}(\hat{d}_i) \right|\)

  4. Threshold Accuracy $(\delta^n)$: \(\begin{align*} \text{Percentage of pixels where} \quad \max \left( \frac{d_i}{\hat{d}_i}, \frac{\hat{d}_i}{d_i} \right) < 1.25^n \quad \text{for } n = 1, 2, 3 \\ \delta^n &: \text{Threshold Accuracy for } n = 1, 2, 3 \\ d_i &: \text{Ground Truth Depth at pixel } i \\ \hat{d}_i &: \text{Predicted Depth at pixel } i \\ M &: \text{Total Number of Pixels in the Image} \end{align*}\)

  5. Mean Relative Improvement across Datasets (mRID): \(\quad \text{mRID} = \frac{1}{M} \sum_{i=1}^{M} \text{RID}_i\)
  6. Mean Relative Improvement across Metrics (mRI$\theta$) \(\quad \text{mRI}\theta = \frac{1}{N} \sum_{j=1}^{N} \text{RI}\theta_j\)

  7. Relative Improvement (RI) for lower-is-better metrics: \(\quad \text{RI} = \frac{r - t}{r}\)

  8. Relative Improvement (RI) for higher-is-better metrics: \(\quad \text{RI} = \frac{t - r}{r}\) \(\\ r: \text{Reference Score} \\ t: \text{Target Score}\)
  • ZoeDepth는 scale-invariant log loss를 사용하여 깊이 추정의 정확도 측정
    • 이 loss function은 깊이 추정에서의 스케일 불변성을 보장하여, 다양한 크기의 객체에 대한 깊이 추정을 일관되게 수행할 수 있도록 함
  • 모델의 성능 평가에는 정확도, 정밀도, 재현율과 같은 표준 메트릭스가 사용

결과

Figure 10. Zero-shot transfer to the Virtual KITTI 2 dataset. Invalid regions are indicated in gray.

Figure 11. Zero-shot transfer to the DDAD dataset. Ground truth depth is too sparse to visualize here.

https://paperswithcode.com/paper/zoedepth-zero-shot-transfer-by-combining/review/

Table 2: Comparison with existing works when trained on NYU and KITTI. Results are reported using the REL metric. The mRID column denotes the mean relative improvement with respect to NeWCRFs across datasets. X in the model name, means no architecture change and no pre-training. M12 means that the model was pre-trained (using our base model based on the DPT architecture with the BEiT-L encoder). All models are fine-tuned on NYU and KITTI. † denotes a single metric head (shared); single-head training allows us to adapt prior models without major changes. Best results are in bold, second best are underlined. PixelBins [pixelbinsSarwari:EECS-2021-32] did not converge without modification. We also tried to train AdaBins [bhat2021adabins] across both datasets, but despite our best effort and extensive hyperparameter tuning, it did not converge.

      
MethodNYUKITTIiBims-1vKITTI-2mRID
Baselines: no modification     
DORN-X-NK†0.1560.1150.2870.259-45.7%
LocalBins-X-NK†0.2450.1330.2960.265-74.0%
PixelBins-X-NK†-----
NeWCRFs-X-NK†0.1090.0760.1890.1900.0%
Baselines: modified to use our pre-trained DPT-BEiT-L as backbone     
DORN-M12-NK†0.1100.0810.2420.215-12.2%
LocalBins-M12-NK†0.0860.0710.2210.12111.8%
PixelBins-M12-NK†0.0880.0710.2320.11910.1%
NeWCRFs-M12-NK†0.0880.0730.2330.1248.7%
Ours: different configuations for fair comparison     
ZoeD-X-NK†0.0950.0740.1870.1844.9%
ZoeD-M12-NK†0.0810.0610.2100.11218.8%
ZoeD-M12-NK0.0770.0570.1860.10525.2%

Table 4: Quantitative results for zero-shot transfer to four unseen outdoor datasets. mRIθ denotes the mean relative improvement with respect to NeWCRFs across all metrics (δ1, REL, RMSE). Best results are in bold, second best are underlined.

                 
 Virtual KITTI 2   DDAD   DIML Outdoor   DIODE Outdoor   
Methodδ1 ↑REL ↓RMSE ↓mRIθ ↑δ1 ↑REL ↓RMSE ↓mRIθ ↑δ1 ↑REL ↓RMSE ↓mRIθ ↑δ1 ↑REL ↓RMSE ↓mRIθ ↑
BTS [bts_lee2019big]0.8310.1155.3682.5%0.8050.1477.550-17.8%0.0161.7855.90824.3%0.1710.83710.48-4.8%
AdaBins [bhat2021adabins]0.8260.1225.4200.0%0.7660.1548.560-26.7%0.0131.9416.2729.7%0.1610.86310.35-7.2%
LocalBins [bhat2022localbins]0.8100.1275.981-5.3%0.7770.1518.139-23.2%0.0161.8206.70619.5%0.1700.82110.27-3.6%
NeWCRFs [yuan2022new]0.8290.1175.6910.0%0.8740.1196.1830.0%0.0101.9186.2830.0%0.1760.8549.2280.0%
ZoeD-X-K0.8370.1125.3383.8%0.7900.1377.734-16.6%0.0051.7566.180-13.3%0.2420.7997.80619.8%
ZoeD-M12-K0.8640.1004.97410.5%0.8350.1297.108-9.3%0.0031.9216.978-27.1%0.2690.8526.89826.1%
ZoeD-M12-NK0.8500.1055.0957.8%0.8240.1387.225-12.8%0.2920.6413.610976.4%0.2080.7577.56915.8%

Table 5: Metric head variants. The “Config” column specifies the split factor in case of the splitter variant and the number of attractors {nla} for attractor variants. The reported results are all based on ZoeD-M12-N evaluated on NYU Depth v2. Best results are in bold, second best are underlined.

     
Metric head type  REL ↓RMSE ↓
TypeVariantConfig  
Naive head--0.0960.335
Metric binsSplitterfactor = 20.0850.301
Metric binsExponential Attractor{16,8,4,1}0.0860.305
Metric binsInverse Attractor{8,8,8,8}0.0810.295
Metric binsInverse Attractor{16,2,2,16}0.0810.291
Metric binsInverse Attractor{1,4,8,16}0.0800.287
Metric binsInverse Attractor{16,8,4,1}0.0750.270

Table 6: Router variants. The reported results are all based on ZoeD-M12-NK evaluated on NYU Depth v2 and KITTI. Best results are in bold, second best are underlined.

       
 Labels required REL ↓ RMSE ↓ 
VariantTrainInferenceNYUKITTINYUKITTI
Labeled Router0.0800.0570.2902.452
Trained Router0.0770.0570.2772.362
Auto Router0.1020.0750.3772.584

Table 7: Overview of datasets used in metric depth fine-tuning and evaluation of ZoeDepth architectures. For demonstrating zero-shot transfer, we evaluate across a total of 13165 indoor samples and 6597 outdoor samples. While HyperSim is predominantly an indoor dataset, there are several samples exhibiting depth ranges exceeding 10 m, so we relax the maximum evaluation depth up to 80 m. ‡ : To follow prior works [yuan2022new, bhat2021adabins], we crop the sample and then use scaled Garg crop for evaluation. We verify the transforms by reproducing results obtained by using respective pre-trained checkpoints provided by prior works.

         
   Seen in# Train# EvalEval Depth [m] Crop
DatasetDomainTypeTraining?SamplesSamplesMinMaxMethod
NYU Depth v2 [Silberman2012]IndoorReal24k [bts_lee2019big]6541e-310Eigen
SUN RGB-D [Song2015_sunrgbd]IndoorReal-50501e-38Eigen
iBims-1 [koch2019]IndoorReal-1001e-310Eigen
DIODE Indoor [diode_dataset]IndoorReal-3251e-310Eigen
HyperSim [roberts:2021]IndoorSynthetic-76901e-380Eigen
KITTI [Menze_2015_CVPR]OutdoorReal26k [bts_lee2019big]6971e-380Garg‡
Virtual KITTI 2 [cabon2020vkitti2]OutdoorSynthetic-17011e-380Garg‡
DDAD [packnet]OutdoorReal-39501e-380Garg
DIML Outdoor [kim2018deep]OutdoorReal-5001e-380Garg
DIODE Outdoor [diode_dataset]OutdoorReal-4461e-380Garg

Table 17. Parameter comparison of ZoeDepth models with different backbones and state of the art models. Note that the number of parameters of ZoeDepth only varies with the backbone and is the same for all variants trained on different dataset combinations, e.g., ZoeD-X-N, ZoeD-M12-N and ZoeD-M12-NK, etc

   
MethodEncoder# Params
Eigen et al. [Eigen2014]-141M
Laina et al. [Laina2016]ResNet-5064M
Hao et al. [Hao2018DetailPD]ResNet-10160M
Lee et al. [Lee2011]-119M
Fu et al. [Fu2018DeepOR]ResNet-101110M
SharpNet [Ramamonjisoa_2019_ICCV]--
Hu et al. [Hu2018RevisitingSI]SENet-154157M
Chen et al. [ijcai2019-98]SENet210M
Yin et al. [Yin_2019_ICCV]ResNeXt-101114M
BTS [bts_lee2019big]DenseNet-16147M
AdaBins [bhat2021adabins]EfficientNet-B578M
LocalBins [bhat2022localbins]EfficientNet-B574M
NeWCRFs [yuan2022new]Swin-L270M
ZoeDepth (S-L)Swin-L212M
ZoeDepth (S2-T)Swin2-T42M
ZoeDepth (S2-B)Swin2-B102M
ZoeDepth (S2-L)Swin2-L214M
ZoeDepth (B-B)Beit-B112M
ZoeDepth (B-L)Beit-L345M

Performance (REL):

ModelBackboneNYUSUN RGBDiBims-1DIODE IndoorHypersim
ZoeD-M12-NBEiT-L-3840.0750.1190.1690.3270.410
ModelBackboneNYUSUN RGBDiBims-1DIODE IndoorHypersimVirtual KITTI 2DDADDIML OutdoorDIODE Outdoor
ZoeD-M12-NKBEiT-L-3840.0770.1230.1860.3310.4190.1050.1380.6410.757
ModelBackboneVirtual KITTI 2DDADDIML OutdoorDIODE Outdoor
ZoeD-M12-KBEiT-L-3840.1000.1291.9210.852

This post is licensed under CC BY 4.0 by the author.

Git Blog Themes

Docker