Title: GLOBAL-LOCAL NETWORK FOR LEARNING DEPTH WITH VERY SPARSE SUPERVISION

Abstract: Natural intelligent agents learn to perceive the three dimensional structure of the world without training on large datasets and are unlikely to have the precise equations of projective geometry hard-wired in the brain. Such skill would also be valuable to artificial systems in order to avoid the expensive collection of labeled datasets, as well as tedious tuning required by methods based on multi-view geometry. Inspired by natural agents, who interact with the environment via visual and haptic feedback, this paper explores a new approach to learning depth from images and very sparse depth measurements, just a few pixels per image. To learn from such extremely sparse supervision, we introduce an appropriate inductive bias by designing a specialized global-local network architecture. Experiments on several datasets show that the proposed model can learn monocular dense depth estimation when trained with very sparse ground truth, even a single pixel per image. Moreover, we find that the global parameters extracted by the network are predictive of the metric agent motion.

1. INTRODUCTION:

Understanding of the three-dimensional (3D) structure of the world is crucial for the functioning of intelligent agents: for instance, it supports path planning and navigation, as well as motion planning and object manipulation. Animals, including humans, obtain such three-dimensional understanding naturally, without any specialized training. By observing the environment and interacting with it, they learn to estimate distances to objects using stereopsis and a variety of monocular cues [1, 2] , including motion parallax, perspective, defocus, familiar object sizes. How could artificial systems acquire such spatial awareness? This question inspired a long line of work on algorithmically extracting 3D structures from their two-dimensional (2D) projections [3] . Classically, multi-view geometry is used to reconstruct the 3D coordinates of points given their corresponding projections in multiple images. These geometric methods, carefully engineered over decades, demonstrate impressive results in a variety of settings and applications [4, 5] . One downside of this class of approaches is that they are very sensitive to hyper-parameters, e.g. camera calibration, which generally require tedious tuning. Additionally, they do not exploit more subtle monocular cues, such as perspective, defocus or familiar object size.

In order to utilize such cues, supervised learning approaches train deep neural networks to predict depth maps from annotated datasets [6] . Since they are not strictly dependent on projective geometry, they can achieve impressive results on sequences with unknown, and potentially varying, camera model and parameters, but require a considerable amount of training data [7] . Collecting such datasets is an expensive process, which is generally repeated every time the application environment changes. To combine the respective advantages of learning and geometry, unsupervised approaches to depth estimation [8, 9] train deep neural networks through projective geometry, eliminating the need to collect large annotated training datasets. These approaches are remarkably successful for some scenes, for instance driving, but have not yet been clearly demonstrated in other environments, such as indoors. Additionally, being based on geometry, they inherit high sensitivity to the camera model and parameters and the need for extensive tuning.

The present work is motivated by the following question: How can 3D perception be learned by an embodied agent without the explicit use of projective geometry or large training datasets? To make the problem tractable, we make two assumptions. First, motivated by the extensive evidence from psychology and neuroscience on the fundamental importance of motion perception [10, 11, 12, 13] , we provide pre-computed optical flow as an input to the depth estimation system. Optical flow estimation can be learned either from synthetic data [14, 15, 16] or from real data in an unsupervised fashion [17, 18] . Second, we explore the idea that perception gets coupled to 3D properties of the world via interaction with the environment. Instead of realistically modeling haptic sensing, we simulate an agent equipped with a low-cost range sensor, similar to a rangefinder or a 2D LiDAR. These provide very sparse depth ground truth, just a few pixels per image. Together with the monocular video, this is the only training signal that the agent receives.

In order to learn from such sparse annotations, we design a lightweight global-local network architecture (see Fig. 1 ) consisting of two modules -global and local -inspired by camera pose estimation and triangulation in standard geometric pipelines. The global module takes as input two images and the optical flow between them and outputs a compact latent vector of "global parameters", which encodes the observer's motion between the frames and the camera parameters. The local module, consisting of a compact fully convolutional network, combines the "global parameters" with the optical flow field to produce the final depth estimate. Such a global-local decomposition provides our architecture with an inductive bias that is appropriate for learning from very sparse annotations.

Since the method is inspired by learning via interaction, we evaluate it on diverse indoor scenes. We demonstrate that our network learns to estimate depth when provided, at training time, ground-truth for as little as a single pixel per image, i.e., 0.002% of the agent's field of view. We compare against generic deep networks, classic geometry methods, and unsupervised learning approaches. Standard convolutional networks show good results when trained with dense depth ground truth, but their performance degrades dramatically in the very sparse data regime. Both classic and unsupervised learning approaches are generally strong, but exhibit performance drops when calibration parameters are unspecified or dynamically changing. In the sparse data regime, the proposed approach outperforms all baselines thanks to its ability to train with sparse labels and its robustness to variations in the camera parameters.

2. RELATED WORK:

The problem of recovering the three-dimensional structure of a scene from its two-dimensional projections has been long studied in computer vision [19, 20, 21, 22] . Classic methods are based on multi-view projective geometry [3] . The standard approach is to first find correspondences between images and then use these together with geometric constraints to estimate the camera motion between the images (for instance, with the eight-point algorithm [21] ) and the 3D coordinates of the points (e.g., via triangulation [20] ). Numerous advanced variations of this basic pipeline have been proposed [23, 24, 4, 5] , improving or modifying various its elements. However, key characteristics of these classic methods are that they crucially rely on projective geometry, require laborious hand-engineering, and are not able to exploit non-motion-related depth cues.

To make optimal use of all depth cues, machine learning methods can either be integrated into the classic pipeline, or replace it altogether. The challenge for supervised learning methods is the collection of training data: obtaining ground truth camera poses and geometry for large realistic scenes can be extremely challenging. An alternative is to train on simulated data, but then generalization to diverse real-world scenes can become an issue. Therefore, while supervised learning methods have demonstrated impressive results [6, 7, 25, 26] , it is desirable to develop algorithms that function in the absence of large annotated datasets.

Unsupervised (or self-supervised) learning provides an attractive alternative to the label-hungry supervised learning. The dominant approach is inspired by classic 3D reconstruction techniques and makes use of projective geometry and photometric consistency across frames. Existing works use various depth representations for this task: voxel grids [27, 28] , point clouds [29, 30] , triangular meshes [31] or depth maps [32, 8, 33, 34] . In this work we focus on the depth map representation. Among the methods for learning depth maps, some operate in the stereo setup (given a dataset of images recorded by a stereo pair of cameras) [32, 33] , while others address the more challenging monocular setup, where the training data consists of monocular videos with arbitrary camera motions between the frames [8, 34] . Reprojection-based approaches can often yield good results, but they crucially rely on geometric equations and precisely known camera parameters (one notable exception being the recent technical report in [35] , which learns the camera parameters automatically). In contrast, we do not require knowing the camera parameters in advance and do not rely on projective geometry. Also related to our work are depth completion methods [36] , which learn to predict full depth maps given sparse ground-truth annotations. However, while they assume to observe ground-truth also at test time, we use ground-truth annotations only at training time. At test time, we predict depth maps from two images only. Using sparse annotations only for training has been applied mainly to semantic segmentation [37] , where additional cues, e.g., object masks, can facilitate learning.

Several works, similar to ours, aim to learn 3D representations without explicitly applying geometric equations [38, 39, 40] . A scene, represented by one or several images, is encoded by a deep network into a latent vector, from which, given a target camera pose, a decoder network can generate new views of the scene. A downside of this technique is that the 3D representation is implicit and therefore cannot be directly used for downstream tasks such as navigation or motion planning. Moreover, at training time it requires knowing camera pose associated with each image. Our method, in contrast, does not require camera poses, and grounds its predictions in the physical world via very sparse depth supervision. This allows us to learn an explicit 3D representation in the form of depth maps.

3. METHODOLOGY:

Given two monocular RGB images I 1 , I 2 , with unknown camera parameters and relative pose, as well as the optical flow w between them, we aim to estimate a dense depth map corresponding to the first image. We assume to have an artificial agent equipped with a range sensor, which navigates through an indoor environment. By doing so, it collects a training dataset of image pairs, with depth ground truth d available only for extremely few pixels. Using this sparsely annotated dataset, we train a deep network F θ (I 1 , I 2 , w), with parameters θ, that predicts a dense depth map d over the whole image plane. We now describe the network architecture in detail.

3.1. MODEL ARCHITECTURE:

An overview of the global-local network architecture is provided in Figure 1 . The system operates on an image pair I 1 , I 2 and the optical flow (dense point correspondences) w between them. In this work, we estimate the flow field with an off-the-shelf optical flow estimation algorithm, which is neither trained nor tuned on our data.

The rest of the model is composed of two modules: a global module G that processes the whole image and outputs a compact vector of "global parameters" and a local module L that applies a compact fully convolutional network, conditioned on the global parameters, to the optical flow field. This design is motivated both by classic 3D reconstruction methods and by machine learning considerations.

Establishing an analogy with classic pipelines, the global module corresponds to the relative camera pose estimation, while the local module corresponds to triangulation -estimation of depth given the image correspondences and the camera motion. These connections are described in more detail in the supplement. From the learning point of view, we aim to train a generalizable network with few labels, and therefore need to avoid overfitting. The local module is very compact and operates on a transferable representation -optical flow. The global network is bigger and takes raw images as input, but it communicates with the rest of the model only via the low-dimensional bottleneck of global parameters, which prevents potential overfitting.

The "global module" G is implemented by a convolutional encoder with global average pooling at the end. The network outputs a low-dimensional vector of "global parameters" g = G(I 1 , I 2 , w).

The idea is that the vector represents the motion of the observer, although no explicit supervision is provided to enforce this behavior. While the optical flow alone is in principle sufficient for ego-motion estimation, we also feed the raw image pair to the network to supply it with additional cues.

The "local module" L takes as input the generated global parameters g, as well as the optical flow field. First, the global parameter vector is processed by a linear perceptron that outputs several convolutional filters banks, collectively denoted by ϕ = LP (g). Then, these filter banks are stacked into a small fully convolutional network C ϕ that is applied to the optical flow field. We append two channels of xand yimage coordinates to the input w of C ϕ , as in CoordConv [41] . The output of

C ϕ is the final depth prediction d = C ϕ (w).

This design of the local module is motivated by classic geometric methods: for estimating the depth of a point it is sufficient to know its displacement between the two images, its image plane coordinates, and the camera motion. In contrast to this standard formulation of triangulation, we intentionally make the receptive field of the network larger than 1 × 1 pixel, so that the network has the opportunity to correct for small inaccuracies or outliers in the optical flow input.

3.2. LOSS FUNCTION:

Similarly to previous work [25, 7] , we define the loss on the inverse depth

ẑ . = d-1

. This is a common representation in computer vision and robotics [42, 24] , which allows to naturally handle points and their uncertainty over a large range of depths. We use the L 1 loss on the inverse depth, averaged over the subset P of the pixels that have associated ground truth inverse depth z:

EQUATION

To encourage the local smoothness of the predicted depth maps, we add an L 1 regularization penalty on the gradient ∇ẑ = (∂ x ẑ, ∂ y ẑ) of the estimated inverse depth. Similarly to classic structure from motion methods and unsupervised depth learning literature [33] , we modulate this penalty according to the image gradients ∂I 1 , allowing depth discontinuities to be larger at points with large ∂I 1 :

EQUATION

with Ω representing the full image plane. The full training loss of our network is a weighted sum of these two terms L total = λ p L depth + λ s L smooth .

3.3. MODEL DETAILS:

In all our experiments the input images have resolution 256×192 pixels. Unless mentioned otherwise, ground truth depth is provided for a single pixel of each image, but we also experiment with denser ground-truth signals. We use a pre-trained PWC-Net [16] for optical flow estimation.

We use the Leaky ReLU non-linearity in all networks. The global module is implemented by a 5-layer convolutional encoder with the number of channels growing from 16 to 256, with stride 2 in the first 4 layers. The last 256-channel hidden layer is followed by a convolution with 6 channels and global average pooling, resulting in the 6-dimensional predicted global parameter vector g. The local module consists of a single linear perceptron which transforms g linearly to a 3.9K vector. Empirically, we did not find an advantage in utilizing a multi-layer non-linear perceptron in place of the linear operation. The resulting vector is split into three parts, which are reshaped into filter banks with kernel size 3 × 3 and number of output channels 20, 10, 20, respectively. These filter banks, with Leaky ReLUs in between, constitute the compact fully-convolutional depth estimation network C ϕ . The 20-channel network output is then processed by a single 3 × 3 convolutional layer to shrink the channels to 1. The design of this compact fully convolutional network has been inspired by the refinement layer used by previous works on supervised depth estimation [25, 7] .

Abs-Inv Abs-Rel S-RMSE Formula 1 |Ω| Ω 1 d -1 d 1 |Ω| Ω |d-d| d 1 |Ω| Ω E 2 log -1 |Ω| Ω E log 2

We train the model with the Adam optimizer [43] with an initial learning rate of 10 -4 for a total of approximately 94K iterations with a mini-batch size of 16. We apply data augmentation during training. Further details are provided in the supplement.

4. EXPERIMENTS:

We design our evaluation procedure to address the following questions: (i) Is the proposed globallocal architecture at advantage compared to standard deep convolutional networks when learning with sparse depth ground truth? (ii) What is the robustness of our approach to dynamically changing camera parameters? (iii) Do the learned global parameters contain information about the camera motion between the frames? (iv) How does the proposed method compare to a state-of-the-art unsupervised learned depth estimation method. Finally, we validate our design choices with ablation studies. Quantitative comparisons against classic structure from motion methods, as well as additional qualitative experiments, are provided in the supplementary material.

4.1. EXPERIMENTAL SETUP:

We test the approach on three datasets collected in cluttered indoor environments, either real or simulated. Scenes11 [25] is a large synthetic dataset with randomly generated scenes composed of objects from ShapeNet [44] against diverse backgrounds composed of simple geometric shapes. SUN3D [45] is a large collection of RGB-D indoor videos collected with a Kinect sensor. RGB-D SLAM [46] is another RGB-D dataset collected with Kinect in indoor spaces. For all datasets, we use the splits proposed by [25] . We discard all image pairs with larger relative rotation than 14 • per axis and larger relative translation than 1 meter per axis. In order to simulate range observations by the agent, we mask out all depth ground truth except for a single pixel (unless mentioned otherwise).

As commonly done in two-view depth estimation methods [25] and in structure-from-motion methods [47] , we resolve the inherent scale ambiguity by normalizing the depth values such that the norm of the translation vector between the two views is equal to 1. To quantitatively evaluate the generated depth maps, we adopt three standard error metrics summarized in Table 1 .

4.2. LEARNING FROM VERY SPARSE GROUND TRUTH:

We compare the proposed global-local architecture to strong generic deep models -the encoderdecoder architecture of Eigen et al. [6] , the popular fully convolutional architecture DispNet [48] , and the multi-scale encoder-decoder of Laina et al. (FCRN) [49] . Note that for a fair comparison with our method, we provide all the baselines with both the image pair and the optical flow field. We additionally tune the models to reach best performance on our task. The details of the tuning process are reported in Section 6.2.1 in the Appendix. We also compare to a reduced-sized DispNet [48] (Small Enc-Dec), that has a number of parameters similar to our model (including both the global and the local module). Its encoder consists of 4 convolutions with (16, 32, 54, 128) filters, with sizes of (7, 5, 3, 3), and stride 2. Its decoder is composed of 4 up-convolutions with (128, 64, 32, 16) filters of size 3 and stride 1. Encoder and decoder layers are connected through skip connections. Finally, we compare against Struct2Depth [9] , current state-of-the-art system for unsupervised depth estimation.

As shown in Table 2 , our approach outperforms all the baselines in the sparse supervision regime. Specifically, we outperform the architecture of Eigen et al. [6] on average by 53%, the architecture of Laina et al. [49] This is empirically demonstrated in Fig. 3 , where we plot the depth loss on training points as a function of the number of iterations. Decreasing the size of the architecture to address overfitting does not however solve the problem: the Small Enc-Dec, with number of parameters similar to our network, achieves poor results, mainly due to its limited capacity.

Our approach also achieves on average 24% better error than the unsupervised depth estimation baseline [9] over all datasets and metrics. Indeed, the considered datasets represent a challenge for geometry-based methods given the presence of large homogeneous regions, occlusions, and small baselines between views, which are typical factors encountered in indoor scenes. Noticeably, the performance of Struct2Depth on the SUN3D dataset is relatively good, boosted by the larger baseline between views and the abundance of features.

Fig. 4 analyzes the performance of our and the DispNet architectures (our strongest baseline) as a function of the number of observed ground-truth pixels per image. Unsurprisingly, both methods learn to predict accurate depth maps when dense annotations (D) are available. Decreasing the amount of supervision obviously leads to performance drops. However, for our method the error increases on average by only 5% when going to sparser supervision, compared to 12% for the baseline, which leads to a large advantage over the baseline in the single-pixel supervision regime. This shows that the global-local architecture provides an appropriate inductive bias for learning from extremely sparse depth ground-truth.

4.3. ROBUSTNESS TO DYNAMICALLY CHANGING CAMERA PARAMETERS:

In practical applications camera internal parameters, such as focal length, may change through time. Indeed, environmental changes like temperature, humidity and pressure could cause severe variations to their nominal value. Due to these variations, methods based on projective geometry, which are sensitive to the accuracy of calibration parameters, can experience large performance drops. Although the problem could be alleviated by automatic re-calibration, these changes would have to be detected in the first place and would require either collecting multiple views of an object [50, 51] or additional sensing [52] .

We empirically study the robustness of our method and the baselines to dynamically changing camera intrinsics. In particular, we randomly change, for each image pair, the horizontal and vertical focal lengths, as well as the center of projection, by up to 20% of their nominal value. The unsupervised depth estimation baseline suffers the most from the uncertainty in the camera intrinsics. Indeed, its estimation error increases on average by 26% with respect to the case in which camera parameters are correctly set. In contrast, as our approach does not explicitly rely on projective geometry, it does not exhibit such sensitivity to the camera parameters. Indeed, it experiences only a small decrease in performance, of approximately 5% with respect to the case where the intrinsics are fixed, since the learning problem becomes more challenging. 

4.4. GLOBAL PARAMETERS AND THE CAMERA MOTION:

According to the intuition behind our model, the global parameters should have information about the observer's ego-motion between the frames, and as such should be related to the actual metric camera motion. Here we study this relation empirically, by training a camera pose predictor on the output of our global module, in supervised fashion. Note that this is done for analysis purposes only, after our full model has been trained: at training time the model has no access to the ground truth camera poses. Specifically, we add a small two-layer MLP with 256 hidden units on top of the global module that is either pre-trained with our method or randomly initialized. We then either train the global module either randomly (Scratch) or as trained with our approach (Pretrained). We then append a small MLP and train supervised camera motion prediction by tuning either just the MLP (MLP) or the full network (Full). As a reference, we also report the performance of two classic approaches. We report rotation (rot) and translation (trans) errors in degrees (since the translation vector is normalized to 1, see § 4.1). Lower is better.

full network or only the appended small MLP to predict the camera motion in supervised fashion (details of the training process are provided in the supplement).

Results in Table 4 show that the global parameters indeed contain information about the camera pose.

In both training setups pre-trained network substantially outperforms the random initialization: 17% to 64% error reduction across datasets and metrics when only tuning the MLP and up to 11% error reduction when training the full system. Interestingly, our method is also competitive against classic state-of-the-art baselines for motion estimation [25] .

4.5. ABLATION STUDY:

Our architecture is based on several design choices that we now validate through an ablation study.

In particular, we ablate the following components: (i) the use of optical flow as an intermediate representation, (ii) the estimation of global variables to generate convolutional filters, (iii) the use of coordinate convolution in the fully convolutional network and (iv) the use of the image pair, in addition to optical flow, for the estimation of global parameters. The results in Table 5 show that all components are important and some have larger impact than others. The use of optical flow and coordinate convolution are crucial since they both provide essential cues for depth estimation. However, a basic encoderdecoder architecture (i.e. without global variables or coordinate convolutions) underperforms even when provided with optical flow. Unsurprisingly, the least important factor is providing the image pair to the global module, since, when camera parameters are fixed, the optical flow is a sufficient statistics of the observer's ego-motion.

5. CONCLUSION:

Motivated by the way natural agents learn to predict depth, we propose an approach for training a dense depth estimator from two unconstrained images given only very sparse supervision at training time and without the explicit use of geometry. We show that in cluttered indoor environments our global-local model outperforms state-of-the-art architectures for depth estimation by up to 20% in the sparse data regime.

SfM baselines proposed by Ummenhofer et al. [25] : one that computes correspondences between images by matching SIFT keypoints (SfM-SIFT) and another that uses optical flow instead [53] (SfM-Flow). Given the correspondences, the essential matrix is estimated with the normalized 8-point algorithm and RANSAC [3] , and further refined by minimizing the reprojection error with the ceres library. Finally, the depth maps are computed by plane sweep stereo and optimized with the variational approach of Hirshmueller et al. [47] .

Results in Table 6 show that our approach achieves on average 63% better error than SfM-SIFT and 43% better error than SfM-Flow over all datasets and metrics. Indeed, the considered datasets represent a challenge for geometry-based methods given the presence of large homogeneous regions, occlusions, and small baselines between views, which are typical factors encountered in indoor scenes.

In addition, geometry-based methods are known to be subject to correspondence errors, which the aforementioned factors generally worsen. Nonetheless, our method remains competitive against the geometry-based techniques, outperforming them on two out of three metrics. Furthermore, as we show in the next section, our method is much more robust to errors in the optical flow estimates than classic triangulation. 

6.4. EXPERIMENTS WITH GROUND TRUTH:

The main intuition driving the design of our architecture consists of the fact that the relative pose between two images control the conversion of correspondences to depth. Since depth can be computed analytically given the correspondences (in non-degenerate cases), can also our model learn this relation when correspondences are perfect or the relative pose between cameras is given? How does it compare to the triangulation equations in term of performance and ability to handle false correspondences?

To answer these questions, we trained our network with either perfect flow or given pose. As baselines, we used both the simple triangulation equation and the SfM-pipeline presented in Sec. 4.3, but provided with ground-truth camera motion. In addition, we also compare our approach to linear triangulation with the pose predicted by our global parameter network after supervised refinement on ground-truth poses (see Sec. 4.4). The results of this analysis are reported in Table 7 . Performances on Scenes11 show that, when the optical flow generated by PWCNet are very precise, naive triangulation performs very competitively, even outperforming the more complex SfM method.

Our network perform comparably to this baseline, showing indeed its ability to learn the mathematical relation between flow and depth. However, triangulation is very sensitive to its inputs: when the precision of the extrinsic parameters or of the correspondences decreases, its performance drastically drops. This can be observed from the results on the SUN3D and RGB-D datasets (Table 7 ), where the optical flow generated from PWCNet is significantly worse than the one on Scenes11. In contrast, as we show in Fig. 5 , our network can cope against these inaccuracies, outperforming triangulation in the real datasets. However, our approach is still not competitive with the SfM pipeline with given extrinsic parameters on the SUN3D and RGB-D datasets: this is an indicator of the difficulty coming from estimating good global and local parameters when both training flows and depths are noisy, but not of our network ability to learn the relationship between these two modalities. Indeed, when the network is provided with perfect correspondences, performance generally increases.

6.5. FINE-TUNING OPTICAL FLOW:

For all our experiments above, we have always assumed a pre-computed optical flow field is provided as input. This optical flow, generated by the off-the-shelf PWCNet architecture [16] , was fixed throughout training. In this section, we study the case when also the parameters of PwCNet are fine-tuned during training with the sparse depth loss. Table 8 shows the results of this evaluation. Interestingly, finetuning the parameters of PWCNet performs worse than fixing them. Such finding can be explained by the fact that the sparse depth loss is not sufficient to train the large number of PWCNet parameters. Indeed, we noticed a decrease in the training error of approximately 10%, indicating an over-fitting to the observed training points. As an additional baseline, we add to PWCNet a small convolutional head to convert flow to depth and train everything with the sparse depth loss. The convolutional head consists of three convolution with (32,16,1) number of filters, stride 1 and filter size 3. The result of this approach, presented in the first row of Table 8 , confirms that the sparse loss does not provide enough feedback to fine-tune correspondences. (*) Indicates that a small convolutional head has been added to the PWCNet architecture.

6.6. QUALITATIVE RESULTS:

We show more qualitative results of depth estimation on the test set of our evaluation datasets in Fig. 6 , Fig. 7 and Fig. 8 . Despite being trained with very sparse supervision, our approach learns to predict smooth depth maps with sharp edges, comparable to the ones an encoder-decoder architecture learns with dense supervision. In contrast, an encoder-decoder architecture fails to learn smooth depths when trained with sparse supervision.

Fig. 9 shows some of the filters produced by the local network to convert optical flow into depth. Since converting flow to depth depends on the relative transformation between the two views, those filters are input-dependent. Generally, filters are different for each image pair. However, when the relative transformation between the input views is similar, filters also tend to be similar (first and second row of Fig. 9 ). In contrast, when the relative transformation between views is completely different, filters tend to acquire a dissimilar pattern (first and third row of Fig. 9 ). 

Image GT Depth:

Struct2Depth DispNet Ours

:



Figures and Tables:

Figure 1: Global-local model architecture. An image pair and an estimated flow field are first fed through the global module that estimates the "global parameters" vector g, representing the camera motion. From these global parameters, the local module generates three convolutional filter banks and applies them to the optical flow field. The output of the local module is then processed by a convolution to generate the final depth estimate.

Figure 4: Depth estimation errors with increasing number of training pixels per image and dense supervision (D). When supervision gets sparser, our method's performance degrades more gracefully than the baseline.

Figure 5: Relation between per pixel flow and depth error for our method and triangulation, either with perfect pose (GT Pose) or with the pose provided by our fine-tuned global network (see Sec. 4.4). Our approach learns to filter out errors in correspondences by exploiting its receptive field larger than one and regularities of those errors in the data.

Figure 6: Qualitative results on the simulated Scenes11 dataset. Given the availability of noise-free depth maps for training and high quality optical flow, our approach can learn extremely sharp depth maps, comparable to the ones learned by an encoder-decoder with dense supervision. Image GT Depth Struct2Depth DispNet Ours

Metrics for quantitative evaluation of depth accuracy. d is the ground truth depth, d is the prediction.

Table content: <table><tr><td>For convenience we denote E log</td><td>. = log(d/ d) = log d -log d. For all metrics, lower is better.</td></tr></table>

In the sparse training regime, our method can efficiently learn to predict depth from single point

Table content: <table><tr><td colspan="2">supervision, outperforming significantly both standard architectures and unsupervised depth estimation systems.</td></tr><tr><td>For all error metrics, lower is better.</td><td/></tr><tr><td colspan="2">over-parametrization, these baselines tend to overfit to the training points, failing to generalize to</td></tr><tr><td>unobserved images and locations.</td><td/></tr><tr><td/><td>Abs-Inv on Scenes11</td></tr><tr><td>0.05</td><td/></tr><tr><td>0.04</td><td/></tr><tr><td>0.03</td><td/></tr><tr><td>0.02</td><td/></tr><tr><td/><td>Eigen</td></tr><tr><td>0.01</td><td>DispNet</td></tr><tr><td/><td>Ours</td></tr><tr><td/><td>20k 40k 60k 80k</td></tr><tr><td colspan="2">Figure 3: For large networks, the loss</td></tr><tr><td colspan="2">on training points (solid lines) is signif-</td></tr><tr><td colspan="2">icantly higher than the validation loss</td></tr><tr><td colspan="2">(dashed lines). In contrast, our global-</td></tr><tr><td colspan="2">local architecture learns generalizible</td></tr><tr><td colspan="2">representations.</td></tr></table>

Depth estimation errors with camera intrinsics varying up to 20% of their nominal value between views. Based on projective geometry, unsupervised methods suffer the most from parameter uncertainty.

Table content: <table/>

Estimation of camera motion based on the global parameters estimated by our model. We initialize the

Table content: <table><tr><td/><td colspan="2">Scenes11</td><td>SUN3D</td><td colspan="2">RGB-D</td></tr><tr><td>Method</td><td colspan="2">rot trans</td><td>rot trans</td><td>rot</td><td>trans</td></tr><tr><td>Scratch-MLP</td><td colspan="2">1.3 74.4</td><td>3.6 55.5</td><td>5.3</td><td>78.4</td></tr><tr><td>Pretrained-MLP</td><td colspan="2">0.9 26.7</td><td>2.7 32.5</td><td>4.4</td><td>51.5</td></tr><tr><td>Scratch-Full</td><td colspan="2">0.7 10.3</td><td>1.8 25.0</td><td>3.2</td><td>30.5</td></tr><tr><td>Pretrained-Full</td><td>0.7</td><td>9.2</td><td>1.7 22.4</td><td>3.2</td><td>28.7</td></tr><tr><td>KLT Matlab [25]</td><td colspan="2">0.9 14.6</td><td>5.9 32.3</td><td colspan="2">12.8 49.6</td></tr><tr><td>8-point FlowFields [25]</td><td colspan="2">1.3 19.4</td><td>3.7 33.3</td><td>4.7</td><td>46.1</td></tr></table>

Ablation study on the Scenes11 dataset.

Table content: <table><tr><td/><td colspan="3">Abs-Inv Abs-Rel S-RMSE</td></tr><tr><td>Full Model</td><td>0.033</td><td>0.43</td><td>0.61</td></tr><tr><td>-Image Pair</td><td>0.033</td><td>0.45</td><td>0.62</td></tr><tr><td>-CoordConv</td><td>0.038</td><td>0.52</td><td>0.71</td></tr><tr><td>-Glob. Mod.</td><td>0.041</td><td>0.55</td><td>0.73</td></tr><tr><td>-Flow</td><td>0.052</td><td>0.73</td><td>0.81</td></tr></table>

Comparison to Structure from Motion (SfM) baselines. Our approach outperforms SfM methods on all datasets and metrics, except for two. This shows that learning from sparse supervision can be competitive with classic geometry-based techniques.

Table content: <table/>

Comparison of our approach with different input modalities to triangulation with perfect pose,

Table content: <table><tr><td>Scenes11</td><td>SUN3D</td><td>RGB-D</td></tr><tr><td>Per-Pixel Abs-Inv Depth Error</td><td/><td/></tr><tr><td/><td>Normalized Flow Error</td><td/></tr></table>

Fine-tuning the parameters of PWCNet with a very sparse depth loss performs worse than fixing them.

Table content: <table/>

Peer review (iclr2020):
This paper presents a method for learning to predict a depth map given a pair of images. Training is done is an unsupervised way except for a small set of image locations for which the absolute 3D locations are known. The optical flow between the 2 images is computed automatically. A network is trained to predict the camera motion between the 2 images from the images and the optical flow. From this global motion, convolutional filters are predicted, in order to transform the optical flow into a depth map. The use of image locations with known 3D locations is motivated in the paper to *simulate* the knowledge of depth coming from a haptic system. I have several concerns about this paper. * My main concern is that the paper compares against only a few papers (1 from 2014, 1 from 2016, and one more recent from 2019) while the literature is extremely vast, and visually, the results seem far from the state-of-the art. See for example: Huangying Zhan, Ravi Garg, Chamara Saroj Weerasekera, Kejie Li, Harsh Agarwal, and Ian Reid. Unsupervised learning of monocular depth estimation and visual odometry with deep feature reconstruction. In CVPR, 2018. Anurag Ranjan, Varun Jampani, Kihwan Kim, Deqing Sun, Jonas Wulff, and Michael J Black. Competitive collaboration: Joint unsupervised learning of depth, camera motion, optical flow and motion segmentation. In CVPR, 2019. Chaoyang Wang, Jose Miguel Buenaposada, Rui Zhu, and Simon Lucey. Learning depth from monocular videos using direct methods. In CVPR, 2018. In fact, these papers have simpler requirements as they do not need 2 images at run-time, nor 3d data at training time. I thought for a moment that the advantage of the paper was to be able to predict an absolute motion and an absolute depth (this is not impossible if the method is able to estimate the scale from known objects, as it is suggested from the introduction). This was however incorrect as the text says in the middle of Section 4.1 * we resolve the inherent scale ambiguity by normalizing the depth values such that the norm of the translation vector between the two views is equal to 1*. * The network used to predict optical flow was trained with a large amount of supervised data. As image matching is the most difficult task, it is difficult to claim that the method is unsupervised. * The motivation for having sparse measurements is to *simulate* haptic. This is fine for me in principle, however haptic measurements would probably have large errors, while it seems that the experiments use ground truth values for these points. One minor remark: End of Section 4.4: What is a *179% error reduction*? How is computed the percentage?