Urban traffic passable domain detection method based on enhanced CBAM module
By enhancing the multi-scale spatial attention and semantically enhanced channel attention of the CBAM module, and combining dynamic weight adjustment, the problem of insufficient multi-scale and semantic discrimination ability of the CBAM module in urban traffic scenarios is solved, achieving higher detection accuracy and robustness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-07
- Publication Date
- 2026-04-14
AI Technical Summary
Existing CBAM modules lack multi-scale processing capabilities, have insufficient channel attention semantics, and poor robustness of static weighting mechanisms in urban traffic scenarios, leading to decreased detection accuracy and unstable model performance in dynamic environments.
An enhanced CBAM module is adopted, which constructs multi-scale spatial attention through parallel 3×3, 5×5, and 7×7 convolutional kernels. Combined with ASPP semantic features and dynamic weight adjustment, the model's ability to capture multi-scale information and semantic discrimination is improved, and it can dynamically adapt to environmental changes.
It significantly improves the accuracy and stability of urban traffic image segmentation tasks, enabling more accurate identification of target regions of different sizes and enhancing the model's detection accuracy and robustness in complex scenarios.
Smart Images

Figure CN121095908B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of autonomous driving, and more particularly to a method for detecting urban traffic accessibility zones based on an enhanced CBAM module. Background Technology
[0002] Current mainstream technologies related to this invention are typically based on deep learning models for semantic segmentation of urban traffic images to detect traffic-accessible areas (e.g., roads, lane lines, obstacles). These methods widely employ attention mechanisms to enhance the model's perceptual capabilities, with common representative modules including CBAM (Convolutional Block Attention Module) and SE (Squeeze-and-Excitation).
[0003] Among them, the CBAM module is the most typical lightweight attention mechanism module. It enhances the model's attention to key information in the image through two stages: channel attention and spatial attention. CBAM mainly generates attention weights through global average pooling and max pooling, effectively improving model performance with low computational cost. Therefore, it is widely used in traffic image segmentation tasks.
[0004] Typical applications include: adding CBAM to road detection models based on the DeepLabV3+ architecture to improve segmentation accuracy. In the field of autonomous driving, CBAM modules are embedded into backbone networks such as ResNet and UNet to improve the stability of traffic element detection.
[0005] Although the CBAM module can effectively improve model performance, it still has the following obvious shortcomings in complex urban traffic scenarios:
[0006] 1. Lack of multi-scale processing capability: The spatial attention module in CBAM uses a fixed-size convolutional kernel (usually 7×7) to process feature maps, which makes it difficult to distinguish traffic-accessible domains from targets of different scales such as pedestrians and vehicles, resulting in a decrease in detection accuracy.
[0007] 2. Insufficient semantics of channel attention: Existing CBAM relies on global pooling features to generate channel attention weights, lacks modeling of task-related semantics, and is difficult to effectively distinguish between foreground (such as roads) and background (such as buildings and shadows) in complex scenes.
[0008] 3. Static weighting mechanism has poor robustness: The original CBAM uses a static weighting mechanism, which lacks the ability to adapt to image features under dynamic environments (such as rain, night, and changes in lighting), resulting in unstable model performance in actual deployment. Summary of the Invention
[0009] The purpose of this invention is to address the shortcomings of existing technologies by providing a method for detecting urban traffic passability domains based on an enhanced CBAM module, thereby overcoming the deficiencies of traditional CBAM in terms of multi-scale, semantic differentiation, and dynamic scene adaptation.
[0010] To achieve the above objectives, the present invention provides a method for detecting urban traffic passability zones based on an enhanced CBAM module, the method comprising the following steps:
[0011] S1: Acquire RGB images of urban traffic scenes and perform preprocessing, including image resizing, Gaussian blur enhancement, and normalization.
[0012] S2: The preprocessed image is used to extract features through the ResNet-34 network to generate encoded feature vectors;
[0013] S3: Input the encoded feature vector into each dilated convolution branch to extract the ASPP feature vector;
[0014] S4: Input the ASPP feature vector into the enhanced CBAM module, and calculate the attention feature vector through semantic enhancement channel attention, multi-scale spatial attention and dynamic weight adjustment; concatenate and adjust the dimensions of the attention feature vectors of each dilated convolution branch to obtain the fused feature vector;
[0015] S5: Decode the fused feature vector to restore it to the original image size and adjust its dimensions to generate a semantic segmentation probability feature map;
[0016] S6: Binarize the semantic segmentation probability feature map to obtain the detection result map of the passable region.
[0017] Further, step S3 includes: inputting the encoded feature vector into dilated convolution branches with dilation rates of 1, 3, 6, and 9 to obtain four ASPP feature vectors.
[0018] Further, in step S4, the semantic enhancement channel attention operation is as follows: average pooling and max pooling are performed on the ASPP feature vector, utilizing... Convolution is used to calculate semantic enhancement features, followed by average pooling, and then channel feature vectors are calculated. The channel feature vectors are then multiplied at corresponding positions with the ASPP feature vectors to obtain the channel attention vectors.
[0019] Further, in step S4, the multi-scale spatial attention operation is as follows: The channel attention vectors are processed using average pooling and max pooling respectively; the features after average pooling and the features after max pooling are concatenated to obtain the first spatial feature vector; then, the multi-scale spatial attention is processed using... , , The convolutional layer extracts features from the first spatial feature vector to obtain the spatial scale feature vector; then, all spatial scale feature vectors are concatenated and processed... Convolution and sigmoid activation function are used to obtain the second spatial feature vector; the second spatial feature vector is multiplied with the channel attention vector at corresponding positions to obtain the spatial attention vector.
[0020] Further, in step S4, the influence of the channel attention vector and the spatial attention vector is balanced by dynamic weights to calculate the attention feature vector of each dilated convolution branch; the attention feature vectors of each dilated convolution branch are concatenated and then used... The convolution is adjusted in dimension to obtain a fused feature vector.
[0021] Further, step S5 includes: using bilinear upsampling to restore the image's width and height dimensions, obtaining features restored to the original image size; then using... Convolution is used to reduce the number of channels from 256 to 1 to obtain the adjusted features. Then, the sigmoid activation function is applied to the adjusted features to obtain the semantic segmentation probability feature map.
[0022] Further, step S6 includes: performing binarization processing on the semantic segmentation probability feature map to obtain a detection result map of the passable area; in the detection result map of the passable area, a value of 1 represents a passable region, including roads, lane lines, and obstacles; a value of 0 represents a non-passable region, including buildings and shadows.
[0023] To achieve the above objectives, the present invention also provides an urban traffic passability domain detection device based on an enhanced CBAM module for implementing the above method, comprising:
[0024] The image preprocessing module is used to resize, enhance with Gaussian blur, and normalize RGB images of urban traffic scenes.
[0025] The feature extraction module is used to extract ASPP feature vectors through the ResNet-34 network and each dilated convolution branch;
[0026] The attention enhancement module is used to perform semantic enhancement channel attention, multi-scale spatial attention, and dynamic weight adjustment on the ASPP feature vector to calculate the attention feature vector; the attention feature vectors of each dilated convolution branch are concatenated and their dimensions are adjusted to obtain the fused feature vector.
[0027] The decoding module is used to decode the fused feature vector to restore it to the original image size and adjust its dimensions to generate a semantic segmentation probability feature map.
[0028] The output module is used to binarize the semantic segmentation probability feature map to obtain the detection result map of the passable region.
[0029] To achieve the above objectives, the present invention also provides an electronic device, including a memory and a processor, wherein the memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the above-described urban traffic passability domain detection method based on an enhanced CBAM module.
[0030] To achieve the above objectives, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method for detecting urban traffic passability zones based on an enhanced CBAM module.
[0031] Compared with the prior art, the beneficial effects of the present invention are:
[0032] 1. Enhanced multi-scale spatial perception: By introducing 3×3, 5×5, and 7×7 convolutional kernels to construct parallel spatial attention channels, the model has a stronger ability to capture multi-scale information and more accurately identify target regions of different sizes.
[0033] 2. Channel attention semantic enhancement: Semantic feature branches from the ASPP module are added to the channel attention to enhance the model's ability to semantically distinguish between passable regions and background, thereby improving segmentation accuracy;
[0034] 3. Excellent overall performance: The overall architecture integrates multi-scale, semantic enhancement and dynamic adjustment mechanisms, which significantly improves the accuracy, stability and practicality of urban traffic image segmentation tasks. Attached Figure Description
[0035] Figure 1 This is a flowchart of the method of the present invention;
[0036] Figure 2 This is a schematic diagram of an electronic device according to the present invention. Detailed Implementation
[0037] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.
[0038] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The singular forms “a,” “the,” and “the” used in this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0039] It should be understood that although the terms first, second, third, etc., may be used in this invention to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first information may also be referred to as second information without departing from the scope of this invention, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0040] The present invention will now be described in detail with reference to the accompanying drawings. Unless otherwise specified, the features of the following embodiments and implementations can be combined with each other.
[0041] This invention provides an end-to-end urban traffic accessibility detection scheme, the key points of which include: constructing an enhanced CBAM module based on the original CBAM, achieving multi-scale spatial attention through parallel 3×3, 5×5, and 7×7 convolutional kernels, enhancing channel attention by fusing ASPP semantic features, and adaptively balancing channel and spatial attention using dynamic weights; the overall network uses ResNet-34 as the backbone, combining dilated convolution ASPP to extract multi-scale context, and then refining features through enhanced CBAM; the lightweight decoder uses bilinear upsampling and 1×1 convolution to restore spatial resolution and outputs a pixel-level accessibility probability map; finally, thresholding is used to obtain a binarized accessibility mask that can be directly used for path planning; the model uses binary cross-entropy loss for end-to-end training, with a small number of parameters and fast inference speed, and can run in real time on vehicle-mounted or roadside embedded devices.
[0042] This invention proposes an enhanced CBAM module, which introduces several targeted improvements compared to the original CBAM module in the prior art, aiming to improve the accuracy and robustness of urban traffic road passability detection. The following section summarizes its main differences and the objective improvements achieved through these differences, starting with a comparison with existing technologies.
[0043] First, unlike the original CBAM module which uses a fixed 7×7 convolutional kernel to calculate spatial attention, this invention introduces a multi-scale spatial attention mechanism, processing feature maps by using 3×3, 5×5, and 7×7 convolutional kernels in parallel. This design overcomes the limitation of the original module in capturing multi-scale road and obstacle features, enabling the model to more accurately identify targets of different sizes, thereby improving detection accuracy, especially in complex urban traffic scenarios.
[0044] Secondly, addressing the shortcomings of the original CBAM channel attention, which relies solely on global pooling features and lacks semantic information, this invention proposes semantically enhanced channel attention. By incorporating a semantic branch into the channel attention, semantically enhanced features are extracted from the ASPP output using 1×1 convolutions and combined with global average pooling features to generate weights that are more task-relevant.
[0045] See Figure 1 The present invention provides a method for detecting urban traffic accessibility zones based on an enhanced CBAM module, the specific steps of which are as follows:
[0046] S1: Input data preparation and data preprocessing.
[0047] The input data involved in this invention is: raw RGB images of urban traffic scenes captured by vehicle-mounted or roadside cameras. Each raw RGB image... It can be represented as ,in Indicates the height of the image. This represents the image width, and 3 represents the number of image channels. It should be noted that the height of images captured by different shooting devices varies. and width They may be different.
[0048] Data preprocessing includes image resizing, Gaussian blur enhancement, and normalization.
[0049] Image resizing: Because deep neural networks require input data to be of a uniform size, image resizing is necessary first. In this invention, the image size is adjusted to... :
[0050]
[0051] in, This represents the image after resizing.
[0052] Data Augmentation Based on Gaussian Blur: Due to limitations in hardware and external factors during shooting (weather, lighting, etc.), raw traffic scene images often contain noise. Therefore, Gaussian blur is first used for data augmentation. The purpose of this is to expose the model to images with different levels of blur during training, thereby improving the model's robustness to noise and blur.
[0053]
[0054] in, This is the image after Gaussian blurring. This is the Gaussian blur processing function. The standard deviation represents the hyperparameter of Gaussian blur and is used to adjust the range of the Gaussian width in the blur. In practice, different standard deviations can often be chosen for a single image. To generate multiple enhanced images.
[0055] Pixel value normalization processing: for image Performing maximum and minimum value normalization can accelerate the convergence of the deep learning model when the image is subsequently fed into it for training.
[0056]
[0057] in Representative image The pixel value of a certain pixel. Indicates the channel index.
[0058] S2: ResNet-34 based encoder.
[0059] After obtaining the image Next, the ResNet-34 network was used to extract image features and generate encoded feature vectors. :
[0060]
[0061] The encoded feature vector In terms of dimensions, it has a relatively small length and width, but a large number of channels. The 512 channels allow the network to encode rich semantic information, such as road texture, vehicle shape, background category, etc., supporting multi-scale processing and attention enhancement of subsequent ASPP and enhanced CBAM modules.
[0062] S3: Feature extraction based on dilated convolution.
[0063] Encode feature vectors The input is a feature extraction module based on atrous convolution to extract multi-scale semantic features; the feature extraction module based on atrous spatial pyramid pooling (ASPP) uses four atrous convolution branches with varying dilation rates. The kernel size is With a stride of 1 and 256 output channels, these four dilated convolution branches (1×1, 3×3, 6×6, 9×9) yield four ASPP feature vectors. :
[0064]
[0065] S4: Enhanced Convolutional Block Attention Module (CBAM).
[0066] For the multiple ASPP feature vectors generated in the previous step Using enhanced CBAM modules respectively Generate enhanced features :
[0067]
[0068] Subsequently, the enhanced features of each branch are spliced together, and through... Dimensionality reduction using convolution:
[0069]
[0070]
[0071] in, This represents the enhanced features after splicing the branches. This indicates a splicing operation. This represents the convolutional dimensionality reduction operation. The enhanced CBAM module contains the following four sub-modules: semantic enhancement, channel attention sub-module, etc. Multi-scale spatial attention submodule Dynamic weight adjustment submodule and the fusion splicing submodule These four sub-modules are connected in a sequential manner:
[0072]
[0073] The following will explain each of these four sub-modules:
[0074] The semantic enhancement channel attention submodule targets ASPP feature vectors. First, average pooling is performed. With max pooling :
[0075]
[0076] in, Indicates to Features after average pooling Indicates to Features after max pooling.
[0077] On the other hand, utilizing Convolutional computation of semantic enhancement features And perform average pooling operation:
[0078]
[0079] in, Indicates to Semantic enhancement features after convolutional dimensionality reduction Indicates to Features after average pooling.
[0080] Then the channel feature vectors are calculated. :
[0081]
[0082] in, , ,and Both represent fully connected neural networks with two hidden layers. This represents the sigmoid activation function.
[0083] Finally, and Perform corresponding position multiplication operations to obtain the channel attention vector. :
[0084]
[0085] The multi-scale spatial attention submodule is designed to... As input, the vector is first processed using average pooling and max pooling respectively to obtain the features. , :
[0086]
[0087] Then to and Perform a concatenation operation to obtain spatial feature vectors. :
[0088]
[0089] Then use respectively , , convolutional layers Feature extraction is performed to obtain spatial scale feature vectors. This design overcomes the limitations of the original CBAM module in capturing multi-scale road and obstacle features, enabling the model to more accurately identify targets of different sizes, thereby improving detection accuracy, especially in complex urban traffic scenarios.
[0090]
[0091] Then, all spatial scale feature vectors are concatenated, and then... Convolution and sigmoid activation function are used to obtain spatial feature vectors. :
[0092]
[0093] Finally, using and Perform corresponding position multiplication operations to obtain the spatial attention vector. :
[0094]
[0095] Dynamic weight adjustment submodule: This module obtains dynamically adjustable weights calculated by the neural network to balance the influence of the channel attention vector and the spatial attention vector, thereby calculating the final attention feature vector. :
[0096]
[0097] in, This represents the global average pooling feature vector extracted from the entire input image, used to characterize the global context information of the entire image, and serves as the input to the dynamic weight network. Indicates by The output scalar weights, ranging from 0 to 1, are used to adaptively balance between channel attention and spatial attention. The larger the value, the greater the contribution of channel attention; conversely, spatial attention dominates. This represents a two-layer fully connected network, with For input.
[0098] The fusion splicing sub-module has , , , The attention feature vectors of the four branches are concatenated and then used... The convolutions are adjusted for dimensionality to ultimately obtain the fused feature vector. :
[0099]
[0100] S5: Decoder.
[0101] fuse feature vectors Decode and restore the image to its original size, then adjust its dimensions to generate a semantic segmentation probability feature map. Fuse the feature vectors. It incorporates optimized multi-scale, attention-enhanced features from the image, supporting subsequent high-precision image segmentation tasks (e.g., segmentation of traffic-accessible regions). The decoder module then... The dimensions are adjusted to optimize the final output.
[0102] First, use bilinear upsampling To restore the image's length and width dimensions, the feature size is restored to the original image size. :
[0103]
[0104] Then use Convolution reduces the number of channels from 256 to 1, resulting in the adjusted features. :
[0105]
[0106] Finally, regarding features Using the sigmoid activation function, we obtain the semantic segmentation probability feature map. :
[0107]
[0108] at this time, Represents an image A given pixel represents the probability of the foreground (i.e., the passable region).
[0109] S6: Output module outputs semantic segmentation probability feature map Binarization is performed to obtain the detection result image of the passable area. :
[0110]
[0111] Where 1 represents a passable area (such as roads, lane lines, obstacles, etc.), and 0 represents the background (non-passable area, such as buildings, shadows, etc.). The detection results of passable areas can further improve the traffic efficiency, safety, and intelligence of urban roads.
[0112] It should be noted that the model training process of this invention is divided into the following two stages:
[0113] Phase 1: Training Data Preparation; The RGB images used for training and their corresponding passable region ground truth labels are processed uniformly according to the preprocessing procedure in step S1 (sizing adjustment, Gaussian blur enhancement, normalization). This ensures that the input distribution is consistent between the training and inference processes, avoiding covariate shift.
[0114] In stage 2, the training image processed in step S1 is fed into the encoder-ASPP-enhanced CBAM-decoder network from step S2 to step S5 to obtain the semantic segmentation probability feature map P.
[0115] Substitute P and the truth label Y into the binary cross-entropy loss function and use the binary cross-entropy loss function. To train the model:
[0116]
[0117] in, , Represents the length and width of the image. This represents the true label (1 for foreground, 0 for background).
[0118] The network parameters are updated through backpropagation until the loss converges or the preset number of iterations is reached.
[0119] Through model training, network weights are optimized end-to-end using labeled urban traffic scene data, enabling the multi-scale spatial attention, semantically enhanced channel attention, and dynamic weights in the enhanced CBAM module to automatically learn the optimal parameters for the passable domain detection task.
[0120] After the model training is completed, the binarized output of the network in step S6 can maintain high accuracy and high robustness in real road scenes that have not been seen before. At the same time, since the training and inference share the processing link from step S1 to step S5, it ensures that the weights obtained by training can be directly reused for real-time detection without additional conversion or post-processing.
[0121] The present invention also provides an urban traffic accessibility domain detection device based on an enhanced CBAM module, comprising:
[0122] The image preprocessing module is used to resize, enhance with Gaussian blur, and normalize RGB images of urban traffic scenes.
[0123] The feature extraction module is used to extract ASPP feature vectors through the ResNet-34 network and each dilated convolution branch;
[0124] The attention enhancement module is used to perform semantic enhancement channel attention, multi-scale spatial attention, and dynamic weight adjustment on the ASPP feature vector to calculate the attention feature vector; the attention feature vectors of each dilated convolution branch are concatenated and their dimensions are adjusted to obtain the fused feature vector.
[0125] The decoding module is used to decode the fused feature vector to restore it to the original image size and adjust its dimensions to generate a semantic segmentation probability feature map.
[0126] The output module is used to binarize the semantic segmentation probability feature map to obtain the detection result map of the passable region.
[0127] Corresponding to the aforementioned embodiments of the urban traffic passability domain detection method based on an enhanced CBAM module, this application also provides an electronic device, including: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the urban traffic passability domain detection method based on an enhanced CBAM module as described above. Figure 2 The diagram shown is a hardware structure diagram of any device with data processing capabilities for the urban traffic passability domain detection method based on the enhanced CBAM module provided in this application embodiment, except... Figure 2 In addition to the processor, memory, DMA controller, disk, and non-volatile memory shown, any data processing device in the embodiment may also include other hardware depending on the actual function of the data processing device, which will not be described in detail here.
[0128] Corresponding to the aforementioned embodiments of the urban traffic passability zone detection method based on the enhanced CBAM module, this embodiment of the invention also provides a computer-readable storage medium storing a program thereon, which, when executed by a processor, implements the urban traffic passability zone detection method based on the enhanced CBAM module in the above embodiments.
[0129] The computer-readable storage medium can be an internal storage unit of any data processing device described in any of the foregoing embodiments, such as a hard disk or memory. The computer-readable storage medium can also be any data processing device, such as a plug-in hard disk, smart media card (SMC), SD card, flash card, etc., equipped on the device. Furthermore, the computer-readable storage medium can include both internal storage units of any data processing device and external storage devices. The computer-readable storage medium is used to store the computer program and other programs and data required by the data processing device, and can also be used to temporarily store data that has been output or will be output.
[0130] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
[0131] The above embodiments are only used to illustrate the design concept and features of the present invention, and their purpose is to enable those skilled in the art to understand the content of the present invention and implement it accordingly. The protection scope of the present invention is not limited to the above embodiments. Therefore, all equivalent changes or modifications made based on the principles and design ideas disclosed in the present invention are within the protection scope of the present invention.
Claims
1. A method for detecting urban traffic accessibility domains based on an enhanced CBAM module, characterized in that, The method includes the following steps: S1: Acquire RGB images of urban traffic scenes and perform preprocessing, including image resizing, Gaussian blur enhancement, and normalization. S2: The preprocessed image is used to extract features through the ResNet-34 network to generate encoded feature vectors; S3: Input the encoded feature vector into each dilated convolution branch to extract the ASPP feature vector; S4: Input the ASPP feature vector into the enhanced CBAM module, and calculate the attention feature vector through semantic enhancement channel attention, multi-scale spatial attention and dynamic weight adjustment; concatenate and adjust the dimensions of the attention feature vectors of each dilated convolution branch to obtain the fused feature vector; The semantic enhancement channel attention includes: performing average pooling, max pooling, and convolutional dimensionality reduction operations on the ASPP feature vectors respectively; calculating the channel feature vectors using the features obtained from average pooling, max pooling, and convolutional dimensionality reduction; and then multiplying the channel attention vectors with the ASPP feature vectors to obtain the channel attention vectors. The multi-scale spatial attention includes: performing average pooling and max pooling on the channel attention vectors respectively; concatenating the features obtained by average pooling and max pooling; performing convolution operations at different scales on the concatenated features to obtain spatial feature vectors; and then multiplying them with the channel attention vectors to obtain the spatial attention vector. The dynamic weight adjustment includes: calculating the attention feature vector of each dilated convolution branch by balancing the influence of the channel attention vector and the spatial attention vector through dynamic weight balancing; S5: Decode the fused feature vector to restore it to the original image size and adjust its dimensions to generate a semantic segmentation probability feature map; S6: Binarize the semantic segmentation probability feature map to obtain the detection result map of the passable region.
2. The urban traffic accessibility domain detection method based on the enhanced CBAM module according to claim 1, characterized in that, Step S3 includes: inputting the encoded feature vector into dilated convolution branches with dilation rates of 1, 3, 6, and 9 to obtain four ASPP feature vectors.
3. The urban traffic accessibility domain detection method based on the enhanced CBAM module according to claim 1, characterized in that, In step S4, the semantic enhancement channel attention operation is as follows: Average pooling and max pooling are performed on the ASPP feature vector, utilizing... Convolutional computation of semantic enhancement features And perform average pooling operation: ; in, This indicates the ASPP eigenvector. Semantic enhancement features after convolutional dimensionality reduction The value ranges from 1 to n, where n is the number of dilated convolution branches; Indicates to Features after average pooling This indicates the average pooling operation. This represents the convolution dimensionality reduction operation; Then the channel feature vectors are calculated. : ; in, , and Both represent fully connected neural networks with two hidden layers. Represents the sigmoid activation function; Indicates to Features after average pooling Indicates to Features after max pooling; Then, the channel feature vector is multiplied at corresponding positions by the ASPP feature vector to obtain the channel attention vector.
4. The urban traffic accessibility domain detection method based on the enhanced CBAM module according to claim 3, characterized in that, In step S4, the multi-scale spatial attention operation is as follows: The channel attention vectors are processed using average pooling and max pooling respectively; the features after average pooling and the features after max pooling are concatenated to obtain the first spatial feature vector; then, the multi-scale spatial attention is processed using... , , The convolutional layer extracts features from the first spatial feature vector to obtain the spatial scale feature vector; then, all spatial scale feature vectors are concatenated and processed... Convolution and sigmoid activation function are used to obtain the second spatial feature vector; the second spatial feature vector is multiplied with the channel attention vector at corresponding positions to obtain the spatial attention vector.
5. The urban traffic accessibility domain detection method based on the enhanced CBAM module according to claim 4, characterized in that, In step S4, the influence of the channel attention vector and the spatial attention vector is balanced by dynamic weights to calculate the attention feature vector of each dilated convolution branch; the attention feature vectors of each dilated convolution branch are concatenated and then used... The convolution is adjusted in dimension to obtain a fused feature vector.
6. The urban traffic accessibility domain detection method based on the enhanced CBAM module according to claim 1, characterized in that, Step S5 includes: using bilinear upsampling to restore the image's width and height dimensions, obtaining features restored to the original image size; then using... Convolution is used to reduce the number of channels from 256 to 1 to obtain the adjusted features. Then, the sigmoid activation function is applied to the adjusted features to obtain the semantic segmentation probability feature map.
7. The urban traffic accessibility domain detection method based on the enhanced CBAM module according to claim 1, characterized in that, Step S6 includes: performing binarization processing on the semantic segmentation probability feature map to obtain the detection result map of the passable area; in the detection result map of the passable area, a value of 1 represents a passable region, including roads, lane lines, and obstacles; a value of 0 represents a non-passable region, including buildings and shadows.
8. A device for detecting urban traffic accessibility zones based on an enhanced CBAM module, implementing the method as described in claim 1, comprising: The image preprocessing module is used to resize, enhance with Gaussian blur, and normalize RGB images of urban traffic scenes. The feature extraction module is used to extract ASPP feature vectors through the ResNet-34 network and each dilated convolution branch; The attention enhancement module is used to perform semantic enhancement channel attention, multi-scale spatial attention, and dynamic weight adjustment on the ASPP feature vector to calculate the attention feature vector; the attention feature vectors of each dilated convolution branch are concatenated and their dimensions are adjusted to obtain the fused feature vector. The decoding module is used to decode the fused feature vector to restore it to the original image size and adjust its dimensions to generate a semantic segmentation probability feature map. The output module is used to binarize the semantic segmentation probability feature map to obtain the detection result map of the passable region.
9. An electronic device comprising a memory and a processor, characterized in that, The memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the urban traffic passability domain detection method based on the enhanced CBAM module as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the urban traffic accessibility domain detection method based on the enhanced CBAM module as described in any one of claims 1-7.
Citation Information
Patent Citations
Impurity identification method and device for steel microstructure based on improved FCN network
CN116740707A
Juvenile fish limb identification method based on multi-scale cascaded perceptual convolutional neural network
US20230343128A1