Traffic text recognition method, device, equipment and storage medium

By combining the backbone network model and the SIFT feature algorithm, it achieves accurate recognition of traffic text, solves the potential safety hazards caused by autonomous vehicles' dependence on wireless networks, and improves driving safety.

CN114998859BActive Publication Date: 2024-09-10CHANGDE MICHUANG TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210422626.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-21
Publication Date
2024-09-10
Estimated Expiration
2042-04-21

AI Technical Summary

Technical Problem

In self-driving vehicles, over-reliance on wireless networks may lead to traffic accidents when communication network failures occur, posing safety risks. Moreover, traditional drivers’ driving methods that rely on visual perception are unstable in complex environments, increasing the risk of traffic accidents.

Method used

The backbone network model (constructed from the FPN network and ResNet50 network) is combined with the SIFT feature algorithm to perform traffic text recognition. The location of the traffic text is identified through feature extraction, fusion and fine detection, providing reliable traffic information and reducing reliance on wireless networks.

Benefits of technology

It improves the accuracy and reliability of traffic text recognition, provides real-time and effective driving information, improves vehicle driving safety, and reduces safety hazards of autonomous driving technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114998859B
    Figure CN114998859B
Patent Text Reader

Abstract

The present application relates to the technical field of traffic target detection and recognition. The present application discloses a traffic text recognition method, device, equipment and computer-readable storage medium. The method includes using a backbone network model jointly constructed by an FPN network and a ResNet50 network to perform feature operations on an image to be recognized to obtain a feature map, and performing SIFT feature algorithm operations on the image to be recognized to obtain a feature description vector; detecting and identifying the area where the traffic text is located on the feature map to obtain a fine feature map that marks the area where the traffic text is located; performing feature fusion on the fine feature map and the feature description vector to obtain fused features; detecting and identifying the area where the traffic text is located on the fused features to determine the area where the traffic text is located in the image to be recognized, so as to perform semantic recognition on the traffic text in the location area. The present application provides reliable data information for obtaining traffic text, which helps to improve the driving safety of automobiles.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of traffic target detection and recognition, and in particular to a traffic text recognition method, device, equipment and computer-readable storage medium. Background Art

[0002] The emergence of cars has greatly facilitated human travel, but with the widespread popularity of cars, it has also brought about the problem of frequent traffic accidents. During the driving of a car, the driver perceives the traffic environment information through his own visual system and controls the driving state of the vehicle, thus forming a closed-loop system of "driver-car-road-environment". In this closed-loop system, the driver is the core of the control decision. However, the real driving environment is complex and diverse, and the road conditions are inexhaustible. During the driving process of the vehicle, the mixed traffic mode of motor vehicles, non-motor vehicles, and pedestrians makes the driver disturbed by many unknown factors, forcing the driver to spend more energy to deal with the driving conditions, which in turn leads to great instability in his driving state. This traditional vehicle driving mode with the driver as the core has increasingly prominent shortcomings when the traffic conditions become more and more complex, and it has also become the main cause of frequent traffic accidents.

[0003] With the development of artificial intelligence technology, autonomous driving technology has gradually been applied in the process of car driving. Compared with traditional car driving, autonomous driving technology relies more on various satellites, GPS positioning and other technologies to judge road conditions. This often requires autonomous driving vehicles to stay online at all times. Once the car's communication network is disconnected due to a fault, it is likely to cause a traffic accident. It can be seen that in autonomous driving technology, excessive reliance on wireless networks by vehicles also poses a great safety hazard to the vehicle's autonomous driving.

[0004] To sum up, how to effectively solve the problem of vehicle driving safety is one of the hot research issues in the industry. Summary of the invention

[0005] The purpose of the present invention is to provide a traffic text recognition method, device, equipment and computer-readable storage medium, which are conducive to providing reliable traffic text data for vehicle driving.

[0006] In order to solve the above technical problems, the present invention provides a traffic text recognition method, comprising:

[0007] Using the backbone network model to perform feature operations on the image to be identified to obtain a feature map; wherein the backbone network model is a model that has been pre-learned and trained and constructed by the FPN network and the ResNet50 network;

[0008] Performing SIFT feature algorithm operation on the image to be identified to obtain a feature description vector;

[0009] Detecting and identifying the area where the traffic text is located on the feature map to obtain a fine feature map marking the area where the traffic text is located;

[0010] Performing feature fusion on the fine feature map and the feature description vector to obtain a fused feature;

[0011] The fusion feature is used to detect and identify the area where the traffic text is located, and the location area where the traffic text is located in the image to be identified is determined, so as to perform semantic recognition on the traffic text in the location area.

[0012] Optionally, detecting and identifying the area where the traffic text is located on the feature map to obtain a fine feature map marking the area where the traffic text is located includes:

[0013] Eliminating non-text features from the feature graph to obtain text features;

[0014] Performing a rough text frame detection on the feature map to obtain a rough detection frame of the area where the text is located in the feature map;

[0015] Performing a deformable convolution operation on the coarse detection frame and the feature map to obtain a detection frame;

[0016] The text feature and the detection frame are jointly subjected to a fine detection operation to obtain a fine feature map.

[0017] Optionally, removing non-text features from the feature graph to obtain text features includes:

[0018] The feature map is sequentially operated through the first 1×1 convolution layer, the scale normalization layer, the first activation layer, the second 1×1 convolution layer, and the second activation layer in the text classification head to generate a text classification score map;

[0019] The features with scores less than a preset threshold in the text classification score graph are removed as non-text features, and the features with scores not less than the preset threshold are obtained as text features.

[0020] Optionally, performing a rough text frame detection on the feature map to obtain a rough detection frame of an area where the text is located in the feature map includes:

[0021] The feature map is sequentially subjected to a coarse detection operation through a 3×3 convolutional layer, a scale normalization layer, an activation layer, and a 1×1 convolutional layer in a coarse detection model to obtain a coarse detection frame;

[0022] The text feature and the detection frame are jointly subjected to a fine detection operation to obtain a fine feature map, including:

[0023] The text features and the detection frame are sequentially subjected to fine detection operations through a 3×3 convolutional layer, a scale normalization layer, an activation layer, and a 1×1 convolutional layer in a fine detection model to obtain a fine feature map.

[0024] Optionally, detecting and identifying the area where the traffic text is located on the fused features to determine the area where the traffic text is located in the image to be identified includes:

[0025] Detect and identify the area where the traffic text is located on the fused features to obtain multiple text detection frames;

[0026] Eliminate the text detection frame with a smaller confidence score from any two text detection frames whose overlap is greater than a preset overlap; wherein the confidence score is the probability that the text in the file detection frame is a traffic text;

[0027] The area where each of the removed text detection frames is located is used as the area where the traffic text is located in the image to be recognized.

[0028] Optionally, the process of constructing the backbone network includes:

[0029] Construct a convolutional neural network based on the FPN network and ResNet50 network;

[0030] Using the convolutional neural network to extract features from the sample image to obtain sample features;

[0031] Pass the sample features through a 1×1 convolutional layer and an RBOX bounding box respectively to obtain a predicted text position and a predicted text score of the sample image;

[0032] The predicted text position and the predicted text score are subjected to an error loss operation with the real text position and the real text score of the sample image using a dice loss function, and the convolutional neural network is optimized according to the operation result to obtain the backbone network model.

[0033] Optionally, before performing feature operation on the image to be identified by using the backbone network model to obtain a feature map and performing SIFT feature algorithm operation on the image to be identified to obtain a feature description vector, the method further includes:

[0034] Grayscale the image to be identified to obtain a grayscale image;

[0035] Determining whether the brightness of the image to be identified reaches the required brightness according to the grayscale value of each pixel in the grayscale image;

[0036] If not, performing image enhancement operation on the image to be identified through Gamma correction;

[0037] According to the image to be identified after the enhancement operation, the steps of performing feature operation on the image to be identified using the backbone network model to obtain a feature map, performing SIFT feature algorithm operation on the image to be identified, and obtaining a feature description vector are performed.

[0038] A traffic text recognition device, comprising:

[0039] A first operation module is used to perform feature operation on the image to be identified using a backbone network model to obtain a feature map; wherein the backbone network model is a model that has been pre-learned and trained and constructed by the FPN network and the ResNet50 network;

[0040] The second operation module is used to perform SIFT feature algorithm operation on the image to be identified to obtain a feature description vector;

[0041] The third operation module is used to detect and identify the area where the traffic text is located on the feature map, and obtain a fine feature map that marks the area where the traffic text is located;

[0042] A fourth operation module, used for performing feature fusion on the fine feature map and the feature description vector to obtain a fused feature;

[0043] The text recognition module is used to detect and identify the area where the traffic text is located based on the fusion features, and determine the location area where the traffic text is located in the image to be recognized, so as to perform semantic recognition on the traffic text in the location area.

[0044] A traffic text recognition device, comprising:

[0045] Memory for storing computer programs;

[0046] A processor is used to execute the computer program to implement the steps of the traffic text recognition method as described in any one of the above items.

[0047] A computer-readable storage medium is used to store a computer program, and the computer program is executed by a processor to implement the steps of the traffic text recognition method as described in any one of the above items.

[0048] A traffic text recognition method provided by the present invention includes using a backbone network model to perform feature operations on an image to be recognized to obtain a feature map; wherein the backbone network model is a model that has been pre-learned and trained and is jointly constructed by an FPN network and a ResNet50 network; performing SIFT feature algorithm operations on the image to be recognized to obtain a feature description vector; detecting and identifying the area where the traffic text is located on the feature map to obtain a fine feature map that marks the area where the traffic text is located; performing feature fusion on the fine feature map and the feature description vector to obtain fused features; detecting and identifying the area where the traffic text is located on the fused features to determine the area where the traffic text is located in the image to be recognized, so as to perform semantic recognition on the traffic text in the location area.

[0049] In this application, the backbone network model jointly constructed by the FPN network and the ResNet50 network is combined with the SIFT feature algorithm to obtain the feature map and feature description vector of the image to be identified from different angles. On this basis, the area where the traffic text is located in the feature map is identified to obtain a fine feature map, and after the fine feature map and the feature description vector are fused, the traffic text is recognized again more accurately based on the fused features; In this application, the backbone network model and the SIFT feature algorithm are used in two different ways to extract the feature information of the image to be identified, and the feature information extracted by the two different ways is fused to realize the positioning and identification of the traffic text, which improves the accuracy of the position area identification of the traffic text in the image to be identified, and provides reliable data information for the subsequent further identification of the semantic information of the traffic text, which is conducive to the subsequent provision of effective driving information for automobile driving based on the semantics of the traffic text, and helps to improve the driving safety of the car.

[0050] The present application also provides a traffic text recognition device, equipment and computer-readable storage medium. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0052] Figure 1 A flow chart of a traffic text recognition method provided in an embodiment of the present application;

[0053] Figure 2 A flow chart of a traffic text recognition method provided by another embodiment of the present application;

[0054] Figure 3This is a structural block diagram of a traffic text recognition device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0055] Whether it is a manually driven car, an autonomous car, or even the currently popular logistics robot or other vehicles or vehicle-like equipment, as long as it is driving on the road, especially on complex urban roads, it is crucial to correctly and effectively read the text information on the traffic signs on the road. It can not only provide correct driving tips for manually driven drivers, but also provide accurate navigation information for unmanned vehicles.

[0056] Therefore, in order to more accurately obtain the traffic text on the traffic sign, a technical solution for traffic text recognition is provided in the present application.

[0057] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0058] like Figure 1 As shown, Figure 1 A flow chart of a traffic text recognition method provided in an embodiment of the present application, the recognition method may include:

[0059] S11: Use the backbone network model to perform feature operations on the image to be identified to obtain a feature map.

[0060] Among them, the backbone network model is a model that has been pre-learned and trained and constructed jointly by the FPN network and the ResNet50 network.

[0061] The image to be identified can be an image obtained by real-time shooting of the road environment by a camera carried by a vehicle traveling on the road, a driving recorder, or a camera on a mobile phone, etc. In this embodiment, it is necessary to identify whether the image contains traffic text.

[0062] In addition, for the backbone network model jointly constructed by the FPN network and the ResNet50 network, FPN (Feature Pyramid Networks) mainly solves the multi-scale problem in object detection and greatly improves the performance of small object detection. In the process of obtaining image features using neural networks, as the network gradually deepens, the deep network is more sensitive to the contour features of the text and ignores some detailed features of the text. These detailed features are often captured by the shallow network. Combining the feature maps extracted from the deep and shallow layers can also have better effects on texts of different scales. Because the network connection method resembles a pyramid, it is called a feature pyramid network.

[0063] ResNet50 is a convolutional neural network structure. Because of its jump connection method, ResNet is also known as residual neural network. It refers to the idea of ​​adding residual learning to the traditional convolutional neural network, which solves the problems of gradient vanishing and precision loss in deep networks. In the operation, the network can become deeper and deeper, and as the network gradually deepens, the amount of data will also increase, so the residual network (ResNet) structure is used to jump connect the convolutional layers to achieve the purpose of reducing the amount of calculation, thereby ensuring accuracy and controlling speed. The number 50 at the end represents the number of convolutional layers.

[0064] The ResNet50 neural network and the FPN neural network together form the backbone network model of the model, which preliminarily extracts the feature map of traffic text in the picture. For example, the input image to be recognized can be fixed to a resolution of 256*128, and after the backbone network model is operated, a feature map with a feature size of (256, 128, 12) is output.

[0065] S12: Perform SIFT feature algorithm operation on the image to be identified to obtain a feature description vector.

[0066] While using the backbone network model to extract features from the image to be identified to obtain a feature map, the SIFT feature algorithm can also be used to obtain a feature description vector.

[0067] SIFT (Scale-invariant feature transform) is a computer vision algorithm used to detect and describe local features in images. It finds extreme points in the spatial scale and extracts their position, scale, rotation invariant and other combinations to form a feature description vector.

[0068] The operation of SIFT feature algorithm on the image to be identified can be regarded as another way to extract features from the image to be identified. Specifically, it goes through three processes: feature extraction, feature description and feature matching. Feature extraction is to extract key points or feature points, corner points, etc. from the image. Feature description is to describe the feature points with a set of mathematical vectors, which mainly ensures that there is a corresponding relationship between different vectors and different feature points, and the difference between similar key points is as small as possible. Feature matching is actually the distance calculation between feature vectors. Commonly used distances include Euclidean distance, Hamming distance, cosine distance, etc. It maintains invariance to rotation, scaling, and brightness changes, and also maintains a certain degree of stability to changes in viewing angle, affine transformation, and noise, which makes the entire model more robust.

[0069] In this embodiment, there is no requirement on the number of feature points and the ratio of valid points in the SIFT feature algorithm operation. When there are not many feature points, the optimized SIFT matching algorithm can even meet the real-time requirements and can be easily combined with other forms of feature vectors.

[0070] S13: Detect and identify the area where the traffic text is located on the feature map, and obtain a fine feature map that marks the area where the traffic text is located.

[0071] In this embodiment, the method for detecting and identifying the area where the traffic text is located in the feature map can be to use a text box detection model that includes a 3×3 convolutional layer, a scale normalization layer, an activation layer, and a 1×1 convolutional layer in sequence to perform a text box detection operation to obtain a feature map of the text box surrounding the traffic text.

[0072] The text box detection model consists of a 3×3 convolution layer → a scale normalization layer → an activation layer (which can reduce the number of channels to 64) and a 1×1 convolution layer, and the output geometry is a rough detection box of H / 4×W / 4×5. H and W represent the length and width of the input feature map, respectively, and the five channels represent the distance to the four sides of the text quadrilateral and the rotation angle of the text quadrilateral.

[0073] It can be understood that the text box detection model can be obtained by pre-training using sample images of traffic text, and the parameters of the text box detection model can be corrected through sample training, so that the text box detection model can identify pixel points in the input image that may be traffic text and form a text box surrounding the traffic text.

[0074] However, considering that the text box of the traffic text identified by only one text box detection model may not be able to guarantee its accuracy well; therefore, in an optional embodiment of the present application, the specific process of performing text box feature detection on the feature map in step S12 to obtain a fine feature map may include:

[0075] Step 1: Remove non-text features from the feature map to obtain text features;

[0076] Step 2: Perform a rough text box detection on the feature map to obtain a rough detection box of the area where the text is located in the feature map;

[0077] Step 3: Perform deformable convolution operation on the coarse detection frame and the feature map to obtain the detection frame;

[0078] Step 4: Perform fine detection operations on the text features and the detection box to obtain a fine feature map.

[0079] First, in the process of removing non-text features from the feature map in step 1, a text classification head may be used to operate on the feature map; the operation process may include:

[0080] The feature map is sequentially operated through the first 1×1 convolution layer, the scale normalization layer, the first activation layer, the second 1×1 convolution layer, and the second activation layer in the text classification head to generate a text classification score map;

[0081] The features with scores less than the preset threshold in the text classification score graph are removed as non-text features, and the features with scores not less than the preset threshold are obtained as text features.

[0082] The text classification head first passes the input feature map through a 3×3 convolution layer → a scale normalization layer → an activation layer to reduce the number of channels to 64, and then passes it through a 1×1 convolution layer → an activation layer to generate a text classification score map; the shape of the output text classification score map is H / 4×W / 4×4 and the value is between 0 and 1. In the output text classification score map, if the score is greater than a certain threshold, it is judged as a text feature and output to the next layer. If the score is less than a certain threshold, it is judged as a non-text feature (background such as leaves and pedestrians) and is discarded.

[0083] Optionally, in the process of performing rough text box detection on the feature map in the above step 2, a rough detection model is used to implement it, and in the above step 4, the process of performing fine detection operations on the text features and the detection box together can be completed by a fine detection model. The structural layer composition of the rough detection model and the fine detection model is the same as the structural layer of the above text box detection model, and both belong to the text box detection model including 3×3 convolutional layers, a scale normalization layer, an activation layer, and a 1×1 convolutional layer.

[0084] That is to say, the process of using the rough detection model to perform rough detection of the text box may include:

[0085] The feature map is passed through the 3×3 convolution layer, the scale normalization layer, the activation layer, and the 1×1 convolution layer in the coarse detection model to perform coarse detection operations in sequence to obtain a coarse detection frame.

[0086] The process of performing fine detection operations using a fine detection model may include:

[0087] The text features and the detection frame obtained by the deformable convolution operation are passed through the 3×3 convolution layer, the scale normalization layer, the activation layer and the 1×1 convolution layer in the fine detection model to perform fine detection operations in sequence to obtain a fine feature map.

[0088] However, it is understandable that the structural layer parameters of the coarse detection model and the fine detection model may be different, and the specific parameter settings can be determined in the specific sample training.

[0089] In this embodiment, text box detection is performed twice. In the first rough detection process, a rough text box of the traffic text imaging in the image to be detected can be roughly determined; then the rough text box and the feature map containing the complete features of the image to be identified are jointly subjected to a deformable convolution operation to achieve the deformation of the detection points in the feature map, so that the detection points are offset to the area where traffic text may exist; and on this basis, the fine detection model is used again to perform text box detection operation on the detection box after the deformable convolution operation and the text features after non-text elimination, which can improve the accuracy of the fine detection model in detecting the area containing traffic text to a certain extent, and then obtain a fine feature map.

[0090] Based on the above discussion, deformable convolution extracts features so that the network can focus more on the text area of ​​interest (i.e., the area where traffic text may exist), thereby improving detection accuracy. Deformable convolution means that the convolution kernel adds an additional direction parameter to each element, so that the convolution kernel can be expanded to a larger range during the training process to extract the area of ​​interest to the network. First, the results of the coarse detection are used to generate sampling points, and then the sampling points are applied to the deformable convolution operator to obtain merged features for precise positioning; the merged features can be further used by the subsequent fine positioning head to generate a fine detection that better surrounds the text area than the coarse detection. For example, in this embodiment, deformable convolution can be used to move the sampling points of the convolution layer so that more sampling points fall on the traffic text area, and the extracted features will be more accurate.

[0091] S14: Fusing the fine feature map and the feature description vector to obtain fused features.

[0092] S15: Detect and identify the area where the traffic text is located based on the fused features, and determine the location area where the traffic text is located in the image to be identified, so as to perform semantic recognition on the traffic text in the location area.

[0093] It should be noted that in the process of performing text box detection on the fusion feature, the text box detection model including the 3×3 convolution layer, the scale normalization layer, the activation layer and the 1×1 convolution layer can also be used to implement it. Of course, the structural layer parameters of the text detection module in this step may also be different from the structural layer parameters of the coarse detection model and the fine detection model, and only the composition of the structural layer is similar.

[0094] The fine feature map obtained by fine detection and the feature description vector obtained by the SIFT feature algorithm are merged, the number of channels remains unchanged, and then further detected by the text box detection model. Obviously, a more accurate text detection box surrounding the traffic text can be obtained.

[0095] In practical applications, it can be seen that in the actual image to be identified, the traffic text on the traffic sign may contain multiple lines of text, so there may be multiple text detection boxes formed in the end, each text detection box contains a part of the traffic text, and the contents of each text detection box are pieced together to form a text box where the traffic text is located.

[0096] However, in the actual detection operation process, it is possible that several slightly offset text detection frames will be generated for the same word or words in the traffic text, resulting in a cluttered text frame problem. For this reason, it is possible to consider partially removing or merging multiple text detection frames with a high degree of overlap.

[0097] It should be noted that the text detection boxes detected by the above text box detection model include:

[0098] The coordinate information of the four vertices of the text detection box of the rectangular frame structure, each vertex includes an X coordinate and a Y coordinate;

[0099] The confidence score of each text detection box, that is, the probability that the text enclosed by the text detection box is traffic text;

[0100] The geometric score of each text detection box, that is, the effectiveness of the traffic text surrounded by the text detection box;

[0101] As well as the angle information of each text detection box, the offset between the text detection box and the corresponding traffic text line.

[0102] Therefore, the above information can be used to actually propose a text detection frame with a high overlap.

[0103] In an optional embodiment of the present application, in order to further simplify the detection result, the following may also be included:

[0104] S151: Detect and identify the area where the traffic text is located based on the fused features to obtain multiple text detection frames;

[0105] S152: Eliminate the text detection frame with the smaller confidence score from any two text detection frames whose overlap is greater than a preset overlap; wherein the confidence score is the probability that the text in the file detection frame is traffic text; and the geometry score is the efficiency of the file detection frame surrounding the traffic text.

[0106] S153: Using the area where each text detection frame after being eliminated is located as the area where the traffic text is located in the image to be recognized.

[0107] In order to remove text detection frames with high overlap as much as possible, in practical applications, the NMS algorithm can be used to filter each file detection frame. The NMS algorithm is the Non-Maximum Suppression (NMS) algorithm, which is used to filter the final text detection frame.

[0108] For example, assuming that there are currently 6 text detection frames A, B, C, D, E, and F, the screening process for the text detection frames is as follows:

[0109] 1) Sort each text detection box according to the confidence score from small to large, and the sorted order is A, B, C, D, E, F.

[0110] 2) Starting from the file detection box F with the largest confidence score, determine whether the IOU of A to E with F is greater than a set threshold according to the location area of ​​each text detection box (the threshold setting is a hyperparameter and can be set based on actual needs. It will affect the final output result. In this embodiment, it is set to IOU>0.7);

[0111] 3) Assuming that the overlap between B, D and F exceeds the threshold, it can be considered that the traffic texts surrounded by B, D and F are the same traffic texts, so B and D can be removed; and the first text detection box F is marked.

[0112] 4) From the remaining text detection boxes A, C, and E, select the detection text box E with the largest confidence score, and determine the overlap between E and A and C, and remove the text detection boxes whose overlap between A and C is greater than the set threshold; and mark E as the second text detection box.

[0113] This cycle is repeated until the overlap between any two text detection frames is no greater than the set threshold; the text detection frames finally marked all belong to the text detection frames corresponding to the traffic text in the image to be identified, and finally the area where the traffic text is located can be identified.

[0114] Of course, in the above embodiment, the confidence score is used as the standard for removing redundant text detection frames. In practical applications, it does not exclude the use of geometric scores or other bases as standards for removing redundant text detection frames, which will not be elaborated in this application.

[0115] Based on the above discussion, it can be seen that the fine feature map is a feature map of traffic text extracted by the operation of the neural network obtained through deep learning; and the feature description vector is obtained by using the SIFT feature algorithm. In this embodiment, the SIFT feature algorithm and deep learning are combined to make the combined features more accurate, thereby improving the accuracy of the model.

[0116] After accurately determining the location area of ​​the traffic text in the image to be identified, the current conventional method of semantic recognition of text in images can be used to identify and interpret the semantics of the traffic text in the image to be identified. After obtaining the semantic meaning actually represented by the traffic text, it can be directly informed to the driver by voice broadcast or display screen, or it can be directly uploaded to the vehicle's navigation system, so that the navigation system can use the indication information of the traffic text to reasonably plan the driving route, thereby providing real-time and effective information data for the safe driving of the vehicle, which is conducive to improving the safety of vehicle driving.

[0117] To summarize, in this application, the backbone network model and SIFT feature algorithm obtained through learning and training are used to extract features of the image to be identified on the road where the vehicle is traveling, and the feature map and feature description vector in the image to be identified are obtained respectively. The fine feature map and feature description vector obtained after preliminary traffic text recognition on the feature map are fused, and finally the fused features are used as the feature data for identifying the area where the traffic text is located. To a certain extent, the accuracy of the recognition of the position of the traffic text in the image to be identified is guaranteed, and a reliable data basis is provided for further semantic recognition of the traffic text, which is beneficial to provide effective traffic instructions information for vehicle driving and improve the safety of vehicle driving.

[0118] Based on any of the above embodiments, in an optional embodiment of the present application, the process of constructing the above backbone network model may include:

[0119] Construct a convolutional neural network based on the FPN network and ResNet50 network;

[0120] Use convolutional neural network to extract features from sample images and obtain sample features;

[0121] Pass the sample features through the 1×1 convolution layer and the RBOX bounding box to obtain the predicted text position and predicted text score of the sample image;

[0122] The predicted text position and predicted text score are compared with the real text position and real text score of the sample image using the dice loss function, and the convolutional neural network is optimized based on the calculation results to obtain the backbone network model.

[0123] As mentioned above, for the image to be identified, it not only contains traffic text content, but also may contain advertising text, or other meaningless text for vehicle driving; even most of the images to be identified may not contain traffic signs, and therefore do not contain traffic text; in order to ensure that the feature map extracted by the backbone network operation can more accurately distinguish and filter out the feature map containing the traffic sign imaging area in the subsequent traffic text detection process. In the training process of the backbone network model, images containing traffic signs and images not containing traffic signs are first collected as sample images, and the text position and text score in the sample image are first calibrated, that is, the real text position and text score of the sample image are obtained, so that the accuracy of the backbone network model obtained by subsequent training can be used as a reference.

[0124] In the process of training and creating the backbone network model in this embodiment, a sample image is first input, and features are extracted through the convolutional network constructed by the FPN network and the ResNet50 network. After the extracted features are respectively passed through a 1×1 convolutional layer operation, the text position and text score are obtained through the RBOX bounding box, and the predicted text position and text score are calculated by the dice loss function to compare with the actual text position and the actual text score; obviously, if the predicted value and the actual value are very different, it means that the convolutional neural network constructed above is not accurate, and this result can be fed back to the convolutional network to change the structure of the convolutional network (such as the number of convolutional layers, the size of the convolution kernel and other parameters) so that the result of the next prediction is closer and closer to the actual result. After repeated optimization and iteration, a backbone network model that can accurately extract accurate features of traffic text can be finally obtained.

[0125] In this embodiment, the dice loss function is used instead of the class balance loss, the output prediction method of the RBOX bounding box is selected, the QUAD bounding box method in the source code is discarded, and the measurement of the output text box is reduced.

[0126] Based on the above discussion, the image to be identified in the above embodiment is obtained by real-time shooting during the actual driving of the vehicle; considering that the image to be identified is taken in real time during the actual driving of the vehicle, and the driving environment of the vehicle may be an environment with insufficient light brightness such as night environment, rainy weather, etc., accordingly, the clarity of the image to be identified obtained by shooting may also be affected to a certain extent. To this end, in an optional embodiment of the present application, after acquiring the image to be identified, it may further include:

[0127] Grayscale the image to be identified to obtain a grayscale image;

[0128] According to the gray value of each pixel in the gray image, determine whether the brightness of the image to be identified reaches the required brightness;

[0129] If not, the image enhancement operation is performed on the image to be identified through Gamma correction.

[0130] When determining whether the brightness of the image to be identified meets the required brightness, the image can be converted into a grayscale image first, and the root mean square (RMS) algorithm is used to calculate the root mean square value of the grayscale value of each pixel of the grayscale image, which can also be called the effective value, that is, the square, average and square root of the grayscale value of each pixel are taken in turn. If the root mean square value is less than the set threshold, the image to be identified is judged as having weak light and needs to be enhanced; if the root mean square value is greater than or equal to the set threshold, no enhancement is required.

[0131] It is understandable that if the brightness of the image to be identified reaches the required brightness, then obviously, there is no need to perform image enhancement operation on the image to be identified, and the feature operation of the backbone network model and the SIFT feature algorithm operation can be directly performed on the image to be identified.

[0132] For the image to be identified with insufficient brightness, after performing the image enhancement operation of Gamma correction, a light-enhanced image to be identified can be formed, and the feature operation of the backbone network model and the SIFT feature algorithm operation can be performed on the enhanced image to be identified.

[0133] There is often a power function relationship between the illumination in natural scenes and the grayscale value of the image. Gamma is the power of the power function. Gamma correction is to perform exponential operations on the colors of the image to obtain a recognizable accuracy that meets the characteristics of the human eye. It is usually used to enhance the details of the dark parts of the image and is a nonlinear transformation.

[0134] Gamma correction is achieved by the power law expression s = c·r γTo define, the power law expression can be simply interpreted as the output value s is equal to the input value r to the power of γ (that is, the Gamma value). Among them, c is a constant, the input value r and the output value s are both non-negative values, and γ is the Gamma value. According to the power law expression, when the Gamma value is equal to 1, the input image is not corrected, and the output value is equal to the input value; when the Gamma value is greater than 1, the output value is less than the input value. At this time, the contrast of the brighter part of the image is enhanced, the contrast of the darker part is weakened, and the grayscale value of the overall image becomes smaller; when the Gamma value is less than 1, the output value is greater than the input value. At this time, the contrast of the brighter part of the image is weakened, the contrast of the darker part is enhanced, and the grayscale value of the overall image becomes larger. From the above analysis, it can be seen that setting the Gamma value to less than 1 can achieve the purpose of enhancing images with weak light. For example, in this embodiment, the Gamma value can be set to 0.5 to make the overall brightness of the image more uniform and highlight the display of text in a gray background.

[0135] Based on any of the above embodiments, in an optional embodiment of the present application, the process of the traffic text recognition method can be as follows: Figure 2 As shown, firstly, the image to be identified is obtained by taking real-time images of the road surroundings during the driving process of the vehicle; then the brightness of the image to be identified is judged, if the brightness of the image to be identified is judged to be "bright", that is, the image to be identified meets the brightness requirement, on the contrary, if the brightness of the image to be identified is "dark", that is, the image to be identified does not meet the brightness requirement, then the image to be identified needs to be enhanced; the image to be identified with a brightness of "bright" or the image to be identified after image enhancement is subjected to feature extraction of the backbone network model to obtain a feature map; at the same time, the image to be identified with a brightness of "bright" or the image to be identified after image enhancement is subjected to SIFT feature algorithm operation to obtain a feature description vector. The feature map obtained by the operation of the above-mentioned backbone network model is operated by the text classification head to judge the text and non-text, and eliminate the non-text data; at the same time, the feature map obtained by the operation of the backbone network model is also subjected to a coarse detection operation, and the result of the coarse detection operation and the feature map are jointly subjected to a deformable convolution operation; the feature map is also subjected to the text classification head to eliminate non-text features to obtain the text features after elimination; the result of the deformable convolution operation and the text features are jointly subjected to fine detection to obtain a fine feature map; feature fusion is performed based on the fine feature map and the above-mentioned feature description vector, so that the traffic text can be detected and recognized.

[0136] In this embodiment, the brightness of the image to be identified is first judged. Gamma correction (power law transform) is used to enhance the image to be identified under low-light conditions. Deformable convolution is also used to extract features, so that the neural network can focus more on the text area of ​​interest, thereby improving the detection accuracy. In addition, the SIFT feature algorithm and the deep learning neural network are combined to make the merged features more accurate, thereby improving the recognition accuracy of traffic text.

[0137] The following is an introduction to a traffic text recognition device provided by an embodiment of the present invention. The traffic text recognition device described below and the traffic text recognition device described above can be referenced to each other.

[0138] Figure 3 The structural block diagram of the traffic text recognition device provided by the embodiment of the present invention is shown in FIG. Figure 3 The traffic text recognition device may include:

[0139] The first operation module 100 is used to perform feature operation on the image to be identified using the backbone network model to obtain a feature map; wherein the backbone network model is a model that has been pre-learned and trained and constructed by the FPN network and the ResNet50 network;

[0140] The second operation module 200 is used to perform SIFT feature algorithm operation on the image to be identified to obtain a feature description vector;

[0141] The third operation module 300 is used to detect and identify the area where the traffic text is located on the feature map, and obtain a fine feature map that marks the area where the traffic text is located;

[0142] A fourth operation module 400 is used to perform feature fusion on the fine feature map and the feature description vector to obtain a fused feature;

[0143] The text recognition module 500 is used to detect and identify the area where the traffic text is located based on the fused features, and determine the location area where the traffic text is located in the image to be recognized, so as to perform semantic recognition on the traffic text in the location area.

[0144] In an optional embodiment of the present application, the third operation module 300 specifically includes:

[0145] A text elimination unit, used for eliminating non-text features from the feature graph to obtain text features;

[0146] A coarse detection unit, used to perform coarse text frame detection on the feature map to obtain a coarse detection frame of the area where the text is located in the feature map;

[0147] A deformable convolution unit, used for performing a deformable convolution operation on the coarse detection frame and the feature map to obtain a detection frame;

[0148] The fine detection unit is used to perform fine detection operation on the text feature and the detection frame to obtain a fine feature map.

[0149] In an optional embodiment of the present application, the text removal unit is specifically used to sequentially operate the feature map through a first 1×1 convolution layer, a scale normalization layer, a first activation layer, a second 1×1 convolution layer, and a second activation layer in a text classification head to generate a text classification score map; features in the text classification score map whose scores are less than a preset threshold are removed as non-text features, and features whose scores are not less than the preset threshold are obtained as text features.

[0150] In an optional embodiment of the present application, the coarse detection unit is specifically used to perform a coarse detection operation on the feature map through a 3×3 convolution layer, a scale normalization layer, an activation layer, and a 1×1 convolution layer in a coarse detection model in sequence to obtain a coarse detection frame;

[0151] The fine detection unit is specifically used to perform fine detection operations on the text features and the detection frame in sequence through a 3×3 convolution layer, a scale normalization layer, an activation layer, and a 1×1 convolution layer in a fine detection model to obtain a fine feature map.

[0152] In an optional embodiment of the present application, the text recognition module 500 specifically includes:

[0153] A text box detection unit, used to detect and identify the area where the traffic text is located based on the fusion features to obtain multiple text detection boxes;

[0154] A text box elimination unit, used to eliminate the text detection box with the smallest confidence score from any two text detection boxes whose overlap is greater than a preset overlap; wherein the confidence score is the probability that the text in the file detection box is a traffic text;

[0155] The position determination unit is used to use the area where each of the text detection frames after being eliminated is located as the location area where the traffic text in the image to be identified is located.

[0156] In an optional embodiment of the present application, it also includes a model training module for constructing a convolutional neural network based on the FPN network and the ResNet50 network; using the convolutional neural network to extract features of the sample image to obtain sample features; passing the sample features through a 1×1 convolutional layer and an RBOX bounding box respectively to obtain a predicted text position and a predicted text score of the sample image; using a dice loss function to perform an error loss operation on the predicted text position and the predicted text score and the actual text position and the actual text score of the sample image, and optimizing the convolutional neural network according to the operation results to obtain the backbone network.

[0157] In an optional embodiment of the present application, it also includes a brightness recognition module, which is used to grayscale the image to be identified to obtain a grayscale image before using the backbone network model to perform feature operations on the image to be identified to obtain a feature map, and before using the SIFT feature algorithm to operate the image to be identified to obtain a feature description vector; determine whether the brightness of the image to be identified meets the required brightness according to the grayscale value of each pixel in the grayscale image; if not, perform image enhancement operation on the image to be identified through Gamma correction; according to the image to be identified after the enhancement operation, perform the steps of using the backbone network model to perform feature operations on the image to be identified to obtain a feature map, and use the SIFT feature algorithm to operate the image to be identified to obtain a feature description vector.

[0158] The traffic text recognition device of this embodiment is used to implement the aforementioned traffic text recognition method. Therefore, the specific implementation of the traffic text recognition device can be found in the embodiment of the traffic text recognition method in the above text, and will not be repeated here.

[0159] The present application also provides a traffic text recognition device, comprising:

[0160] Memory for storing computer programs;

[0161] A processor is used to execute the computer program to implement the steps of the traffic text recognition method as described in any one of the above items.

[0162] The steps of the traffic text recognition method performed by the processor may include:

[0163] Using the backbone network model to perform feature operations on the image to be identified to obtain a feature map; wherein the backbone network model is a model that has been pre-learned and trained and constructed by the FPN network and the ResNet50 network;

[0164] Performing SIFT feature algorithm operation on the image to be identified to obtain a feature description vector;

[0165] Detecting and identifying the area where the traffic text is located on the feature map to obtain a fine feature map marking the area where the traffic text is located;

[0166] Performing feature fusion on the fine feature map and the feature description vector to obtain a fused feature;

[0167] The fused features are used to detect and identify the area where the traffic text is located, and the location area where the traffic text is located in the image to be identified is determined, so as to perform semantic recognition on the traffic text in the location area.

[0168] The present application also provides a computer-readable storage medium, which is used to store a computer program. The computer program is executed by a processor to implement the steps of the traffic text recognition method as described in any one of the above items.

[0169] The computer-readable storage medium may be a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the technical field.

[0170] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or equipment that includes a series of elements are inherent to the elements. In the absence of more restrictions, the elements limited by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or equipment that includes the elements. In addition, the above-mentioned technical solution provided in the embodiment of the present application is consistent with the corresponding technical solution in the prior art in principle, and the part is not described in detail, so as not to repeat too much.

[0171] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core ideas of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made to the present invention without departing from the principles of the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.

Claims

1. A traffic text recognition method, characterized in that: include: Using the backbone network model to perform feature operations on the image to be identified to obtain a feature map; wherein the backbone network model is a model that has been pre-learned and trained and constructed by the FPN network and the ResNet50 network; Performing SIFT feature algorithm operation on the image to be identified to obtain a feature description vector; Detecting and identifying the area where the traffic text is located on the feature map to obtain a fine feature map marking the area where the traffic text is located; Performing feature fusion on the fine feature map and the feature description vector to obtain a fused feature; Detecting and identifying the area where the traffic text is located on the fused features, and determining the location area where the traffic text is located in the image to be identified, so as to perform semantic recognition on the traffic text in the location area; Detecting and identifying the area where the traffic text is located on the feature map to obtain a fine feature map marking the area where the traffic text is located, including: Eliminating non-text features from the feature graph to obtain text features; Performing a rough text frame detection on the feature map to obtain a rough detection frame of the area where the text is located in the feature map; Performing a deformable convolution operation on the coarse detection frame and the feature map to obtain a detection frame; Performing a fine detection operation on the text feature and the detection frame to obtain a fine feature map; Eliminating non-text features from the feature graph to obtain text features includes: The feature map is sequentially operated through the first 1×1 convolution layer, the scale normalization layer, the first activation layer, the second 1×1 convolution layer, and the second activation layer in the text classification head to generate a text classification score map; The features with scores less than a preset threshold in the text classification score graph are removed as non-text features, and the features with scores not less than the preset threshold are obtained as text features; Performing a rough text frame detection on the feature map to obtain a rough detection frame of the area where the text is located in the feature map includes: The feature map is sequentially subjected to a coarse detection operation through a 3×3 convolutional layer, a scale normalization layer, an activation layer, and a 1×1 convolutional layer in a coarse detection model to obtain a coarse detection frame; Performing a fine detection operation on the text feature and the detection frame together to obtain a fine feature map, including: The text features and the detection frame are sequentially subjected to fine detection operations through a 3×3 convolutional layer, a scale normalization layer, an activation layer, and a 1×1 convolutional layer in a fine detection model to obtain a fine feature map.

2. The traffic text recognition method according to claim 1, characterized in that: Detecting and identifying the area where the traffic text is located on the fusion feature to determine the area where the traffic text is located in the image to be identified, including: Detect and identify the area where the traffic text is located on the fused features to obtain multiple text detection frames; Eliminate the text detection frame with a smaller confidence score from any two text detection frames whose overlap is greater than a preset overlap; wherein the confidence score is the probability that the text in the text detection frame is a traffic text; The area where each of the removed text detection frames is located is used as the area where the traffic text is located in the image to be recognized.

3. The traffic text recognition method according to claim 1, characterized in that: The construction process of the backbone network model includes: Construct a convolutional neural network based on the FPN network and ResNet50 network; Using the convolutional neural network to extract features from the sample image to obtain sample features; Pass the sample features through a 1×1 convolutional layer and an RBOX bounding box respectively to obtain a predicted text position and a predicted text score of the sample image; The predicted text position and the predicted text score are subjected to an error loss operation with the real text position and the real text score of the sample image using a dice loss function, and the convolutional neural network is optimized according to the operation result to obtain the backbone network model.

4. The traffic text recognition method according to any one of claims 1 to 3, characterized in that: Before performing feature operation on the image to be identified by using the backbone network model to obtain a feature map and performing SIFT feature algorithm operation on the image to be identified to obtain a feature description vector, the method further includes: Grayscale the image to be identified to obtain a grayscale image; Determining whether the brightness of the image to be identified reaches the required brightness according to the grayscale value of each pixel in the grayscale image; If not, performing image enhancement operation on the image to be identified through Gamma correction; According to the image to be identified after the enhancement operation, the steps of performing feature operation on the image to be identified using the backbone network model to obtain a feature map, performing SIFT feature algorithm operation on the image to be identified, and obtaining a feature description vector are performed.

5. A traffic text recognition device, characterized in that: include: A first operation module is used to perform feature operation on the image to be identified using a backbone network model to obtain a feature map; wherein the backbone network model is a model that has been pre-learned and trained and constructed by the FPN network and the ResNet50 network; The second operation module is used to perform SIFT feature algorithm operation on the image to be identified to obtain a feature description vector; The third operation module is used to detect and identify the area where the traffic text is located on the feature map, and obtain a fine feature map that marks the area where the traffic text is located; A fourth operation module, used for performing feature fusion on the fine feature map and the feature description vector to obtain a fused feature; A text recognition module, used to detect and identify the area where the traffic text is located based on the fusion features, and determine the location area where the traffic text is located in the image to be recognized, so as to perform semantic recognition on the traffic text in the location area; The third operation module specifically includes: A text elimination unit, used for eliminating non-text features from the feature graph to obtain text features; A coarse detection unit, used to perform coarse text frame detection on the feature map to obtain a coarse detection frame of the area where the text is located in the feature map; A deformable convolution unit, used for performing a deformable convolution operation on the coarse detection frame and the feature map to obtain a detection frame; A fine detection unit, used for performing a fine detection operation on the text feature and the detection frame to obtain a fine feature map; The text elimination unit is specifically used to sequentially operate the feature map through the first 1×1 convolution layer, the scale normalization layer, the first activation layer, the second 1×1 convolution layer, and the second activation layer in the text classification head to generate a text classification score map; the features with scores less than a preset threshold in the text classification score map are eliminated as non-text features, and the features with scores not less than the preset threshold are obtained as text features; The coarse detection unit is specifically used to perform coarse detection operations on the feature map in sequence through a 3×3 convolution layer, a scale normalization layer, an activation layer, and a 1×1 convolution layer in the coarse detection model to obtain a coarse detection frame; The fine detection unit is specifically used to perform fine detection operations on the text features and the detection frame in sequence through a 3×3 convolution layer, a scale normalization layer, an activation layer, and a 1×1 convolution layer in a fine detection model to obtain a fine feature map.

6. A traffic text recognition device, characterized in that: include: Memory for storing computer programs; A processor is used to execute the computer program to implement the steps of the traffic text recognition method as described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and the computer program is executed by a processor to implement the steps of the traffic text recognition method according to any one of claims 1 to 4.