Training method, identification method and system of traffic scene identification model

Through deep multi-scale feature extraction technology, combined with deep attention and local feature representation, the problem of low accuracy and efficiency in traffic scene recognition in traditional semantic segmentation methods is solved, and more efficient traffic scene recognition is achieved.

CN119048752APending Publication Date: 2024-11-29CHINA FAW CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411065783.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-05
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

The traditional semantic segmentation method has poor accuracy in image segmentation results in traffic scene image recognition and requires a long time to segment.

Method used

A training method for traffic scene recognition model is proposed. By obtaining traffic scene data sets for preprocessing and feature extraction, deep multi-scale feature extraction technology is adopted, including the fusion of deep attention feature representation, local feature representation and global feature representation, to Improve the accuracy and efficiency of image segmentation.

Benefits of technology

The accuracy of image segmentation results of traffic scene recognition model is improved, the time required for image segmentation is reduced, and feature extraction ability and learning efficiency are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119048752A_ABST
    Figure CN119048752A_ABST
Patent Text Reader

Abstract

The invention provides a traffic scene recognition model training method, recognition method and system, and the method comprises the steps: obtaining a traffic scene data set, and carrying out the preprocessing of the traffic scene data set, and obtaining a traffic scene training set; performing feature extraction on the traffic scene training set to obtain a traffic scene feature set; performing deep multi-scale feature extraction on the traffic scene feature set to obtain deep attention feature representation, local feature representation and global feature representation; according to the traffic scene feature set, performing feature fusion on the deep attention feature representation, the local feature representation and the global feature representation to obtain a fusion data set; and according to the fused data set, performing parameter updating on the initialized traffic scene recognition model to obtain a trained traffic scene recognition model. According to the training method, a traffic scene recognition model can be provided, the precision of an image segmentation result is relatively high, and the time required by image segmentation is relatively short. The invention relates to the technical field of image recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image recognition technology, and in particular to a training method, a recognition method and a system for a traffic scene recognition model. Background Art

[0002] Based on the sensors of smart vehicles, the road condition image information is collected, and the pixel-level classification of images is realized through semantic segmentation of deep learning. Assisting vehicles to understand road conditions has become one of the key focuses of people's attention.

[0003] At present, traditional semantic segmentation methods are usually based on Fully Convolutional Networks for Semantic Segmentation (FCN) neural network models or U-Net neural network models to achieve semantic segmentation of road condition images. This method has poor accuracy of image segmentation results and takes a long time to segment the image.

[0004] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the invention

[0005] The purpose of the present invention is to solve one of the technical problems existing in the related art to at least a certain extent.

[0006] The main purpose of the embodiments of the present application is to propose a training method, a recognition method and a system for a traffic scene recognition model, wherein the training method can provide a traffic scene recognition model whose image segmentation results have higher accuracy and less time required for image segmentation.

[0007] To achieve the above purpose, one aspect of an embodiment of the present application proposes a training method for a traffic scene recognition model, including:

[0008] Acquire a traffic scene data set, and preprocess the traffic scene data set to obtain a traffic scene training set;

[0009] Extracting features from the traffic scene training set to obtain a traffic scene feature set;

[0010] Performing deep multi-scale feature extraction on the traffic scene feature set to obtain a multi-scale feature set, wherein the multi-scale feature set includes a deep attention feature representation, a local feature representation, and a global feature representation, wherein the deep attention feature representation is used to represent a feature map of the original traffic scene image after adjusting spatial attention and channel attention, and the local feature representation is used to represent a set of local feature maps of different sizes corresponding to the original traffic scene image;

[0011] According to the traffic scene feature set, feature fusion is performed on the deep attention feature representation, the local feature representation and the global feature representation to obtain a fused data set;

[0012] According to the fused data set, the parameters of the initialized traffic scene recognition model are updated to obtain a trained traffic scene recognition model.

[0013] In addition, the training method of a traffic scene recognition model according to the above embodiment of the present application may also have the following additional technical features:

[0014] In some embodiments, the preprocessing of the traffic scene data set to obtain a traffic scene training set includes:

[0015] Labeling the traffic scene data set to obtain a labeled traffic scene data set;

[0016] The labeled traffic scene data set is denoised to obtain the traffic scene training set.

[0017] In some embodiments, extracting features from the traffic scene training set to obtain a traffic scene feature set includes:

[0018] Performing a first residual downsampling on the traffic scene training set to obtain a low-level feature map;

[0019] Performing a second residual downsampling on the low-level feature map to obtain a middle-level feature map;

[0020] The middle-layer feature map is subjected to a third residual down-sampling to obtain the traffic scene feature set.

[0021] In some embodiments, the deep multi-scale feature extraction of the traffic scene feature set to obtain the multi-scale feature set includes:

[0022] Performing deep feature extraction on the traffic scene feature set to obtain the deep attention feature representation;

[0023] Performing multi-scale feature extraction on the traffic scene feature set to obtain the local feature representation;

[0024] Performing global average pooling feature extraction on the traffic scene feature set to obtain the global feature representation.

[0025] In some embodiments, the performing deep feature extraction on the traffic scene feature set to obtain the deep attention feature representation includes:

[0026] Performing dimension transformation on the traffic scene feature set to obtain a dimensional feature set;

[0027] The dimensional feature set is subjected to spatial attention adjustment to obtain the deep attention feature representation.

[0028] In some embodiments, the local feature representation includes a small-size feature representation, a medium-size feature representation, and a large-size feature representation, and the multi-scale feature extraction of the traffic scene feature set to obtain the local feature representation includes:

[0029] Performing a first dilated convolution on the traffic scene feature set to obtain the small-size feature representation;

[0030] Performing a second dilated convolution on the traffic scene feature set to obtain the medium-sized feature representation;

[0031] A third dilated convolution is performed on the traffic scene feature set to obtain the large-size feature representation.

[0032] In some embodiments, the deep attention feature representation, the local feature representation and the global feature representation are subjected to feature fusion according to the traffic scene feature set to obtain a fused data set, including:

[0033] Obtaining a low-level feature map and a middle-level feature map corresponding to the traffic scene training set;

[0034] According to the traffic scene feature set, performing a first residual upsampling on the deep attention feature representation, the local feature representation, and the global feature representation to obtain a first upsampling feature set;

[0035] According to the middle-level feature map, performing a second residual upsampling on the first up-sampled feature set to obtain a second up-sampled feature set;

[0036] According to the low-level feature map, a third residual upsampling is performed on the second up-sampled feature set to obtain the fused data set.

[0037] To achieve the above object, another aspect of the embodiment of the present application provides a method for identifying a traffic scene recognition model, comprising:

[0038] Acquire a traffic scene image to be identified;

[0039] The traffic scene image to be identified is input into the above-mentioned trained traffic scene recognition model for identification to obtain a recognition result.

[0040] To achieve the above purpose, another aspect of the embodiment of the present application proposes a training system for a traffic scene recognition model, including:

[0041] An acquisition unit, used for acquiring a traffic scene data set, and preprocessing the traffic scene data set to obtain a traffic scene training set;

[0042] A first extraction unit, configured to extract features from the traffic scene training set to obtain a traffic scene feature set;

[0043] A second extraction unit is used to perform deep multi-scale feature extraction on the traffic scene feature set to obtain a multi-scale feature set, wherein the multi-scale feature set includes a deep attention feature representation, a local feature representation, and a global feature representation, wherein the deep attention feature representation is used to represent a feature map of the original traffic scene image after adjusting the spatial attention and the channel attention, and the local feature representation is used to represent a set of local feature maps of different sizes corresponding to the original traffic scene image;

[0044] A fusion unit, configured to perform feature fusion on the deep attention feature representation, the local feature representation and the global feature representation according to the traffic scene feature set to obtain a fused data set;

[0045] The updating unit is used to update the parameters of the initialized traffic scene recognition model according to the fused data set to obtain a trained traffic scene recognition model.

[0046] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application provides an electronic device, the electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the above-mentioned method when executing the computer program.

[0047] To achieve the above objective, another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described above is implemented.

[0048] The embodiments of the present application include at least the following beneficial effects:

[0049] The present application provides a training method, a recognition method and a system for a traffic scene recognition model, wherein the training method obtains a traffic scene data set, and preprocesses the traffic scene data set to obtain a traffic scene training set; performs feature extraction on the traffic scene training set to obtain a traffic scene feature set; performs deep multi-scale feature extraction on the traffic scene feature set to obtain a multi-scale feature set, wherein the multi-scale feature set includes a deep attention feature representation, a local feature representation and a global feature representation, wherein the deep attention feature representation is used to represent a feature map of an original traffic scene image after adjusting spatial attention and channel attention, and the local feature representation is used to represent a set of local feature maps of different sizes corresponding to the original traffic scene image; according to the traffic scene feature set, the deep attention feature representation, the local feature representation and the global feature representation are feature fused to obtain a fused data set; according to the fused data set, the parameters of an initialized traffic scene recognition model are updated to obtain a trained traffic scene recognition model. This training method is based on deep multi-scale feature extraction of traffic scene feature sets. It can improve the ability to extract deep features of different scales while focusing on useful features and suppressing irrelevant features, thereby improving the accuracy of image segmentation results and reducing the time required for image segmentation. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 It is a flowchart of a method for training a traffic scene recognition model provided in an embodiment of the present application;

[0051] Figure 2 is a detailed flow chart of step S110 provided in an embodiment of the present application;

[0052] Figure 3 is a detailed flow chart of step S120 provided in an embodiment of the present application;

[0053] Figure 4 Schematic diagram of a residual convolution module provided in an embodiment of the present application;

[0054] Figure 5 is a detailed flow chart of step S130 provided in an embodiment of the present application;

[0055] Figure 6 is a detailed flow chart of step C1 provided in an embodiment of the present application;

[0056] Figure 7 It is a schematic diagram of a framework of a CBAM-ASPP module provided in an embodiment of the present application;

[0057] Figure 8 It is a flow chart of a method for identifying a traffic scene recognition model provided in an embodiment of the present application;

[0058] Fig. 9 It is a structural schematic diagram of a training system for a traffic scene recognition model provided in an embodiment of the present application;

[0059] Fig.10 It is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0060] The present application is further described in detail. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices / equipment and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.

[0061] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".

[0062] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.

[0063] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0064] At present, traditional semantic segmentation methods are usually based on Fully Convolutional Networks for Semantic Segmentation (FCN) neural network models or U-Net neural network models to achieve semantic segmentation of road images. The structure of these neural network models is relatively simple, the feature extraction of the input road images is insufficient, and the accuracy of the image segmentation results is poor. In addition, these neural network models have too many network weights, and the training and image segmentation require a long time.

[0065] In view of this, an embodiment of the present application provides a training method, a recognition method and a system for a traffic scene recognition model, wherein the training method is based on deep multi-scale feature extraction of a traffic scene feature set, which can improve the ability to extract deep features of different scales while focusing on useful features and suppressing irrelevant features, thereby improving the accuracy of image segmentation results; in addition, the training method is also based on the corresponding three-layer convolution upsampling and three-layer residual downsampling, which can further enhance the feature extraction capability and improve the learning efficiency of the traffic scene recognition model.

[0066] A training method for a traffic scene recognition model provided in an embodiment of the present application can be applied to a terminal, a server, or software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a vehicle-mounted terminal, etc., but is not limited thereto; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network; the software can be an application that implements the method, etc., but is not limited to the above forms.

[0067] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0068] Reference Figure 1 , Figure 1 is an optional flowchart of a method for training a traffic scene recognition model provided in an embodiment of the present application. Figure 1 The method may include but is not limited to steps S110 to S150.

[0069] Step S110, obtaining a traffic scene data set, and preprocessing the traffic scene data set to obtain a traffic scene training set;

[0070] Reference Figure 2 In some embodiments, the step S110 of preprocessing the traffic scene data set to obtain a traffic scene training set includes:

[0071] A1. Label the traffic scene dataset to obtain a labeled traffic scene dataset;

[0072] A2. Denoising the labeled traffic scene data set to obtain the traffic scene training set.

[0073] In an embodiment of the present application, the traffic scene data set may be a data set about vehicle traffic scenes that is publicly available on the Internet, or it may be a traffic scene data set collected based on vehicle sensors during vehicle driving.

[0074] It can be understood that the traffic scene dataset includes several traffic scene images, and the label annotation in step A1 is used to add labels to the information such as pedestrians, vehicles, street lights, road surfaces, traffic signs, etc. of each traffic scene image in the traffic scene dataset; the denoising in step A2 can be based on Gaussian filtering to perform denoising on each labeled traffic scene image, and all the denoised traffic scene images are used as the traffic scene training set.

[0075] Step S120, extracting features from the traffic scene training set to obtain a traffic scene feature set;

[0076] In some embodiments, reference Figure 3 The step S120, extracting features from the traffic scene training set to obtain a traffic scene feature set, includes:

[0077] B1. Performing a first residual downsampling on the traffic scene training set to obtain a low-level feature map;

[0078] B2. Perform a second residual down-sampling on the low-level feature map to obtain a middle-level feature map;

[0079] B3. Perform a third residual down-sampling on the middle-layer feature map to obtain the traffic scene feature set.

[0080] In the embodiment of the present application, the feature extraction in step S120 is used to perform multi-level feature extraction on the information carried by the traffic scene image; it can be implemented using an encoding end consisting of a three-layer structure, referring to Figure 4, each layer structure of the encoding end can be a residual convolution module. The long connection path of each residual convolution module includes 2 3×3 convolution layers, 2 BN batch normalization layers and 2 ReLU activation functions. The short connection path uses 1×1 convolution to adjust the number of channels and 1 BN batch normalization layer. Each residual convolution module is connected to a 2×2 maximum pooling layer to complete the downsampling operation of the traffic scene image features.

[0081] It can be understood that the denoised traffic scene image is input to the first residual convolution module at the encoding end for the first residual down-sampling to obtain a low-level feature map that records information such as color, texture, edge, and corner; and the low-level feature map is input to the second residual convolution module at the encoding end for the second residual down-sampling to obtain a middle-level feature map with an increasing overlapping area of ​​information such as edges and corners; the middle-level feature map is input to the third residual convolution module at the encoding end for the third residual down-sampling, which can increase the receptive field on the basis of the middle-level feature map to obtain a high-level feature map, which can be used as a traffic scene feature set.

[0082] Step S130, performing deep multi-scale feature extraction on the traffic scene feature set to obtain a multi-scale feature set, wherein the multi-scale feature set includes a deep attention feature representation, a local feature representation, and a global feature representation, wherein the deep attention feature representation is used to represent a feature map of the original traffic scene image after adjusting the spatial attention and the channel attention, and the local feature representation is used to represent a set of local feature maps of different sizes corresponding to the original traffic scene image;

[0083] In some embodiments, reference Figure 5 The step S130, performing deep multi-scale feature extraction on the traffic scene feature set to obtain a multi-scale feature set, includes:

[0084] C1. Performing deep feature extraction on the traffic scene feature set to obtain the deep attention feature representation;

[0085] Further, refer to Figure 6 The step C1, performing deep feature extraction on the traffic scene feature set to obtain the deep attention feature representation, comprises:

[0086] C11. Performing dimension transformation on the traffic scene feature set to obtain a dimensional feature set;

[0087] C12. Perform spatial attention adjustment on the dimensional feature set to obtain the deep attention feature representation.

[0088] In the embodiments of this application, refer to Figure 7The deep multi-scale feature extraction in step S130 can be implemented by inputting the traffic scene feature set into a CBAM-ASPP module obtained by combining an atrous spatial pyramid pooling module (ASPP) and a convolutional block attention module (CBAM).

[0089] It can be understood that the deep feature extraction in step C1 can change the dimension of the traffic scene feature set based on the 1×1 convolution layer in the ASPP module to obtain the traffic scene feature set after the dimension change (i.e., the dimensional feature set); then, based on the CBAM module connected in series to the 1×1 convolution layer, the channel attention is adjusted to enhance useful features and suppress useless features, and an additional convolution operation is added to focus on the spatial information of the image, taking into account both channel and spatial information, so as to apply weights to each dimensional feature in the dimensional feature set, thereby improving the network learning ability of the traffic scene recognition model.

[0090] C2. Perform multi-scale feature extraction on the traffic scene feature set to obtain the local feature representation;

[0091] Furthermore, the local feature representation includes a small-size feature representation, a medium-size feature representation and a large-size feature representation, and the step C2, performing multi-scale feature extraction on the traffic scene feature set to obtain the local feature representation, includes:

[0092] C21, performing a first dilated convolution on the traffic scene feature set to obtain the small-size feature representation;

[0093] C22, performing a second dilated convolution on the traffic scene feature set to obtain the medium-sized feature representation;

[0094] C23. Perform a third dilated convolution on the traffic scene feature set to obtain the large-size feature representation.

[0095] In an embodiment of the present application, step C2 can be implemented based on three parallel 3×3 convolutional layers with different void ratios in the ASPP module, wherein the void ratio distribution corresponding to the three parallel 3×3 convolutional layers can be 6, 12, 18, etc.

[0096] It is understandable that by inputting the traffic scene feature set into three parallel 3×3 convolutional layers with different void rates, the traffic scene recognition model can sense features of small, medium and large sizes. By increasing the receptive field, the information of the region or neighborhood can be more complete, and the semantic information of people, vehicles, buildings, etc. in the traffic scene image can be richer.

[0097] C3. Perform global average pooling feature extraction on the traffic scene feature set to obtain the global feature representation.

[0098] In an embodiment of the present application, step C3 can be implemented based on the global average pooling layer (Global Average Pooling, GAP) in the ASPP module. The global average pooling layer calculates the average value of each input high-level feature map, and obtains the global feature representation by integrating the global information. The global feature representation can determine the spatial position information of targets such as people and vehicles in the traffic scene image.

[0099] It should be noted that the embodiment of the present application is based on adding a CBAM module in series after the 1×1 convolution layer in the ASPP module. The obtained multi-scale feature set can extract multi-scale features corresponding to the original traffic scene feature map, reduce the impact of the attention mechanism, and reduce the amount of calculation. To a certain extent, it improves the network learning efficiency of the traffic scene recognition model and improves the segmentation accuracy.

[0100] It is worth mentioning that before the CBAM module is directly added to the five-layer parallel structure of the ASPP module, the high-level feature map input to the ASPP module will be affected by the attention mechanism, which is easy to cause the loss of feature information and make the traffic scene recognition model perform poorly when the amount of data in the training set is small; after the CBAM module is directly added to the five-layer parallel structure of the ASPP module, the traffic scene recognition model will perform spatial attention and channel attention processing on a large amount of feature data, which requires a large amount of calculation, and the network learning efficiency of the traffic scene recognition model is low. In addition, there is a situation where the attention mechanism cannot be used correctly, and the accuracy of the traffic scene recognition model decreases.

[0101] Step S140: performing feature fusion on the deep attention feature representation, the local feature representation and the global feature representation according to the traffic scene feature set to obtain a fused data set;

[0102] In some embodiments, the step S140, based on the traffic scene feature set, performs feature fusion on the deep attention feature representation, the local feature representation and the global feature representation to obtain a fused data set, includes:

[0103] D1. Obtaining a low-level feature map and a middle-level feature map corresponding to the traffic scene training set;

[0104] D2. According to the traffic scene feature set, performing a first convolution upsampling on the deep attention feature representation, the local feature representation, and the global feature representation to obtain a first upsampled feature set;

[0105] D3. Perform a second convolution upsampling on the first upsampled feature set according to the middle-layer feature map to obtain a second upsampled feature set;

[0106] D4. According to the low-level feature map, perform a third convolution upsampling on the second up-sampled feature set to obtain the fused data set.

[0107] In an embodiment of the present application, the feature fusion in step S140 is used to perform multi-level feature stacking on the information carried by the traffic scene image to obtain a fused data set, which can be implemented using a decoding end consisting of a three-layer structure. The decoding end corresponds to the aforementioned encoding end, and each layer of the decoding end is specifically composed of a concatenation layer (Concat) and two groups of 3×3 convolutional layers.

[0108] It can be understood that the low-level feature map in step D1 is the same as the low-level feature map in the aforementioned step B1, and the middle-level feature map is the same as the middle-level feature map in the aforementioned step B2. Step D2 can be that after the deep attention mechanism feature representation, local feature representation and global feature representation are spliced ​​and the number of channels are changed to obtain a multi-scale feature set, based on the first layer structure of the encoding end, the multi-scale feature set and the high-level feature map corresponding to the traffic scene image are subjected to the first convolution upsampling. The specific convolution upsampling operation includes the feature stacking operation performed by the splicing layer and the channel number adjustment operation performed by two groups of 3×3 convolution layers. Steps D3 and D4 are similar to the aforementioned step D2. It can be simply inferred that a fused data set can be obtained by upsampling layer by layer.

[0109] Step S150: updating the parameters of the initialized traffic scene recognition model according to the fused data set to obtain a trained traffic scene recognition model.

[0110] In an embodiment of the present application, the target loss function can be calculated based on the fused data set and the labels corresponding to the annotated traffic scene data set, and the initialized traffic scene recognition model can be trained based on the target loss function to obtain a trained traffic scene recognition model.

[0111] It is understandable that for machine learning models, the accuracy of the model prediction results can be measured by a loss function, which is defined on a single training data and is used to measure the prediction error of a training data. Specifically, the loss value of the training data is determined by the label of a single training data and the prediction result of the model for the training data. In actual training, a training data set has a lot of training data, so a cost function is generally used to measure the overall error of the training data set. The cost function is defined on the entire training data set and is used to calculate the average value of the prediction error of all training data, which can better measure the prediction effect of the model. For general machine learning models, based on the aforementioned cost function, plus a regularization term that measures the complexity of the model, it can be used as the objective function of the training, and the loss value of the entire training data set can be calculated based on the objective function. There are many types of commonly used loss functions, such as 0-1 loss function, square loss function, absolute loss function, logarithmic loss function, cross entropy loss function, etc., which can all be used as loss functions of machine learning models, which will not be described one by one here. In the embodiment of the present application, one loss function can be selected to determine the loss value of the training, such as the cross entropy loss function. Based on the training loss value, the back propagation algorithm is used to update the parameters of the model. After several iterations, a trained traffic scene recognition model can be obtained. The specific number of iterations can be set in advance, or the training is considered complete when the test set meets the accuracy requirements.

[0112] In summary, the embodiment of the present application is based on deep multi-scale feature extraction, and specifically focuses on the image from two aspects, space and channel, through the CBAM-ASPP module, while improving the ability to extract deep features of different scales, focusing on useful features and suppressing irrelevant features; in addition, compared with the 4-layer encoding and decoding structure of the traditional U-Net network, the CBAM-ASPP module in the embodiment of the present application can replace the feature extraction function of the fourth-layer encoding end, and based on the corresponding feature extraction operations and feature fusion operations, it can enhance the feature extraction capability, improve the learning efficiency of the traffic scene recognition model, and thus improve the accuracy of the image segmentation results, and reduce the time required for image segmentation.

[0113] Reference Figure 8 , Figure 8 is an optional flowchart of a method for identifying a traffic scene recognition model provided in an embodiment of the present application. Figure 8 The method may include but is not limited to steps S160 to S170.

[0114] Step S160, obtaining a traffic scene image to be identified;

[0115] Step S170: input the traffic scene image to be identified into the trained traffic scene recognition model to perform identification and obtain a identification result.

[0116] In an embodiment of the present application, the traffic scene image to be identified can be input into a trained traffic scene recognition model, and the trained traffic scene recognition model outputs a probability segmentation map corresponding to the traffic scene image, and the probability segmentation map is mapped to the traffic scene image to obtain a recognition result.

[0117] See also Fig. 9 The present application also provides a training system for a traffic scene recognition model, including:

[0118] An acquisition unit 310 is used to acquire a traffic scene data set and preprocess the traffic scene data set to obtain a traffic scene training set;

[0119] A first extraction unit 320, configured to perform feature extraction on the traffic scene training set to obtain a traffic scene feature set;

[0120] A second extraction unit 330 is used to perform deep multi-scale feature extraction on the traffic scene feature set to obtain a multi-scale feature set, wherein the multi-scale feature set includes a deep attention feature representation, a local feature representation, and a global feature representation, wherein the deep attention feature representation is used to represent a feature map of the original traffic scene image after adjusting the spatial attention and the channel attention, and the local feature representation is used to represent a set of local feature maps of different sizes corresponding to the original traffic scene image;

[0121] A fusion unit 340 is used to perform feature fusion on the deep attention feature representation, the local feature representation and the global feature representation according to the traffic scene feature set to obtain a fused data set;

[0122] The updating unit 350 is used to update the parameters of the initialized traffic scene recognition model according to the fused data set to obtain a trained traffic scene recognition model.

[0123] It can be understood that the contents of the above method embodiments are all applicable to the present system embodiments, the functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0124] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0125] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0126] See also Fig.10 , Fig.10 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0127] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0128] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 902, and the processor 901 calls and executes the methods of the embodiments of this application;

[0129] Input / output interface 903, used to implement information input and output;

[0130] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);

[0131] A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);

[0132] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .

[0133] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and the computer program implements the above method when executed by a processor.

[0134] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0135] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0136] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0137] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0138] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0139] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

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

[0141] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0142] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0143] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0144] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0145] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0146] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A method for training a traffic scene recognition model, characterized in that: include: Acquire a traffic scene data set, and preprocess the traffic scene data set to obtain a traffic scene training set; Performing feature extraction on the traffic scene training set to obtain a traffic scene feature set; Performing deep multi-scale feature extraction on the traffic scene feature set to obtain a multi-scale feature set, wherein the multi-scale feature set includes a deep attention feature representation, a local feature representation, and a global feature representation, wherein the deep attention feature representation is used to represent a feature map of the original traffic scene image after adjusting spatial attention and channel attention, and the local feature representation is used to represent a set of local feature maps of different sizes corresponding to the original traffic scene image; According to the traffic scene feature set, feature fusion is performed on the deep attention feature representation, the local feature representation and the global feature representation to obtain a fused data set; According to the fused data set, the parameters of the initialized traffic scene recognition model are updated to obtain a trained traffic scene recognition model.

2. The training method of the traffic scene recognition model according to claim 1, characterized in that: The preprocessing of the traffic scene data set to obtain a traffic scene training set includes: Labeling the traffic scene data set to obtain a labeled traffic scene data set; The labeled traffic scene data set is denoised to obtain the traffic scene training set.

3. The training method of the traffic scene recognition model according to claim 1, characterized in that: The feature extraction of the traffic scene training set to obtain a traffic scene feature set includes: Performing a first residual downsampling on the traffic scene training set to obtain a low-level feature map; Performing a second residual downsampling on the low-level feature map to obtain a middle-level feature map; The middle-layer feature map is subjected to a third residual down-sampling to obtain the traffic scene feature set.

4. The training method of the traffic scene recognition model according to claim 1, characterized in that: The deep multi-scale feature extraction is performed on the traffic scene feature set to obtain a multi-scale feature set, including: Performing deep feature extraction on the traffic scene feature set to obtain the deep attention feature representation; Performing multi-scale feature extraction on the traffic scene feature set to obtain the local feature representation; Performing global average pooling feature extraction on the traffic scene feature set to obtain the global feature representation.

5. The training method of the traffic scene recognition model according to claim 4 is characterized in that: The deep feature extraction of the traffic scene feature set to obtain the deep attention feature representation includes: Performing dimension transformation on the traffic scene feature set to obtain a dimensional feature set; The dimensional feature set is subjected to spatial attention adjustment to obtain the deep attention feature representation.

6. The method for training a traffic scene recognition model according to claim 4, characterized in that: The local feature representation includes a small-size feature representation, a medium-size feature representation, and a large-size feature representation. The multi-scale feature extraction is performed on the traffic scene feature set to obtain the local feature representation, including: Performing a first dilated convolution on the traffic scene feature set to obtain the small-size feature representation; Performing a second dilated convolution on the traffic scene feature set to obtain the medium-sized feature representation; A third dilated convolution is performed on the traffic scene feature set to obtain the large-size feature representation.

7. The method for training a traffic scene recognition model according to claim 1, characterized in that: The step of performing feature fusion on the deep attention feature representation, the local feature representation and the global feature representation according to the traffic scene feature set to obtain a fused data set includes: Obtaining a low-level feature map and a middle-level feature map corresponding to the traffic scene training set; According to the traffic scene feature set, performing a first residual upsampling on the deep attention feature representation, the local feature representation, and the global feature representation to obtain a first upsampling feature set; According to the middle-level feature map, performing a second residual upsampling on the first up-sampled feature set to obtain a second up-sampled feature set; According to the low-level feature map, a third residual upsampling is performed on the second up-sampled feature set to obtain the fused data set.

8. A method for identifying a traffic scene recognition model, characterized in that: include: Acquire a traffic scene image to be identified; The traffic scene image to be identified is input into the trained traffic scene recognition model as described in any one of claims 1 to 7 for identification to obtain a recognition result.

9. A training system for a traffic scene recognition model, characterized in that: include: An acquisition unit, used for acquiring a traffic scene data set, and preprocessing the traffic scene data set to obtain a traffic scene training set; A first extraction unit, configured to extract features from the traffic scene training set to obtain a traffic scene feature set; A second extraction unit is used to perform deep multi-scale feature extraction on the traffic scene feature set to obtain a multi-scale feature set, wherein the multi-scale feature set includes a deep attention feature representation, a local feature representation, and a global feature representation, wherein the deep attention feature representation is used to represent a feature map of the original traffic scene image after adjusting the spatial attention and the channel attention, and the local feature representation is used to represent a set of local feature maps of different sizes corresponding to the original traffic scene image; A fusion unit, configured to perform feature fusion on the deep attention feature representation, the local feature representation and the global feature representation according to the traffic scene feature set to obtain a fused data set; The updating unit is used to update the parameters of the initialized traffic scene recognition model according to the fused data set to obtain a trained traffic scene recognition model.

10. An electronic device, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Urban road scene segmentation method based on improved DeepLabV3 +

    CN117237890A