Hinted Networks

12/15/2018 ∙ by Joel Lamy-Poirier, et al. ∙ Element AI Inc 0

We present Hinted Networks: a collection of architectural transformations for improving the accuracies of neural network models for regression tasks, through the injection of a prior for the output prediction (i.e. a hint). We ground our investigations within the camera relocalization domain, and propose two variants, namely the Hinted Embedding and Hinted Residual networks, both applied to the PoseNet base model for regressing camera pose from an image. Our evaluations show practical improvements in localization accuracy for standard outdoor and indoor localization datasets, without using additional information. We further assess the range of accuracy gains within an aerial-view localization setup, simulated across vast areas at different times of the year.



There are no comments yet.


page 8

page 9

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

I Introduction

This work targets supervised regression problems, where the aim is to use one source of data as input to correlate and predict a different kind of information as output. The basic statistical approach to regression, i.e. maximum-likelihood estimation, assumes sufficient smoothness of the input-output mapping, meaning that nearby inputs lead to nearby outputs. In practical scenarios however, this assumption is often violated, as the mapping to be learned may vary wildly within a small input region, or even be multi-valued

111These types of non-desired function mappings commonly arise in practice. Notably, learning the inverse of a smooth mapping can be challenging as it may not be injective in general. The camera relocalization problem considered in the present work belongs to this class, as it corresponds to the inverse of the smooth pose-to-image mapping.. In such scenarios, statistical regression fails at accurately predicting a single output value, and instead returns an average over all possible output hypotheses seen during training. While this “mode averaging” trait is acceptable in some cases, in other applications a different “mode seeking” behavior is preferred, which pinpoints one (or ideally all) of the modes of the output hypotheses.

Consider for instance the “camera relocalization” task, for which the goal is to determine the position and orientation of a camera device given an acquired camera frame. This task can be formulated as supervised regression, however there are no general guarantees of smoothness or bijectivity concerning the image-pose mapping. In fact, an environment might well contain visually-similar landmarks, yet their images with similar appearances could map to drastically different poses. In this case a mode-averaged prediction would localize to somewhere between the similar landmarks, which generally would not be an useful piece of information.

As an extreme example, consider a camera observing a 1-D world with two identical hills. Given an image of a single hill, there is insufficient information to disambiguate which of the two landmarks the camera is facing, and the task itself is ill-defined. Moreover, a maximum-likelihood model trained only on single-hill images of both landmarks would predict the pose to be in between the two hills, thus exhibiting “mode averaging” behavior, as illustrated in Figure 1(b).

However, we can still extract useful information from the image by reformulating the problem. For example, we can aim to predict a set of possible positions. Alternatively, given a sufficiently strong prior of the camera’s position, we may be able to resolve the ambiguity. Or, even with any prior information, we can at least predict its most likely pose. This work aims to realize the last approach.

(a) Maximum Likelihood
(b) Hinted Regression
Fig. 1: Camera relocalization for a multi-modal scenario: given an ambiguous image, LABEL: maximum-likelihood regression will return the average over multiple valid pose hypotheses (i.e. mode averaging), while LABEL: conditioned by even a coarse and noisy hint, our proposed hinted regression models can seek onto a single hypothesis (i.e. mode seeking).

For the two-hills toy instance, if we have a rough estimate of the camera’s position, then we can naturally assume it to be more likely to face the hill closest to this estimate. By changing the regression goal to predict the most likely position given the estimate, the image-to-pose mapping will then be deterministically well-defined, with a sole exception when the hint is at the exact center of the two hills. Importantly, even if the estimate is completely random, this model will still produce a correct answer half the time, which might be qualitatively favorable compared to statistical regression being always “half-wrong”.

More generally, the Hinted Networks transformation reformulates a statistical regression task into a different learning problem with the same inputs and outputs, albeit with an added “hint” at the input that provides an estimate for the output. While this reformulation works best when a prior exists, our key finding is that Hinted Networks are useful even in the absence of informed priors or auxiliary information. In this work, we present a training procedure that uses synthetically-generated hints at training time, and uninformed hints at query time to improve regression performance.

We devise two strategies for using the hint: “Hinted Embedding”, which uses the hint as a conditioning prior to resolve ambiguities in the input data, and “Hinted Residual”, which builds upon Hinted Embedding by converting the learning task from absolute-value into residual regression. A key motivation and benefit of Hinted Networks is their “mode seeking” behaviors. Also, since the hint and output have the same representation, this feed-forward model can be improved through iterative refinement, by recurrently feeding predictions as successive hints to refine accuracy.

Our investigations of Hinted Networks are grounded in camera relocalization tasks. Such ability to localize camera images is invaluable for diverse applications, for example replacing Global Positioning System (GPS) and Inertial Navigation System (INS), providing spatial reference for Augmented Reality experiences, and helping robots and vehicles self-localize. In these setups, often there are auxiliary data sources that can help with localization, such as GPS and other sensors, as well as temporal odometry priors. Hinted Networks are motivated by the use of auxiliary sources as informative hints to facilitate general regression problems.

Hinted Networks build upon several well-established concepts in machine learning. For instance, Hinted Embedding networks apply the hint as a conditioning variable, which is analogous to the use of prior in Bayesian inference 

[1]. Nevertheless, our formulation can be seen as a “poor-man’s”

alternative to Maximum A Posteriori or full Bayesian inference, as we sacrifice the advantages of learning a probabilistic distribution in favor of a simpler deterministic mapping. Additionally, residual connections such as the ones used in Hinted Residual networks have been shown to often improve training speed and accuracy 


. Finally, our use of recurrent inference is structurally similar to plain Recurrent Neural Networks (RNN) 

[3], although it fulfills a different purpose of iterative refinement.

Our main contribution is to demonstrate improved prediction accuracies for terrestrial localization tasks using Hinted Networks. In particular, we use uninformed hints at query time to fairly compare against an appearance-only baseline method, PoseNet [4, 5]. We also explore the benefits of Hinted Networks for aerial-view localization tasks within simulated large-scale environments, with emphasis on repeated patterns, seasonal variations and high-density training samples. Notably, we find Hinted Networks to significantly outperform PoseNet for this task.

Ii Related Work

Hinted Networks seek to improve regression performance when using uninformed hints during inference, which are sampled from random noise. Depeweg et al. [6]

also employed a stochastic conditioning input within a Bayesian Neural Network to enhance dynamics modeling and avoid mode averaging for model-based reinforcement learning tasks. Separately, Hinted Networks refine hints (by combining with input data) into less noisy target predictions, which is similar to Denoising Autoencoders 

[7]. Finally, the combination of residual and recurrent connections has also been explored for improving the accuracy of sequence classification tasks [8, 9].

Ii-a Camera Relocalization

The ability to predict the position and orientation of a camera image has many applications in Augmented Reality and mobile robotics, and especially complements Visual Odometry (VO) and Simultaneous Localization and Mapping (SLAM) systems by (re-)initializing pose when tracking fails. A survey of solutions for camera relocalization, which is synonymous to visual-based localization, image localization, etc., is provided in [10]. Similar methods have also been applied to the related task of visual place recognition [11], in which metric localization can be used as a means towards semantic landmark association.

An effective family of localization methods [12, 13] work by matching appearance-based image content with geometric structures from a 3-D environment model. Such models are typically built off-line using Structure from Motion (SfM) and visual SLAM tools (e.g. [14, 15, 16]). Given a query image, point features (e.g. SIFT [17]) corresponding to salient visual landmarks are extracted and matched with the 3-D model, in order to triangulate the resulting pose. While these methods can produce extremely accurate pose estimates, building and maintaining their 3-D environment models is very costly in resources, and this structure-based approach also tends to not generalize well at scale and under appearance changes.

In contrast, PoseNet [4]

is an appearance-only approach for camera relocalization, constituting of a Convolutional Neural Network (CNN)

“backbone”, and separate regressors for predicting position and orientation. While the original PoseNet’s training loss used a hand-tuned to balance the different scales for position and orientation, a follow-up work [5] replaced with weights that learned the homoscedastic uncertainties for both sources of errors.

Recent work has aimed to address fundamental limitations of PoseNet’s appearance-only approach by adding temporal and geometric knowledge. MapNet [18] incorporated geometry into the training loss by learning a Siamese PoseNet pair for localizing consecutive frames. The MapNet+ extension added relative pose estimates from unlabeled video sequences and other sensors into the training loss, while MapNet+PGO further enforced global pose consistency over a sliding window of recent query frames. Laskar et al. [19] also learned a Siamese CNN backbone to regress relative pose between image pairs, but then used a memory-based approach for triangulating the query pose from visually similar training samples. Finally, VLocNet [20] added an auxiliary odometry network onto PoseNet to jointly regress per-frame absolute pose and consecutive-pair relative pose, while the follow-up VLocNet++ [21] further learns semantic segmentation as an auxiliary task. By sharing CNN backbone weights at early layers, joint learning of absolute pose, relative pose, and auxiliary tasks led to significantly improved predictions, and even surpassing the performance of 3-D structure-based localization in some cases.

(a) Feed-forward base model
(b) Hinted Embedding model
(c) Hinted Residual model
Fig. 2: Layout of network architectures for regression (e.g. camera relocalization) tasks.

In contrast to these localization-specific model advances, Hinted Networks represent a weaker yet task-independent way of enhancing appearance-only regression using temporal/geometric information via hints. We also stress that while the above methods require additional information to make predictions, Hinted Networks do not.

Other advances have facilitated model training through data augmentation. SPP-Net [22] combined a 3-D structure approach with PoseNet by processing a sampled grid of SIFT features through a CNN backbone and pose prediction layers. While this architecture resulted only in comparable performance to PoseNet, notable gains were achieved by training on extra poses, which were synthesized from a 3-D SIFT point-cloud model. More directly, Jia et al. [23] showed improved accuracy by importing a dense SfM environment model into a graphics engine and then training PoseNet on densely-sampled synthesized scenes. We will assess the effects of dense sampling in its limit within an aerial-view localization setup by using an online synthetic data generator.

Iii Hinted Networks

Hinted Networks are a set of transformations for neural network regression models aimed at simplifying the target prediction task by providing hints of the output values. While some domains offer natural sources of auxiliary information that can be used as informed hints, such as using GPS for camera relocalization tasks, we will importantly demonstrate that Hinted Networks can improve prediction accuracy over base models without relying on extra data sources at inference time, through the use of uninformed hints.

Iii-a Hinted Architectures

Many neural networks can be seen as having two parts, as shown in Figure 2(a): one sub-model compresses input data into a set of extracted features (a.k.a. an “embedding”), and then a second sub-model processes features to predict the target value. This factorized structure allows the transfer and reuse of pre-trained feature extractors between tasks [24], which reduces convergence time and allows training with small datasets (e.g. [4]).

Given a regression task, assume for now that a coarse estimate of the ground-truth target is available, then it can be used as supplementary knowledge to help with prediction. Following the embedding/prediction factorized view above, this prior knowledge can be injected by concatenating the estimate, or “hint”, with the feature embedding. This “Hinted Embedding” model is shown in Figure 2(b). Note that the target prediction sub-network requires at least two non-linear layers for the hint and embedding to be mixed sufficiently.

In addition to conditioning the input embedding, we can also add the hint to the output of the target prediction sub-model, as shown in Figure 2(c). This “Hinted Residual” model transforms the problem from absolute-value regression into residual regression. For image classification tasks, such residual connections have been shown to optimize faster and yield superior accuracy [2]. Especially for camera relocalization, the Hinted Residual model no longer needs to learn to predict absolute pose based on an image, but merely a direction and distance to move towards the target pose.

Iii-B Training and Inference

When training a Hinted Network, we sample informed hints by applying Gaussian noise around the ground truth value of each data sample. During inference however, we assume no auxiliary information is available, and thus sample uninformed hints

from an uniform distribution within (estimated) bounds of the environment. While this may appear counterproductive for simple setups like the two-hills scenario in Figure 

1, our experiments demonstrate that uninformed hints, despite providing much coarser pose estimates than seen during training, help to improve localization accuracy for real-world datasets compared to the PoseNet base model.

Additionally, since the hint and output share the same representation, we can actually feed the predictions back to the network as subsequent hints recurrently. Such iterative refinement simplifies the regression task by allowing the model to successively improve prediction accuracies, even when the initial hint is very far from the target. Also, this process is computationally inexpensive, since the feature embedding, whose computation tends to make up the bulk of the workload, can be reused between iterations.

Contrary to RNNs that rely on recurrent training, in this work we apply recurrent hint connections only at inference time, after the model has been trained. A benefit of non-recurrent training is to reduce overfitting by preventing potentially harmful interactions between successive iterations. Additionally, the non-recurrently-trained network observes evenly-spread distributions of priors, in contrast to series of correlated priors observed with an unrolled compute graph.

As a practical consideration, the scale of the noise should be tuned with a bit of care in order to attain optimal inference-time localization accuracy. As extreme cases of failures, if the training hints are too close to the ground truth, the network may choose to output the hint directly and bypass the image-to-pose regression path. On the other hand, if hints are too far away, then the network will not be able to use them efficiently to help disambiguate challenging image-to-pose mapping instances.

Iii-C Exploration of Alternative Formulations

As a consequence of our choice of training hint distribution, uninformed hints during inference will likely provide hints much further away from the target than seen during training. Nevertheless, we observed that Hinted Networks were able to generalize. This is for the most part due to recurrent connections, as the networks only need to output a rough pose estimate in the first few iterations. Also, while we experimented with using a heavier-tailed Student’s -distribution for sampling uninformed hints at inference time, it did not seem to affect the model’s performance.

To justify our choice of non-recurrent training, we investigated also training -step unrolled networks. These exploratory results showed longer training times and larger memory footprints, with inferior

prediction performances. We attribute this to the fact that the regression tasks across different iterations share an identical nature: notwithstanding the accuracy of the pose hint provided, the model receives the same input frame and must predict the same output pose using the same loss function. In other words, even though there can be some benefits to back-propagating between iterations, for the forward pass the only information transmitted between iterations is the pose prediction itself. Thus at inference time the network is fundamentally symmetric between iterations. Unless that symmetry is removed, e.g. with the transmission of additional variables together with the pose, there can only be minimal benefit to recurrent training.

We further experimented with an interesting use of Hinted Networks: passing through multiple independent uniformed hints to predict a distribution of output predictions. While this is functionally similar to Bayesian Neural Networks [25, 26], we found that the resulting distribution after multiple iterations collapsed to a small, discrete set of points. This is an expected outcome of Hinted Networks’ mode-seeking attribute. We plan to study distributional inference further in the future, possibly by combining with dropout and other Bayesian techniques.

Iv Hinted Networks for Camera Relocalization

Iv-a PoseNet Baseline Model

The base model for solving camera relocalization tasks in our grounded investigations of Hinted Networks is derived from PoseNet, and specifically its “PoseNet2” variant with learned weights for homoscedastic uncertainties [5]

. This model’s architecture is derived from the GoogLeNet (Inception v1) classifier 

[27], which is truncated after the final pooling layer. In place of the removed softmax, PoseNet2 attaches a pose prediction sub-network, which is composed of a single

-channel fully-connected hidden layer (with ReLU activation) acting on the feature space, followed by linear output layers for predicting 3-D Cartesian position

and 4-D quaternion orientation .

The per-image () contribution to PoseNet2’s training loss is given as:


where and are the target position and (normalized quaternion) orientation, and are associated weights for learning each component’s data-driven homoscedastic uncertainty (akin to Lagrange multipliers), and is the degree of the p-norm.

We re-implemented PoseNet2 using the TensorFlow-Slim library 

[28], and in particular reused an existing GoogLeNet CNN backbone with pre-trained weights on the ImageNet dataset. This model maps color images into a 1024-dimensional feature space. The TF-Slim implementation deviates from the original formulation [4]

by adding batch normalization after every convolutional layer 

[29]. For simplicity, we omit the auxiliary branches from the Inception v1 backbone.

Iv-B Hinted PoseNets Implementation Details

As seen in Figure 2

, both the Hinted Embedding and Hinted Residual models extend from the base model’s architecture. While the feature extractor is copied verbatim from PoseNet2’s CNN backbone, the target prediction sub-network for hinted models needs to be modified in order to accept the concatenation of the feature vector and the hint vector as input. Thus, the hinted sub-network contains

three hidden layers (as opposed to PoseNet2’s single -channel pose prediction layer), with , , and

channels respectively, to ensure sufficient mixing of the concatenated tensor. While the increased network capacity may seem to give an unfair advantage to hinted architectures, we tested the proposed three-layer pose predictor on the PoseNet base model and found that it performed worse than its original configuration. This is consistent with previous reports that PoseNet’s pose prediction sub-network is already prone to overfitting 


We pre-process images by down-scaling and square-cropping to a resolution of , and then normalizing pixel intensities to range from to . We also normalize and sign-disambiguate all target quaternions by restricting them to a single hyper-hemisphere.

Since each orientation can be represented ambiguously by two sign-differing quaternion vectors, it is crucial for both training and evaluating regressors to consistently map all quaternions onto a single hyper-hemisphere. This is achieved by unit-normalizing their magnitudes, and also sign-normalizing the first non-zero component.

Furthermore, contrary to other PoseNet-style systems (e.g. [5, 18, 20]), we train models on PCA-whitened [31] representations of both position and orientation. In addition to normalizing across mismatched dimensions, whitening removes the need to manually specify initial scales for regression-layer weights and for hints. Having initial pose estimates matching the scales of each environment is crucial during training [4]. Predicted poses are de-whitened prior to evaluating the training loss and at query time.

V Terrestrial Localization Experiments

We now evaluate Hinted Networks for camera relocalization tasks on the outdoor Cambridge Landmarks [4] dataset and indoor 7-Scenes [32] dataset. These terrestrial datasets are comprised of images that were taken using hand-held cameras, targeting nearby landmarks with predominantly forward-facing orientations. By contrast, the next section will present evaluations within the separate domain of aerial-view localization, where the goal will be to localize high-altitude downward-facing camera frames acquired by aerial drones.

All models are optimized with Adam [33] using default parameters and a learning rate of , for k (7-Scenes) and k (Cambridge) iterations, with a batch size of . During training, hints are sampled from Gaussian noise around ground truth with uncorrelated deviations of

along each PCA-whitened axis. During inference, hints are initialized with a unit-scale normal distribution and fed through the network until convergence.

V-a Comparison of Localization Performance

As shown in Table I, our PoseNet2 implementation attains slightly worse localization accuracy compared to [5]. We attribute this difference to minor discrepancies in the architecture, pre-processing, and training regime. To isolate the effects of the architecture from those of experimental setup, we use our implementation as the comparative baseline.

The Hinted Residual network boasts superior localization accuracies for most scenes, both in position and especially in orientation. On the other hand, the Hinted Embedding network converges to pose predictions that are no better than PoseNet2 for most scenes. Furthermore, the test-set errors for certain scenes are slightly elevated during late training for PoseNet2, thus reflecting a sign of overfitting; this is not observed for neither hinted architectures.

Cambridge Training Test Size PoseNet2 PoseNet2 Hinted Hinted
Landmarks [4] Samples Samples (from [5]) (our baseline) Embedding Residual
King’s College 1220 343 5600 m, m, m, m,
Old Hospital 895 182 2000 m, m, m, m,
Shop Facade 231 103 875 m, m, m, m,
St Mary’s Church 1487 530 4800 m, m, m, m,
Great Court 1532 760 8000 m, m, m, m,
Average m, m, m, m,
7-Scenes [32]
Chess 4000 2000 6.0 m, m, m, m,
Fire 2000 2000 2.5 m, m, m, m,
Heads 1000 1000 1.0 m, m, m, m,
Office 6000 4000 7.5 m, m, m, m,
Pumpkin 4000 2000 5.0 m, m, m, m,
Red Kitchen 7000 5000 18.0 m, m, m, m,
Stairs 2000 1000 7.5 m, m, m, m,
Average m, m, m, m,
TABLE I: Median localization results for terrestrial datasets.

Additionally, as seen in Figure 3, while PoseNet2 models train faster, Hinted Residual networks are able to leverage iterative refinement to make more accurate predictions. In contrast, after an initial learning phase, Hinted Embedding models converge numerically without benefiting from recurrent connections.

These findings suggest that the use of an uninformed hint solely as a prior does not help with pose prediction and instead complicates learning with added parameters. On the other hand, the addition of recurrent connections significantly improves prediction accuracies. We thus conclude that the main advantage of hinted architectures, at least using uninformed hints, is not the hints themselves but rather the iterative refinement process.

Fig. 3: Convergence of median test-set spatial errors for the Chess scene.

V-B Effects of Noise Scale for Training-Time Hints

For these experiments, we have arbitrarily set the Gaussian noise scale for hints during training to be of each PCA-normalized axis. Still, Hinted Networks are mostly insensitive to this hyper-parameter, as long as it lies within a reasonable range, as seen in Figure 3. Naturally, when the hint noise is near zero, hinted models achieve near-perfect training performance by simply passing the hint as output, which leads to poor test-time generalization. Perhaps surprisingly however, the Hinted Residual model still outperforms the baseline even when the training hint is extremely noisy, thus carrying little information. This finding again highlights the importance of recurrence inference in our hinted architectures. In contrast, Hinted Embedding models cannot make good use of the hint, and even perform better when trained with uninformative hints.

Fig. 4: Effect of hint scale on test-set errors for the Chess scene after k iterations.

Vi Aerial-View Localization Experiments

Hinted Networks are designed to facilitate learning of challenging regression instances with significant self-similarities among input values. To explicitly assess the range of potential performance gains, we conduct a set of localization experiments on aerial views, for which we can generally expect more visual ambiguities. Such aerial-view localization is useful in diverse GPS-denied scenarios, including underwater and extra-terrestrial planetary surfaces.

We train and evaluate models on synthesized downward-facing images from aerial drones, which are extracted from large-scale satellite imagery. This setup is motivated both by data availability and the possibility to deliberately factor out effects of sparse sampling and limited dataset size by using online data generators. We acknowledge that this setup does not fully reflect real-world conditions, and thus model deployment would likely benefit from domain adaptation and/or datasets of actual footage from aerial drones.

Region Tile Location Features Seasons Training images Test images
Al-Ahsa 39QXD Saudi Arabia Desert, Sand None 5 5
Beijing 50TMK China Urban, Mountains Dry, Wet 7 3
Death Valley 11SMA United States Desert, Hills None 5 4
Finke Gorge 52KHU Australia Desert, Hills None 7 4
Montreal 18TXR Canada Urban, Rural, Forest Summer, Winter 6 4
Moscow 37UDB Russia Urban, Rural, Forest Summer, Winter 4 2
Tokyo 54SUE Japan Urban, Mountains, Water Summer, Mild Winter 9 4
TABLE II: Visually-distinct regions chosen for aerial-view localization experiments.

Vi-a Setup

The satellite scenes used are based on data from the Sentinel-2 Earth observation mission [34] by the European Space Agency (ESA). All imagery is publicly and freely available on ESA’s Copernicus Open Access Hub [35]. We select seven regions with various degrees of self-similarity and seasonal variations, which are enumerated along with their main features in Table II. Each region maps to a specific Sentinel-2 mission tile, and covers a square area of  km, with a pixel resolution of  m. For each region, we choose up to thirteen non-cloudy sample images, depending on availability, and split the dataset into between 4 to 9 training and between 2 to 5 test tiles. Samples were taken at various times of the year between and . A sample image is shown in Figure 5222Please see supplementary material for a comprehensive list of product IDs, as well as a sample tile image per region.. While we aim to split datasets randomly, we also ensure that each season is represented in both the training and test sets. We further experiment with variations of these setups to study effects of altitude ranges, cross-seasonal variations, and the presence of clouds, as enumerated in Table III.

Setup Region Features Training images Test images
Low Altitudes Montreal Low altitude range, from  km to  km 5 5
High Altitudes Montreal High altitude range, from  km to  km 5 5
Wide Altitudes Montreal Wide altitude range, from  km to  km 5 5
Winter Montreal Trained and evaluated on winter views only 2 2
Winter Montreal Trained on all scenes, evaluated on winter views only 2 4
Summer Montreal Trained and evaluated on summer views only 4 2
Summer Montreal Trained on all scenes, evaluated on summer views only 4 4
Clouds Al-Ahsa Trained and evaluated on partially cloudy (0-10%) views 5 2
TABLE III: Variations on the chosen regions selected for experimentation.

Tile images are converted from 16-bits to 8-bits (per channel) according to pixel intensity ranges. Our data generator synthesizes orthogonally-projected camera frames by uniformly sampling at different positions, orientations, and altitudes, with a horizontal field-of-view of . Unless otherwise specified, altitudes are sampled between  km and  km. Samples of generated images are illustrated in Figure 6.

Model architectures and training regimes are nearly identical to those from the previous section, with the following exceptions. Since each pose only has a single planar yaw angle, we regress a -D cosine-sine heading vector instead of a quaternion333Similar to previously, headings are normalized for ground truth values during training, but not for predictions.. We also regress altitude separately from lateral coordinates given their large differences in scale, using an independently-learned uncertainty factor . Moreover, given the unlimited number of image-pose samples that are generated on-the-fly, models can benefit from longer training, which we set at k iterations.

As a final distinction, for these experiments we set the training hint noise scale to for the spatial dimensions and for the angular ones. As justification, we empirically noted that for certain scenes, angular errors tend to remain high for the hinted architectures unless the hint scale is sufficiently large. Our assessments suggest that the orientation regressor fails catastrophically, resulting in two clusters of errors around and . We thus suspect that these models learn the grid-like structure of some environments (e.g. a lattice of farmlands) instead of the actual orientation.

Vi-B Results

Table IV shows the localization performances for the diverse setups. Similar to our terrestrial experiments, Hinted Residual networks demonstrate overall greater accuracy in predicting positions as compared to baseline models, although they do not localize orientation as well. On the other hand, Hinted Embedding models interestingly excel at predicting angular poses. This suggests that hints are especially useful to localize scenes with high degrees of visual ambiguity.

Region / PoseNet2 Hinted Hinted
Setup (baseline) Embedding Residual
Al-Ahsa m, m, m,
Beijing m, m, m,
Death Valley m, m, m,
Finke Gorge m, m, m,
Montreal m, m, m,
Moscow m, m, m,
Tokyo m, m, m,
Average m, m, m,
Low Alt. m, m, m,
High Alt. m, m, m,
Wide Alt. m, m, m,
Winter m, m, m,
Winter m, m, m,
Summer m, m, m,
Summer m, m, m,
Clouds m, m, m,
TABLE IV: Median localization results for aerial-view localization experiments.

Focusing on the altitude experiments, we unsurprisingly find that all models perform better at high altitudes due to wider camera swaths. We also observe hints to be more useful at lower altitudes given pronounced visual ambiguities, and that the network is capable of learning location-pertinent visual attributes within a wide range of altitudes. As for cross-seasonal experiments, we find that all networks, independently of their architectures, are able to learn seasonal variations, but more importantly can also leverage data from one season to improve predictions within another view. For instance, including Summer scenes in the Montreal dataset drastically improves prediction accuracy in the harder Winter scenes, even though latter landmark textures are blanketed by snow.

Finally, we find that PoseNet-style models do not perform well in the presence of even relatively small amounts of clouds. We believe that networks fail to learn that clouds are irrelevant to the pose, and instead memorize cloud locations from the training set. This failure is heightened by the small number of training scenes with static cloud placements, and can potentially be addressed by training on other synthetic cloudy scenes.

Fig. 5: A sample tile from the Montreal dataset.
Fig. 6: Training samples from the Montreal dataset.

Vii Conclusions

In summary, Hinted Networks improve the performance of neural network regression models by incorporating a hint of the target as stochastic input. These architectural transformations both simplify the learning task and increase prediction accuracy, through the application of prior conditioning, residual connections, and recurrent connections. The Hinted Residual PoseNet model yields improved performance for camera relocalization tasks compared to the baseline network, for both standard outdoor and indoor terrestrial datasets. We also explored aerial-view localization tasks, for which Hinted Networks showed a widened range of performance gains.

In future work, we want to enhance the sampling of hints during training by adapting and learning distributional scale and shape to match inference-time conditions. We would also like to continue exploring the potential benefits of recurrent hinted models during training, and of informed hints during inference when auxiliary data sources are available. We are further interested in using multiple uninformed hints to predict a target distribution, possibly by combining with dropout and other Bayesian techniques [25]. Finally, since the hinted network architecture is not specific to camera relocalization tasks, we are excited to assess other potential applications of such regression models.


  • [1] D. Koller and N. Friedman, Probabilistic graphical models: principles and techniques.   MIT press, 2009.
  • [2] K. He, X. Zhang, S. Ren, and J. Sun, “Deep residual learning for image recognition,” in

    Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR)

    , 2016, pp. 770–778.
  • [3] I. Goodfellow, Y. Bengio, A. Courville, and Y. Bengio, Deep learning.   MIT Press Cambridge, 2016, vol. 1.
  • [4] A. Kendall, M. Grimes, and R. Cipolla, “Posenet: A convolutional network for real-time 6-dof camera relocalization,” in Proceedings of the International Conference on Computer Vision (ICCV), 2015.
  • [5] A. Kendall and R. Cipolla, “Geometric loss functions for camera pose regression with deep learning,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017.
  • [6] S. Depewag, J. M. Hernández-Lobato, F. Doshi-Velez, and S. Udluft, “Learning and policy search in stochastic dynamical systems with bayesian neural networks,” in Proceedings of the International Conference on Learning Representations (ICLR), 2017.
  • [7] P. Vincent, H. Larochelle, Y. Bengio, and P.-A. Manzagol, “Extracting and composing robust features with denoising autoencoders,” in Proceedings of the International Conference on Machine Learning (ICML), 2008, pp. 1096–1103.
  • [8] Y. Wang and F. Tian, “Recurrent residual learning for sequence classification,” in

    Conference on Empirical Methods in Natural Language Processing EMNLP

    , 2016.
  • [9] C. Wang, “RRA: recurrent residual attention for sequence learning,” CoRR, vol. abs/1709.03714, 2017.
  • [10] N. Piasco, D. Sidibé, C. Demonceaux, and V. Gouet-Brunet, “A survey on visual-based localization: On the benefit of heterogeneous data,” Pattern Recognition, vol. 74, pp. 90–109, 2018.
  • [11] S. Lowry, N. Sünderhauf, P. Newman, J. J. Leonard, D. Cox, P. Corke, and M. J. Milford, “Visual place recognition: A survey,” IEEE Transactions on Robotics (TRO), vol. 32, no. 1, pp. 1–19, 2016.
  • [12] L. Svarm, O. Enqvist, M. Oskarsson, and F. Kahl, “Accurate localization and pose estimation for large 3D models,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2014, pp. 532–539.
  • [13] T. Sattler, B. Leibe, and L. Kobbelt, “Efficient & effective prioritized matching for large-scale image-based localization,” IEEE Transactions on Pattern Analysis and Machine Intelligence (PAMI), vol. 39, no. 9, pp. 1744–1756, 2017.
  • [14] “Bundler: Structure from Motion (SfM) for unordered image collections,” http://www.cs.cornell.edu/~snavely/bundler/, accessed: 2018-05-07.
  • [15] “VisualSFM: A visual structure from motion system,” http://ccwu.me/vsfm/, accessed: 2018-05-07.
  • [16] R. Mur-Artal and J. D. Tardós, “ORB-SLAM2: An open-source SLAM system for monocular, stereo, and RGB-D cameras,” IEEE Transactions on Robotics (TRO), vol. 33, no. 5, pp. 1255–1262, 2017.
  • [17] D. G. Lowe, “Object recognition from local scale-invariant features,” in Proceedings of the seventh IEEE international conference on Computer Vision (ICCV), vol. 2, 1999, pp. 1150–1157.
  • [18] S. Brahmbhatt, J. Gu, K. Kim, J. Hays, and J. Kautz, “Mapnet: Geometry-aware learning of maps for camera localization,” in the IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (to appear), 2018.
  • [19] Z. Laskar, I. Melekhov, S. Kalia, and J. Kannala, “Camera relocalization by computing pairwise relative poses using convolutional neural network,” in Proceedings of the IEEE International Conference on Computer Vision (ICCV) Workshops, 2017.
  • [20] A. Valada, N. Radwan, and W. Burgard, “Deep auxiliary learning for visual localization and odometry,” in Proceedings of the the IEEE International Conference on Robotics and Automation (ICRA), 2018.
  • [21] N. Radwan, A. Valada, and W. Burgard, “VLocNet++: Deep multitask learning for semantic visual localization and odometry,” CoRR, vol. abs/1804.08366, 2018.
  • [22] P. Purkait, C. Zhao, and C. Zach, “SPP-Net: Deep absolute pose regression with synthetic views,” arXiv preprint arXiv:1712.03452, 2017.
  • [23] D. Jia, Y. Su, and C. Li, “Deep convolutional neural network for 6-dof image localization,” arXiv preprint arXiv:1611.02776, 2016.
  • [24] M. Oquab, L. Bottou, I. Laptev, and J. Sivic, “Learning and transferring mid-level image representations using convolutional neural networks,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2014, pp. 1717–1724.
  • [25] Y. Gal, “Uncertainty in deep learning,” University of Cambridge, 2016.
  • [26] A. Kendall and R. Cipolla, “Modelling uncertainty in deep learning for camera relocalization,” in Proceedings of the IEEE International Conference on Robotics and Automation (ICRA), 2016.
  • [27] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich, “Going deeper with convolutions,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2015.
  • [28] “TensorFlow-Slim,” https://git.io/fN66s, accessed: 2018-05-07.
  • [29] S. Ioffe and C. Szegedy, “Batch normalization: Accelerating deep network training by reducing internal covariate shift,” in ICML, 2015.
  • [30] F. Walch, C. Hazirbas, L. Leal-Taixe, T. Sattler, S. Hilsenbeck, and D. Cremers, “Image-based localization using lstms for structured feature correlation,” in Proceedings of IEEE International Conference on Computer Vision (ICCV), 2017.
  • [31] R. O. Duda, P. E. Hart, and D. G. Stork, Pattern Classification.   John Wiley & Sons, 2012.
  • [32] J. Shotton, B. Glocker, C. Zach, S. Izadi, A. Criminisi, and A. Fitzgibbon, “Scene coordinate regression forests for camera relocalization in rgb-d images,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2013, pp. 2930–2937.
  • [33] D. P. Kingma and J. Ba, “Adam: A method for stochastic optimization,” 2015.
  • [34] “Sentinel-2 earth observation mission,” https://sentinel.esa.int/web/sentinel/missions/sentinel-2, accessed: 2018-05-07.
  • [35] “Copernicus open access hub,” https://scihub.copernicus.eu/, accessed: 2018-05-07.