Semantic segmentation-based night road ponding reflective area identification method and system

By adding a two-dimensional discrete cosine change layer and an adaptive frequency processing layer to the BiSeNetV2 model, combined with a multi-scale spatial frequency fusion layer, the problem of reduced recognition accuracy of road water areas in complex environments at night is solved and higher anti-interference is achieved. capabilities and robustness, improving driving safety.

CN118537547APending Publication Date: 2024-08-23ZHEJIANG UNIV OF SCI & TECH
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410461898.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-17
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

The accuracy of existing technology in identifying road water accumulation areas in complex environments at night decreases and it is difficult to ensure real-time performance. Traditional algorithms have insufficient adaptability in complex environments, and deep learning models are difficult to adapt to night water accumulation scenes.

Method used

A method based on semantic segmentation is used to construct a recognition model through the BiSeNetV2 model, a two-dimensional discrete cosine change layer and an adaptive frequency processing layer are added to extract multi-level frequency features, and spatial information is realized from global and local aspects through a multi-scale spatial frequency fusion layer Fully integrated with frequency information to complete spatial feature reconstruction guided by frequency information.

Benefits of technology

It effectively improves the anti-interference ability and robustness in the night environment, improves the accuracy of water segmentation in complex lighting environments at night, helps lamps to adaptively adjust lighting parameters, and improves driving safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118537547A
    Figure CN118537547A
Patent Text Reader

Abstract

The invention relates to a semantic segmentation-based night road ponding reflective area identification method and system, and the method comprises the steps: collecting night ponding road surface images, marking the ponding area of each night ponding road surface image, marking the ponding area into a ground type and a ponding type, and obtaining a marked image data set; dividing the annotated image data set into a training set, a verification set and a test set; constructing an identification model, starting from a semantic branch of a BiSeNetV2 model, adding a two-dimensional discrete cosine change layer and an adaptive frequency processing layer behind each aggregation expansion layer, and realizing full fusion of spatial information and frequency information from global and local aspects to complete frequency information guidance spatial feature reconstruction; based on the labeled image data set, training the recognition model to obtain a target recognition model; and inputting a to-be-recognized night waterlogged pavement image into the target recognition model to obtain a night road waterlogged reflective area. According to the invention, the accuracy of ponding segmentation in a complex illumination environment at night is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of intelligent recognition, and in particular relates to a method and system for identifying reflective areas of water accumulation on roads at night based on semantic segmentation. Background Art

[0002] With the continuous improvement of automobile safety systems, traditional mechanical headlamp adjustment systems can no longer meet people's needs for driving safety under complex road conditions at night. The rapid development of intelligent driving assistance systems has gradually promoted the intelligentization of headlights. Intelligent headlights are new lighting equipment that integrates environmental perception, intelligent control, and adaptive lighting systems. When driving on flooded roads at night in complex environments, it is easy to reflect or refract light that interferes with oncoming drivers, making it difficult to accurately judge the water depth and road conditions, increasing driving risks. Monitoring of flooded areas at night is an important recognition task of the visual perception layer of intelligent headlights, which facilitates the headlights to adaptively adjust the light intensity and direction, ensuring driving safety.

[0003] At present, there are two main methods for road water segmentation and recognition: one uses traditional image processing and the other uses deep learning-based methods. Traditional road water recognition methods use algorithms such as Canny edge detection, which mainly divide road water areas based on image color, texture, shape and other features. They are highly adaptable to specific scenes, but in complex road environments, such as fog, reflection, shadow and other conditions, the accuracy of road water segmentation by traditional algorithms is usually limited. The deep learning-based method does not require manual feature design and can capture more complex features. However, the current deep learning model is difficult to adapt to water areas in complex environments at night, resulting in reduced accuracy and difficulty in ensuring real-time performance. Summary of the invention

[0004] Based on the above-mentioned shortcomings and deficiencies in the prior art, one of the objects of the present invention is to at least solve one or more of the above-mentioned problems in the prior art. In other words, one of the objects of the present invention is to provide a method and system for identifying reflective areas of water accumulation on roads at night based on semantic segmentation that meets one or more of the above-mentioned needs.

[0005] In order to achieve the above-mentioned object of the invention, the present invention adopts the following technical solutions:

[0006] A method for identifying reflective areas of water on roads at night based on semantic segmentation, comprising the following steps:

[0007] S1, collecting images of flooded roads at night to obtain original image data sets;

[0008] S2, annotating the waterlogged areas of each nighttime waterlogged road surface image in the original image dataset, with the annotated types being ground and waterlogged, to obtain an annotated image dataset; dividing the annotated image dataset into a training set, a validation set, and a test set;

[0009] S3. Build a recognition model based on the BiSeNetV2 model; Starting from the semantic branch of the BiSeNetV2 model, first add a two-dimensional discrete cosine change layer after each aggregation expansion layer to extract frequency features at different levels, then use an adaptive frequency processing layer to process each frequency feature, analyze the scene frequency data distribution, and perform weighted summation of the processed frequency features at each stage to obtain multi-level frequency features. Finally, use a multi-scale spatial frequency fusion layer to fully integrate spatial information and frequency information from both global and local aspects, and complete the reconstruction of spatial features guided by frequency information.

[0010] S4, based on the training set, the validation set, and the test set, the recognition model is trained using the stochastic gradient descent method to obtain a target recognition model;

[0011] S5. Input the image of the waterlogged road surface to be identified at night into the target recognition model to obtain the waterlogged reflective area of ​​the road at night.

[0012] As a preferred solution, in step S1, nighttime flooded road surface images of different scene types and different headlight illumination intensities are collected from various angles by a camera.

[0013] As a preferred solution, in step S2, the LabelMe tool is used to mark the waterlogged area.

[0014] As a preferred solution, in step S2, data enhancement is performed on each divided data set, and the data enhanced data set is used to construct a processed data set in accordance with the VOC 2012 format.

[0015] As a preferred solution, in step S3, the processing process of the two-dimensional discrete cosine change layer includes:

[0016] According to the principle of image compression, the semantic features extracted by the bilateral aggregation expansion layer in the BiSeNetV2 model are first resized to 8×8 through an adaptive average pooling layer and recorded as spatial features f s , and then divide it into n parts from the channel dimension to get Where k∈{0,1,…,n-1}, n represents the number of frequency components, and C represents the number of channels. Then, the corresponding two-dimensional discrete cosine function DCT is used through formula (1) k The spatial feature component f s k Converted into frequency characteristic components

[0017]

[0018] Where: (x, y) is the spatial position coordinate of the image pixel;

[0019] u,v are the horizontal and vertical frequency components of the image pixels, u,v∈{0,1,…,8};

[0020] is the spatial characteristic component f s k The value of the pixel position (x, y) in the image;

[0021] is the variation kernel of the two-dimensional discrete cosine function;

[0022] c(u),c(v) are compensation factors;

[0023] in, And c(u), c(v) are shown in formula (2) and (3) respectively:

[0024]

[0025] Where: N is the image size;

[0026]

[0027] Finally, all the obtained frequency components are connected to form the multi-spectral frequency features corresponding to each aggregation expansion layer. Where m∈{0,1,2}, as shown in formula (4):

[0028]

[0029] As a preferred solution, in step S3, the adaptive frequency processing layer includes four parts. The first part is the residual branch, that is, the multi-spectral frequency features after the semantic features of each aggregation expansion layer are processed. The second part is the maximum pooling layer, the third part is the average pooling layer, and the fourth part is the group convolution. The frequency features processed by the above four parts are weighted summed, and then the convolution operation is performed through a 3×3 convolution kernel to convert the number of frequency feature output channels to 128. Finally, the Softmax activation function is used to further extract the frequency features and regularize them to avoid overfitting, and the adaptive frequency features of each layer are obtained. As shown in formula (5):

[0030]

[0031] Where: p is a learnable parameter;

[0032] G pAs p changes, they represent residual connection, maximum pooling, average pooling, and grouped convolution operations respectively;

[0033] B stands for batch normalization.

[0034] As a preferred solution, in step S3, the semantic features output by each aggregation expansion layer in the semantic branch are sequentially processed through an adaptive average pooling layer, a two-dimensional discrete cosine change layer, and an adaptive frequency processing layer to obtain their respective frequency features. Adopt learnable parameters w for all frequency features m Perform point-by-point weighted sum to obtain multi-level frequency features f f ∈R 128 ×8×8 , the calculation formula is shown in formula (6);

[0035]

[0036] As a preferred solution, in step S3, a bilateral guided aggregation layer is used to output the spatial feature f b ∈R 128×16×16 , for multi-level frequency features f f Use bilinear interpolation to expand the size to the spatial feature f b Same, then for f f and f b A convolution operation with a size of 3×3 and padding of 1 is used to adjust the number of channels of both layers to 128.

[0037] The multi-scale spatial frequency fusion layer starts from the global and local branches. The local branch first transforms the multi-level frequency features f f The convolution PWConv1 with a 1×1 convolution kernel is passed in to reduce its number of channels to 1 / r of the original number, and then the convolution PWConv2 with a 1×1 convolution kernel is used to restore the number of channels to the original number, and the local frequency feature is obtained, which is combined with the spatial feature f b Multiply point by point to obtain the local spatial frequency fusion feature L(f f ), as shown in formula (7):

[0038]

[0039] Where: ——Multiply point by point;

[0040] The global branch first performs multi-level frequency features f f Adaptive average pooling is used to simultaneously b Adaptive average pooling is also used to obtain global context information, and the two are combined to obtain the global spatial frequency fusion feature G(f f ), as shown in formula (8):

[0041]

[0042] Where: AAP - Adaptive Average Pooling.

[0043] The local spatial frequency fusion feature L(f f ) and the global spatial frequency fusion feature G(f f ) fusion, and obtain the multi-scale spatial frequency fusion feature MS(f f ), as shown in formula (9):

[0044]

[0045] Where: ——add point by point;

[0046] The multi-scale spatial frequency fusion feature MS(f f )Use the Softmax activation function to obtain the similarity operator between spatial frequencies, and combine the similarity operator with the spatial feature f b Multiply and combine with the learnable scale factor α to reduce gradient instability, and then multiply the result with the spatial feature f b The addition realizes the unification with the spatial features, and finally undergoes two convolutions of different sizes to further adapt to the understanding of the spatial frequency context information to achieve the reconstructed spatial features, denoted as I final ∈R 128×16×16 , as shown in formula (10):

[0047]

[0048] Where: conv1 is a 1×1 convolution kernel with no padding;

[0049] Conv2 is a 3×3 convolution kernel with a padding of 1;

[0050] The end of the model trunk will be I final The data is passed to the FCN decoding head to implement the segmentation task and identify the reflective area of ​​water on the road at night.

[0051] As a preferred solution, in step S4, the performance of the model is evaluated by average intersection-over-union ratio, average pixel accuracy, parameter quantity, and calculation amount.

[0052] The present invention also provides a nighttime road water reflection area recognition system based on semantic segmentation, which uses the nighttime road water reflection area recognition method as described in any one of the above items, and the nighttime road water reflection area recognition system comprises:

[0053] The acquisition module is used to acquire images of flooded roads at night and obtain original image data sets;

[0054] The preprocessing module is used to annotate the waterlogged areas of each nighttime waterlogged road surface image in the original image data set, with the annotated types being ground and waterlogged, to obtain an annotated image data set; the annotated image data set is divided into a training set, a validation set, and a test set;

[0055] A construction module is used to build a recognition model based on the BiSeNetV2 model. Starting from the semantic branch of the BiSeNetV2 model, a two-dimensional discrete cosine change layer is first added after each aggregation expansion layer to extract frequency features at different levels. Each frequency feature is then processed by an adaptive frequency processing layer to analyze the distribution of scene frequency data. The frequency features of each stage after processing are weighted and summed to obtain multi-level frequency features. Finally, a multi-scale spatial frequency fusion layer is used to fully integrate spatial information and frequency information from both global and local aspects to complete the reconstruction of spatial features guided by frequency information.

[0056] The training module is used to train the recognition model based on the training set, the validation set, and the test set using the stochastic gradient descent method to obtain the target recognition model;

[0057] The recognition module is used to input the image of the nighttime flooded road surface to be recognized into the target recognition model to obtain the nighttime road flooded reflective area.

[0058] Compared with the prior art, the present invention has the following beneficial effects:

[0059] (1) Compared with traditional tracking algorithms, the method of the present invention adopts a deep learning method to effectively improve the anti-interference ability and robustness of recognition in night environments;

[0060] (2) The present invention can effectively improve the accuracy of water segmentation in complex lighting environments at night by improving the BiSeNetV2 algorithm;

[0061] (3) The present invention uses computer vision technology to locate the waterlogged area in real time, which helps the lamps to adaptively adjust the lighting parameters for control, thereby improving driving safety. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 This is a hardware structure diagram of a system for identifying and locating reflective areas of road water at night according to an embodiment of the present invention;

[0063] Figure 2 It is a flow chart of the method for identifying and locating reflective areas of water on roads at night according to an embodiment of the present invention;

[0064] Figure 3 A schematic diagram of the network structure of the improved BiSeNetV2 according to an embodiment of the present invention;

[0065] Figure 4A schematic diagram of the network structure of a two-dimensional discrete cosine change layer and an adaptive frequency processing layer according to an embodiment of the present invention;

[0066] Figure 5 This is a schematic diagram of the network structure of a multi-scale spatial frequency fusion layer according to an embodiment of the present invention;

[0067] Figure 6 It is the model training loss function curve of the embodiment of the present invention;

[0068] Figure 7 The original image of the flooded road surface according to the embodiment of the present invention;

[0069] Figure 8 A label image of an original image of a flooded road surface according to an embodiment of the present invention;

[0070] Fig. 9 This is a model prediction image according to an embodiment of the present invention. DETAILED DESCRIPTION

[0071] In order to more clearly illustrate the embodiments of the present invention, the specific implementation methods of the present invention will be described below with reference to the accompanying drawings. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, other accompanying drawings and other implementation methods can be obtained based on these accompanying drawings without creative work.

[0072] The hardware structure diagram of the device for identifying and locating the reflective area of ​​road water at night according to the embodiment of the present invention is as follows: Figure 1 The images of flooded roads at night collected by the camera are transmitted to the embedded computing device Jetson Nano equipped with the improved BiSeNetV2 model for real-time identification and positioning of flooded areas. The surrounding environmental factors are considered to make decisions on adjusting parameters such as the brightness, color, and direction of the lights. The light controller adjusts the vehicle light parameters according to the decision result data, and the headlights change the light according to the instructions of the light controller to adapt to the flooded road conditions at night.

[0073] like Figure 2 As shown, the method for identifying reflective areas of road water at night based on semantic segmentation in an embodiment of the present invention includes the following steps:

[0074] Step 1: nighttime flooded road image acquisition;

[0075] Specifically, the camera collects nighttime flooded road images with different headlight intensities and scene types from various angles to obtain an original image dataset.

[0076] Step 2: Dataset preprocessing;

[0077] The collected unprocessed images were analyzed and screened, and images with blurred image quality and high similarity were removed. The LabelMe tool was used to annotate the waterlogged areas, with the annotated types being ground and waterlogged. The annotated images were then divided into training, validation, and test sets according to a 7:2:1 ratio. The divided data sets were enhanced by flipping, noise perturbation, and contrast changes, and the expanded data sets were constructed into processed data sets in the VOC 2012 format.

[0078] Step 3: Model improvement;

[0079] Under nighttime conditions, light sources are unevenly distributed. This lighting unevenness may result in a low contrast between waterlogged areas and non-waterlogged areas, making it difficult for the algorithm to accurately segment. In response to the above problems, an embodiment of the present invention introduces an improved method for frequency branches, aiming to reduce the impact of light sensitivity and enhance the extraction of image texture and structural information. Starting from the semantic branch of the BiSeNetV2 model, a two-dimensional discrete cosine change layer is first added after each aggregation expansion layer to extract frequency features at different levels. An adaptive frequency processing module is then used for each frequency feature to parse the scene frequency data distribution. The frequency features of each stage after processing are weighted and summed to obtain multi-level frequency features. Finally, a multi-scale spatial frequency fusion module is proposed to fully integrate spatial information and frequency information from both global and local aspects, and complete the reconstruction of spatial features guided by frequency information. The improved BiSeNetV2 network is shown in the figure. Figure 3 shown.

[0080] 1. Introducing 2D Discrete Cosine Transformation Layer

[0081] The embodiment of the present invention uses a two-dimensional discrete cosine function to realize the transformation of image spatial features into frequency features, so as to further analyze and process high and low frequencies. According to the principle of image compression, the semantic features extracted by the bilateral aggregation expansion layer in the BiSeNetV2 model are first resized to 8×8 through an adaptive average pooling layer, which is recorded as the spatial feature f s , and then divide it into n parts from the channel dimension to get Where k∈{0,1,…,n-1}, n represents the number of frequency components, and C represents the number of channels. Then, the corresponding two-dimensional discrete cosine function DCT is used through formula (1) k The spatial characteristic components Converted into frequency characteristic components

[0082]

[0083] Where: (x, y) is the spatial position coordinate of the image pixel;

[0084] u,v are the horizontal and vertical frequency components of the image pixels, u,v∈{0,1,…,8};

[0085] is the spatial characteristic component The value of the pixel position (x, y) in the image;

[0086] is the variation kernel of the two-dimensional discrete cosine function;

[0087] c(u),c(v) are compensation factors;

[0088] in, And c(u), c(v) are shown in formula (2) and (3) respectively:

[0089]

[0090] Where: N——image size;

[0091]

[0092] Finally, all the obtained frequency components are connected to form the multi-spectral frequency features corresponding to each aggregation expansion layer. Where m∈{0,1,2}, as shown in formula (4):

[0093]

[0094] 2. Adding an adaptive frequency processing layer

[0095] Since the frequency distribution of images under complex lighting conditions is more discrete, the variable frequency distribution will cause the model to be unable to correctly interpret the scene, thus affecting the performance. It is particularly important to adaptively change the extracted frequency features to cope with the variable data distribution. Inspired by adaptive weighted fusion, such as Figure 4 As shown, the embodiment of the present invention proposes an adaptive frequency processing layer, which includes four parts. The first part is the residual branch, that is, the multi-spectral frequency features after the semantic features of each aggregation expansion layer are processed. The second part uses the maximum pooling layer (Max Pooling) to highlight and retain the main frequency components in the frequency features, which helps the model focus on the important frequency information in the data. The third part uses the average pooling layer (Average Pooling) to reduce the impact of high-frequency noise and ensure the overall frequency feature trend. The fourth part uses group convolution (GroupConvolution) to learn the appropriate frequency feature representation through grouping while ensuring a low number of parameters, so as to achieve better adaptation to complex frequency distribution areas. The frequency features processed by the above four parts are weighted summed using learnable parameters, and then a convolution operation (Convolution, Conv) is performed through a 3×3 convolution kernel to convert the number of frequency feature output channels to 128. Finally, the Softmax activation function is used to further extract the frequency features and regularize them to avoid overfitting, so as to obtain the adaptive frequency features of each layer. As shown in formula (5):

[0096]

[0097] Where: p ——Learnable parameters;

[0098] G p ——As p changes, it represents residual connection, maximum pooling, average pooling, and grouped convolution operations respectively;

[0099] B——Batch Normalization.

[0100] 3. Multi-level frequency fusion

[0101] like Figure 3 As shown, in the embodiment of the present invention, the semantic features output by each aggregation expansion layer in the semantic branch are sequentially passed through an adaptive average pooling layer, a 2D Discrete Cosine Transform (DCT) layer, and an adaptive frequency processing (AFP) layer to achieve the conversion from the spatial domain to the frequency domain, and obtain their respective frequency features. Adopt learnable parameters w for all frequency features m The frequency information of semantic features at different scales is balanced by point-by-point weighted sum to obtain multi-level frequency features f f ∈R 128×8×8 , the calculation formula is shown in formula (6).

[0102]

[0103] 4. Integrating the Multi-Scale Spatial Frequency Fusion Layer

[0104] The learned frequency features are used to guide the network to model the spatial context features of night scenes, which helps the network model to correctly understand the scene illumination. The global and local channel context information of the frequency features act on capturing the overall frequency distribution and local frequency characteristics respectively. Inspired by multi-scale spatial attention, the embodiment of the present invention proposes a multi-scale spatial frequency fusion layer (Multi-Scale Spatial Frequency Fusion, MS-SFF), which fuses the features of two different domains from different scales. The spatial domain uses a bilateral guided aggregation layer to output the feature f b ∈R 128×16×16 The embodiment of the present invention pre-determines the multi-level frequency characteristics f f Use bilinear interpolation to expand the size to f b Same, then for f f and f b A 3×3 convolution operation with padding of 1 is used to adjust the number of channels of both layers to 128. The process is as follows: Figure 3 shown.

[0105] like Figure 5 As shown in the figure, the fusion layer starts from the global and local branches. The local branch first transforms the multi-level frequency features f f The convolution PWConv1 with a 1×1 convolution kernel is passed in to reduce its number of channels to 1 / r of the original number, and then the convolution PWConv2 with a 1×1 convolution kernel is used to restore the number of channels to the original number, and the local frequency features are obtained, which are compared with f b Multiply point by point to obtain the local spatial frequency fusion feature L(f f ), in order to use the frequency local context information to guide the spatial local context information, the specific expression is shown in formula (7):

[0106]

[0107] Where: ——Multiply point by point.

[0108] The global branch first extracts f based on the local extraction process. f Adaptive average pooling is used to simultaneously b Adaptive average pooling is also used to obtain global context information, and the two are combined to obtain the global spatial frequency fusion feature G(f f ), in order to use the frequency global context information to guide the spatial global context information, the specific expression is shown in formula (8):

[0109]

[0110] Where: AAP - Adaptive Average Pooling.

[0111] Combining the global branch with the local branch helps guide the full fusion of spatial information and frequency information to obtain the multi-scale spatial frequency fusion feature MS(f f ), as shown in formula (9):

[0112]

[0113] Where: ——Add point by point.

[0114] 5. Reconstruction of spatial features.

[0115] First, the multi-scale spatial frequency fusion feature MS(f f )Use the Softmax activation function to obtain the similarity operator between spatial frequencies, and combine the similarity operator with the spatial feature f b Multiply and combine with the learnable scaling factor α to reduce gradient instability, then add the multiplication result to f b The addition realizes the unification with the spatial features, and finally undergoes two convolutions of different sizes to further adapt to the understanding of the spatial frequency context information to achieve the reconstructed spatial features, denoted as I final ∈R 128×16×16 , as shown in formula (10):

[0116]

[0117] Where: conv1——1×1 convolution kernel, unfilled convolution;

[0118] conv2——3×3 convolution kernel, convolution with padding of 1.

[0119] The end of the model trunk will be I final The data is passed to the FCN decoding head to implement the segmentation task. Here, in order to balance the operation efficiency and segmentation accuracy, the decoding head output channel is readjusted, and a better segmentation effect can be achieved on the basis of reducing the number of parameters.

[0120] Step 4: Model training. The embodiment of the present invention uses the stochastic gradient descent method to train the improved model. The operating system is Ubuntu 18.04.6, the GPU model is NVIDIA GeForce RTX 2080Ti, the deep learning framework is PyTorch 1.13.1, the CUDA version is 11.6, the image size is 1920×1080 pixels, the training image input size is 512×512, the learning rate is 0.01, the momentum factor is 0.9, the batch size is 8, the number of training iterations is 80000, and the model training loss function curve is as follows: Figure 6 shown.

[0121] Step 5: Evaluate the model. The embodiment of the present invention evaluates the performance of the model through the mean intersection over union (MIoU), mean pixel accuracy (MPA), parameter quantity (Param), and computational complexity (FLOPs), where the calculation formulas for MIoU and MPA are as follows:

[0122]

[0123] Where: i——real category;

[0124] j – predicted category;

[0125] p ii ——The number of pixels whose predicted category is the same as the true category;

[0126] p ij ——False positives, the number of pixels of category i that are mistakenly classified as category j.

[0127]

[0128] The model obtained by training the improved BiSeNetV2 algorithm and the original model were used to perform segmentation and recognition experiments on the flooded road area at night. The results of MIoU, MPA, Param, and FLOPs are shown in the following table:

[0129] Table 1 Comparison results between BiSeNetV2 and improved algorithms

[0130] Model MIoU / % MPA / % Param / M FLOPs / G BiSeNetV2 83.70 89.24 3.341 12.285 Improved BiSeNetV2 85.88 91.41 3.138 11.386

[0131] As shown in Table 1, the improved algorithm has 2.18% and 2.17% higher MIoU and MPA than the original BiSeNetV2 algorithm, indicating that the improved model has higher segmentation accuracy for nighttime waterlogging area recognition. At the same time, the algorithm parameter amount and calculation amount are reduced by 0.203M and 0.899G respectively, which has advantages in recognition real-time performance and model size.

[0132] Step 6: Model application. The camera collects nighttime waterlogging images and transmits them to Jetson Nano for video frame processing. The original images of the waterlogged road surface and the labeled images are as follows: Figure 7 and Figure 8 As shown, the picture obtained by frame processing is input into the improved model for real-time segmentation, and the recognition prediction image is as follows Fig. 9 As shown in the figure, the effect model can accurately identify and locate the waterlogged area under complex lighting conditions. In the waterlogged road environment at night, Jetson Nano identifies and locates the waterlogged area, analyzes the recognition results and outputs adjustment parameters to control the headlight controller, thereby changing the illumination effect of the headlights to achieve safe driving.

[0133] Based on the above-mentioned method for identifying reflective areas of water accumulation on roads at night, an embodiment of the present invention also provides a system for identifying reflective areas of water accumulation on roads at night based on semantic segmentation, including the following functional modules: an acquisition module, a preprocessing module, a construction module, a training module and a recognition module.

[0134] The acquisition module of the embodiment of the present invention is used to acquire images of flooded road surfaces at night to obtain an original image data set;

[0135] The preprocessing module of the embodiment of the present invention is used to mark the waterlogged areas of each night waterlogged road surface image in the original image data set, and the marking types are ground and waterlogged, so as to obtain a marked image data set; the marked image data set is divided into a training set, a verification set, and a test set;

[0136] The construction module of the embodiment of the present invention is used to build a recognition model based on the BiSeNetV2 model; starting from the semantic branch of the BiSeNetV2 model, firstly, a two-dimensional discrete cosine change layer is added after each aggregation expansion layer to extract frequency features of different levels, and then each frequency feature is processed by an adaptive frequency processing layer to analyze the distribution of scene frequency data, and the weighted summation of the processed frequency features of each stage is obtained to obtain multi-level frequency features, and finally, a multi-scale spatial frequency fusion layer is used to fully integrate spatial information and frequency information from both global and local aspects to complete the reconstruction of spatial features guided by frequency information;

[0137] The training module of the embodiment of the present invention is used to train the recognition model based on the training set, the validation set, and the test set using the stochastic gradient descent method to obtain the target recognition model;

[0138] The recognition module of the embodiment of the present invention is used to input the image of the night-time flooded road surface to be identified into the target recognition model to obtain the night-time road water reflective area; the detailed processing process of the above-mentioned functional module can be specifically referred to the detailed description of the above-mentioned night-time road water reflective area identification method, which will not be repeated here.

[0139] The above description is only a detailed description of the preferred embodiments and principles of the present invention. For ordinary technicians in this field, according to the ideas provided by the present invention, there will be changes in the specific implementation methods, and these changes should also be regarded as the protection scope of the present invention.

Claims

1. A method for identifying reflective areas of water on roads at night based on semantic segmentation. It is characterized in that The following steps are involved: S1, collecting images of flooded roads at night to obtain original image data sets; S2, annotating the waterlogged areas of each nighttime waterlogged road surface image in the original image dataset, with the annotated types being ground and waterlogged, to obtain an annotated image dataset; Divide the labeled image dataset into training set, validation set, and test set; S3. Build a recognition model based on the BiSeNetV2 model; Starting from the semantic branch of the BiSeNetV2 model, first add a two-dimensional discrete cosine change layer after each aggregation expansion layer to extract frequency features at different levels, then use an adaptive frequency processing layer to process each frequency feature, analyze the scene frequency data distribution, and perform weighted summation of the processed frequency features at each stage to obtain multi-level frequency features. Finally, use a multi-scale spatial frequency fusion layer to fully integrate spatial information and frequency information from both global and local aspects, and complete the reconstruction of spatial features guided by frequency information. S4, based on the training set, the validation set, and the test set, the recognition model is trained using the stochastic gradient descent method to obtain a target recognition model; S5. Input the image of the waterlogged road surface to be identified at night into the target recognition model to obtain the waterlogged reflective area of ​​the road at night.

2. According to the method for identifying reflective areas of road water at night based on semantic segmentation according to claim 1, It is characterized in that In step S1, nighttime flooded road surface images of different scene types and different headlight illumination intensities are collected from various angles by a camera.

3. According to the method for identifying reflective areas of road water at night based on semantic segmentation in claim 1, It is characterized in that In step S2, the LabelMe tool is used to mark the waterlogged area.

4. According to the method for identifying reflective areas of road water at night based on semantic segmentation in claim 1, It is characterized in that In step S2, data enhancement is performed on each divided data set, and the data enhanced data set is used to construct a processed data set in accordance with the VOC2012 format.

5. According to the method for identifying reflective areas of road water at night based on semantic segmentation according to claim 1, It is characterized in that In step S3, the processing process of the two-dimensional discrete cosine change layer includes: According to the principle of image compression, the semantic features extracted by the bilateral aggregation expansion layer in the BiSeNetV2 model are first resized to 8×8 through an adaptive average pooling layer and recorded as spatial features f s , and then divide it into n parts from the channel dimension to get Where k∈{0,1,…,n-1}, n represents the number of frequency components, and C represents the number of channels. Then, the corresponding two-dimensional discrete cosine function DCT is used through formula (1) k The spatial characteristic components Converted into frequency characteristic components Where: (x, y) is the spatial position coordinate of the image pixel; u,v are the horizontal and vertical frequency components of the image pixels, u,v∈{0,1,…,8}; is the spatial characteristic component The value of the pixel position (x, y) in the image; is the variation kernel of the two-dimensional discrete cosine function; c(u),c(v) are compensation factors; in, And c(u), c(v) are shown in formula (2) and (3) respectively: Where: N is the image size; Finally, all the obtained frequency components are connected to form the multi-spectral frequency features corresponding to each aggregation expansion layer. Where m∈{0,1,2}, as shown in formula (4):

6. According to the method for identifying reflective areas of road water at night based on semantic segmentation according to claim 5, It is characterized in that In step S3, the adaptive frequency processing layer includes four parts. The first part is the residual branch, i.e., the multi-spectral frequency features after the semantic features of each aggregation expansion layer are processed. The second part is the maximum pooling layer, the third part is the average pooling layer, and the fourth part is the group convolution. The frequency features processed by the above four parts are weighted summed, and then the convolution operation is performed through a 3×3 convolution kernel to convert the number of frequency feature output channels to 128. Finally, the Softmax activation function is used to further extract the frequency features and regularize them to avoid overfitting, and the adaptive frequency features of each layer are obtained. As shown in formula (5): Where: p is a learnable parameter; G p As p changes, they represent residual connection, maximum pooling, average pooling, and grouped convolution operations respectively; B stands for batch normalization.

7. The method for identifying reflective areas of road water at night based on semantic segmentation according to claim 6, It is characterized in that In step S3, the semantic features output by each aggregation expansion layer in the semantic branch are sequentially processed through an adaptive average pooling layer, a two-dimensional discrete cosine change layer, and an adaptive frequency processing layer to obtain their respective frequency features. Adopt learnable parameters w for all frequency features m Perform point-by-point weighted sum to obtain multi-level frequency features f f ∈R 128×8×8 , the calculation formula is shown in formula (6); 8. The method for identifying reflective areas of road water at night based on semantic segmentation according to claim 7, It is characterized in that In step S3, the bilateral guided aggregation layer is used to output the spatial feature f b ∈R 128×16×16 , for multi-level frequency features f f Use bilinear interpolation to expand the size to the spatial feature f b Same, then for f f and f b A convolution operation with a size of 3×3 and padding of 1 is used to adjust the number of channels of both layers to 128. The multi-scale spatial frequency fusion layer starts from the global and local branches. The local branch first transforms the multi-level frequency features f f Convolution PWConv with a 1×1 convolution kernel 1 To reduce its channel to the original 1 / r, and then pass the convolution PWConv with a 1×1 convolution kernel 2 Restore to the original number of channels, obtain the local frequency feature, and combine it with the spatial feature f b Multiply point by point to obtain the local spatial frequency fusion feature L(f f ), as shown in formula (7): Where: ——Multiply point by point; The global branch first performs multi-level frequency features f f Adaptive average pooling is used to simultaneously b Adaptive average pooling is also used to obtain global context information, and the two are combined to obtain the global spatial frequency fusion feature G(f f ), as shown in formula (8): Where: AAP - Adaptive Average Pooling. The local spatial frequency fusion feature L(f f ) and the global spatial frequency fusion feature G(f f ) fusion, and obtain the multi-scale spatial frequency fusion feature MS(f f ), as shown in formula (9): Where: ——add point by point; The multi-scale spatial frequency fusion feature MS(f f )Use the Softmax activation function to obtain the similarity operator between spatial frequencies, and combine the similarity operator with the spatial feature f b Multiply and combine with the learnable scale factor α to reduce gradient instability, and then multiply the result with the spatial feature f b The addition realizes the unification with the spatial features, and finally undergoes two convolutions of different sizes to further adapt to the understanding of the spatial frequency context information to achieve the reconstructed spatial features, denoted as I final ∈R 128×16×16 , as shown in formula (10): Where: conv 1 It is a 1×1 convolution kernel with no padding; conv 2 The convolution kernel is 3×3 in size and filled with 1; The end of the model trunk will be I final The data is passed to the FCN decoding head to implement the segmentation task and identify the reflective area of ​​water on the road at night.

9. The method for identifying reflective areas of road water at night based on semantic segmentation according to claim 7, It is characterized in that In step S4, the performance of the model is evaluated by the average intersection-over-union ratio, average pixel accuracy, parameter quantity, and calculation amount.

10. A system for identifying reflective areas of water on roads at night based on semantic segmentation, using the method for identifying reflective areas of water on roads at night as described in any one of claims 1 to 9, It is characterized in that The nighttime road water reflection area recognition system comprises: The acquisition module is used to acquire images of flooded roads at night and obtain original image data sets; The preprocessing module is used to annotate the waterlogged areas of each nighttime waterlogged road surface image in the original image data set, with the annotated types being ground and waterlogged, to obtain an annotated image data set; the annotated image data set is divided into a training set, a validation set, and a test set; A construction module is used to build a recognition model based on the BiSeNetV2 model. Starting from the semantic branch of the BiSeNetV2 model, a two-dimensional discrete cosine change layer is first added after each aggregation expansion layer to extract frequency features at different levels. Each frequency feature is then processed by an adaptive frequency processing layer to analyze the distribution of scene frequency data. The frequency features of each stage after processing are weighted and summed to obtain multi-level frequency features. Finally, a multi-scale spatial frequency fusion layer is used to fully integrate spatial information and frequency information from both global and local aspects to complete the reconstruction of spatial features guided by frequency information. The training module is used to train the recognition model based on the training set, the validation set, and the test set using the stochastic gradient descent method to obtain the target recognition model; The recognition module is used to input the image of the nighttime flooded road surface to be recognized into the target recognition model to obtain the nighttime road flooded reflective area.

Citation Information

Cited By

  • Night semantic segmentation method and night semantic segmentation model training method and device

    CN119810449A

  • New energy sanitation vehicle sweeping control method and system fusing vision and radar, electronic equipment and storage medium

    CN121050455A

  • A new energy environmental sanitation vehicle cleaning control method and system combining vision and radar, electronic equipment and storage medium

    CN121050455B