Self-supervised visual SLAM method based on graph neural network

Through the self-supervised visual SLAM method based on graph neural networks, the improved Superpoint and SuperGlue networks improve the accuracy of feature extraction and matching in dynamic environments, solve the problem of low accuracy of feature extraction and matching in the existing technology, and reduce Reduces computing resource consumption and achieves efficient feature point and descriptor extraction on devices with limited computing resources.

CN118781464APending Publication Date: 2024-10-15JIANGSU UNIV OF TECH
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410762470.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-13
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

Existing visual SLAM methods based on deep learning do not fully utilize the potential of graph neural networks in dynamic environments, resulting in low accuracy of feature extraction and matching under conditions of weak illumination, texture, and large-scale transformation, and high consumption of computing resources.

Method used

The self-supervised visual SLAM method based on graph neural network is used, through the improved Superpoint structure and SuperGlue network, combined with self-attention and cross-attention mechanisms for feature extraction and matching, optimizing the matching matrix, and integrating the results into the ORB-SLAM2 system , reduce mismatching and improve the extraction speed of feature points and descriptors.

Benefits of technology

It improves the accuracy of feature extraction and matching under weak lighting, texture and large-scale transformation conditions, reduces the consumption of computing resources, and achieves efficient feature point and descriptor extraction on devices with limited computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118781464A_ABST
    Figure CN118781464A_ABST
Patent Text Reader

Abstract

The invention discloses a self-supervised visual SLAM method based on a graph neural network, and the method comprises the steps: firstly building a depth feature extraction network of key points and descriptors based on an improved Superpoint structure, and extracting the key points and descriptors on each frame of picture; then establishing a SuperGlue depth feature matching network based on a graph neural network, carrying out weighted matching on key points and descriptors on each frame of picture through a self-attention mechanism and a cross attention mechanism, optimizing a matching matrix through the graph neural network, and executing bipartite graph matching to obtain a final matching result; then, mismatching is eliminated; and finally, the matched feature points and the corresponding relation thereof are integrated into an ORB-SLAM2 system, and a self-supervised SLAM system based on a neural network is constructed. According to the method, the feature point extraction and matching accuracy of the SLAM method under the conditions of weak illumination, texture and large-scale transformation is improved, the consumption of computing resources is reduced, and the extraction speed of the feature points and descriptors on equipment with limited computing resources is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of visual SLAM algorithms, and in particular to a self-supervised visual SLAM method based on a graph neural network. Background Art

[0002] In the field of machine vision and mobile robotics, visual simultaneous localization and mapping (SLAM) technology is a key technology for achieving autonomous navigation and environmental understanding. Traditional visual SLAM methods rely on hand-designed feature extraction and matching algorithms, such as the ORB feature widely used in ORB-SLAM systems. These traditional methods often perform poorly in environments with sparse features or repeated textures.

[0003] With the development of deep learning technology, learning-based feature extraction and matching algorithms have been proposed to improve the performance and robustness of SLAM systems. Among them, SuperPoint network, as a self-supervised feature extraction network, has shown the potential to outperform traditional methods in a variety of visual tasks.

[0004] Considering that the visual SLAM algorithm has very high requirements for real-time performance and the traditional convolution method has a large amount of calculation, it needs to be replaced with a lightweight network MobileNetV2 to reduce the number of network parameters and the amount of calculation.

[0005] In addition, the SuperGlue network, as a feature matching network, optimizes the matching process through graph neural networks, thereby improving the accuracy and robustness of matching.

[0006] However, existing deep learning-based SLAM methods generally do not fully utilize the potential of graph neural networks, especially in the process of processing and updating maps in dynamic environments. Therefore, it is urgent to develop a visual SLAM method that can integrate advanced feature extraction and matching techniques and enhance the ability of map construction and updating through graph neural networks. Summary of the invention

[0007] The purpose of the present invention is to provide a self-supervised visual SLAM method based on graph neural network, improve the feature extraction and matching accuracy under conditions of weak lighting, texture and large-scale transformation, and increase the extraction speed of feature points and descriptors on devices with limited computing resources.

[0008] The technical solution to achieve the purpose of the present invention is: a self-supervised visual SLAM method based on graph neural network, comprising the following steps:

[0009] Step 1: Establish a deep feature extraction network of key points and descriptors based on the improved Superpoint structure to extract key points and descriptors on each frame of the image;

[0010] Step 2: Establish a SuperGlue deep feature matching network based on graph neural network, perform weighted matching on the key points and descriptors on each frame through self-attention mechanism and cross-attention mechanism, optimize the matching matrix through graph neural network, and perform bipartite graph matching to obtain the final matching result;

[0011] Step 3: Eliminate the mismatches that occur;

[0012] Step 4: Integrate the matched feature points and corresponding relationships into the ORB-SLAM2 system to build a self-supervised SLAM system based on neural networks.

[0013] Furthermore, in step 1, a deep feature extraction network based on feature points and descriptors of the improved Superpoint structure is established, as follows:

[0014] The MobileNetV2 lightweight architecture is used to replace the original network framework. The residual block structure is used to implement the operation of expansion and then compression, which increases the receptive field of the feature map. At the same time, linear operations are added to make the network pay more attention to the key information in the feature data.

[0015] Furthermore, the architecture of the deep feature extraction network is as follows:

[0016] Convolutional layer Conv2d, 3×3, output channels 16, NL is HS, stride is 2;

[0017] Convolutional layer Bottleneck, 3×3, output channels 48, NL is RE, stride is 2;

[0018] Convolutional layer Bottleneck, 3×3, output channels 48, NL is RE, stride is 1;

[0019] Convolutional layer Bottleneck, 5×5, output channels 96, NL is RE, stride is 2;

[0020] Convolutional layer Bottleneck, 5×5, output channels 96, NL is HS, stride is 1;

[0021] Convolutional layer Bottleneck, 5×5, output channels 96, NL is HS, stride is 2;

[0022] Convolutional layer Bottleneck, 5×5, output channels 96, NL is HS, stride is 1;

[0023] Convolutional layer Conv2d×1, NBN, output channel 128, NL is HS, and the stride is 1.

[0024] Furthermore, the Superpoint network convolution kernel is shown as follows:

[0025] Shared encoder: 1×3×3×64; feature point decoder: 128×3×3×256; descriptor decoder: 128×3×3×256;

[0026] Shared encoder: 64×3×3×64+pooling; feature point decoder: 256×1×1×65; descriptor decoder: 256×1×1×256;

[0027] Shared encoder: 64×3×3×64;

[0028] Shared encoder: 64×3×3×64+pooling;

[0029] Shared encoder: 64×3×3×128;

[0030] Shared encoder: 64×3×3×64+pooling;

[0031] Shared encoder: 64×3×3×128;

[0032] Shared encoder: 64×3×3×128;

[0033] In the shared encoder, the first number is the input channel, the middle two numbers are the convolution kernel size, and the last number is the number of convolution kernels. "+Pooling" means a maximum pooling operation with a stride of 2 is performed after the convolution.

[0034] The first six layers of the shared encoder structure undergo two 3×3 convolutions, followed by a 2×2 maximum pooling with a stride of 2. Each convolutional layer is followed by normalization and nonlinear activation operations.

[0035] Furthermore, the feature detection and classification layer is used to perform a two-step convolution operation on the feature map to filter out high-quality feature points, as follows:

[0036] First, the feature map is softmax processed through the original convolutional house to obtain the initial screened feature point set;

[0037] Then the 3×3 convolution layer performs interpolation calculation and inputs the 1×1 pooling convolution layer to obtain the confidence of the feature point;

[0038] Finally, the output feature points and descriptor information are combined and arranged by confidence to obtain a set of high-quality feature points. The N points with the highest scores in each image represent highly repeated pixels in the scene. The confidence adopts binary classification, and the closer it is to 1, the higher the authenticity of the feature point.

[0039] Furthermore, the method for calculating the confidence of feature points is as follows:

[0040] The loss Lc is as follows:

[0041]

[0042] In the above formula, k represents the coordinates of the feature points, k∈K, K represents the set of feature points; α p Represents the weight term of the feature point position, α s Indicates the score of the feature point position; T p is the distance of each point k to the highest scoring point in the region; T s and T k They represent the predicted scores of feature points and the point pairs with similar feature point scores.

[0043] Furthermore, in step 2, a SuperGlue deep feature matching network based on graph neural network is established, and the key points and descriptors on each frame are weighted matched through self-attention mechanism and cross-attention mechanism, and the matching matrix is ​​optimized through graph neural network, and bipartite graph matching is performed to obtain the final matching result, as follows:

[0044] Step 2.1: Apply the self-attention mechanism to each group of key points and their descriptors, and update the feature representation of the key points by calculating the attention weight of each key point to other key points in its own group;

[0045] Step 2.2: Apply the cross-attention mechanism to the two sets of key points and their descriptors, and update the feature representation of the key points by calculating the attention weight of each key point to the other set of key points;

[0046] Step 2.3: Use graph neural network to further process the updated key point features and capture the relationship between key points through the message passing mechanism of nodes and edges;

[0047] Step 2.4, using the updated key point features, calculate the matching matrix, each element of the matching matrix represents the matching score between two key points;

[0048] Step 2.5: Use the optimization algorithm to perform bipartite graph matching on the matching matrix to determine the best matching pair and ensure that the matching result is globally optimal.

[0049] Furthermore, in step 3, the mismatches are eliminated as follows:

[0050] Adaptive K-means clustering is used to eliminate false matches, and the Euclidean distance average method is used to adaptively determine the number of clusters K0, including Brief descriptor matching and feature point K-means clustering.

[0051] Furthermore, in step 4, the matched feature points and their corresponding relationships are integrated into the ORB-SLAM2 system to construct a self-supervised SLAM system based on a neural network, as follows:

[0052] The matched feature points and their corresponding relationships are integrated into the ORB-SLAM2 system to replace the original feature extraction and matching modules for camera pose estimation and map construction, realizing a self-supervised visual SLAM system based on graph neural network.

[0053] Furthermore, the camera pose estimation is specifically as follows:

[0054] The camera pose estimation is to obtain the inter-frame graph to calculate the camera motion, match the point pairs according to the obtained inter-frame features, and combine the camera model and the method of minimizing the reprojection error to solve the camera pose;

[0055] The image feature matching point pairs obtained by the monocular camera can only be pixel coordinates, which are composed of multiple 2D-2D matching point pairs. The SLAM system estimates the camera motion through epipolar geometry, and obtains 2D-3D matching point pairs based on the depth information obtained after initialization. Finally, the PnP method is used to solve the motion of the 3D-2D point pairs and calculate the rotation and translation of the camera.

[0056] Based on the matching results of feature points, the relative position of the moving target between adjacent images is estimated through the correspondence between paired points in the image; according to the dimension of the matching data, it is divided into three categories: 2D-to-2D, 3D-to-2D and 3D-to-3D. t and R are set to represent the translation and rotation of the camera respectively, as follows:

[0057] (1) 2D-to-2D, epipolar geometry:

[0058] When the system only has 2D pixel coordinate data and no prior information on the spatial scale, the epipolar geometry algorithm is used to estimate the transformation matrix for motion estimation through epipolar geometry constraints. The specific process is as follows:

[0059] p2 T K -T t R K -1 p1=0

[0060] Among them, p1 and p2 represent the coordinate positions of the corresponding pixel points in the two frames of images, K represents the camera intrinsic parameter, and t and R constitute the corresponding essential matrix E:

[0061] E=t R

[0062] (2) 3D-to-2D, PnP:

[0063] When the three-dimensional landmark points and their corresponding pixel projections in the space are known, the 3D-to-2D PnP method is used for motion calculation. The PnP method solves the camera motion by constructing the correspondence between the three-dimensional space points and the two-dimensional pixel points. When the mapping relationship between n space points and their projection positions is known, the camera pose is estimated. Based on direct linear transformation, the linear constraint relationship obtained is as follows:

[0064]

[0065] Among them, (u, v, l) represents the homogeneous coordinates of a two-dimensional point in the normalized camera imaging plane, and (X, Y, Z, l) is the homogeneous coordinates of the corresponding three-dimensional space point P;

[0066] The above formula can be simplified as follows:

[0067] l1 T p-l3TPu1=0

[0068] l2 T p-l3TPv1=0

[0069]

[0070] Among them, l1, l2 and l3 represent the first row, second row and third row vectors of the corresponding augmented matrix [R t] respectively; T1, T2, T3 represent the corresponding row vectors in the augmented matrix respectively; P represents the homogeneous coordinates of the three-dimensional space point; u1 represents the homogeneous coordinates of the horizontal coordinate u of the two-dimensional point on the normalized camera imaging plane; v1 represents the homogeneous coordinates of the vertical coordinate v of the two-dimensional point on the normalized camera imaging plane; t1 and t2 represent the corresponding components of the translation vector respectively; according to the calculation formula, the unknown transformation matrix T is solved linearly through the corresponding relationship of the six pairs of paired points;

[0071] (3) 3D-to-3D, ICP:

[0072] When the system knows the spatial distance or environmental depth information, the 3D-to-3D ICP algorithm is used for motion estimation. The positioning algorithm converts the motion estimation of the camera between the same frames into a matching problem of feature points in three-dimensional space through triangulation and solves it using the ICP method. The ICP method constructs a least squares problem and finally calculates the translation and rotation estimation of the camera. The specific solution process is as follows:

[0073]

[0074] Among them, p i and q i is a pair of matching 3D feature points, and N is the number of feature point pairs;

[0075] The front-end visual odometry (VO) of the visual SLAM system reconstructs the complete motion trajectory by accumulating the camera pose estimation between image frames; however, due to the errors in pose estimation, the accumulated absolute camera pose will produce trajectory drift over time, causing the positioning system to fail. Therefore, closed-loop detection is used to provide global trajectory constraints for the back-end optimization module.

[0076] Compared with the prior art, the present invention has the following significant advantages: (1) It adopts a self-supervised framework to train feature point detectors and descriptors, which can be run on a full scale, solving the problem of difficulty in feature point extraction and matching in traditional SLAM methods under conditions of weak lighting, texture and large-scale transformation, and improving the accuracy of feature extraction and matching; (2) It uses an offline method to extract and save feature points and descriptors, which reduces the consumption of computing resources and improves the speed of extracting feature points and descriptors on devices with limited computing resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] Figure 1 It is a flow chart of a self-supervised visual SLAM method based on graph neural network of the present invention.

[0078] Figure 2 It is a feature extraction effect diagram of multiple feature extraction algorithms in an embodiment of the present invention.

[0079] Figure 3 Feature matching effect diagram of multiple feature matching algorithms in an embodiment of the present invention.

[0080] Figure 4 Schematic diagram of the principle of epipolar geometry constraint in an embodiment of the present invention.

[0081] Figure 5 Schematic diagram of the map on the public dataset Tum after Superpoint+Superglue is integrated into ORB-SLAM2 in an embodiment of the present invention. DETAILED DESCRIPTION

[0082] In order to make the purpose, technical methods and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments.

[0083] All other embodiments obtained by ordinary technicians in this field without making creative work in the embodiment of the present invention are within the scope of protection of the present invention.

[0084] Combination Figure 1 The present invention provides a self-supervised visual SLAM method based on graph neural network, comprising the following steps:

[0085] Step 1: Establish a deep feature extraction network of key points and descriptors based on the improved Superpoint structure to extract key points and descriptors on each frame of the image;

[0086] Step 2: Establish a SuperGlue deep feature matching network based on graph neural network, perform weighted matching on the key points and descriptors on each frame through self-attention mechanism and cross-attention mechanism, optimize the matching matrix through graph neural network, and perform bipartite graph matching to obtain the final matching result;

[0087] Step 3: Eliminate the mismatches that occur;

[0088] Step 4: Integrate the matched feature points and corresponding relationships into the ORB-SLAM2 system to build a self-supervised SLAM system based on neural networks.

[0089] As a specific example, in step 1, a deep feature extraction network of key points and descriptors based on the improved Superpoint structure is established to extract key points and descriptors on each frame of the picture, as follows:

[0090] The present invention replaces the original encoder of the Superpoint network with a lightweight architecture of MobileNetV2 with fewer model parameters and rich feature encoding information, adopts an inverted residual module based on a linear bottleneck, and increases the receptive field range of the feature map by first expanding and then compressing. At the same time, a series of linear operations are added to make the network pay more attention to the key information in the feature data, thereby improving the robustness of the image features.

[0091] Use 2D Gaussian labels to convert labels from single discrete values ​​to 2D Gaussian distributions. By performing Gaussian smoothing on labels, labels with similar information are fused together to improve the robustness and generalization ability of the model and achieve data enhancement.

[0092] Use offline extraction and storage of feature points and descriptors to reduce the consumption of computing resources;

[0093] The lightweight architecture of MobileNetV2 is based on an inverted residual module with a linear bottleneck. The bottleneck module of each layer is repeated only once to reduce the number of model parameters. The architecture is shown in Table 1:

[0094] Table 1

[0095]

[0096] The convolution kernels of the Superpoint network are shown in Table 2. Each line in Table 2 is a convolution channel. The first number is the input channel, the middle two numbers are the convolution kernel size, and the last number is the number of convolution kernels. "+ Pooling" means that a maximum pooling operation with a stride of 2 is performed after the convolution. The shared encoder structure is similar to the convolution structure of the VGG network. The first six layers are followed by a 2×2 maximum pooling with a stride of 2 after two 3×3 convolutions. Each convolution layer is followed by batch normalization and nonlinear activation operations.

[0097] Table 2

[0098]

[0099] By comparison, it can be found that in addition to replacing most of the convolutional layers with depthwise separable convolutions, the present invention also replaces the number of layers of the shared encoder from the original 8 convolutions to the current 5 convolutions. The downsampling method of 2×2 maximum pooling with a step size of 2 after convolution in the original network is replaced by a spear convolution layer with a step size of 2, which not only retains the convolution with a step size of 2, but also does not reduce the convolution operation. Traditional convolution with a step size of 2 directly meets the downsampling requirements, and the ability to extract features is almost unaffected, so the step size of the convolution kernel movement is adjusted from 1 to 2.

[0100] Depthwise separable convolution is divided into depthwise convolution and pointwise convolution. First, each channel is convolved separately using a given convolution kernel size and the results are combined. This part is called depthwise convolution. Then, a standard convolution is performed using a unit convolution kernel and a feature map is output. This part is called pointwise convolution. When depthwise separable convolution is performed with a stride of 2, because the output feature map size is 1 / 2 of the input feature map, the depthwise convolution step is first adjusted to 2 so that the depthwise convolution keeps a step of 1, thereby achieving 2x downsampling.

[0101] Set the convolution layer input D F ×D F The feature map F of ×M is downsampled by a depthwise separable convolution with a stride of 1 and a 2x2 maximum pooling operation with a stride of 2. The output channel is still M and the convolution kernel size is D. K ×D K , then the calculation amount of this step is:

[0102] D K ×D K ×M×D F ×D+M×M×D F ×D F +D F ×D F ×M

[0103] It can be found that the depthwise separable convolution with a stride of 2 is less than 1 / 4 of the computational effort of the Superpoint network convolution. In order to reduce the feature information loss caused by the depthwise separable convolution operation, the output dimension of the shared encoder is set to 256 dimensions.

[0104] The feature detection and classification layer performs two-step convolution operations on the feature map to screen out high-quality feature points. First, the feature map is softmax processed through the original convolution layer to obtain the initial screened feature point set; then the 3×3 convolution layer performs interpolation calculations and inputs the 1×1 pooling convolution layer to obtain the feature point confidence; finally, the output feature points and descriptor information are combined and arranged by confidence to obtain a set of high-quality feature points. The confidence adopts binary classification, and the closer it is to 1, the more it is a real feature point.

[0105] The confidence loss is introduced to reduce the repetitiveness of feature points extracted by the feature detection classification layer. In image matching, the extracted feature points represent information of different areas in the scene. It is important to have a confidence score. For each image, the N points with the highest scores may represent highly repetitive pixels in the scene. The confidence loss Lc is as follows:

[0106]

[0107] In the above formula, k represents the coordinates of the feature points, k∈K, K represents the set of feature points; α p Represents the weight term of the feature point position, α s Indicates the score of the feature point position, T p is the distance between each point k and the highest-scoring point in the region. As time goes by, the network no longer randomly predicts positions, and the distance between points will gradually decrease, thereby improving the position accuracy of feature points. s and T k They represent the predicted scores of feature points and the point pairs with similar feature point scores.

[0108] As a specific example, in step 2, a SuperGlue deep feature matching network based on a graph neural network is established, and the key points and descriptors on each frame of the picture are weighted matched through the self-attention mechanism and the cross-attention mechanism, and the matching matrix is ​​optimized through the graph neural network, and the bipartite graph matching is performed to obtain the final matching result, as follows:

[0109] Step 2.1: Apply the self-attention mechanism to each group of key points and their descriptors, and update the feature representation of the key points by calculating the attention weight of each key point to other key points in its own group;

[0110] Step 2.2: Apply the cross-attention mechanism to the two sets of key points and their descriptors, and update the feature representation of the key points by calculating the attention weight of each key point to the other set of key points;

[0111] Step 2.3: Use graph neural network to further process the updated key point features and capture the relationship between key points through the message passing mechanism of nodes and edges;

[0112] Step 2.4, using the updated key point features, calculate the matching matrix, each element of the matching matrix represents the matching score between two key points;

[0113] Step 2.5: Use the optimization algorithm to perform bipartite graph matching on the matching matrix to determine the best matching pair and ensure that the matching result is globally optimal.

[0114] Attention GNN is the core of the SuperGlue algorithm. It is a method based on graph neural network for jointly encoding feature points in two images. By modeling the relationship between feature points, attention GNN can generate attention scores between each feature point and other feature points, so as to fuse the information between different features and obtain more accurate feature representation. In SuperGlue, attention GNN mainly consists of three components: feature extractor, feature converter and attention model.

[0115] The feature extractor extracts features from the input feature point descriptors to obtain the representation of each feature point. In SuperGlue, the feature extractor uses a convolutional neural network-based method to efficiently extract features from the input feature point descriptors.

[0116] The feature converter converts features to obtain more accurate feature representation. In SuperGlue, the feature converter uses a multi-layer perceptron-based method to map the representation of feature points into a higher-dimensional space, thereby improving the expressiveness of features.

[0117] The last step of the attention GNN is to use the attention model to model the relationship between different features. In SuperGlue, the attention model uses a graph neural network-based method to model the relationship between feature points and generate attention scores between each feature point and other feature points. These attention scores can be used to fuse information between different features to obtain more accurate feature representations. Graph neural networks are a type of neural network model used to process graph data structures, in which nodes and edges represent entities of the data and the relationship between them, respectively. In SuperGlue, the nodes of the graph represent feature points in the input image, while the edges of the graph represent the relationship between two feature points.

[0118] When constructing the graph structure, SuperGlue uses feature points as nodes and the spatial relationship between feature points and the similarity between feature vectors as edges. Specifically, for two feature points p i and p j , the spatial relationship between them can be expressed by a normalized distance vector, namely:

[0119]

[0120] Where (x i ,y i ) and (x j ,y j ) represent the coordinates of the two feature points on the image. In addition, in order to make the graph structure denser, SuperGlue also creates edges between each feature point and its k nearest neighbor feature points.

[0121] For each node i, SuperGlue will transform its feature vector f i As the initial representation of the node, SuperGlue also calculates the initial representation of the edge between each node and its adjacent nodes. ij , used to transmit information. Specifically, e ij It consists of two parts: spatial similarity and feature vector similarity. Spatial similarity indicates the spatial distance between feature points, and feature vector similarity indicates the similarity between feature vectors. The specific calculation method is as follows:

[0122] e ij =[d ij ,f i T f i ] T

[0123] Among them, [d ij ,f i T f i ] means concatenating the spatial similarity and feature vector similarity together.

[0124] SuperGlue's optimal matching layer is a neural network layer used to determine the best matching relationship between feature points in two images. The input of the optimal matching layer is the feature representation of nodes and edges processed by the attention GNN, and the output is the index of the best matching point of each feature point in the other image. The optimal matching layer consists of two sub-networks: the feature extraction network and the matching layer. The feature extraction network is used to convert the input node and edge feature representation into a higher-dimensional feature representation for better matching; the matching layer is used to match the feature points in the two images and output the index of the best matching point of each feature point in the other image.

[0125] Feature matching is a critical calculation process in the vSLAM system. It measures the similarity of feature points between two image frames to achieve feature point matching of image pairs. This process provides a basis for subsequent VO motion estimation, local optimization and other calculation processes. When the number of feature points in the image is small, a brute force matching algorithm is used for pairing; when the number of feature points is large, the brute force matching method will consume a lot of computing time, so a more adaptable Superglue algorithm is used for pairing.

[0126] As a specific example, in step 3, adaptive K-means clustering is used to eliminate false matches, and the Euclidean distance average method is used to adaptively determine the number of clusters K0; this part consists of Brief descriptor matching and feature point K-means clustering.

[0127] As a specific example, in step 4, the matched feature points and their corresponding relationships are integrated into the ORB-SLAM2 system to replace its original feature extraction and matching modules for camera pose estimation and map construction, realizing a self-supervised visual SLAM system based on graph neural network, as follows:

[0128] Camera pose estimation is the process of calculating the camera motion through the obtained inter-frame graph. For the obtained inter-frame feature matching pairs, the camera pose is solved based on these points, combined with the camera model and the method of minimizing the reprojection error. The image feature matching point pairs obtained by the monocular camera can only be pixel coordinates, which are composed of multiple 2D-2D matching point pairs. The SLAM system estimates the camera motion through epipolar geometry, and obtains 2D-3D matching point pairs based on the depth information obtained after initialization. Finally, the PnP method is used to solve the motion of the 3D-2D point pairs and solve the rotation and translation of the camera.

[0129] Based on the matching results of feature points, the relative position of the moving target between adjacent images is estimated through the correspondence between paired points in the image. According to the dimension of the matching data, it is divided into three categories: 2D-to-2D, 3D-to-2D and 3D-to-3D.

[0130] Set t and R to represent the translation and rotation of the camera, respectively, as follows:

[0131] (1) 2D-to-2D, epipolar geometry:

[0132] When the system only has 2D pixel coordinate data and no prior information about the spatial scale, the epipolar geometry algorithm can be used. This algorithm estimates the transformation matrix for motion estimation through epipolar geometry constraints. The specific process is as follows:

[0133] p2 T K -T t R K -1 p1=0

[0134] Among them, p1 and p2 represent the coordinate positions of the corresponding pixel points in the two frames of images, K represents the camera intrinsic parameter, and t and R can form the corresponding essential matrix E:

[0135] E=t R

[0136] (2) 3D-to-2D, PnP:

[0137] When the three-dimensional landmark points and their corresponding pixel projections in the space are known, the 3D-to-2D PnP algorithm can be used for motion calculation. The PnP method solves the camera motion by constructing the correspondence between the three-dimensional space points and the two-dimensional pixel points. When the mapping relationship between n spatial points and their projection positions is known, the system can estimate the camera's pose. Based on direct linear transformation, the linear constraint relationship obtained is as follows:

[0138]

[0139] Among them, p = (u, v, 1) T represents the homogeneous coordinates of the two-dimensional point in the normalized camera imaging plane, and (X, Y, Z, 1) is the homogeneous coordinates of the corresponding three-dimensional space point P; the above formula is simplified as follows:

[0140] l1 T p-l3TPu1=0

[0141] l2 T p-l3TPv1=0

[0142]

[0143] Among them, l1, l2 and l3 represent the first row, second row and third row vectors of the corresponding augmented matrix [R t] respectively; T1, T2, T3 represent the corresponding row vectors in the augmented matrix respectively; P represents the homogeneous coordinates of the three-dimensional space point; u1 represents the homogeneous coordinates of the horizontal coordinate (u) of the two-dimensional point on the normalized camera imaging plane; v1 represents the homogeneous coordinates of the vertical coordinate (v) of the two-dimensional point on the normalized camera imaging plane; t1 and t2 represent the corresponding components of the translation vector respectively. According to the calculation formula, the unknown transformation matrix T is solved linearly through the corresponding relationship of the six pairs of paired points;

[0144] (3) 3D-to-3D, ICP:

[0145] When the system knows the spatial distance or environmental depth information, the 3D-to-3D ICP algorithm can be used for motion estimation; the positioning algorithm converts the motion estimation of the camera between the same frames into a matching problem of feature points in three-dimensional space through triangulation, and solves it using the ICP method. The ICP method constructs a least squares problem and finally calculates the translation and rotation estimation of the camera. The specific solution process is as follows:

[0146]

[0147] Among them, p i and q i is a pair of matching 3D feature points, and N is the number of feature point pairs;

[0148] The front-end visual odometry (VO) of the visual SLAM system reconstructs the complete motion trajectory by accumulating the camera pose estimation between image frames. However, due to the certain errors in pose estimation, the accumulated absolute camera pose will produce trajectory drift over time, which may cause the positioning system to fail in severe cases. Therefore, the system uses closed-loop detection to provide global trajectory constraints for the back-end optimization module.

[0149] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0150] Example

[0151] This embodiment uses the method of the present invention and multiple feature extraction algorithms to extract features from the image sequence. The feature extraction effect is as follows: Figure 2 As shown; Figure 3 Matching effect diagram for multiple algorithm features; Figure 4 It is a schematic diagram of epipolar geometry constraints; Figure 5 It is the map of the public data set Tum after Superpoint+Superglue is integrated into ORB-SLAM2; Table 3 is the comparison results of feature extraction repetition rate (rep) of the algorithm of the present invention and other algorithms under different illumination and visual angles:

[0152] Table 3

[0153]

[0154] Depend on Figure 2 and Figure 3 , and Table 3 show that the self-supervised visual SLAM method based on graph neural network in the present invention solves the problem of difficult feature point extraction and matching of traditional SLAM methods under weak lighting, texture and large-scale transformation conditions, improves the accuracy of feature extraction and matching, reduces the consumption of computing resources, and improves the extraction speed of feature points and descriptors on devices with limited computing resources.

[0155] The embodiments of the present invention disclose preferred embodiments, but are not limited thereto. A person skilled in the art can easily understand the spirit of the present invention based on the above embodiments and make different extensions and changes. However, as long as they do not deviate from the spirit of the present invention, they are all within the protection scope of the present invention.

[0156] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A self-supervised visual SLAM method based on graph neural network, characterized in that: The following steps are involved: Step 1: Establish a deep feature extraction network of key points and descriptors based on the improved Superpoint structure to extract key points and descriptors on each frame of the image; Step 2: Establish a SuperGlue deep feature matching network based on graph neural network, perform weighted matching on the key points and descriptors on each frame through self-attention mechanism and cross-attention mechanism, optimize the matching matrix through graph neural network, and perform bipartite graph matching to obtain the final matching result; Step 3: Eliminate the mismatches that occur; Step 4: Integrate the matched feature points and corresponding relationships into the ORB-SLAM2 system to build a self-supervised SLAM system based on neural networks.

2. The self-supervised visual SLAM method based on graph neural network according to claim 1, characterized in that In step 1, a deep feature extraction network based on feature points and descriptors of the improved Superpoint structure is established, as follows: The MobileNetV2 lightweight architecture is used to replace the original network framework. The residual block structure is used to implement the expansion and compression operations, which increases the receptive field of the feature map. At the same time, linear operations are added to make the network pay more attention to the key information in the feature data.

3. The self-supervised visual SLAM method based on graph neural network according to claim 2, characterized in that The architecture of the deep feature extraction network is as follows: Convolutional layer Conv2d, 3×3, output channels 16, NL is HS, stride is 2; Convolutional layer Bottleneck, 3×3, output channels 48, NL is RE, stride is 2; Convolutional layer Bottleneck, 3×3, output channels 48, NL is RE, stride is 1; Convolutional layer Bottleneck, 5×5, output channels 96, NL is RE, stride is 2; Convolutional layer Bottleneck, 5×5, output channels 96, NL is HS, stride is 1; Convolutional layer Bottleneck, 5×5, output channels 96, NL is HS, stride is 2; Convolutional layer Bottleneck, 5×5, output channels 96, NL is HS, stride is 1; Convolutional layer Conv2d×1, NBN, output channel 128, NL is HS, and the stride is 1.

4. The self-supervised visual SLAM method based on graph neural network according to claim 2, characterized in that The Superpoint network convolution kernel is shown as follows: Shared encoder: 1×3×3×64; feature point decoder: 128×3×3×256; descriptor decoder: 128×3×3×256; Shared encoder: 64×3×3×64+pooling; Feature Points Decoder: 256×1×1×65; Descriptor decoder: 256×1×1×256; Shared encoder: 64×3×3×64; Shared encoder: 64×3×3×64+pooling; Shared encoder: 64×3×3×128; Shared encoder: 64×3×3×64+pooling; Shared encoder: 64×3×3×128; Shared encoder: 64×3×3×128; In the shared encoder, the first number is the input channel, the middle two numbers are the convolution kernel size, and the last number is the number of convolution kernels. "+Pooling" means performing a maximum pooling operation with a stride of 2 after the convolution. The first six layers of the shared encoder structure undergo two 3×3 convolutions, followed by a 2×2 maximum pooling with a stride of 2. Each convolutional layer is followed by normalization and nonlinear activation operations.

5. The self-supervised visual SLAM method based on graph neural network according to claim 2, characterized in that The feature detection and classification layer is used to perform two-step convolution operations on the feature map to filter out high-quality feature points, as follows: First, the feature map is softmax processed through the original convolutional house to obtain the initial screened feature point set; Then the 3×3 convolution layer performs interpolation calculation and inputs the 1×1 pooling convolution layer to obtain the confidence of the feature point; Finally, the output feature points and descriptor information are combined and arranged by confidence to obtain a set of high-quality feature points. The N points with the highest scores in each image represent highly repeated pixels in the scene. The confidence adopts binary classification, and the closer it is to 1, the higher the authenticity of the feature point.

6. The self-supervised visual SLAM method based on graph neural network according to claim 5, characterized in that: The method for calculating the confidence of feature points is as follows: The loss Lc is as follows: In the above formula, k represents the coordinates of the feature point, k∈K, K represents the set of feature points; α p Represents the weight term of the feature point position, α s The score representing the position of the feature point; T p is the distance of each point k to the highest scoring point in the region; T s and T k They represent the predicted scores of feature points and the point pairs with similar feature point scores.

7. The self-supervised visual SLAM method based on graph neural network according to claim 1, characterized in that: In step 2, a SuperGlue deep feature matching network based on graph neural network is established. The key points and descriptors on each frame are weighted matched through self-attention mechanism and cross-attention mechanism. The matching matrix is ​​optimized through graph neural network, and bipartite graph matching is performed to obtain the final matching result, as follows: Step 2.1: Apply the self-attention mechanism to each group of key points and their descriptors, and update the feature representation of the key points by calculating the attention weight of each key point to other key points in its own group; Step 2.2: Apply the cross-attention mechanism to the two sets of key points and their descriptors, and update the feature representation of the key points by calculating the attention weight of each key point to the other set of key points; Step 2.3: Use graph neural network to further process the updated key point features and capture the relationship between key points through the message passing mechanism of nodes and edges; Step 2.4, using the updated key point features, calculate the matching matrix, each element of the matching matrix represents the matching score between two key points; Step 2.5: Use the optimization algorithm to perform bipartite graph matching on the matching matrix to determine the best matching pair and ensure that the matching result is globally optimal.

8. The self-supervised visual SLAM method based on graph neural network according to claim 1, characterized in that: In step 3, the mismatches are eliminated as follows: Adaptive K-means clustering is used to eliminate false matches, and the Euclidean distance average method is used to adaptively determine the number of clusters K0, including Brief descriptor matching and feature point K-means clustering.

9. The self-supervised visual SLAM method based on graph neural network according to claim 1, characterized in that: In step 4, the matched feature points and their corresponding relationships are integrated into the ORB-SLAM2 system to build a self-supervised SLAM system based on a neural network, as follows: The matched feature points and their corresponding relationships are integrated into the ORB-SLAM2 system to replace the original feature extraction and matching modules for camera pose estimation and map construction, realizing a self-supervised visual SLAM system based on graph neural network.

10. The self-supervised visual SLAM method based on graph neural network according to claim 9, characterized in that: The camera pose estimation is as follows: The camera pose estimation is to obtain the inter-frame graph to calculate the camera motion, match the point pairs between the acquired image frames, and combine the camera model and the method of minimizing the reprojection error to solve the camera pose; The image feature matching point pairs obtained by the monocular camera can only be pixel coordinates, which are composed of multiple 2D-2D matching point pairs. The SLAM system estimates the camera motion through epipolar geometry, and obtains 2D-3D matching point pairs based on the depth information obtained after initialization. Finally, the PnP method is used to solve the motion of the 3D-2D point pairs and calculate the rotation and translation of the camera. Based on the matching results of feature points, the relative position of the moving target between adjacent images is estimated through the correspondence between paired points in the image; according to the dimension of the matching data, it is divided into three categories: 2D-to-2D, 3D-to-2D and 3D-to-3D. t and R are set to represent the translation and rotation of the camera respectively, as follows: (1) 2D-to-2D, epipolar geometry: When the system only has 2D pixel coordinate data and no prior information on the spatial scale, the epipolar geometry algorithm is used to estimate the transformation matrix for motion estimation through epipolar geometry constraints. The specific process is as follows: p2 T K -T t R K -1 p1=0 Among them, p1 and p2 represent the coordinate positions of the corresponding pixel points in the two frames of images, K represents the camera intrinsic parameter, and t and R constitute the corresponding essential matrix E: E=t R (2) 3D-to-2D, PnP: When the three-dimensional landmark points and their corresponding pixel projections in the space are known, the 3D-to-2D PnP method is used for motion calculation. The PnP method solves the camera motion by constructing the correspondence between the three-dimensional space points and the two-dimensional pixel points. When the mapping relationship between n space points and their projection positions is known, the camera pose is estimated. Based on direct linear transformation, the linear constraint relationship obtained is as follows: Among them, (u, v, l) represents the homogeneous coordinates of a two-dimensional point in the normalized camera imaging plane, and (X, Y, Z, l) is the homogeneous coordinates of the corresponding three-dimensional space point P; The above formula can be simplified as follows: l1 T p-l3TPu1=0 <h2 style=";text-align:left;direction:ltr">l2<h2 style=";text-align:left;direction:ltr"> T <h2 style=";text-align:left;direction:ltr"> p-l3TPv1=0 Among them, l1, l2 and l3 represent the first row, second row and third row vectors of the corresponding augmented matrix [R t] respectively; T1, T2, T3 represent the corresponding row vectors in the augmented matrix respectively; P represents the homogeneous coordinates of the three-dimensional space point; u1 represents the homogeneous coordinates of the horizontal coordinate u of the two-dimensional point on the normalized camera imaging plane; v1 represents the homogeneous coordinates of the vertical coordinate v of the two-dimensional point on the normalized camera imaging plane; t1 and t2 represent the corresponding components of the translation vector respectively; according to the calculation formula, the unknown transformation matrix T is solved linearly through the corresponding relationship of the six pairs of paired points; (3) 3D-to-3D, ICP: When the system knows the spatial distance or environmental depth information, the 3D-to-3D ICP algorithm is used for motion estimation. The positioning algorithm converts the motion estimation of the camera between the same frames into a matching problem of feature points in three-dimensional space through triangulation and solves it using the ICP method. The ICP method constructs a least squares problem and finally calculates the translation and rotation estimation of the camera. The specific solution process is as follows: Among them, p i and q i is a pair of matching 3D feature points, and N is the number of feature point pairs; The front-end visual odometry (VO) of the visual SLAM system reconstructs the complete motion trajectory by accumulating the camera pose estimation between image frames; however, due to the errors in pose estimation, the accumulated absolute camera pose will produce trajectory drift over time, causing the positioning system to fail. Therefore, closed-loop detection is used to provide global trajectory constraints for the back-end optimization module.

Citation Information

Cited By

  • Visible light and infrared image registration method based on super-resolution

    CN120047506A

  • VGGT-based external key point matching and tracking trajectory calculation method and device

    CN121504977A

  • End-to-end visual semantic pose estimation method and device for automatic driving and medium

    CN121982082A