Point cloud semantic segmentation method and device based on attention mechanism, equipment and medium
Through the point cloud semantic segmentation method based on the attention mechanism, combined with random downsampling, KNN local feature extraction and residual attention module, the problem of low efficiency of large-scale point cloud segmentation is solved, and more efficient point cloud segmentation and vehicle trajectory prediction accuracy are achieved.
Patent Information
- Application Number
- CN202111537405.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-15
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2041-12-15
AI Technical Summary
Existing 3D point cloud segmentation methods are inefficient and have high hardware requirements when processing large-scale point cloud data. Existing downsampling methods are effective for small-scale point clouds but not for large-scale point clouds, resulting in a slow segmentation rate.
A point cloud semantic segmentation method based on the attention mechanism is adopted. By designing a random downsampling module, a KNN local feature extraction module and a residual attention module, and combining the KNN algorithm and the residual attention mechanism, the features of the nearest K points are aggregated to avoid the loss of important point information and improve the sampling rate.
It improves the segmentation efficiency and accuracy of large-scale point cloud data, enhances the robustness of the algorithm, and improves the accuracy and model flexibility of vehicle trajectory prediction.
Smart Images

Figure CN114565754B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of optimization scheduling, and particularly relates to a point cloud semantic segmentation method and device based on an attention mechanism, equipment and a medium. BACKGROUND
[0002] Scene semantic segmentation has important application value in the field of unmanned driving, such as path planning, autonomous navigation and the like. The existing 3D point cloud segmentation method has good segmentation effect on small-scale 3D point cloud, but there is still a lot of room for improvement in the segmentation effect of large-scale point cloud (for example, million level). More efficient segmentation of large scene point cloud has important significance for the development of the field of unmanned driving.
[0003] Due to the large amount of large-scale point cloud data, it is relatively complex to process than small-scale point cloud, and the hardware requirement is relatively high. The farthest sampling used for small-scale point cloud downsampling processing is not suitable for large-scale point cloud, and the segmentation rate of the point cloud is slow. SUMMARY
[0004] The purpose of the embodiments of the present specification is to provide a point cloud semantic segmentation method and device based on an attention mechanism, equipment and a medium.
[0005] To solve the above technical problems, the embodiments of the present application are implemented in the following way:
[0006] In a first aspect, the present application provides a point cloud semantic segmentation method based on an attention mechanism, which comprises:
[0007] Obtaining point cloud data, and extracting the features of each point in the point cloud data through a first MLP layer;
[0008] Downsampling the point cloud data by using a preset number of encoding layers to obtain the intermediate feature mapping corresponding to each encoding layer; the encoding layer comprises a first KNN local feature extraction module, a first residual attention module and a random downsampling module;
[0009] Up-sampling the intermediate feature mapping by using a preset number of decoding layers to obtain the up-sampled feature mapping corresponding to each decoding layer; the decoding layer comprises a second KNN local feature extraction module, a second residual attention module and an up-sampling module;
[0010] Connecting and summarizing the up-sampled feature mapping and the intermediate feature mapping generated by the corresponding encoding layer to obtain the summarized feature mapping;
[0011] Using a second MLP layer to map the summarized feature mapping to the final result.
[0012] In one embodiment, each coding layer downsamples the point cloud data to obtain an intermediate feature map corresponding to each coding layer, including:
[0013] Obtaining a first enhanced feature vector through a first KNN local feature extraction module;
[0014] Passing the first enhanced feature vector to the first residual attention module to obtain a first residual feature vector;
[0015] The first residual feature vector is randomly downsampled by a random downsampling module to obtain an intermediate feature map.
[0016] In one embodiment, obtaining a first enhanced feature vector by a first KNN local feature extraction module includes:
[0017] Collect K neighboring points of the first query point through the first KNN local feature extraction module;
[0018] Perform position encoding on K neighboring points;
[0019] The K position codes and the corresponding K neighboring point features are concatenated to obtain the corresponding first enhanced feature vector.
[0020] In one embodiment, passing the first enhanced feature vector to a first residual attention module to obtain a first residual feature vector includes:
[0021] The first enhanced feature vector is passed to the first residual attention module to aggregate the features of adjacent points to obtain an aggregated feature vector;
[0022] The first enhanced feature vector is subtracted from the aggregated feature vector to obtain a first residual feature vector.
[0023] In one embodiment, each decoding layer upsamples the intermediate feature map to obtain an upsampled feature map corresponding to each decoding layer, including:
[0024] Obtaining a second enhanced feature vector through a second KNN local feature extraction module;
[0025] Pass the second feature enhancement vector to the second residual attention module to obtain a second residual feature vector;
[0026] The second residual feature vector is upsampled by neighbor interpolation to obtain an upsampled feature map.
[0027] In one embodiment, the upsampled feature map and the intermediate feature map generated by the corresponding encoding layer are concatenated and aggregated to obtain an aggregated feature map, including:
[0028] The upsampled feature map and the intermediate feature map generated by the corresponding encoding layer are connected through skip connections and summarized to obtain the summarized feature map.
[0029] In a second aspect, the present application provides a point cloud semantic segmentation device based on an attention mechanism, the device comprising:
[0030] The acquisition module is used to obtain point cloud data and extract the features of each point in the point cloud data through the first MLP layer;
[0031] A downsampling module is used to downsample the point cloud data using a preset number of coding layers to obtain an intermediate feature map corresponding to each coding layer; the coding layer includes a first KNN local feature extraction module, a first residual attention module, and a random downsampling module;
[0032] An upsampling module is used to upsample the intermediate feature map using a preset number of decoding layers to obtain an upsampled feature map corresponding to each decoding layer; the decoding layer includes a second KNN local feature extraction module, a second residual attention module, and an upsampling module;
[0033] The aggregation module is used to connect the upsampled feature map and the intermediate feature map generated by the corresponding encoding layer to obtain the aggregated feature map;
[0034] The mapping module is used to map the summarized features to the final result using the second MLP layer.
[0035] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the point cloud semantic segmentation method based on the attention mechanism of the first aspect is implemented.
[0036] In a fourth aspect, the present application provides a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the point cloud semantic segmentation method based on the attention mechanism as in the first aspect.
[0037] It can be seen from the technical solution provided in the above embodiments of this specification that this solution: by designing a combination of a random downsampling module, a KNN local feature extraction module, and a residual attention module, the corresponding features of the nearest K points are aggregated through the KNN algorithm and the residual attention mechanism to avoid the loss of a large amount of important point information that may be caused by random sampling, thereby ensuring the effectiveness of sampling and also improving the sampling rate.
[0038] The point cloud semantic segmentation method based on the attention mechanism provided in this application can improve the accuracy and model flexibility of vehicle trajectory prediction and enhance the robustness of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present specification or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings in the following description only represent some embodiments described in the present specification, and other drawings can be obtained by those skilled in the art without creative labor.
[0040] Figure 1 A flowchart of the point cloud semantic segmentation method based on the attention mechanism provided in the present application;
[0041] Figure 2 Another flowchart of the point cloud semantic segmentation method based on the attention mechanism provided in the present application;
[0042] Figure 3 A principle diagram of the residual attention module provided in the present application;
[0043] Figure 4 A structure diagram of the point cloud semantic segmentation device based on the attention mechanism provided in the present application;
[0044] Figure 5 A structure diagram of the electronic device provided in the present application. DETAILED DESCRIPTION
[0045] In order for those skilled in the art to better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be described clearly and completely in the following description of the embodiments of the present specification, and obviously, the described embodiments only represent some of the embodiments of the present specification, rather than all the embodiments. Based on the embodiments in the present specification, all other embodiments obtained by those skilled in the art without creative labor should be within the scope of protection of the present specification.
[0046] In the following description, specific details such as specific system structures, techniques, etc. are presented in order to thoroughly understand the embodiments of the present application, but those skilled in the art should understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details that hinder the description of the present application.
[0047] Many modifications and changes can be made to the specific implementation of the present specification without departing from the scope or spirit of the present application, which will be apparent to those skilled in the art. Other implementations derived from the present specification will be apparent to those skilled in the art. The present specification and examples are only exemplary.
[0048] The words “include,” “including,” “have,” “contain,” etc. used in this document are open-ended terms, meaning including but not limited to.
[0049] Unless otherwise specified, "parts" in this application are calculated by mass.
[0050] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0051] Reference Figure 1 , which shows a flow chart of the point cloud semantic segmentation method based on the attention mechanism provided in an embodiment of the present application.
[0052] like Figure 1 As shown in Figure 2, the point cloud semantic segmentation method based on the attention mechanism can include:
[0053] S110 , acquiring point cloud data, and extracting features of each point in the point cloud data through the first MLP layer.
[0054] Specifically, the point cloud data may include large-scale point cloud data and small-scale point cloud data.
[0055] Exemplarily, the size of the point cloud data is N×din, where N is the number of points in the point cloud data, and din is the feature dimension of each point.
[0056] S120. Use a preset number of coding layers to downsample the point cloud data to obtain an intermediate feature map corresponding to each coding layer; the coding layer includes a first KNN (k-Nearest Neighbor) local feature extraction module, a first residual attention module and a random downsampling module.
[0057] Specifically, each encoding layer consists of a random sampling operation and an attention module. Since random sampling may cause the features of many useful points to be discarded, this application uses a random downsampling module combined with the first KNN local feature extraction module and the first residual attention module to solve this problem and complete effective downsampling of the point cloud.
[0058] The preset number can be set according to actual needs. For example, the preset number is 4, that is, 4 coding layers are used to gradually reduce the number of point clouds and correspondingly increase the feature dimension of each point. The following embodiment uses four coding layers as an example for description.
[0059] The downsampling rate of each coding layer is four times the rate, for example, Figure 2As shown in the figure, the number of points in the input point cloud data is N, and the feature dimension is 32. Then the number of output point sets in each layer is (N / 4, N / 16, N / 64, N / 256), and at the same time, the point-by-point feature dimension of each layer gradually increases to (64, 128, 256, 512).
[0060] Continue to refer to Figure 2 In one embodiment, each coding layer downsamples the point cloud data to obtain an intermediate feature map corresponding to each coding layer, including:
[0061] Obtaining a first enhanced feature vector through a first KNN local feature extraction module;
[0062] Passing the first enhanced feature vector to the first residual attention module to obtain a first residual feature vector;
[0063] The first residual feature vector is randomly downsampled by a random downsampling module to obtain an intermediate feature map.
[0064] The first enhanced feature vector is obtained by the first KNN local feature extraction module, including:
[0065] Collect K neighboring points of the first query point through the first KNN local feature extraction module;
[0066] Perform position encoding on K neighboring points;
[0067] The K position codes and the corresponding K neighboring point features are concatenated to obtain the corresponding first enhanced feature vector.
[0068] The first enhanced feature vector is passed to the first residual attention module to obtain the first residual feature vector, including:
[0069] The first enhanced feature vector is passed to the first residual attention module to aggregate the features of adjacent points to obtain an aggregated feature vector;
[0070] The first enhanced feature vector is subtracted from the aggregated feature vector to obtain a first residual feature vector.
[0071] Specifically, the first KNN local feature extraction module collects K neighboring points of the first query point Pi, performs position encoding on the K neighboring points of the first query point Pi, and concatenates the position encoding and the corresponding neighboring point features to obtain the corresponding first enhanced feature vector X i . A series of first enhanced feature vectors X iThe first residual attention module is passed to the first residual attention module to aggregate the features of adjacent points and obtain an aggregated feature vector. Finally, the first enhanced feature vector is subtracted from the aggregated feature vector to obtain the first residual feature vector. Compared with the directly obtained aggregated feature vector, the first residual feature vector is more robust during segmentation due to its relativity. At this point, the first residual feature vector of each point aggregates the important features of the surrounding K neighboring points. At this time, the point cloud is further randomly downsampled, which not only improves the calculation rate, but also retains more local information and avoids the loss of important points caused by random sampling.
[0072] Specifically, such as Figure 3 As shown, Q i =Wq·X i
[0073] K i =W k ·X i
[0074] V i =W v ·X i
[0075] Among them, Q i , K i 、V i They correspond to the first enhanced eigenvector X i After linear transformation, they are respectively the first enhanced feature vector X i query vector, key vector and value vector of W q 、W k 、W v are all shared learnable linear transformations.
[0076] A m =Q i ·K i T
[0077] A f =A m ·V i
[0078] X iout =X i -A f
[0079] Among them, A m is the Attention map (attention layer), A f is the Attention feature (i.e., the aggregated feature vector element), X iout is the first residual eigenvector element.
[0080] After the above encoding layer, the U-net network is adopted, that is, the encoder and decoder are symmetrically coupled.
[0081] S130. Use a preset number of decoding layers to upsample the intermediate feature map to obtain an upsampled feature map corresponding to each decoding layer; the decoding layer includes a second KNN local feature extraction module, a second residual attention module and an upsampling module.
[0082] Specifically, the number of decoding layers is consistent with the number of encoding layers. In the embodiment of the present application, four layers are used.
[0083] Continue to refer to Figure 2 In one embodiment, each decoding layer upsamples the intermediate feature map to obtain an upsampled feature map corresponding to each decoding layer, including:
[0084] Obtaining a second enhanced feature vector through a second KNN local feature extraction module;
[0085] Pass the second feature enhancement vector to the second residual attention module to obtain a second residual feature vector;
[0086] The second residual feature vector is upsampled by neighbor interpolation to obtain an upsampled feature map.
[0087] Specifically, each input point feature is processed by a linear layer, followed by batch normalization and ReLU processing, and then the feature is mapped to a higher resolution point set through neighbor interpolation to obtain an upsampled feature map.
[0088] S140: Connect the upsampled feature map and the intermediate feature map generated by the corresponding coding layer and aggregate them to obtain an aggregated feature map, including:
[0089] The upsampled feature map and the intermediate feature map generated by the corresponding encoding layer are connected through skip connections and summarized to obtain the summarized feature map.
[0090] S150, using the second MLP layer to map the summarized features to the final result, completing the semantic segmentation of the point cloud.
[0091] The point cloud semantic segmentation method based on the attention mechanism provided in the embodiment of the present application, by designing a combination of a random downsampling module, a KNN local feature extraction module, and a residual attention module, aggregates the corresponding features of the nearest K points through the KNN algorithm and the residual attention mechanism to avoid the loss of a large amount of important point information that may be caused by random sampling, thereby ensuring the effectiveness of sampling and also improving the sampling rate.
[0092] The point cloud semantic segmentation method based on the attention mechanism provided in this application can improve the accuracy and model flexibility of vehicle trajectory prediction and enhance the robustness of the algorithm.
[0093] Reference Figure 4 , which shows a structural diagram of a point cloud semantic segmentation device based on an attention mechanism described according to an embodiment of the present application.
[0094] like Figure 4 As shown, the point cloud semantic segmentation device 400 based on the attention mechanism may include:
[0095] An acquisition module 410 is configured to acquire point cloud data and extract features of each point in the point cloud data through a first MLP layer;
[0096] A downsampling module 420 is configured to downsample the point cloud data using a preset number of coding layers to obtain an intermediate feature map corresponding to each coding layer; the coding layer includes a first KNN local feature extraction module, a first residual attention module, and a random downsampling module;
[0097] An upsampling module 430 is configured to upsample the intermediate feature map using a preset number of decoding layers to obtain an upsampled feature map corresponding to each decoding layer; the decoding layer includes a second KNN local feature extraction module, a second residual attention module, and an upsampling module;
[0098] A summarizing module 440 is configured to aggregate the upsampled feature map and the intermediate feature map generated by the corresponding encoding layer to obtain an aggregated feature map;
[0099] The mapping module 450 is used to map the summarized features into the final result using the second MLP layer.
[0100] Optionally, the downsampling module 420 is further configured to:
[0101] Obtaining a first enhanced feature vector through a first KNN local feature extraction module;
[0102] Passing the first enhanced feature vector to the first residual attention module to obtain a first residual feature vector;
[0103] The first residual feature vector is randomly downsampled by a random downsampling module to obtain an intermediate feature map.
[0104] Optionally, the downsampling module 420 is further configured to:
[0105] Collect K neighboring points of the first query point through the first KNN local feature extraction module;
[0106] Perform position encoding on K neighboring points;
[0107] The K position codes and the corresponding K neighboring point features are concatenated to obtain the corresponding first enhanced feature vector.
[0108] Optionally, the downsampling module 420 is further configured to:
[0109] The first enhanced feature vector is passed to the first residual attention module to aggregate the features of adjacent points to obtain an aggregated feature vector;
[0110] The first enhanced feature vector is subtracted from the aggregated feature vector to obtain a first residual feature vector.
[0111] Optionally, the upsampling module 430 is further configured to:
[0112] Obtaining a second enhanced feature vector through a second KNN local feature extraction module;
[0113] Pass the second feature enhancement vector to the second residual attention module to obtain a second residual feature vector;
[0114] The second residual feature vector is upsampled by neighbor interpolation to obtain an upsampled feature map.
[0115] Optionally, the summarizing module 440 is further configured to:
[0116] The upsampled feature map and the intermediate feature map generated by the corresponding encoding layer are connected through skip connections and summarized to obtain the summarized feature map.
[0117] This embodiment provides a point cloud semantic segmentation device based on an attention mechanism, which can execute the embodiment of the above method. Its implementation principle and technical effects are similar and will not be repeated here.
[0118] Figure 5 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 5 , which is a schematic structural diagram of an electronic device 300 suitable for implementing an embodiment of the present application.
[0119] like Figure 5 As shown, electronic device 300 includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage portion 308 into a random access memory (RAM) 303. Various programs and data required for the operation of device 300 are also stored in RAM 303. CPU 301, ROM 302, and RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to bus 304.
[0120] The following components are connected to the I / O interface 305: an input part 306 including a keyboard, a mouse, and the like; an output part 307 including a cathode ray tube (CRT), a liquid crystal display (LCD), and the like, and a speaker, and the like; a storage part 308 including a hard disk, and the like; and a communication part 309 including a network interface card such as a LAN card, a modem, and the like. The communication part 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as necessary. A removable medium 311 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like is attached to the drive 310 as necessary, so that a computer program read out therefrom is installed in the storage part 308 as necessary.
[0121] In particular, according to embodiments of the present disclosure, the processes described above with reference to Figure 1 may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program containing program code for executing the above-described attention-mechanism-based point cloud semantic segmentation method. In such embodiments, the computer program can be downloaded and installed from a network via the communication part 309, and / or installed from the removable medium 311.
[0122] The flow diagrams and block diagrams in the drawings are illustrations of possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flow diagrams or block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flow diagrams, and combinations thereof, can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or combinations of special purpose hardware and computer instructions.
[0123] The units or modules involved in the embodiments described in the present application can be implemented by software, or can be implemented by hardware. The described units or modules can also be arranged in a processor. The names of these units or modules do not constitute a limitation on the units or modules themselves in some cases.
[0124] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or physical devices, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a mobile phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0125] As another aspect, the present application further provides a storage medium, which may be the storage medium included in the aforementioned apparatus in the above-mentioned embodiment; or a storage medium that exists independently and is not assembled into the device. The storage medium stores one or more programs, which are used by one or more processors to execute the attention-based point cloud semantic segmentation method described in this application.
[0126] Storage media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.
[0127] It should be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0128] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.
Claims
1. A point cloud semantic segmentation method based on attention mechanism, characterized in that: The method comprises: Obtain point cloud data and extract features of each point in the point cloud data through the first MLP layer; A preset number of coding layers are used to downsample the point cloud data to obtain an intermediate feature map corresponding to each coding layer; the coding layer includes a first KNN local feature extraction module, a first residual attention module and a random downsampling module, and each coding layer downsamples the point cloud data to obtain an intermediate feature map corresponding to each coding layer, including: collecting K neighboring points of a first query point through the first KNN local feature extraction module; position encoding the K neighboring points; concatenating the K position codes and the corresponding K neighboring point features to obtain a corresponding first enhanced feature vector; passing the first enhanced feature vector to the first residual attention module to aggregate features of adjacent points to obtain an aggregated feature vector; subtracting the first enhanced feature vector from the aggregated feature vector to obtain a first residual feature vector; and randomly downsampling the first residual feature vector through the random downsampling module to obtain the intermediate feature map; Upsampling the intermediate feature map using a preset number of decoding layers to obtain an upsampled feature map corresponding to each decoding layer; the decoding layer includes a second KNN local feature extraction module, a second residual attention module and an upsampling module; Connecting the upsampled feature map and the intermediate feature map generated by the corresponding encoding layer through a skip connection to aggregate them to obtain an aggregated feature map; A second MLP layer is used to map the summarized features into the final result.
2. The method according to claim 1, characterized in that Each decoding layer upsamples the intermediate feature map to obtain an upsampled feature map corresponding to each decoding layer, including: Obtaining a second enhanced feature vector through the second KNN local feature extraction module; Passing the second feature enhancement vector to the second residual attention module to obtain a second residual feature vector; The second residual feature vector is upsampled by neighbor interpolation to obtain the upsampled feature map.
3. A point cloud semantic segmentation device based on attention mechanism, characterized in that: The device comprises: An acquisition module, configured to acquire point cloud data and extract features of each point in the point cloud data through a first MLP layer; A downsampling module is configured to downsample the point cloud data using a preset number of coding layers to obtain an intermediate feature map corresponding to each coding layer; the coding layer includes a first KNN local feature extraction module, a first residual attention module, and a random downsampling module. Each coding layer downsamples the point cloud data to obtain an intermediate feature map corresponding to each coding layer, including: collecting K neighboring points of a first query point through the first KNN local feature extraction module; position encoding the K neighboring points; concatenating the K position codes and the corresponding K neighboring point features to obtain a corresponding first enhanced feature vector; passing the first enhanced feature vector to the first residual attention module to aggregate features of adjacent points to obtain an aggregated feature vector; subtracting the first enhanced feature vector from the aggregated feature vector to obtain a first residual feature vector; and randomly downsampling the first residual feature vector through the random downsampling module to obtain the intermediate feature map. An upsampling module is configured to upsample the intermediate feature map using a preset number of decoding layers to obtain an upsampled feature map corresponding to each decoding layer; the decoding layer includes a second KNN local feature extraction module, a second residual attention module, and an upsampling module; A summarization module, configured to connect the upsampled feature map and the intermediate feature map generated by the corresponding encoding layer through a skip connection to obtain a summarized feature map; A mapping module is used to map the summarized features into a final result using a second MLP layer.
4. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, it implements the point cloud semantic segmentation method based on the attention mechanism as described in any one of claims 1-2.
5. A readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the point cloud semantic segmentation method based on the attention mechanism as described in any one of claims 1-2 is implemented.