G LOBAL -L OCAL N ETWORK FOR L EARNING D EPTH WITH V ERY S PARSE S UPERVISION
Anonymous authors
Paper under double-blind review
A BSTRACT
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 artiﬁcial 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 ﬁnd that the global parameters extracted by the network are predictive of the metric agent motion.
I NTRODUCTION
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 artiﬁcial 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 ﬂow as an input to the depth estimation system.
Optical ﬂow 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 rangeﬁnder 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 ﬂow 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 ﬂow ﬁeld to produce the ﬁnal 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 ﬁeld 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 unspeciﬁed 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.
R ELATED W ORK
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 ﬁrst ﬁnd 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
[Figure]
O p t i c a l f l o w e
s
t
i m a t i on
[Figure]
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.
M ETHODOLOGY
Given two monocular RGB images I 1 , I 2 , with unknown camera parameters and relative pose, as well as the optical ﬂow w between them, we aim to estimate a dense depth map corresponding to the ﬁrst image.
We assume to have an artiﬁcial 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. M ODEL 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 ﬂow (dense point correspondences)
w between them.
In this work, we estimate the ﬂow ﬁeld with an off-the-shelf optical ﬂow 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 ﬂow ﬁeld.
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 overﬁtting.
The local module is very compact and operates on a transferable representation – optical ﬂow.
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 overﬁtting.
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 ﬂow alone is in principle sufﬁcient 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 ﬂow ﬁeld.
First, the global parameter vector is processed by a linear perceptron that outputs several convolutional ﬁlters banks, collectively denoted by ϕ =
LP ( g ) .
Then, these ﬁlter banks are stacked into a small fully convolutional network C ϕ that is applied to the optical ﬂow ﬁeld.
We append two channels of x - and y - image coordinates to the input w of C ϕ , as in CoordConv [41].
The output of
C ϕ is the ﬁnal 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 sufﬁcient 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 ﬁeld 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 ﬂow input.
3. L OSS FUNCTION
Similarly to previous work [25, 7], we deﬁne the loss on the inverse depth ˆ z .
=
ˆ 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 ∇ ˆ z
=
( ∂ x ˆ z , ∂ y ˆ z ) 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. M ODEL 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 ﬂow 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 ﬁrst 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 .
9 K vector.
Empirically, we did not ﬁnd 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 ﬁlter banks with kernel size 3 × 3 and number of output channels 20, 10, 20, respectively.
These ﬁlter banks, with Leaky ReLUs in between, constitute the compact fully-convolutional depth estimation network
[Table]
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 reﬁnement layer used by previous works on supervised depth estimation [25, 7].
We train the model with the Adam optimizer [43] with an initial learning rate of 10 − 4 for a total of approximately 94 K iterations with a mini-batch size of 16 .
We apply data augmentation during training.
Further details are provided in the supplement.
E XPERIMENTS
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. E XPERIMENTAL 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. L EARNING 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 ﬂow ﬁeld. 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) ﬁlters, with sizes of (7 , 5 , 3 , 3) , and stride 2 .
Its decoder is composed of 4 up-convolutions with (128 , 64 , 32 , 16) ﬁlters 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.
Speciﬁcally, we outperform the architecture of Eigen et al.
[6] on average by 53% , the architecture of Laina et al. [49] by 22 . 5% , and the fully convolutional DispNet by 20% .
Indeed, due to
Image
GT Depth
Struct2Depth
DispNet
Ours
S ce n e s
S U N 3 D
R G B - D
[Table]
over-parametrization, these baselines tend to overﬁt to the training points, failing to generalize to unobserved images and locations.
[Figure]
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 overﬁtting 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.
[Figure]
[Figure]
Abs-Inv 0 .0 .0 .
Abs-Rel 0 .0 .0 .
S-RMSE
[Figure] [Figure]
[Figure] [Figure]
[Figure] [Figure]
DispNet
[Figure]
This shows that the global-local architecture provides an appropriate inductive bias for learning from extremely sparse depth ground-truth.
4. R OBUSTNESS TO D YNAMICALLY C HANGING C AMERA P ARAMETERS
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 ﬁrst 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 ﬁxed, since the learning problem becomes more challenging.
[Table]
4. G LOBAL 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.
Speciﬁcally, 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
[Table]
network or only the appended small to the
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. A BLATION 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 ﬂow as an intermediate representation, (ii) the estimation of global variables to generate convolutional ﬁlters, (iii) the use of coordinate convolution in the fully convolutional network and (iv) the use of the image pair, in addition to optical ﬂow, for the estimation of global parameters.
[Table]
The results in Table 5 show that all components are important and some have larger impact than others.
The use of optical ﬂow 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 ﬂow.
Unsurprisingly, the least important factor is providing the image pair to the global module, since, when camera parameters are ﬁxed, the optical ﬂow is a sufﬁcient statistics of the observer’s ego-motion.
C ONCLUSION
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.
We see several potential ways for further improving the performance of our approach.
The method suffers from outliers in the ﬂow ﬁeld or when the baseline between views is very small (see Appendix for detailed evaluation).
The former problem could be solved by learning depth estimation not only from the sparse ground truth, but also from the photometric reprojection error.
This raises the question of how to make use of photometric error without explicit geometric equations.
The problem of small baselines could be alleviated by exploiting monocular cues.
We see these directions as exciting avenues for future work.
A PPENDIX 6. C ONNECTION WITH T WO -V IEW T RIANGULATION
The problem of triangulation consists of computing the 3D coordinates of a point given its (noisy) projections on two or more views and the camera parameters of the views.
Hence, it is a geometric problem.
Following the usual formalism of homogeneous coordinates [3], the perspective projection of a 3D point M on two cameras with projection matrices P 1 , P 2 (comprising the intrinsic and extrinsic parameters of both views) is given by λ 1 m 1 = P 1 M and λ 2 m 2 =
P 2 M , where λ 1 , λ 2 are the projective scaling factors.
Given P 1 , P 2 , m 1 , m 2 , the linear triangulation algorithm [3, Sec.12.2], which tackles the triangulation problem in its most general setting (projective cameras), computes the 3D point M by minimizing the Rayleigh quotient (cid:107)
[Equation]
(cid:107) / (cid:107) M (cid:107) , where A is the matrix
[Equation]
and [ u ] × is the cross product matrix (such that [ u ] × v = u
× v , for all v ).
In case of multiple point correspondences { m i 1 ↔ m i 2 } for i = 1 , . .
, N , the camera matrices P 1 , Pappear in the triangulation equations (3) of all of them, and hence, are “global” variables.
If the camera matrices are known, then (i) every 3D point M i can be triangulated independently from the rest, and (ii) the triangulated point is a function of the point correspondences m i 1 ↔ m i 2 . M i [Equation] f (
[Equation]
i
[Equation]
m
[Equation]
P
[Equation] P [Equation] This intuition inspired the design of our modular architecture:
First, a neural network regresses global variables which depend only on the two views, and then those global variables are used by a local module to generate a fully-convolutional net which transforms point correspondences (optical ﬂow) into depth.
6. T RAINING P ROCESS
We train our model from scratch on the Scenes11 dataset for approximately 150 K steps using Adam as optimizer with an initial learning rate of 1 e − 4 .
We normalize all losses with the number of points used to compute them.
The loss weights for depth and smoothness λ p , λ s are 5.0 and 2.0 respectively.
To increase generalization, we perform data augmentation at training time by mirroring pairs on the x -axis and rotating them 180 degrees, both 50% probability.
For a fair comparison, we trained all baselines with exactly the same strategy and hyper-parameters on a desktop PC equipped with an
NVIDIA-GeForce 940MX.
For the pose experiments in Sec. 4.4, we trained a 2 hidden layer MLP with 20 nodes and leaky ReLU activation function to predict relative camera motion between frames from the global parameters estimated by our global network.
For all datasets and all variations, we trained with an L 1 loss between estimated and real camera poses for 50 K steps.
6.2. T UNING OF B ASELINES
To fairly study the sparse training setting, we tuned the baseline to reach the best performance on the sparse training task. First, we changed the input layer of each baseline architecture. Exactly as for ours, the baselines’ input consists of the concatenation of the image pair and the optical ﬂow on the last channel.
Given the very sparse supervision signal, we noticed that the ReLu activation function generated extremely sparse and noisy gradients.
Therefore, we modiﬁed the original activation function of DispNet [48], FCRN [49] and Eigen [6] from ReLu to LeakyRelu.
This change improved the performance of the baselines of up to 50% on average over metrics.
6. C OMPARISON WITH STRUCTURE FROM MOTION METHODS
Dense Structure from Motion (SfM) methods [24, 23] can recover the depth map of a scene from two or more views using projective geometry [3].
We now compare our global-local architecture to two
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 ﬂow instead [53] (SfM-Flow).
Given the correspondences, the essential matrix is estimated with the normalized 8-point algorithm and RANSAC [3], and further reﬁned 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.
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 ﬂow estimates than classic triangulation.
[Table]
6. E XPERIMENTS 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
[Table]
we trained our network with either perfect ﬂow or given pose.
As baselines
[Table]
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 reﬁnement on ground-truth poses (see Sec. 4.4).
The results of this analysis are reported in Table
[Table]
Scenes
[Figure]
P e
r- P i x
e l A b s -I nv
D e p t h
E rr o r
[Figure]
Performances on Scenes11 show that, when the optical ﬂow 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 ﬂow 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 ﬂow generated from PWCNet is signiﬁcantly 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 difﬁculty coming from estimating good global and local parameters when both training ﬂows 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. F INE - TUNING O PTICAL F LOW
For all our experiments above, we have always assumed a pre-computed optical ﬂow ﬁeld is provided as input.
This optical ﬂow, generated by the off-the-shelf PWCNet architecture [16], was ﬁxed throughout training.
In this section, we study the case when also the parameters of PwCNet are ﬁne-tuned during training with the sparse depth loss.
Table 8 shows the results of this evaluation.
Interestingly, ﬁnetuning the parameters of PWCNet performs worse than ﬁxing them.
Such ﬁnding can be explained by the fact that the sparse depth loss is not sufﬁcient to train the large number of
PWCNet parameters.
Indeed, we noticed a decrease in the training error of approximately 10% , indicating an over-ﬁtting to the observed training points.
As an additional baseline, we add to
PWCNet a small convolutional head to convert ﬂow to depth and train everything with the sparse depth loss.
The convolutional head consists of three convolution with (32,16,1) number of ﬁlters, stride 1 and ﬁlter size 3.
The result of this approach, presented in the ﬁrst row of Table 8, conﬁrms that the sparse loss does not provide enough feedback to ﬁne-tune correspondences
[Table]
6. Q UALITATIVE R ESULTS
We show more qualitative results of depth estimation on the test set of our evaluation datasets in
Fig.
6, Fig.
7 and Fig.
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 ﬁlters produced by the local network to convert optical ﬂow into depth. Since converting ﬂow to depth depends on the relative transformation between the two views, those ﬁlters are input-dependent. Generally, ﬁlters are different for each image pair. However, when the relative transformation between the input views is similar, ﬁlters also tend to be similar (ﬁrst and second row of Fig. 9).
In contrast, when the relative transformation between views is completely different, ﬁlters tend to acquire a dissimilar pattern (ﬁrst and third row of Fig. 9).
[Figure] [Figure] [Figure] [Figure]