BTEL: A Binary Tree Encoding Approach for Visual Localization
Huu Le Tuan Hoang Michael Milford


[NO \title GIVEN]
    [NO \author GIVEN]
    December 30, 2023
======================

empty
empty



        
        
        Visual localization algorithms have achieved significant improvements in performance thanks to recent advances in camera technology and vision-based techniques. However, there remains one critical caveat: all current approaches that are based on image retrieval currently scale at best linearly with the size of the environment with respect to both storage, and consequentially in most approaches, query time. This limitation severely curtails the capability of autonomous systems in a wide range of compute, power, storage, size, weight or cost constrained applications such as drones. In this work, we present a novel binary tree encoding approach for visual localization which can serve as an alternative for existing quantization and indexing techniques. The proposed tree structure allows us to derive a compressed training scheme that achieves sub-linearity in both required storage and inference time. The encoding memory can be easily configured to satisfy different storage constraints. Moreover, our approach is amenable to an optional sequence filtering mechanism to further improve the localization results, while maintaining the same amount of storage. Our system is entirely agnostic to the front-end descriptors, allowing it to be used on top of recent state-of-the-art image representations. Experimental results show that the proposed method significantly outperforms state-of-the-art approaches under limited storage constraints.





§ INTRODUCTION



Visual place recognition plays a crucial role in many computer vision and robotics applications, as it underpins a wide variety of fundamental problems, including self-localization <cit.>, loop-closure detection, large-scale structure from motion. Based on the visual information obtained from an RGB(-D) image captured by a camera (or a depth sensor), the goal is to identify the camera location within a pre-defined map.  This research topic has gained much attention recently, where several methods have been introduced that can achieve impressive localization results, even for challenging datasets containing large amount of images and undergoing extreme changes in visual conditions <cit.>.

In contrast to the structure-based approaches <cit.>, which involve building 3D point clouds that represent the map and conducting 2D-3D matching during the query stage to search for the camera positions and orientations, retrieval-based techniques <cit.> make use of visual similarity between image descriptors to assist the localization process. Methods based on image retrieval usually cast visual place recognition as a special instance of nearest neighbor search, i.e., the query image is compared against all instances in the database and its nearest neighbors is used to infer the query location.  In recent years, the use of visual similarity search algorithms has proven to be of significant impact to a large number of works on visual localization for robotics navigation <cit.> and autonomous driving <cit.>. Retrieval-based approaches are also more feasible in a large range of application domains with limited access to data from Global Navigation Satellite Systems (GNSS) and Visual Inertial Odometry (VIO) such as underground mining, tunnels and indoor localization. In addition to the traditional methods for visual place recognition such as SeqSLAM <cit.> or FAB-MAP <cit.>, the main contributing factors to the recent success of visual similarity search are arguably the advances in learning image representations <cit.>, the strong developments in state-of-the-art quantization techniques and novel indexing methods <cit.> that allow querying in large-scale databases.














Although the aforementioned quantization and indexing techniques have substantially reduced the overall storage footprint and query time, their required memory to store the compressed data must increase linearly with the database size (i.e., number of training images). More specifically, regardless of the size of the compressed code vector, one code per training sample must be stored in the database. Therefore, when the number of training images in the database grows, the storage must also grow at least linearly. In addition, existing quantization approaches need large code-books in order to achieve satisfactory retrieval results, which in turn increases the total amount of storage required.



Recently, a sub-linear encoding algorithm was proposed in <cit.>, which makes use of the cyclic patterns to encode the scenes for the task of visual localization. However, this rhythmic representation approach can only work with applications where the scenes undergo small changes, which makes it impractical for large-scale datasets in varying visual conditions (e.g., day/night, weather or seasonal changes). Moreover, the requirement that the number of cyclic patterns must be co-prime causes much difficulty in choosing the parameters and leads to unnecessary storage being wasted during the training process. These weaknesses of <cit.> are also thoroughly addressed by our novel encoding approach.

Due to the growing demand of deploying visual search algorithms to mobile phones and robotic systems with limited storage capacity, there has been strong desire for storage-efficient encoding algorithms. For several applications such as long-term localization <cit.>, the continuous stream of data from sensory devices may result in an exponential growth of training storage. The development of storage-efficient encoding algorithms, especially algorithms that scale sub-linearly with the training data, would aid in the applicability of state-of-the-art visual localization techniques to real-world environments. More generally and regardless of the absolute hardware constraints, sub-linear storage growth enables either improved scaling in operational envelope, an increase in the sophistication and complexity of information stored per place or a reduction in the computational and storage requirements in comparison to traditional methods.

In this work, we address the aforementioned weaknesses of the existing encoding methods by introducing a new tree encoding approach that combines both quantization and indexing into one unified framework.   The main contributions of our work can be summarized as follows:

    
  * We propose a novel binary tree encoding (BTEL) method to directly learn the location from the image descriptors. Unlike existing techniques that store one code vector per training sample, our method only stores the training parameters, resulting in a significant reduction in storage footprint, while the performance is comparable to state-of-the-art techniques <cit.>.
    
    
  * We exploit the redundancy of the visual information encoded in image descriptors to derive a novel feature selection technique that significantly reduces the dimensionality of the feature vectors while maximizing the separability of the data. This approach yields a drastic reduction in memory footprint, training and querying times.

Note that although our method utilizes a tree structure, it is fundamentally different from conventional tree-based methods for place recognition such as vocabulary tree <cit.> or traditional decision tree classifiers, as they require the number of nodes to scale at least linearly with the amount of training data. With our proposed method, the encoding storage can be easily adjusted to satisfy the budget requirements in different applications, which makes it suitable for the deployment to devices with different storage and computational capabilities. Our method is able to achieve competitive localization results compared to state-of-the-art approaches under the storage constraint of 0.5MB. Moreover, our method is agnostic to the type of input features, allowing state-of-the-art image descriptors such as NetVLAD <cit.>, DenseVLAD <cit.> to be used. 
Compared to <cit.>, which is the first method that achieves sub-linear storage growth for visual place recognition, our work proposes a more advanced encoding mechanism that achieves better  performance in terms of accuracy, scalability, and robustness to environmental changes.





















§ RELATED WORK


 Many retrieval-based algorithms have been developed in the literature for visual localization that yield impressive results <cit.>. To reduce the storage and increase robustness to environmental changes, one of the research directions is to develop global image descriptors that can be employed to measure image similarity. Usually, a global image descriptor is generated by aggregating hand-crafted features, and the similarity between images are computed by measuring the cosine distances between their descriptor vectors. Apart from hand-crafted features, several works <cit.> utilize convolutional neural networks to extract more discriminative global image features. Recently, the use of binary embedding <cit.> has been demonstrated to be a promising direction, which allows a query image to be quickly compared with other images in the database by measuring hamming distances between binary vectors. However, although binary descriptors enable high compression ratio, each place in the map needs to be associated with one vector, thus the absolute memory must still scale at least linearly with the environment. Our method allows the above image representations, including binary representations to be further encoded so that sub-linear storage growth can be achieved.

In the realm of quantization-based approaches, Vector Quantization (VQ) <cit.> can be considered as the prime method that lays the foundation for several source coding and retrieval tasks, not only in vision but also in other signal processing applications. 

To improve the effectiveness of VQ, several variants have been proposed <cit.>.  However, in terms of storage scalability, these methods still require the memory to grow linearly with the number of images in the database, since each data instance needs to be encoded by a vector indicating the code-book indexes.

Several tree-based methods have also been introduced in the literature for scalable visual place recognition such as the vocabulary tree technique proposed in <cit.>. However, similar to other quantization approaches, the number of leaf nodes in these approaches must grow linearly with the number of data instances in the database, and each node must store the indexes of the instances belonging to its children.  Therefore, the required memory must grow at least linearly with the amount of training data. Similarly, approaches that are based on traditional decision tree classifiers also require at least linear storage growth, since the number of leaf nodes is proportional to the number of places. In contrast to the above tree-based techniques, our method achieves sub-linear storage growth by encoding training data into a special tree structure. In addition, the training and inference processes of our technique can be performed efficiently, resulting in a storage-efficient algorithm for visual place recognition.











§ APPROACH


This section provides a detailed treatment for the proposed encoding algorithm.

Given a training data set ={_i}_i=1^N containing N data points, where each data instance _i is a d-dimensional image descriptor, the objective of our algorithm is to learn a localization function f(·) such that the location of a query image representation  can be best predicted by f(). For simplicity, we assume that the training data has already been sorted and pre-processed as a continuous stream so that the index i of a vector _i ∈  represents its map location (the terms “location” and “database index” may also be used interchangeably throughout our discussions).


Traditional approaches for retrieval-based localization typically consider obtaining f() by nearest neighbor (NN) search (by either direct search or indexing techniques), as the location of a query vector  can be approximately identified based on the index of its nearest neighbor in the training dataset. Mathematically speaking, the location ĩ_ of a query vector  can be obtained by

    ĩ_ = f() = min_i - _i_2,

where each _i ∈ is a data instance in the training dataset and ·_2 denotes the ℓ_2 Euclidean distance. Although the solution to (<ref>) can be obtained by a simple linear scan over the training set, this task becomes computationally expensive when N and the dimensionality d are large, as the complexity for the linear search is O(Nd) (in practice, d is commonly greater than 1024 and the dataset can contains up to millions of images). As briefly reviewed in Sec. <ref> and <ref>, this problem is alleviated by the use of approximate nearest neighbor (ANN), in which methods such as ITQ <cit.>, PQ <cit.> and other variants of PQ such as OPQ <cit.> are used in combination with efficient indexing methods <cit.>. However, due to the fact that the compressed representations of the training data must be stored, the scalability of existing methods remains an issue that needs to be addressed when the size of the training database grows.

In contrast to conventional techniques that compress the original image descriptors to embedding vectors and then conduct the nearest neighbor search (<ref>) over the compressed data, we propose a novel mechanism to directly learn the index of a vector in the database. This enables us to jointly learn both the quantization and indexing of the training data. Specifically, from the given training dataset , we learn the function f(·):^d↦ that predicts the location of a feature vector. During inference, the location of a query vector ∈^d can be directly obtained by computing f(). Our method comprises two main steps: Binary Tree Encoding and Tree Learning, which will be discussed in the following sections.




 §.§ Binary Tree Encoding


Our tree encoding approach is inspired by the conventional binary search method for one dimensional sorted arrays. To better illustrate the core idea underlying our encoding method, consider an example dataset containing N=8 training images as shown in Fig. <ref> (note that the data instances are indexed from 0 to N-1). For each vector in the training dataset, we denote by h(·):^d ↦{0,1}^b the operation that converts its index (in decimal representation) to the corresponding binary representation, where b is the number of bits in the binary number (N ≤ 2^b). As illustrated in Fig. <ref>, the value of b is 3, while h(_0) = 000, h(_1) = 001, …, and h(_7) = 111. Furthermore, observe that if the values of h(_i) are written vertically as shown in Fig. <ref>, it is a well-known fact that the arrangement of the 0 and 1 bits in the binary representations naturally forms a binary tree, which is further illustrated in Fig. <ref>. The number of levels in the tree is b+1, where the first level (level 0)  is the root node containing all the data points. Except for the leaf nodes, each node in the tree consists of two child nodes: zero-node (or left child, colored in green) and one-node (or right child, colored in yellow in Fig. <ref>).

Starting from the root node containing the whole training dataset, similar to conventional binary search, the vectors are recursively partitioned as follows. At a particular level l, the left child (zero-node) contains all data points from its parent node having the l-th bit in their binary representations being 0 (note that the indexes of the bits start from 1). The same applies to the right child (one-node), but for data points from the parent node having the l-th bit in their binary representations being 1. Take for instance level 1 shown in Fig. <ref>, the left child node contains {_0, …,_3} because the first bit of these data points are 0, while {_4, …,_7} belongs to the right child since their first bit are 1. The same division procedure applies to other nodes further down the tree.



 §.§ Tree Training


Next, based on the introduced tree structure, we describe two training schemes to learn the parameters for the localization task. The pros and cons of each training scheme will also be discussed in detail and validated in the experiments.




  §.§.§ Full Training
 This scheme follows closely the traditional binary search, in which each parent node in the tree is associated with a binary classifier. Formally, at node j (the nodes are numbered from top to bottom, left to right, starting from 0, as illustrated by red numbers in Fig. <ref>), a classifier f̃_j(·) is learned, where the training data of f̃_j(·) consist of data points belonging to that particular node. The training label of each data point _i is the (l+1)-th bit of h(_i), where l is the level in the tree to which node j belongs. In Fig. <ref>, for example, the training data for node 2 includes {_4,⋯,_7}, and the label vector – since node 2 belongs to level 1 – is the values of the second bit in the indexes' binary representations, i.e., [0,0,1,1], as shown in Fig. <ref>. 



Once all the node classifiers are successfully trained, given a query vector , its location is identified by a binary-search-like inference process. Specifically, we pass  down the tree, starting from the root node (node 0), until reaching a leaf node. At termination, the index of the data point associated with the final leaf node is returned as the location of . Intuitively, at node n, we use the trained classifier f̃_n(·) to predict whether  should be sent to the left or right child. This evaluation process is recursively repeated until a leaf node is reached. 



  §.§.§ Compressed Training
 
Using the full training scheme, the number of classifiers that need to be trained is O(2^b), where b is the number of bits in the binary representations. Therefore, the memory complexity is O(N), since N≤ 2^b (assuming that the memory complexity of each classifier is O(1)). For example, in Fig. <ref>, with N=8, seven different classifiers associated with node 0 to node 6 must be trained. Thus, although the time complexity of the inference is O(log N), this full training scheme requires the storage to scale at least linearly with N. In this section, we show an improved scheme that requires sub-linear storage complexity.





This compressed training scheme aims to reduce the overall required memory such that the memory is sub-linear with respect to the database size N. Particularly, rather than training O(2^b) classifiers as in the full training scheme, we propose to train only b binary classifiers corresponding to b levels of the tree (from level 1 to level b). This scheme is based on the observation in Fig. <ref> that the prediction of each bit in the binary representation can be cast as a binary classification problem. The additional advantage of this training scheme is that b classifiers corresponding to b levels of the tree can be trained in parallel. Specifically, with a dataset requiring b bits in the binary representations, we train b binary classifiers {g_j(·)}_j=1^b, where g_j is associated with level j of the tree. The training data of each classifier g_j(·) is the whole training dataset {_i}_i=1^N, while the binary label for each data instance _i is the j-th bit of h(_i). During inference, the combination of results obtained from g_j() gives the predicted location of a query vector . In particular, the predicted location ĩ_ is computed by

    ĩ_ = h^-1([g_1() … g_b() ]),

where h^-1(·) denotes the conversion of a binary number into its corresponding decimal value.

Using this compressed training scheme, the memory complexity is O(log N), since only b classifiers are required. Several machine learning approaches can be employed to train the binary classifiers as previously discussed. In this work, to maintain O(log N) memory complexity, the classifier type is chosen such that its required memory is independent of N. Therefore, we employ linear Support Vector Machines (SVM) as binary classifiers, as each binary SVM requires to store a (d+1) dimensional hyper-plane. 
Since we employ SVM for tree encoding, our training schemes aim to minimize the number of places that are misclassified instead of the information gain metric that is commonly employed by traditional decision tree classifiers.






 §.§ Dimension Reduction


Observe that the introduced training schemes use the original feature vector _i ∈^d to train the classifiers. Consequently, the overall memory depends on the dimensionality of the image descriptors. In this section, we introduce a feature selection technique to further reduce the storage footprint by using only a small subset of the feature map for training. This technique can be applied before training any binary classifier discussed in Sec. <ref>.

The core idea is that, rather than using the original feature vectors {_i ∈_d}_i=1^N as input training data, we extract in each vector _i a subset containing d' (d' ≤ d) elements to form new training data points {_i' ∈^d'}_i=1^N. Let ∈^N× d be the matrix containing all the training data where each row of  is a data instance, and let y_i∈{0,1} represent the label of _i. Dimension reduction involves selecting d' columns of  (d' ≤  d) such that the linear separability of the data points in the reduced subspace (i.e., ^d') 
is maximized, which is illustrated in Fig. <ref>. 

Note that our dimension reduction scheme is different from traditional unsupervised dimensional reduction strategies such as Principal Component Analysis (PCA) since PCA only projects data into principal components such that the variances are maximized, while the labels are not taken into account. Therefore, the use of PCA does not maximize the linear separability as proposed by our technique.


Our subspace extraction technique is inspired by several works on feature selection for K-Means clustering <cit.>. However, here we consider a simplified version in which we assume that the dataset has been divided into two clusters _0 and _1, where _l = {_i ∈ | y_i = l}, l∈{0,1}, where y_i refers to the label associated with the data point _i for a particular tree level and we only solve the feature selection problem. 


Formally, the task of selecting d' columns can be done by learning a weight vector ∈^d that solves the following problem <cit.>

    min_∈^d      ∑_l = 0^1∑_j = 1^d∑_,∈_l, ≠_j (_j - _j)^2,
       s.t.      ^2_1 + … + ^2_d ≤ 1, 
        |_1| + … + |_d| ≤ s, 
         _j ≥ 0   ∀ j,

where s is a tuning parameter. In our experiments, we choose s=0.1. Intuitively, by optimizing the objective of (<ref>), we are selecting d' columns of  so that the within-cluster sum of squares (WCSS) of the data points are minimized. The weight _i of each column reflects the importance of that particular column in the selection process.
Following <cit.>, we employ soft-thresholding  technique to solve (<ref>). Once the vector  is obtained, d' elements in  with the largest weights are selected as the indexes of extracted columns in the database matrix .




 §.§ Training Data Clustering with Sequence Summarization



In several localization applications, a vehicle may drive through several regions, where images captured in each region are relatively similar <cit.>. Thus, to improve the localization, we propose to divide the training dataset  into r sub-datasets {_k}_k=1^r, where each dataset _k contains training images in region k, which is illustrated in Fig. <ref>. In our work, this region division is achieved by a novel adaptation of the video summarization technique proposed in <cit.>. After obtaining r different datasets, each dataset is individually encoded using the method described in Sec. <ref>. Particularly, for each sub-dataset _i,  we learn a function f_i(·) that serves as a sub-localizer for that particular region.

As the original dataset is now partitioned, during the inference process, the algorithm needs to know which region _k the vehicle is currently in so that the right classifier f_k(·) is used. In real-world scenarios, one can make use of information from GPS sensors to achieve this coarse estimation. In our work, for completeness, we propose to learn the region information by an additional multi-class SVM classifier ℛ(·). The training data of ℛ(·) is the original dataset  and the label of each instance is the region in which it belongs. In general, the use of data clustering can be considered as a hybrid of the Full Training and Compressed Training schemes introduced in Section <ref>, where Full Training is used for the first level, and Compressed Training is used within each Full Training leaf.







§ EXPERIMENTAL RESULTS




In this section, we conduct several experiments to evaluate the performance of our proposed encoding methods compared to existing state-of-the-art approaches. In addition, we provide a detailed analysis on the algorithm's characteristics under the effect of varying parameter settings, e.g., the reduced dimension d', the number of regions r, and the scalability of the method for increasing database sizes. A Python implementation of our algorithm is provided at: https://tinyurl.com/y5y9x8nj


 §.§ Dataset and Evaluation Metric

We benchmark our algorithm on the Nordland dataset[https://nrkbeta.no/2013/01/15/nordlandsbanen-minute-by-minute-season-by-season/], which is captured from a front-facing camera installed at the front of a train running for around 10 hours long. Four video sequences are collected through four seasons of the year: fall, summer, spring and winter (for brevity, we use the name of the season to refer to the corresponding sequence). 

For each sequence, we extract a subset containing 8,200 frames covering the whole traversal (with identical distance between frames) for our experiments. Each frame in the sequence is described by DenseVLAD <cit.>, which is among the state-of-the-art descriptors for visual place recognition, resulting in feature descriptors having dimensionality of d=4096. 

Following <cit.>, we evaluate the performance of all the methods by measuring the percentage of correctly localized images  (recall rates), with a tolerance of t meters. Specifically, a query vector  is considered to be correctly localized if the predicted location is t meters away from the ground-truth location. For the Nordland dataset, an error of 200 meters correspond to approximately 10 frames in our database. 

Since we focus on demonstrating the efficiency in terms of storage of the methods, we compare our  methods (including Full Training and Compressed Training scheme) against several state-of-the-art quantization techniques that are commonly used in retrieval-based localization, including ITQ <cit.>, PQ <cit.> and OPQ <cit.>, where a query image is localized using approximate nearest neighbor search. Note that to obtain the best performance of these quantization methods, we use exact nearest neighbor search, i.e., linear scan over the code vectors. In addition, we also compare our algorithm with the Rhythmic Representation method (RYTH) proposed by Yu et al. <cit.>, which is the first method to achieve sub-linear storage growth. To obtain baseline results produced by non-compress methods, we also compare our method against SeqSLAM <cit.> and the localization results obtained from brute-force nearest neighbor search of the descriptor vectors.   



 §.§ Localization Accuracy



This section evaluates the localization accuracy of the methods with a fixed amount of memory, in which we will show that our system achieves competitive localization accuracy compared to state-of-the-art quantization approaches and significantly outperforms the sub-linear storage algorithm proposed in <cit.>.

In this experiment, for each sequence, we use the first 2000 frames in the set of extracted frames (we test with 2000 frames so that RYTH <cit.> achieves meaningful results, since its recall is almost zero when N>2000. Experiments with larger N will be conducted in the following sections). We train all methods on the Fall sequence and test the localization on the three remaining sequences (i.e., Spring, Summer and Winter). To simulate the settings with limited storage budget, we adjust the parameters such that the required storage footprint of each method is not greater than 2MB. Fig. <ref> shows the results, where we plot the accuracy of the methods with the error tolerance t ranges from 0 to 1600 meters. Note that for our method (BTE), we also show the results for both the full training scheme (BTE-F) and the compressed training scheme (BTE-C).  Fig. <ref> shows the result for the same experiment, but the methods are trained on Summer and tested on the three remaining sequences.

Under a tight memory constraint (≤ 2MB), our compressed training scheme (BTE-C) significantly outperforms other competitors. Moreover, as shown in Fig. <ref>, although achieving sub-linear storage growth, RYTH <cit.> does not provide satisfactory localization results for datasets with visually changing conditions. In contrast, our approach (BTE-C) has demonstrated a significant improvement in terms of accuracy, while also achieves a sub-linear storage growth. This shows the effectiveness of our proposed tree encoding in combination with the feature selection and sequence summarization scheme. 
Compared to the baseline results (without compression) obtained from brute-force nearest neighbor search and SeqSLAM, our method achieves a compression ratio of 6× 10^-5 and experiences drops in the overall performances. However, the achieved performance shown in Fig. <ref> are still useful in several applications.

From the results plotted in Fig. <ref>, we also show that the full training scheme (BTE-F) is not necessary, as the results of BTE-C is better than that of BTE-F by a large margin. This is because in order to satisfy the memory constraint, the dimensionality of the training data in each node must be reduced to an extend that it no longer captures the data association. This also reveals the disadvantages of methods with linear storage growth to deal with massive amount of training data under a limited memory budget. Similarly, for quantization methods such as OPQ, PQ and ITQ, besides the fact that each training data instance must be associated with a code vector (which scales linearly with the training size), the code-books, each containing many code-words must also be stored. It has been empirically shown that in order to achieve better accuracy, one should use the large code-books. However, if the memory is limited, the number of code-books and code-words must be reduced, resulting in the degradation in overall performance.

As BTE-C has proven to be much better than BTE-F, in the sequel, we focus on the evaluation of BTE-C and refer to this method as BTE for brevity.


 §.§ System Scalability


In this analysis, we show how well the methods perform as the number of training data grows with a fixed amount of storage. We enforce a tight memory constraint of ≤0.5MB, then execute the methods with increasing training and testing sizes when the number of training and testing images N increases from  64 to 8200 frames. The results are plotted in Fig. <ref> (left), where we compare BTE with OPQ <cit.> and RYTH <cit.>. As can be seen, when N is small, our method provides equivalent results compared to OPQ. However, as N increases, OPQ's performance starts to drop, and our method is more accurate. 

We repeat the experiment with a fixed database size of N=8200 and vary the storage budget from 5MB to 0.5MB. The results are shown in Fig. <ref> (right), where our method demonstrates better scalability compared to OPQ and RYTH.


Fig. <ref> also shows that BTE achieves not only better localization accuracy but also better scalability than RYTH. In fact, the accuracy of RYTH drops much faster and when N>2000, its accuracy is almost zero. This also confirms that our method serves as a better alternative for RYTH in applications that require sub-linear storage growth.



 §.§ Sequence Filtering

In several visual SLAM applications, it has been shown that the use of Sequence Filtering (SF) can significantly improve the localization accuracy by utilizing the temporal information between consecutive frames <cit.>. Our proposed encoding method is also amenable to such filtering approach. 
In particular, our results can be corrected by utilizing the predicted locations for consecutive frames within a running window with the size of a frames. When a new query frame  arrives at the system, its predicted location i_ is compared against the median predicted location m_ of 2a previous frames. If the predicted location i_ is more than (a+1) frames away from the median m_, the prediction is considered wrong and corrected by i_ = m_ + a + 1. 

Fig. <ref> shows the results of BTE with and without filtering for N=5000 frames and two different window sizes of a=5 and a=20 frames. Observe that the use of temporal information obtained from sequence filtering has considerably improved the localization results. Note that the use of a sequence filter does not increase the total required storage, as only temporary memory to store 2a frames is needed during inference. SF provides an additional user-determinable trade off, as one may reduce the total required storage and accept a poorer single frame accuracy, but it can be compensated during run-time by SF with large window size.



 §.§ Parameter Analysis

Next, we analyze the performance of our algorithm under varying parameter settings. The experiments in this section are  conducted on the extracted 8200 frames in each sequence. In the first experiment, we evaluate the performance of the system under the effect of feature selection, where the ratio of the reduced dimension over the original dimension c=d'/d varies from 0.1 to 1. The results for different error tolerance are plotted in Fig. <ref>. Observe that our method achieves good localization results even when d' = 0.1d, due to the ability our feature selection scheme to obtain good features to train the classifiers, without the need to use the whole feature vector as proposed in <cit.>. This is among the key factors allowing our system to achieve much better performance while the memory footprint is significantly smaller than <cit.>.


As shown in Fig. <ref>, when d' increases, the system achieves better localization results. However, observe that starting from the point where d'=0.4d, the increase in performance is no longer significant. This demonstrates that our scheme is able to exploit redundancy in the feature vectors, and also further explains why our proposed method is able to achieve both high compression ratio and high localization accuracy. 
The experiment with the number of clusters r fixed to 1 also demonstrates the applicability of our tree encoding mechanism even without clustering of the training data.



In the next analysis, we study the system's performance with varying values of r. We fix the values of d' = 0.1d and execute the methods when r increases from 1 to 20. The results are shown in Fig. <ref>. Note that when r increases, the system achieves better performance since the trees corresponding to the sub-regions can be better trained with location-specific data.  Fig. <ref> also shows that BTEL achieves satisfactory performance, even for r<10, which demonstrates the usefulness of the underlying tree structure, while the clustering of the training data can be optionally employed to improve the overall performance.




§ CONCLUSION AND FUTURE WORK

We have presented a novel binary tree encoding approach for visual localization that achieves both sub-linear storage growth and sub-linear query time with respect to the number of images in the training database. By combining our novel encoding approach with efficient feature selection and sequence summarization, our method outperforms existing state-of-the-art approaches under limited storage constraint. Compared to the recently proposed method <cit.> for sub-linear storage, our method provides substantially better localization accuracy and requires much less storage footprint. Moreover, our method is more robust to changes in visual conditions. The encoding scheme also allows the memory to be easily configured to suit the application at hand. Also, the fact that our system is agnostic to the input descriptors enables our method to be used in several real-world applications where the environments undergo drastic changes in visual conditions by taking advantage of state-of-the-art global image descriptors. Additionally, the localization results can also be boosted by and optional sequence filtering technique.

Future work can consider the methods for improving the linear classifiers. 

One promising direction is to investigate the integration of per-location calibration as suggested in <cit.> to the existing tree structure in order to achieve sub-linear storage growth. Our proposed algorithm has the potential to be used in other application domains such as voice recognition, face and object recognition, as long as good global descriptors are provided, which can also be further explored in future work.





IEEEtran





