Single-Image Depth Perception in the Wild

Weifeng Chen, Zhao Fu, Dawei Yang, Jia Deng

TL;DR

This paper introduces Depth in the Wild (DIW), a massive dataset of 495,000 diverse internet images annotated with human-judged relative depth. The authors demonstrate that a simple deep "hourglass" network, trained using a specialized ranking loss, can learn to predict high-quality metric depth maps from these relative comparisons, significantly outperforming previous complex optimization-based methods.

The Challenge of Depth Perception

Estimating the 3D depth of a scene from a single 2D image is a fundamental challenge in computer vision. While deep learning has made huge strides in this area, most models are trained on datasets like NYU Depth or KITTI, which were captured using physical sensors like Kinect or LIDAR.

These sensor-based datasets have three major limitations:

  1. Limited Scope: They typically only cover specific environments, such as indoor rooms or road scenes from a moving vehicle.
  2. Sensor Failure: Physical sensors often fail on shiny, transparent, or very distant surfaces.
  3. Lack of Diversity: There is no "Flickr for depth." We cannot easily obtain ground-truth metric depth for the billions of unconstrained images found on the internet.

The authors argue that while humans are terrible at estimating exact metric distances (e.g., "that tree is exactly 14.2 meters away"), we are excellent at judging relative depth ("the tree is further away than the house"). This paper explores how to leverage human intuition to train better depth-sensing AI.

Methodology: End-to-End Deep Learning

The researchers moved away from complex, multi-stage pipelines in favor of a streamlined, end-to-end deep learning approach.

Training pipeline combining RGB-D data and relative depth annotations.
  • The Architecture: They utilized a "stacked hourglass" network. This encoder-decoder structure processes information across multiple scales, allowing the network to capture both global scene context and fine-grained local details. The output is a pixel-wise depth map at the same resolution as the input image.
  • The Ranking Loss: This is the core innovation. Instead of forcing the network to predict an exact distance in meters—which the training data lacks—they used a loss function that penalizes the network if it ranks two points in the wrong order. If a human annotator indicates point A is closer than point B, the loss function pushes the network to ensure the predicted depth value for A is smaller than for B.
  • Simplicity: Unlike previous state-of-the-art methods that required solving constrained quadratic optimization problems to "stitch" depth together, this model predicts the entire depth map in a single forward pass.

The "Depth in the Wild" Dataset

To train this model, the paper introduces a major new benchmark: Depth in the Wild (DIW).

Annotation interface for the Depth in the Wild dataset, showing two points for relative depth comparison.

DIW consists of 495,000 images sourced from Flickr. Each image features one pair of points annotated by a human as "closer," "further," or "hard to tell."

To ensure high-quality data, the authors used a clever sampling strategy. They found that if two points are picked entirely at random, a model can "cheat" by assuming the lower point in the image is always closer—a common bias in photography. To prevent this, they included a large set of "symmetric pairs" (points at the same height and equidistant from the center) to force the model to genuinely understand the scene geometry rather than relying on vertical position heuristics.

Key Insights and Results

  • Relative Supervision is Sufficient: A laser rangefinder is not strictly necessary to teach a computer about depth. Relative rankings provide enough signal for a neural network to hallucinate a continuous, plausible metric depth map.
  • The "In the Wild" Gap: Models trained solely on indoor sensor data (like NYU Depth v2) perform poorly on general internet images. However, pre-training on sensor data and then fine-tuning on relative depth annotations (DIW) yields the best of both worlds: metric-like predictions with robust "in the wild" generalization.
  • State-of-the-Art Performance: On the NYU benchmark, their method achieved a 35.6% error rate (Weighted Kinect Disagreement Rate), significantly better than the previous state-of-the-art of 43.5%. On the new DIW benchmark, their best model achieved a 14.39% disagreement rate with human annotators. For context, a baseline that simply guesses based on the vertical position of points has a much higher error rate of 31.37%.

Limitations and Future Work

Because the model is trained on rankings, it predicts depth up to a "monotonic transformation." It learns the order of objects perfectly, but it might not know the absolute metric distance between them unless it has seen similar scenes in metric datasets. Furthermore, the current DIW dataset only provides one pair of points per image. While this maximizes image diversity, denser annotations could potentially lead to even higher resolution depth details. Ultimately, this relative depth approach could be combined with other tasks, like semantic segmentation, to create a more holistic 3D understanding of images.

Summary updated

BibTeX
@inproceedings{chen2016single,
  author = {Weifeng Chen and Zhao Fu and Dawei Yang and Jia Deng},
  title = {{Single-Image Depth Perception in the Wild}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2016},
  url = {https://openreview.net/forum?id=rJbW8OW_Zr},
}
Figure