A method, system, device and computer readable storage medium for obstacle detection
By generating local augmented feature vectors of the point cloud of the vehicle environment and performing attention pooling, and using a semantic segmentation model to identify obstacles, the problem of inaccurate obstacle recognition in low-light or no-light scenes by visual detection technology is solved, and accurate obstacle recognition under low-light or no-light conditions is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHUZHOU CSR TIMES ELECTRIC CO LTD
- Filing Date
- 2024-08-30
- Publication Date
- 2026-06-23
Smart Images

Figure CN121640413B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and more specifically, to an obstacle detection method, system, device, and computer-readable storage medium. Background Technology
[0002] Currently, in order to avoid collisions between vehicles and obstacles during vehicle operation, it is necessary to identify obstacles around the vehicle. For example, vision-based detection technology can be used to identify obstacles. However, vision-based detection technology is easily affected by lighting conditions, and the detection effect is difficult to guarantee in low-light or no-light scenarios.
[0003] In conclusion, how to accurately identify obstacles is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0004] The purpose of this application is to provide an obstacle detection method that can, to some extent, solve the technical problem of how to accurately identify obstacles. This application also provides an obstacle detection system, an electronic device, and a computer-readable storage medium.
[0005] To achieve the above objectives, this application provides the following technical solution:
[0006] An obstacle detection method, comprising:
[0007] Acquire point cloud data obtained after collecting information about the vehicle's environment;
[0008] For the first point cloud to be detected in the point cloud data, a local enhanced feature vector of the first point cloud relative to the second point cloud is generated based on the position and features of the second point cloud adjacent to the first point cloud.
[0009] Attention pooling is performed on the local enhanced feature vector to obtain the encoding result of the first point cloud;
[0010] Based on the encoding result, identify the point cloud semantic label of the first point cloud;
[0011] Obstacles in the point cloud data are identified based on the point cloud semantic labels.
[0012] Preferably, generating a local enhanced feature vector of the first point cloud relative to the second point cloud based on the position and features of the second point cloud adjacent to the first point cloud includes:
[0013] Based on the position of the first point cloud and the position of the second point cloud, generate a relative point position encoding feature of the first point cloud relative to the second point cloud;
[0014] Based on the features of the first point cloud and the features of the second point cloud, a semantic context of the first point cloud relative to the second point cloud is generated;
[0015] Based on the relative point position encoding features, the semantic context, and the position of the second point cloud, a local geometric context enhancement feature of the first point cloud relative to the second point cloud is generated;
[0016] Based on the local geometric context enhancement features, the semantic context, and the features of the second point cloud, a local semantic context enhancement feature of the first point cloud relative to the second point cloud is generated.
[0017] The local geometric context enhancement features and the local semantic context enhancement features are concatenated to obtain the local enhancement feature vector of the first point cloud relative to the second point cloud.
[0018] Preferably, generating the relative point position encoding feature of the first point cloud relative to the second point cloud based on the position of the first point cloud and the position of the second point cloud includes:
[0019] Generate the relative coordinate distance between the positions of the first point cloud and the second point cloud;
[0020] Generate the Euclidean distance between the positions of the first point cloud and the second point cloud;
[0021] According to the position concatenation formula, the position of the first point cloud, the position of the second point cloud, the relative coordinate distance, and the Euclidean distance are concatenated to obtain the relative point position encoding feature of the first point cloud relative to the second point cloud;
[0022] The position splicing formula includes:
[0023] ; ;
[0024] in, This represents the relative point position encoding feature; The position of the first point cloud is indicated by , and i represents the number of the first point cloud. This indicates the position of the kth second point cloud adjacent to the first point cloud; This represents the relative coordinate distance; This represents the Euclidean distance; This indicates a splicing operation; K represents the total number of points in the second cloud.
[0025] Preferably, generating the semantic context of the first point cloud relative to the second point cloud based on the features of the first point cloud and the features of the second point cloud includes:
[0026] Generate the features of the first point cloud and the feature differences between the features of the second point cloud;
[0027] By using the first concatenation formula, the features of the first point cloud and the feature differences are combined to obtain the semantic context of the first point cloud relative to the second point cloud.
[0028] The first splicing formula includes:
[0029] ;
[0030] in, This represents the characteristics of the first point cloud; This describes the characteristics of the second point cloud; [ ] indicates the feature differences; [ ] indicates the splicing operation; This refers to the semantic context.
[0031] Preferably, generating local geometric context enhancement features of the first point cloud relative to the second point cloud based on the relative point position encoding features, the semantic context, and the position of the second point cloud includes:
[0032] The semantic context and the position of the second point cloud are learned by the position offset learning formula to obtain the neighborhood position offset of the first point cloud.
[0033] The neighborhood position offset and the relative point position encoding features are concatenated using the second concatenation formula to generate the local geometric context enhancement features of the first point cloud relative to the second point cloud.
[0034] The offset learning formula includes:
[0035] ;
[0036] The second splicing formula includes:
[0037] ;
[0038] MLP stands for Multilayer Perceptron; This indicates the offset of the neighborhood position; This represents the local geometric context enhancement feature.
[0039] Preferably, generating local semantic context enhancement features of the first point cloud relative to the second point cloud based on the local geometric context enhancement features, the semantic context, and the features of the second point cloud includes:
[0040] The semantic offset learning formula is used to learn the local geometric context enhancement features and the features of the second point cloud to obtain the neighborhood semantic context offset of the first point cloud.
[0041] The semantic context and the neighborhood semantic context offset are concatenated using the third concatenation formula to generate the local semantic context enhancement feature of the first point cloud relative to the second point cloud.
[0042] The semantic offset learning formula includes:
[0043] ;
[0044] The third splicing formula includes:
[0045] ;
[0046] in, This represents the semantic context offset of the neighborhood; This represents the local semantic context enhancement feature.
[0047] Preferably, the step of concatenating the local geometric context enhancement features and the local semantic context enhancement features to obtain the local enhancement feature vector of the first point cloud relative to the second point cloud includes:
[0048] The local geometric context enhancement features and the local semantic context enhancement features are concatenated using the fourth concatenation formula to obtain the local enhancement feature vector of the first point cloud relative to the second point cloud.
[0049] The fourth splicing formula includes:
[0050] ;
[0051] in, This represents the local enhanced feature vector.
[0052] Preferably, the step of performing attention pooling on the local enhanced feature vector to obtain the encoding result of the first point cloud includes:
[0053] The local enhanced feature vector is subjected to attention pooling using the attention pooling formula to obtain the encoding result of the first point cloud;
[0054] The attention pooling formula includes:
[0055] ; ;
[0056] in, This represents the encoding result; denoted as the attention score between the first point cloud and the second point cloud; W represents the learnable weight value of the multilayer perceptron; g represents the shared function composed of the multilayer perceptron and the normalized exponential function.
[0057] Preferably, for a first point cloud to be detected in the point cloud data, based on the position and features of a second point cloud adjacent to the first point cloud, a local enhanced feature vector of the first point cloud relative to the second point cloud is generated. Attention pooling is then performed on the local enhanced feature vector to obtain the encoding result of the first point cloud. Based on the encoding result, the point cloud semantic label of the first point cloud is identified, including:
[0058] The information from the point cloud data is input into the trained semantic segmentation model;
[0059] Obtain the point cloud semantic labels output by the semantic segmentation model;
[0060] The semantic segmentation model includes a symmetrical encoding layer and a decoding layer. The encoding layer is used to generate a local enhanced feature vector of the first point cloud relative to the second point cloud in the point cloud data based on the position and features of the second point cloud adjacent to the first point cloud. Attention pooling is then performed on the local enhanced feature vector to obtain the encoding result of the first point cloud. The decoding layer is used to identify the point cloud semantic label of the first point cloud based on the encoding result.
[0061] Preferably, inputting the information from the point cloud data into the trained semantic segmentation model includes:
[0062] The point cloud data is converted into a kd-tree;
[0063] The first input information is obtained by searching for and saving the K nearest neighbor points of each point cloud on the kd tree using the K nearest neighbor algorithm;
[0064] The point cloud data is randomly sampled to obtain the sampling results;
[0065] The second input information is obtained by searching for and saving the K nearest neighbor points of each point cloud in the sampling results using the K nearest neighbor algorithm;
[0066] Check whether the quantity of the second input information has reached the set quantity value;
[0067] If the number of second input information does not reach the set number value, then return to the step of randomly sampling the point cloud data;
[0068] If the number of second input information reaches the set value, then the first input information and all the second input information are input into the trained semantic segmentation model.
[0069] Preferably, after identifying obstacles in the point cloud data based on point cloud semantic labels, the method further includes:
[0070] Based on the semantic tags of the point cloud, the background point cloud in the point cloud data is filtered to obtain the point cloud to be detected;
[0071] Clustering is performed on the point cloud to be detected where the spacing is less than a set threshold, and the clustering result is obtained;
[0072] Clustering results with fewer than a set number of points are removed, and the remaining clustering results are used as data to be analyzed.
[0073] Encroachment detection is performed on the obstacles in the data to be analyzed to obtain the intrusion obstacles.
[0074] Preferably, the step of detecting intrusions into the data to be analyzed to obtain the intrusion obstacles includes:
[0075] Curve fitting is performed on the driving trajectory point cloud in the data to be analyzed to obtain the initial trajectory curve;
[0076] The target trajectory curve is obtained by extending the distances to the left and right sides of the initial trajectory curve.
[0077] In the data to be analyzed, obstacles located in the target trajectory curve are identified as intrusion obstacles.
[0078] Preferably, identifying obstacles located in the target trajectory curve as intrusion obstacles in the data to be analyzed includes:
[0079] For obstacles in the data to be analyzed, the convex hull points of the obstacles are projected onto the XOY plane to obtain the corresponding projection points;
[0080] For each projection point, the projection coordinates of the projection point are cross-multiplied with the target trajectory curve to obtain the cross-multiplication result. If the cross-multiplication result is negative, it is determined that the convex hull point corresponding to the projection point is within the collision limit.
[0081] For obstacles in the data to be analyzed, if the number of convex hull points of the obstacle within the collision limit exceeds the target value, the obstacle is determined to be an intrusion obstacle.
[0082] An obstacle detection system, comprising:
[0083] The first acquisition module is used to acquire point cloud data obtained after collecting data on the environment in which the vehicle is located;
[0084] The first generation module is used to generate a local enhanced feature vector of the first point cloud relative to the second point cloud in the point cloud data, based on the position and features of the second point cloud adjacent to the first point cloud.
[0085] The first processing module is used to perform attention pooling on the local enhanced feature vector to obtain the encoding result of the first point cloud;
[0086] The first recognition module is used to recognize the point cloud semantic label of the first point cloud based on the encoding result;
[0087] The second identification module is used to identify obstacles in the point cloud data based on the point cloud semantic labels.
[0088] An electronic device, comprising:
[0089] Memory, used to store computer programs;
[0090] A processor for executing the computer program to implement the steps of any of the obstacle detection methods described above.
[0091] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the obstacle detection methods described above.
[0092] This application provides an obstacle detection method that acquires point cloud data obtained after collecting data on the environment in which a vehicle is located. For a first point cloud to be detected in the point cloud data, a local enhanced feature vector of the first point cloud relative to the second point cloud is generated based on the position and features of a second point cloud adjacent to the first point cloud. Attention pooling is applied to the local enhanced feature vector to obtain the encoding result of the first point cloud. Based on the encoding result, the point cloud semantic label of the first point cloud is identified. Obstacles in the point cloud data are then identified based on the point cloud semantic label. In this application, generating a local enhanced feature vector of the first point cloud relative to the second point cloud based on the position and features of the second point cloud adjacent to the first point cloud can alleviate the problem of information loss in the point cloud. Then, attention pooling is applied to the local enhanced feature vector to obtain the encoding result of the first point cloud. This allows for the learning of highly correlated local enhanced features through an attention mechanism. Nearby point features are automatically learned and aggregated by learning their importance, reducing the redundancy of unnecessary features and enhancing the set of useful information. Thus, the point cloud semantic label of the first point cloud can be accurately identified based on the encoding result, and consequently, obstacles in the point cloud data can be accurately identified based on the point cloud semantic label. The obstacle detection system, electronic device, and computer-readable storage medium provided in this application also solve the corresponding technical problems. Attached Figure Description
[0093] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0094] Figure 1 A flowchart of an obstacle detection method provided in an embodiment of this application;
[0095] Figure 2 This is a schematic diagram illustrating the generation of the encoding result;
[0096] Figure 3 This is an exemplary schematic diagram of a semantic segmentation model;
[0097] Figure 4 This is a schematic diagram of the structure of an obstacle detection system provided in an embodiment of this application;
[0098] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0099] Figure 6 This is another structural schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0100] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0101] Please see Figure 1 , Figure 1 This is a flowchart of an obstacle detection method provided in an embodiment of this application.
[0102] An obstacle detection method provided in this application embodiment may include the following steps:
[0103] Step S101: Obtain point cloud data after collecting data on the environment in which the vehicle is located.
[0104] In practical applications, point cloud data can be obtained by collecting data on the environment in which the vehicle is located. The vehicle can be a subway, high-speed rail, car, truck, etc. The content of the point cloud data can be determined according to the environment in which the vehicle is located, such as spatial coordinates (x, y, z).
[0105] It should be noted that, considering the advantages of lidar such as light insensitivity and high ranging accuracy, point cloud data can be collected based on lidar to assess the vehicle's environment. In this process, it is necessary to perform external parameter calibration of the lidar to enable the conversion between the radar coordinate system and the vehicle coordinate system, and to synchronize the time of the lidar and the host computer to ensure the time uniqueness of the point cloud data.
[0106] Step S102: For the first point cloud to be detected in the point cloud data, generate a local enhanced feature vector of the first point cloud relative to the second point cloud based on the position and features of the second point cloud adjacent to the first point cloud.
[0107] Step S103: Perform attention pooling on the local enhanced feature vector to obtain the encoding result of the first point cloud.
[0108] Step S104: Based on the encoding results, identify the point cloud semantic labels of the first point cloud.
[0109] In practical applications, after acquiring point cloud data, to alleviate the problem of information loss, the corresponding information of the point cloud can be determined based on the position and features of adjacent point clouds. That is, for the first point cloud to be detected in the point cloud data, a local enhanced feature vector of the first point cloud relative to the second point cloud can be generated based on the position and features of the second point cloud adjacent to the first point cloud. The detection conditions and number of the second point cloud adjacent to the first point cloud can be flexibly determined according to actual needs. Attention pooling is performed on the local enhanced feature vector to obtain the encoding result of the first point cloud. Based on the encoding result, the point cloud semantic label of the first point cloud is identified. The point cloud semantic label is used to characterize the type of point cloud, and its result can be determined according to the specific scenario. For example, when the vehicle is a subway, the point cloud semantic label can include the tunnel wall, ground, and track in the tunnel scene.
[0110] In practical applications, when generating a local enhanced feature vector of the first point cloud relative to the second point cloud based on the position and features of the second point cloud adjacent to the first point cloud, complex local structures can be effectively preserved by explicitly considering adjacent geometric features and semantic context information and significantly increasing the receptive field. Specifically, based on the positions of the first and second point clouds, relative point position encoding features are generated to clarify the positional relationship between adjacent point clouds; semantic context is generated based on the features of the first and second point clouds to clarify the semantic relationship between adjacent point clouds; local geometric context enhancement features are generated based on the relative point position encoding features, semantic context, and the position of the second point cloud; local semantic context enhancement features are generated based on the local geometric context enhancement features, semantic context, and the features of the second point cloud; and the local geometric context enhancement features and local semantic context enhancement features are concatenated to obtain the local enhanced feature vector of the first point cloud relative to the second point cloud.
[0111] In specific application scenarios, during the process of generating the relative point position encoding feature of the first point cloud relative to the second point cloud based on the positions of the first and second point clouds, the relative coordinate distance between the positions of the first and second point clouds can be generated; the Euclidean distance between the positions of the first and second point clouds can be generated; and the positions of the first and second point clouds, the relative coordinate distance, and the Euclidean distance can be concatenated according to the position concatenation formula to obtain the relative point position encoding feature of the first point cloud relative to the second point cloud; the position concatenation formula includes:
[0112] ; ;
[0113] in, This represents the encoding feature of relative point positions; This indicates the position of the first point cloud, and i represents the number of the first point cloud; This indicates the position of the k-th second point cloud adjacent to the first point cloud; Indicates relative coordinate distance; Indicates Euclidean distance; This indicates a splicing operation; K represents the total number of points in the second cloud.
[0114] In specific application scenarios, a bidirectional context enhancement module can be used, including offsets to expand the local context of each point. Therefore, a bidirectional offset mechanism is proposed to achieve mutual learning from both sides of the input information, namely from geometric context and semantic context, and then merge the two feature information for point feature representation, thereby enhancing the local context. In this process, considering that geometric position features need to adapt to high-dimensional space, it is necessary to obtain the geometric feature offset based on the high-dimensional feature semantic context, and then concatenate this offset with the original position features to adjust the positional relationship of the geometric position features in high-dimensional space and enhance their local correlation features. In other words, the feature differences of neighboring points can be calculated first, that is, in the process of generating the semantic context of the first point cloud relative to the second point cloud based on the features of the first point cloud and the features of the second point cloud, the feature differences between the features of the first point cloud and the features of the second point cloud can be generated; through the first concatenation formula, the features and feature differences of the first point cloud are combined to obtain the semantic context of the first point cloud relative to the second point cloud.
[0115] The first splicing formula includes:
[0116] ;
[0117] in, This describes the characteristics of the first point cloud; This describes the characteristics of the second point cloud; Indicates feature differences; [ ] indicates a splicing operation; Represents semantic context.
[0118] In specific application scenarios, semantic context is a feature composed of feature differences and original features concatenated together. Subsequently, a multilayer perceptron can learn the offset of its neighborhood position. This offset is then concatenated with the relative point position encoding to enhance the local geometric context. That is, in the process of generating the enhanced local geometric context feature of the first point cloud relative to the second point cloud based on the relative point position encoding feature, semantic context, and the position of the second point cloud, the positions of the semantic context and the second point cloud can be learned using a position offset learning formula to obtain the neighborhood position offset of the first point cloud. Then, using a second concatenation formula, the neighborhood position offset and the relative point position encoding feature are concatenated to generate the enhanced local geometric context feature of the first point cloud relative to the second point cloud. The offset learning formula includes:
[0119] ;
[0120] The second splicing formula includes:
[0121] ;
[0122] MLP stands for Multilayer Perceptron; Indicates the offset of the neighborhood position; This represents a feature enhanced by local geometric context.
[0123] In specific application scenarios, geometric information can be incorporated into high-dimensional semantic features to reduce feature similarity and eliminate redundant features. Therefore, by learning the high-dimensional offset of semantic features based on positional information, more local features are preserved. Similarly, the offset of the semantic context of the neighborhood of the center point can be learned through the aforementioned local geometric context enhancement information. Then, this offset is concatenated with the semantic context to enhance the local semantic context. That is, in the process of generating the local semantic context enhancement features of the first point cloud relative to the second point cloud based on the local geometric context enhancement features, the semantic context, and the features of the second point cloud, the semantic offset learning formula can be used to learn the local geometric context enhancement features and the features of the second point cloud to obtain the neighborhood semantic context offset of the first point cloud; the third concatenation formula is used to concatenate the semantic context and the neighborhood semantic context offset to generate the local semantic context enhancement features of the first point cloud relative to the second point cloud. The semantic offset learning formula includes:
[0124] ;
[0125] The third splicing formula includes:
[0126] ;
[0127] in, Indicates the semantic context offset of the neighborhood; This represents a feature that enhances local semantic context.
[0128] In specific application scenarios, when concatenating local geometric context enhancement features and local semantic context enhancement features to obtain the local enhanced feature vector of the first point cloud relative to the second point cloud, a fourth concatenation formula can be used to concatenate the local geometric context enhancement features and local semantic context enhancement features to obtain the local enhanced feature vector of the first point cloud relative to the second point cloud; the fourth concatenation formula includes:
[0129] ;
[0130] in, This represents a locally enhanced feature vector.
[0131] In specific application scenarios, considering that max pooling or mean pooling operations hard-integrate the features of neighboring points without paying attention to the correlation between features, thus losing some information, this application adopts an attention mechanism to learn highly correlated local features. It automatically learns the importance of neighboring features and aggregates them together, reducing unnecessary feature redundancy and enhancing the set of useful information. That is, in the process of performing attention pooling on the locally enhanced feature vector to obtain the encoding result of the first point cloud, the attention pooling formula can be used to perform attention pooling on the locally enhanced feature vector to obtain the encoding result of the first point cloud. The attention pooling formula includes:
[0132] ; ;
[0133] in, Indicates the encoding result; Let W represent the attention score between the first and second point clouds, i.e., the degree of association; W represents the learnable weights of the multilayer perceptron; and g represents the shared function composed of the multilayer perceptron and the normalized exponential function softmax, used to learn its neighborhood features. At this point, the entire generation process of the encoding result can be described as follows: Figure 2 As shown.
[0134] In practical applications, neural network models can be used to identify semantic labels for point clouds. For example, a trained semantic segmentation model can be used to identify semantic labels for point clouds. The semantic segmentation model can be an improvement on the RandLA-Net model, adopting a symmetrical encoder-decoder structure to fully integrate feature information from different dimensions. It concatenates the feature information of the same dimension from the four downsampling layers of the encoder layer and the four upsampling layers of the decoder layer, then uses a multilayer perceptron to learn the feature mapping. Finally, it outputs the semantic label information of the input point cloud through a fully connected layer. Its structure can be as follows: Figure 3 As shown, it consists of an upsampling layer, a random downsampling layer, a fully connected layer, a local feature aggregation layer, a multilayer perceptron, and a splicing layer.
[0135] Correspondingly, for the first point cloud to be detected in the point cloud data, based on the position and features of the second point cloud adjacent to the first point cloud, a local enhanced feature vector of the first point cloud relative to the second point cloud is generated. Attention pooling is then applied to this local enhanced feature vector to obtain the encoding result of the first point cloud. Based on the encoding result, during the process of identifying the point cloud semantic label of the first point cloud, the information of the point cloud data can be input into a trained semantic segmentation model; the point cloud semantic label output by the semantic segmentation model is then obtained. The semantic segmentation model includes a symmetrical encoding layer and a decoding layer. The encoding layer is used to determine the encoding result of the first point cloud to be detected in the point cloud data based on the position and features of the second point cloud adjacent to the first point cloud. Based on the location and features of the first point cloud and the second point cloud, a local enhanced feature vector is generated relative to the second point cloud. Attention pooling is then applied to this local enhanced feature vector to obtain the encoding result of the first point cloud. Specifically, the encoding layer can consist of local feature encoding and attention pooling operations. Local feature encoding is used to generate a local enhanced feature vector relative to the second point cloud for the first point cloud to be detected in the point cloud data, based on the location and features of the second point cloud adjacent to the first point cloud. Attention pooling is then applied to this local enhanced feature vector to obtain the encoding result of the first point cloud. The decoding layer is used to identify the semantic label of the first point cloud based on the encoding result. A detailed description of the semantic segmentation model can be found in the descriptions of the corresponding steps in the above embodiments, and will not be repeated here.
[0136] It should be noted that the training process of the semantic segmentation model can be flexibly determined according to the specific application scenario, and the structure of the semantic segmentation model can be flexibly adjusted according to actual needs. For example, the decoding layer can be composed of four upsampling layers. The downsampled features in the decoding layer are concatenated with the upsampled features of the same dimension, and then a multilayer perceptron is used to learn the feature mapping. After four layers of mapping, the semantic label of the point cloud is output through a fully connected layer (FC). The output point cloud information is (x, y, z, label), etc., where label represents the point cloud label.
[0137] It should also be noted that in the process of applying the semantic segmentation model, point cloud data can be directly input into the semantic segmentation model for processing, or the structure of the semantic segmentation model can be simplified, for example, the downsampling layer can be removed to improve the processing efficiency of the semantic segmentation model. In this case, when inputting the information of the point cloud data into the trained semantic segmentation model, the point cloud data can be converted into a kd-tree; the K-nearest neighbor algorithm is used to search for the K-nearest neighbor of each point cloud in the kd-tree and the data is saved to obtain the first input information; the point cloud data is randomly sampled to obtain the sampling results; the K-nearest neighbor algorithm is used to search for the K-nearest neighbor of each point cloud in the sampling results and the data is saved to obtain the second input information; it is checked whether the number of the second input information has reached a set value; if the number of the second input information has not reached the set value, the random sampling step of the point cloud data is returned; if the number of the second input information has reached the set value, the first input information and all the second input information are input into the trained semantic segmentation model.
[0138] Step S105: Identify obstacles in the point cloud data based on the point cloud semantic labels.
[0139] In practical applications, once the point cloud semantic labels are obtained, obstacles in the point cloud data can be identified based on the point cloud semantic labels.
[0140] In practical applications, considering that obstacles located in vehicle driving areas can cause intrusion and pose a driving hazard, to address this issue, after identifying obstacles in the point cloud data based on point cloud semantic labels, the background point cloud in the point cloud data can be filtered based on the point cloud semantic labels to obtain the point cloud to be detected. For example, background point clouds such as tunnel walls and ground point clouds can be filtered. Point clouds with a spacing less than a set threshold in the point cloud to be detected are clustered to obtain clustering results. Clustering results with fewer than a set number of points are removed. The set value can be flexibly determined according to actual needs, and the remaining clustering results are used as the data to be analyzed. Intrusion detection is then performed on obstacles in the data to be analyzed to obtain intruding obstacles.
[0141] In specific application scenarios, when clustering point clouds, a threshold can be defined. If you dot the clouds And point cloud Between satisfy If the two point clouds are clustered together, then the corresponding clustering result can be obtained; otherwise, the two point clouds are not clustered together, and the threshold is set. Weight values Weight values The specific value can be flexibly determined, for example, it can be... , Furthermore, according to the ranging principle of lidar, at the same angular resolution, the greater the distance between adjacent points, the larger the threshold can be.
[0142] In specific application scenarios, when detecting intrusions into the data to be analyzed, the driving trajectory point cloud in the data to be analyzed can be curve-fitted to obtain an initial trajectory curve; the distances on the left and right sides of the initial trajectory curve can be extended to obtain the target trajectory curve; and obstacles located in the target trajectory curve in the data to be analyzed can be identified as intrusions into the data. Furthermore, in the process of identifying obstacles located in the target trajectory curve as intrusion obstacles, for obstacles in the data to be analyzed, the convex hull points of the obstacles can be projected onto the XOY plane to obtain the corresponding projection points, that is, the convex hull points of the obstacles are projected onto the XOY plane where the target trajectory curve is located. For each projection point, the projection coordinate value of the projection point is cross-producted with the target trajectory curve to obtain the cross-product result. If the cross-product result is negative, it is determined that the convex hull point corresponding to the projection point is within the collision limit. For obstacles in the data to be analyzed, if the number of convex hull points of the obstacle within the collision limit exceeds the target value, the obstacle is determined to be an intrusion obstacle. The target value can be determined according to the accuracy of the intrusion detection, for example, the target value can be 1, 2, 3, 5, etc.
[0143] For ease of understanding, let's assume the vehicle is a subway or other rail transit vehicle. During boundary violation detection, the initial trajectory curve is obtained by fitting a trajectory curve to the track point cloud. This initial trajectory curve is then extended to the left and right sides to obtain the target trajectory curve. The area inside the target trajectory curve represents the boundary. The track polynomial parameters of the target trajectory curve are obtained. The convex hull points of the obstacle are projected onto the XOY plane. The projected coordinates of the points are cross-multiplied with the target trajectory curve, and it is determined whether the coordinates are in the middle of the track. Using the rule of "same sign on the same side, different sign on opposite sides," the product is positive for obstacle point clouds outside the boundary on both sides of the track, and negative for those inside the boundary. Finally, if more than one convex hull point is inside the boundary, the obstacle is considered to have violated the boundary.
[0144] This application provides an obstacle detection method that acquires point cloud data obtained after collecting data on the environment in which a vehicle is located. For a first point cloud to be detected in the point cloud data, a local enhanced feature vector of the first point cloud relative to the second point cloud is generated based on the position and features of a second point cloud adjacent to the first point cloud. Attention pooling is applied to the local enhanced feature vector to obtain the encoding result of the first point cloud. Based on the encoding result, the point cloud semantic label of the first point cloud is identified. Obstacles in the point cloud data are then identified based on the point cloud semantic label. In this application, generating a local enhanced feature vector of the first point cloud relative to the second point cloud based on the position and features of the second point cloud adjacent to the first point cloud can alleviate the problem of information loss in the point cloud. Then, attention pooling is applied to the local enhanced feature vector to obtain the encoding result of the first point cloud. This allows for the learning of highly correlated local features through an attention mechanism, automatically learning the importance of neighboring point features and aggregating them together, reducing the redundancy of unnecessary features, and enhancing the collection of useful information. Thus, the point cloud semantic label of the first point cloud can be accurately identified based on the encoding result, and obstacles in the point cloud data can be accurately identified based on the point cloud semantic label.
[0145] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of an obstacle detection system provided in an embodiment of this application.
[0146] An obstacle detection system provided in this application embodiment may include:
[0147] The first acquisition module 101 is used to acquire point cloud data obtained after collecting data on the environment in which the vehicle is located;
[0148] The first generation module 102 is used to generate a local enhanced feature vector of the first point cloud relative to the second point cloud based on the position and features of the second point cloud adjacent to the first point cloud in the point cloud data.
[0149] The first processing module 103 is used to perform attention pooling on the local enhanced feature vector to obtain the encoding result of the first point cloud;
[0150] The first recognition module 104 is used to recognize the point cloud semantic label of the first point cloud based on the encoding result;
[0151] The second recognition module 105 is used to identify obstacles in point cloud data based on point cloud semantic labels.
[0152] This application provides an obstacle detection system, wherein the first generation module may include:
[0153] The first generation unit is used to generate relative point position encoding features of the first point cloud relative to the second point cloud based on the position of the first point cloud and the position of the second point cloud.
[0154] The second generation unit is used to generate a semantic context of the first point cloud relative to the second point cloud based on the features of the first point cloud and the features of the second point cloud.
[0155] The third generation unit is used to generate local geometric context enhancement features of the first point cloud relative to the second point cloud based on the relative point position encoding features, semantic context, and the position of the second point cloud.
[0156] The fourth generation unit is used to generate local semantic context enhancement features of the first point cloud relative to the second point cloud based on the local geometric context enhancement features, semantic context, and features of the second point cloud.
[0157] The first concatenation unit is used to concatenate the local geometric context enhancement features and the local semantic context enhancement features to obtain the local enhancement feature vector of the first point cloud relative to the second point cloud.
[0158] This application provides an obstacle detection system in which the first generation unit is specifically used to: generate the relative coordinate distance between the positions of the first point cloud and the second point cloud; generate the Euclidean distance between the positions of the first point cloud and the second point cloud; and concatenate the positions of the first point cloud, the second point cloud, the relative coordinate distance, and the Euclidean distance according to the position concatenation formula to obtain the relative point position encoding feature of the first point cloud relative to the second point cloud.
[0159] The position splicing formula includes:
[0160] ; ;
[0161] in, This represents the encoding feature of relative point positions; This indicates the position of the first point cloud, and i represents the number of the first point cloud; This indicates the position of the k-th second point cloud adjacent to the first point cloud; Indicates relative coordinate distance; Indicates Euclidean distance; This indicates a splicing operation; K represents the total number of points in the second cloud.
[0162] This application provides an obstacle detection system in which the second generation unit is specifically used to: generate features of a first point cloud and feature differences between features of a second point cloud; and combine the features and feature differences of the first point cloud using a first splicing formula to obtain the semantic context of the first point cloud relative to the second point cloud.
[0163] The first splicing formula includes:
[0164] ;
[0165] in, This describes the characteristics of the first point cloud; This describes the characteristics of the second point cloud; Indicates feature differences; [ ] indicates a splicing operation; Represents semantic context.
[0166] This application provides an obstacle detection system in which the third generation unit is specifically used to: learn the semantic context and the position of the second point cloud through a position offset learning formula to obtain the neighborhood position offset of the first point cloud; and concatenate the neighborhood position offset and the relative point position encoding features through a second concatenation formula to generate the local geometric context enhancement features of the first point cloud relative to the second point cloud.
[0167] The offset learning formula includes:
[0168] ;
[0169] The second splicing formula includes:
[0170] ;
[0171] MLP stands for Multilayer Perceptron; Indicates the offset of the neighborhood position; This represents a feature enhanced by local geometric context.
[0172] An obstacle detection system provided in this application embodiment includes a fourth generation unit specifically used for: learning local geometric context enhancement features and features of a second point cloud through a semantic offset learning formula to obtain a neighborhood semantic context offset of a first point cloud; and concatenating the semantic context and the neighborhood semantic context offset through a third concatenation formula to generate a local semantic context enhancement feature of the first point cloud relative to the second point cloud.
[0173] The semantic shift learning formula includes:
[0174] ;
[0175] The third splicing formula includes:
[0176] ;
[0177] in, Indicates the semantic context offset of the neighborhood; This represents a feature that enhances local semantic context.
[0178] An obstacle detection system provided in this application embodiment includes a first stitching unit specifically used to: stitch together local geometric context enhancement features and local semantic context enhancement features using a fourth stitching formula to obtain a local enhancement feature vector of the first point cloud relative to the second point cloud;
[0179] The fourth splicing formula includes:
[0180] ;
[0181] in, This represents a locally enhanced feature vector.
[0182] An obstacle detection system provided in this application embodiment may include a first processing module that includes:
[0183] The first processing unit is used to perform attention pooling on the local enhanced feature vector using the attention pooling formula to obtain the encoding result of the first point cloud;
[0184] Attention pooling formulas include:
[0185] ; ;
[0186] in, Indicates the encoding result; represents the attention score between the first point cloud and the second point cloud; W represents the learnable weight value of the multilayer perceptron; g represents the shared function consisting of the multilayer perceptron and the normalized exponential function.
[0187] This application provides an obstacle detection system in which the first generation module and the first processing module can be integrated into a single processing module, used to input point cloud data information into a trained semantic segmentation model; and to obtain point cloud semantic labels output by the semantic segmentation model.
[0188] The semantic segmentation model includes a symmetrical encoding layer and a decoding layer. The encoding layer is used to generate a local enhanced feature vector of the first point cloud relative to the second point cloud based on the position and features of the second point cloud adjacent to the first point cloud in the point cloud data. Attention pooling is then performed on the local enhanced feature vector to obtain the encoding result of the first point cloud. The decoding layer is used to identify the point cloud semantic label of the first point cloud based on the encoding result.
[0189] This application provides an obstacle detection system in which the processing module can be used to: convert point cloud data into a kd-tree; search for and save the K nearest neighbor points of each point cloud in the kd-tree using the K-nearest neighbor algorithm to obtain first input information; randomly sample the point cloud data to obtain sampling results; search for and save the K nearest neighbor points of each point cloud in the sampling results using the K-nearest neighbor algorithm to obtain second input information; detect whether the number of second input information reaches a set value; if the number of second input information does not reach the set value, return to the step of randomly sampling the point cloud data; if the number of second input information reaches the set value, input the first input information and all the second input information into the trained semantic segmentation model.
[0190] An obstacle detection system provided in this application embodiment may further include:
[0191] The first filtering module is used to filter the background point cloud in the point cloud data according to the point cloud semantic labels after the second recognition module recognizes obstacles in the point cloud data based on the point cloud semantic labels, so as to obtain the point cloud to be detected.
[0192] The first clustering module is used to cluster points in the point cloud to be detected whose spacing is less than a set threshold, and obtain the clustering results.
[0193] The first elimination module is used to eliminate clustering results with fewer than a set number of points, and use the remaining clustering results as data to be analyzed.
[0194] The first detection module is used to detect intrusions into the data to be analyzed and to identify the intruding obstacles.
[0195] An obstacle detection system provided in this application embodiment may include a first detection module that includes:
[0196] The first fitting unit is used to perform curve fitting on the driving trajectory point cloud in the data to be analyzed, and obtain the initial trajectory curve;
[0197] The first extension unit is used to extend the distance to the left and right sides of the initial trajectory curve to obtain the target trajectory curve;
[0198] The first detection unit is used to identify obstacles located in the target trajectory curve as intrusion obstacles in the data to be analyzed.
[0199] This application provides an obstacle detection system. The first detection unit is specifically used for: projecting the convex hull points of the obstacle onto the XOY plane to obtain the corresponding projection points for the obstacle in the data to be analyzed; for each projection point, performing a cross product between the projection coordinates of the projection point and the target trajectory curve to obtain the cross product result; if the cross product result is negative, then determining that the convex hull point corresponding to the projection point is within the collision limit; for the obstacle in the data to be analyzed, if the number of convex hull points of the obstacle within the collision limit exceeds the target value, then determining that the obstacle is an intruding obstacle.
[0200] This application also provides an electronic device and a computer-readable storage medium, both of which have the corresponding effects of the obstacle detection method provided in the embodiments of this application. Please refer to... Figure 5 , Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0201] An electronic device provided in this application includes a memory 201 and a processor 202. The memory 201 stores a computer program, and the processor 202 executes the computer program to implement the steps of the obstacle detection method described in any of the above embodiments.
[0202] Please see Figure 6 Another electronic device provided in this application embodiment may further include: an input port 203 connected to the processor 202 for transmitting commands input from the outside to the processor 202; a display unit 204 connected to the processor 202 for displaying the processing results of the processor 202 to the outside; and a communication module 205 connected to the processor 202 for enabling communication between the electronic device and the outside. The display unit 204 may be a display panel, a laser scanner, or the like; the communication method used by the communication module 205 includes, but is not limited to, Mobile High-Definition Link (MHL), Universal Serial Bus (USB), High-Definition Multimedia Interface (HDMI), wireless connectivity: Wireless Fidelity (WiFi), Bluetooth communication technology, Bluetooth Low Energy communication technology, and communication technology based on IEEE 802.11s.
[0203] This application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the steps of the obstacle detection method described in any of the above embodiments.
[0204] The computer-readable storage media involved in this application include random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs (compact disc read-only memory), or any other form of storage media known in the art.
[0205] For descriptions of relevant parts of the obstacle detection system, electronic device, and computer-readable storage medium provided in the embodiments of this application, please refer to the detailed descriptions of the corresponding parts in the obstacle detection method provided in the embodiments of this application, which will not be repeated here. Furthermore, parts of the technical solutions provided in the embodiments of this application that are consistent with the implementation principles of corresponding technical solutions in the prior art have not been described in detail to avoid excessive elaboration.
[0206] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0207] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An obstacle detection method, characterized in that, include: Acquire point cloud data obtained after collecting information about the vehicle's environment; For the first point cloud to be detected in the point cloud data, a local enhanced feature vector of the first point cloud relative to the second point cloud is generated based on the position and features of the second point cloud adjacent to the first point cloud. Attention pooling is performed on the local enhanced feature vector to obtain the encoding result of the first point cloud; Based on the encoding result, identify the point cloud semantic label of the first point cloud; Obstacles in the point cloud data are identified based on point cloud semantic labels; The step of generating a local enhanced feature vector of the first point cloud relative to the second point cloud based on the position and features of the second point cloud adjacent to the first point cloud includes: Based on the position of the first point cloud and the position of the second point cloud, generate a relative point position encoding feature of the first point cloud relative to the second point cloud; Based on the features of the first point cloud and the features of the second point cloud, a semantic context of the first point cloud relative to the second point cloud is generated; Based on the relative point position encoding features, the semantic context, and the position of the second point cloud, a local geometric context enhancement feature of the first point cloud relative to the second point cloud is generated; Based on the local geometric context enhancement features, the semantic context, and the features of the second point cloud, a local semantic context enhancement feature of the first point cloud relative to the second point cloud is generated. The local geometric context enhancement features and the local semantic context enhancement features are concatenated to obtain the local enhancement feature vector of the first point cloud relative to the second point cloud.
2. The method according to claim 1, characterized in that, The step of generating relative point position encoding features of the first point cloud relative to the second point cloud based on the positions of the first point cloud and the second point cloud includes: Generate the relative coordinate distance between the positions of the first point cloud and the second point cloud; Generate the Euclidean distance between the positions of the first point cloud and the second point cloud; According to the position concatenation formula, the position of the first point cloud, the position of the second point cloud, the relative coordinate distance, and the Euclidean distance are concatenated to obtain the relative point position encoding feature of the first point cloud relative to the second point cloud; The position splicing formula includes: ; ; in, This represents the relative point position encoding feature; This indicates the position of the first point cloud. i This indicates the number of the first point cloud; Indicates the number of points adjacent to the first point cloud. k The location of the second point cloud; This represents the relative coordinate distance; This represents the Euclidean distance; Indicates a splicing operation; K This indicates the total number of points in the second cloud.
3. The method according to claim 2, characterized in that, The step of generating a semantic context for the first point cloud relative to the second point cloud based on the features of the first point cloud and the features of the second point cloud includes: Generate the features of the first point cloud and the feature differences between the features of the second point cloud; By using the first concatenation formula, the features of the first point cloud and the feature differences are combined to obtain the semantic context of the first point cloud relative to the second point cloud. The first splicing formula includes: ; in, This represents the characteristics of the first point cloud; This describes the characteristics of the second point cloud; [ ] indicates the feature difference; [ ] indicates the splicing operation; This refers to the semantic context.
4. The method according to claim 3, characterized in that, The step of generating local geometric context enhancement features of the first point cloud relative to the second point cloud based on the relative point position encoding features, the semantic context, and the position of the second point cloud includes: The semantic context and the position of the second point cloud are learned by the position offset learning formula to obtain the neighborhood position offset of the first point cloud. The neighborhood position offset and the relative point position encoding features are concatenated using the second concatenation formula to generate the local geometric context enhancement features of the first point cloud relative to the second point cloud. The offset learning formula includes: ; The second splicing formula includes: ; in, MLP This represents a multilayer perceptron; This indicates the offset of the neighborhood position; This represents the local geometric context enhancement feature.
5. The method according to claim 4, characterized in that, The step of generating local semantic context enhancement features of the first point cloud relative to the second point cloud based on the local geometric context enhancement features, the semantic context, and the features of the second point cloud includes: The semantic offset learning formula is used to learn the local geometric context enhancement features and the features of the second point cloud to obtain the neighborhood semantic context offset of the first point cloud. The semantic context and the neighborhood semantic context offset are concatenated using the third concatenation formula to generate the local semantic context enhancement feature of the first point cloud relative to the second point cloud. The semantic offset learning formula includes: ; The third splicing formula includes: ; in, This represents the semantic context offset of the neighborhood; This represents the local semantic context enhancement feature.
6. The method according to claim 5, characterized in that, The step of concatenating the local geometric context enhancement features and the local semantic context enhancement features to obtain the local enhancement feature vector of the first point cloud relative to the second point cloud includes: The local geometric context enhancement features and the local semantic context enhancement features are concatenated using the fourth concatenation formula to obtain the local enhancement feature vector of the first point cloud relative to the second point cloud. The fourth splicing formula includes: ; in, This represents the local enhanced feature vector.
7. The method according to claim 6, characterized in that, The step of performing attention pooling on the locally enhanced feature vector to obtain the encoding result of the first point cloud includes: The local enhanced feature vector is subjected to attention pooling using the attention pooling formula to obtain the encoding result of the first point cloud; The attention pooling formula includes: ; ; in, This represents the encoding result; This represents the attention score between the first point cloud and the second point cloud; W This represents the learnable weight values of a multilayer perceptron. g This represents a shared function consisting of a multilayer perceptron and a normalized exponential function.
8. The method according to any one of claims 1 to 7, characterized in that, For a first point cloud to be detected in the point cloud data, based on the position and features of a second point cloud adjacent to the first point cloud, a local enhanced feature vector of the first point cloud relative to the second point cloud is generated. Attention pooling is then performed on the local enhanced feature vector to obtain the encoding result of the first point cloud. Based on the encoding result, the point cloud semantic label of the first point cloud is identified, including: The information from the point cloud data is input into the trained semantic segmentation model; Obtain the point cloud semantic labels output by the semantic segmentation model; The semantic segmentation model includes a symmetrical encoding layer and a decoding layer. The encoding layer is used to generate a local enhanced feature vector of the first point cloud relative to the second point cloud in the point cloud data based on the position and features of the second point cloud adjacent to the first point cloud. Attention pooling is then performed on the local enhanced feature vector to obtain the encoding result of the first point cloud. The decoding layer is used to identify the point cloud semantic label of the first point cloud based on the encoding result.
9. The method according to claim 8, characterized in that, The step of inputting the information from the point cloud data into the trained semantic segmentation model includes: The point cloud data is converted into a kd-tree; The first input information is obtained by searching for and saving the K nearest neighbor points of each point cloud on the kd tree using the K nearest neighbor algorithm; The point cloud data is randomly sampled to obtain the sampling results; The second input information is obtained by searching for and saving the K nearest neighbor points of each point cloud in the sampling results using the K nearest neighbor algorithm; Check whether the quantity of the second input information has reached the set quantity value; If the number of second input information does not reach the set number value, then return to the step of randomly sampling the point cloud data; If the number of second input information reaches the set value, then the first input information and all the second input information are input into the trained semantic segmentation model.
10. The method according to claim 1, characterized in that, After identifying obstacles in the point cloud data based on point cloud semantic labels, the method further includes: Based on the semantic tags of the point cloud, the background point cloud in the point cloud data is filtered to obtain the point cloud to be detected; Clustering is performed on the point cloud to be detected where the spacing is less than a set threshold, and the clustering result is obtained; Clustering results with fewer than a set number of points are removed, and the remaining clustering results are used as data to be analyzed. Encroachment detection is performed on the obstacles in the data to be analyzed to obtain the intrusion obstacles.
11. The method according to claim 10, characterized in that, The step of detecting intrusions into the data to be analyzed to obtain intrusion obstacles includes: Curve fitting is performed on the driving trajectory point cloud in the data to be analyzed to obtain the initial trajectory curve; The target trajectory curve is obtained by extending the distances to the left and right sides of the initial trajectory curve. In the data to be analyzed, obstacles located in the target trajectory curve are identified as intrusion obstacles.
12. The method according to claim 11, characterized in that, The step of identifying obstacles located in the target trajectory curve as intrusion obstacles in the data to be analyzed includes: For obstacles in the data to be analyzed, the convex hull points of the obstacles are projected onto the XOY plane to obtain the corresponding projection points; For each projection point, the projection coordinates of the projection point are cross-multiplied with the target trajectory curve to obtain the cross-multiplication result. If the cross-multiplication result is negative, it is determined that the convex hull point corresponding to the projection point is within the collision limit. For obstacles in the data to be analyzed, if the number of convex hull points of the obstacle within the collision limit exceeds the target value, the obstacle is determined to be an intrusion obstacle.
13. An obstacle detection system, characterized in that, include: The first acquisition module is used to acquire point cloud data obtained after collecting data on the environment in which the vehicle is located; The first generation module is used to generate a local enhanced feature vector of the first point cloud relative to the second point cloud in the point cloud data, based on the position and features of the second point cloud adjacent to the first point cloud. The first processing module is used to perform attention pooling on the local enhanced feature vector to obtain the encoding result of the first point cloud; The first recognition module is used to recognize the point cloud semantic label of the first point cloud based on the encoding result; The second identification module is used to identify obstacles in the point cloud data based on point cloud semantic labels; The first generation module includes: The first generation unit is used to generate a relative point position encoding feature of the first point cloud relative to the second point cloud based on the position of the first point cloud and the position of the second point cloud. The second generation unit is used to generate a semantic context of the first point cloud relative to the second point cloud based on the features of the first point cloud and the features of the second point cloud. The third generation unit is used to generate local geometric context enhancement features of the first point cloud relative to the second point cloud based on the relative point position encoding features, the semantic context, and the position of the second point cloud. The fourth generation unit is used to generate local semantic context enhancement features of the first point cloud relative to the second point cloud based on the local geometric context enhancement features, the semantic context, and the features of the second point cloud. The first concatenation unit is used to concatenate the local geometric context enhancement features and the local semantic context enhancement features to obtain the local enhancement feature vector of the first point cloud relative to the second point cloud.
14. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the obstacle detection method as described in any one of claims 1 to 12 when executing the computer program.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the obstacle detection method as described in any one of claims 1 to 12.