Self-Supervised Relative Depth Learning for Urban Scene Understanding

Huaizu Jiang, Gustav Larsson, Michael Maire, Greg Shakhnarovich, Erik G. Learned-MillerECCV 2018

Abstract

As an agent moves through the world, the apparent motion of scene elements is (usually) inversely proportional to their depth (Strictly speaking, this statement is true only after one has compensated for camera rotation, individual object motion, and image position. We address these issues in the paper). It is natural for a learning agent to associate image patterns with the magnitude of their displacement over time: as the agent moves, faraway mountains don’t move much; nearby trees move a lot. This natural relationship between the appearance of objects and their motion is a rich source of information about the world. In this work, we start by training a deep network, using fully automatic supervision, to predict relative scene depth from single images. The relative depth training images are automatically derived from simple videos of cars moving through a scene, using recent motion segmentation techniques, and no human-provided labels. The proxy task of predicting relative depth from a single image induces features in the network that result in large improvements in a set of downstream tasks including semantic segmentation, joint road segmentation and car detection, and monocular (absolute) depth estimation, over a network trained from scratch. The improvement on the semantic segmentation task is greater than that produced by any other automatically supervised methods. Moreover, for monocular depth estimation, our unsupervised pre-training method even outperforms supervised pre-training with ImageNet. In addition, we demonstrate benefits from learning to predict (again, completely unsupervised) relative depth in the specific videos associated with various downstream tasks (e.g., KITTI). We adapt to the specific scenes in those tasks in an unsupervised manner to improve performance. In summary, for semantic segmentation, we present state-of-the-art results among methods that do not use supervised pre-training, and we even exceed the performance of supervised ImageNet pre-trained models for monocular depth estimation, achieving results that are comparable with state-of-the-art methods.

1. Introduction

Deep learning has revolutionized urban scene understanding, but the reliance on massive, human-annotated datasets like ImageNet or CityScapes presents a significant scalability challenge. Self-supervised learning offers a solution by deriving labels from the data itself. However, many common pretext tasks do not capture the 3D spatial structure essential for navigation and scene parsing. We propose leveraging motion parallax—the geometric relationship where distant objects appear to move slower than nearby ones—to provide a dense, automatic supervision signal for depth.

2. Methodology

Our approach transforms raw video into a supervision signal for a single-image depth prediction task. The pipeline consists of three main stages:

2.1 Motion Analysis and Label Generation

Using unlabeled videos from moving vehicles, we compute optical flow between consecutive frames. We then employ motion segmentation to decompose this flow into rotational and translational components. The translational flow is directly related to scene depth. To handle the unknown camera velocity in diverse video sources, we normalize these depth estimates into percentiles (0 to 1), creating "relative depth maps."

The pipeline for generating relative depth labels from video sequences. From left to right: input frames, calculated optical flow, and the resulting relative depth map.

2.2 Proxy Task Training

We train standard CNN architectures (e.g., AlexNet, ResNet) to predict these relative depth maps from a single RGB image. This task forces the network to internalize the relationship between 2D image patterns and 3D scene structure, such as recognizing object boundaries and perspective cues.

3. Results and Discussion

The pre-trained models were evaluated on several downstream tasks to measure the quality of the induced features.

3.1 Semantic Segmentation and Depth Estimation

On the CityScapes benchmark, our self-supervised AlexNet achieved 45.4 mIoU, surpassing other self-supervised approaches like colorization. Notably, for monocular depth estimation on KITTI, our method outperformed models pre-trained on the human-labeled ImageNet dataset. This indicates that learning spatial geometry is more beneficial for depth tasks than learning object-centric features from classification datasets.

Comparison of input images (top), noisy relative depth labels generated from motion (middle), and the network's regularized depth predictions (bottom).

As shown in the figure above, the network learns to produce smoother and more coherent depth maps than the noisy labels it was trained on, demonstrating a strong ability to generalize and regularize the input signal.

3.2 Unsupervised Domain Adaptation

We also found that the model can be "primed" for specific environments. By training on unlabeled video from a target city before fine-tuning, the model adapts its internal representations to local architectural styles and road layouts, further boosting performance.

4. Limitations

The method is constrained by the "focus of expansion" (FOE), where motion is zero at the center of the camera's path, leading to holes in the training labels. Additionally, the assumption of a static scene can be violated by other moving vehicles, although motion segmentation helps mitigate this.

5. Conclusion

By exploiting the natural relationship between motion and depth, we provide a scalable method for self-supervised learning in urban environments. Our results demonstrate that relative depth is a powerful proxy task that can rival or exceed the performance of supervised pre-training for spatial understanding tasks.

Summary updated

BibTeX
@inproceedings{jiang2018self,
  author = {Huaizu Jiang and Gustav Larsson and Michael Maire and Greg Shakhnarovich and Erik G. Learned-Miller},
  title = {{Self-Supervised Relative Depth Learning for Urban Scene Understanding}},
  booktitle = {European Conference on Computer Vision},
  year = {2018},
  url = {https://openreview.net/forum?id=SJ-oUF-OZB},
}
Figure