Ground identifier identification model establishment method, ground identifier identification method and device
The clustering algorithm is used to cluster feature maps and zoom maps, optimize feature extraction, and adjust the ground mark recognition model, which solves the problem of insufficient ground mark recognition capabilities of traditional algorithms in high-precision maps, improves the recognition effect, and is suitable for high-precision maps. Cartography of maps.
Patent Information
- Application Number
- CN202410630667.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-21
- Publication Date
- 2024-09-03
AI Technical Summary
Traditional machine learning algorithms cannot effectively integrate image pixel features when identifying ground signs, resulting in poor model learning capabilities and inability to complete high-precision map image recognition tasks. Moreover, the recognition effects of deep learning algorithms vary widely in different scenes and cannot be applied to high-precision maps. mapping.
Use the clustering algorithm to cluster the feature map and zoom map, obtain the cluster center, optimize the extracted features, fuse the clustering features, and adjust the ground sign recognition model until the training loss meets the preset conditions to improve the recognition effect of the ground sign. .
It improves the recognition effect of ground signs, solves the problems of incomplete sign recognition and large gaps in recognition effects in different scenes, and is suitable for high-precision map mapping.
Smart Images

Figure CN118587464A
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method for establishing a ground sign recognition model, a ground sign recognition method, a ground sign recognition model establishment device, a ground sign recognition model establishment device, an electronic device and a storage medium. Background Art
[0002] In high-precision maps, ground arrows, crosswalks, lane lines and other ground signs play an important role in vehicle navigation. Therefore, the recognition accuracy requirements for these ground signs are relatively high. Traditional machine learning algorithms such as C4.5 decision tree algorithm, Cart (classification and regression tree), lightgbm (Light GradientBoosting Machine, a distributed gradient boosting framework based on decision tree algorithm) cannot effectively fuse the pixel features of the image when extracting images, and the model learning ability becomes poor, and it is unable to complete the high-precision map image recognition task.
[0003] With the development of deep learning, deep learning algorithms based on image data training, such as RNN (Recurrent Neural Network), LSTM (Long Short-Term Memory), CNN (Convolutional Neural Networks), and mobilenet (Lightweight Neural Network), have been introduced one after another. However, when these algorithms recognize ground signs, they may have incomplete sign recognition and large differences in recognition effects in different scenes, and cannot be applied to high-precision map making. Summary of the invention
[0004] In order to solve or partially solve the problems existing in the related art, the present application provides a ground sign recognition model establishment method, a ground sign recognition method, a ground sign recognition model establishment device, a ground sign recognition model establishment device, an electronic device and a storage medium, which can cluster the feature map and the zoom map through a clustering algorithm, and obtain the cluster center, and continuously optimize the extracted features by comparing the cluster center each time, thereby realizing a method for extracting information by fusing cluster features, thereby improving the recognition effect of ground signs.
[0005] The first aspect of the present application provides a method for establishing a ground sign recognition model, comprising:
[0006] Acquire a number of training sample data, and input the training sample data into a ground mark recognition model; wherein the training sample data includes ground marks;
[0007] Extracting a feature map of the training sample data;
[0008] Performing a clustering operation on the feature graph to obtain a first cluster center;
[0009] Scaling the training sample data into scaled images of different sizes, and performing a clustering operation on the scaled images to obtain a second cluster center;
[0010] The first cluster center and the second cluster center are fused and the training loss is calculated, the ground marker recognition model is adjusted according to the training loss, and the ground marker recognition model is re-trained using the training sample data until the training loss meets the preset conditions, thereby obtaining a trained ground marker recognition model.
[0011] Optionally, the ground marker recognition model includes multiple network layers, and extracting the feature graph of the training sample data includes:
[0012] Feature extraction is performed on the training sample data through each network layer to obtain a feature map of the training sample data.
[0013] Optionally, the number of the scaled graph sizes corresponds to the number of layers of the network layer, and the fusing the first cluster center and the second cluster center and calculating the training loss includes:
[0014] Obtain the first cluster center of each network layer and the second cluster center of each scaled image in turn;
[0015] Comparing the coordinate values of the first cluster center and the coordinate values of the second cluster center in sequence to obtain a plurality of coordinate difference values; each coordinate difference value has a corresponding preset weight;
[0016] The coordinate difference and the preset weight are fused to calculate the training loss.
[0017] Optionally, the steps after fusing according to the coordinate difference and the preset weight and calculating the training loss include:
[0018] The training loss is optimized using cosine simulated annealing.
[0019] Optionally, the training sample data includes preset labels, and the steps before obtaining a number of training sample data include:
[0020] Determine a deviation value between the ground identification information in the training sample data and a preset label;
[0021] When the deviation value is greater than a preset value, the training sample data is standardized and relabeled with the preset label;
[0022] The standardized training sample data is randomly divided into training data and test data; the training data is used to train the ground sign recognition model, and the test data is used to test the ground sign recognition model.
[0023] A second aspect of the present application provides a ground sign recognition method, comprising:
[0024] Obtain samples to be identified;
[0025] The sample to be identified is input into a ground sign recognition model; the ground sign recognition model obtains a number of training sample data and inputs the training sample data into the ground sign recognition model; wherein the training sample data contains ground sign information; a feature map of the training sample data is extracted; a clustering operation is performed on the feature map to obtain a first cluster center; the training sample data is scaled into scaled maps of different sizes, and a clustering operation is performed on the scaled map to obtain a second cluster center; a training loss is calculated based on the first cluster center and the second cluster center, the ground sign recognition model is adjusted according to the training loss, and the ground sign recognition model is retrained using the training sample data until the training loss meets a preset condition, thereby obtaining a trained ground sign recognition model;
[0026] The predicted label output by the ground marker recognition model is obtained, where the predicted label is used to identify the ground marker in the sample to be identified.
[0027] A third aspect of the present application provides a ground sign recognition model establishment device, comprising:
[0028] A first acquisition module is used to acquire a number of training sample data and input the training sample data into a ground mark recognition model; wherein the training sample data includes ground mark information;
[0029] An extraction module, used to extract a feature map of the training sample data;
[0030] A first clustering module, used for performing a clustering operation on the feature graph to obtain a first cluster center;
[0031] A second clustering module is used to scale the training sample data into scaled images of different sizes, and perform a clustering operation on the scaled images to obtain a second cluster center;
[0032] A training module is used to calculate the training loss based on the first cluster center and the second cluster center, adjust the ground marker recognition model according to the training loss, and re-train the ground marker recognition model using the training sample data until the training loss meets the preset conditions, thereby obtaining a trained ground marker recognition model.
[0033] A fourth aspect of the present application provides a ground sign recognition device, comprising:
[0034] The second acquisition module is used to acquire the sample to be identified;
[0035] An input module is used to input the sample to be identified into a ground marker recognition model; the ground marker recognition model obtains a number of training sample data and inputs the training sample data into the ground marker recognition model; wherein the training sample data contains ground marker information; extracts a feature map of the training sample data; performs a clustering operation on the feature map to obtain a first cluster center; scales the training sample data into scaled maps of different sizes, and performs a clustering operation on the scaled map to obtain a second cluster center; calculates a training loss based on the first cluster center and the second cluster center, adjusts the ground marker recognition model according to the training loss, and re-adopts the training sample data to train the ground marker recognition model until the training loss meets a preset condition, thereby obtaining a trained ground marker recognition model;
[0036] The output module is used to obtain the predicted label output by the ground marker recognition model, and the predicted label is used to identify the ground marker in the sample to be identified.
[0037] A fifth aspect of the present application provides an electronic device, including:
[0038] Processor; and
[0039] The memory stores executable codes thereon, and when the executable codes are executed by the processor, the processor is caused to execute the method as described above.
[0040] A sixth aspect of the present application provides a computer-readable storage medium having executable code stored thereon. When the executable code is executed by a processor of an electronic device, the processor is caused to execute the method described above.
[0041] The technical solution provided by the present application may include the following beneficial effects: by acquiring a number of training sample data, inputting the training sample data into a ground sign recognition model, wherein the training sample data includes ground signs, extracting a feature map of the training sample data, performing a clustering operation on the feature map to obtain a first cluster center, scaling the training sample data into scaled maps of different sizes, and performing a clustering operation on the scaled map to obtain a second cluster center, calculating a fusion and training loss based on the first cluster center and the second cluster center, adjusting the ground sign recognition model according to the training loss, and re-training the ground sign recognition model with the training sample data until the training loss meets a preset condition, thereby obtaining a trained ground sign recognition model, being able to cluster the feature map and the scaled map through a clustering algorithm, and obtaining the cluster center, and continuously optimizing the extracted features by comparing the cluster center each time, thereby realizing a method for extracting information by integrating cluster features, thereby improving the recognition effect of ground signs.
[0042] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The above and other objects, features and advantages of the present application will become more apparent by describing in more detail the exemplary embodiments of the present application in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments of the present application.
[0044] Figure 1 It is a flowchart of a method for establishing a ground sign recognition model shown in an embodiment of the present application;
[0045] Figure 2 is a schematic diagram of a ground sign recognition model shown in an embodiment of the present application;
[0046] Figure 3 It is a flowchart of a ground sign recognition method shown in an embodiment of the present application;
[0047] Figure 4 It is a structural schematic diagram of a ground sign recognition model establishment device shown in an embodiment of the present application;
[0048] Figure 5 is a schematic diagram of the structure of a ground sign recognition device shown in an embodiment of the present application;
[0049] Figure 6 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION
[0050] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present application more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.
[0051] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0052] It should be understood that although the terms "first", "second", "third", etc. may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0053] When the relevant algorithms identify ground signs, incomplete sign recognition and large differences in recognition effects in different scenarios will occur, and they cannot be used in the production of high-precision maps.
[0054] In response to the above problems, an embodiment of the present application provides a method for establishing a ground sign recognition model, which can cluster feature maps and zoom maps through a clustering algorithm and obtain cluster centers. By comparing the cluster centers each time and continuously optimizing the extracted features, a method for extracting information that integrates cluster features is realized, thereby improving the recognition effect of ground signs.
[0055] The technical solution of the embodiments of the present application is described in detail below with reference to the accompanying drawings.
[0056] Figure 1 It is a flow chart of a method for establishing a ground sign recognition model shown in an embodiment of the present application.
[0057] See also Figure 1 , the method comprising:
[0058] Step 101, obtaining a number of training sample data, and inputting the training sample data into a ground mark recognition model; wherein the training sample data includes ground marks;
[0059] A high-precision map (HD map) is a high-precision map used for autonomous driving. As a priori data for autonomous driving, it expresses map elements such as roads, lanes, roadside traffic signs, and ground signs. When related algorithms recognize ground signs, there will be incomplete sign recognition and large differences in recognition effects in different scenes, which cannot be applied to the mapping of high-precision maps. This application provides a method for establishing a ground sign recognition model, which can improve the recognition effect of ground signs.
[0060] In an embodiment of the present application, a number of training sample data are first obtained. The training sample data may include ground signs such as ground arrows, crosswalks, and lane lines. The training sample data including the ground signs are input into the ground sign recognition model. The training sample data may be data from different scenarios. By training the model with data from different scenarios, the effect of the model on ground sign recognition in different scenarios can be improved. It is understandable that the number of training sample data can be selected by those skilled in the art according to actual needs. In one example, 1,000 training sample data can be selected. The embodiment of the present application does not limit the number of training sample data.
[0061] In an optional embodiment of the present application, the training sample data includes a preset label, and before step 101, the following steps are included:
[0062] Step S11, determining the deviation value between the ground identification information in the training sample data and the preset label;
[0063] In an embodiment of the present application, the training sample data includes preprocessed image data and preset exchange format data (json data), and the preset exchange format data includes real labels of ground markers.
[0064] Image data includes road arrow images of high-precision maps, which can be preprocessed before use. The preprocessing method can be enhancement processing, and the processing methods include random illumination, random noise, random cropping, random inversion, etc. After enhancement processing, the distribution of training sample data is enriched, the generalization performance and robustness of the model are improved, and overfitting is prevented.
[0065] For the training sample data, it is possible to first determine whether there is a deviation value between the ground identification information to be identified and the preset label, that is, to determine whether the preset label and the information to be identified maintain corresponding positions.
[0066] Step S12, when the deviation value is greater than the preset value, the training sample data is standardized and re-labeled with the preset label;
[0067] A preset value can be set for the deviation value. When the deviation value between the ground identification information to be identified and the preset label is greater than the preset value, it can be confirmed that the training sample data does not meet the specifications. In this case, the training sample data needs to be standardized and the preset labels of the training sample data need to be re-labeled.
[0068] Step S13, randomly divide the standardized training sample data into training data and test data; the training data is used to train the ground sign recognition model, and the test data is used to test the ground sign recognition model.
[0069] The standardized training sample data is randomly divided into training data and test data; wherein the training data is used to train the ground sign recognition model, and the test data is used to test the ground sign recognition model. In one example, if 1000 training sample data are selected, 800 training data and 200 test data can be selected. It can be understood by those skilled in the art that the numbers of the above-mentioned training sample data, training data, and test data are only examples, and the embodiments of the present application do not limit this.
[0070] Step 102, extracting a feature map of the training sample data;
[0071] The ground sign recognition model includes a splicing module and a convolution module. After splicing, the convolution module can be used to extract features of the training sample data to obtain a feature map of the training sample data.
[0072] In an optional embodiment of the present application, the ground sign recognition model includes multiple network layers, and step 102 includes:
[0073] Sub-step 1021, extracting features from the training sample data through each network layer to obtain a feature map of the training sample data.
[0074] The ground sign recognition model includes multiple network layers, which include a splicing module and a convolution module. The convolution module can be used to extract features from the training sample data to obtain a feature map of the training sample data. In one example, the ground sign recognition model can have 4 network layers, and the training sample data needs to be extracted through 4 network layers to obtain a feature map of each network layer.
[0075] Step 103, performing a clustering operation on the feature graph to obtain a first cluster center;
[0076] K-means (k-means clustering algorithm) is an iterative clustering analysis algorithm. Its steps are: divide the data into K groups in advance, randomly select K objects as the initial cluster centers, and then calculate the distance between each object and each seed cluster center, and assign each object to the cluster center closest to it. The cluster centers and the objects assigned to them represent a cluster. Each time a sample is assigned, the cluster center of the cluster will be recalculated based on the existing objects in the cluster. This process will be repeated until a certain termination condition is met. The termination condition can be that no (or the minimum number) of objects are reassigned to different clusters, no (or the minimum number) of cluster centers change again, and the sum of squared errors is locally minimized.
[0077] In the embodiment of the present application, the k-means algorithm is used to perform clustering operations on the feature graphs, and the feature graphs of each network layer are clustered to obtain the first cluster center of each network layer feature graph. Among them, the number of cluster categories K can be selected as 5, and the number of cluster categories is the optimal number of categories K selected by technicians in this application through a large number of experiments. In the iterative process, keep the input unchanged, and repeat the calculation by adjusting the position of the cluster center until a cluster center that meets the conditions is found.
[0078] In one example, if the ground sign recognition model has four network layers, the training sample data can be extracted through the four network layers to obtain the feature map of each network layer. After clustering the feature map of each network layer, four cluster centers can be obtained.
[0079] Step 104, scaling the training sample data into scaled images of different sizes, and performing clustering operations on the scaled images to obtain second cluster centers;
[0080] Bilinear interpolation, also known as bilinear interpolation. Mathematically, bilinear interpolation is an extension of linear interpolation with an interpolation function of two variables. Its core idea is to perform linear interpolation in two directions respectively.
[0081] In an embodiment of the present application, the training sample data can also be scaled by bilinear interpolation operation to scale the training sample data into scaled images of different sizes. In one example, the training sample data can be scaled to 1 / 2, 1 / 4, 1 / 8, and 1 / 16 of the original image size. After obtaining scaled images of different sizes, clustering operations are performed on the scaled images of different sizes to obtain the second cluster center of the scaled image. Here, the k-means algorithm can also be used to cluster the scaled image, and the number of cluster categories K can be selected to be 5.
[0082] Step 105, based on the first cluster center and the second cluster center, the fusion is performed and the training loss is calculated, the ground sign recognition model is adjusted according to the training loss, and the ground sign recognition model is re-trained using the training sample data until the training loss meets the preset conditions, thereby obtaining a trained ground sign recognition model.
[0083] By comparing the coordinate values of the first cluster center and the second cluster center, the training loss loss can be calculated. A threshold can be set for the training loss. When the loss is greater than the threshold, the ground sign recognition model is adjusted and the ground sign recognition model is retrained using the training sample data until the training loss is no greater than the threshold. It is determined that the training loss meets the preset conditions, thereby obtaining a trained ground sign recognition model.
[0084] In an optional embodiment of the present application, the number of scaled graph sizes corresponds to the number of network layers, and step 105 includes:
[0085] Sub-step S11, sequentially obtaining the first cluster center of each network layer and the second cluster center of each size scaling graph;
[0086] In one example, if the ground sign recognition model has four network layers, when scaling the training sample data, it can be scaled into four scaled images of different sizes, for example, scaling the training sample data to 1 / 2, 1 / 4, 1 / 8, and 1 / 16 of the original image size. When calculating the training loss, the first cluster center of each network layer and the second cluster center of each scaled image can be selected in turn.
[0087] Sub-step S12, sequentially comparing the coordinate value of the first cluster center with the coordinate value of the second cluster center to obtain a plurality of coordinate difference values; each coordinate difference value has a corresponding preset weight;
[0088] In one example, the coordinate values of the first cluster center and the coordinate values of the second cluster center can be compared in sequence, for example, the coordinate values of the first cluster center of the first network layer and the second cluster center of the 1 / 2 zoom map are compared, and the coordinate values of the first cluster center of the second network layer and the second cluster center of the 1 / 4 zoom map are compared, thereby obtaining four coordinate difference values C1, C2, C3, and C4. Among them, a corresponding preset weight w1, w2, w3, and w4 can be set for each coordinate difference value.
[0089] Sub-step S13, performing fusion according to the coordinate difference and the preset weights, and calculating the training loss.
[0090] According to the coordinate difference and the preset weight corresponding to the coordinate difference, the training loss loss can be calculated. The loss calculation is as follows:
[0091] loss=C1*1+2*2+3*3+4*4 (1)
[0092] Multiplying the coordinate difference with its corresponding preset weight and adding the multiplied results can fuse multi-scale features, thereby improving the accuracy of arrow recognition of different categories.
[0093] In an optional embodiment of the present application, the steps after sub-step S13 include:
[0094] Sub-step S14, using the cosine simulated annealing method to optimize the training loss.
[0095] After obtaining the training loss, the cosine simulated annealing method can be used to optimize the training loss. The calculation formula is as follows:
[0096]
[0097] Among them, i is the number of runs (index value); and Respectively represent the maximum and minimum values of the learning rate, T cur Indicates how many epochs have passed since the last restart (training once with all samples in the training set), T i Indicates how many epochs are needed for training after the i-th restart.
[0098] like Figure 2 The figure shows a schematic diagram of a ground sign model, which includes two parts: Encoder and Decoder. The training sample data is input into the ground sign recognition model from input, and feature extraction is performed through the concatenation module (concat) and the convolution module (conv) in the network layer to obtain a feature map, and the feature map is clustered to obtain the first cluster center, which is output from output to center. After the training sample data is input, it is also scaled to different sizes, and the scaled map is clustered to obtain the second cluster center, which is transmitted to center. The coordinate difference is obtained by comparing the first cluster center with the second cluster center, which is fused in fusion to obtain the training loss, and the cosine simulated annealing method is used to optimize the training loss. The ground sign recognition model is adjusted based on the training loss, and the ground sign recognition model is retrained with the training sample data to obtain a trained ground sign recognition model.
[0099] The embodiment of the present application discloses a method for establishing a ground sign recognition model, which obtains a number of training sample data, inputs the training sample data into the ground sign recognition model, wherein the training sample data includes ground signs, extracts feature maps of the training sample data, performs clustering operations on the feature maps to obtain a first cluster center, scales the training sample data into scaled maps of different sizes, and performs clustering operations on the scaled maps to obtain a second cluster center, calculates fusion and training losses based on the first cluster center and the second cluster center, adjusts the ground sign recognition model according to the training losses, and re-trains the ground sign recognition model using the training sample data until the training losses meet preset conditions, thereby obtaining a trained ground sign recognition model, which can cluster the feature maps and scaled maps through a clustering algorithm and obtain cluster centers, and continuously optimizes the extracted features by comparing the cluster centers each time, thereby realizing a method for extracting information by integrating cluster features, thereby improving the recognition effect of ground signs.
[0100] Figure 3 It is a flow chart of the ground sign recognition method shown in the embodiment of the present application.
[0101] See also Figure 3 , the method comprising:
[0102] Step 301, obtaining a sample to be identified;
[0103] In an embodiment of the present application, the sample to be identified may be a picture or video containing ground signs in different scenes.
[0104] Step 302, input the sample to be identified into the ground sign recognition model; the ground sign recognition model obtains a number of training sample data, and inputs the training sample data into the ground sign recognition model; wherein the training sample data includes ground sign information; extracts a feature map of the training sample data; performs a clustering operation on the feature map to obtain a first cluster center; scales the training sample data into scaled maps of different sizes, and performs a clustering operation on the scaled maps to obtain a second cluster center; calculates a training loss based on the first cluster center and the second cluster center, adjusts the ground sign recognition model according to the training loss, and re-trains the ground sign recognition model using the training sample data until the training loss meets a preset condition, thereby obtaining a trained ground sign recognition model;
[0105] After obtaining the samples to be identified, the samples to be identified can be input into the ground sign recognition model, wherein the ground sign recognition model obtains a number of training sample data and inputs the training sample data into the ground sign recognition model; wherein the training sample data contains ground sign information; extracts a feature map of the training sample data; performs a clustering operation on the feature map to obtain a first cluster center; scales the training sample data into scaled maps of different sizes, and performs a clustering operation on the scaled map to obtain a second cluster center; based on the first cluster center and the second cluster center, the first cluster center is fused and the training loss is calculated, the ground sign recognition model is adjusted according to the training loss, and the ground sign recognition model is re-trained using the training sample data until the training loss meets the preset conditions, thereby obtaining a trained ground sign recognition model.
[0106] Step 303: Obtain the predicted label output by the ground marker recognition model, where the predicted label is used to identify the ground marker in the sample to be identified.
[0107] The ground marker recognition model can identify the samples to be identified and output the predicted labels of the samples to be identified, thereby obtaining the ground markers in the samples to be identified.
[0108] The embodiment of the present application obtains a sample to be identified, inputs the sample to be identified into a ground marker recognition model, and obtains a predicted label output by the ground marker recognition model, so that the ground marker in the sample to be identified can be identified using the ground marker recognition model, thereby improving the recognition accuracy of the ground marker.
[0109] Corresponding to the aforementioned application function realization method embodiment, the present application also provides a ground sign recognition model establishment device, a ground sign recognition device, an electronic device and corresponding embodiments.
[0110] Figure 4 It is a structural schematic diagram of a ground sign recognition model building device shown in an embodiment of the present application.
[0111] See also Figure 4 , the device comprises:
[0112] The first acquisition module 401 is used to acquire a number of training sample data and input the training sample data into the ground mark recognition model; wherein the training sample data includes ground mark information;
[0113] Extraction module 402, used to extract feature graphs of training sample data;
[0114] A first clustering module 403 is used to perform a clustering operation on the feature graph to obtain a first cluster center;
[0115] A second clustering module 404 is used to scale the training sample data into scaled images of different sizes, and perform clustering operations on the scaled images to obtain second cluster centers;
[0116] The training module 405 is used to calculate the fusion and training loss based on the first cluster center and the second cluster center, adjust the ground sign recognition model according to the training loss, and re-train the ground sign recognition model using the training sample data until the training loss meets the preset conditions, thereby obtaining a trained ground sign recognition model.
[0117] In an optional embodiment of the present application, the ground sign recognition model includes multiple network layers, and the extraction module 402 includes:
[0118] The extraction submodule is used to extract features of the training sample data through each network layer to obtain a feature map of the training sample data.
[0119] In an optional embodiment of the present application, the number of scaled graph sizes corresponds to the number of network layers, and the training module 405 includes:
[0120] An acquisition submodule is used to sequentially acquire the first cluster center of each network layer and the second cluster center of each scaled image;
[0121] A comparison submodule, used to compare the coordinate value of the first cluster center with the coordinate value of the second cluster center in sequence to obtain a plurality of coordinate difference values; each coordinate difference value has a corresponding preset weight;
[0122] The coordinate difference and preset weights are used for fusion and the training loss is calculated.
[0123] In an optional embodiment of the present application, the training module 405 further includes:
[0124] The optimization submodule is used to calculate the training loss using the cosine simulated annealing method.
[0125] In an optional embodiment of the present application, the training sample data includes a preset label, and the device further includes:
[0126] A deviation value module, used to determine the deviation value between the ground identification information in the training sample data and the preset label;
[0127] A processing module is used to standardize the training sample data and re-label the preset labels when the deviation value is greater than the preset value;
[0128] The grouping module is used to randomly divide the standardized training sample data into training data and test data; the training data is used to train the ground sign recognition model, and the test data is used to test the ground sign recognition model.
[0129] The embodiment of the present application discloses a ground sign recognition model establishment device, which obtains a number of training sample data, inputs the training sample data into the ground sign recognition model, wherein the training sample data includes ground signs, extracts feature maps of the training sample data, performs clustering operations on the feature maps to obtain a first cluster center, scales the training sample data into scaled maps of different sizes, and performs clustering operations on the scaled maps to obtain a second cluster center, calculates fusion and training losses based on the first cluster center and the second cluster center, adjusts the ground sign recognition model according to the training losses, and re-trains the ground sign recognition model using the training sample data until the training losses meet preset conditions, thereby obtaining a trained ground sign recognition model, which can cluster the feature maps and scaled maps through a clustering algorithm and obtain cluster centers, and continuously optimizes the extracted features by comparing the cluster centers each time, thereby improving the recognition effect of ground signs.
[0130] Figure 5 It is a schematic diagram of the structure of a ground sign recognition device shown in an embodiment of the present application.
[0131] See also Figure 5 , the device comprises:
[0132] The second acquisition module 501 is used to acquire a sample to be identified;
[0133] Input module 502, used for inputting the sample to be identified into the ground sign recognition model; the ground sign recognition model obtains a number of training sample data, and inputs the training sample data into the ground sign recognition model; wherein the training sample data includes ground sign information; extracts the feature map of the training sample data; performs clustering operation on the feature map to obtain a first cluster center; scales the training sample data into scaled maps of different sizes, and performs clustering operation on the scaled maps to obtain a second cluster center; based on the first cluster center and the second cluster center, the training loss is calculated and the ground sign recognition model is adjusted according to the training loss, and the ground sign recognition model is re-trained with the training sample data until the training loss meets the preset condition, thereby obtaining a trained ground sign recognition model;
[0134] The output module 503 is used to obtain the predicted label output by the ground marker recognition model, and the predicted label is used to identify the ground marker in the sample to be identified.
[0135] The embodiment of the present application obtains a sample to be identified, inputs the sample to be identified into a ground marker recognition model, and obtains a predicted label output by the ground marker recognition model, so that the ground marker in the sample to be identified can be identified using the ground marker recognition model, thereby improving the recognition accuracy of the ground marker.
[0136] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated again here.
[0137] Figure 6 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application.
[0138] See also Figure 6 , the electronic device 600 includes a memory 610 and a processor 620 .
[0139] The processor 620 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0140] The memory 610 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. Among them, ROM can store static data or instructions required by the processor 620 or other modules of the computer. The permanent storage device may be a readable and writable storage device. The permanent storage device may be a non-volatile storage device that does not lose the stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (such as a magnetic or optical disk, flash memory) as a permanent storage device. In some other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as a dynamic random access memory. The system memory may store some or all instructions and data required by the processor at run time. In addition, the memory 610 may include any combination of computer-readable storage media, including various types of semiconductor storage chips (such as DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, the memory 610 may include a readable and / or writable removable storage device, such as a laser disc (CD), a read-only digital versatile disc (such as a DVD-ROM, a double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (such as an SD card, a mini SD card, a Micro-SD card, etc.), a magnetic floppy disk, etc. The computer-readable storage medium does not include carrier waves and transient electronic signals transmitted wirelessly or wired.
[0141] The memory 610 stores executable codes, and when the executable codes are processed by the processor 620 , the processor 620 can execute part or all of the above-mentioned methods.
[0142] In addition, the method according to the present application may also be implemented as a computer program or a computer program product, which includes computer program code instructions for executing some or all of the steps in the above method of the present application.
[0143] Alternatively, the present application can also be implemented as a computer-readable storage medium (or non-transitory machine-readable storage medium or machine-readable storage medium) on which executable code (or computer program or computer instruction code) is stored. When the executable code (or computer program or computer instruction code) is executed by a processor of an electronic device (or server, etc.), the processor executes part or all of the steps of the above-mentioned method according to the present application.
[0144] The embodiments of the present application have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A method for establishing a ground sign recognition model, Features: Acquire a number of training sample data, and input the training sample data into a ground mark recognition model; wherein the training sample data includes ground marks; Extracting a feature map of the training sample data; Performing a clustering operation on the feature graph to obtain a first cluster center; Scaling the training sample data into scaled images of different sizes, and performing a clustering operation on the scaled images to obtain a second cluster center; The first cluster center and the second cluster center are fused and the training loss is calculated, the ground marker recognition model is adjusted according to the training loss, and the ground marker recognition model is re-trained using the training sample data until the training loss meets the preset conditions, thereby obtaining a trained ground marker recognition model.
2. The method according to claim 1, It is characterized in that The ground sign recognition model includes a plurality of network layers, and the feature map of the training sample data extracted includes: Feature extraction is performed on the training sample data through each network layer to obtain a feature map of the training sample data.
3. The method according to claim 2, It is characterized in that The number of the scaled graph sizes corresponds to the number of layers of the network layer, and the fusing the first cluster center and the second cluster center and calculating the training loss includes: Obtain the first cluster center of each network layer and the second cluster center of each scaled image in turn; Comparing the coordinate value of the first cluster center with the coordinate value of the second cluster center in sequence to obtain a plurality of coordinate difference values; each coordinate difference value has a corresponding preset weight; The coordinate difference and the preset weight are fused to calculate the training loss.
4. The method according to claim 3, It is characterized in that The steps after fusing the coordinate difference and the preset weight and calculating the training loss include: The training loss is optimized using cosine simulated annealing.
5. The method according to claim 1, It is characterized in that The training sample data includes preset labels, and the steps before obtaining a plurality of training sample data include: Determine a deviation value between the ground identification information in the training sample data and a preset label; When the deviation value is greater than a preset value, the training sample data is standardized and relabeled with the preset label; The standardized training sample data is randomly divided into training data and test data; the training data is used to train the ground sign recognition model, and the test data is used to test the ground sign recognition model.
6. A ground sign recognition method, Features: Obtain samples to be identified; The sample to be identified is input into a ground sign recognition model; the ground sign recognition model obtains a number of training sample data and inputs the training sample data into the ground sign recognition model; wherein the training sample data contains ground sign information; a feature map of the training sample data is extracted; a clustering operation is performed on the feature map to obtain a first cluster center; the training sample data is scaled into scaled maps of different sizes, and a clustering operation is performed on the scaled map to obtain a second cluster center; a training loss is calculated based on the first cluster center and the second cluster center, the ground sign recognition model is adjusted according to the training loss, and the ground sign recognition model is retrained using the training sample data until the training loss meets a preset condition, thereby obtaining a trained ground sign recognition model; The predicted label output by the ground marker recognition model is obtained, where the predicted label is used to identify the ground marker in the sample to be identified.
7. A ground sign recognition model building device, It is characterized in that The device comprises: A first acquisition module is used to acquire a number of training sample data and input the training sample data into a ground mark recognition model; wherein the training sample data includes ground mark information; An extraction module, used to extract a feature map of the training sample data; A first clustering module, used for performing a clustering operation on the feature graph to obtain a first cluster center; A second clustering module is used to scale the training sample data into scaled images of different sizes, and perform a clustering operation on the scaled images to obtain a second cluster center; A training module is used to calculate the training loss based on the first cluster center and the second cluster center, adjust the ground marker recognition model according to the training loss, and re-train the ground marker recognition model using the training sample data until the training loss meets the preset conditions, thereby obtaining a trained ground marker recognition model.
8. A ground sign recognition device, It is characterized in that The device comprises: The second acquisition module is used to acquire the sample to be identified; An input module is used to input the sample to be identified into a ground marker recognition model; the ground marker recognition model obtains a number of training sample data and inputs the training sample data into the ground marker recognition model; wherein the training sample data contains ground marker information; extracts a feature map of the training sample data; performs a clustering operation on the feature map to obtain a first cluster center; scales the training sample data into scaled maps of different sizes, and performs a clustering operation on the scaled map to obtain a second cluster center; calculates a training loss based on the first cluster center and the second cluster center, adjusts the ground marker recognition model according to the training loss, and re-adopts the training sample data to train the ground marker recognition model until the training loss meets a preset condition, thereby obtaining a trained ground marker recognition model; The output module is used to obtain the predicted label output by the ground marker recognition model, and the predicted label is used to identify the ground marker in the sample to be identified.
9. An electronic device, It is characterized in that include: processor; as well as A memory having executable codes stored thereon, which, when executed by the processor, causes the processor to execute the method according to any one of claims 1 to 6.
10. A computer-readable storage medium having executable codes stored thereon, which, when executed by a processor of an electronic device, causes the processor to execute the method according to any one of claims 1 to 6.
