Robot position recognition method, device, electronic device and storage medium
By using a global feature aggregator with clustering guidance attention module in robot position recognition, the problem that local feature extraction is susceptible to environmental changes is solved, and the performance and environmental adaptability of robot position recognition are improved.
Patent Information
- Application Number
- CN202410435783.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-11
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-04-11
AI Technical Summary
In the prior art, local feature extraction is susceptible to large environmental changes, resulting in a decrease in robot position recognition performance.
The global feature aggregator with cluster guidance attention module is adopted to extract local features through the local feature extractor, and the local features in the feature map is aggregated by the cluster guidance attention module to generate global feature vectors to improve robot position recognition performance.
Through clustering, the global feature extraction model pays more attention to the stable areas related to the scene, weakens the interference of abnormal local features, improves the adaptability of image global features to changes in environmental conditions, and effectively improves the performance of robot position recognition .
Smart Images

Figure CN118505790B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a robot position recognition method, device, electronic equipment and storage medium. Background Art
[0002] The robot position recognition method is the current mainstream robot repositioning method. Taking the visual sensor as an example, the service robot is repositioned based on the pre-constructed environmental map and the image captured by the camera carried by the robot at the current moment, thereby solving the problem of positioning failure that occurs during the robot's movement.
[0003] Specifically, current robot position recognition methods generally describe images through a global feature vector, thereby comparing the image currently captured by the robot (query image) with the key frame image (reference image) stored in the environment map, finding one or more reference images that are most similar to the captured image, and then using the position associated with the reference image to identify the position of the query image.
[0004] That is to say, in the process of robot position recognition, the global feature representation of the image plays a key role. However, in the process of extracting local features of the query image and the reference image and aggregating the local features to construct the global feature vector, the extraction of local features is easily affected by large environmental changes, resulting in abnormal local feature representation of certain pixel positions, which in turn affects the reliability of the global feature representation of the image and reduces the robot position recognition performance. Summary of the invention
[0005] The present invention provides a robot position recognition method, device, electronic device and storage medium, which are used to solve the defect in the prior art that local feature extraction is easily affected by large environmental changes, resulting in reduced robot position recognition performance.
[0006] In a first aspect, the present invention provides a robot position recognition method, comprising: inputting a captured image into a global feature extraction model to obtain a query global feature vector output by the global feature extraction model; the captured image is obtained by capturing the robot's surrounding environment;
[0007] Respectively calculating the similarity between the query global feature vector and a plurality of reference global feature vectors; the reference global feature vectors are obtained by inputting a reference image in a map of the robot's environment into the global feature extraction model;
[0008] Determining a position recognition result of the robot according to a reference image corresponding to a reference global feature vector with the greatest similarity;
[0009] The global feature extraction model includes a local feature extractor and a global feature aggregator with a clustering guided attention module.
[0010] According to a robot position recognition method provided by the present invention, the local feature extractor is composed of a basic network unit and a first conditional normalization layer;
[0011] The basic network unit includes a first convolution block, a second convolution block, a third convolution block, a fourth convolution block and a fifth convolution block connected in sequence;
[0012] The first convolution block includes a first convolution layer, a second convolution layer and a first maximum pooling layer connected in sequence;
[0013] The second convolution block includes a third convolution layer, a fourth convolution layer, and a second maximum pooling layer connected in sequence;
[0014] The third convolution block includes a fifth convolution layer, a sixth convolution layer, a seventh convolution layer and a third maximum pooling layer connected in sequence;
[0015] The fourth convolution block includes an eighth convolution layer, a ninth convolution layer, a tenth convolution layer and a fourth maximum pooling layer connected in sequence;
[0016] The fifth convolutional block includes an eleventh convolutional layer, a twelfth convolutional layer and a thirteenth convolutional layer which are connected in sequence.
[0017] According to a robot position recognition method provided by the present invention, the convolution kernel sizes of all convolution layers in the first convolution block, the second convolution block, the third convolution block, the fourth convolution block and the fifth convolution block are 3×3, the step sizes are (1, 1), and the padding sizes are (1, 1); the kernel sizes of all maximum pooling layers are 2×2, the step sizes are (2, 2), and the padding sizes are (0, 0).
[0018] According to a robot position recognition method provided by the present invention, the first conditional normalization layer includes a first 2D instance normalization operation module, a linear operation module and a first channel normalization operation module connected in sequence, wherein:
[0019] The normalized dimension of the first 2D instance normalization operation module is 512, the weight and bias of the linear operation module are determined based on the training of the global feature extraction model, and the norm of the first channel normalization operation module is the Euclidean norm.
[0020] According to a robot position recognition method provided by the present invention, the global feature aggregator includes the clustering guided attention module, the fourteenth convolutional layer, the element-by-element multiplication operator, the softmax nonlinear activation layer, the dimensionality transformation operator, the VLAD aggregation module and the feature normalization module;
[0021] The clustering guided attention module includes an image feature enhancement branch, a clustering feature enhancement branch, a vector inner product operation module, a channel maximization operation module and a sigmoid nonlinear activation operation module;
[0022] The image feature enhancement branch includes a dimensionality reduction convolution layer, a feature splitting operation layer, a grouped hole convolution operation module, a conditional normalization module, a ReLU nonlinear activation function module, a channel splicing operation module and a channel fusion operation module connected in sequence;
[0023] The clustering feature enhancement branch includes a fully connected layer;
[0024] The dimension reduction convolution layer includes a fifteenth convolution layer and a ReLU nonlinear activation function layer connected in sequence;
[0025] The grouped atrous convolution operation module includes a first grouped atrous convolution layer, a second grouped atrous convolution layer, and a third grouped atrous convolution layer in parallel;
[0026] The conditional normalization module includes a second conditional normalization layer, a third conditional normalization layer, and a fourth conditional normalization layer in parallel;
[0027] The channel fusion operation module includes a sixteenth convolutional layer and a ReLU nonlinear activation function layer connected in sequence;
[0028] The second conditional normalization layer includes a second 2D instance normalization operation module and a second channel normalization operation module connected in sequence;
[0029] The third conditional normalization layer includes a third 2D instance normalization operation module and a third channel normalization operation module connected in sequence;
[0030] The fourth conditional normalization layer includes a fourth 2D instance normalization operation module and a fourth channel normalization operation module connected in sequence.
[0031] According to a robot position recognition method provided by the present invention, the convolution kernel size of the fourteenth convolution layer is 1×1, the step size is (1, 1), the padding size is (0, 0), and the number of output channels is 64;
[0032] The number of input channels of the fully connected layer is 512, and the number of output channels is 60;
[0033] The convolution kernel size of the fifteenth convolutional layer is 1×1, the step size is (1, 1), the padding size is (0, 0), and the number of output channels is 120;
[0034] The convolution kernel size of the first group hole convolution layer is 1×1, the step size is (1, 1), the padding size is (0, 0), the hole rate is 1, and the number of groups is 20;
[0035] The convolution kernel size of the second group hole convolution layer is 3×3, the step size is (1, 1), the padding size is (1, 1), the hole rate is 1, and the number of groups is 20;
[0036] The convolution kernel size of the third group hole convolution layer is 3×3, the step size is (1, 1), the padding size is (6, 6), the hole rate is 6, and the number of groups is 20;
[0037] The normalization dimensions of the second 2D instance normalization operation module, the third 2D instance normalization operation module, and the fourth 2D instance normalization operation module are all 20;
[0038] The norms of the second channel normalization operation module, the third channel normalization operation module and the fourth channel normalization operation module are all Euclidean norms;
[0039] The convolution kernel size of the sixteenth convolutional layer is 1×1, the step size is (1, 1), the padding size is (0, 0), and the number of output channels is 60.
[0040] A robot position recognition method provided by the present invention further includes a PCA dimension reduction module, which performs dimension reduction processing on the query global feature vector output by the global feature extraction model, and outputs the query global feature vector after dimension reduction.
[0041] According to a robot position recognition method provided by the present invention, determining the robot position recognition result according to the reference image corresponding to the reference global feature vector with the greatest similarity includes:
[0042] The position recognition result of the robot is determined according to a reference image corresponding to a reference global feature vector having the smallest Euclidean distance to the query global feature vector.
[0043] According to a robot position recognition method provided by the present invention, the global feature extraction model is obtained by training based on a query image and its corresponding positive training sample set and negative training sample set using a stochastic gradient descent optimizer;
[0044] The positive training sample set includes a positive sample reference image corresponding to the query image; and the negative training sample set includes a negative sample reference image corresponding to the query image.
[0045] According to a robot position recognition method provided by the present invention, the GPS distance between the query image and its corresponding positive sample reference image is less than or equal to a first preset threshold;
[0046] The GPS distance between the query image and its corresponding negative sample reference image is greater than a second preset threshold.
[0047] In a second aspect, the present invention further provides a robot position recognition device, comprising:
[0048] A query global feature vector acquisition unit is used to input the captured image into the global feature extraction model to obtain the query global feature vector output by the global feature extraction model; the captured image is obtained by capturing the robot's surrounding environment;
[0049] A similarity calculation unit, used to respectively calculate the similarity between the query global feature vector and a plurality of reference global feature vectors; the reference global feature vectors are obtained by inputting a reference image in a map of the robot's environment into the global feature extraction model;
[0050] A position determination unit, used to determine a position recognition result of the robot according to a reference image corresponding to a reference global feature vector having the greatest similarity;
[0051] The global feature extraction model includes a local feature extractor and a global feature aggregator with a clustering guided attention module.
[0052] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-described robot position identification methods are implemented.
[0053] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described robot position identification methods.
[0054] The robot position recognition method, device, electronic device and storage medium provided by the present invention extract local features through a local feature extractor to obtain a feature map, and aggregate local features in the feature map through a global feature aggregator with a clustering-guided attention module to obtain global features, and perform robot position recognition based on the clustering-guided global features. This can enable the global feature extraction model to pay more attention to stable areas related to the scene, reduce the interference of abnormal local features, improve the adaptability of the global features of the image to changes in environmental conditions, and effectively improve the performance of robot position recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0056] Figure 1 It is a flow chart of the robot position recognition method provided by the present invention;
[0057] Figure 2 It is a schematic diagram of the process of extracting local features provided by the present invention;
[0058] Figure 3 It is a schematic diagram of the process of aggregating global features provided by the present invention;
[0059] Figure 4 It is a structural schematic diagram of a robot position recognition device provided by the present invention;
[0060] Figure 5 is a schematic diagram of the structure of an electronic device provided by the present invention; DETAILED DESCRIPTION
[0061] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are 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 are within the scope of protection of the present invention.
[0062] It should be noted that, in the description of the present invention, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0063] The terms "first", "second", etc. in the present invention are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present invention can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more.
[0064] In recent years, with the rapid development of artificial intelligence, sensor technology, and computing technology, service robots have gradually entered people's daily lives. When performing tasks, the good positioning ability of service robots is the prerequisite for their autonomous movement. In addition, due to the wide application range, rich information, and low cost of visual sensors, visual positioning has received widespread attention in the field of robotics.
[0065] During the robot's movement, sometimes positioning failure occurs. As the current mainstream visual relocalization method, the robot visual position recognition method can relocate the service robot based on the pre-built environment map and the image captured by the camera at the current moment.
[0066] Specifically, the robot position recognition method generally describes the image through a global feature vector, thereby comparing the image currently captured by the robot (query image) with the key frame image (reference image) stored in the environment map, evaluating the feature similarity between the query image and each reference image, finding one or more reference images that are most similar to the captured image, and then using the position associated with the reference image to identify the position of the query image.
[0067] In the process of robot position recognition, since only the position information of the reference image is provided, robot position recognition is also regarded as an image retrieval task with weakly supervised position information. In this case, each image is described by a global feature vector, and the global feature representation of the image plays a key role.
[0068] A reliable global feature vector should meet the following conditions: images taken at different locations have unique global features, and images taken at the same location have similar corresponding features despite different environmental conditions (such as weather, season, lighting, viewing angle, etc.).
[0069] Early solutions first extracted manually designed local features from the input image and then combined them using aggregation strategies to construct global features for the entire image. Although these local features were extracted efficiently, they had poor environmental adaptability. Due to their powerful feature learning capabilities, convolutional neural networks are widely used to extract dense local features that are robust to environmental changes, which are further aggregated to form compact global features and the network is trained within a deep metric learning framework. Nevertheless, when environmental conditions change significantly, it can lead to abnormal local feature representations at certain pixel locations. Furthermore, these abnormal local features may be mistakenly associated with the clustering centers of the scene, affecting the reliability of the global representation of the image and resulting in reduced accuracy in robot position recognition.
[0070] The scene cluster centers contain local structural statistical information from a large number of training images, which provide greater stability. In view of this, the present invention provides a robot position recognition method that utilizes the above local structural statistical information to reduce the impact of abnormal local features on the global feature extraction network and improve environmental adaptability.
[0071] Combine the following Figure 1-Figure 5 The present invention describes a robot position recognition method, device, electronic device and storage medium.
[0072] It should be noted that the executor of the robot position recognition method provided by the present invention is the corresponding robot position recognition device, and the specific forms include but are not limited to servers, computer equipment, etc., such as mobile phones, tablet computers, laptop computers, PDAs, vehicle-mounted electronic devices, wearable devices, ultra-mobile personal computers (ultra-mobile personal computers, UMPC), netbooks or personal digital assistants (personal digital assistant, PDA) and other devices.
[0073] Figure 1 is a flow chart of the robot position recognition method provided by the present invention, such as Figure 1 As shown, including but not limited to the following steps:
[0074] Step 101: inputting the captured image into a global feature extraction model to obtain a query global feature vector output by the global feature extraction model.
[0075] Among them, the captured image is also called the query image, which is obtained by using a visual sensor to capture the robot's surrounding environment; the query global feature vector is a vector representing the captured image obtained after the captured image is input into the global feature extraction model, and then local feature extraction and global feature aggregation are performed.
[0076] The global feature extraction model includes but is not limited to a local feature extractor and a global feature aggregator with a clustering-guided attention module. The local feature extractor is used to extract local features from the input captured image to obtain a feature map; the global feature aggregator with a clustering-guided attention module aggregates the local features extracted by the local feature extractor into global features based on the cluster center of the local features of the scene, thereby obtaining a query global feature vector.
[0077] Specifically, the captured image obtained by using a visual sensor to capture the robot's surrounding environment is input into the global feature extraction model, and the local feature extractor in the global feature extraction model extracts several local features of the captured image. Then, the global feature aggregator with a clustering guided attention module in the global feature extraction model aggregates the local features into global features to obtain a query global feature vector corresponding to the captured image.
[0078] It should be noted that the visual sensor used to acquire the captured image includes but is not limited to any one of the visual sensors such as ordinary cameras, industrial cameras, infrared cameras, panoramic cameras, area array cameras or line scan cameras.
[0079] Optionally, a vision sensor is mounted on the robot.
[0080] Optionally, the visual sensor is Kinect v2.
[0081] Optionally, the captured image is an RGB image, that is, an image that uses different combinations of three color channels, red, green, and blue, to represent color.
[0082] Step 102: Calculate the similarity between the query global feature vector and a plurality of reference global feature vectors respectively. The reference global feature vectors are obtained by inputting a reference image in the robot's environment map into the global feature extraction model.
[0083] The environment map stores several key frame images that identify the robot's environment, also known as reference images, which can be obtained by pre-collecting data and manually annotating. Correspondingly, after each frame of the reference image is input into the global feature extraction model, a corresponding reference global feature vector will be obtained.
[0084] Specifically, after the acquired captured image is input into the global feature extraction model to obtain the query global feature vector, and multiple reference images in the robot's environment are input into the global feature extraction model to obtain the corresponding reference global feature vector, the similarity between the captured image and the reference global feature vectors corresponding to the multiple reference images in the environment map is calculated respectively.
[0085] For similarity calculation between the query global feature vector and any reference global feature vector, any of the methods such as calculating cosine similarity, Euclidean distance, Manhattan distance, Minkowski distance or Pearson correlation coefficient between the two vectors can be used.
[0086] In one embodiment, the global feature extraction model also includes a principal component analysis (PCA) dimensionality reduction module, which can convert high-dimensional data into low-dimensional data through linear transformation while retaining information on the maximum variance. Specifically, the present invention performs dimensionality reduction processing on the query global feature vector output by the global feature extraction model to output the query global feature vector after dimensionality reduction.
[0087] Specifically, after the acquired captured image is input into the global feature extraction model to obtain the query global feature vector, the PCA dimension reduction module is used to perform dimension reduction processing on the query global feature vector to obtain the query global feature vector after dimension reduction.
[0088] Correspondingly, before calculating the similarity between the query global feature vector and each reference global feature vector, the PCA dimension reduction module is used to reduce the dimension of the reference global feature vector. After obtaining the reduced-dimensional reference global feature vector, the similarity between the reduced-dimensional query global feature vector and the reduced-dimensional reference global feature vector is calculated.
[0089] Step 103: Determine the position recognition result of the robot according to the reference image corresponding to the reference global feature vector with the greatest similarity.
[0090] Specifically, after calculating the similarity between the query global feature vector and each reference global feature vector, a reference global feature vector with the greatest similarity is retrieved, and a reference image corresponding to the reference global feature vector with the greatest similarity is determined. Based on the reference image, an identification of the robot's environment is extracted to determine the robot's position recognition result.
[0091] As an optional embodiment, determining the position recognition result of the robot according to the reference image corresponding to the reference global feature vector with the greatest similarity includes:
[0092] The position recognition result of the robot is determined according to a reference image corresponding to a reference global feature vector having the smallest Euclidean distance to the query global feature vector.
[0093] In one embodiment, the visual sensor on the robot obtains a real-time, original, color image I of the surrounding environment, and inputs the image I into a trained global feature extraction model to obtain a query global feature vector. Then, the PCA dimension reduction module is used to reduce the dimension of the query global feature vector to obtain a query global feature vector after dimension reduction.
[0094] Each reference image stored in the environment map Input it into the trained global feature extraction model to obtain the corresponding reference global feature vector. Then, use the PCA dimension reduction module to reduce the dimension of the reference global feature vector to obtain the reduced-dimensional reference global feature vector Where z is the frame number of the reference image in the environment map.
[0095] Calculate query global feature vector With each reference global eigenvector The Euclidean distance between them, where 1≤t≤z.
[0096] Finally, the reference global eigenvector with the smallest Euclidean distance The corresponding reference image is used as the image with the greatest similarity to the captured image I, and the identification of the robot's environment is extracted from the reference image, thereby determining the robot's position recognition result.
[0097] The robot position recognition method provided by the present invention extracts local features through a local feature extractor to obtain a feature map, aggregates local features in the feature map through a global feature aggregator with a clustering guided attention module to obtain global features, and performs robot position recognition based on the clustering guided global features. This can enable the global feature extraction model to pay more attention to stable areas related to the scene, reduce the interference of abnormal local features, improve the adaptability of the global features of the image to changes in environmental conditions, and effectively improve the performance of robot position recognition.
[0098] Based on the above embodiment, as an optional embodiment, the local feature extractor is composed of a basic network unit and a first conditional normalization layer;
[0099] The basic network unit includes a first convolution block, a second convolution block, a third convolution block, a fourth convolution block and a fifth convolution block connected in sequence;
[0100] The first convolution block includes a first convolution layer, a second convolution layer and a first maximum pooling layer connected in sequence;
[0101] The second convolution block includes a third convolution layer, a fourth convolution layer, and a second maximum pooling layer connected in sequence;
[0102] The third convolution block includes a fifth convolution layer, a sixth convolution layer, a seventh convolution layer and a third maximum pooling layer connected in sequence;
[0103] The fourth convolution block includes an eighth convolution layer, a ninth convolution layer, a tenth convolution layer and a fourth maximum pooling layer connected in sequence;
[0104] The fifth convolutional block includes an eleventh convolutional layer, a twelfth convolutional layer and a thirteenth convolutional layer which are connected in sequence.
[0105] Based on the above embodiment, as an optional embodiment, the first conditional normalization layer includes a first 2D instance normalization operation module, a linear operation module and a first channel normalization operation module which are connected in sequence.
[0106] Optionally, except for the thirteenth convolutional layer Con5_3 which only includes a convolution operation, all other convolutional layers in the basic network unit apply a ReLU nonlinear activation function after the convolution operation.
[0107] Optionally, the convolution kernel size of all convolution layers in the first convolution block, the second convolution block, the third convolution block, the fourth convolution block and the fifth convolution block is 3×3, the step size is (1, 1), the padding size is (1, 1), and the kernel size of all maximum pooling layers is 2×2, the step size is (2, 2), and the padding size is (0, 0).
[0108] Optionally, the normalization dimension of the first 2D instance normalization operation module is 512, the weight and bias of the linear operation module are determined based on training the global feature extraction model, and the norm of the first channel normalization operation module is the Euclidean norm.
[0109] Optionally, the weight and bias of the linear operation module are both learnable parameters, wherein the initial value of the weight is 1 and the initial value of the bias is 0.
[0110] Figure 2 It is a schematic diagram of the process of extracting local features provided by the present invention, such as Figure 2 As shown, it is assumed that the dimension of the captured image input to the global feature extraction model is H×W×3, where H is the height of the captured image and W is the width of the captured image.
[0111] The basic network unit includes a first convolution block Block1, a second convolution block Block2, a third convolution block Block3, a fourth convolution block Block4 and a fifth convolution block Block5 which are connected in sequence.
[0112] The first convolution block Block1 includes the first convolution layer Con1_1, the second convolution layer Con1_2 and the first maximum pooling layer Max_Pool_1 connected in sequence; and the feature map size of Con1_1 is H×W×64, the feature map size of Con1_2 is H×W×64, and the feature map size of Max_Pool_1 is
[0113] The second convolution block Block2 includes the third convolution layer Con2_1, the fourth convolution layer Con2_2 and the second maximum pooling layer Max_Pool_2 connected in sequence; and the feature map size of Con2_1 is The feature map size of Con2_2 is The feature map size of Max_Pool_2 is
[0114] The third convolution block Block3 includes the fifth convolution layer Con3_1, the sixth convolution layer Con3_2, the seventh convolution layer Con3_3 and the third maximum pooling layer Max_Pool_3 connected in sequence; and the feature map size of Con3_1 is The feature map size of Con3_2 is The feature map size of Con3_3 is The feature map size of Max_Pool_3 is
[0115] The fourth convolution block Block4 includes the eighth convolution layer Con4_1, the ninth convolution layer Con4_2, the tenth convolution layer Con4_3 and the fourth maximum pooling layer Max_Pool_4 connected in sequence; and the feature map size of Con4_1 is The feature map size of Con4_2 is The feature map size of Con4_3 is The feature map size of Max_Pool_4 is
[0116] The fifth convolution block Block5 includes the eleventh convolution layer Con5_1, the twelfth convolution layer Con5_2 and the thirteenth convolution layer Con5_3 connected in sequence; and the feature map size of Con5_1 is The feature map size of Con5_2 is The feature map size of Con5_3 is
[0117] The first conditional normalization layer includes a first 2D instance normalization operation module IN, a linear operation module LI, and a first channel normalization operation module CN connected in sequence; and the feature map sizes in IN, LI, and CN are all
[0118] Then, for an original, color captured image I of size H×W×3, after being input into the local feature extractor, after being processed by Block1, Block2, Block3, Block4, Block5, IN, LI and CN in sequence, a local feature extractor of size The first feature map F1.
[0119] Based on the above embodiment, as an optional embodiment, the global feature aggregator includes the clustering guided attention module, the fourteenth convolutional layer, the element-by-element multiplication operator, the softmax non-linear activation layer, the dimensionality transformation operator, the VLAD aggregation module and the feature normalization module;
[0120] The clustering guided attention module includes an image feature enhancement branch, a clustering feature enhancement branch, a vector inner product operation module, a channel maximization operation module and a sigmoid nonlinear activation operation module;
[0121] The image feature enhancement branch includes a dimensionality reduction convolution layer, a feature splitting operation layer, a grouped hole convolution operation module, a conditional normalization module, a ReLU nonlinear activation function module, a channel splicing operation module and a channel fusion operation module connected in sequence;
[0122] The clustering feature enhancement branch includes a fully connected layer;
[0123] The dimension reduction convolution layer includes a fifteenth convolution layer and a ReLU nonlinear activation function layer connected in sequence;
[0124] The grouped atrous convolution operation module includes a first grouped atrous convolution layer, a second grouped atrous convolution layer, and a third grouped atrous convolution layer in parallel;
[0125] The conditional normalization module includes a second conditional normalization layer, a third conditional normalization layer, and a fourth conditional normalization layer in parallel;
[0126] The channel fusion operation module includes a sixteenth convolutional layer and a ReLU nonlinear activation function layer connected in sequence;
[0127] The second conditional normalization layer includes a second 2D instance normalization operation module and a second channel normalization operation module connected in sequence;
[0128] The third conditional normalization layer includes a third 2D instance normalization operation module and a third channel normalization operation module connected in sequence;
[0129] The fourth conditional normalization layer includes a fourth 2D instance normalization operation module and a fourth channel normalization operation module connected in sequence.
[0130] The VLAD aggregation module is a differentiable version of the Vector of Locally Aggregated Descriptors (VLAD), which is a feature representation method widely used in image retrieval and recognition, with the advantages of reducing information loss, better representation ability, and more efficient matching performance. The VLAD aggregation module here changes the allocation coefficient in the original VLAD to the soft allocation coefficient of softmax to achieve differentiable processing.
[0131] Optionally, the convolution kernel size of the fourteenth convolutional layer is 1×1, the step size is (1, 1), the padding size is (0, 0), and the number of output channels is 64.
[0132] Optionally, the number of input channels of the fully connected layer is 512, and the number of output channels is 60.
[0133] Optionally, the convolution kernel size of the fifteenth convolutional layer is 1×1, the step size is (1, 1), the padding size is (0, 0), and the number of output channels is 120.
[0134] Optionally, the convolution kernel size of the first grouped atrous convolution layer is 1×1, the step size is (1, 1), the padding size is (0, 0), the atrous rate is 1, and the number of groups is 20.
[0135] Optionally, the convolution kernel size of the second group hole convolution layer is 3×3, the step size is (1, 1), the padding size is (1, 1), the hole rate is 1, and the number of groups is 20.
[0136] Optionally, the convolution kernel size of the third grouped atrous convolution layer is 3×3, the step size is (1, 1), the padding size is (6, 6), the atrous rate is 6, and the number of groups is 20.
[0137] Optionally, the normalization dimensions of the second 2D instance normalization operation module, the third 2D instance normalization operation module and the fourth 2D instance normalization operation module are all 20.
[0138] Optionally, the norms of the second channel normalization operation module, the third channel normalization operation module and the fourth channel normalization operation module are all Euclidean norms.
[0139] Optionally, the convolution kernel size of the sixteenth convolutional layer is 1×1, the step size is (1, 1), the padding size is (0, 0), and the number of output channels is 60.
[0140] Optionally, the number of input channels of the feature splitting operation layer is 120, which is used to divide the feature map after the dimension reduction convolution layer into three equal parts along the channel direction to obtain three split features.
[0141] Figure 3 is a schematic diagram of the process of aggregating global features provided by the present invention, such as Figure 3 As shown, the global feature aggregator includes the clustering guided attention module CGA, the fourteenth convolutional layer Conv6_1, the element-by-element multiplication operator Multi, the softmax nonlinear activation layer Soft_Max, the dimension transformation operator Dim_Trans, the VLAD aggregation module VLAD_Core and the feature normalization module Feat_Norm;
[0142] The clustering guided attention module CGA includes image feature enhancement branch Img_Feat_Branch, cluster feature enhancement branch Cluster_Feat_Branch, vector inner product operation module, channel maximization operation module Max_Ch and sigmoid nonlinear activation operation module Sigmoid.
[0143] The image feature enhancement branch Img_Feat_Branch includes the dimensionality reduction convolution layer Conv7_1, the feature splitting operation layer Feat_Split, the grouped hole convolution operation module Di_Conv, the conditional normalization module Con_Norm, the ReLU nonlinear activation function module ReLU, the channel splicing operation module Concate and the channel fusion operation module Conv7_2, which are connected in sequence.
[0144] The clustering feature enhancement branch Cluster_Feat_Branch includes a fully connected layer FC_1.
[0145] The dimension reduction convolution layer Conv7_1 includes the fifteenth convolution layer Conv7_1_1 and the ReLU nonlinear activation function layer ReLU7_1_2 which are connected in sequence.
[0146] The grouped atrous convolution operation module Di_Conv includes a first grouped atrous convolution layer Di_Conv1, a second grouped atrous convolution layer Di_Conv2 and a third grouped atrous convolution layer Di_Conv3 in parallel.
[0147] The conditional normalization module Con_Norm includes a second conditional normalization layer Con_Norm1 , a third conditional normalization layer Con_Norm2 , and a fourth conditional normalization layer Con_Norm3 arranged in parallel.
[0148] The ReLU nonlinear activation function module ReLU contains three parallel sub-modules: ReLU_1, ReLU_2 and ReLU_3.
[0149] The channel fusion operation module Conv7_2 includes a sixteenth convolution layer Conv7_2_1 and a ReLU nonlinear activation function layer ReLU7_2_2 connected in sequence;
[0150] The second conditional normalization layer Con_Norm1 includes a second 2D instance normalization operation module IN1 and a second channel normalization operation module CN1 connected in sequence;
[0151] The third conditional normalization layer Con_Norm2 includes a third 2D instance normalization operation module IN2 and a third channel normalization operation module CN2 connected in sequence;
[0152] The fourth conditional normalization layer Con_Norm3 includes a fourth 2D instance normalization operation module IN3 and a fourth channel normalization operation module CN3 which are sequentially connected.
[0153] Specifically, the global feature aggregator receives After the first feature map F1 is input, the first feature map F1 is first reduced in dimension by the dimensionality reduction convolution layer Conv7_1 of the image feature enhancement branch Img_Feat_Branch to obtain a size of The second feature map F2.
[0154] After the second feature map F2 is split by the feature splitting operation layer Feat_Split, the size of the result is The third characteristic graph F3, the fourth characteristic graph F4, and the fifth characteristic graph F5.
[0155] Then, the third feature map F3 is respectively subjected to the grouped dilated convolution, conditional normalization and ReLU nonlinear activation function of Di_Conv1, Con_Norm1, ReLU_1 to obtain the sixth feature map F6; the fourth feature map F4 is respectively subjected to the operations of Di_Conv2, Con_Norm2, ReLU_2 to obtain the seventh feature map F7; the fifth feature map F5 is respectively subjected to the operations of Di_Conv3, Con_Norm3, ReLL_3 to obtain the eighth feature map F8. Among them, the sizes of F6, F7 and F8 are
[0156] After F6, F7, and F8 are concatenated by the channel concatenation operation module Concate, the resulting size is The ninth feature map F9.
[0157] The ninth feature map F9 is then processed by the sixteenth convolution layer Conv7_2_1 and the ReLU nonlinear activation function layer ReLU7_2_2 in the channel fusion operation module Conv7_2 to obtain a size of The tenth characteristic graph F 10 As the output of the image feature enhancement branch Img_Feat_Branch.
[0158] On the other hand, the clustering feature F with a size of 64×512 c Input to the cluster feature enhancement branch Cluster_Feat_Branch, processed by the fully connected layer FC_1 in Cluster_Feat_Branch, and the processing result of FC_1 is transposed to obtain the eleventh feature map F with a size of 60×64 11 , as the output of the clustering feature enhancement branch.
[0159] The tenth feature map F output by the image feature enhancement branch 10 The feature F of each pixel position in 10 (i, j) and the eleventh feature map F output by the clustering feature enhancement branch 11 Each cluster feature F 11 (k) After the vector inner product operation, the result is divided by Get the size The twelfth characteristic graph F 12 . Where i represents the tenth feature map F 10 In the height dimension, j represents the tenth feature map F 10 In the index of the width dimension, k represents the index of the cluster, and there are 64 clusters in total.
[0160] Furthermore, the twelfth characteristic graph F 12 After the operation of the channel maximization operation module Max_Ch, the maximum value on the channel dimension is selected as the output of the module, and then processed by the sigmoid nonlinear activation operation module Sigmoid to obtain a size of The first attention map M1 is used as the output of the clustering guided attention module CGA.
[0161] Furthermore, the third dimension of the first attention map M1 is replicated 64 times to obtain a size of The second attention map M2.
[0162] The fourteenth convolutional layer Conv6_1 is used to perform a convolution operation on the first feature map F1 to obtain The thirteenth characteristic graph F 13 .
[0163] The second attention map M2 and the thirteenth feature map F 13 After being processed by the element-by-element multiplication operator Multi and the softmax nonlinear activation layer Soft_Max, the size is The first allocation matrix A1 is then reduced to a size of The vector of size is The second allocation matrix A2.
[0164] The dimension transformation operator Dim_Trans is used to reduce the first distribution matrix A1 to the second distribution matrix A2, which includes: defining DRq(·), DRq(·) is the transformation of the q+1-dimensional tensor Ds to the q-dimensional tensor Dt, that is, Dt = DRq(Ds), and the coordinates of the elements in Dt are represented by (r1, r2, …, r q ); then use (int(r1 / l1),r1%l1,r2,r3,…,r q ) position fills the value in Dt (r1, r2, r3, …, r q ) to achieve dimensionality reduction. Where l1 represents the length of the second dimension of Ds.
[0165] The second allocation matrix A2 and the first feature map F1 are then passed through the VLAD aggregation module VLAD_Core and the feature normalization module Feat_Norm to obtain a global feature vector f of the captured image, and the dimension of the global feature vector f is 32768.
[0166] In one embodiment, F c The acquisition of is achieved by taking all the training images in the training set as input, sending them to the local feature extractor pre-trained by the ImageNet dataset, and then clustering the obtained local features using clustering techniques such as Kmeans. The feature normalization module Feat_Norm is obtained by L2 normalizing the input features in the channel direction, stretching them into a one-dimensional vector, and then performing L2 normalization again.
[0167] The robot position recognition method provided by the present invention, before performing global feature aggregation on the extracted local features, performs full connection and transposition processing on the cluster features to obtain a feature map with scene clustering centers, and uses the feature map in the global feature aggregation process, thereby utilizing the scene clustering centers with greater stability to weaken the influence of abnormal local features on the global feature extraction network, thereby improving the environmental adaptability of the robot position recognition, improving the generalization ability and robustness of the global feature extraction model, and thus improving the accuracy of the robot position recognition.
[0168] Based on the above embodiment, as an optional embodiment, the global feature extraction model is obtained by training based on the query image and its corresponding positive training sample set and negative training sample set using a stochastic gradient descent optimizer;
[0169] The positive training sample set includes a positive sample reference image corresponding to the query image; and the negative training sample set includes a negative sample reference image corresponding to the query image.
[0170] Among them, Stochastic Gradient Descent (SGD) is an optimization algorithm that updates model parameters by calculating the gradient of each training sample.
[0171] Among them, the positions of the robot identified by the query image and its corresponding positive sample reference image are consistent; the positions of the robot identified by the query image and its corresponding negative sample reference image are inconsistent.
[0172] Specifically, a stochastic gradient descent optimizer is used to train the global feature extraction model. As the number of iterations increases, the learning rate of the stochastic gradient descent optimizer decreases, and the training is continuously iterated until the loss function of the global feature extraction model is minimized.
[0173] For example, suppose the initial learning rate of the stochastic gradient descent optimizer is 0.001, and after every 2 epochs of training, the learning rate decays to 0.5 times the current learning rate.
[0174] In one embodiment, a positive training sample set and a negative training sample set corresponding to each query image are selected from the Pitts30k dataset.
[0175] In one embodiment, the global feature extraction model is trained by batch training, the batch size is set to 4 tuples, and 8 generations are trained.
[0176] Specifically, during training, given a query image Q n , and all reference images P in the environment map n The global feature vectors are sent to the global feature extraction network to obtain the corresponding query global feature vector and multiple reference global feature vectors, and the cosine similarity between the query global feature vector and each reference global feature vector is calculated.
[0177] When constructing the training tuple, we first start with the query image Q n The reference image with the largest cosine similarity to the corresponding positive training sample set is selected as the positive sample, and E negative samples are randomly selected from the corresponding negative training sample set. Then, the M negative samples with the largest cosine similarity to the query image are selected from these E negative samples and the M negative samples selected in the previous generation as the negative samples used for this training, thereby forming a training tuple.
[0178] After the training tuple is input into the global feature extraction network, a vector tuple is obtained The dimension of each vector is 32768; the elements in the corresponding positions of the training tuple and the vector tuple correspond one to one.
[0179] Optionally, E is 1000 and M is 10.
[0180] In one embodiment, the loss function of the global feature extraction model is shown in the following calculation formula:
[0181]
[0182]
[0183] Among them, L t represents the loss of the tth iteration, w nm represents the weight of the mth negative sample of the nth query image. N and τ are the number of query images and an adjustable temperature parameter, respectively. is a cosine similarity function, L′ t =βL′ t-1 +(1-β)L t-1 is the moving average of the previous loss, α is the adjustment factor, and β is the weight.
[0184] Optionally, τ is 0.07.
[0185] Optionally, α is 0.1 and β is 0.9.
[0186] The robot position recognition method provided by the present invention adopts a stochastic gradient descent optimizer, based on a pre-constructed positive training sample set and a negative training sample set, to train a global feature extraction model for the purpose of minimizing the loss function, and obtains the parameters of the local feature extractor and the global feature aggregator in the global feature extraction model, which can improve the generalization ability and robustness of the global feature extraction model, thereby improving the accuracy of robot position recognition.
[0187] Based on the above embodiment, as an optional embodiment, the GPS distance between the query image and its corresponding positive sample reference image is less than or equal to a first preset threshold;
[0188] The GPS distance between the query image and its corresponding negative sample reference image is greater than a second preset threshold.
[0189] Specifically, when constructing a positive training sample set for each query image, a reference image whose GPS distance to the query image is less than or equal to a first preset threshold is used as a positive sample reference image, and when constructing a negative training sample set for each query image, a reference image whose GPS distance to the query image is greater than a second preset threshold is used as a negative sample reference image.
[0190] It can be understood that the second preset threshold is greater than the first preset threshold.
[0191] It should be noted that the first preset threshold and the second preset threshold can be determined comprehensively according to the accuracy requirements of the robot position recognition, the performance parameters of the computing unit, the size of the environment map and other factors, and the present invention does not limit this. For example, the first preset threshold can be set to 10m and the second preset threshold can be set to 25m; or the first preset threshold can be set to 40m and the second preset threshold can be set to 100m.
[0192] The robot position recognition method provided by the present invention adopts two different preset thresholds to determine the captured images and reference images for constructing the positive training sample set and the negative training sample set, so as to select image data with more obvious features as training samples, which can improve the training speed, generalization ability and robustness of the global feature extraction model, thereby improving the accuracy of robot position recognition.
[0193] Figure 4 : is a schematic diagram of the structure of the robot position recognition device provided by the present invention, such as Figure 4 As shown, including but not limited to:
[0194] The query global feature vector acquisition unit 401 is used to input the captured image into the global feature extraction model to obtain the query global feature vector output by the global feature extraction model; the captured image is obtained by capturing the robot's surrounding environment;
[0195] A similarity calculation unit 402 is used to respectively calculate the similarity between the query global feature vector and a plurality of reference global feature vectors; the reference global feature vectors are obtained by inputting a reference image in a map of the robot's environment into the global feature extraction model;
[0196] A position determination unit 403, configured to determine a position recognition result of the robot according to a reference image corresponding to a reference global feature vector having the greatest similarity;
[0197] The global feature extraction model includes a local feature extractor and a global feature aggregator with a clustering guided attention module.
[0198] It should be noted that the robot position recognition device provided by the present invention can execute the robot position recognition method described in any of the above embodiments during specific operation, which will not be elaborated in this embodiment.
[0199] The robot position recognition device provided by the present invention extracts local features through a local feature extractor to obtain a feature map, aggregates local features in the feature map through a global feature aggregator with a clustering-guided attention module to obtain global features, and performs robot position recognition based on the clustering-guided global features. This enables the global feature extraction model to pay more attention to stable areas related to the scene, reduce the interference of abnormal local features, improve the adaptability of the global features of the image to changes in environmental conditions, and effectively improve the performance of robot position recognition.
[0200] Figure 5 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 5 As shown, the electronic device may include: a processor (Processor) 510, a communication interface (Communications Interface) 520, a memory (Memory) 530 and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 can call the logic instructions in the memory 530 to execute the robot position recognition method described in any of the above embodiments, the method includes but is not limited to: inputting the captured image into the global feature extraction model to obtain the query global feature vector output by the global feature extraction model; the captured image is obtained after shooting the robot's surrounding environment; respectively calculating the similarity between the query global feature vector and multiple reference global feature vectors; the reference global feature vector is obtained by inputting the reference image in the robot's environment map into the global feature extraction model; according to the reference image corresponding to the reference global feature vector with the largest similarity, determining the robot's position recognition result; the global feature extraction model includes a local feature extractor and a global feature aggregator with a clustering guided attention module.
[0201] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0202] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the robot position recognition method described in any of the above embodiments, the method including but not limited to: inputting a captured image into a global feature extraction model to obtain a query global feature vector output by the global feature extraction model; the captured image is obtained by photographing the robot's surroundings; calculating the similarity between the query global feature vector and multiple reference global feature vectors respectively; the reference global feature vector is obtained by inputting a reference image in a map of the robot's environment into the global feature extraction model; determining the robot's position recognition result based on the reference image corresponding to the reference global feature vector with the largest similarity; the global feature extraction model includes a local feature extractor and a global feature aggregator with a clustering guided attention module.
[0203] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0204] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0205] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A robot position recognition method, characterized in that: include: Inputting the captured image into a global feature extraction model to obtain a query global feature vector output by the global feature extraction model; the captured image is obtained by capturing the environment surrounding the robot; Respectively calculating the similarity between the query global feature vector and a plurality of reference global feature vectors; the reference global feature vectors are obtained by inputting a reference image in a map of the robot's environment into the global feature extraction model; Determining a position recognition result of the robot according to a reference image corresponding to a reference global feature vector with the greatest similarity; The global feature extraction model includes a local feature extractor and a global feature aggregator with a clustering guided attention module; The global feature aggregator includes the clustering guided attention module, the fourteenth convolutional layer, the element-by-element multiplication operator, the softmax nonlinear activation layer, the dimension transformation operator, the VLAD aggregation module and the feature normalization module; The clustering guided attention module includes an image feature enhancement branch, a clustering feature enhancement branch, a vector inner product operation module, a channel maximization operation module and a sigmoid nonlinear activation operation module; The image feature enhancement branch includes a dimensionality reduction convolution layer, a feature splitting operation layer, a grouped hole convolution operation module, a conditional normalization module, a ReLU nonlinear activation function module, a channel splicing operation module and a channel fusion operation module connected in sequence; The clustering feature enhancement branch includes a fully connected layer; The dimension reduction convolution layer includes a fifteenth convolution layer and a ReLU nonlinear activation function layer connected in sequence; The grouped atrous convolution operation module includes a first grouped atrous convolution layer, a second grouped atrous convolution layer, and a third grouped atrous convolution layer in parallel; The conditional normalization module includes a second conditional normalization layer, a third conditional normalization layer, and a fourth conditional normalization layer in parallel; The channel fusion operation module includes a sixteenth convolutional layer and a ReLU nonlinear activation function layer connected in sequence; The second conditional normalization layer includes a second 2D instance normalization operation module and a second channel normalization operation module connected in sequence; The third conditional normalization layer includes a third 2D instance normalization operation module and a third channel normalization operation module connected in sequence; The fourth conditional normalization layer includes a fourth 2D instance normalization operation module and a fourth channel normalization operation module connected in sequence.
2. The robot position recognition method according to claim 1, characterized in that: The local feature extractor is composed of a basic network unit and a first conditional normalization layer; The basic network unit includes a first convolution block, a second convolution block, a third convolution block, a fourth convolution block and a fifth convolution block connected in sequence; The first convolution block includes a first convolution layer, a second convolution layer and a first maximum pooling layer connected in sequence; The second convolution block includes a third convolution layer, a fourth convolution layer, and a second maximum pooling layer connected in sequence; The third convolution block includes a fifth convolution layer, a sixth convolution layer, a seventh convolution layer and a third maximum pooling layer connected in sequence; The fourth convolution block includes an eighth convolution layer, a ninth convolution layer, a tenth convolution layer and a fourth maximum pooling layer connected in sequence; The fifth convolutional block includes an eleventh convolutional layer, a twelfth convolutional layer and a thirteenth convolutional layer which are connected in sequence.
3. The robot position recognition method according to claim 2, characterized in that: The convolution kernel size of all convolutional layers in the first convolution block, the second convolution block, the third convolution block, the fourth convolution block and the fifth convolution block is 3×3, the step size is (1, 1), and the padding size is (1, 1). The kernel size of all maximum pooling layers is 2×2, the step size is (2, 2), and the padding size is (0, 0).
4. The robot position recognition method according to any one of claims 2 to 3, characterized in that: The first conditional normalization layer includes a first 2D instance normalization operation module, a linear operation module and a first channel normalization operation module connected in sequence, wherein: The normalized dimension of the first 2D instance normalization operation module is 512, the weight and bias of the linear operation module are determined based on the training of the global feature extraction model, and the norm of the first channel normalization operation module is the Euclidean norm.
5. The robot position recognition method according to claim 1, characterized in that: The convolution kernel size of the fourteenth convolutional layer is 1×1, the step size is (1, 1), the padding size is (0, 0), and the number of output channels is 64; The number of input channels of the fully connected layer is 512, and the number of output channels is 60; The convolution kernel size of the fifteenth convolutional layer is 1×1, the step size is (1, 1), the padding size is (0, 0), and the number of output channels is 120; The convolution kernel size of the first group hole convolution layer is 1×1, the step size is (1, 1), the padding size is (0, 0), the hole rate is 1, and the number of groups is 20; The convolution kernel size of the second group hole convolution layer is 3×3, the step size is (1, 1), the padding size is (1, 1), the hole rate is 1, and the number of groups is 20; The convolution kernel size of the third group hole convolution layer is 3×3, the step size is (1, 1), the padding size is (6, 6), the hole rate is 6, and the number of groups is 20; The normalization dimensions of the second 2D instance normalization operation module, the third 2D instance normalization operation module, and the fourth 2D instance normalization operation module are all 20; The norms of the second channel normalization operation module, the third channel normalization operation module and the fourth channel normalization operation module are all Euclidean norms; The convolution kernel size of the sixteenth convolutional layer is 1×1, the step size is (1, 1), the padding size is (0, 0), and the number of output channels is 60.
6. The robot position recognition method according to claim 1, characterized in that: It also includes a PCA dimension reduction module, which performs dimension reduction processing on the query global feature vector output by the global feature extraction model, and outputs the query global feature vector after dimension reduction.
7. The robot position recognition method according to claim 1, characterized in that: The step of determining the position recognition result of the robot according to the reference image corresponding to the reference global feature vector with the greatest similarity comprises: The position recognition result of the robot is determined according to a reference image corresponding to a reference global feature vector having the smallest Euclidean distance to the query global feature vector.
8. The robot position recognition method according to claim 1, characterized in that: The global feature extraction model is trained using a stochastic gradient descent optimizer based on a query image and its corresponding positive training sample set and negative training sample set; The positive training sample set includes a positive sample reference image corresponding to the query image; The negative training sample set includes a negative sample reference image corresponding to the query image.
9. The robot position recognition method according to claim 8, characterized in that: The GPS distance between the query image and its corresponding positive sample reference image is less than or equal to a first preset threshold; The GPS distance between the query image and its corresponding negative sample reference image is greater than a second preset threshold.
10. A robot position recognition device, characterized in that: include: A query global feature vector acquisition unit is used to input the captured image into the global feature extraction model to obtain the query global feature vector output by the global feature extraction model; the captured image is obtained by capturing the robot's surrounding environment; A similarity calculation unit, used to respectively calculate the similarity between the query global feature vector and a plurality of reference global feature vectors; the reference global feature vectors are obtained by inputting a reference image in a map of the robot's environment into the global feature extraction model; A position determination unit, used to determine a position recognition result of the robot according to a reference image corresponding to a reference global feature vector having the greatest similarity; The global feature extraction model includes a local feature extractor and a global feature aggregator with a clustering guided attention module; The global feature aggregator includes the clustering guided attention module, the fourteenth convolutional layer, the element-by-element multiplication operator, the softmax nonlinear activation layer, the dimension transformation operator, the VLAD aggregation module and the feature normalization module; The clustering guided attention module includes an image feature enhancement branch, a clustering feature enhancement branch, a vector inner product operation module, a channel maximization operation module and a sigmoid nonlinear activation operation module; The image feature enhancement branch includes a dimensionality reduction convolution layer, a feature splitting operation layer, a grouped hole convolution operation module, a conditional normalization module, a ReLU nonlinear activation function module, a channel splicing operation module and a channel fusion operation module connected in sequence; The clustering feature enhancement branch includes a fully connected layer; The dimension reduction convolution layer includes a fifteenth convolution layer and a ReLU nonlinear activation function layer connected in sequence; The grouped atrous convolution operation module includes a first grouped atrous convolution layer, a second grouped atrous convolution layer, and a third grouped atrous convolution layer in parallel; The conditional normalization module includes a second conditional normalization layer, a third conditional normalization layer, and a fourth conditional normalization layer in parallel; The channel fusion operation module includes a sixteenth convolutional layer and a ReLU nonlinear activation function layer connected in sequence; The second conditional normalization layer includes a second 2D instance normalization operation module and a second channel normalization operation module connected in sequence; The third conditional normalization layer includes a third 2D instance normalization operation module and a third channel normalization operation module connected in sequence; The fourth conditional normalization layer includes a fourth 2D instance normalization operation module and a fourth channel normalization operation module connected in sequence.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the robot position recognition method according to any one of claims 1 to 9 are implemented.
12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the robot position recognition method according to any one of claims 1 to 9 are implemented.