Skip to main content
QUICK REVIEW

[Paper Review] CLIP Can Understand Depth

Dunam Kim, Kang, Jisu|arXiv (Cornell University)|Feb 5, 2024
Multimodal Machine Learning ApplicationsComputer Science3 citations
TL;DR

This paper proposes CLIP2Depth, a method that enables CLIP to perform monocular dense depth estimation without fine-tuning its vision-language alignment. By introducing a learnable, non-human language prompt embedding called 'mirror' and a compact deconvolutional decoder, the model leverages CLIP’s pre-trained knowledge to achieve state-of-the-art performance on NYU Depth v2 and KITTI, outperforming all prior CLIP-based methods while maintaining task-agnostic generalization.

ABSTRACT

In this paper, we demonstrate that CLIP can also be adapted to downstream tasks where its vision-language alignment is suboptimally learned during pre-training on web-crawled data, all without requiring fine-tuning. We explore the case of monocular depth estimation, where CLIP's contrastive prior struggles to generalize, compared to its success in domains such as generative modeling and semantic segmentation. Since CLIP fails to consistently capture similarities between image patches and natural language prompts describing distance, we eliminate the use of its pre-trained natural language token embeddings and distill the semantic prior of its frozen text encoder into a single learnable embedding matrix called "mirror". The main design goal of mirror is to derive a non-human language prompt that approximates an optimal natural language prompt: "How far is this location from the camera?" Using this approach, we jointly train two lightweight modules, a mirror and a compact decoder, on top of a frozen CLIP for dense depth prediction. Compared to conventional depth models, our framework is significantly more efficient in terms of parameters and computation. The resulting model exhibits impressive performance, matching several state-of-the-art vision models on the NYU Depth v2 and KITTI benchmark datasets, while outperforming all vision-language depth models based on a frozen CLIP prior. Experiments demonstrate that the suboptimal depth understanding of CLIP in terms of spatial and temporal consistency can be significantly corrected without either fine-tuning it or concatenating mirror with its pre-trained subword token embeddings. Furthermore, an ablation study on the convergence status of mirror shows that it is implicitly trained to capture objects, such as humans and windows, where semantic cues play an important role in detection.

Motivation & Objective

  • To investigate whether CLIP can generalize to monocular depth estimation using only its pre-trained prior knowledge.
  • To address the suboptimal image-text alignment in CLIP for depth estimation, where natural language prompts fail to elicit meaningful depth cues.
  • To develop a minimal adaptation framework that avoids direct fine-tuning of CLIP’s vision-language components.
  • To demonstrate that non-human language prompts can effectively guide vision-language models in domains where web-crawled data lacks sufficient depth supervision.
  • To preserve CLIP’s task-agnostic generalization while achieving performance on par with task-specific state-of-the-art depth estimation models.

Proposed method

  • Introduce a learnable, compact embedding matrix named 'mirror' to replace CLIP’s subword token embeddings, serving as a non-human language prompt for the text encoder.
  • Jointly train a small deconvolutional decoder with the 'mirror' embedding to produce dense depth predictions from frozen CLIP image features.
  • Condition the image representation via a FiLM block modulated by the 'mirror' embedding, enabling depth-aware feature adaptation without modifying CLIP’s architecture.
  • Use the CLIPSeg decoder architecture as a base for the depth head, reusing its learned structure for better feature propagation and spatial modeling.
  • Train the entire system end-to-end with a contrastive loss between predicted depth and the 'mirror' embedding, leveraging CLIP’s pre-trained text encoder for depth supervision.
  • Perform ablation studies to isolate the role of 'mirror' and verify that depth estimation relies on both image and text encoders, not just image features.

Experimental results

Research questions

  • RQ1Can CLIP understand depth without direct fine-tuning, relying only on its pre-trained vision-language alignment?
  • RQ2Is it possible to improve CLIP’s depth estimation performance by introducing a non-human language prompt embedding instead of natural language prompts?
  • RQ3Does the 'mirror' embedding enable the model to utilize semantic knowledge from the CLIP text encoder, rather than relying solely on image features?
  • RQ4How does the proposed method compare to existing CLIP-based depth estimation approaches in terms of accuracy, spatial continuity, and temporal consistency?
  • RQ5Can a minimal adaptation using a learnable prompt and a small decoder achieve performance matching task-specific state-of-the-art models?

Key findings

  • CLIP2Depth outperforms all previous CLIP-based depth estimation models on both NYU Depth v2 and KITTI datasets, achieving state-of-the-art performance without any fine-tuning of CLIP.
  • The model matches the performance of previous task-specific vision-only models, demonstrating that CLIP’s prior knowledge can be effectively repurposed for depth estimation.
  • Ablation studies show that randomizing the 'mirror' embedding causes a significant drop in depth estimation accuracy for semantic objects like cars and pedestrians, proving its role in capturing depth cues.
  • Despite randomizing 'mirror', the model retains depth performance in non-semantic regions, indicating that the image encoder still contributes meaningfully and that the system self-regulates learning roles.
  • The modulation-based approach using a single 'mirror' prompt outperforms similarity-based methods using multiple prompts, suggesting that unified, non-human prompt conditioning is more effective for depth alignment.
  • The framework demonstrates strong temporal consistency on KITTI video clips and spatial continuity on KITTI Object Detection benchmarks, confirming the robustness of the learned depth representations.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.