# PoseNet: A Convolutional Network for Real-Time 6-DOF Camera Relocalization

PoseNet regresses full camera pose from a single RGB image

Alex Kendall, Matthew Grimes, Roberto Cipolla · arXiv · 2015-5-27

- **Problem** SLAM pipelines need dense keyframes and feature matching, which textureless indoor scenes make hard. Appearance-based methods only place the camera among a limited set of discrete places.
- **Method** PoseNet is a convolutional network that regresses camera position and orientation from one RGB image. Unlike SLAM, it needs no tracking or graph optimisation.
- **Results** On King's College, PoseNet's median error was 1.92 m and 5.40°, beating nearest-neighbour matching on both position and orientation.

## Why landmark and feature pipelines are heavy

A robot or an augmented reality system needs to know where its camera is before it can act on the scene. The traditional answer is SLAM, which tracks the camera while it builds a map of the environment. Such pipelines need densely spaced keyframes, separate mechanisms for appearance-based and landmark-based localization, and frame-to-frame feature correspondence.

Point features like SIFT are a weak anchor in many indoor rooms, because the scenes contain many ambiguous, textureless features.

Appearance-based methods avoid some of this bookkeeping, but they only place the camera among a limited set of discrete places. That leaves a gap for a method that gives a continuous pose straight from the image, without needing a good initial estimate. The question the paper sets itself is whether one convolutional network can do this in real time, for both indoor and outdoor scenes.

## The key idea: regress the pose from one image

The key idea is to let a convolutional network output the camera position and orientation directly from one RGB image. After the network runs there is no tracking, keyframe store or graph optimisation step left to do. The authors argue this can work because the image representation the network learns varies smoothly and one-to-one with pose, so position can be read off without tracking.

Training a network like this normally needs very large labelled datasets, and hand-labelling camera poses for them would be costly. Structure from motion labels each video frame with a camera pose, so the labelling work shrinks to recording the video. Transfer learning starts the pose regressor from weights trained as an image classifier on very large datasets.

## Pose vector, quaternion and the loss

The network outputs a pose vector p made of a 3D camera position x and a quaternion orientation q. A quaternion is convenient because any four numbers can be normalised to unit length to give a valid rotation. That is simpler than orthonormalising a rotation matrix, which is why the authors chose it. At test time the output quaternion is normalised to unit length in the same way.

Training minimises a Euclidean loss over the position error and the orientation error, with the orientation term scaled by β. The loss doesn't force q onto the unit sphere during training. The authors found that q ends up close enough to the unit sphere that the gap between spherical and Euclidean distance becomes negligible, so they dropped the constraint.

β balances the network's attention to translation against rotation, and the authors set it so the expected position and orientation errors are roughly equal. They found the best β follows the ratio of those errors at the end of training, not at the start. Grid search gave 120 to 750 for indoor scenes and 250 to 2000 for outdoor scenes, since position errors are relatively larger outdoors.

The authors also initialise the final position regressor so each dimension's weight norm follows that dimension's spatial extent.

## GoogLeNet turned into a pose regressor

The base is GoogLeNet, a 22 layer classifier with six inception modules and two intermediate classifiers that are dropped at test time. PoseNet has 23 layers with trainable parameters, because the authors modified its output head. The three softmax classifiers are replaced with affine regressors, each producing a 7-dimensional vector of 3 position values and 4 orientation values.

A new fully connected layer of size 2048 sits before the final regressor, and its output is the localization feature vector that later analyses reuse.

Each training image is rescaled so its shorter side is 256 pixels, then cropped to 224x224. Training uses random crops, since cropping doesn't change the camera pose. At test time the network runs on one center crop, or on 128 uniformly spaced crops whose pose vectors are averaged.

The model is implemented in Caffe and trained with stochastic gradient descent at a base learning rate of 10−5. The learning rate drops by 90% every 80 epochs, with momentum 0.9 and a batch size of 75. Training ran on one half of a dual-GPU NVidia Titan Black and took an hour. The authors subtract a separate image mean for each scene, which they found improved results.

## Cambridge Landmarks and 7 Scenes

The outdoor data is a new set called Cambridge Landmarks, with five urban scenes. A pedestrian filmed each scene with an LG Nexus 5 phone, and the video was subsampled to 2Hz before structure from motion computed the poses. Neighbouring camera positions end up about 1m apart. Test images come from walking paths distinct from the training trajectories, which makes the regression harder.

Pedestrians, vehicles, lighting and weather all vary across the recordings.

The indoor scenes come from the public 7 Scenes dataset, chosen for its large variation in camera height and its design for RGB-D relocalization. Textureless surfaces make purely visual, SIFT-like matching very hard on these scenes. King's College has 1220 training and 343 test frames, and Chess has 4000 training and 2000 test frames.

## Accuracy against SCoRe Forest and nearest neighbour

The overall claim is about 2m and 6° on large outdoor scenes, and 0.5m and 10° indoors. On King's College, PoseNet's median error was 1.92 m and 5.40°, and dense cropping lowered it to 1.66 m and 4.86°. The nearest neighbour baseline on that scene was 3.34 m and 5.92°, so the regressor is more accurate on both position and orientation. On Chess, PoseNet scored 0.32 m and 8.12°, compared to 0.41 m and 11.2° for nearest neighbour.

SCoRe Forest uses RGB-D depth and is generally more accurate indoors, for example 0.03 m and 0.66° on Chess. The authors attribute the gap to the textureless indoor scenes, which are hard to relocalize without depth. SCoRe Forest also fails on the outdoor scenes, because it depends on depth. On the hardest frames, above the 95th percentile, PoseNet does better than SCoRe Forest, and its worst error is lower.

Nearest neighbour matching uses the feature vectors that the same network produces for the training frames. PoseNet beating that baseline is the authors' evidence that the regressor goes beyond the training examples. A King's College sequence shows the predicted pose lying between training frames.

## Joint loss, scale factor and input resolution

In the Chess experiment, one network trained on full 6-DOF labels beat separate position-only and orientation-only networks. A branched network with separate position and orientation components was also less effective. The authors explain this by saying that separate regressors lose the information each needs to factor orientation out of position, or the reverse.

Figure 2 traces relative performance across a range of scale factors on Chess, so the choice of β is visible in the curves. The chosen β range is the one reported from the grid search.

Dense cropping gives a modest gain over a single center crop, mostly in cluttered scenes such as King's College, Shop Facade and St Mary's Church. Upscaling the input did not raise localization performance. The authors conclude that context and field of view matter more than resolution for relocalization.

## Pretraining versus training from scratch

Pretraining on classification data speeds up training and lowers the final error compared with random initialisation. The transfer learning curves run for up to 100 training epochs. The authors note it isn't obvious that a pose-invariant classifier would suit pose regression, and they argue it must keep track of pose internally.

Places pretraining starts level with ImageNet pretraining, but it ends with better performance. The authors attribute this to Places being more relevant to localization.

On King's College, gaining from closer training spacing is small below 4 m. PoseNet still gives reasonable accuracy with only a few dozen training samples. SIFT-based structure from motion, by contrast, fails sharply past a certain spacing, because it needs a small baseline.

## What the network attends to and how features organise

A saliency map shows how strongly each pixel affects the pose, computed as the magnitude of the loss gradient with respect to pixel intensities. The authors argue that textureless patches can be more informative in total, since a group of pixels contributes the sum of its saliency values. People and other dynamic objects get a weaker response.

t-SNE embeds high-dimensional feature vectors in two dimensions while trying to preserve Euclidean distances. Applied to features from a King's College video, the feature vectors vary smoothly with pose and are largely one-to-one with it. The same pattern appears for networks trained on other scenes or on classification data without pose labels, although the mapping is more complicated for the latter.

The authors conclude that the regression features generalise to other scenes in the way classification features do.

## Speed, storage and scaling with training data

PoseNet computes a pose in 5ms per frame with a single center crop. Dense cropping raises that to 95ms per image, even with parallel GPU processing. The weights take 50 MB, and these values do not depend on the number of training samples. SIFT-based metric localization takes gigabytes and minutes, and the authors cite prior work saying its cost scales O(n2) with training data size.

Nearest neighbour matching stores a feature vector for each training frame and searches them linearly.

All these speed and memory figures were measured on a modern desktop computer. Training took an hour on half of a Titan Black, a separate cost from these inference figures.

## Difficult lighting, blur and camera changes

The authors tested extra images with motion blur, dusk and night lighting, fog and rain, dynamic objects, and cameras with unknown intrinsics. None of these conditions appeared in training. SIFT-based structure from motion failed on these images, so no ground truth exists, and the authors judged accuracy by overlaying the reconstruction on the image.

Under those conditions PoseNet gave plausible pose estimates, including on silhouetted buildings and under extreme blur. The authors suggest that pretraining on the scenes data enhanced these invariances.

## Limitations

The depth-based SCoRe Forest stays more accurate on indoor scenes, and the comparison covers only indoor scenes because the method needs depth. The robustness tests are qualitative, since there is no SIFT ground truth for them. The saliency and t-SNE findings are read from visualisations, and the paper gives no quantitative test of them.

The training-spacing study covers only King's College. The efficiency numbers come from one desktop, and the 95ms dense figure is tied to parallel GPU processing. The paper leaves open how large an area a finite network can learn to localize within.

## Paper info

- **Authors**: Alex Kendall, Matthew Grimes, Roberto Cipolla
- **Venue**: arXiv · Preprint
- **First published**: 2015-5-27
- **Added**: 2026-11-12
- **Updated**: 2016-2-18
- **Version**: v4
- **arXiv**: 1505.07427
- **Category**: cs.CV · cs.NE · cs.RO
- **Original paper terms**: [arXiv non-exclusive 1.0](https://arxiv.org/licenses/nonexclusive-distrib/1.0/)
- **What we show**: Paper info and commentary

[Original paper ↗](https://arxiv.org/abs/1505.07427v4) · [PDF ↗](https://arxiv.org/pdf/1505.07427v4)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Quote from the paper

Alex Kendall, Matthew Grimes, Roberto Cipolla (2015). PoseNet: A Convolutional Network for Real-Time 6-DOF Camera Relocalization. arXiv:1505.07427v4. https://arxiv.org/abs/1505.07427v4

**BibTeX**

```
@misc{kendall2015posenet,
  title = {{PoseNet: A Convolutional Network for Real-Time 6-DOF Camera Relocalization}},
  author = {Alex Kendall and Matthew Grimes and Roberto Cipolla},
  year = {2015},
  eprint = {1505.07427},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1505.07427v4}
}
```

## Other paper commentary

- [Gate-Variants of Gated Recurrent Unit (GRU) Neural Networks](https://refivu.com/en/papers/15731593-7d6d-4afb-b434-961a20dea639-gate-variants-of-gated-recurrent-unit-gru-neural.md)
- [Recurrent Neural Networks for Multivariate Time Series with Missing Values](https://refivu.com/en/papers/04779a68-ae30-4f73-bc85-9bae7235eaaf-recurrent-neural-networks-for-multivariate-time-series-with.md)
- [Non-negative matrix factorization with sparseness constraints](https://refivu.com/en/papers/56eb7310-b0a6-4b18-9880-4ca6ff6f54dc-non-negative-matrix-factorization-with-sparseness.md)
- [Neural Turing Machines](https://refivu.com/en/papers/98345e56-0459-409a-bde9-37eadc2f2d0a-neural-turing-machines.md)
- [All-Optical Machine Learning Using Diffractive Deep Neural Networks](https://refivu.com/en/papers/818615cb-8c22-447c-a0a6-77954575b98a-all-optical-machine-learning-using-diffractive-deep-neural.md)
- [Paying More Attention to Attention: Improving the Performance of Convolutional Neural Networks via Attention Transfer](https://refivu.com/en/papers/9fd3c7c3-a01f-4f1c-84a7-72570c46bdd4-paying-more-attention-to-attention-improving-the-performance.md)
- [Federated Learning with Differential Privacy: Algorithms and Performance Analysis](https://refivu.com/en/papers/159abc6e-c571-4ed4-b7d1-e630e54b4510-federated-learning-with-differential-privacy-algorithms-and.md)
- [Deep Learning for 3D Point Clouds: A Survey](https://refivu.com/en/papers/ac14ada0-64c3-463e-b921-6ac08239ba22-deep-learning-for-3d-point-clouds-a-survey.md)
- [On the Convergence of Adam and Beyond](https://refivu.com/en/papers/0071643a-b21a-4f45-ab31-5fa27e061226-on-the-convergence-of-adam-and-beyond.md)
- [H-DenseUNet: Hybrid Densely Connected UNet for Liver and Tumor Segmentation from CT Volumes](https://refivu.com/en/papers/baba5f05-45fc-4d5b-84cb-c78d65c377a5-h-denseunet-hybrid-densely-connected-unet-for-liver.md)
- [Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNet](https://refivu.com/en/papers/55385708-c65a-43d7-b2e0-c4751a8d2757-tokens-to-token-vit-training-vision-transformers-from.md)
- [Learning deep representations by mutual information estimation and maximization](https://refivu.com/en/papers/0ecc4e49-5a6d-49c7-a22d-0464db0ce259-learning-deep-representations-by-mutual-information.md)

## Terms in this paper

- [ImageNet](https://refivu.com/en/terms/5eadad128667-imagenet)
- [Stochastic Gradient Descent](https://refivu.com/en/terms/a49650824022-stochastic-gradient-descent)
- [transfer learning](https://refivu.com/en/terms/9c71d6928a00-transfer-learning)
- [Convolutional Neural Network](https://refivu.com/en/terms/610f2c09337d-convolutional-neural-network)
- [t-SNE](https://refivu.com/en/terms/488ecf7dbbcf-t-sne)
- [GoogLeNet](https://refivu.com/en/terms/50b933468e4c-googlenet)
- [saliency map](https://refivu.com/en/terms/2289fe01c38a-saliency-map)
- [PLACES](https://refivu.com/en/terms/f1989482056f-places)
- [SiFT](https://refivu.com/en/terms/bcf3dc5de1bd-sift)
- [Euclidean loss](https://refivu.com/en/terms/f2efb09940d7-euclidean-loss)
- [feature vector](https://refivu.com/en/terms/5d8d1ea96142-feature-vector)
- [quaternion](https://refivu.com/en/terms/42a0ab1118f6-quaternion)
- [scale factor](https://refivu.com/en/terms/d5ccbf179b34-scale-factor)
- [structure from motion](https://refivu.com/en/terms/c7705e3fcf69-structure-from-motion)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/d88e659c-e7cf-4fb4-acf4-46e297868666-posenet-a-convolutional-network-for-real-time-6)
