A visual slam loop detection method based on an improved convolutional neural network in an indoor scene

By combining an improved VGG-19 convolutional neural network with a random forest model, the problems of low real-time performance and low accuracy in visual SLAM loop closure detection are solved, achieving more efficient indoor scene detection.

CN116503649BActive Publication Date: 2026-03-31SOUTHEAST UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-23
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Traditional visual SLAM loop closure detection algorithms suffer from poor real-time performance and low accuracy in indoor scenes, and the computational overhead of high-dimensional neural network structures is too high, failing to meet real-time requirements.

Method used

An improved VGG-19 convolutional neural network with an added attention mechanism module is used for feature extraction, and a random forest model is combined to construct feature vector blocks. The similarity between images is calculated by adjusting the cosine similarity to reduce the influence of background factors.

Benefits of technology

It improves the accuracy and real-time performance of visual SLAM loop closure detection in indoor scenes, reduces the probability of image mismatch, and enhances the robustness and portability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116503649B_ABST
    Figure CN116503649B_ABST
Patent Text Reader

Abstract

The application relates to a visual SLAM loop detection method based on an improved convolutional neural network in an indoor scene, and specifically comprises the following steps: S1, an improved VGG-19 convolutional neural network model is added with an attention mechanism module so as to be suitable for image feature vector extraction in an indoor environment, thereby obtaining a pretreatment neural network; S2, a multi-dimensional feature vector output by the improved neural network is input into a random forest model for training, and a reconstructed feature vector corresponding to a training set is output; and S3, the reconstructed feature vector obtained by forward propagation of the test set image through the improved convolutional neural network in S1 and the random forest voting mechanism output in S2 is adjusted with a cosine similarity distance calculation of a training set reconstructed feature vector set, and when a measurement value is greater than a threshold value, it is determined that a loop is formed, and an image feature vector set formed is output; the application overcomes the shortcomings of large calculation amount and poor real-time performance when image feature vectors are extracted by artificial feature points, and the feature extraction accuracy is improved by using a lightweight machine learning algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a visual SLAM loop closure detection method based on an improved convolutional neural network in indoor scenes. It belongs to computer vision technology and is applicable to the fields of SLAM perception, localization and navigation. Background Technology

[0002] SLAM (simultaneous localization and mapping), also known as CML (concurrent mapping and localization), is a technology for real-time localization and mapping, or concurrent mapping and localization. The problem can be described as follows: a robot starts moving from an unknown location in an unknown environment, performs self-localization based on its position and a map during movement, and simultaneously builds an incremental map based on its self-localization to achieve autonomous localization and navigation. The sensors used by the robot in this process typically include LiDAR and cameras. Among these, cameras have attracted attention from researchers in related fields due to their low cost and ease of installation. Visual SLAM algorithms mainly include three aspects: front-end odometry, back-end optimization, and loop closure detection. The main purpose of loop closure detection is to eliminate the accumulation of errors between adjacent frames in visual odometry, i.e., drift, and its impact on the convergence of back-end optimization.

[0003] Traditional loop closure detection algorithms rely on visual image matching, using frame-to-frame similarity to determine if the same scene exists. A common method is feature matching, which solves the data association problem in SLAM. Specifically, feature points are extracted from the camera-captured visual images using manually designed features, such as SURF or ORB feature points, to obtain corresponding keypoints and descriptor information. The degree of image matching is then calculated using descriptor similarity. Traditional loop closure detection algorithms use a bag-of-words model to build a dictionary and cluster feature descriptors. However, these manually designed feature-based methods suffer from poor real-time performance, high computational cost, and low accuracy, failing to achieve satisfactory results in engineering applications.

[0004] With the development of artificial intelligence, machine learning has been widely applied in fields such as computer vision and image processing. The loop closure detection problem in visual SLAM algorithms is a type of classification problem, and the traditional bag-of-words model is also a form of unsupervised learning. Therefore, using neural networks for object recognition and 3D scene judgment is the mainstream trend for loop closure detection. The construction of the neural network structure plays a crucial role in the robustness and real-time performance of the algorithm. High-dimensional network structures will result in excessive computational overhead, thus failing to meet the real-time requirements of SLAM.

[0005] To address the aforementioned issues, a visual SLAM loop closure detection method based on an improved convolutional neural network is proposed for indoor scenarios. Summary of the Invention

[0006] This invention aims to solve the aforementioned problems in the prior art. It proposes a method to address the issues of decreased accuracy and low real-time performance in manually designed feature point extraction for loop closure detection. Simultaneously, it resolves the overfitting problem that easily occurs in feature extraction when the neural network structure is unsuitable.

[0007] To address the aforementioned technical problems, this invention provides a visual SLAM loop closure detection method based on an improved convolutional neural network for indoor scenes. The method includes the following steps:

[0008] S1: Improve the VGG-19 (Visual Geometry Group-19) convolutional neural network model by adding an attention mechanism module to make it suitable for image feature vector extraction in indoor environments, thus obtaining a preprocessed neural network. After standardizing the training set images captured in indoor scenes, they are input into the forward propagation of the improved convolutional neural network structure to extract features from the image dataset and output a set of feature vectors.

[0009] S2: Input the multi-dimensional feature vector output by the improved neural network into the random forest model for training. Construct a uniformly divided fixed-block model to repeatedly sample feature vector blocks of a single image with replacement, thereby constructing multiple decision trees to form a random forest model, which outputs the reconstructed feature vector corresponding to the training set.

[0010] S3: For the reconstructed feature vectors obtained by forward propagation of the improved convolutional neural network in S1 and the random forest voting mechanism in S2 for the test set images, the cosine similarity distance is calculated with the reconstructed feature vector set in the training set. If the metric value is greater than the threshold, it is determined that a loop has been formed, and the resulting image feature vector set is output.

[0011] Preferably, step S1 specifically includes the following process:

[0012] S1.1 Obtain a coherent set of images captured by the camera in the indoor scene, divide it into a training set and a test set, and preprocess the images in the training set.

[0013] S1.2 performs bilinear interpolation preprocessing on the RGB three-channel images of the training set to scale the images to meet the pixel size requirements of the input layer of the VGG-19 convolutional neural network. The pixel value g(A) at point A to be calculated can be obtained by calculating the pixel values ​​at points R1 and R2.

[0014]

[0015] in, These refer to the corresponding weights of the pixel values ​​at points R1 and R2, respectively. y1 and y2 correspond to the coordinates of the pixels at points R1 and R2 in the coordinate system to be processed, respectively, and g(R1) and g(R2) correspond to the effective pixel values ​​at points R1 and R2, respectively. The above formula is used to adjust the size of the acquired image set to 224×224 pixels.

[0016] S1.3 The preprocessed image is input into the constructed improved VGG-19 convolutional neural network. First, through forward propagation from convolutional layers Conv1 to Conv5, a 3×3 lightweight convolutional kernel is used for convolution operations, and the image features are then input into the pooling layer of this layer for dimensionality reduction. The output of the l-th pooling layer is defined as p. l The output F of the l-th convolutional layer l The output of the pooling layer is then represented as:

[0017] p l =ReLU(F l ) = ReLU(a l-1 *W l +b l )

[0018] Among them, a l-1 This represents the pixel matrix of the first frame of the input image, * represents the convolution operation, W is the convolution kernel corresponding to this layer, and b represents the bias.

[0019] ReLU(·) represents the non-linear activation function (Rectified Linear Unit) used in the model, and its expression is described by the parameter x as follows:

[0020]

[0021] S1.4 adds a Convolutional Block Attention Module (CBAM) after each convolutional layer from Conv1 to Conv5 to perform attention weighting. The CBAM module includes two aspects: a spatial attention module and a channel attention module.

[0022] First, the convolutional result is passed through the Channel Attention Module (CAM). The average pooling operation is defined as AvgPool(·), and the maximum pooling operation as MaxPool(·). The output of the CAM module... Represented as:

[0023]

[0024] Here, MLP refers to the summation operation on each element, and ⊙ refers to the multiplication operation between elements. σ(·) refers to the sigmoid activation operation, and its expression is described by the parameter x as follows:

[0025]

[0026] Secondly, the output of the CAM module The final optimized result is obtained after passing through the Spatial Attention Module (SAM), and its output is... Represented as:

[0027]

[0028] Among them, f 7×7 (·) refers to using a 7×7 convolution kernel for convolution operations, reducing the dimensionality of the output channels after max pooling and average pooling layers.

[0029] S1.5 performs dimensionality reduction on the output vector using a max-pooling layer (MaxPool). The output S of the max-pooling layer is defined as:

[0030]

[0031] Where α and β are scalar parameters, representing the downsampling coefficient and the bias, respectively. This represents the output matrix of the CBAM module. Perform downsampling.

[0032] S1.6 applies the above operations to the improved forward propagation of the convolutional neural network, maps the distributed features of the hidden layers, performs full-layer convolution using convolutional kernels, obtains the result of the fully connected layer, and extracts the output of the fully connected FC7 layer (FullyConnected layers-7):

[0033]

[0034] A single image output was obtained through a fully connected layer. A 4096-dimensional image feature vector.

[0035] Preferably, step S2 specifically includes the following process:

[0036] S2.1 Based on the result of step S1, the 4096-dimensional feature vector of a single image output is divided into blocks using the average segmentation method to construct an evenly divided fixed-block model. Let the single image data ‖z‖ = M, and the data be evenly divided into K fixed blocks, where r is the corresponding fixed block:

[0037]

[0038] S2.2 Construct a meta-based decision tree model based on randomly sampled feature vectors using fixed blocks and a Bagging strategy (Bootstrap aggregating).

[0039] The specific steps are as follows: select all feature vectors within the current search block, and randomly sample the remaining feature blocks based on the Bagging strategy. Combine the two sets of feature vectors to form each node of the decision tree, and define the attribute feature set G corresponding to the fixed block i. i for:

[0040]

[0041] Among them, G i Including the feature vector r corresponding to fixed block i i The remaining fixed blocks contain a set of attribute features from which ε elements are extracted with replacement.

[0042] S2.3 For the constructed composite feature set, the CART (Classification and Regression Tree) algorithm is used to determine the splitting criteria for decision tree nodes. Let feature J take value j, and sample z be split... M Divided into and The composite feature set is divided into V categories, and the probability of a sample point belonging to the v-th category is P(v). Then, under this attribute, the Gini index for each category, expressed in Gini form, is defined as follows:

[0043]

[0044] The overall Gini index of the sample is:

[0045]

[0046] S2.4 Among all possible features J and their all possible split points j, select the feature with the smallest Gini index and its corresponding split point as the optimal feature and optimal split point. Stop generating the decision tree when the number of samples in a node is less than a predetermined threshold, or the Gini index of the sample set is less than a predetermined threshold.

[0047] S2.5 Repeat the above sampling and decision tree building process to generate a random forest classification model. Represent the random forest using BBSRF and the decision tree using TREE. The resulting random forest model with N decision trees is:

[0048]

[0049] S2.6 aggregates the voting results of the random forest classifier for each frame of the image to obtain the corresponding new feature vector Z. i .

[0050] Preferably, step S3 specifically includes the following process:

[0051] S3.1 Input test set images, extract feature vectors through the pre-constructed VGG-19 neural network based on the attention mechanism module, and output the feature vector Z of the current frame through voting using a random forest model. k ,

[0052] S3.2 Let Z be the feature vector of the current frame being tested. k =(T 1k ,T 2k ,…,T Nk The feature vector Z of the i-frame training set i =(T 1i ,T 2i ,…,T Ni ), where T refers to the voting result of each decision tree, and the distance is measured using adjusted cosine similarity:

[0053]

[0054] in, The average score of the training set images in a random forest model.

[0055] S3.3 calculates the similarity of the final voting results and sets the loop closure detection threshold to cosθ. If sim(i,k)>cosθ and the time interval between two frames exceeds the threshold, a loop closure is determined to exist in the current frame of the test set, and the detected loop closure set is output.

[0056] Compared with the prior art, the advantages of the present invention are as follows:

[0057] First, for visual SLAM loop closure detection technology in indoor scenes, a convolutional neural network is used to extract the feature vectors of visual images, which improves the shortcomings of slow speed and low accuracy of manual feature extraction.

[0058] Secondly, considering that the VGG-19 convolutional neural network structure is primarily designed for image classification tasks, the number of fully connected layers was reduced, and feature extraction was performed based on the output of the FC7 layer. To enhance the description of key points in the image by the feature vectors, an attention mechanism was introduced into the neural network to reduce the weight of background-irrelevant factors. Furthermore, the small size and lightweight structure of the attention mechanism improved the algorithm's accuracy and portability without compromising real-time performance.

[0059] Next, a random forest model is constructed after partitioning the feature vectors into blocks. Theoretically, when using sampling aggregation algorithms, even when the number of samples approaches infinity, on average, each base classifier uses only 63.2% of the total data during training. Random sampling within each fixed block after partitioning increases the probability of important features being selected, mitigating the defect of important features not being collected, and improving the model's accuracy and robustness.

[0060] Finally, by adjusting the cosine similarity to calculate the similarity between two frames, and using the orientation angle to discriminate vector similarity, the probability of mismatched images caused by large Euclidean distances between feature vectors in the same scene due to factors such as lighting is reduced. Attached Figure Description

[0061] Figure 1 This is a general flowchart of the system process of the present invention;

[0062] Figure 2 This is a flowchart illustrating the training and testing process during the practical phase of this invention.

[0063] Figure 3 To improve the flowchart of the VGG-19 convolutional neural network;

[0064] Figure 4 The sampling strategy diagram for the fixed-block random forest model. Specific implementation methods

[0065] The present invention will be further illustrated below with reference to the accompanying drawings and specific embodiments. It should be understood that the following specific embodiments are for illustrative purposes only and are not intended to limit the scope of the invention.

[0066] Example 1: As Figure 1 As shown, a visual SLAM loop closure detection method based on an improved convolutional neural network is proposed for indoor scenes. The method includes the following steps:

[0067] Step S1: Improve the VGG-19 (Visual Geometry Group-19) convolutional neural network model by adding an attention mechanism module to make it suitable for image feature vector extraction in indoor environments, thus obtaining a preprocessed neural network. After standardizing the training set images captured in indoor scenes, input them into the forward propagation of the improved convolutional neural network structure to extract features from the image dataset and output a set of feature vectors.

[0068] S1.1 Obtain a coherent set of images captured by the camera in the indoor scene, divide it into a training set and a test set, and preprocess the images in the training set.

[0069] S1.2 performs bilinear interpolation preprocessing on the RGB three-channel images of the training set to scale the images to meet the pixel size requirements of the input layer of the VGG-19 convolutional neural network. The pixel value g(A) at point A to be calculated can be obtained by calculating the pixel values ​​at points R1 and R2.

[0070]

[0071] in, These refer to the corresponding weights of the pixel values ​​at points R1 and R2, respectively. y1 and y2 correspond to the coordinates of the pixels at points R1 and R2 in the coordinate system to be processed, respectively, and g(R1) and g(R2) correspond to the effective pixel values ​​at points R1 and R2, respectively. The above formula is used to adjust the size of the acquired image set to 224×224 pixels.

[0072] S1.3 The preprocessed image is input into the constructed improved VGG-19 convolutional neural network. First, through forward propagation from convolutional layers Conv1 to Conv5, a 3×3 lightweight convolutional kernel is used for convolution operations, and the image features are then input into the pooling layer of this layer for dimensionality reduction. The output of the l-th pooling layer is defined as p. l The output F of the l-th convolutional layer l The output of the pooling layer is then represented as:

[0073] p l =ReLU(F l ) = ReLU(a l-1 *W l +b l )

[0074] Among them, a l-1 This represents the pixel matrix of the first frame of the input image, * represents the convolution operation, W is the convolution kernel corresponding to this layer, and b represents the bias.

[0075] ReLU(·) represents the non-linear activation function (Rectified Linear Unit) used in the model, and its expression is described by the parameter x as follows:

[0076]

[0077] S1.4 adds a Convolutional Block Attention Module (CBAM) after each convolutional layer from Conv1 to Conv5 to perform attention weighting. The CBAM module includes two aspects: a spatial attention module and a channel attention module.

[0078] First, the convolutional result is passed through the Channel Attention Module (CAM). The average pooling operation is defined as AvgPool(·), and the maximum pooling operation as MaxPool(·). The output of the CAM module... Represented as:

[0079]

[0080] Here, MLP refers to the summation operation on each element, and ⊙ refers to the multiplication operation between elements. σ(·) refers to the sigmoid activation operation, and its expression is described by the parameter x as follows:

[0081]

[0082] Secondly, the output of the CAM module The final optimized result is obtained after passing through the Spatial Attention Module (SAM), and its output is... Represented as:

[0083]

[0084] Among them, f 7×7 (·) refers to using a 7×7 convolution kernel for convolution operations, reducing the dimensionality of the output channels after max pooling and average pooling layers.

[0085] S1.5 performs dimensionality reduction on the output vector using a max-pooling layer (MaxPool). The output S of the max-pooling layer is defined as:

[0086]

[0087] Where α and β are scalar parameters, representing the downsampling coefficient and the bias, respectively. This represents the output matrix of the CBAM module. Perform downsampling.

[0088] S1.6 applies the above operations to the improved forward propagation of the convolutional neural network, maps the distributed features of the hidden layers, performs full-layer convolution using convolutional kernels, obtains the result of the fully connected layer, and extracts the output of the fully connected FC7 layer (FullyConnected layers-7):

[0089]

[0090] A single image output was obtained through a fully connected layer. A 4096-dimensional image feature vector.

[0091] Step S2: Input the multi-dimensional feature vector output by the improved neural network into the random forest model for training. Construct a uniformly divided fixed-block model to repeatedly sample feature vector blocks of a single image with replacement, thereby constructing multiple decision trees to form a random forest model, which outputs the reconstructed feature vector corresponding to the training set.

[0092] S2.1 Based on the result of step S1, the 4096-dimensional feature vector of a single image output is divided into blocks using the average segmentation method to construct an evenly divided fixed-block model. Let the single image data ‖z‖ = M, and the data be evenly divided into K fixed blocks, where r is the corresponding fixed block:

[0093]

[0094] S2.2 Construct a meta-based decision tree model based on randomly sampled feature vectors using fixed blocks and a Bagging strategy (Bootstrap aggregating).

[0095] The specific steps are as follows: select all feature vectors within the current search block, and randomly sample the remaining feature blocks based on the Bagging strategy. Combine the two sets of feature vectors to form each node of the decision tree, and define the attribute feature set G corresponding to the fixed block i. i for:

[0096]

[0097] Among them, G i Including the feature vector r corresponding to fixed block i i The remaining fixed blocks contain a set of attribute features from which ε elements are extracted with replacement.

[0098] S2.3 For the constructed composite feature set, the CART (Classification and Regression Tree) algorithm is used to determine the splitting criteria for decision tree nodes. Let feature J take value j, and sample z be split... M Divided into and The composite feature set is divided into V categories, and the probability of a sample point belonging to the v-th category is P(v). Then, under this attribute, the Gini index for each category, expressed in Gini form, is defined as follows:

[0099]

[0100] The overall Gini index of the sample is:

[0101]

[0102] S2.4 Among all possible features J and their all possible split points j, select the feature with the smallest Gini index and its corresponding split point as the optimal feature and optimal split point. Stop generating the decision tree when the number of samples in a node is less than a predetermined threshold, or the Gini index of the sample set is less than a predetermined threshold.

[0103] S2.5 Repeat the above sampling and decision tree building process to generate a random forest classification model. Represent the random forest using BBSRF and the decision tree using TREE. The resulting random forest model with N decision trees is:

[0104]

[0105] S2.6 For each frame of image, the voting results of the random forest classifier are aggregated to obtain the corresponding new feature vector Zi.

[0106] Step S3: For the reconstructed feature vectors obtained by forward propagation of the improved convolutional neural network in S1 and the random forest voting mechanism in S2 for the test set images, the adjusted cosine similarity distance is calculated with the reconstructed feature vector set of the training set. If the metric value is greater than the threshold, it is determined that a loop has been formed, and the resulting image feature vector set is output.

[0107] S3.1 Input test set images, extract feature vectors through the pre-constructed VGG-19 neural network based on the attention mechanism module, and output the feature vector Z of the current frame through voting using a random forest model. k ,

[0108] S3.2 Let Z be the feature vector of the current frame being tested. k =(T 1k ,T 2k ,…,T Nk The feature vector Z of the i-frame training set i =(T 1i ,T 2i ,…,T Ni ), where T refers to the voting result of each decision tree, and the distance is measured using adjusted cosine similarity:

[0109]

[0110] in, The average score of the training set images in a random forest model.

[0111] S3.3 calculates the similarity of the final voting results and sets the loop closure detection threshold to cosθ. If sim(i,k)>cosθ and the time interval between two frames exceeds the threshold, a loop closure is determined to exist in the current frame of the test set, and the detected loop closure set is output.

[0112] It should be noted that the above embodiments are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Equivalent substitutions or alternatives made based on the above technical solutions shall all fall within the scope of protection of the present invention.

Claims

1. A method for visual SLAM loop closure detection based on an improved convolutional neural network in an indoor scene, characterized in that, The method comprises the following steps: S1: improving the VGG-19 (Visual Geometry Group-19) convolutional neural network model, adding an attention mechanism module to make it suitable for image feature vector extraction in an indoor environment, thereby obtaining a pre-processing neural network, and inputting the training set images captured in an indoor scene after standardization processing into the forward propagation of the improved convolutional neural network structure to extract features of the image data set and output a feature vector set; S2: inputting the multi-dimensional feature vector output by the improved neural network into a random forest model for training, constructing an equal division fixed block model to repeatedly sample the feature vector blocks of a single image with replacement, thereby constructing multiple decision trees to form a random forest model, and outputting the reconstructed feature vectors corresponding to the training set; S3: calculating the adjusted cosine similarity distance of the reconstructed feature vectors obtained by the forward propagation of the improved convolutional neural network in S1 and the voting mechanism output by the random forest in S2 for the test set images, and determining that a loop is formed when the measurement value is greater than a threshold value, and outputting the formed image feature vector set; The step S1 specifically comprises the following processes: S1.1: obtaining a set of consecutive images captured by a camera in an indoor scene, dividing them into a training set and a test set, and preprocessing the training set images, S1.2 Bilinear interpolation preprocessing is performed on the RGB three-color channel image of the training set, so that the image is scaled to meet the pixel size requirements of the input layer of the VGG-19 convolutional neural network, and the pixel value at the to-be-calculated point may be obtained by , the pixel value at the point​ wherein, , respectively correspond to , the corresponding weights of the pixel values at the points, , respectively correspond to , the coordinate values in the coordinate system to be processed of the pixels at the points, , respectively correspond to , the effective pixel values at the points, the size of the set of collected images is adjusted to 224x224 pixels by the above formula, S1.3 input the pre-processed image into the constructed improved VGG-19 convolutional neural network, first, through the forward propagation of the convolutional layer Conv1 to the convolutional layer Conv5, the 3x3 lightweight convolution kernel is used for convolution operation, and the image features are input into the layer pooling layer for dimension reduction, and the first The output of the layer pooling layer is , the first The output of the layer convolutional layer is The output of the pooling layer is represented as: wherein, represents a pixel matrix of the 1st frame input image, represents a convolution operation, is a convolution kernel corresponding to the layer, represents a bias amount, The representative model uses a non-linear activation function (Rectified Linear Unit) whose expression is described by the parameter x as: S1.4: adding a convolutional attention mechanism module CBAM (Convolutional Block Attention Module) after each convolutional layer of Conv1 to Conv5 to perform attention weighting, and the CBAM module includes two aspects: a spatial (spatial) attention module and a channel (channel) attention module, First, the result after convolution is passed through the channel attention module CAM (Channel Attention Module), and the average pooling operation is defined as , the maximum value pooling operation is , and the output of the CAM module is , which is expressed as: wherein, denotes an addition operation over each element, denotes a multiplication operation between elements, denotes a sigmoid activation operation, whose expression is described by means of the parameter x as: Secondly the output of the CAM module The final optimized result is obtained through the spatial attention module SAM, and the output of the spatial attention module SAM is is represented as: wherein, indicates that a 7x7 convolution kernel is used for convolution operation, and the output channels after the max pooling layer and the average pooling layer are reduced in dimension, S1.5 The output vector is dimensionally reduced by a max-pooling layer MaxPool, and the output of the max-pooling layer is defined as: is: wherein, and are scalar parameters, respectively representing a down-sampling coefficient and a bias, denotes a down-sampling operation on the output matrix of the CBAM module, denotes a down-sampling operation on the output matrix of the CBAM module, S1.6: applying the above operations to the forward propagation of the improved convolutional neural network, mapping the distributed features of the hidden layer, performing full-layer convolution using a convolution kernel, obtaining the results of the fully connected layer, and extracting the output of the fully connected FC7 layer (Fully Connected layers-7): The output result of a single image is obtained by the fully connected layer , a 4096-dimensional image feature vector. 2.The improved convolutional neural network based visual SLAM loop detection method according to claim 1, characterized in that, The step S2 specifically comprises the following processes: S2.1 For the results of step S1, the method of equal division is used to block the 4096-dimensional feature vector output by the single image, and an equal division fixed block model is constructed. Let the single image data , the data is divided into K fixed blocks, for the corresponding fixed block: S2.2: constructing a meta-basic decision tree model based on the random sampling of feature vectors and the Bagging strategy (Bootstrap aggregating, guided aggregation algorithm), The specific steps are: selecting all feature vectors in the current search block, randomly sampling the remaining feature blocks based on the Bagging strategy, collecting the two parts of feature vectors to form each node of the decision tree, and defining the attribute feature set corresponding to the fixed block i is: wherein, comprising fixed block i corresponding feature vector with replacement from the remaining fixed blocks attribute feature set of the element , S2.3 For the constructed composite feature set, the CART (Classification and Regression Tree) algorithm is used to determine the splitting criteria for the decision tree nodes. Let J take the value j, and the sample... Divided into and The composite feature set is divided into V categories, and the probability of a sample point belonging to the vth category is: Under this attribute, the Gini index for each category is calculated using... The definition of the representation is: The overall Gini index of the sample is: S2.4: selecting the feature with the smallest Gini index and its corresponding split point as the optimal feature and the optimal split point among all possible features J and all possible split points j, and stopping generating the decision tree when the number of samples in the node is less than a predetermined threshold or the Gini index of the sample set is less than a predetermined threshold, S2.5 Repeat the above process of sampling and building decision trees to generate a random forest classification model, which the random forest uses represent, the decision tree uses represent, then build a random forest model containing decision trees. The random forest model is S2.6 Collect the voting results of the random forest classifier for each frame of image to obtain the corresponding new feature vector . 3.The visual SLAM loop detection method based on improved convolutional neural network according to claim 1, characterized in that, The step S3 specifically comprises the following processes: S3.1 input the test set image, extract the feature vector through the constructed VGG-19 neural network based on the attention mechanism module, and output through the random forest model to obtain the feature vector of the current frame , S3.2 Set the feature vector of the current frame for testing , the feature vector of the i-th frame in the training set where is the voting result of each decision tree, and the adjusted cosine similarity is used for distance measurement: wherein, wherein refers to the average score of the training set images in the random forest model, S3.3 Set the loop detection evaluation threshold value to be , if , and the time interval between the two frames exceeds the threshold value, it is determined that a loop occurs in the current frame of the test set, and the detected loop set is output.

4. The indoor scene visual SLAM loop detection method based on an improved convolutional neural network according to claim 1, characterized in that, In step S1.2, , The position of each pixel is determined by inversely calculating the image size scaling ratio.

5. The indoor scene visual SLAM loop detection method based on an improved convolutional neural network according to claim 1, characterized in that, When the remaining feature blocks are sampled with replacement based on the Bagging strategy in step S2.2, the size of the data set is determined according to engineering requirements.

6. The indoor scene visual SLAM loop detection method based on an improved convolutional neural network according to claim 1, characterized in that, The number of classes in step S2.3 is determined by the data involved in engineering practice and the complexity of the algorithm.

Citation Information

Patent Citations

  • Visual SLAM loopback detection method based on random forest

    CN108108764A

  • visual SLAM loopback detection method based on a pre-trained convolutional neural network

    CN109800692A