A positioning method, device, electronic device and storage medium

By combining the visual positioning network model and the long-term and short-term memory network model, the problem of low positioning accuracy in complex light changes is solved, and the visual positioning accuracy of the robot in this environment is improved, ensuring the smooth completion of the inspection task.

CN116704026BActive Publication Date: 2024-12-27STATE GRID JIANGSU ELECTRIC POWER CO LTD NANJING POWER SUPPLY COMPANY
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202310596957.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-24
Publication Date
2024-12-27
Estimated Expiration
2043-05-24

AI Technical Summary

Technical Problem

The existing positioning method has low positioning accuracy in complex light changing environments, which affects the working efficiency of patrol robots.

Method used

The fusion characteristics of the to-local image of the target robot are determined through the visual positioning network model, and the positioning is determined based on the preset long and short-term memory network model to improve the visual positioning accuracy.

Benefits of technology

In complex light changes, the visual positioning accuracy of the target robot is significantly improved, allowing it to complete inspection tasks more accurately.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116704026B_ABST
    Figure CN116704026B_ABST
Patent Text Reader

Abstract

The present invention discloses a positioning method, device, electronic device and storage medium. The method comprises: obtaining an image to be positioned of a target robot, wherein the image to be positioned is a three-dimensional image of two adjacent frames, determining the fusion features of the image to be positioned according to a visual positioning network model, the visual positioning network model is generated based on the training of a three-dimensional image frame set, and determining the position and posture of the target robot based on a preset long short-term memory network model and the fusion features. The embodiment of the present invention solves the problem of low positioning accuracy in an environment with complex light changes in the existing positioning method by determining the fusion features of the image to be positioned of the target robot according to the visual positioning network model, and then determining the position and posture of the target robot based on the fusion features and the preset long short-term memory network model. The visual positioning accuracy of the target robot in an environment with complex light changes is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a positioning method, device, electronic device and storage medium. Background Art

[0002] With the development of smart grid systems, the coverage of substations and power lines is getting wider and wider, which brings convenience to people while also bringing new problems to the management of power equipment. Robot inspection technology can improve the efficiency of inspection, reduce the cost of manual inspection, and realize intelligent abnormal detection and processing, which is gradually becoming a trend to replace manual inspection.

[0003] For inspection robots, the primary task is to solve the problem of self-positioning. Existing positioning methods, such as those based on Simultaneous Localization and Mapping (SLAM) or infrared technology, are easily disturbed by light changes, which in turn affects the work of inspection robots. In other words, existing positioning methods have the problem of low positioning accuracy in complex light-changing environments. Summary of the invention

[0004] The present invention provides a positioning method, device, electronic device and storage medium, which determine the fusion features of the image to be positioned of a target robot through a visual positioning network model, and then determine the position and posture of the target robot based on the fusion features and a preset long short-term memory network model, so as to solve the problem of low positioning accuracy in the existing positioning method under complex light changing environment and improve the visual positioning accuracy of the target robot.

[0005] According to one aspect of the present invention, a positioning method is provided, the method comprising:

[0006] Acquire the image to be positioned of the target robot, wherein the image to be positioned is a three-dimensional image of two adjacent frames;

[0007] Determine the fusion features of the image to be positioned according to the visual positioning network model, the visual positioning network model is generated based on the training of the three-dimensional image frame set;

[0008] The position and posture of the target robot are determined based on the preset long short-term memory network model and fusion features.

[0009] According to another aspect of the present invention, there is provided a positioning device, the device comprising:

[0010] An image acquisition module is used to acquire an image to be positioned of the target robot, wherein the image to be positioned is a three-dimensional image of two adjacent frames;

[0011] A feature determination module, used to determine the fusion features of the image to be located according to a visual positioning network model, wherein the visual positioning network model is generated based on the training of a three-dimensional image frame set;

[0012] The posture determination module is used to determine the posture of the target robot based on a preset long short-term memory network model and fusion features.

[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0014] at least one processor; and

[0015] a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the positioning method described in any embodiment of the present invention.

[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the positioning method described in any embodiment of the present invention when executed.

[0018] The technical solution of the embodiment of the present invention obtains the image to be positioned of the target robot, wherein the image to be positioned is a three-dimensional image of two adjacent frames, determines the fusion features of the image to be positioned according to the visual positioning network model, the visual positioning network model is generated based on the training of the three-dimensional image frame set, and determines the position and posture of the target robot based on a preset long short-term memory network model and the fusion features. The embodiment of the present invention solves the problem of low positioning accuracy in complex light changing environments in existing positioning methods by determining the fusion features of the image to be positioned of the target robot according to the visual positioning network model, and then determining the position and posture of the target robot based on the fusion features and the preset long short-term memory network model, thereby improving the visual positioning accuracy of the target robot in complex light changing environments.

[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0021] Figure 1 is a flowchart of a positioning method provided according to Embodiment 1 of the present invention;

[0022] Figure 2 is a flowchart of a positioning method provided according to Embodiment 2 of the present invention;

[0023] Figure 3 is a flow chart of a method for acquiring fusion features of an image to be located provided according to Embodiment 2 of the present invention;

[0024] Figure 4 is a structural diagram of a positioning network model provided according to Embodiment 3 of the present invention;

[0025] Figure 5 is a flowchart of a positioning method provided according to Embodiment 3 of the present invention;

[0026] Figure 6 is a structural diagram of a positioning network model provided according to Embodiment 3 of the present invention;

[0027] Figure 7 is a test scene image corresponding to the test scene 1 provided in Embodiment 3 of the present invention;

[0028] Figure 8 is a two-dimensional path map corresponding to the test scenario 1 provided in the third embodiment of the present invention;

[0029] Fig. 9 is a speed heat map corresponding to the test scenario 1 provided in the third embodiment of the present invention;

[0030] Fig.10 is a test scene image corresponding to the test scene 2 provided in the third embodiment of the present invention;

[0031] Fig.11 is a two-dimensional path map corresponding to the test scenario 2 provided in the third embodiment of the present invention;

[0032] Fig.12 is a speed heat map corresponding to the test scenario 2 provided in the third embodiment of the present invention;

[0033] Fig.13 is a test scene image corresponding to the test scene three provided in the third embodiment of the present invention;

[0034] Fig.14 is a two-dimensional path map corresponding to the test scenario three provided in the third embodiment of the present invention;

[0035] Fig.15 is a speed heat map corresponding to the test scenario 3 provided in the third embodiment of the present invention;

[0036] Fig.16 is a structural schematic diagram of a positioning device provided according to Embodiment 4 of the present invention;

[0037] Fig.17 It is a schematic diagram of the structure of an electronic device for implementing the positioning method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0038] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0039] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0040] Embodiment 1

[0041] Figure 1 A flowchart of a positioning method is provided for the first embodiment of the present invention. This embodiment is applicable to the case of positioning a target robot. The method can be executed by a positioning device, which can be implemented in the form of hardware and / or software. The positioning device can be configured in an electronic device, which can include but is not limited to a target robot or an intelligent terminal device. Figure 1 As shown, a positioning method provided in this embodiment includes the following steps:

[0042] S110, obtaining an image to be positioned of the target robot, wherein the image to be positioned is a three-dimensional image of two adjacent frames.

[0043] The target robot may refer to a robot device whose positioning posture information is to be determined, and the target robot may be an inspection robot or other types of robot devices, etc., which is not limited in the embodiments of the present invention. The image to be positioned may refer to an image used to determine the positioning posture information of the target robot, and the image to be positioned may be a three-dimensional image of two adjacent frames. The image to be positioned may be derived from image data actually collected by the target robot, or may be derived from a public data set such as the KITTI data set.

[0044] In an embodiment of the present invention, it is first necessary to obtain the image to be located of the target robot, so that the image to be located can be used to perform visual positioning of the target robot later, wherein the image to be located can be a three-dimensional image of two adjacent frames, and the method of obtaining the image to be located of the target robot can include but is not limited to the following: the inertial navigation system, laser radar, high-precision camera and other positioning equipment configured by the target robot itself can be used to collect the environmental data around itself, and the environmental data of two adjacent frames can be used as the image to be located of the target robot; some public data sets can also be used, such as the KITTI data set commonly used in the field of autonomous driving, and the images of two adjacent frames can be extracted from the KITTI data set as the image to be located of the target robot, and the embodiment of the present invention does not limit this. It can be understood that the image to be located of the target robot can be pre-stored in a local or cloud database, and when the target robot needs to be visually positioned, the required image to be located can be obtained from the above database.

[0045] S120, determining fusion features of the image to be positioned according to a visual positioning network model, wherein the visual positioning network model is generated based on training of a three-dimensional image frame set.

[0046] The visual positioning network model may be a pre-trained deep neural network model for extracting fusion features of the image to be positioned. The visual positioning network model may integrate multiple convolutional layers and attention mechanism transformations, etc. The visual positioning network model may be generated based on the training of a three-dimensional image frame set. A three-dimensional image frame set may refer to a data set containing several three-dimensional image frames. A three-dimensional image frame set may be used to train the visual positioning network model. The three-dimensional image frame set may come from image data actually collected by the target robot, or from a public data set such as the KITTI data set. The fusion feature may refer to the feature extracted from the image to be positioned by the visual positioning network model. The fusion feature may retain information such as common features and difference features in two adjacent frames of the image to be positioned.

[0047] In an embodiment of the present invention, a trained visual positioning network model can be pre-configured on an electronic device. After the image to be positioned of the target robot is obtained, the image to be positioned can be input into the trained visual positioning network model for feature extraction, and the extracted features are used as fusion features of the image to be positioned. The fusion features can be obtained by passing the images to be positioned of two adjacent frames through several convolutional layers, pooling layers and fully connected layers in sequence, and using the final output result as the fusion feature of the image to be positioned; the fusion features can also be obtained by first encoding the visual features of the images to be positioned of two adjacent frames, and then performing an attention mechanism transformation on the encoded visual features, and using the processed results as the fusion features of the image to be positioned. The embodiment of the present invention does not limit this.

[0048] S130. Determine the position and posture of the target robot based on a preset long short-term memory network model and fusion features.

[0049] The preset long short-term memory (LSTM) network model may refer to a pre-configured LSTM network, which is a time recurrent neural network specially designed to solve the long-term dependency problem existing in general recurrent neural networks. The posture may refer to the posture information obtained after visual positioning of the target robot, and the posture includes information such as the position and orientation of the target robot.

[0050] In an embodiment of the present invention, a preset long short-term memory network model that has been trained can be pre-configured on an electronic device. After extracting the fusion features of the image to be located, the fusion features can be input into the preset long short-term memory network model, and the output result of the model can be used as the position and posture of the target robot, wherein the position and posture may include information such as the position and orientation of the target robot. By processing the fusion features using the preset long short-term memory network model, the problems of gradient vanishing and gradient explosion that may exist in the fusion features during the training process can be solved, and important information in the fusion features can be retained.

[0051] The technical solution of the embodiment of the present invention obtains the image to be positioned of the target robot, wherein the image to be positioned is a three-dimensional image of two adjacent frames, determines the fusion features of the image to be positioned according to the visual positioning network model, the visual positioning network model is generated based on the training of the three-dimensional image frame set, and determines the position and posture of the target robot based on a preset long short-term memory network model and the fusion features. The embodiment of the present invention solves the problem of low positioning accuracy in complex light changing environments in existing positioning methods by determining the fusion features of the image to be positioned of the target robot according to the visual positioning network model, and then determining the position and posture of the target robot based on the fusion features and the preset long short-term memory network model, thereby improving the visual positioning accuracy of the target robot in complex light changing environments.

[0052] Embodiment 2

[0053] Figure 2 This is a flowchart of a positioning method provided in Embodiment 2 of the present invention, which is further optimized and expanded based on the above implementation, and can be combined with various optional technical solutions in the above implementation. Figure 2 As shown, a positioning method provided in this embodiment 2 specifically includes the following steps:

[0054] S210, obtaining an image to be positioned of the target robot, wherein the image to be positioned is a three-dimensional image of two adjacent frames.

[0055] S220, inputting the image to be positioned into the three-layer convolutional layer of the visual positioning network model for feature extraction, and obtaining the first visual feature and the second visual feature corresponding to the image to be positioned.

[0056] Among them, the first visual feature and the second visual feature may refer to the corresponding visual features extracted from two adjacent frames of the image to be located after being processed by the convolution layer. The first visual feature and the second visual feature may reflect the visual feature information of the image to be located. Exemplarily, the first visual feature may be the visual feature obtained by convolution processing of the image to be located at time t, and the second visual feature may be the visual feature obtained by convolution processing of the image to be located at time t+1.

[0057] In an embodiment of the present invention, after obtaining the image to be located of the target robot, the image to be located can be input into the three-layer convolution layer of the visual positioning network model, and feature extraction, i.e., visual feature encoding, is performed on the image to be located to extract the first visual feature and the second visual feature corresponding to the image to be located, wherein the convolution kernel and the pooling layer and other related parameters involved in the three-layer convolution operation can be set accordingly according to actual needs, and the first visual feature and the second visual feature corresponding to the image to be located can be extracted, and the embodiment of the present invention is not limited to this.

[0058] S230: Stack the first visual feature and the second visual feature to obtain a stacked visual feature.

[0059] Among them, the stacked visual feature may refer to a fused visual feature obtained by stacking the first visual feature and the second visual feature. If the dimensions of the first visual feature and the second visual feature are C×H×W (number of channels×height×width), then the corresponding dimension of the stacked visual feature is 2C×H×W.

[0060] In the embodiment of the present invention, a stacking operation may be performed on the extracted first visual feature and the second visual feature, and the stacked result is used as the stacked visual feature.

[0061] S240, performing an attention mechanism transformation on the first visual feature, the second visual feature, and the stacked visual feature to obtain a fusion feature of the image to be located.

[0062] Among them, the attention mechanism transformation can be understood as a data processing method based on the attention mechanism. The attention mechanism originates from the study of human vision. It uses the limited attention resources of human beings to focus on more important information to improve the efficiency and accuracy of obtaining information. From the perspective of mathematical formulas and code implementation, the attention mechanism can be understood as weighted summation.

[0063] In an embodiment of the present invention, the first visual feature, the second visual feature and the stacked visual feature can be input into the visual localization network model for attention mechanism transformation, and the corresponding output results can be used as the fusion features of the image to be located. For example, three branches can be designed in the attention mechanism transformation, and the three branches respectively use the attention mechanism transformation to process the first visual feature, the second visual feature and the stacked visual feature, and the features processed by the three branches can be fused as the fusion features of the image to be located.

[0064] Further, based on the above-mentioned embodiments of the invention, Figure 3 The flowchart of a method for acquiring fusion features of an image to be located provided in the second embodiment of the present invention is further optimized and expanded based on the above S240, and can be combined with various optional technical solutions in the above embodiments. Figure 3 As shown, the second embodiment provides a method for acquiring fusion features of an image to be located, which specifically includes the following steps:

[0065] S2401. Perform channel C and channel width W swap on the first visual feature, and perform Z-Pool pooling, convolution operation, batch normalization operation and activation function operation processing on the visual feature after channel swap in sequence, and perform channel swap of width W and channel C on the processed visual feature to obtain the first branch feature.

[0066] S2402. Perform channel swapping of channel C and height H on the second visual feature, and sequentially perform Z-Pool pooling, convolution operation, batch normalization operation, and activation function operation processing on the visual feature after the channel swapping, and perform channel swapping of height H and channel C on the processed visual feature to obtain a second branch feature.

[0067] S2403, performing DZ-Pool pooling, convolution operation, batch normalization operation and activation function operation processing on the stacked visual features in sequence, and performing a dot product operation on the processed stacked visual features and the input stacked visual features to obtain the third branch features.

[0068] S2404: stack the first branch feature and the second branch feature, add them to the third branch feature and take an average to obtain a fusion feature of the image to be located.

[0069] Among them, the Z-Pool pooling operation can be understood as an operation of stacking after performing the maximum pooling operation and the average pooling operation on the first visual feature or the second visual feature after channel exchange. The Z-Pool pooling operation can retain the rich representation of the first visual feature or the second visual feature while reducing its depth to make further calculations lighter. The DZ-Pool pooling operation can be understood as an operation of stacking after performing the maximum pooling operation and the average pooling operation on the stacked visual features. The first branch feature, the second branch feature, and the third branch feature may refer to the features obtained after performing the attention mechanism transformation on the first visual feature, the second visual feature, and the stacked visual feature, respectively.

[0070] In an embodiment of the present invention, three branches can be set respectively, and the three branches correspond to the data processing operations of the first visual feature, the second visual feature and the stacked visual feature, that is, the operations of S2401, S2402 and S2403 are respectively performed on the first visual feature, the second visual feature and the stacked visual feature to obtain the first branch feature, the second branch feature and the third branch feature respectively, and then the first branch feature and the second branch feature are stacked and averaged with the third branch feature to obtain the fusion feature of the image to be located. The first visual feature and the second visual feature of the two frames corresponding to the first branch and the second branch are respectively subjected to the channel exchange operation of channel C and width W and channel C and height H, which is equivalent to performing an orthogonal projection respectively, that is, the visual features of the two branches are respectively orthogonally projected in the width direction and in the height direction, and after the projection, they are stacked to magnify the difference between the visual features of the two branches. The third branch corresponds to the processing operation of the stacked visual feature, which can show the effect of the fusion of the two visual features (the first visual feature and the second visual feature), which is convenient for finding the common features in the first visual feature and the second visual feature. Finally, after stacking the first branch features and the second branch features, they are added to the third branch features and averaged. The values ​​generated by the same features in the obtained fused features will be significantly larger than the values ​​generated by different features, which is conducive to calculating the alignment of the overlapping areas in two adjacent frames of images to be located, and provides good features for the subsequent regression of the camera pose.

[0071] S250, inputting the fused features into a preset long short-term memory network model for feature extraction to obtain the position and posture features of the target robot.

[0072] Among them, the preset long short-term memory network model may include an input layer, a hidden layer and an output layer. The input of each memory cell in the preset long short-term memory network model is the input value of the network at the current moment, the output value at the previous moment and the cell state at the previous moment. The output of the memory cell is the output value at the current moment and the cell state at the current moment. The hidden layer may at least include: an input gate, a forget gate and an output gate. The input gate, the forget gate and the output gate all contain activation functions and bitwise multiplication operations. Through the mutual cooperation between the input gate, the forget gate and the output gate, the hidden layer can retain useful information as much as possible and discard useless information. The posture feature may refer to the feature information output by the preset long short-term memory network model and used for visual positioning of the target robot.

[0073] In an embodiment of the present invention, a preset long short-term memory network model can be pre-configured, and then the acquired fusion features are input into the preset long short-term memory network model for feature extraction, and the extracted features are used as the pose features of the target robot. Processing the fusion features using the preset long short-term memory network model can solve the problems of gradient vanishing and gradient explosion that may exist in the fusion features during the training process, and can retain important information in the fusion features.

[0074] S260. Obtain the output result of the posture feature on the fully connected layer side, and use the output result as the posture of the target robot.

[0075] In an embodiment of the present invention, the posture features output by the preset long short-term memory network model can be finally input into the fully connected layer, and after being processed by the fully connected layer, the posture of the target robot after visual positioning can be obtained.

[0076] Further, based on the above-mentioned embodiments of the invention, the loss function of the visual positioning network model in the embodiment of the present invention during the training phase can be defined as follows:

[0077]

[0078] Among them, L se(3) represents the SE(3) full connection pose loss relative to the beginning of the sequence; α and β represent weighting parameters, which can be 1 in practical applications; q and Represent the true value and estimated value of the quaternion rotation matrix respectively, represents the loss of the quaternion rotation matrix; T and Represent the true value and estimated value of the position transformation matrix respectively, Represents the loss of the position transformation matrix.

[0079] Further, based on the above-mentioned embodiments of the invention, the activation function used in the embodiments of the present invention may include at least one of the following: Sigmod activation function, hyperbolic tangent activation function.

[0080] The technical solution of the embodiment of the present invention is to obtain an image to be positioned of a target robot, wherein the image to be positioned is a three-dimensional image of two adjacent frames, input the image to be positioned into a three-layer convolutional layer of a visual positioning network model for feature extraction, obtain a first visual feature and a second visual feature corresponding to the image to be positioned, stack the first visual feature and the second visual feature to obtain a stacked visual feature, perform an attention mechanism transformation on the first visual feature, the second visual feature and the stacked visual feature to obtain a fused feature of the image to be positioned, input the fused feature into a preset long short-term memory network model for feature extraction, obtain the posture feature of the target robot, obtain the output result of the posture feature on the fully connected layer side, and use the output result as the posture of the target robot. The embodiment of the present invention proposes a first visual feature and a second visual feature corresponding to the image to be positioned through three convolutional layers of a visual positioning network model, stacks the first visual feature and the second visual feature to obtain a stacked visual feature, and performs an attention mechanism transformation on the first visual feature, the second visual feature and the stacked visual feature to obtain a fusion feature of the image to be positioned. Finally, the position and posture of the target robot are determined according to the fusion feature and the visual positioning network model, which solves the problem of low positioning accuracy in complex light changing environments in existing positioning methods. The visual positioning network model with an attention mechanism significantly improves the visual positioning accuracy of the target robot in complex light changing environments.

[0081] Embodiment 3

[0082] Figure 4 This is a schematic diagram of the structure of a positioning network model provided by Embodiment 3 of the present invention. Figure 4 As shown, two adjacent frames of images to be positioned can be simultaneously input into the visual positioning network model, and the visual positioning network model uses three convolutional layers to encode the visual features of the two frames of images to be positioned, and outputs the first visual feature and the second visual feature corresponding to the two frames of images to be positioned; the first visual feature and the second visual feature are stacked to obtain a stacked visual feature, and then the feature information of the first visual feature, the second visual feature and the stacked visual feature are fused through the attention mechanism of the visual positioning network model, and the fused feature corresponding to the image to be positioned is output; finally, the fused feature is processed by a preset long short-term memory network model and a fully connected layer in turn, and the position and posture of the target robot after visual positioning is obtained.

[0083] Based on the above positioning network model, Figure 5This is a flowchart of a positioning method provided in Example 3 of the present invention. Based on the above embodiments, this embodiment provides an implementation of a positioning method, which can achieve accurate visual positioning of the target robot. Figure 5 As shown, a positioning method provided by Embodiment 3 of the present invention specifically includes the following steps:

[0084] S310, obtaining an image to be positioned of the target robot, wherein the image to be positioned is a three-dimensional image of two adjacent frames.

[0085] In the embodiment of the present invention, the image to be positioned is derived from the KITTI dataset commonly used in the field of autonomous driving.

[0086] S320, input the image to be located into the three-layer convolutional layer of the visual localization network model for visual feature encoding, and obtain the first visual feature and the second visual feature corresponding to the image to be located.

[0087] In the embodiment of the present invention, the visual feature obtained by processing the image to be located at time t through three-layer convolution can be used as the first visual feature, and the visual feature obtained by processing the image to be located at time t+1 through three-layer convolution can be used as the second visual feature. The layer structure of the three-layer convolution layer can be set as follows:

[0088]

[0089] As shown in the table above, 64 7×7 convolution kernels are used in the first convolution layer Cov1 for processing, and the size of the final Cov1 output result is 112×112; in the second convolution layer Cov2, the result of Cov1 output is first processed by the maximum pooling Maxpool of 3×3, and then 64 1×1 convolution kernels, 64 3×3 convolution kernels and 256 1×1 convolution kernels are used in sequence for processing, wherein the above convolution operation is performed 3 times in total, and the size of the final Cov2 output result is 56×56; in the third convolution layer Cov3, the result of Cov2 output is first processed by the maximum pooling Maxpool of 3×3, and then 128 1×1 convolution kernels, 128 3×3 convolution kernels and 512 1×1 convolution kernels are used in sequence for processing, wherein the above convolution operation is performed 4 times in total, and the size of the final Cov3 output result is 28×28. After two adjacent frames of the images to be located are processed by three layers of convolution respectively, the corresponding first visual features and second visual features can be extracted.

[0090] S330: Stack the first visual feature and the second visual feature to obtain a stacked visual feature.

[0091] S340, fusing the first visual feature, the second visual feature, and the stacked visual feature through the attention mechanism transformation of the visual localization network model, and outputting a fused feature corresponding to the image to be located.

[0092] Figure 6 This is a schematic diagram of the structure of an attention mechanism transformation provided by Embodiment 3 of the present invention. Figure 6 As shown in Figure 1, the three branches correspond to the attention mechanism transformation operations of the first visual feature, the second visual feature, and the stacked visual feature. Specifically, the first branch corresponds to the first visual feature F at time t. t , assuming its dimension is C×H×W, firstly, the first visual feature F t Perform channel C and channel exchange T of width W 1,2,0 , the dimension becomes W×H×C, and then the Z-Pool operation is performed on the result after channel exchange. Among them, taking any feature A as an example, the Z-Pool operation can be expressed by the following formula:

[0093] Z-pool(A)=[Maxpool(A),Avgpool(A)]

[0094] This formula indicates that the maximum pooling operation and the average pooling operation are performed on feature A respectively, and then stacked. The Z-Pool pooling operation can retain the rich representation of feature A while reducing its depth to make further calculations lighter. Next, the result after the Z-Pool pooling operation is processed by 7×7 convolution operation, batch normalization operation and Sigmod activation operation in sequence, and finally the processed result is subjected to channel swap T of width W and channel C. 0,1,2 , transform the dimension of the feature into C×H×W, and then obtain the first branch feature corresponding to the first visual feature. The feature processing operation M corresponding to the first branch 1 (F t ) can be expressed by the formula as follows:

[0095] M 1 (F t )=T 0,1,2 (σ(Cov 7×7 (Z-pool(T 1,2,0 (F t )))))

[0096] Among them, σ represents the Sigmod activation function.

[0097] The second branch corresponds to the second visual feature F at time t+1 t+1 , assuming its dimension is C×H×W, firstly, the second visual feature F t+1 Perform channel exchange T of channel C and height H 1,0,2, the dimension becomes H×W×C, and then the Z-Pool pooling operation is performed on the result after the channel swap. Next, the 7×7 convolution operation, batch normalization operation, and Sigmod activation operation are performed on the result after the Z-Pool pooling operation, and finally the channel swap T of height H and channel C is performed on the processed result. 0,1,2 , transform the dimension of the feature into C×H×W, and then obtain the second branch feature corresponding to the second visual feature. The feature processing operation M corresponding to the second branch 2 (F t+1 ) can be expressed by the formula as follows:

[0098] M 2 (F t+1 )=T 0,1,2 (σ(Cov 7×7 (Z-pool(T 1,0,2 (F t+1 )))))

[0099] The third branch corresponds to the stacked visual features (F t ,F t+1 ), assuming its dimension is 2C×H×W, first stack the visual features (F t ,F t+1 ) performs a DZ-Pool pooling operation, where the DZ-Pool pooling operation can be expressed by the following formula:

[0100] DZ-pool(F t ,F t+1 )=[Maxpool(F t ,F t+1 ),Avgpool(F t ,F t+1 )]

[0101] This formula represents the stacked visual features (F t ,F t+1 ) performs the maximum pooling operation and the average pooling operation respectively, and then performs the stacking operation. Next, the result after the DZ-Pool pooling operation is processed in sequence by 7×7 convolution operation, batch normalization operation and Sigmod activation operation, and finally the processed result is compared with the input stacked visual feature (F t ,F t+1 ) performs a dot product operation, thereby obtaining the third branch feature corresponding to the stacked visual feature. The feature processing operation M corresponding to the third branch 3 (F t ,F t+1 ) can be expressed by the formula as follows:

[0102] M 3 (F t , Ft+1 )=σ(Cov 7×7 (DZ-pool(F t , F t+1 ))))·(F t , F t+1 )

[0103] Finally, the first branch feature and the second branch feature are stacked and added to the third branch feature and then averaged to obtain the fusion feature of the image to be located.

[0104] In an embodiment of the present invention, the first visual features and the second visual features of the two frames corresponding to the first branch and the second branch are subjected to channel exchange operations of channel C and width W and channel C and height H, respectively, which is equivalent to performing an orthogonal projection respectively, that is, the visual features of the two branches are respectively orthogonally projected in the width direction and in the height direction, and are stacked after projection to amplify the difference between the visual features of the two branches. The third branch corresponds to the processing operation of stacking visual features, which can show the effect of the fusion of two visual features (the first visual feature and the second visual feature), and is convenient for finding common features in the first visual feature and the second visual feature. Finally, after the stacking operation is performed on the first branch feature and the second branch feature, they are added and averaged with the third branch feature. The value generated by the same feature in the obtained fused feature will be significantly greater than the value generated by different features, which is conducive to calculating the registration of the overlapping area in the two adjacent frames of the image to be located, and provides good features for the subsequent regression of the camera pose.

[0105] S350, input the fused features into a preset long short-term memory network model for feature extraction, and pass the extracted features through a fully connected layer to obtain the position and posture of the target robot.

[0106] In an embodiment of the present invention, the loss function of the visual positioning network model in the training phase can be defined as follows:

[0107]

[0108] Among them, L se(3) represents the SE(3) full connection pose loss relative to the beginning of the sequence; α and β represent weighting parameters, which can be 1 in practical applications; q and Represent the true value and estimated value of the quaternion rotation matrix respectively, represents the loss of the quaternion rotation matrix; T and Represent the true value and estimated value of the position transformation matrix respectively, Represents the loss of the position transformation matrix.

[0109] The following three different test scenarios are used based on the KITTI dataset to compare and verify the positioning accuracy of the technical solution of the embodiment of the present invention. Among them, the test scenario 1 corresponds to the scenario of forming multiple closed loops. Figure 7 is the test scene image corresponding to test scene one, Figure 8 and Fig. 9 The two-dimensional path diagram and speed heatmap obtained in the test scenario 1; the test scenario 2 corresponds to the scenario of forming a closed loop. Fig.10 is the test scene image corresponding to test scene 2, Fig.11 and Fig.12 The two-dimensional path map and speed heat map obtained under test scenario 2; test scenario 3 corresponds to a scenario without a closed loop. Fig.13 is the test scene image corresponding to test scene three, Fig.14 and Fig.15 It is a two-dimensional path map and speed heat map obtained by testing in test scene 3. It can be seen from the three sets of different test scene images that the target robot in the embodiment of the present invention is tested in a complex light change environment (such as various shadows). Fig. 9 , Fig.12 and Fig.15 It can be seen that the target robot runs at different speeds. Figure 8 , Fig.11 and Fig.14 It is not difficult to see from the three two-dimensional path diagrams that the positioning method proposed in the embodiment of the present invention is very consistent with the actual target trajectory, indicating that the positioning method proposed in the embodiment of the present invention has high positioning accuracy and can successfully complete the corresponding inspection tasks.

[0110] The technical solution of the embodiment of the present invention is to obtain an image to be positioned of a target robot, wherein the image to be positioned is a three-dimensional image of two adjacent frames, input the image to be positioned into a three-layer convolutional layer of a visual positioning network model for visual feature encoding, obtain a first visual feature and a second visual feature corresponding to the image to be positioned, stack the first visual feature and the second visual feature to obtain a stacked visual feature, transform and fuse the first visual feature, the second visual feature and the stacked visual feature through the attention mechanism of the visual positioning network model, output the fused feature corresponding to the image to be positioned, input the fused feature into a preset long short-term memory network model for feature extraction, and pass the extracted feature through a fully connected layer to obtain the position and posture of the target robot. The embodiment of the present invention extracts the corresponding first visual feature and the second visual feature of two adjacent frames of the image to be positioned through three-layer convolution processing, stacks the first visual feature and the second visual feature to obtain the stacked visual feature, and uses the attention mechanism of the visual positioning network model to transform and fuse the first visual feature, the second visual feature and the stacked visual feature, and then outputs the fused feature corresponding to the image to be positioned, and finally determines the position and posture of the target robot based on the fused feature and a preset long short-term memory network model, which solves the problem of low positioning accuracy in complex light changing environments in existing positioning methods, and adopts a visual positioning network model with an attention mechanism to significantly improve the visual positioning accuracy of the target robot in complex light changing environments, so that the target robot can successfully complete the corresponding inspection tasks.

[0111] Embodiment 4

[0112] Fig.16 This is a schematic diagram of the structure of a positioning device provided in Embodiment 4 of the present invention. Fig.16 As shown, the device comprises:

[0113] The image acquisition module 41 is used to acquire the image to be positioned of the target robot, wherein the image to be positioned is a three-dimensional image of two adjacent frames.

[0114] The feature determination module 42 is used to determine the fusion features of the image to be located according to the visual positioning network model, and the visual positioning network model is generated based on the training of the three-dimensional image frame set.

[0115] The posture determination module 43 is used to determine the posture of the target robot based on a preset long short-term memory network model and fusion features.

[0116] The technical solution of the embodiment of the present invention is to obtain the image to be positioned of the target robot through the image acquisition module, wherein the image to be positioned is a three-dimensional image of two adjacent frames, the feature determination module determines the fusion features of the image to be positioned according to the visual positioning network model, the visual positioning network model is generated based on the training of the three-dimensional image frame set, and the posture determination module determines the posture of the target robot based on the preset long short-term memory network model and the fusion features. The embodiment of the present invention solves the problem of low positioning accuracy in complex light changing environments in the existing positioning methods by determining the fusion features of the image to be positioned of the target robot according to the visual positioning network model, and then determining the posture of the target robot based on the fusion features and the preset long short-term memory network model. This improves the visual positioning accuracy of the target robot in complex light changing environments.

[0117] Further, based on the above-mentioned embodiment of the invention, the feature determination module 42 includes:

[0118] The visual feature extraction unit is used to input the image to be located into the three-layer convolution layer of the visual positioning network model for feature extraction, so as to obtain the first visual feature and the second visual feature corresponding to the image to be located.

[0119] The stacked visual feature acquisition unit is used to stack the first visual feature and the second visual feature to obtain a stacked visual feature.

[0120] The fusion feature acquisition unit is used to perform an attention mechanism transformation on the first visual feature, the second visual feature and the stacked visual feature to obtain a fusion feature of the image to be located.

[0121] Further, based on the above-mentioned embodiment of the invention, the fusion feature acquisition unit is specifically used for:

[0122] The first visual feature is subjected to a channel swap of channel C and width W, and the visual feature after the channel swap is subjected to Z-Pool pooling, convolution operation, batch normalization operation, and activation function operation processing in sequence, and the processed visual feature is subjected to a channel swap of width W and channel C to obtain a first branch feature;

[0123] The second visual feature is subjected to a channel swap of channel C and height H, and the visual feature after the channel swap is subjected to Z-Pool pooling, convolution operation, batch normalization operation, and activation function operation processing in sequence, and the processed visual feature is subjected to a channel swap of height H and channel C to obtain a second branch feature;

[0124] Performing DZ-Pool pooling, convolution operation, batch normalization operation and activation function operation processing on the stacked visual features in sequence, and performing a dot product operation on the processed stacked visual features and the input stacked visual features to obtain the third branch features;

[0125] The first branch feature and the second branch feature are stacked and added to the third branch feature to obtain the fusion feature of the image to be located.

[0126] Further, based on the above-mentioned embodiment of the invention, the posture determination module 43 includes:

[0127] The posture feature extraction unit is used to input the fusion features into a preset long short-term memory network model for feature extraction to obtain the posture features of the target robot.

[0128] The posture determination unit is used to obtain the output result of the posture feature on the fully connected layer side and use the output result as the posture of the target robot.

[0129] Further, on the basis of the above-mentioned embodiments of the invention, the preset long short-term memory network model includes an input layer, a hidden layer and an output layer, and the input of each memory cell in the preset long short-term memory network model is the input value of the network at the current moment, the output value at the previous moment and the cell state at the previous moment, and the output of the memory cell is the output value at the current moment and the cell state at the current moment; wherein the hidden layer includes at least: an input gate, a forget gate and an output gate, and the input gate, the forget gate and the output gate all contain an activation function and a bitwise multiplication operation.

[0130] Further, based on the above-mentioned embodiment of the invention, the loss function of the visual positioning network model in the training stage is defined as follows:

[0131]

[0132] Among them, L se(3) represents the SE(3) full connection pose loss relative to the beginning of the sequence; α and β represent weighting parameters; q and Represent the true value and estimated value of the quaternion rotation matrix respectively, represents the loss of the quaternion rotation matrix; T and Represent the true value and estimated value of the position transformation matrix respectively, Represents the loss of the position transformation matrix.

[0133] Further, based on the above-mentioned embodiments of the invention, the activation function includes at least one of the following: Sigmod activation function and hyperbolic tangent activation function.

[0134] The positioning device provided in the embodiment of the present invention can execute the positioning method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0135] Embodiment 5

[0136] Fig.17A schematic diagram of an electronic device 50 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0137] like Fig.17 As shown, the electronic device 50 includes at least one processor 51, and a memory connected to the at least one processor 51 in communication, such as a read-only memory (ROM) 52, a random access memory (RAM) 53, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 51 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 52 or the computer program loaded from the storage unit 58 to the random access memory (RAM) 53. In the RAM 53, various programs and data required for the operation of the electronic device 50 can also be stored. The processor 51, the ROM 52, and the RAM 53 are connected to each other via a bus 54. An input / output (I / O) interface 55 is also connected to the bus 54.

[0138] A number of components in the electronic device 50 are connected to the I / O interface 55, including: an input unit 56, such as a keyboard, a mouse, etc.; an output unit 57, such as various types of displays, speakers, etc.; a storage unit 58, such as a disk, an optical disk, etc.; and a communication unit 59, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 59 allows the electronic device 50 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0139] The processor 51 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 51 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 51 executes the various methods and processes described above, such as a positioning method.

[0140] In some embodiments, the positioning method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 58. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 50 via the ROM 52 and / or the communication unit 59. When the computer program is loaded into the RAM 53 and executed by the processor 51, one or more steps of the positioning method described above may be performed. Alternatively, in other embodiments, the processor 51 may be configured to perform the positioning method in any other appropriate manner (e.g., by means of firmware).

[0141] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0142] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0143] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0144] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0145] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0146] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0147] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0148] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A positioning method, characterized in that: The method comprises: Acquire an image to be positioned of the target robot, wherein the image to be positioned is a three-dimensional image of two adjacent frames; Determining the fusion features of the image to be positioned according to a visual positioning network model, wherein the visual positioning network model is generated based on training of a three-dimensional image frame set; Determining the position and posture of the target robot based on a preset long short-term memory network model and the fusion feature; The step of determining the fusion features of the image to be positioned according to the visual positioning network model includes: Input the image to be positioned into the three-layer convolution layer of the visual positioning network model for feature extraction, and obtain the first visual feature and the second visual feature corresponding to the image to be positioned; wherein the first visual feature and the second visual feature refer to the corresponding visual features extracted from two adjacent frames of the image to be positioned after being processed by the convolution layer; stacking the first visual feature and the second visual feature to obtain a stacked visual feature; Performing an attention mechanism transformation on the first visual feature, the second visual feature, and the stacked visual feature to obtain a fusion feature of the image to be located; The performing an attention mechanism transformation on the first visual feature, the second visual feature, and the stacked visual feature to obtain a fusion feature of the image to be located includes: Perform channel swapping of channel C and channel width W on the first visual feature, and sequentially perform Z-Pool pooling, convolution operation, batch normalization operation and activation function operation processing on the visual feature after the channel swapping, and perform channel swapping of width W and channel C on the processed visual feature to obtain a first branch feature; Perform channel swapping of channel C and height H on the second visual feature, and sequentially perform Z-Pool pooling, convolution operation, batch normalization operation and activation function operation processing on the visual feature after the channel swap, and perform channel swapping of height H and channel C on the processed visual feature to obtain a second branch feature; Performing DZ-Pool pooling, convolution operation, batch normalization operation and activation function operation processing on the stacked visual features in sequence, and performing a dot product operation on the processed stacked visual features and the input stacked visual features to obtain a third branch feature; The first branch feature and the second branch feature are stacked and then added to the third branch feature to obtain an average, so as to obtain a fusion feature of the image to be located.

2. The method according to claim 1, characterized in that The determining the position and posture of the target robot based on the preset long short-term memory network model and the fusion feature includes: Inputting the fused features into the preset long short-term memory network model for feature extraction to obtain the position and posture features of the target robot; The output result of the posture feature is obtained on the fully connected layer side, and the output result is used as the posture of the target robot.

3. The method according to claim 2, characterized in that The preset long short-term memory network model includes an input layer, a hidden layer and an output layer. The input of each memory cell in the preset long short-term memory network model is the input value of the network at the current moment, the output value at the previous moment and the cell state at the previous moment, and the output of the memory cell is the output value at the current moment and the cell state at the current moment; The hidden layer at least includes: an input gate, a forget gate and an output gate, and the input gate, the forget gate and the output gate all contain an activation function and a bitwise multiplication operation.

4. The method according to claim 1, characterized in that: The loss function of the visual positioning network model in the training phase is defined as follows: Among them, L se(3) represents the SE(3) full connection pose loss relative to the beginning of the sequence; α and β represent weighting parameters; q and Represent the true value and estimated value of the quaternion rotation matrix respectively, represents the loss of the quaternion rotation matrix; T and Represent the true value and estimated value of the position transformation matrix respectively, represents the loss of the position transformation matrix.

5. The method according to claim 1 or 3, characterized in that: The activation function includes at least one of the following: Sigmod activation function and hyperbolic tangent activation function.

6. A positioning device, characterized in that: The device comprises: An image acquisition module is used to acquire an image to be positioned of the target robot, wherein the image to be positioned is a three-dimensional image of two adjacent frames; A feature determination module, used to determine the fusion features of the image to be located according to a visual positioning network model, wherein the visual positioning network model is generated based on a three-dimensional image frame set training; A posture determination module, used to determine the posture of the target robot based on a preset long short-term memory network model and the fusion feature; A visual feature extraction unit, used for inputting the image to be positioned into the three-layer convolution layer of the visual positioning network model for feature extraction, and obtaining a first visual feature and a second visual feature corresponding to the image to be positioned; wherein the first visual feature and the second visual feature refer to corresponding visual features extracted from two adjacent frames of the image to be positioned after being processed by the convolution layer; a stacked visual feature acquisition unit, configured to stack the first visual feature and the second visual feature to obtain a stacked visual feature; a fusion feature acquisition unit, configured to perform an attention mechanism transformation on the first visual feature, the second visual feature, and the stacked visual feature to obtain a fusion feature of the image to be located; The fusion feature acquisition unit is specifically used for: Perform channel swapping of channel C and channel width W on the first visual feature, and sequentially perform Z-Pool pooling, convolution operation, batch normalization operation and activation function operation processing on the visual feature after the channel swapping, and perform channel swapping of width W and channel C on the processed visual feature to obtain a first branch feature; Perform channel swapping of channel C and height H on the second visual feature, and sequentially perform Z-Pool pooling, convolution operation, batch normalization operation and activation function operation processing on the visual feature after the channel swap, and perform channel swapping of height H and channel C on the processed visual feature to obtain a second branch feature; Performing DZ-Pool pooling, convolution operation, batch normalization operation and activation function operation processing on the stacked visual features in sequence, and performing a dot product operation on the processed stacked visual features and the input stacked visual features to obtain a third branch feature; The first branch feature and the second branch feature are stacked and then added to the third branch feature to obtain an average, so as to obtain a fusion feature of the image to be located.

7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the positioning method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the positioning method according to any one of claims 1 to 5 when executed.

Citation Information

Patent Citations

  • Camera pose estimation method and device based on depth visual odometer and IMU

    CN112648994A

  • Pose estimation method and system suitable for vision and inertia fusion of robot

    CN112729294A

  • Pose estimation method and system based on LSTM double-flow convolutional neural network, and medium

    CN113838135A

  • Visual inertial odometer model training method, pose estimation method and device

    CN114612556A

  • Infrared target detection method based on feature fusion and attention mechanism

    CN114694002A