Road surface full-element image semantic segmentation method and device based on BiSeNetV2
Through the weight allocation and feature fusion of detailed branches and semantic branches of BiSeNet V2, the problem of indistinguishability of pavement elements and background in semantic segmentation of pavement full-feature image is solved, and more accurate semantic segmentation and recognition are achieved.
Patent Information
- Application Number
- CN202210163088.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-22
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2042-02-22
AI Technical Summary
In the prior art, BiSeNet V2 cannot accurately distinguish the pavement elements and background in the pavement full-factor image semantic segmentation, resulting in poor segmentation effect.
Through the details and semantic branches of BiSeNet V2, the detailed feature map of the pavement image and the semantic feature map of different resolutions are obtained respectively. Through the weight allocation and feature fusion module, the pavement element characteristics of the semantic feature map are enhanced, background features are suppressed, and segmentation accuracy is improved.
It realizes precise semantic segmentation of all pavement elements of pavement images, improves the semantic segmentation effect, and enhances the ability to identify all pavement elements.
Smart Images

Figure CN114548275B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of navigation technology, and in particular to a method and device for semantic segmentation of road surface full-element images based on BiSeNetV2. Background Art
[0002] In related technologies, road surface elements include traffic signs, such as lines, arrows, text, elevation markings, raised road signs, and delineators. Accurately identifying these elements through images is a crucial prerequisite for autonomous vehicles to operate safely and intelligently. Related technologies use neural networks to perform semantic segmentation on images. Based on the segmentation results, they identify all road surface elements, providing accurate road information for autonomous vehicle navigation and enabling safe autonomous driving.
[0003] Related technologies for semantic segmentation of full-element road surface images consider all road surface elements as important information, while the background is secondary. However, these technologies use BiSeNet V2 (Bilateral Segmentation Network) for semantic segmentation of full-element road surface images, treating all road surface elements and background equally. This makes it impossible to accurately segment all road surface elements, resulting in poor semantic segmentation results. Summary of the Invention
[0004] In order to solve or partially solve the problems existing in the related technology, the present application provides a method and device for semantic segmentation of road surface full-element images based on BiSeNetV2, which can accurately semantically segment all road surface elements of road surface images and improve the semantic segmentation effect of road surface images.
[0005] In a first aspect, the present application provides a method for semantic segmentation of a road surface full-element image based on BiSeNetV2, the method comprising:
[0006] Obtain the detail feature map of the road image through the detail branch of BiSeNet V2;
[0007] Obtaining a semantic feature map with a resolution of 1 / 8, a semantic feature map with a resolution of 1 / 16, and a semantic feature map with a resolution of 1 / 32 of the road surface image through the semantic branch of the BiSeNet V2;
[0008] Weights are assigned to the semantic feature map with a resolution of 1 / 8, the semantic feature map with a resolution of 1 / 16, and the semantic feature map with a resolution of 1 / 32 through the semantic branch to obtain the semantic feature map with a resolution of 1 / 8, the semantic feature map with a resolution of 1 / 16, and the semantic feature map with a resolution of 1 / 32 with weighted attention;
[0009] The detail feature map and the semantic feature map with a resolution of 1 / 8, a resolution of 1 / 16, and a resolution of 1 / 32 with weighted attention are fused through the feature fusion module of the BiSeNet V2 to obtain a fused feature map;
[0010] The semantic segmentation result of the road surface image is obtained by the BiSeNet V2 according to the fused feature map.
[0011] Preferably, the obtaining of a semantic feature map with a resolution of 1 / 8, a semantic feature map with a resolution of 1 / 16, and a semantic feature map with a resolution of 1 / 32 of the road surface image through the semantic branch of the BiSeNet V2 includes:
[0012] Downsampling the road image by a factor of 2 using a 2x downsampling layer of the semantic branch of the BiSeNet V2 to obtain a semantic feature map with a resolution of 1 / 2 of the road image, wherein the 2x downsampling layer includes a 7x7 convolution;
[0013] According to the semantic feature map with a resolution of 1 / 2, a semantic feature map with a resolution of 1 / 8, a semantic feature map with a resolution of 1 / 16, and a semantic feature map with a resolution of 1 / 32 of the road surface image are obtained in sequence through the semantic branch.
[0014] Preferably, the semantic feature map with a resolution of 1 / 8, the semantic feature map with a resolution of 1 / 16, and the semantic feature map with a resolution of 1 / 32 are weighted by the semantic branch to obtain the semantic feature map with a resolution of 1 / 8, the semantic feature map with a resolution of 1 / 16, and the semantic feature map with a resolution of 1 / 32 with weighted attention, including: assigning channel weights to each channel of the semantic feature map with a resolution of 1 / 8, the semantic feature map with a resolution of 1 / 16, and the semantic feature map with a resolution of 1 / 32 through the channel attention module of the semantic branch to obtain the semantic feature map with a resolution of 1 / 8, the semantic feature map with a resolution of 1 / 16, and the semantic feature map with a resolution of 1 / 32 with channel weighted attention.
[0015] Preferably, the channel attention module of the semantic branch assigns a channel weight to each channel of the semantic feature map with a resolution of 1 / 8, the semantic feature map with a resolution of 1 / 16, and the semantic feature map with a resolution of 1 / 32, respectively, to obtain a semantic feature map with a resolution of 1 / 8, a semantic feature map with a resolution of 1 / 16, and a semantic feature map with a resolution of 1 / 32 with channel weight attention, including:
[0016] Assigning a channel weight to each channel of the semantic feature map with a resolution of 1 / 8 by the first channel attention module of the semantic branch, to obtain a semantic feature map with a resolution of 1 / 8 with channel weight attention;
[0017] Assigning a channel weight to each channel of the semantic feature map with a resolution of 1 / 16 through the second channel attention module of the semantic branch to obtain a semantic feature map with a resolution of 1 / 16 with channel weight attention;
[0018] A channel weight is assigned to each channel of the semantic feature map with a resolution of 1 / 32 through the third channel attention module of the semantic branch to obtain a semantic feature map with a resolution of 1 / 32 with channel weight attention.
[0019] Preferably, the weight distribution of the semantic feature map with a resolution of 1 / 8, the semantic feature map with a resolution of 1 / 16, and the semantic feature map with a resolution of 1 / 32 by the semantic branch to obtain the semantic feature map with a resolution of 1 / 8, the semantic feature map with a resolution of 1 / 16, and the semantic feature map with a resolution of 1 / 32 with weighted attention further includes:
[0020] Assigning spatial weights to different spatial positions of the semantic feature map with a resolution of 1 / 8 with channel weight attention through the first spatial attention module of the semantic branch, to obtain a semantic feature map with a resolution of 1 / 8 with channel weight attention and spatial weight attention;
[0021] Assigning spatial weights to different spatial positions of the semantic feature map with a resolution of 1 / 16 and channel weighted attention through the second spatial attention module of the semantic branch, thereby obtaining a semantic feature map with a resolution of 1 / 16 and channel weighted attention and spatial weighted attention;
[0022] The third spatial attention module of the semantic branch assigns spatial weights to different spatial positions of the semantic feature map with a resolution of 1 / 32 with channel weight attention, thereby obtaining a semantic feature map with a resolution of 1 / 32 with channel weight attention and spatial weight attention.
[0023] A second aspect of the present application provides a road surface full-element image semantic segmentation device based on BiSeNetV2, the device comprising:
[0024] Detail feature acquisition module, used to obtain detail feature maps of road images through the detail branch of BiSeNet V2;
[0025] A semantic feature acquisition module, configured to obtain a semantic feature map with a resolution of 1 / 8, a semantic feature map with a resolution of 1 / 16, and a semantic feature map with a resolution of 1 / 32 of the road surface image through the semantic branch of the BiSeNet V2;
[0026] A weight allocation module is used to perform weight allocation on the semantic feature map with a resolution of 1 / 8, the semantic feature map with a resolution of 1 / 16, and the semantic feature map with a resolution of 1 / 32 obtained by the semantic feature acquisition module through the semantic branch, to obtain the semantic feature map with a resolution of 1 / 8, the semantic feature map with a resolution of 1 / 16, and the semantic feature map with a resolution of 1 / 32 with weighted attention;
[0027] A fusion feature acquisition module is configured to fuse the detail feature map obtained by the detail feature acquisition module and the semantic feature map with a resolution of 1 / 8, a resolution of 1 / 16, and a resolution of 1 / 32 obtained by the weight allocation module through the feature fusion module of the BiSeNet V2 to obtain a fused feature map;
[0028] The segmentation result acquisition module is used to obtain the semantic segmentation result of the road surface image through the BiSeNet V2 according to the fused feature map obtained by the fusion feature acquisition module.
[0029] Preferably, the semantic feature acquisition module is further used to downsample the road surface image by 2 times through the 2 times downsampling layer of the semantic branch of the BiSeNet V2 to obtain a semantic feature map with a resolution of 1 / 2 of the road surface image, wherein the 2 times downsampling layer includes a 7x7 convolution; based on the semantic feature map with a resolution of 1 / 2, a semantic feature map with a resolution of 1 / 8, a semantic feature map with a resolution of 1 / 16, and a semantic feature map with a resolution of 1 / 32 of the road surface image are obtained in sequence through the semantic branch.
[0030] Preferably, the weight distribution module includes a channel weight distribution submodule;
[0031] The channel weight assignment submodule is used to assign a channel weight to each channel of the semantic feature map with a resolution of 1 / 8 obtained by the semantic feature acquisition module through the first channel attention module of the semantic branch, so as to obtain a semantic feature map with a resolution of 1 / 8 with channel weight attention; assign a channel weight to each channel of the semantic feature map with a resolution of 1 / 16 obtained by the semantic feature acquisition module through the second channel attention module of the semantic branch, so as to obtain a semantic feature map with a resolution of 1 / 16 with channel weight attention; assign a channel weight to each channel of the semantic feature map with a resolution of 1 / 32 obtained by the semantic feature acquisition module through the third channel attention module of the semantic branch, so as to obtain a semantic feature map with a resolution of 1 / 32 with channel weight attention.
[0032] Preferably, the weight distribution module further includes a spatial weight distribution submodule;
[0033] The spatial weight allocation submodule is used to allocate spatial weights to different spatial positions of the semantic feature map with a resolution of 1 / 8 and channel weight attention obtained by the channel weight allocation submodule through the first spatial attention module of the semantic branch, so as to obtain a semantic feature map with a resolution of 1 / 8 and channel weight attention and spatial weight attention; allocate spatial weights to different spatial positions of the semantic feature map with a resolution of 1 / 16 and channel weight attention obtained by the channel weight allocation submodule through the second spatial attention module of the semantic branch, so as to obtain a semantic feature map with a resolution of 1 / 16 and channel weight attention and spatial weight attention; allocate spatial weights to different spatial positions of the semantic feature map with a resolution of 1 / 32 and channel weight attention obtained by the channel weight allocation submodule through the third spatial attention module of the semantic branch, so as to obtain a semantic feature map with a resolution of 1 / 32 and channel weight attention.
[0034] A third aspect of the present application provides an electronic device, including:
[0035] processor; and
[0036] The memory stores executable codes thereon, and when the executable codes are executed by the processor, the processor is caused to execute the method described above.
[0037] A fourth aspect of the present application provides a computer-readable storage medium having executable code stored thereon. When the executable code is executed by a processor of an electronic device, the processor is caused to execute the method described above.
[0038] The technical solution provided by this application may have the following beneficial effects:
[0039] The technical solution of the present application assigns weights to the semantic feature map with a resolution of 1 / 8, the semantic feature map with a resolution of 1 / 16, and the semantic feature map with a resolution of 1 / 32, and obtains the semantic feature map with a resolution of 1 / 8, the semantic feature map with a resolution of 1 / 16, and the semantic feature map with a resolution of 1 / 32 with weighted attention. The road surface element features of the semantic feature map are enhanced in the channel dimension, and the background features of the semantic feature map are suppressed to determine the spatial position where the semantic feature map needs to focus. The solution can accurately semantically segment all road surface elements of the road surface image, thereby improving the semantic segmentation effect of the road surface image.
[0040] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The above and other objects, features and advantages of the present application will become more apparent by describing in more detail exemplary embodiments of the present application in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments of the present application.
[0042] Figure 1 1 is a flowchart of a method for semantic segmentation of a road surface full-element image based on BiSeNetV2 according to an embodiment of the present application;
[0043] Figure 2 This is another flowchart of the method for semantic segmentation of road surface full-element images based on BiSeNetV2 shown in an embodiment of the present application;
[0044] Figure 3 Schematic diagram of the structure of the road surface full-element image semantic segmentation device based on BiSeNetV2 shown in an embodiment of the present application;
[0045] Figure 4 2 is another structural diagram of a road surface full-element image semantic segmentation device based on BiSeNetV2 shown in an embodiment of the present application;
[0046] Figure 5 It is a structural diagram of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION
[0047] The following describes embodiments of the present application in more detail with reference to the accompanying drawings. Although the accompanying drawings illustrate embodiments of the present application, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. Rather, these embodiments are provided to make the present application more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.
[0048] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. As used in this application and the appended claims, the singular forms "a," "an," "the," and "the" are 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 encompasses any and all possible combinations of one or more of the associated listed items.
[0049] It should be understood that although the terms "first", "second", "third", etc. may be used in this application 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 each other. For example, without departing from the scope of this 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. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0050] The embodiment of the present application provides a method for semantic segmentation of a road surface full-element image based on BiSeNetV2, which can accurately semantically segment all road surface elements in a road surface image and improve the semantic segmentation effect of the road surface image.
[0051] Example 1:
[0052] The technical solutions of the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0053] Figure 1 This is a flow chart of the method for semantic segmentation of full-element road surface images based on BiSeNetV2 shown in an embodiment of the present application.
[0054] See also Figure 1 , a road surface full-element image semantic segmentation method based on BiSeNetV2, including:
[0055] In step S101 , a detail feature map of a road surface image is obtained through the detail branch of BiSeNet V2.
[0056] In one embodiment, a road surface image is preprocessed to obtain a road surface image of a set resolution. The road surface image of the set resolution is input into BiSeNet V2. The detail branch of BiSeNet V2 is used to output a detail feature map of the road surface image at a resolution of 1 / 2, a detail feature map of the road surface image at a resolution of 1 / 4, and a detail feature map of the road surface image at a resolution of 1 / 8.
[0057] In step S102 , a semantic feature map with a resolution of 1 / 8, a semantic feature map with a resolution of 1 / 16, and a semantic feature map with a resolution of 1 / 32 of the road surface image is obtained through the semantic branch of BiSeNet V2.
[0058] In one embodiment, the semantic branch of BiSeNet V2 is used to obtain, based on the road image of the set resolution size, a semantic feature map of the road image output by the semantic branch with a resolution of 1 / 2 of the set resolution, a semantic feature map of the road image with a resolution of 1 / 4 of the set resolution, a semantic feature map of the road image with a resolution of 1 / 8 of the set resolution, a semantic feature map of the road image with a resolution of 1 / 16 of the set resolution, and a semantic feature map of the road image with a resolution of 1 / 32 of the set resolution.
[0059] In step S103, weights are assigned to the semantic feature map with a resolution of 1 / 8, the semantic feature map with a resolution of 1 / 16, and the semantic feature map with a resolution of 1 / 32 through semantic branches to obtain the semantic feature map with a resolution of 1 / 8, the semantic feature map with a resolution of 1 / 16, and the semantic feature map with a resolution of 1 / 32 with weighted attention.
[0060] In one embodiment, a channel attention module of the semantic branch can be used to assign different channel weights to each channel of a semantic feature map with a resolution of 1 / 8, a semantic feature map with a resolution of 1 / 16, and a semantic feature map with a resolution of 1 / 32, respectively, to obtain a semantic feature map with a resolution of 1 / 8, a semantic feature map with a resolution of 1 / 16, and a semantic feature map with a resolution of 1 / 32 with channel weight attention after assigning different channel weights.
[0061] In one embodiment, different spatial weights can be assigned to different spatial positions of a semantic feature map with a resolution of 1 / 8, a semantic feature map with a resolution of 1 / 16, and a semantic feature map with a resolution of 1 / 32 through a spatial attention module of a semantic branch, thereby obtaining a semantic feature map with a resolution of 1 / 8, a semantic feature map with a resolution of 1 / 16, and a semantic feature map with a resolution of 1 / 32 having spatial weight attention after assigning different spatial weights.
[0062] In step S104, the detail feature map and the semantic feature map with a resolution of 1 / 8, a semantic feature map with a resolution of 1 / 16, and a semantic feature map with a resolution of 1 / 32 with weighted attention are fused through the feature fusion module of BiSeNet V2 to obtain a fused feature map.
[0063] In one embodiment, the obtained detail feature map with a resolution of 1 / 2, the detail feature map with a resolution of 1 / 4, and the detail feature map with a resolution of 1 / 8 of the detail branch, and the obtained semantic feature map with a resolution of 1 / 8 with channel weight attention and / or spatial weight attention, the semantic feature map with a resolution of 1 / 16, and the semantic feature map with a resolution of 1 / 32 of the semantic branch are input into the feature fusion module of BiSeNet V2; the detail feature map of the semantic branch and the semantic feature map of the detail branch are feature fused through the feature fusion module to obtain a fused feature map.
[0064] In step S105 , a semantic segmentation result of the road surface image is obtained based on the fused feature map using BiSeNet V2.
[0065] In one embodiment, a semantic segmentation result of a road surface image output by BiSeNet V2 is obtained based on the fused feature map. Based on the semantic segmentation result output by BiSeNet V2, all road surface features of the road surface image are obtained. These road surface features include road traffic signs, such as various lines, arrows, text, elevation markings, raised road signs, and delineators marked on the road surface.
[0066] The embodiment of the present application shows a method for semantic segmentation of a full-element road surface image based on BiSeNetV2, which assigns weights to a semantic feature map with a resolution of 1 / 8, a semantic feature map with a resolution of 1 / 16, and a semantic feature map with a resolution of 1 / 32, to obtain a semantic feature map with a resolution of 1 / 8, a semantic feature map with a resolution of 1 / 16, and a semantic feature map with a resolution of 1 / 32 with weighted attention, strengthens the road surface element features of the semantic feature map in the channel dimension, and suppresses the background features of the semantic feature map to determine the spatial position where the semantic feature map needs to focus, and can accurately perform semantic segmentation on all road surface elements of the road surface image, thereby improving the semantic segmentation effect of the road surface image.
[0067] Example 2:
[0068] Figure 2 This is another flowchart of the method for semantic segmentation of road surface full-element images based on BiSeNetV2 shown in an embodiment of the present application. Figure 2 Relative to Figure 1 The scheme of the present application is described in more detail.
[0069] See also Figure 2 , a road surface full-element image semantic segmentation method based on BiSeNetV2, including:
[0070] In step S201 , a detail feature map of a road surface image is obtained through the detail branch of BiSeNet V2.
[0071] This step can be referred to the description of step S101 and will not be repeated here.
[0072] In step S202, the road surface image is downsampled by a factor of 2 using the 2x downsampling layer of the semantic branch of BiSeNet V2 to obtain a semantic feature map with a resolution of 1 / 2 of the road surface image, wherein the 2x downsampling layer includes a 7x7 convolution.
[0073] In one embodiment, the road image is downsampled using a 7x7 convolution in the first layer of the BiSeNet V2 semantic branch using a 2x downsampling layer to obtain a semantic feature map with a resolution of 1 / 2 that is 1 / 2 the set resolution. Downsampling using a 2x downsampling layer including a 7x7 convolution to obtain a semantic feature map with a resolution of 1 / 2 gives the semantic feature map a larger receptive field, better and more comprehensive global features, preserves rich semantic information, and enhances the semantic expression capability of the semantic branch.
[0074] In step S203, based on the semantic feature map with a resolution of 1 / 2, a semantic feature map with a resolution of 1 / 8, a semantic feature map with a resolution of 1 / 16, and a semantic feature map with a resolution of 1 / 32 of the road surface image are obtained in sequence through semantic branching.
[0075] In one embodiment, a semantic feature map with a resolution of 1 / 4 of a road surface image with a set resolution of 1 / 4 is obtained based on a semantic feature map with a resolution of 1 / 2 through a 4-fold downsampling layer of the second layer of the semantic branch of BiSeNet V2; a semantic feature map with a resolution of 1 / 8 of a road surface image with a set resolution of 1 / 8 is obtained based on a semantic feature map with a resolution of 1 / 4 through an 8-fold downsampling layer of the third layer of the semantic branch of BiSeNet V2; a semantic feature map with a resolution of 1 / 16 of a road surface image with a set resolution of 1 / 16 is obtained based on a semantic feature map with a resolution of 1 / 8 through a 16-fold downsampling layer of the fourth layer of the semantic branch of BiSeNet V2; a semantic feature map with a resolution of 1 / 32 of a road surface image with a set resolution of 1 / 32 is obtained based on a semantic feature map with a resolution of 1 / 16 through a 32-fold downsampling layer of the fifth layer of the semantic branch of BiSeNet V2.
[0076] In step S204, channel weights are assigned to each channel of the semantic feature map with a resolution of 1 / 8, the semantic feature map with a resolution of 1 / 16, and the semantic feature map with a resolution of 1 / 32 through the channel attention module of the semantic branch to obtain semantic feature maps with a resolution of 1 / 8, a semantic feature map with a resolution of 1 / 16, and a semantic feature map with a resolution of 1 / 32 with channel weight attention.
[0077] In one embodiment, the channel attention module can learn the channel weights of each different channel of semantic feature maps with different resolutions, that is, the information on the importance of each different channel of semantic feature maps with different resolutions; the channel weights learned by the channel attention module are respectively assigned to each channel of the semantic feature map with a resolution of 1 / 8, the semantic feature map with a resolution of 1 / 16, and the semantic feature map with a resolution of 1 / 32, to obtain semantic feature maps with a resolution of 1 / 8, a semantic feature map with a resolution of 1 / 16, and a semantic feature map with a resolution of 1 / 32 with channel weight attention.
[0078] In one embodiment, the channel attention module of the semantic branch includes a first channel attention module, a second channel attention module, and a third channel attention module. The first channel attention module of the semantic branch assigns a channel weight to each channel of the semantic feature map with a resolution of 1 / 8, thereby obtaining a semantic feature map with a resolution of 1 / 8 having channel weight attention; the second channel attention module of the semantic branch assigns a channel weight to each channel of the semantic feature map with a resolution of 1 / 16, thereby obtaining a semantic feature map with a resolution of 1 / 16 having channel weight attention; the third channel attention module of the semantic branch assigns a channel weight to each channel of the semantic feature map with a resolution of 1 / 32, thereby obtaining a semantic feature map with a resolution of 1 / 32 having channel weight attention.
[0079] In one embodiment, a semantic feature map with a resolution of 1 / 8 is used as the input of a first channel attention module, so that the first channel attention module learns the channel weight of each channel of the semantic feature map with a resolution of 1 / 8 based on the semantic feature map with a resolution of 1 / 8; the channel weight learned by the first channel attention module is used to perform channel weight assignment on each channel of the semantic feature map with a resolution of 1 / 8, and a semantic feature map with a resolution of 1 / 8 having channel weight attention after assigning different channel weights is obtained. A semantic feature map with a resolution of 1 / 16 is used as the input of a second channel attention module, so that the second channel attention module learns the channel weight of each channel of the semantic feature map with a resolution of 1 / 16 based on the semantic feature map with a resolution of 1 / 16; the channel weight learned by the second channel attention module is used to perform channel weight assignment on each channel of the semantic feature map with a resolution of 1 / 16, and a semantic feature map with a resolution of 1 / 16 having channel weight attention after assigning different channel weights is obtained. By taking the semantic feature map with a resolution of 1 / 32 as the input of the third channel attention module, the third channel attention module learns the channel weight of each channel of the semantic feature map with a resolution of 1 / 32 based on the semantic feature map with a resolution of 1 / 32; the channel weight learned by the third channel attention module is used to perform channel weight assignment on each channel of the semantic feature map with a resolution of 1 / 32, and a semantic feature map with a resolution of 1 / 32 with channel weight attention after assigning different channel weights is obtained. Through the first channel attention module, different channel weights are assigned to different channels of the semantic feature map with a resolution of 1 / 8, the second channel attention module assigns different channel weights to different channels of the semantic feature map with a resolution of 1 / 16, and the third channel attention module assigns different channel weights to different channels of the semantic feature map with a resolution of 1 / 32. After assigning different channel weights, the semantic feature map with a resolution of 1 / 8, the semantic feature map with a resolution of 1 / 16, and the semantic feature map with a resolution of 1 / 32 with channel weighted attention are obtained. The road element features of the semantic feature map are enhanced in the channel dimension, and the background features of the semantic feature map are suppressed. The semantic feature map with different channel weights has channel weighted attention. The semantic feature map with a resolution of 1 / 8, the semantic feature map with a resolution of 1 / 16, and the semantic feature map with a resolution of 1 / 32 with channel weighted attention have larger receptive fields and clearer semantic information, respectively.
[0080] In one embodiment, the semantic feature map with a resolution of 1 / 8 can be a semantic feature map of H×W×C, where H×W represents the resolution of the semantic feature map (for example, 64×128), and C represents the number of output channels. The first channel attention module performs global maximum pooling and average pooling in space to obtain two 1×1×C channel descriptions; the two 1×1×C channel descriptions are respectively input into a two-layer neural network to obtain two feature maps, the number of neurons in the first layer is C / r, the activation function is the Relu (Rectified Linear Units, rectified linear unit) function, the number of neurons in the second layer is C, r is the number of repetitions, and the two layers of the neural network are shared; the two feature maps are added and then passed through the Sigmoid activation function to obtain the channel weights of each different channel of the semantic feature map with a resolution of 1 / 8, and the channel weights of each different channel are multiplied by the semantic feature map with a resolution of 1 / 8 to obtain a semantic feature map with a resolution of 1 / 8 with channel weight attention after assigning different channel weights. Similarly, after assigning different channel weights, we can obtain semantic feature maps with a resolution of 1 / 16 and a resolution of 1 / 32 with channel weight attention.
[0081] In step S205, spatial weights are assigned to different spatial positions of the semantic feature map with a resolution of 1 / 8, the semantic feature map with a resolution of 1 / 16, and the semantic feature map with a resolution of 1 / 32 with channel weighted attention through the spatial attention module of the semantic branch to obtain the semantic feature map with a resolution of 1 / 8, the semantic feature map with a resolution of 1 / 16, and the semantic feature map with a resolution of 1 / 32 with channel weighted attention and spatial weighted attention.
[0082] In one embodiment, the spatial attention module can learn the spatial weights of different spatial positions of semantic feature maps with different resolutions, that is, information about which positions of semantic feature maps with different resolutions are important and which positions are not important. The spatial weights learned by the spatial attention module are used to assign spatial weights to different spatial positions of semantic feature maps with a resolution of 1 / 8, a semantic feature map with a resolution of 1 / 16, and a semantic feature map with a resolution of 1 / 32, respectively, to obtain semantic feature maps with a resolution of 1 / 8, a semantic feature map with a resolution of 1 / 16, and a semantic feature map with a resolution of 1 / 32 that have spatial weight attention after assigning different spatial weights.
[0083] In one embodiment, the spatial attention module of the semantic branch includes a first spatial attention module, a second spatial attention module, and a third spatial attention module. By taking the semantic feature map with a resolution of 1 / 8 with channel weighted attention as the input of the first spatial attention module, the first spatial attention module learns the spatial weights of different spatial positions of the semantic feature map with a resolution of 1 / 8 based on the semantic feature map with a resolution of 1 / 8 with channel weighted attention; the spatial weights learned by the first spatial attention module are used to perform spatial weight distribution on different spatial positions of the semantic feature map with a resolution of 1 / 8 with channel weighted attention, thereby obtaining a semantic feature map with a resolution of 1 / 8 with channel weighted attention and spatial weighted attention. By using a semantic feature map with a resolution of 1 / 16 with channel-weighted attention as the input of a second spatial attention module, the second spatial attention module learns spatial weights for different spatial positions of the semantic feature map with a resolution of 1 / 16 based on the semantic feature map with channel-weighted attention. The spatial weights learned by the second spatial attention module are used to distribute spatial weights to different spatial positions of the semantic feature map with a resolution of 1 / 16 with channel-weighted attention, thereby obtaining a semantic feature map with a resolution of 1 / 16 with both channel-weighted attention and spatial-weighted attention. By using a semantic feature map with a resolution of 1 / 32 with channel-weighted attention as the input of a third spatial attention module, the third spatial attention module learns spatial weights for different spatial positions of the semantic feature map with a resolution of 1 / 32 based on the semantic feature map with channel-weighted attention. The spatial weights learned by the third spatial attention module are used to distribute spatial weights to different spatial positions of the semantic feature map with channel-weighted attention, thereby obtaining a semantic feature map with a resolution of 1 / 32 with both channel-weighted attention and spatial-weighted attention. By assigning spatial weights to the semantic feature maps with a resolution of 1 / 8, the semantic feature maps with a resolution of 1 / 16, and the semantic feature maps with a resolution of 1 / 32, respectively, to determine the spatial positions that the semantic feature maps need to focus on, the spatial information of the road surface elements in the semantic feature maps with a resolution of 1 / 8, the semantic feature maps with a resolution of 1 / 16, and the semantic feature maps with a resolution of 1 / 32 can be effectively restored, and the spatial information of the road surface elements in the semantic feature maps with a resolution of 1 / 8, the semantic feature maps with a resolution of 1 / 16, and the semantic feature maps with a resolution of 1 / 32 can be enhanced, so that the road surface elements in the semantic feature maps with a resolution of 1 / 8, the semantic feature maps with a resolution of 1 / 16, and the semantic feature maps with a resolution of 1 / 32 have richer spatial information.
[0084] In one embodiment, a semantic feature map with a resolution of 1 / 8 and channel-weighted attention is subjected to maximum pooling and average pooling in each channel dimension to obtain two H×W×1 channel descriptions; the two H×W×1 channel descriptions are concatenated according to the channel; after a 7×7 convolution layer and a Sigmoid activation function, the spatial weights of different spatial positions of the semantic feature map with a resolution of 1 / 8 are obtained; the spatial weights of different spatial positions are multiplied with the semantic feature map with a resolution of 1 / 8 and channel-weighted attention to obtain a semantic feature map with a resolution of 1 / 8 with both channel-weighted attention and spatial-weighted attention. Similarly, a semantic feature map with a resolution of 1 / 16 and a semantic feature map with a resolution of 1 / 32 can be obtained with both channel-weighted attention and spatial-weighted attention, respectively.
[0085] In step S206, the detail feature map and the semantic feature map with a resolution of 1 / 8, a semantic feature map with a resolution of 1 / 16, and a semantic feature map with a resolution of 1 / 32 with channel weight attention and spatial weight attention are fused through the feature fusion module of BiSeNet V2 to obtain a fused feature map.
[0086] In one embodiment, the obtained detail feature map with a resolution of 1 / 2, the detail feature map with a resolution of 1 / 4, and the detail feature map with a resolution of 1 / 8, as well as the obtained semantic feature map with a resolution of 1 / 8, the semantic feature map with a resolution of 1 / 16, and the semantic feature map with a resolution of 1 / 32 with channel weight attention and spatial weight attention are input into a feature fusion module for feature fusion to obtain a fused feature map, wherein the feature fusion module includes a bidirectional guided aggregation layer (Bilateral Guided Aggregation Layer), adopts a bidirectional aggregation method (Bidirectional Aggregation Method), fuses the semantic feature map of the semantic branch and the detail feature map of the detail branch, and obtains the fused feature map.
[0087] In step S207, the semantic segmentation result of the road surface image is obtained based on the fused feature map through BiSeNet V2.
[0088] This step can be referred to the description of step S105 and will not be repeated here.
[0089] The embodiment of the present application shows a method for semantic segmentation of a full-element road surface image based on BiSeNetV2, which assigns weights to a semantic feature map with a resolution of 1 / 8, a semantic feature map with a resolution of 1 / 16, and a semantic feature map with a resolution of 1 / 32, to obtain a semantic feature map with a resolution of 1 / 8, a semantic feature map with a resolution of 1 / 16, and a semantic feature map with a resolution of 1 / 32 with weighted attention, strengthens the road surface element features of the semantic feature map in the channel dimension, and suppresses the background features of the semantic feature map to determine the spatial position where the semantic feature map needs to focus, and can accurately perform semantic segmentation on all road surface elements of the road surface image, thereby improving the semantic segmentation effect of the road surface image.
[0090] Furthermore, in the embodiment of the present application, the method for semantic segmentation of full-element road surface images based on BiSeNet V2 is shown. The 2x downsampling layer of the semantic branch of BiSeNet V2 includes a 7x7 convolution. A semantic feature map of the road surface image with a resolution of 1 / 2 is obtained through the 2x downsampling layer including the 7x7 convolution, so that the semantic feature map of the resolution 1 / 2 has a larger receptive field and better and more comprehensive global features. It can enable the semantic feature map of the resolution 1 / 8, the semantic feature map of the resolution 1 / 16, and the semantic feature map of the resolution 1 / 32 to retain rich semantic information, enhance the semantic expression ability of the semantic branch, and accurately perform semantic segmentation on all road surface elements of the road surface image, thereby improving the semantic segmentation effect of the road surface image; at the same time, it reduces the computational amount of semantic segmentation, reduces the number of parameters of BiSeNet V2, and can improve the speed of BiSeNet V2.
[0091] Example 3:
[0092] Corresponding to the aforementioned application function implementation method embodiment, the present application also provides a road surface full-element image semantic segmentation device, electronic device and corresponding embodiments based on BiSeNet V2.
[0093] Figure 3 This is a structural diagram of a road surface full-element image semantic segmentation device based on BiSeNet V2 shown in an embodiment of the present application.
[0094] See also Figure 3 A road surface full-element image semantic segmentation device based on BiSeNet V2 includes a detail feature acquisition module 301, a semantic feature acquisition module 302, a weight allocation module 303, a fusion feature acquisition module 304, and a segmentation result acquisition module 305.
[0095] The detail feature acquisition module 301 is used to obtain a detail feature map of a road surface image through the detail branch of BiSeNet V2.
[0096] The semantic feature acquisition module 302 is used to obtain a semantic feature map with a resolution of 1 / 8, a semantic feature map with a resolution of 1 / 16, and a semantic feature map with a resolution of 1 / 32 of the road surface image through the semantic branch of BiSeNet V2.
[0097] The weight allocation module 303 is used to assign weights to the semantic feature map with a resolution of 1 / 8, the semantic feature map with a resolution of 1 / 16, and the semantic feature map with a resolution of 1 / 32 obtained by the semantic feature acquisition module 302 through the semantic branch, and obtain the semantic feature map with a resolution of 1 / 8, the semantic feature map with a resolution of 1 / 16, and the semantic feature map with a resolution of 1 / 32 with weighted attention.
[0098] The fusion feature acquisition module 304 is used to fuse the detail feature map obtained by the detail feature acquisition module 301 and the semantic feature map with a resolution of 1 / 8, a resolution of 1 / 16, and a resolution of 1 / 32 with weighted attention obtained by the weight allocation module 303 through the feature fusion module of BiSeNet V2 to obtain a fused feature map.
[0099] The segmentation result acquisition module 305 is used to obtain a semantic segmentation result of the road surface image based on the fused feature map obtained by the fusion feature acquisition module 304 using BiSeNet V2.
[0100] The technical solution shown in the embodiment of the present application assigns weights to the semantic feature map with a resolution of 1 / 8, the semantic feature map with a resolution of 1 / 16, and the semantic feature map with a resolution of 1 / 32, and obtains the semantic feature map with a resolution of 1 / 8, the semantic feature map with a resolution of 1 / 16, and the semantic feature map with a resolution of 1 / 32 with weighted attention. The road surface element features of the semantic feature map are enhanced in the channel dimension, and the background features of the semantic feature map are suppressed to determine the spatial position where the semantic feature map needs to focus. The solution can accurately perform semantic segmentation on all road surface elements of the road surface image, thereby improving the semantic segmentation effect of the road surface image.
[0101] Example 4:
[0102] Figure 4 This is another structural diagram of the road surface full-element image semantic segmentation device based on BiSeNet V2 shown in an embodiment of the present application.
[0103] See also Figure 4 A road surface full-element image semantic segmentation device based on BiSeNet V2 includes a detail feature acquisition module 301, a semantic feature acquisition module 302, a weight allocation module 303, a fusion feature acquisition module 304, and a segmentation result acquisition module 305.
[0104] The functions of the detail feature acquisition module 301 and the segmentation result acquisition module 305 can be found in Figure 3 shown.
[0105] The semantic feature acquisition module 302 is further used to downsample the road surface image by 2 times through the 2 times downsampling layer of the semantic branch of BiSeNet V2 to obtain a semantic feature map of the road surface image with a resolution of 1 / 2, wherein the 2 times downsampling layer includes a 7x7 convolution; based on the semantic feature map of the resolution of 1 / 2, a semantic feature map of the road surface image with a resolution of 1 / 8, a semantic feature map of the road surface image with a resolution of 1 / 16, and a semantic feature map of the road surface image with a resolution of 1 / 32 is obtained in sequence through the semantic branch.
[0106] The weight allocation module 303 includes a channel weight allocation submodule 3031 and a space weight allocation submodule 3032 .
[0107] The channel weight assignment submodule 3031 is used to assign a channel weight to each channel of the semantic feature map with a resolution of 1 / 8 obtained by the semantic feature acquisition module 302 through the first channel attention module of the semantic branch, so as to obtain a semantic feature map with a resolution of 1 / 8 with channel weight attention; to assign a channel weight to each channel of the semantic feature map with a resolution of 1 / 16 obtained by the semantic feature acquisition module 302 through the second channel attention module of the semantic branch, so as to obtain a semantic feature map with a resolution of 1 / 16 with channel weight attention; and to assign a channel weight to each channel of the semantic feature map with a resolution of 1 / 32 obtained by the semantic feature acquisition module 302 through the third channel attention module of the semantic branch, so as to obtain a semantic feature map with a resolution of 1 / 32 with channel weight attention.
[0108] The spatial weight allocation submodule 3032 is used to allocate spatial weights to different spatial positions of the semantic feature map with a resolution of 1 / 8 and channel weight attention obtained by the channel weight allocation submodule 3031 through the first spatial attention module of the semantic branch, so as to obtain a semantic feature map with a resolution of 1 / 8 with channel weight attention and spatial weight attention; allocate spatial weights to different spatial positions of the semantic feature map with a resolution of 1 / 16 and channel weight attention obtained by the channel weight allocation submodule 3031 through the second spatial attention module of the semantic branch, so as to obtain a semantic feature map with a resolution of 1 / 16 with channel weight attention and spatial weight attention; allocate spatial weights to different spatial positions of the semantic feature map with a resolution of 1 / 32 and channel weight attention obtained by the channel weight allocation submodule 3031 through the third spatial attention module of the semantic branch, so as to obtain a semantic feature map with a resolution of 1 / 32 with channel weight attention and spatial weight attention.
[0109] The fusion feature acquisition module 304 is used to fuse the detail feature map obtained by the detail feature acquisition module 301 and the semantic feature map with a resolution of 1 / 8, a semantic feature map with a resolution of 1 / 16, and a semantic feature map with a resolution of 1 / 32 with channel weight attention and spatial weight attention obtained by the weight allocation module 303 through the feature fusion module of BiSeNet V2 to obtain a fused feature map.
[0110] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated again here.
[0111] Embodiment 5:
[0112] Figure 5 It is a structural diagram of an electronic device shown in an embodiment of the present application.
[0113] See also Figure 5 , the electronic device 500 includes a memory 510 and a processor 520.
[0114] The processor 520 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0115] The memory 510 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage. ROM may store static data or instructions required by the processor 520 or other modules of the computer. The permanent storage may be a readable and writable storage device. The permanent storage may be a non-volatile storage device that retains stored instructions and data even when the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (e.g., a magnetic or optical disk, flash memory) as the permanent storage device. In other embodiments, the permanent storage device may be a removable storage device (e.g., a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as dynamic random access memory. The system memory may store some or all instructions and data required by the processor during operation. In addition, the memory 510 may include any combination of computer-readable storage media, including various types of semiconductor memory chips (e.g., DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and magnetic disks and / or optical disks may also be used. In some embodiments, the memory 510 may include a readable and / or writable removable storage device, such as a compact disc (CD), a read-only digital versatile disc (e.g., DVD-ROM, dual-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (e.g., SD card, mini SD card, Micro-SD card, etc.), a magnetic floppy disk, etc. Computer-readable storage media do not include carrier waves and transient electronic signals transmitted wirelessly or wired.
[0116] The memory 510 stores executable codes. When the executable codes are processed by the processor 520 , the processor 520 may execute part or all of the above-mentioned methods.
[0117] In addition, the method according to the present application may also be implemented as a computer program or a computer program product, which includes computer program code instructions for executing some or all of the steps in the above method of the present application.
[0118] Alternatively, the present application can also be implemented as a computer-readable storage medium (or non-transitory machine-readable storage medium or machine-readable storage medium) on which executable code (or computer program or computer instruction code) is stored. When the executable code (or computer program or computer instruction code) is executed by a processor of an electronic device (or server, etc.), the processor executes part or all of the steps of the above-mentioned method according to the present application.
[0119] The embodiments of the present application have been described above. The above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, their practical applications, or improvements to the technology in the market, or to enable other persons skilled in the art to understand the embodiments disclosed herein.
Claims
1. A road surface full-element image semantic segmentation method based on BiSeNet V2, characterized by: include: Obtain the detail feature map of the road image through the detail branch of BiSeNet V2; Obtaining a semantic feature map with a resolution of 1 / 8, a semantic feature map with a resolution of 1 / 16, and a semantic feature map with a resolution of 1 / 32 of the road surface image through the semantic branch of the BiSeNet V2; Assigning a channel weight to each channel of the semantic feature map with a resolution of 1 / 8 by the first channel attention module of the semantic branch, to obtain a semantic feature map with a resolution of 1 / 8 with channel weight attention; Assigning a channel weight to each channel of the semantic feature map with a resolution of 1 / 16 through the second channel attention module of the semantic branch to obtain a semantic feature map with a resolution of 1 / 16 with channel weight attention; Assigning a channel weight to each channel of the semantic feature map with a resolution of 1 / 32 by the third channel attention module of the semantic branch, to obtain a semantic feature map with a resolution of 1 / 32 with channel weight attention; Assigning spatial weights to different spatial positions of the semantic feature map with a resolution of 1 / 8 with channel weight attention through the first spatial attention module of the semantic branch, to obtain a semantic feature map with a resolution of 1 / 8 with channel weight attention and spatial weight attention; Assigning spatial weights to different spatial positions of the semantic feature map with a resolution of 1 / 16 and channel weighted attention through the second spatial attention module of the semantic branch, thereby obtaining a semantic feature map with a resolution of 1 / 16 and channel weighted attention and spatial weighted attention; Assigning spatial weights to different spatial positions of the semantic feature map with a resolution of 1 / 32 and channel weighted attention through the third spatial attention module of the semantic branch, thereby obtaining a semantic feature map with a resolution of 1 / 32 and channel weighted attention and spatial weighted attention; The detail feature map and the semantic feature map with a resolution of 1 / 8, a resolution of 1 / 16, and a resolution of 1 / 32 with channel weight attention and spatial weight attention are fused through the feature fusion module of the BiSeNet V2 to obtain a fused feature map; The semantic segmentation result of the road surface image is obtained by the BiSeNet V2 according to the fused feature map.
2. The method according to claim 1, characterized in that The method of obtaining a semantic feature map with a resolution of 1 / 8, a semantic feature map with a resolution of 1 / 16, and a semantic feature map with a resolution of 1 / 32 of the road image through the semantic branch of the BiSeNet V2 includes: Downsampling the road image by a factor of 2 using a 2x downsampling layer of the semantic branch of the BiSeNet V2 to obtain a semantic feature map with a resolution of 1 / 2 of the road image, wherein the 2x downsampling layer includes a 7×7 convolution; According to the semantic feature map with a resolution of 1 / 2, a semantic feature map with a resolution of 1 / 8, a semantic feature map with a resolution of 1 / 16, and a semantic feature map with a resolution of 1 / 32 of the road surface image are obtained in sequence through the semantic branch.
3. A road surface full-element image semantic segmentation device based on BiSeNet V2, characterized in that: include: Detail feature acquisition module, used to obtain detail feature maps of road images through the detail branch of BiSeNet V2; A semantic feature acquisition module, configured to obtain a semantic feature map with a resolution of 1 / 8, a semantic feature map with a resolution of 1 / 16, and a semantic feature map with a resolution of 1 / 32 of the road surface image through the semantic branch of the BiSeNet V2; The weight distribution module includes a channel weight distribution submodule, and the weight distribution module also includes a space weight distribution submodule; wherein, The channel weight assignment submodule is configured to assign a channel weight to each channel of the semantic feature map with a resolution of 1 / 8 obtained by the semantic feature acquisition module through the first channel attention module of the semantic branch, thereby obtaining a semantic feature map with a resolution of 1 / 8 with channel weight attention; assign a channel weight to each channel of the semantic feature map with a resolution of 1 / 16 obtained by the semantic feature acquisition module through the second channel attention module of the semantic branch, thereby obtaining a semantic feature map with a resolution of 1 / 16 with channel weight attention; assign a channel weight to each channel of the semantic feature map with a resolution of 1 / 32 obtained by the semantic feature acquisition module through the third channel attention module of the semantic branch, thereby obtaining a semantic feature map with a resolution of 1 / 32 with channel weight attention; The spatial weight assignment submodule is configured to assign spatial weights to different spatial positions of the semantic feature map with a resolution of 1 / 8 of the channel weight attention obtained by the channel weight assignment submodule through the first spatial attention module of the semantic branch, thereby obtaining a semantic feature map with a resolution of 1 / 8 of the channel weight attention and spatial weight attention; assign spatial weights to different spatial positions of the semantic feature map with a resolution of 1 / 16 of the channel weight attention obtained by the channel weight assignment submodule through the second spatial attention module of the semantic branch, thereby obtaining a semantic feature map with a resolution of 1 / 16 of the channel weight attention and spatial weight attention; assign spatial weights to different spatial positions of the semantic feature map with a resolution of 1 / 32 of the channel weight attention obtained by the channel weight assignment submodule through the third spatial attention module of the semantic branch, thereby obtaining a semantic feature map with a resolution of 1 / 32 of the channel weight attention and spatial weight attention; A fusion feature acquisition module is configured to fuse the detail feature map obtained by the detail feature acquisition module and the semantic feature map with a resolution of 1 / 8, a semantic feature map with a resolution of 1 / 16, and a semantic feature map with a resolution of 1 / 32 obtained by the weight allocation module with channel weight attention and spatial weight attention through the feature fusion module of the BiSeNet V2 to obtain a fused feature map; The segmentation result acquisition module is used to obtain the semantic segmentation result of the road surface image through the BiSeNet V2 according to the fused feature map obtained by the fusion feature acquisition module.
4. The device according to claim 3, characterized in that: The semantic feature acquisition module is further configured to downsample the road surface image by a factor of 2 through the 2x downsampling layer of the semantic branch of the BiSeNet V2 to obtain a semantic feature map of the road surface image with a resolution of 1 / 2, wherein the 2x downsampling layer includes a 7×7 convolution; and based on the semantic feature map of the resolution of 1 / 2, sequentially obtain semantic feature maps of the road surface image with a resolution of 1 / 8, a semantic feature map of the resolution of 1 / 16, and a semantic feature map of the resolution of 1 / 32 through the semantic branch.
5. A computer-readable storage medium, characterized in that: An executable code is stored thereon, and when the executable code is executed by a processor of an electronic device, the processor is caused to execute the method according to claim 1 or 2.