Visual location identification framework based on unified converter
By adopting the unified transformer's training framework and parallel computing in visual place recognition technology, and integrating the global retrieval and reordering module, the time and storage problems in large-scale image processing are solved, and efficient visual place recognition is achieved.
Patent Information
- Application Number
- CN202410391981.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-04-06
- Filing Date
- 2024-04-02
- Publication Date
- 2024-10-15
AI Technical Summary
Existing visual place recognition technology consumes large inference time and memory when processing large-scale queries and reference images, and cannot be extended to real-world applications with high QPS and large-scale reference databases.
Using a training framework based on a unified transformer, through the integration of the global retrieval module and the reordering module, linear layers are used for dimensionality reduction, and parallel computing is performed on multiple GPUs to extract and process global features and local features, reducing the number of features. Improve computing efficiency.
It significantly improves the performance of visual place recognition, reduces inference time and memory consumption, and outperforms existing technologies on a wide range of VPR data sets, increasing the speed by more than 20 times and reducing memory consumption to 22%.
Smart Images

Figure CN118779482A_ABST
Abstract
Description
Technical Field
[0001] Embodiments described herein generally relate to a unified framework, training, and implementation for visual place recognition. Background Art
[0002] Visual place recognition (VPR) is a technique for finding the location of a query image by matching it with reference images whose corresponding locations are known.
[0003] Traditional implementations for visual place recognition usually utilize aggregated convolutional neural network (CNN) features for global retrieval of reference images and utilize random sample consensus (RANSAC) based geometric verification to re-rank the reference images. Summary of the invention
[0004] In an example embodiment, a unified transformer-based visual place recognition (VPR) training framework includes a trainable feature retrieval transformer module that extracts global features and local features from a query image, extracts global features and local features from a reference image, and trains a global retrieval transformer based on the global features extracted from the query image and the global features extracted from the reference image. The VPR training framework also includes a trainable re-ranking transformer module that trains at least one re-ranking transformer based on the local features extracted from the query image and the local features extracted from the reference image.
[0005] According to at least one other example embodiment, a method for training a unified transformer-based visual place recognition (VPR) framework includes: encoding linear representations of multiple portions of a query image, encoding randomly initialized category words of the query image, encoding linear representations of multiple portions of a reference image, encoding randomly initialized category words of the reference image, training a global retrieval transformer based on the encoded category words of the query image and the encoded category words of the reference image, and training at least one reordering transformer based on at least a portion of the encoded linear representations of the multiple portions of the query image and at least a portion of the encoded linear representation of the reference image.
[0006] According to at least one other example embodiment, a unified global retrieval and re-ranking framework for implementing visual place recognition (VPR) includes a global retrieval module, which is trained by encoded category words with global features of a query image and by encoded category words with global features of a reference image, and the re-ranking module is trained by encoded block words with local features of the query image and by encoded block words with local features of the reference image. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] In the following detailed description, embodiments of the unified transformer based visual place recognition (VPR) training framework are described as examples only, as various changes and modifications will become apparent to those skilled in the art from the following detailed description. The same reference numerals are used in different drawings to indicate similar or identical items.
[0008] Figure 1 A non-limiting example system in which a unified transformer-based visual place recognition (VPR) training framework may be implemented is shown, arranged in accordance with at least some embodiments described and recited herein;
[0009] Figure 2 shows a non-limiting example of a global retrieval module corresponding to a unified transformer based VPR training framework in accordance with at least some embodiments described and recited herein;
[0010] Figure 3 shows a non-limiting example of a reordering transformer module corresponding to a unified transformer based VPR training framework in accordance with at least some embodiments described and recited herein;
[0011] FIG. 4 illustrates a non-limiting example of a process flow for training a unified transformer based VPR training framework according to at least some embodiments described and recited herein;
[0012] Figure 5 An illustrative computing embodiment is shown in which any of the processes and sub-processes of training a unified transformer-based VPR training framework may be implemented as executable instructions stored on a non-transitory computer-readable medium. DETAILED DESCRIPTION
[0013] In the detailed description that follows, reference is made to the drawings that form a part of the specification. In the drawings, similar symbols generally identify similar components unless the context indicates otherwise. In addition, unless otherwise stated, the description of each consecutive figure may refer to the features of one or more figures from the previous figures to provide a clearer context and substantive explanation of the current example embodiment. However, the example embodiments described in the detailed description, drawings, and claims are not intended to be limiting. Other embodiments may be utilized and other changes may be made without departing from the spirit or scope of the subject matter presented herein. It will be readily understood that the various aspects of the present disclosure as generally described and narrated herein and illustrated in the drawings may be arranged, replaced, combined, separated, and designed in a variety of different configurations, all of which are expressly contemplated herein.
[0014] In addition, various parts of the present disclosure may be described in terms of functional block components and various processing steps. It should be understood that such functional blocks may be implemented by any number of hardware, software, and / or firmware components configured to perform the specified functions.
[0015] Visual Place Recognition (VPR) estimates the location of a query image by matching the corresponding query image with reference images stored in a reference database.
[0016] Described and narrated herein are non-limiting examples and implementations of a unified VPR framework that handles the retrieval of candidate reference images and re-ranks the candidate reference images via a re-ranking module utilizing a novel transformer model. The re-ranking module learns to determine whether an image pair (e.g., a query image and a reference image) is from the same location, taking into account feature correlations, attention values, and xy coordinates. Current re-ranking processes require relatively large inference times and memory footprints (typically over 1 second and 1MB per image), which cannot be extended to real-world applications with large QPS (queries per second) and reference databases (>1M images). However, according to the non-limiting examples and implementations described and narrated herein, a data-driven module can be utilized to learn geometric information and task-related information to further improve performance, while outperforming prior art methods on major VPR datasets while reducing inference time and memory consumption.
[0017] The VPR training framework described and described herein is end-to-end trainable; however, according to the non-limiting example embodiments described and described herein, the global retrieval module and the reordering module are trained separately to promote stable convergence and a high level of accuracy. In addition, the reordering module as described and described herein can be adopted as a general component on other transformer backbones.
[0018] In this description and narrative, the following terms may provide context for the embodiments described, described, and / or suggested herein; and in addition to their accepted meanings, may be used as follows.
[0019] Machine learning refers to the technology associated with a computer or processor that, after learning or training, makes decisions and / or actions autonomously, replacing human intervention. Machine learning can be implemented through software, i.e., algorithms and / or programs; hardware; or firmware; or any combination thereof, which supports computer vision, image understanding, image processing, natural language understanding, natural language processing, speech recognition, etc. Also included within the scope of the functions and capabilities implemented by and for machine learning and associated with the embodiments disclosed, described, and suggested herein is image detection and / or segmentation relative to an input image, multiple images, or video.
[0020] According to computer vision and image processing, image segmentation refers to a process designed, programmed or otherwise configured to segment a digital image into multiple image segments, such as patches, image regions or image objects, in order to simplify and / or change the representation of the original image into a format that is more easily managed and / or analyzed.
[0021] As disclosed and described herein based on known object detection and segmentation techniques, queries can refer to representations of objects respectively, including but not limited to input images without providing the location of the object. Each query can represent an object and have multiple representations involving classification, box regression and mask encoding in vector form at the same time. For known object detection and segmentation techniques, basic queries are fixed for different objects in each input image.
[0022] As disclosed, described and / or suggested herein, a transformer refers to a machine learning model implemented by an algorithm and / or program, hardware or firmware, or any combination thereof, for, for example, classifying, detecting, isolating and / or extracting objects and / or segments of interest, i.e., queries, in an input image, multiple images and / or video. A transformer according to the non-limiting example embodiments described and described herein may be hosted on one or more servers, numbering in the hundreds to thousands, which may be hosted on a cloud-based infrastructure.
[0023] An encoder refers to a component or module designed, programmed, or otherwise configured to receive input (i.e., query) from an input device. As described and narrated herein, an encoder can be viewed as an encoder-decoder architecture based on a transformer, such as a detection transformer (DETR), which includes an encoding layer that iteratively processes the input. More specifically, an encoder as disclosed, narrated, and / or suggested herein refers to one or more programmable components or modules designed, programmed, or otherwise configured to receive input data (i.e., query image). An encoder can be designed, programmed, or otherwise trained to iteratively extract feature vectors corresponding to potential features from input data using encoded potential codes according to a coding technique, i.e., extracted or mapped into a potential space. Non-limiting examples of extracted features may include buildings, cars, trees, street signs, surfaces, other objects, people, animals, and the like.
[0024] As disclosed, described and / or suggested herein, linear projection refers to a component or module designed, programmed or otherwise configured to use a linear mapping of a first representation to a second representation, such as mapping an image patch to a multi-dimensional vector.
[0025] An attention map is a scalar matrix that shows the relative importance of layer activations in two-dimensional (2D) spatial locations. In other words, an attention map is a grid of numbers that indicates which 2D locations are of interest, i.e., important, for a given task.
[0026] An engine or generator as disclosed, described and / or suggested herein refers to a type of software, firmware, hardware, or any combination thereof that facilitates the generation of source code or annotations to produce an element that initiates another process. In addition, or alternatively, an engine or generator may facilitate an automated process in which various software elements interact to produce a desired product, whether a physical product or a virtual product based on a natural language description, input, or other prompt. According to known AI techniques, an AI engine or generator disclosed, described and / or suggested herein is trained according to a unimodal or multimodal training model.
[0027] As disclosed and described herein, a social media application refers to an online application that allows account holders to use a variety of media and interact with each other at different scales, such interaction including creating and / or sharing media content. As disclosed and described herein, a user's device may have an instance of a locally stored social media application account, or the user's account may be accessed via a web-based version of a particular social media application.
[0028] A platform (e.g., a social media platform) as disclosed and described herein refers to an application on which algorithms and / or programs that enable the execution or implementation of a collection of communication or media sharing technologies can be hosted. In addition, any algorithm or program described, described, or suggested herein can be executed by one or more processors hosted on such a platform. Non-limiting examples of such technology can include the creation, sharing, and / or storage of multimedia offerings.
[0029] As referred to herein, media or multimedia, offerings or experiences may include, but are not limited to, recorded or real-time transmittable content, including text, audio, images, animations, video, etc. In addition, such offerings or experiences may include, but are likewise not limited to, interactive augmented reality (AR) and / or interactive virtual reality (VR) experiences.
[0030] Figure 1 A non-limiting example system in which a unified transformer-based visual place recognition (VPR) training framework may be implemented is shown, arranged in accordance with at least some of the embodiments described and narrated herein. Although illustrated as discrete components, various components may be divided into more components, combined into fewer components, or eliminated entirely while being contemplated within the scope of the disclosed subject matter. Those skilled in the art will appreciate that each function and / or operation of a component may be implemented separately and / or collectively by various hardware, software, firmware, or any combination thereof.
[0031] According to non-limiting example embodiments, described and narrated herein is the integration of global retrieval and re-ranking into a simple, efficient and effective unified transformer-based framework. Global retrieval is implemented based on category tokens without an additional aggregation module, and other image tokens are used as local features. Unlike geometric verification that focuses on geometric information between local feature pairs, the non-limiting example embodiments described and narrated herein input the correlation, coordinate and attention information between all local feature pairs into the transformer module, so that the global retrieval module learns task-related information used for re-ranking.
[0032] The executable components or modules for global retrieval and re-ranking are either trained in an end-to-end manner or alternatively tuned with more stable convergence.
[0033] The reordering module described and narrated herein can also be employed on other neural network or transformer backbones. In addition, the embodiments and methods described and narrated herein are superior to prior art methods of only retrieving and retrieving and reordering on a wide range of VPR data sets. Furthermore, all features and intermediate data are directly generated using transformers.
[0034] The embodiments and methods described and narrated herein implement efficient design and application of linear layers for dimensionality reduction, i.e., 256 and 500×131 for global and local feature dimensions, and 32 for the transformer dimension of the reordering module; therefore, the embodiments and methods are significantly faster (>4.7×QPS) than known methods, and consume much less memory, e.g., (<22%). As described and narrated herein, global and local features are extracted only once from a common repository, and the reordering of the top candidates is completed with one forward pass by determining the reordering scores for all candidate pairs in parallel within a batch. Parallel computing on multiple GPUs further improves the reordering speed, which is more than 20 times faster than known methods.
[0035] As depicted, system 100 includes an input device 2 and a unified transformer-based visual place recognition (VPR) training framework 8, which can be hosted on, for example, a media platform. Framework 8 includes at least a global retrieval component or module 10 and a reordering component or module 20. According to at least some non-limiting example embodiments, framework 8 also includes a memory 30.
[0036] The VPR framework 8 can be hosted on a media platform or remotely and communicatively corresponds to a media platform, including but not limited to a social media platform. In addition, or alternatively, the VPR framework 8 can be implemented according to an online application that allows account holders to use various media and interact with each other on different scales, and this interaction includes creating and / or sharing media content. As disclosed and described herein, the device 2 can have an instance of a locally stored social media application account, or can access the user's account via a network-based version of a specific social media application. Platforms such as social media platforms and / or security / surveillance platforms disclosed and described herein refer to applications on which algorithms and / or programs that enable execution or implementation of a collection based on communication or media sharing technologies can be hosted. These technologies include monitoring, creating, sharing and / or storing multimedia supplies.
[0037] Any one or more of the servers or server clusters on which the media platform is hosted and on which the VPR framework 8 is executed or implemented refers to a high performance computing (HPC) environment that includes at least a GPU and a CPU present on a video card, such as embedded on a motherboard or on a CPU die. Training and / or resulting object detection can be performed entirely on the CPU or partially on the CPU and GPU. Alternative embodiments can be performed in an evolutionary HPC module known in the art. In any case, the CPU, GPU, and / or HPC module can store one or more algorithms and / or programs that, when executed thereon, can cause the execution or implementation of the operations and / or functionality disclosed and / or described herein. In addition, a computer-readable non-volatile medium can be provided according to the embodiments described herein. The computer-readable medium stores a computer program. The computer program is used to execute or implement operations or functionality related to at least the embodiments described and described herein when executed by a processor.
[0038] Device 2 may host an instance of social media application account 4 or otherwise be communicatively connected to an instance of social media application account 4, as described above. In addition, device 2 refers to one or more embodiments of a classical computing environment, which may be or may include a classical computer, a processing device, a microprocessor, a microcontroller, a digital signal processor, or any combination thereof. Device 2 may also be an electronic device or a combination thereof in various electronic devices, having one or more image and / or video capture components, i.e., a camera and / or a video recorder, a display screen with audio and / or video input / output, and supporting the provision and consumption of content associated with a media platform. Various electronic devices may include, but are not limited to, smartphones, tablet computers, laptops, desktop computers, e-book readers, MP3 (Moving Picture Experts Group Audio Layer III) players, MP4s, and / or any other suitable electronic devices. Additional non-limiting examples of input device 2 may include databases, local servers, cloud-based services, virtual reality (VR) and / or augmented reality (AR) servers, and the like. In addition, any algorithm or program described, narrated, or suggested herein may be executed by one or more processors hosted on input device 2.
[0039] According to at least some of the embodiments disclosed and described herein, input 6 refers to one or more digital images and / or digital videos, or frames therefrom, which can be input to an appropriate input interface manually or in an automatic manner. Input 6 can be transmitted from device 2 or account 4 or otherwise transmitted from device 2 to a receiving module corresponding to VPR framework 8 via a wired or wireless network. Such a network can be considered as a medium provided as a two-way communication link between a media platform hosting VPR framework 8 and input device 2. The network can include the Internet, a local area network (LAN), a wide area network (WAN), a local interconnect network (LIN), a local cloud, and the like.
[0040] The VPR framework 8 refers to a machine learning based implementation, such as an algorithm and / or program, hardware or firmware, or any combination thereof, that provides a unified retrieval and re-ranking framework for VPR with pure transformers. More specifically, through the VPR framework 8, the re-ranking module 20 learns global attention to the relevance of possible pairings between the query 6 and the reference image. As described and described herein, the VPR framework 8 can be viewed as implementing a transformer-based encoder-decoder architecture that iteratively processes the input.
[0041] The global retrieval module 10 implements the visual transformer (ViT) for VPR at a high level. Accordingly, the input image I∈R h×w×c First, it is divided into p×p blocks, for example, p=16, and converted into a number of words T∈R by linear projection. n×d, as the input of the transformer encoder. Here n, d denote the number and dimension of tokens, respectively, e.g., n = 500, d = 131; and h, w, c denote the height, width, and number of channels of the input image. In addition to the n block tokens, ViT adds an additional learnable category token to aggregate the categorical information from each layer, serving as an alternative to feature aggregation. Learnable localized embedding PE∈R from ViT (n+1)×d is added to each token to provide localization information. A 2D interpolation is then performed on the localization embeddings so that the input resolution (e.g. (640×480)) is arbitrary (640×480).
[0042] The global retrieval module 10 implements L cascaded basic transformer layers using an encoder (described further below). This transformer encoder includes a multi-head attention module that uses three linear projections to transform the input tokens into queries, keys, and values, i.e., Q, K, V, with dimension d. The basic attention is calculated as softmax(QK T / d)V(T=transpose), and the multi-head attention module performs this attention process on multiple heads in parallel and concatenates their final outputs. The multi-head attention module models global correlations to facilitate information aggregation for global representation. The output category tokens from the last transformer layer can be input to a linear layer to generate global features with, for example, 256 dimensions. Local features are generated by applying a linear head on the output block tokens of the penultimate transformer layer, and the dimensionality is reduced, for example, from 256 to 128 to achieve smaller memory consumption. Both global and local features are L2 normalized after reduction.
[0043] According to the following Figure 2 The above non-limiting example implementations are further described in detail with reference to the non-limiting example embodiments of FIG.
[0044] The re-ranking module 20 implements attention-based selection and relevance-based re-ranking at a high level.
[0045] With respect to attention-based selection, since local features occupy a large portion of the memory, it is advantageous to reduce the number of local features from both the query image and the reference image for the purpose of re-ranking. Therefore, according to the non-limiting example embodiments described and recited herein, utilizing a natural attention map, a maintainable fixed number of local features with the highest attention values are kept, e.g., 500, resulting in lower memory costs and a simpler extraction pipeline relative to known implementations.
[0046] In the context of a transformer with L-1 layers, the (n+1)×(n+1) attention matrix of the last transformer can be formulated as softmax(QK T / d), representing the contribution from each input word to each output word, where n denotes the number of chunks. Since the output category (CLS) word is connected to the global embedding feature, the CLS word output channel of the matrix (the (n+1)-dimensional vector for n chunks and CLS words) represents the contribution of the input word to the global feature, corresponding to the importance of each chunk. The n-dimensional vector corresponding to the n chunks can be reshaped into an h×w attention map to arrange the word and the top (i.e., it may cover the information area) word (e.g., 500). The attention value and x, y coordinates are saved with each local feature, resulting in, for example, 128+3=131 dimensions, where 128 is the dimension of the local feature, which can be any suitable number other than 128.
[0047] According to a non-limiting example embodiment of the re-ranking module 20 described and narrated herein, relevance-based re-ranking utilizes the top matching pairs for local features, as well as other information that can be used for re-ranking, namely, relevance and attention values. That is, local feature pairs with higher relevance / similarity have a higher probability of being correct local matches, and image pairs with more correct local matches are more likely to represent the same location. In addition, high attention values of local blocks may indicate the importance of local feature pairs. Therefore, the re-ranking module 20 is configured, designed or otherwise programmed to maintain the relevance, attention and positioning information of all local feature pairs in the relevance matrix, thereby generating, for example, seven (7) dimensions, namely (x, y, A, x', y', A', S), where x, y, x', y' represent the coordinates of two blocks in the original image; A, A' indicate the attention values of the two blocks; S is, for example, the cosine similarity between 128-dimensional local features, and since each image has 500 selected features / words, there are 500×500 pairs, resulting in a relevance matrix of 500×500×7. The correlation matrix includes information of all feature pairs, which facilitates the re-ranking module 20 to learn features that can be used to determine whether two images are from the same location. To reduce computational cost, the five (5) nearest neighbor tokens of each token in the feature space are selected to produce two 500×5×7 matrices. These matrices are concatenated together and fed to the linear layer, resulting in a 1000×5×32 matrix, where 1000 is the number of tokens and 32 is the dimension of each token. The strong global correlation model of the transformer for aggregating large matrices is then utilized as a re-ranking score to determine whether the input pair is a correct match. The first transformer block is utilized to extract important information from the first 5 pairs as a token, and the second transformer block is utilized to extract and aggregate information from 1000 tokens as a single 32-dimensional vector. The transformer blocks are multiple transformer layers with linear projection and standard sinusoidal localization embedding. The linear head then converts the vector into two (2) channels as a binary classification (i.e., true or false).
[0048] To ensure that the re-ranking module 20 sees the top-k hardest samples during training, the re-ranking module 20 is trained with negative samples randomly selected from the top-k best matching samples of the reference image 210 of the full database. Then, the retrieval module and the re-ranking module are fine-tuned together with partial negative mining to obtain better performance.
[0049] According to the following Figure 3 A non-limiting example implementation of the above-described reordering module 20 is further described in detail with reference to the non-limiting example embodiments of FIG.
[0050] Figure 2 A non-limiting example of a global retrieval module 10 corresponding to a unified transformer-based visual place recognition (VPR) training framework 8 is shown in accordance with at least some embodiments described and narrated herein. As depicted, the global retrieval module 10 includes at least image segmenters 105 and 205; linear projection components or modules 120 and 220; global retrieval transformer encoders 130 and 230; and linear projection component or module 235. Although illustrated as separate components or modules, various components or modules may be divided into more components or modules, combined into fewer components or modules, or eliminated entirely while being contemplated within the scope of the disclosed subject matter. Those skilled in the art will appreciate that each function and / or operation of a component or module may be implemented separately and / or collectively by various hardware, software, firmware, or any combination thereof.
[0051] according to Figure 2 Among the features, components, and modules illustrated in and described below, N is an integer that is not constrained or limited by the example embodiments described and described herein.
[0052] Image segmenter 105 and image segmenter 205 refer to transformer components or modules, respectively, which are designed, programmed or otherwise configured to divide the input query 6 into multiple image segments, such as blocks, image regions or image objects, to simplify and / or change the representation of the original image into a format that is more easily managed and / or analyzed.
[0053] According to the non-limiting example embodiments described and recited herein, the image segmenter 105 receives the query input 6 from the device 2 and divides the query 6 into the blocks 115A, blocks 115B, ..., blocks 115N. In addition, the image segmenter 205 receives or retrieves the reference images 210 from the memory 30 and divides each of the received or retrieved reference images 210 into blocks 215A, blocks 215B, ..., blocks 215N.
[0054] In some embodiments, both the query 6 and the reference image 210 are divided into 256 blocks, ie, each of the query 6 and the reference image 210 is divided into 16×16 blocks.
[0055] Furthermore, unless the context otherwise requires reference to a particular tile or portion of a tile, reference may be made to tile 115, tile 115, tile 215, or tile 215 without limitation in any way. Further, while image segmenter 105 and image segmenter 205 are illustrated as corresponding to separate components or modules of global retrieval module 10, other non-limiting example embodiments of framework 8 may include a single image segmenter to divide query image 6 and reference image 120 into tiles 115 and tiles 215.
[0056] The linear projection module 120 and the linear projection module 220 refer to transformer components or modules that flatten an image block or a plurality of image blocks into a vector. The dimension of the generated vector is based on a constant latent vector size.
[0057] According to the non-limiting example embodiments described and illustrated herein, the linear projection module 120 performs a linear projection of the block 115 to generate block tokens 125A, 125B, ..., 125N, which includes adding a corresponding positioning embedding PE to provide positioning information of the corresponding block in the query image 6. In addition, the linear projection module 220 performs a linear projection of the block 215 to generate block tokens 225A, tokens 225B, ..., tokens 225N, which includes adding a corresponding positioning embedding PE to provide positioning information of the corresponding block in the corresponding reference image.
[0058] Furthermore, unless the context otherwise requires reference to a particular block or portion of a block, reference may be made to block token 125, block token 125, block token 225, or block token 225 without limitation in any way. Furthermore, while linear projection module 120 and linear projection module 220 are illustrated as separate components or modules corresponding to global retrieval module 10, other non-limiting example embodiments of framework 8 may include a single linear projection module to flatten blocks 115 and blocks 215 into corresponding vector representations.
[0059] GR transformer encoder 130 refers to a transformer component or module that is designed, programmed, or otherwise configured to encode randomly initialized class words 127 and block words 125 to generate their vector representations. The encoded class words 127 extract and / or aggregate information from all block words 125. In addition, GR transformer encoder 230 refers to a transformer component or module that is designed, programmed, or otherwise configured to encode randomly initialized class words 227 and block words 225 to generate their vector representations. The encoded class words 227 extract and / or aggregate information from all block words 225.
[0060] Unless the context otherwise requires reference to a particular block or portion of a block, reference may be made to block token 125, block token 115, block 225, or block token 215 without limitation in any way. Furthermore, while GR transformer encoder 130 and GR transformer encoder 230 are illustrated as separate components or modules corresponding to global retrieval module 10, other non-limiting example embodiments of the unified VPR training framework 8 may include a single GR transformer encoder to generate a representation of a vector input block token.
[0061] The linear projection module 135 is designed, programmed or otherwise configured to flatten the vector representation of the encoded block word 125 into a linear vector 145A, a linear vector 145B, ... a linear vector 145N representing the local features of the query 6. In addition, the linear projection module 137 is designed, programmed or otherwise configured to flatten the vector representation of the encoded category word 127 into a linear vector 147 representing the global features of the query 6.
[0062] The linear projection module 235 is designed, programmed or otherwise configured to flatten the vector representation of the encoded class word 225 into a linear vector 245A, a linear vector 245B, ... a linear vector 245N, which represents the local features of the corresponding reference image in the reference image 210. In addition, the linear projection module 237 is designed, programmed or otherwise configured to flatten the vector representation of the encoded class word 227 into a linear vector 247, which represents the global features of the corresponding reference image in the reference image 210.
[0063] Unless the context otherwise requires reference to a particular block or portion of a block, reference may be made to linear vector 145, multiple linear vectors 145, linear vector 245, or multiple linear vectors 245 without limitation in any way. Further, while linear projection module 135 and linear projection module 235 are illustrated as separate components or modules corresponding to global retrieval module 10, other non-limiting example embodiments of framework 8 may include a single linear projection module to generate a vector representation of the GR transformer encoder output.
[0064] Linear vector 147 and linear vector 247 represent the triplet loss used to train the global retrieval module 10. That is, the global features of the query 6 provided in the linear vector 147 are compared with the global features of the corresponding reference image in the reference image 210 provided in the linear vector 247 to determine positive values (i.e., matching inputs) and negative values (i.e., non-matching inputs).
[0065] Therefore, based on Figure 2 The non-limiting example embodiment of the global retrieval module 10 shown in FIG. 1 shows that given a set of query images {I q} and the reference image {I r}, the global retrieval module 10 will learn an embedding space where each query I q Close to its corresponding positive reference image I r During training, reference images 210 from the same location as the query image 6 are positive samples, and a typical threshold is set to ten (10) meters. Other reference images with a distance greater than 25 meters are negative samples. Partial negative mining is performed to select the top negative samples from a random subset. The global embedding features of the query, positive samples, and negative samples are denoted as E q 、E p 、E n , while the global retrieval loss uses marginal triplet loss for training:
[0066] L retrieval =max(||E q -E p ||2-||E q -E n ||2+m,0); ||.||2 denotes the L2 norm squared, and m is the margin.
[0067] As referenced below Figure 3 The described re-ranking module 20 receives as input the linear vectors 145 and 245 representing the local features of the query 7 and the corresponding reference image 210, and generates a double logarithmic score L as an output for binary classification, which represents the likelihood of a true or false match. During training, both positive and negative query-reference pairs are fed to the re-ranking module 8, and the cross entropy loss is formulated as:
[0068] L re-ranking =CE(Softmax(L qr ),I qr )
[0069] L and I denote the logarithmic score and the ground truth label of the query-reference pair. In general, the re-ranking module 20 is used to distinguish the top k retrieved candidates that are more specific than some negative samples.
[0070] Figure 3 A non-limiting example of a reorder transformer module 20 corresponding to a unified transformer based visual place recognition (VPR) training framework 8 is shown in accordance with at least some embodiments described and recited herein.
[0071] As depicted, the re-ranking module 20 includes at least the attention map generators 150 and 250; the word gram generators 305A and 305B; the correlation matrix generator 310; the pairing identifiers 315A and 315B; the linear projection module 320; the transformer block 325; the transformer block 330; the linear projection module 335; and the re-ranking score generator 340. Although illustrated as separate components or modules, the various components or modules may be divided into more components or modules; combined into fewer components or modules, such as the attention map generators 150 and 250, the word gram generators 305A and 305B, and the pairing identifiers 315A and 315B; or eliminated entirely, while being contemplated within the scope of the disclosed subject matter. Those skilled in the art will appreciate that each function and / or operation of the components or modules may be implemented separately and / or collectively by various hardware, software, firmware, or any combination thereof.
[0072] The attention map generator 150 and the attention map generator 250 refer to transformer components or modules designed, programmed, or otherwise configured to generate attention maps for the query 6 and the corresponding reference image 210 based on the vector representation of the block word unit 125 generated by the GR transformer encoder 130 and the vector representation of the block word unit 225 generated by the GR transformer encoder 230, respectively (see Figure 2 ). Although the attention map generator 150 and the attention map generator 250 are illustrated as separate components or modules according to the re-ranking module 20, other non-limiting example embodiments of the unified VPR training framework 8 may include a single attention map generator.
[0073] As we all know, the generated attention maps are scalar matrices showing the relative importance of features in the corresponding images, respectively. That is, the attention map is a grid of numbers that indicates which 2D images are important for VPR.
[0074] Furthermore, the generated attention map is utilized within the re-ranking module 20 so that a fixed number of local features (e.g., 500) from the query image 6 and the corresponding reference image in the reference image 210 are used to ensure a low memory cost and a robust extraction process. Thus, in practice, local features associated with individual blocks in both the query image 6 and the corresponding reference image in the reference image 210 may be disregarded, with local features having approximately a fixed number (e.g., 500 blocks) of the highest attention values (per image) being retained for re-ranking purposes.
[0075] As about Figure 1 As described, the global retrieval module 10 uses a transformer encoder to implement L cascaded basic transformer layers, which includes a multi-head attention map generator 250, which uses three linear projections to convert input tokens into queries, keys and values, i.e., Q, K, V, with a dimension of d. The basic attention is calculated as softmax(QK T / d)V(T=transpose), and the multi-head attention module computes the attention for multiple heads in parallel, and their final outputs are cascaded. The multi-head attention module models global correlation to promote information aggregation for global representation. The category tokens output from the last transformer layer are input to the linear layer to generate global features with, for example, 256 dimensions. Local features are generated by applying a linear head on the output block tokens of the penultimate transformer layer, and the dimension is reduced to 128 for smaller memory consumption. Both global and local features are L2 normalized after reduction.
[0076] Token generator 305A and token generator 305B respectively refer to transformer components or modules that are designed, programmed or otherwise configured to receive a fixed number (e.g., 500) of top attention tokens associated with the query image 6 and the corresponding reference image 210 in the reference image 210, with their x, y coordinates saved therewith, thereby producing a corresponding matrix of, for example, 500×131 dimensions.
[0077] The relevance matrix generator 310 refers to a transformer component or module that is designed, programmed or otherwise configured to generate a relevance matrix by transposing the matrices generated by the word unit generator 305A and the word unit generator 305B. Using the above non-limiting example, where the corresponding matrix is of 500×131 dimensions, the result of the transposition is a relevance matrix of 500×500×7 dimensions, for which the 500 highest attention blocks are included, each block having a corresponding attention value x, y and similarity value, respectively, resulting in seven (7) dimensions.
[0078] As about Figure 1As described, the relevance-based re-ranking utilizes the top matching pairs of local features, as well as other information that may be useful for re-ranking, namely, relevance and attention values. That is, local feature pairs with higher relevance and / or similarity are likely to be correct local matches, and image pairs with more correct local matches are likely to correspond to the same location. In addition, high attention values of local blocks indicate the importance of local feature pairs. Therefore, the re-ranking module 20 is configured, designed or otherwise programmed to maintain the relevance, attention and positioning information of all local feature pairs in the relevance matrix, thereby generating, for example, seven (7) dimensions, namely (x, y, A, x, y', A', S). x, y, x', y' represent the coordinates of two blocks in the original image; A, A' indicate the attention values of the two blocks; S is, for example, the cosine similarity between 128-dimensional local features. Because there are 500 selected features / words per image, there are 500×500 pairs, resulting in the aforementioned 500×500×7 relevance matrix. The correlation matrix includes information of all feature pairs, thereby facilitating the re-ranking module 20 to learn relevant features to determine whether two images are from the same location.
[0079] Pairing identifier 315A and pairing identifier 315B refer to transformer components or modules, respectively, which are designed, programmed or otherwise configured to identify or select, for example, five (5) closest word-grams to each word-gram in the feature space from a correlation matrix of, for example, 500×500×7 relative to the corresponding reference images of the query image 6 and the reference image 210 to generate 500×5×7 matrices, respectively.
[0080] The linear projection module 320 is designed, programmed or otherwise configured to concatenate the matrices generated by the pair identifiers 315A and 315B or receive a concatenation of matrices and flatten the concatenated matrix into, for example, a 1000×5×32 matrix.
[0081] The transformer block 325 refers to a component or module designed, programmed, or otherwise configured to encode or extract information from the top (e.g., five (5)) pairs with the highest attention values, resulting in word-grams on the order of, for example, 1000×32.
[0082] The transformer block 330 refers to a component or module designed, programmed or otherwise configured to receive, for example, 1000×32 word-grams and extract and aggregate information to provide or generate a single 32-dimensional vector.
[0083] The linear projection module 335 is designed, programmed or otherwise configured to extract information from the 1000 word-grams and aggregate them into a single 32-dimensional vector.
[0084] The re-ranking scoring module 340 is a component or module designed, programmed or otherwise configured to implement sinusoidal localization embedding to convert a vector into two (2) channels as a binary classification (ie, true or false) through a linear head.
[0085] Figure 4A and Figure 4B Together, it is shown that according to this article Figure 1-Figure 3 A non-limiting example of a process flow for training a unified transformer based visual place recognition (VPR) training framework is described and illustrated in at least some non-limiting example embodiments. It should be understood that reference Figure 4A and Figure 4B Each function and / or operation shown and described may be implemented separately and / or jointly by various hardware, software, firmware or any combination thereof, such as according to Figure 1-Figure 3 400. The processing flow 400 may include one or more operations, actions, or functions as illustrated, described, or even suggested, in blocks 405, 410, 415, 420, 425, 427, 430, 435, 440, 445, and 450. These various operations, functions, or actions may correspond, for example, to software, program code, or program instructions executable by a processor that cause the functions to be performed. Although illustrated as separate blocks, obvious modifications may be made, for example, two or more blocks may be rearranged; additional blocks may be added; and various blocks may be divided into more blocks, combined into fewer blocks, or eliminated, depending on the desired implementation. The processing flow 400 may begin at block 405 relative to the global retrieval module 10.
[0086] Block 405 (Receive Query) refers to the query 6 being received from the device 2 to the framework 8, and in particular the global retrieval module 10. Processing may continue to block 410.
[0087] Block 410 (Linearize Blocks) refers to image segmenters 105 and 205 dividing query 6 and reference image 210 into blocks 115 and 215, respectively; and linear projection modules 120 and 220 flattening the blocks into block tokens 125 and 225, respectively. Processing may continue to block 415.
[0088] Block 415 (encode word-grams) refers to the GR transformer encoder 130 encoding the randomly initialized class word-grams 127 and block word-grams 125, and the GR transformer encoder 230 encoding the randomly initialized class word-grams 227 and block word-grams 225. Processing may continue to block 420.
[0089] Block 420 (Linearize Encoded Tokens) refers to the linear projection module 135 flattening the vector representation of the encoded block token 125 into a linear vector 145 to represent the local features of the query 6, and the linear projection module 137 flattening the vector representation of the encoded class token 127 into a linear vector 147 to represent the global features of the query 6. Block 420 also refers to the linear projection module 235 flattening the vector representation of the encoded block token 225 into a linear vector 245 to represent the local features of the corresponding reference image in the reference image 210, and the linear projection module 237 flattening the vector representation of the encoded class token 227 into a linear vector 247 to represent the global features of the corresponding reference image in the reference image 210. Processing may continue to block 425.
[0090] Block 425 (Train Global Retrieval Transformer) refers to training the reordering module 20 using the linear vector 147 and the linear vector 2547. Processing may continue to block 427.
[0091] Block 427 (Train Reorder Module) refers to training the reorder module 20 using the linear features 145 and the linear features 245. Processing may continue to block 430.
[0092] Block 430 (generate attention map) refers to the attention map generators 150 and 250 generating attention maps for the query 6 and the corresponding reference image in the reference image 210 based on the vector representation of the block word-unit 125 generated by the GR transformer encoder 130 and the vector representation of the block word-unit 225 generated by the GR transformer encoder 230, respectively. Processing can continue to block 435.
[0093] Block 435 (Generate Tokens) refers to the token generators 305A and 305B generating a matrix of, for example, 500×131 dimensions, with X, Y coordinates stored therewith, based on a fixed number (e.g., 500) of the highest attention value tokens associated with the query image 6 and the corresponding reference images of the reference image 210. Processing can continue to block 440.
[0094] Block 440 (generate correlation matrix) refers to the correlation matrix generator 310 generating a correlation matrix by transposing the matrices generated by the word-unit generator 305A and the word-unit generator 305B, resulting in a correlation matrix of dimensions 500×500×7, for which the 500 highest attention blocks are included, each with a corresponding attention value, x, y, and similarity value, respectively, resulting in seven (7) dimensions. Block 440 may also include pair identifiers 315A and 315B, which identify or select, for example, five (5) closest word-units for each word-unit in the feature space in the generated correlation matrix. Processing may continue to block 445.
[0095] Block 445 (Linearize Correlation Matrix) refers to linear projection module 320 concatenating the matrices generated by pair identifiers 315A and 315B or receiving the concatenation of matrices and flattening the concatenated matrix into, for example, a 1000×5×32 matrix. Processing may continue to block 450 .
[0096] Block 450 (transform the matrix) refers to the transformer blocks 325 and 330 encoding or extracting information from the top (e.g., five (5)) pairs with the highest attention values, thereby producing a word-gram of the order of, for example, 1000×32; then receiving, for example, 1000×32 word-grams and extracting and aggregating information to provide or generate a single 32-dimensional vector. Processing can continue to block 455.
[0097] Block 455 (Linearize Transformation Matrix) refers to the linear projection module 335 extracting information from the 1000 tokens and aggregating them into a single 32-dimensional vector. Processing may continue to block 460.
[0098] Block 460 (Determine Re-ranking Score) refers to the re-ranking score module 340 implementing a sinusoidal localization embedding to convert the vector into two (2) channels as a binary classification, ie, true or false, through a linear head.
[0099] Figure 5 An illustrative computing embodiment is shown in which any process and sub-process of training a unified transformer-based visual place recognition (VPR) training framework can be implemented as executable instructions stored on a non-transitory computer-readable medium. For example, the computer-readable instructions can be executed by a processor of a device as referenced herein with a network element and / or any other device corresponding thereto, particularly when applicable to the above-mentioned applications and / or programs corresponding to system 100.
[0100] In a basic configuration, computing device 500 may generally include at least one or more processors 502 , memory 504 , one or more input components or modules 506 , one or more output components or modules 508 , a display component or module 510 , a computer-readable medium 512 , and a transceiver 514 .
[0101] The processor 502 refers to, for example, a microprocessor, a microcontroller, a digital signal processor, or any combination thereof.
[0102] The memory 504 refers to, for example, a volatile memory, a non-volatile memory, or any combination thereof. The memory 504 stores therein an operating system, one or more applications corresponding to the model 105, and / or program data thereof. That is, the memory 504 stores executable instructions to implement any of the above functions or operations, and therefore, the memory 504 can be regarded as a computer-readable medium.
[0103] Input component or module 506 refers to a built-in or communicatively coupled keyboard, touch screen, or telecommunication device. Alternatively, input component or module 506 includes a microphone configured to cooperate with a speech recognition program that may be stored in memory 504 to receive voice commands from a user of computing device 500. In addition, input component or module 506, if not built-in to computing device 500, may be communicated via a short-range communication protocol (including but not limited to radio frequency or Bluetooth). ) is communicatively coupled to computing device 500.
[0104] Output component or module 508 refers to a component or module built into or removable from computing device 500 that is configured to output commands and data to an external device.
[0105] Display component or module 510 refers to, for example, a solid-state display that may have touch input capabilities. That is, display component or module 510 may include capabilities that may share or replace input component or module 506 .
[0106] Computer readable medium 512 refers to a separable machine readable medium that is configured to store one or more programs that embody any of the functions or operations described above. That is, the computer readable medium 512 that can be received or otherwise connected to a drive component or module of the computing device 500 can store executable instructions to implement any of the functions or operations described above. These instructions can be complementary to the instructions stored in the memory 504 or otherwise independent.
[0107] The transceiver 514 refers to the network communication link of the computing device 500, which is configured as a wired network or a direct wire connection. Alternatively, the transceiver 514 is configured as a wireless connection, such as radio frequency (RF), infrared, Bluetooth and other wireless protocols.
[0108] It can be understood from the foregoing that various embodiments of the present disclosure have been described herein for illustrative purposes, and various modifications may be made without departing from the scope and spirit of the present disclosure. Therefore, the various embodiments disclosed herein are not intended to be limiting, and the true scope and spirit are indicated by the appended claims.
[0109] Multiple aspects
[0110] Aspect 1. A visual place recognition (VPR) training framework based on a unified transformer, comprising:
[0111] Trainable feature retrieval transformer module for:
[0112] Extract global and local features from the query image,
[0113] Extracting global and local features from the reference image, and
[0114] training a global retrieval transformer based on global features extracted from a query image and global features extracted from a reference image; and
[0115] Trainable Reordering Transformer module for:
[0116] At least one re-ranking transformer is trained based on local features extracted from a query image and local features extracted from a reference image.
[0117] Aspect 2. According to the unified transformer-based VPR training framework of Aspect 1, the trainable feature retrieval transformer module extracts global features from the query image in the following manner:
[0118] Encode the class tokens, and
[0119] The encoded category tokens are transformed into global features of the query image via linear projection.
[0120] Aspect 3. The unified transformer-based VPR training framework according to Aspect 1 or Aspect 2, wherein the trainable feature retrieval transformer module extracts local features from the query image in the following manner:
[0121] Convert the query image blocks into corresponding block tokens through linear projection;
[0122] Concatenate the corresponding block word to the corresponding position vector;
[0123] Encode the corresponding concatenated block word-units and the corresponding position vectors; and
[0124] The encoded block word-units and the corresponding position vectors are converted into linear feature word-units corresponding to the query image through linear projection.
[0125] Aspect 4. A unified transformer-based VPR training framework according to any one of aspects 1 to 3, wherein the trainable feature retrieval transformer module extracts global features from corresponding reference images in the reference images by:
[0126] Encode the class tokens, and
[0127] The encoded category tokens are transformed into global features of the corresponding reference images via linear projection.
[0128] Aspect 5. A unified transformer-based VPR training framework according to any one of aspects 1 to 4, wherein the trainable feature retrieval transformer module extracts local features from a corresponding reference image in the reference images by:
[0129] Convert the corresponding reference image block into the corresponding block word by linear projection;
[0130] Concatenate the corresponding block word to the corresponding position vector;
[0131] Encode the corresponding concatenated block word-units and the corresponding position vectors; and
[0132] The encoded block word-units and the corresponding position vectors are converted into linear feature word-units corresponding to the corresponding reference image through linear projection.
[0133] Aspect 6. A unified transformer-based VPR training framework according to any one of aspects 1 to 5, wherein the trainable reordering transformer module is used to train at least one reordering transformer in the following manner:
[0134] reducing the number of linear feature tokens corresponding to the query image to a fixed number relative to the fixed number of dimensions;
[0135] reducing the number of linear feature tokens corresponding to the corresponding reference image to a fixed number relative to the fixed number of dimensions;
[0136] generating a relevance matrix based on the reduced number of linear feature word-grams corresponding to the query image and the reduced number of linear feature word-grams corresponding to the corresponding reference image;
[0137] identifying a predefined number of linear feature word-grams corresponding to the query image and a predefined number of linear feature word-grams corresponding to the corresponding reference image that match each other;
[0138] concatenating the identified linear feature word-grams corresponding to the query image and the identified linear feature word-grams corresponding to the corresponding reference image;
[0139] Transform the concatenated linear feature tokens through linear projection;
[0140] The converted linear feature word-grams are transformed to generate a relevance index for matches between corresponding ones of the identified linear feature word-grams corresponding to the query image and the identified linear feature word-grams corresponding to the corresponding reference image.
[0141] Aspect 7. A VPR training framework based on a unified transformer according to any one of Aspects 1 to 6, wherein the transformation comprises:
[0142] extracting specific information from the identified linear feature words corresponding to the query image;
[0143] extracting specific information from the identified linear feature words corresponding to the corresponding reference image;
[0144] Aggregating specific information from the transformed linear feature tokens into a single vector; and
[0145] Convert a single vector into channels for binary classification.
[0146] Aspect 8. A unified transformer-based VPR training framework according to any one of Aspects 1 to 7, wherein reducing the number of linear feature tokens corresponding to the query image to a fixed number relative to a fixed number of dimensions is based on an attention map generated by the query image.
[0147] Aspect 9. A unified transformer-based VPR training framework according to any one of Aspects 1 to 8, wherein the number of linear feature word units corresponding to the corresponding reference image is reduced to a fixed number relative to a fixed number of dimensions based on the attention map generated by the corresponding reference image.
[0148] Aspect 10. A method for training a unified transformer-based visual place recognition (VPR) framework, comprising:
[0149] Encoding linear representations of multiple parts of the query image;
[0150] Encode randomly initialized class tokens of the query image;
[0151] encoding linear representations of portions of a reference image;
[0152] Encode randomly initialized class tokens of the reference image;
[0153] training a global retrieval transformer based on the encoded class tokens of the query image and the encoded class tokens of the reference image; and
[0154] At least one re-ordering transformer is trained based on at least a portion of the encoded linear representations of the plurality of portions of the query image and at least a portion of the encoded linear representation of the reference image.
[0155] Aspect 11. The method according to aspect 10, wherein training at least one reordering transformer comprises:
[0156] reducing the number of encoded linear representations of the plurality of portions of the query image to a fixed number based on the attention map of the query image; and
[0157] The reference image based attention map reduces the number of encoded linear representations of parts of the representative image to a fixed number.
[0158] Aspect 12. The method according to aspect 10 or aspect 11, further comprising:
[0159] combining the encoded linear representations of the plurality of portions of the query image and the encoded linear representations of the plurality of portions of the representative image into a relevance index;
[0160] identifying a predefined number of encoded linear representations of portions of the query image and encoded linear representations of portions of the representative image that match; and
[0161] A re-ranking score for the match is generated by transforming a combined linear representation of the identified encoded linear representations of the portions of the query image that matched and the encoded linear representations of the portions of the representative image.
[0162] Aspect 13. A unified global retrieval and re-ordering framework for implementing visual place recognition (VPR), comprising:
[0163] a global retrieval module trained with encoded class tokens having global features of a query image and encoded class tokens having global features of a reference image; and
[0164] The re-ranking module is trained by the encoded block-words with local features of the query image and the encoded block-words with local features of the reference image.
[0165] Aspect 14. A media platform having stored therein a computer executable component or module, which when executed performs operations to implement visual place recognition (VPR) by performing the method of any one of aspects 10 to 12.
[0166] Aspect 15. A computer readable medium for storing executable instructions, which when executed causes one or more processors to perform functions related to training a feature retrieval transformer module, the functions comprising:
[0167] Extracting global features and local features from the query image;
[0168] extracting global features and local features from a reference image; and
[0169] A global retrieval transformer is trained based on the global features extracted from the query image and the global features extracted from the reference image.
[0170] Aspect 16. The computer-readable medium according to aspect 15,
[0171] Extracting global features from the query image includes:
[0172] Encode the class tokens, and
[0173] Convert the encoded category tokens into global features of the query image via linear projection; and
[0174] Extracting local features from the query image includes:
[0175] Convert the query image blocks into corresponding block tokens through linear projection;
[0176] Concatenate the corresponding block word to the corresponding position vector;
[0177] The corresponding concatenated block word-units and the corresponding position vectors are encoded; and the encoded block word-units and the corresponding position vectors are converted into linear feature word-units corresponding to the query image by linear projection.
[0178] Aspect 17. The computer-readable medium according to aspect 15 or aspect 16,
[0179] The extraction of global features from the corresponding reference image in the reference image includes:
[0180] Encode the class tokens, and
[0181] Convert the encoded category tokens into global features of the corresponding reference image by linear projection; and
[0182] The extracting of local features from the corresponding reference image in the reference image comprises:
[0183] Convert the corresponding reference image block into the corresponding block word by linear projection;
[0184] Concatenate the corresponding block word to the corresponding position vector;
[0185] The corresponding concatenated block word-units and the corresponding position vectors are encoded; and the encoded block word-units and the corresponding position vectors are converted into linear feature word-units corresponding to the corresponding reference image by linear projection.
[0186] Aspect 18. A computer readable medium for storing executable instructions, which when executed causes one or more processors to perform functions related to training a reordering transformer module, the functions comprising:
[0187] Based on the generated attention map of the query image, reducing the number of linear feature tokens corresponding to the query image to a fixed number relative to the fixed number of dimensions;
[0188] reducing the number of linear feature tokens corresponding to the corresponding reference image to a fixed number relative to the fixed number of dimensions based on the generated attention map of the corresponding reference image;
[0189] generating a relevance matrix based on the reduced number of linear feature word-grams corresponding to the query image and the reduced number of linear feature word-grams corresponding to the corresponding reference image;
[0190] identifying a predefined number of linear feature word-grams corresponding to the query image and a predefined number of linear feature word-grams corresponding to the corresponding reference image that match each other;
[0191] concatenating the identified linear feature word-units corresponding to the query image and the identified linear feature word-units corresponding to the corresponding reference image;
[0192] Transform the concatenated linear feature tokens through linear projection;
[0193] The converted linear feature word-grams are transformed to generate re-ranking scores for matches between corresponding ones of the identified linear feature word-grams corresponding to the query image and the identified linear feature word-grams corresponding to the corresponding reference image.
[0194] Aspect 19. The computer-readable medium according to aspect 18, wherein the transforming of the converted linear feature word-grams comprises:
[0195] extracting specific information from the identified linear feature words corresponding to the query image;
[0196] extracting specific information from the identified linear feature words corresponding to the corresponding reference image;
[0197] Aggregating specific information from the transformed linear feature tokens into a single vector; and
[0198] Convert a single vector into channels for binary classification.
Claims
1. A visual place recognition (VPR) training framework based on a unified transformer, comprising: Trainable feature retrieval transformer module for: Extract global and local features from the query image, Extracting global and local features from the reference image, and training a global retrieval transformer based on the global features extracted from the query image and the global features extracted from the reference image; as well as Trainable Reordering Transformer module for: At least one re-ranking transformer is trained based on the local features extracted from the query image and the local features extracted from the reference image.
2. The unified transformer based VPR training framework according to claim 1, wherein the trainable feature retrieval transformer module extracts the global features from the query image by: Encode the class tokens, and The encoded category word is converted into the global feature of the query image through linear projection.
3. The unified transformer-based VPR training framework according to claim 1, wherein the trainable feature retrieval transformer module extracts local features from the query image by: Converting the blocks of the query image into corresponding block tokens through linear projection; Concatenate the corresponding block word to the corresponding position vector; encoding the corresponding concatenated block word-units and the corresponding position vectors; and The encoded block word-units and the corresponding position vectors are converted into linear feature word-units corresponding to the query image through linear projection.
4. The unified transformer based VPR training framework of claim 1, wherein the trainable feature retrieval transformer module extracts global features from corresponding ones of the reference images by: Encode the class tokens, and The encoded category word is converted into the global feature of the corresponding reference image through linear projection.
5. The unified transformer based VPR training framework of claim 1, wherein the trainable feature retrieval transformer module extracts local features from corresponding ones of the reference images by: Converting the block of the corresponding reference image into a corresponding block word by linear projection; Concatenate the corresponding block word to the corresponding position vector; Encoding the corresponding concatenated block word-units and corresponding position vectors; and The encoded block word-units and the corresponding position vectors are converted into linear feature word-units corresponding to the corresponding reference image through linear projection.
6. The unified transformer based VPR training framework according to claim 1, wherein the trainable reordering transformer module is used to train the at least one reordering transformer by: reducing the number of the linear feature tokens corresponding to the query image to a fixed number relative to a fixed number of dimensions; reducing the number of said linear feature word units corresponding to the corresponding reference image to a fixed number relative to the fixed number of dimensions; generating a relevance matrix based on the reduced number of linear feature word-grams corresponding to the query image and the reduced number of linear feature word-grams corresponding to the corresponding reference image; identifying a predefined number of linear feature word-grams corresponding to the query image and a predefined number of linear feature word-grams corresponding to the corresponding reference image that match each other; cascading the identified linear feature word-unit corresponding to the query image and the identified linear feature word-unit corresponding to the corresponding reference image; The linear feature word units after cascading are transformed by linear projection; The converted linear feature word-grams are transformed to generate a re-ranking score for a match between corresponding ones of the identified linear feature word-grams corresponding to the query image and the identified linear feature word-grams corresponding to the corresponding reference image.
7. The VPR training framework based on a unified transformer according to claim 6, wherein the transformation of the converted linear feature word-units comprises: extracting specific information from the identified linear feature word-units corresponding to the query image; extracting specific information from the identified linear feature word-units corresponding to the corresponding reference image; Aggregating the specific information from the converted linear feature word units into a single vector; and Convert the single vector into channels as binary classification.
8. The unified transformer-based VPR training framework of claim 6, wherein reducing the number of the linear feature tokens corresponding to the query image to the fixed number relative to the fixed number of dimensions is based on an attention map generated for the query image.
9. The unified transformer-based VPR training framework of claim 6, wherein reducing the number of the linear feature words corresponding to the corresponding reference image to the fixed number relative to the fixed number of dimensions is based on the attention map generated by the corresponding reference image.
10. A method for training a unified transformer based visual place recognition (VPR) framework, comprising: Encoding linear representations of multiple parts of the query image; Encoding randomly initialized category tokens of the query image; encoding linear representations of portions of a reference image; encoding randomly initialized class tokens of the reference image; training a global retrieval transformer based on the encoded class tokens of the query image and the encoded class tokens of the reference image; as well as At least one re-ordering transformer is trained based on at least a portion of the encoded linear representations of portions of the query image and at least a portion of the encoded linear representation of the reference image.
11. The method of claim 10, wherein the training of the at least one reordering transformer comprises: reducing the number of the encoded linear representations of the plurality of portions of the query image to a fixed number based on the attention map of the query image; as well as The number of the encoded linear representations of the portions of the representative image is reduced to the fixed number based on the attention map of the reference image.
12. The method according to claim 11, further comprising: combining the encoded linear representations of the plurality of portions of the query image and the encoded linear representations of the plurality of portions of the representative image into a relevance index; identifying a predefined number of the encoded linear representations of the plurality of portions of the query image and the encoded linear representations of the plurality of portions of the representative image that match; as well as A re-ranking score for the match is generated by transforming a combined linear representation of the identified encoded linear representations of the portions of the query image that match and the encoded linear representations of the portions of the representative image.
13. A unified global retrieval and reordering framework for implementing visual place recognition (VPR), comprising: A global retrieval module, trained with encoded class tokens with global features of the query image and encoded class tokens with global features of the reference image; as well as A re-ranking module is trained by the encoded block words with the local features of the query image and the encoded block words with the local features of the reference image.
14. A media platform having computer executable components stored therein, which when executed perform operations to implement visual place recognition (VPR) by performing the method of claim 10.
15. A computer readable medium for storing executable instructions that, when executed, cause one or more processors to perform functions associated with training a feature retrieval transformer module, the functions comprising: Extracting global features and local features from the query image; Extracting global features and local features from the reference image; as well as A global retrieval transformer is trained based on the global features extracted from the query image and the global features extracted from the reference image.
16. The computer readable medium of claim 15, Wherein extracting the global feature from the query image comprises: Encode the class tokens, and Converting the encoded category word into the global feature of the query image by linear projection; and The extracting of local features from the query image comprises: Converting the blocks of the query image into corresponding block tokens through linear projection; Concatenate the corresponding block word to the corresponding position vector; Encoding the corresponding concatenated block word-units and corresponding position vectors; and The encoded block word-units and the corresponding position vectors are converted into linear feature word-units corresponding to the query image through linear projection.
17. The computer readable medium of claim 15, The extracting of global features from corresponding reference images in the reference images comprises: Encode the class tokens, and Converting the encoded category word into the global feature of the corresponding reference image by linear projection; and Wherein extracting the local features from the corresponding reference image in the reference image comprises: Converting the block of the corresponding reference image into a corresponding block word by linear projection; Concatenate the corresponding block word to the corresponding position vector; Encoding the corresponding concatenated block word-units and corresponding position vectors; and The encoded block word-units and the corresponding position vectors are converted into linear feature word-units corresponding to the corresponding reference image through linear projection.
18. A computer readable medium for storing executable instructions that, when executed, cause one or more processors to perform functions associated with training a reordering transformer module, the functions comprising: Based on the generated attention map of the query image, reducing the number of the linear feature tokens corresponding to the query image to a fixed number relative to a fixed number of dimensions; reducing the number of the linear feature tokens corresponding to the corresponding reference image to a fixed number relative to a fixed number of dimensions based on the generated attention map of the corresponding reference image; generating a relevance matrix based on the reduced number of linear feature word-grams corresponding to the query image and the reduced number of linear feature word-grams corresponding to the corresponding reference image; identifying a predefined number of linear feature word-grams corresponding to the query image and a predefined number of linear feature word-grams corresponding to the corresponding reference image that match each other; concatenating the identified linear feature word-grams corresponding to the query image and the identified linear feature word-grams corresponding to the corresponding reference image; The linear feature word units after cascading are transformed by linear projection; The converted linear feature word-grams are transformed to generate a re-ranking score for a match between corresponding ones of the identified linear feature word-grams corresponding to the query image and the identified linear feature word-grams corresponding to the corresponding reference image.
19. The computer-readable medium of claim 18, wherein the transforming of the converted linear feature word-grams comprises: extracting specific information from the identified linear feature word-units corresponding to the query image; extracting specific information from the identified linear feature word-units corresponding to the corresponding reference image; aggregating the specific information from the transformed linear feature word-units into a single vector; and Convert the single vector into channels as binary classification.
