Traffic sign recognition model training method, traffic sign recognition method and equipment
By integrating the convolution DCNv2 module and small object detection layer in the traffic sign recognition model, the identification accuracy and speed problems of traditional traffic sign recognition technology under complex conditions are solved, and more efficient and accurate traffic sign recognition is achieved.
Patent Information
- Application Number
- CN202411568542.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-02-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional traffic sign recognition technology has slow recognition speed and low accuracy under conditions such as image occlusion, blur, rain and fog weather, making it difficult to meet the needs of modern intelligent transportation systems for real-time and accurate identification.
By obtaining the historical traffic sign data set, it is divided into training set, verification set and test set, and using the object detection model (including the C2F layer and the small object detection layer, and the integrated convolution DCNv2 module in the C2F layer) for model training and parameter adjustment until the preset training conditions are met, the trained traffic sign recognition model is obtained.
The accuracy and speed of traffic sign recognition are improved, the model's adaptability to deformation targets and complex backgrounds, and the detection accuracy of small targets are enhanced, thereby achieving accurate identification of traffic signs.
Smart Images

Figure CN119540915A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent transportation technology, and in particular to a traffic sign recognition model training method, a traffic sign recognition method and a traffic sign recognition device. Background Art
[0002] In the development of modern intelligent transportation systems, traffic sign recognition technology is a vital part of autonomous driving, assisted driving and traffic monitoring systems. As an important tool for transmitting road information, traffic signs play a key role in the driving safety of drivers and the orderly management of road traffic. Accurate and real-time recognition of traffic signs is of great significance for improving the vehicle's autonomous driving capabilities, optimizing traffic flow and reducing traffic accidents.
[0003] Traditional traffic sign recognition mainly relies on human eye recognition, vehicle-mounted camera recognition, etc. Since traffic signs occupy a small proportion in the image and the background is complex, the practical application has high requirements for real-time detection, which poses a great challenge to traffic sign detection. However, the traditional method essentially relies on acquiring images and then comparing and verifying them, which is slow. In addition, when there is image occlusion and blur or poor visibility (rainy and foggy weather), there are problems of slow recognition speed and low accuracy. Summary of the invention
[0004] The embodiments of the present invention provide a traffic sign recognition model training method, a traffic sign recognition method, an apparatus, a computer device and a storage medium to improve the accuracy of traffic sign recognition.
[0005] In order to solve the above technical problems, the present application embodiment provides a traffic sign recognition model training method, including:
[0006] Acquire a historical traffic sign dataset, and divide the historical traffic sign dataset into a training set, a validation set, and a test set;
[0007] Inputting the training set and the verification set into an initial traffic sign recognition model for recognition training, wherein the initial traffic sign recognition model is a target detection model, wherein the target detection model includes a C2F layer and a small target detection layer, and a convolutional DCNv2 module is integrated in the C2F layer;
[0008] Adjusting the model parameters of the initial traffic sign recognition model according to the training results until a preset training condition is met to obtain a trained traffic sign recognition model;
[0009] A test set is used to perform a performance test and evaluation on the trained traffic sign recognition model. If the evaluation result exceeds a preset threshold, the trained traffic sign recognition model is used as a target traffic sign recognition model.
[0010] Optionally, the convolutional DCNv2 module includes two Conv modules, one Split module, and three Bottleneck_dcnv2 modules; C2f_DCNv2 is connected in sequence according to the Conv module, the Split module, the three Bottleneck_dcnv2 modules, and the Conv module.
[0011] Optionally, the convolutional DCNv2 module expression is as follows:
[0012]
[0013] Among them, w is the convolution kernel, p k is the position of each convolution kernel, K is the number of sampling positions of the convolution kernel, Δp k and Δm k are the learned offset and modulation scalar of the kth position, respectively.
[0014] Optionally, the small target detection layer includes four detection heads, and the detection heads are used to perform feature detection and extraction on high-resolution feature maps.
[0015] Optionally, the loss function of the target detection model is MPDIoU, and the loss function MPDIoU uses the following formula to minimize the distance between the key points of the predicted box and the real box to calculate the IoU:
[0016]
[0017] Among them, A and B represent the predicted bounding box and the real bounding box, Represent the coordinates of the upper left and lower right points of the prediction box respectively. Represent the coordinates of the upper left and lower right points of the real box respectively, and is the square of the distance between the upper left point and the lower right point between the predicted bounding box and the true bounding box, and ω and h represent the width and height of the predicted bounding box and the true bounding box, respectively.
[0018] In order to solve the above technical problems, the present application provides a traffic sign recognition method, including:
[0019] Collecting traffic sign images to be identified;
[0020] The traffic sign image to be recognized is input into a target traffic sign recognition model for recognition to obtain a recognition result.
[0021] In order to solve the above technical problems, the embodiment of the present application further provides a traffic sign recognition model training device, comprising:
[0022] An acquisition module, used to acquire a historical traffic sign dataset, and divide the historical traffic sign dataset into a training set, a validation set, and a test set;
[0023] An input module, used for inputting the training set and the verification set into an initial traffic sign recognition model for recognition training, wherein the initial traffic sign recognition model is a target detection model, wherein the target detection model includes a C2F layer and a small target detection layer, and a convolutional DCNv2 module is integrated in the C2F layer;
[0024] A training module, used to adjust the model parameters of the initial traffic sign recognition model according to the training results until the preset training conditions are met to obtain a trained traffic sign recognition model;
[0025] The evaluation module is used to use a test set to perform performance test evaluation on the trained traffic sign recognition model. If the evaluation result exceeds a preset threshold, the trained traffic sign recognition model is used as a target traffic sign recognition model.
[0026] In order to solve the above technical problems, the embodiment of the present application further provides a traffic sign recognition device, comprising:
[0027] An acquisition module, used for acquiring traffic sign images to be identified;
[0028] The recognition module is used to input the traffic sign image to be recognized into the target traffic sign recognition model for recognition to obtain a recognition result.
[0029] In order to solve the above technical problems, an embodiment of the present application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above traffic sign recognition model training method when executing the computer program, or implements the steps of the above traffic sign recognition method when executing the computer program.
[0030] In order to solve the above technical problems, an embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the above-mentioned traffic sign recognition model training method, or when the computer program is executed by a processor, it implements the steps of the above-mentioned traffic sign recognition method.
[0031] The traffic sign recognition model training method, traffic sign recognition method, device, computer equipment and storage medium provided by the embodiment of the present invention obtain a historical traffic sign data set and divide the historical traffic sign data set into a training set, a verification set and a test set; input the training set and the verification set into the initial traffic sign recognition model for recognition training, and the initial traffic sign recognition model is a target detection model, wherein the target detection model includes a C2F layer and a small target detection layer, and the C2F layer integrates a convolutional DCNv2 module; adjust the model parameters of the initial traffic sign recognition model according to the training results until the preset training conditions are met to obtain a trained traffic sign recognition model; use the test set to perform performance test evaluation on the trained traffic sign recognition model, and if the evaluation result exceeds the preset threshold, the trained traffic sign recognition model is used as the target traffic sign recognition model. By integrating the DCNv2 module in the C2F layer, the adaptability of the model to deformed targets and complex backgrounds is enhanced, and a small target detection layer is added to the model to enhance the detection capability of the model to small targets and improve the detection accuracy of small targets. Thereby, the accuracy of the model in traffic sign recognition is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0033] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0034] Figure 2 is a flow chart of an embodiment of a traffic sign recognition model training method of the present application;
[0035] Figure 3 is a flow chart of an embodiment of a traffic sign recognition method of the present application;
[0036] Figure 4 is a structural schematic diagram of an embodiment of a traffic sign recognition model training device according to the present application;
[0037] Figure 5 is a schematic structural diagram of an embodiment of a traffic sign recognition device according to the present application;
[0038] Figure 6 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0039] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0040] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0041] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0042] See also Figure 1 ,like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0043] Users can use terminal devices 101 , 102 , 103 to interact with server 105 via network 104 to receive or send messages, etc.
[0044] Terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, desktop computers, etc.
[0045] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .
[0046] It should be noted that the traffic sign recognition model training method provided in the embodiment of the present application is executed by a server, and accordingly, the traffic sign recognition model training device is arranged in the server.
[0047] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. According to the implementation requirements, there may be any number of terminal devices, networks and servers. The terminal devices 101, 102, 103 in the embodiment of the present application may specifically correspond to application systems in actual production.
[0048] See also Figure 2 , Figure 2 A traffic sign recognition model training method provided by an embodiment of the present invention is shown, and the method is applied in Figure 1 The server in is used as an example to illustrate the details as follows:
[0049] S201: Obtain a historical traffic sign dataset, and divide the historical traffic sign dataset into a training set, a validation set, and a test set.
[0050] Preferably, the ratio of the training set, the validation set and the test set of the historical traffic sign dataset is 7:2:1.
[0051] Specifically, the dataset used in this embodiment is the public dataset TT100K, which contains 100,000 traffic images, including about 30,000 images of traffic signs, and the resolution of each image is 2048×2048. Since there are many types of traffic signs in the dataset, many categories of traffic signs appear less than 10 times in the entire dataset. In order to maintain the balance of the data, this embodiment selects 9170 images of the 45 most frequently appearing traffic sign categories in the dataset, and divides the dataset into training set, validation set and test set in a ratio of 7:2:1 for subsequent experiments.
[0052] In this embodiment, the data set follows the annotation specification of the COCO data set, and its annotation information is saved in JSON format. The data set format for YOLOv8 training must also be in YOLO format, and the Python scripts written for data processing are all implemented in accordance with the VOC format. Therefore, before the experiment begins, the data set format used in this article needs to be converted to VOC format first, and then the VOC format is changed to YOLO format using a python script to ensure that the improved model can correctly perform subsequent experiments.
[0053] S202: Input the training set and the validation set into the initial traffic sign recognition model for recognition training. The initial traffic sign recognition model is a target detection model. The target detection model includes a C2F layer and a small target detection layer. The C2F layer integrates a convolutional DCNv2 module.
[0054] Specifically, the target detection model in this embodiment is a YOLO model. Preferably, this embodiment adopts a YOLOv8 model. At the same time, this embodiment also introduces a deformable convolution DCNv2. The deformable convolution can adapt to the deformation of the target by learning the shape and position of the convolution kernel, which enables the model to better handle targets of different shapes and improve the accuracy of detection. According to the characteristics, a C2f_DCNv2 module is constructed, and the DCNv2 module is integrated in the C2f layer, which can enhance the feature extraction capability of the layer, especially the detection capability of deformed targets. The C2f_DCNv2 module replaces the C2f module of the ninth layer of Backbone in the original yolov8 model.
[0055] Optionally, the convolutional DCNv2 module includes two Conv modules, one Split module, and three Bottleneck_dcnv2 modules; C2f_DCNv2 is connected in sequence according to the Conv module, the Split module, the three Bottleneck_dcnv2 modules, and the Conv module.
[0056] Furthermore, the DCNv2 module unit takes a tensor as input. After a 1×1 convolution Conv, Split splits the output of Conv into two equal parts by channel. One part is directly input into Concat, and the other enters the first Bottleneck_dcnv2 module. Then the output ends of the three Bottleneck_dcnv2 modules are input into Concat for channel splicing and then input into the last Conv module. The output end of the last Conv module is used as the output end of the C2f_DCNv2 module.
[0057] The DCNv2 module replaces the C2f module in the ninth layer of the original YOLOv8 model to obtain an improved model that introduces variable convolution.
[0058] Optionally, the convolutional DCNv2 module expression is as follows:
[0059]
[0060] Among them, w is the convolution kernel, p k is the position of each convolution kernel, K is the number of sampling positions of the convolution kernel, Δp k and Δm k are the learned offset and modulation scalar of the kth position, respectively.
[0061] Optionally, the small target detection layer includes four detection heads, which are used to perform feature detection and extraction on high-resolution feature maps.
[0062] Specifically, since the downsampling multiple of YOLOv8 is large and the input size of the small target sample is small, it is difficult for the deeper feature map to obtain the feature information of the small target, so the original YOLOv8 original model has poor detection ability for small targets. Since the original YOLOv8 model is not effective in processing small targets, this embodiment introduces a small target detection head on the basis of the original YOLOv8, and the added small target detection layer can make the target to be detected be detected on a high-resolution feature map. After adding an additional detection head, it is possible to further detect smaller targets, especially long-distance, small or obscured targets (such as traffic signs, faces, etc.), improve the model's detail recognition ability on high-resolution feature maps, and the newly added small target detection layer can be detected on high-resolution feature maps, so more detail information can be retained. In this way, the model can extract and detect small targets on high-resolution feature maps, avoiding the loss of information of small targets during downsampling.
[0063] It should be noted that the original YOLOv8 model does not work well when processing small objects, because the resolution of the feature map may become lower after multiple layers of convolution, resulting in the loss of information about small objects. After adding the small object detection layer, the model will have four prediction heads. By adding the small object detection layer, the model's detection performance for small objects can be improved without significantly increasing the computational cost.
[0064] In a specific example of this embodiment, a small target detection layer with a resolution of 160×160 is added to the original YOLOv8 network, and an additional detection head is introduced. After adding the small target detection layer, the model will have four detection heads. By adding the small target detection layer, the model's detection performance for small targets can be improved without significantly increasing the computational cost, so that the model can show higher accuracy and stability in dealing with complex and dynamic multi-scale target detection tasks, especially in small target detection scenarios. It has higher practicality and adaptability.
[0065] Optionally, the loss function of the target detection model is MPDIoU, and the loss function MPDIoU uses the following formula to minimize the distance between the key points of the predicted box and the real box to calculate the IoU:
[0066]
[0067] Among them, A and B represent the predicted bounding box and the real bounding box, Represent the coordinates of the upper left and lower right points of the prediction box respectively. Represent the coordinates of the upper left and lower right points of the real box respectively, and is the square of the distance between the upper left point and the lower right point between the predicted bounding box and the true bounding box, and ω and h represent the width and height of the predicted bounding box and the true bounding box, respectively.
[0068] In this embodiment, the loss function is modified to MPDIoU. The MPDIoU loss function calculates the IoU by minimizing the distance between the key points of the predicted box and the true box, which effectively solves the problem that the loss function used by the original YOLOv8 cannot effectively solve the problem that the real box and the predicted box have the same aspect ratio but different height-to-width ratios.
[0069] S203: adjusting model parameters of the initial traffic sign recognition model according to the training results until a preset training condition is met to obtain a trained traffic sign recognition model.
[0070] S204: Using the test set to perform performance test evaluation on the trained traffic sign recognition model. If the evaluation result exceeds a preset threshold, the trained traffic sign recognition model is used as a target traffic sign recognition model.
[0071] This example uses precision P (Precious), recall R (Recall) and mean average precision mAP (meanAverage Precision) to evaluate performance. The specific formula is as follows:
[0072]
[0073] Among them, TP stands for true positive, which is the positive sample correctly detected by the model (that is, the sample that is actually positive and predicted by the model as positive), FP stands for false positive, which is the sample that is incorrectly detected as positive by the model (that is, the sample that is actually negative but predicted by the model as positive), and FN stands for false positive, which is the positive sample that the model fails to detect (that is, the sample that is actually positive but predicted by the model as negative).
[0074] The training results of the target traffic sign recognition model of this embodiment are compared with the original network without improvement. The results show that the target traffic sign recognition model of this embodiment has better accuracy in traffic sign detection. The results are shown in Table 1.
[0075] Table 1
[0076]
[0077]
[0078] According to the above table, the accuracy of this embodiment increased by 0.6 percentage points after the introduction of the variable convolution DCNv2 compared with the original YOLOv8 network. After adding the small target detection layer on this basis, the accuracy continued to increase by 1.4 percentage points. Finally, after the loss function MPDIoU was introduced, the accuracy continued to increase by 0.9 percentage points. The improved model has a significant effect of increasing the accuracy by 2.9 percentage points compared with the original model.
[0079] In this embodiment, a historical traffic sign data set is obtained, and the historical traffic sign data set is divided into a training set, a validation set, and a test set; the training set and the validation set are input into the initial traffic sign recognition model for recognition training, and the initial traffic sign recognition model is a target detection model, wherein the target detection model includes a C2F layer and a small target detection layer, and a convolutional DCNv2 module is integrated in the C2F layer; the model parameters of the initial traffic sign recognition model are adjusted according to the training results until the preset training conditions are met to obtain a trained traffic sign recognition model; the performance test and evaluation of the trained traffic sign recognition model is performed using a test set, and if the evaluation result exceeds a preset threshold, the trained traffic sign recognition model is used as the target traffic sign recognition model. By integrating the DCNv2 module in the C2F layer, the adaptability of the model to deformed targets and complex backgrounds is enhanced, and a small target detection layer is added to the model to enhance the model's detection capability for small targets and improve the detection accuracy of small targets. Thus, the accuracy of the model in traffic sign recognition is achieved.
[0080] See also Figure 3 , Figure 3 A traffic sign recognition method provided by an embodiment of the present invention is shown. Figure 1 The server in is used as an example to illustrate the details as follows:
[0081] S205: Collecting traffic sign images to be identified.
[0082] S205: Inputting the traffic sign image to be recognized into the target traffic sign recognition model for recognition, and obtaining a recognition result.
[0083] In this embodiment, the traffic sign image to be identified is quickly identified by using the trained target traffic sign recognition model, thereby improving the recognition speed of the traffic sign image.
[0084] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0085] Figure 4 The principle block diagram of the traffic sign recognition model training device corresponding to the traffic sign recognition model training method in the above embodiment is shown. Figure 4 As shown, the traffic sign recognition model training device includes an acquisition module 31, an input module 32, a training module 33, and an evaluation module 34. The functional modules are described in detail as follows:
[0086] An acquisition module 31 is used to acquire a historical traffic sign dataset and divide the historical traffic sign dataset into a training set, a validation set and a test set;
[0087] An input module 32, used to input the training set and the verification set into the initial traffic sign recognition model for recognition training, where the initial traffic sign recognition model is a target detection model, wherein the target detection model includes a C2F layer and a small target detection layer, and the C2F layer integrates a convolutional DCNv2 module;
[0088] A training module 33 is used to adjust the model parameters of the initial traffic sign recognition model according to the training results until the preset training conditions are met to obtain a trained traffic sign recognition model;
[0089] The evaluation module 34 is used to perform performance test evaluation on the trained traffic sign recognition model using a test set. If the evaluation result exceeds a preset threshold, the trained traffic sign recognition model is used as a target traffic sign recognition model.
[0090] Figure 5 FIG. 2 is a block diagram showing a functional block diagram of a traffic sign recognition device corresponding to the traffic sign recognition method in the above embodiment. Figure 5 As shown, the traffic sign recognition device includes a collection module 35 and a recognition module 36. The functional modules are described in detail as follows:
[0091] A collection module 35, used for collecting traffic sign images to be identified;
[0092] The recognition module 36 is used to input the traffic sign image to be recognized into the target traffic sign recognition model for recognition to obtain a recognition result.
[0093] For the specific definition of the traffic sign recognition model training device, please refer to the definition of the traffic sign recognition model training method above, which will not be repeated here. The various modules in the above-mentioned traffic sign recognition model training device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0094] To solve the above technical problems, the present application also provides a computer device. Figure 6 , Figure 6 This is a basic structural block diagram of the computer device in this embodiment.
[0095] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components connected to the memory 41, the processor 42, and the network interface 43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.
[0096] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0097] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or D interface display memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk equipped on the computer device 4, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as the program code of the traffic sign recognition model training method, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.
[0098] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run the program code stored in the memory 41 or process data, such as running the program code of the traffic sign recognition model training method.
[0099] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0100] The present application also provides another implementation, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores an interface display program, and the interface display program can be executed by at least one processor so that the at least one processor performs the steps of the traffic sign recognition model training method as described above.
[0101] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0102] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to replace some of the technical features therein with equivalents. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A traffic sign recognition model training method, characterized in that: include: Acquire a historical traffic sign dataset, and divide the historical traffic sign dataset into a training set, a validation set, and a test set; Inputting the training set and the verification set into an initial traffic sign recognition model for recognition training, wherein the initial traffic sign recognition model is a target detection model, wherein the target detection model includes a C2F layer and a small target detection layer, and a convolutional DCNv2 module is integrated in the C2F layer; Adjusting the model parameters of the initial traffic sign recognition model according to the training results until a preset training condition is met to obtain a trained traffic sign recognition model; A test set is used to perform a performance test and evaluation on the trained traffic sign recognition model. If the evaluation result exceeds a preset threshold, the trained traffic sign recognition model is used as a target traffic sign recognition model.
2. The traffic sign recognition model training method according to claim 1, characterized in that: The convolutional DCNv2 module includes two Conv modules, one Split module, and three Bottleneck_dcnv2 modules; C2f_DCNv2 is connected in sequence according to the Conv module, the Split module, the three Bottleneck_dcnv2 modules, and the Conv module.
3. The traffic sign recognition model training method according to claim 1, characterized in that: The convolutional DCNv2 module expression is as follows: Among them, w is the convolution kernel, p k is the position of each convolution kernel, K is the number of sampling positions of the convolution kernel, Δp k and Δm k are the learned offset and modulation scalar of the kth position, respectively.
4. The traffic sign recognition model training method according to claim 1, characterized in that: The small target detection layer includes four detection heads, and the detection heads are used to perform feature detection and extraction on high-resolution feature maps.
5. The traffic sign recognition model training method according to claim 1, characterized in that: The loss function of the target detection model is MPDIoU, which uses the following formula to minimize the distance between the key points of the predicted box and the real box to calculate IoU: Among them, A and B represent the predicted bounding box and the real bounding box, Represent the coordinates of the upper left and lower right points of the prediction box respectively. Represent the coordinates of the upper left and lower right points of the real box respectively, and is the square of the distance between the upper left point and the lower right point between the predicted bounding box and the true bounding box, and ω and h represent the width and height of the predicted bounding box and the true bounding box, respectively.
6. A traffic sign recognition method, characterized in that: include: Collecting traffic sign images to be identified; The traffic sign image to be recognized is input into a target traffic sign recognition model for recognition to obtain a recognition result, wherein the target traffic sign recognition model is trained according to the traffic sign recognition model training method according to any one of claims 1 to 5.
7. A traffic sign recognition model training device, characterized in that: include: An acquisition module, used to acquire a historical traffic sign dataset, and divide the historical traffic sign dataset into a training set, a validation set, and a test set; An input module, used for inputting the training set and the verification set into an initial traffic sign recognition model for recognition training, wherein the initial traffic sign recognition model is a target detection model, wherein the target detection model includes a C2F layer and a small target detection layer, and a convolutional DCNv2 module is integrated in the C2F layer; A training module, used to adjust the model parameters of the initial traffic sign recognition model according to the training results until the preset training conditions are met to obtain a trained traffic sign recognition model; The evaluation module is used to use a test set to perform performance test evaluation on the trained traffic sign recognition model. If the evaluation result exceeds a preset threshold, the trained traffic sign recognition model is used as a target traffic sign recognition model.
8. A traffic sign recognition device, characterized in that: include: An acquisition module, used for acquiring traffic sign images to be identified; The recognition module is used to input the traffic sign image to be recognized into a target traffic sign recognition model for recognition to obtain a recognition result, wherein the target traffic sign recognition model is trained according to the traffic sign recognition model training method according to any one of claims 1 to 5.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the traffic sign recognition model training method as described in any one of claims 1 to 5 is implemented, or when the processor executes the computer program, the traffic sign recognition method as described in claim 6 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it implements the traffic sign recognition model training method as described in any one of claims 1 to 5, or, when the computer program is executed by a processor, it implements the traffic sign recognition method as described in claim 6.
Citation Information
Patent Citations
High body seriola quinqueradiata detection method based on YOLOv8 network structure
CN118279935A
Sewage biological phase target automatic identification detection and instance segmentation method
CN118351535A
Small target detection method and device and terminal equipment
CN118397253A
Temporary traffic sign detection method for auxiliary driving
CN118537839A