Skip to main content
QUICK REVIEW

[Paper Review] Visualization of Convolutional Neural Networks for Monocular Depth Estimation

Junjie Hu, Yan Zhang|arXiv (Cornell University)|Apr 6, 2019
Advanced Vision and ImagingComputer Science42 references9 citations
TL;DR

This paper proposes a novel method to visualize how convolutional neural networks (CNNs) infer depth from single images by identifying the minimal set of relevant pixels through a learned mask network. The approach uses a separate CNN to predict sparse, interpretable masks that preserve depth estimation accuracy, revealing that CNNs rely on geometric cues like edges and vanishing points rather than raw intensity or edge strength.

ABSTRACT

Recently, convolutional neural networks (CNNs) have shown great success on the task of monocular depth estimation. A fundamental yet unanswered question is: how CNNs can infer depth from a single image. Toward answering this question, we consider visualization of inference of a CNN by identifying relevant pixels of an input image to depth estimation. We formulate it as an optimization problem of identifying the smallest number of image pixels from which the CNN can estimate a depth map with the minimum difference from the estimate from the entire image. To cope with a difficulty with optimization through a deep CNN, we propose to use another network to predict those relevant image pixels in a forward computation. In our experiments, we first show the effectiveness of this approach, and then apply it to different depth estimation networks on indoor and outdoor scene datasets. The results provide several findings that help exploration of the above question.

Motivation & Objective

  • To understand how CNNs perform monocular depth estimation by visualizing the relevant image regions they use.
  • To address the interpretability challenge of CNNs as 'black boxes' in safety-critical applications like self-driving cars.
  • To identify whether CNNs use human-like monocular depth cues such as perspective, texture gradients, and edges.
  • To develop a stable, forward-computation-based method to avoid optimization artifacts common in backpropagation-based visualization.
  • To evaluate the impact of different training losses on the network's attention patterns in depth estimation.

Proposed method

  • Formulate the identification of relevant pixels as a sparse optimization problem: find the minimal set of pixels from which the CNN produces a depth map nearly identical to that from the full image.
  • Use a separate, trainable CNN (called G) to predict the relevant pixel mask in a forward pass, avoiding backpropagation through the depth network N.
  • Train G to minimize the difference between the depth map estimated from the masked input and the original full-image depth map, while enforcing sparsity on the mask.
  • The mask M is applied via element-wise multiplication of the input image I, producing a masked input I ⊙ M that is fed into the fixed depth network N.
  • Optimize G using a composite loss combining depth map similarity (e.g., L1 or L2 loss) and sparsity regularization (e.g., L1 norm on M).
  • Apply the method to state-of-the-art depth estimation networks on NYU-v2 (indoor) and KITTI (outdoor) datasets to analyze attention patterns.

Experimental results

Research questions

  • RQ1Which image regions (pixels) are most critical for a CNN to estimate depth accurately from a single image?
  • RQ2Do CNNs for monocular depth estimation rely on the same monocular cues used by human vision, such as linear perspective, texture gradients, and vanishing points?
  • RQ3How does the choice of training loss (e.g., depth, gradient, normal) affect the network’s attention to specific image regions?
  • RQ4Can a deep neural network reliably and stably predict a sparse, meaningful mask of relevant pixels without backpropagating through the target network?
  • RQ5To what extent can depth estimation be preserved using only a small subset of image pixels, and what structural features do these pixels share?

Key findings

  • CNNs can estimate depth with high accuracy using only a sparse subset of image pixels—often less than 10% of the image—demonstrating that global image context is not always necessary.
  • The network frequently attends to edges, but not based on edge strength; instead, edges that convey geometric structure (e.g., object boundaries) are prioritized.
  • For indoor scenes, CNNs attend not only to object edges but also to the internal regions of objects, suggesting recognition of object shape and size for depth inference.
  • In outdoor scenes, regions near vanishing points are consistently highlighted, indicating strong reliance on perspective cues, possibly due to their geometric importance or error minimization in depth loss functions.
  • The inclusion of gradient and normal consistency losses during training leads to more structured and geometrically coherent attention masks, with sharper edges and better object-level focus.
  • The proposed mask-prediction network G generalizes well across different depth estimation architectures and datasets, producing stable, interpretable visualizations without optimization artifacts.

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.