. Recently, it has been pursued actively in autonomous driving research, where PR forms a core component in localization (i.e., estimating the vehicle pose)[34, 21, 4, 9, 35, 5, 7] and loop closure detection [10, 13]. Many existing methods for PR require to train on a large dataset of sample images, often with ground truth positioning labels, and state-of-the-art results are reported by methods that employ learning [21, 20, 7, 9].
To perform convincingly, a practical PR algorithm must be robust against appearance changes in the operating environment. These can occur due to higher frequency environmental variability such as weather, time of day, and pedestrian density, as well as longer term changes such as seasons and vegetation growth. A realistic PR system must also contend with “less cyclical” changes, such as construction and roadworks, updating of signage, façades and billboards, as well as abrupt changes to traffic rules that affect traffic flow (this can have a huge impact on PR if the database contains images seen from only one particular flow [10, 13]). Such appearance changes invariably occur in real life.
To meet the challenges posed by appearance variations, one paradigm is to develop PR algorithms that are inherently robust against the changes. Methods under this paradigm attempt to extract the “visual essence” of a place that is independent of appearance changes . However, such methods have mostly been demonstrated on more “natural” variations such as time of day and seasons.
Another paradigm is to equip the PR algorithm with a large image dataset that was acquired under different environmental conditions . To accommodate long-term evolution in appearance, however, it is vital to continuously accumulate data and update the PR algorithm. To achieve continuous data collection cost-effectively over a large region, one could opportunistically acquire data using a fleet of service vehicles (e.g., taxis, delivery vehicles) and amateur mappers. Indeed, there are street imagery datasets that grow continuously through crowdsourced videos [30, 14]. Under this approach, it is reasonable to assume that a decent sampling of the appearance variations, including the recent changes, is captured in the ever growing dataset.
Under continuous dataset growth, the key to consistently accurate PR is to “assimilate” new data quickly. This demands a PR algorithm that is scalable. Specifically, the computational cost of testing (i.e., performing PR on a query input) should not increase visibly with the increase in dataset size. Equally crucially, updating or retraining the PR algorithm on new data must also be highly efficient.
Arguably, PR algorithms based on deep learning[7, 9] can accommodate new data by simply appending it to the dataset and fine-tuning the network parameters. However, as we will show later, this fine-tuning process is still too costly to be practical, and the lack of accurate labels in the testing sequence can be a major obstacle.
We propose a novel framework for PR on large-scale datasets that continuously grow due to the incorporation of new sequences in the dataset. To ensure scalability, we develop a novel PR technique based on Hidden Markov Models (HMMs) that is lightweight in both training and testing. Importantly, our method includes a topologically sensitive compression procedure that can update the system efficiently, without using GNSS positioning information or computing visual odometry. This leads to PR that can not only improve accuracy by continuous adaption to new data, but also maintain computational efficiency. We demonstrate our technique on datasets harvested from Mapillary , and also show that it compares favorably against recent PR algorithms on benchmark datasets.
2 Problem setting
We first describe our adopted setting for PR for autonomous driving. Let be a dataset of videos, where each video
is a time-ordered sequence of images. In the proposed PR system, is collected in a distributed manner using a fleet of vehicles instrumented with cameras. Since the vehicles could be from amateur mappers, accurately calibrated/synchronized GNSS positioning may not be available. However, we do assume that the camera on all the vehicles face a similar direction, e.g., front facing. The query video is represented as
which is a temporally-ordered sequence of query images. The query video could be a new recording from one of the contributing vehicles (recall that our database is continuously expanded), or it could be the input from a “user” of the PR system, e.g., an autonomous vehicle.
For each , the goal of PR is to retrieve an image from that was taken from a similar location to , i.e., the FOV of the retrieved image overlaps to a large degree with . As mentioned above, what makes this challenging is the possible variations in image appearance.
In the envisioned PR system, when we have finished processing , it is appended to the dataset
thus the image database could grow unboundedly. This imposes great pressure on the PR algorithm to efficiently “internalise” new data and compress the dataset. As an indication of size, a video can have up to 35,000 images.
2.1 Related works
PR has been addressed extensively in literature 
. Traditionally, it has been posed as an image retrieval problem using local features aggregated via a BoW representation[10, 13, 11]. Feature-based methods fail to match correctly under appearance change. To address appearance change, SeqSLAM  proposed to match statistics of the current image sequence to a sequence of images seen in the past, exploiting the temporal relationship. Recent methods have also looked at appearance transfer  to explicitly deal with appearance change.
The method closest in spirit to ours is , who maintain multiple visual “experiences” of a particular location based on localization failures. In their work, successful localization leads to discarding data, and they depend extensively on visual odometry (VO), which can be a failure point. In contrast to , our method does not rely on VO; only image sequences are required. Also, we update appearance in both successful and unsuccessful (new place) localization episodes, thus gaining robustness against appearance variations of the same place. Our method also has a novel mechanism for map compression leading to scalable inference.
A related problem is that of visual localization (VL): inferring the 6 DoF pose of the camera, given an image. Given a model of the environment, PnP  based solutions compute the pose using 2D-3D correspondences , which becomes difficult both at large scale and under appearance change . Some methods address the issue with creating a model locally using SfM against which query images are localized . Given the ground truth poses and the corresponding images, VL can also be formulated as an image to pose regression problem, solving simultaneously the retrieval and pose estimation. Recently, PoseNet 
used a Convolution Neural Network (CNN) to learn this mapping, with further improvements using LSTMs to address overfitting, uncertainty prediction  and inclusion of geometric constraints . MapNet  showed that a representation of the map can be learned as a network and then used for VL. A downside of deep learning based methods is their high-computational cost to train/update.
Hidden Markov Models (HMMs) [38, 33] have been used extensively for robot localization in indoor spaces [22, 2, 37]. Hansen et al.  use HMM for outdoor scene, but they must maintain a similarity matrix between database and query sequences, which is unscalable when data is accumulated continuously. Therefore, we are one of the first to apply HMMs to large urban-scale PR, which requires significant innovation such as a novel efficient-to-evaluate observation model based on fast image retrieval (Sec. 4.2). In addition, our method explicitly deals with temporal reasoning (Sec. 4.1), which helps to combat the confusion from perceptual aliasing problem . Note also that our main contributions are in Sec. 5, which tackles PR on a continuously growing dataset .
3 Map representation
When navigating on a road network, the motion of the vehicle is restricted to the roads, and the heading of the vehicle is also constrained by the traffic direction. Hence, the variation in pose of the camera is relatively low [35, 32].
The above motivates us to represent a road network as a graph , which we also call the “map”. The set of nodes is simply the set of all images in . To reduce clutter, we “unroll” the image indices in by converting an index to a single number , hence the set of nodes are
where is the total number of images. We call an index a “place” on the map.
We also maintain a corpus that stores the images observed at each place. For now, the corpus simply contains
at each cell . Later in Sec. 5, we will incrementally append images to as the video datatset grows.
In , the set of edges connect images that overlap in their FOVs, i.e., is an edge in if
Note that two images can overlap even if they derive from different videos and/or conditions. The edges are weighted by probabilities of transitioning between places, i.e.,
for a vehicle that traverses the road network. Trivially,
4 Place recognition using HMM
To perform PR on against a fixed map and corpus , we model using a HMM . We regard each image to be a noisy observation (image) of an latent place state , where . The main reason for using HMM for PR is to exploit the temporal order of the images in , and the high correlation between time and place due to the restricted motion (Sec. 3).
To assign a value to , we estimate the belief
where is a shorthand for . Note that the belief is a probability mass function, hence
Based on the structure of the HMM, the belief (9) can be recursively defined using Bayes’ rule as
where is the observation model, is the state transition model, and is the prior (the belief at the previous time step) . The scalar is a normalizing constant to ensure that the belief sums to .
If we have the belief at time step , we can perform PR on by assigning
as the place estimate of . Deciding the target state in this manner is called maximum a posteriori (MaxAP) estimation. See Fig. 1 for an illustration of PR using HMM.
4.1 State transition model
The state transition model gives the probability of moving to place , given that the vehicle was at place in the previous time step. The transition probability is simply given by the edge weights in , i.e.,
Again, we defer the concrete definition of the transition probability to Sec. 5. For now, the above is sufficient to continue our description of our HMM method.
4.2 Observation model
to represent every image. Priority search k-means tree is used to index the database, but it is possible to use other indexing methods [17, 12, 3].
For every image , we seek a nonlinear function
that maps the image to a single high-dimensional vector. To do that, given a set of SIFT features densely extracted from image: , where is the number of SIFT features of image . K-means is used to build a codebook , where is the size of codebook. The VLAD embedding function is defined as:
where, is the nearest visual word of feature vector . To obtain a single vector, we employ sum aggregation:
To reduce the impact of background features (e.g., trees, roads, sky) within the vector , we adopt rotation and normalization (RN) , followed by -2 normalization. In particular, we use PCA to project from to , where . In our experiment, we set . Power-law normalization is then applied on rotated data:
where, we set .
Note that different from DenseVLAD  which uses whitening for post-processing, performing power-law normalization on rotated data is more stable.
We adopt priority search k-means tree  to index every image . The idea is to partition all data points into clusters by using K-means, then recursively partitioning the points in each cluster. For each query , we find a set of -nearest neighbor . Specifically, is mapped to vector . To search, we propagate down the tree at each cluster by comparing to cluster centers and selecting the nearest one.
The likelihood is calculated as follows:
Initialize , , where, we set and in our experiment.
Find node , where is the inverse of corpus , which finds node storing .
Calculate the probability: , where is the distance between and .
If , then .
4.3 Inference using matrix computations
The state transition model can be stored in a matrix called the transition matrix, where the element at the -th row and -th column of is
Hence, is also the weighted adjacency matrix of graph . Also, each row of sums to one. The observation model can be encoded in a diagonal matrix , where
If the belief and prior are represented as vectors respectively, operation (11) can be summarized as
corresponds to uniform distribution. From this, it can be seen that the cost of PR is.
Note that is a very sparse matrix, due to the topology of the graph which mirrors the road network; see Fig. 3 for an example . Thus, if we assume that the max number of non-zero values per row in is , the complexity for computing is O.
Nonetheless, in the targeted scenario (Sec. 2), can grow unboundedly. Thus it is vital to avoid a proportional increase in so that the cost of PR can be maintained.
5 Scalable place recognition based on HMM
In this section, we describe a novel method that incrementally builds and compresses for a video dataset that grows continuously due to the addition of new query videos.
We emphasize again that the proposed technique functions without using GNSS positioning or visual odometry.
5.1 Map intialization
where is a normalization constant. The edges connect frames that are time steps apart with weights based on a Gaussian on the step distances. The choice of can be based on the maximum velocity of a vehicle.
Note that this simple way of creating edges will ignore complex trajectories (e.g., loops). However, the subsequent steps will rectify this issue by connecting similar places.
5.2 Map update and compression
We now wish to append to , and update to maintain computational scalability of future PR queries. First, create a subgraph for , where
(recall that there are a total of places in ), and simply follows Sec. 5.1 for .
In preparation for map compression, we first concatenate the graphs and extend the corpus
for . There are two main subsequent steps: culling new places, and combining old places.
Culling new places
For each , construct
where with is a threshold on the belief. There are two possibilities:
If , then is the image of a new (unseen before) place since the PR did not match a dataset image to with sufficient confidence. No culling is done.
If , then for each ,
For each such that :
Create new edge with weight .
Delete edge from .
Combining old places
Performing PR on also provides a chance to connect places in that were not previously connected. For example, two dataset videos and could have traversed a common subpath under very different conditions. If travels through the subpath under a condition that is simultaneously close to the conditions of and , this can be exploited for compression.
To this end, for each where is non-empty,
For each where and :
For each such that , :
Create edge with weight .
Delete edge from .
Again, once the above is done for all for which , we remove all unconnected nodes from and delete the relevant cells in , with the corresponding index adjustments. Figs. (c)c, (a)a and (c)c illustrate this combination step.
5.3 Updating the observation model
When is appended to the dataset, i.e., , all vector need to be indexed to the k-means tree. In particular, we find the nearest leaf node that belongs to. Assume the tree is balanced, the height of tree is , where , thus each needs to check internal nodes and one leaf node. In each node, it needs to find the closest cluster center by computing distances to all centers, the complexity of which is . Therefore, the cost for adding the query video is , where . Assume it is a complete tree, every leaf node contains points, thus it has leaf nodes. For each point , instead of exhaustedly scanning leaf nodes, it only needs to check nodes. Hence, it is a scalable operation.
5.4 Overall algorithm
Algorithm 1 summarizes the proposed scalable method for PR. A crucial benefit of performing PR with our method is that map does not grow unboundedly with the inclusion of new videos. Moreover, the map update technique is simple and efficient, which permits it to be conducted for every new video addition. This enables scalable PR on an ever growing video dataset. In Sec. 6, we will compare our technique with state-of-the-art PR methods.
We use a dataset sourced from Mapillary  which consists of street-level geo-tagged imagery; see supplementary material for examples. Benchmarking was carried out on the Oxford RobotCar , from which we use 8 different sequences along the same route; details are provided in supplementary material, and the sequences are abbreviated as Seq-1 to Seq-8. The initial database is populated with Seq-1 and Seq-2 from the Oxford RobotCar dataset. Seq-3 to Seq-8 are then sequentially used as the query videos. To report the 6-DoF pose for a query image, we inherit the pose of the image matched using the MaxAP estimation. Following , the translation error is computed as the Euclidean distance . Orientation errors , measured in degree, is the angular difference between estimated and ground truth camera rotation matrices and . Following [21, 20, 7, 42], we compare mean and median errors.
Performance with and without updating the database
We investigate the effects of updating database on localization accuracy and inference time. After each query sequence finishes, we consider three strategies: i) No update: always contains just the initial 2 sequences, ii) Cull: Update with the query and perform culling, and iii) Cull+Combine: Full update with both culling and combining nodes. Mean and median 6-DoF pose errors are reported in Table 1. In general, Cull improves the localization accuracy over No update, since culling adds appearance variation to the map. In fact, there are several cases, in which Cull+Combine produces better results over Cull. This is because we consolidate useful information in the map (combining nodes which represent the same place), and also enrich the map topology (connecting nodes close to each other through culling). Inference times per query with different update strategies are given in Table 2. Without updating, the inference time is stable at (ms/query) between sequences, since the size of graph and the database do not change. In contrast, culling operation increases the inference time by about ms/query, and Cull+Combine makes it comparable to the No update case. This shows that the proposed method is able to compress the database to an extent that the query time after assimilation of new information remains comparable to the case of not updating the database at all.
|Training sequences||VidLoc||MapNet||Our method|
Map maintenance and visiting unknown regions
Figure 3 shows the results on map maintenance with and without compression. Without compression, size of map (specifically, adjacency matrix ) grows continuously when appending a new query video . In contrast, using our compression scheme, known places in are culled, and redundant nodes in (i.e., nodes representing a same place) are combined. As a result, the graph is compressed.
Visiting unexplored area allows us to expand the coverage of our map, as we demonstrate using Mapillary data. We set , i.e., we only accept the query frame which has the MaxAP belief . When the vehicle explores unknown roads, the probability of MaxAP is small and no localization results are accepted. Once the query sequence ends, the map coverage is also extended; see Fig. 4.
Comparison against state of the art
Our method is compared against state-of-the-art localization methods: MapNet  and VidLoc . We use the original authors’ implementation of MapNet. VidLoc implementation from MapNet is used by the recommendation of VidLoc authors. All parameters are set according to suggestion of authors.111Comparisons against  are not presented due to the lack of publicly available implementation.
For map updating in our method, Cull+Combine steps are used. MapNet is retrained on the new query video with the ground truth from previous predictions. Since VidLoc does not produce sufficiently accurate predictions, we do not retrain the network for subsequent query videos.
Our method outperforms MapNet and VidLoc in terms of the mean errors (see Table 4), and also has a smoother predicted trajectory than MapNet (see Fig. 5). In addition, while our method improves localization accuracy after updating the database (See Table 1), MapNet’s results is worse after retraining (See Table 4). This is because MapNet is retrained on a noisy ground truth. However, though our method is qualitatively better than MapNet, differences in median error is not obvious: this shows that median error is not a good criterion for VL, since gross errors are ignored.
Note that our method mainly performs PR; here, comparisons to VL methods are to show that a correct PR paired with simple pose inheritance can outperform VL methods in presence of appearance change. The localization error of our method can likely be improved by performing SfM on a set of images corresponding to the highest belief.
Table 3 reports training/updating time for our method and MapNet and VidLoc. Particularly, for Seq-1 and Seq-2, our method needs around 1.65 minute to construct the k-means tree and build the graph, while MapNet and VidLoc respectively require 11.6 and 14.1 hours for training. For updating a new query sequence, MapNet needs about 6 hours of retraining the network, whilst our method culls the database and combine graph nodes in less than 5 minutes. This makes our method more practical in a realistic scenario, in which the training data is acquired continuously.
This paper proposes a novel method for scalable place recognition, which is lightweight in both training and testing when the data is continuously accumulated to maintain all of the appearance variation for long-term place recognition. From the results, our algorithm shows significant potential towards achieving long-term autonomy.
-  (2016) NetVLAD: cnn architecture for weakly supervised place recognition. In CVPR, Cited by: §1.
-  (1997) Place learning and recognition using hidden markov models. In IROS, Cited by: §2.1.
-  (2015) Tree quantization for large-scale similarity search and classification. In CVPR, Cited by: §4.2.
-  (2017) DSAC-differentiable RANSAC for camera localization. In CVPR, Cited by: §1.
-  (2018) Learning less is more-6d camera localization via 3d surface regression. In CVPR, Cited by: §1.
-  (2018) Visual Localization: Feature-based vs. Learned Approaches. Note: https://sites.google.com/view/visual-localization-eccv-2018/home Cited by: §1.
-  (2018) Geometry-aware learning of maps for camera localization. In CVPR, Cited by: §1, §1, §2.1, §6, §6.
-  (2013) Experience-based navigation for long-term localisation. The International Journal of Robotics Research. Cited by: §1, §2.1, footnote 1.
-  (2017) VidLoc: a deep spatio-temporal model for 6-DoF video-clip relocalization. In CVPR, Cited by: §1, §1, §6.
-  (2008) FAB-map: probabilistic localization and mapping in the space of appearance. The International Journal of Robotics Research. Cited by: §1, §1, §2.1.
-  (2011) Appearance-only slam at large scale with fab-map 2.0. The International Journal of Robotics Research. Cited by: §2.1.
-  (2016) Polysemous codes. In ECCV, Cited by: §4.2.
-  (2012) Bags of binary words for fast place recognition in image sequences. IEEE Transactions on Robotics. Cited by: §1, §1, §2.1.
-  (2008) OpenStreetMap: user-generated street maps. IEEE Pervasive Computing. Cited by: §1.
-  (2014) Visual place recognition using hmm sequence matching. In IROS, Cited by: §2.1.
-  (2010) Aggregating local descriptors into a compact image representation. In CVPR, Cited by: §4.2.
-  (2011) Product quantization for nearest neighbor search. TPAMI. Cited by: §4.2.
-  (2014) Triangulation embedding and democratic aggregation for image search. In CVPR, Cited by: §4.2.
-  (2016) Modelling uncertainty in deep learning for camera relocalization. In ICRA, Cited by: §2.1.
Geometric loss functions for camera pose regression with deep learning. In CVPR, Cited by: §1, §2.1, §6.
-  (2015) Posenet: a convolutional network for real-time 6-dof camera relocalization. In CVPR, Cited by: §1, §2.1, §6.
-  (2004) Vision based topological markov localization. In ICRA, Cited by: §2.1.
-  (2018) Addressing challenging place recognition tasks using generative adversarial networks. In ICRA, Cited by: §2.1.
-  (2009) Epnp: an accurate o (n) solution to the pnp problem. IJCV. Cited by: §2.1.
-  (2004) Distinctive image features from scale-invariant keypoints. IJCV. Cited by: §4.2.
-  (2016) Visual place recognition: a survey. IEEE Transactions on Robotics. Cited by: §1, §2.1.
-  (2017) 1 year, 1000 km: the oxford robotcar dataset. The International Journal of Robotics Research. Cited by: §6, §8.1.
-  (2012) SeqSLAM: Visual route-based navigation for sunny summer days and stormy winter nights. In ICRA, Cited by: §2.1.
Scalable nearest neighbor algorithms for high dimensional data. TPAMI. Cited by: §4.2, §4.2.
-  (2017) The mapillary vistas dataset for semantic understanding of street scenes.. In ICCV, Cited by: §1, §1, §6.
-  (2018) Adversarial training for adverse conditions: robust metric localisation using appearance transfer. In ICRA, Cited by: §2.1.
-  (2018) Practical motion segmentation for urban street view scenes. In ICRA, Cited by: §3.
-  (2016) Artificial intelligence: a modern approach. Malaysia; Pearson Education Limited,. Cited by: §2.1, §4, §4.
-  (2017) Efficient & effective prioritized matching for large-scale image-based localization. TPAMI. Cited by: §1, §2.1.
-  (2018) Benchmarking 6DOF outdoor visual localization in changing conditions. In CVPR, Cited by: §1, §2.1, §3, §6.
-  (2018) Semi-parametric topological memory for navigation. In ICLR, Cited by: §2.1.
-  (1998) A probabilistic approach to concurrent mapping and localization for mobile robots. Autonomous Robots. Cited by: §2.1.
-  (2005) Probabilistic robotics. Cited by: §2.1.
-  (2015) 24/7 place recognition by view synthesis. In CVPR, Cited by: §4.2.
-  (2015) 24/7 place recognition by view synthesis. In CVPR, Cited by: §2.1.
-  (2017) Image-based localization using lstms for structured feature correlation. In ICCV, Cited by: §2.1.
-  (2018) DeLS-3d: deep localization and segmentation with a 3d semantic map. In CVPR, Cited by: §6.
8 Supplementary Material
8.1 Statistics of Oxford RobotCar dataset
8.2 Sample images of Mapillary
Sample images from our Mapillary dataset are shown in Figure 6