Point cloud individual tree segmentation method, system and device and storage medium

By optimizing the loss function and learning rate using the SegNet deep learning framework and combining cross-entropy and Dice coefficient loss functions, the problems of noise, sparsity, and insufficient 3D feature processing in point cloud segmentation are solved, achieving high-precision single-tree segmentation of point clouds, which is suitable for tree monitoring and ecological safety assessment of power transmission lines.

CN121074385APending Publication Date: 2025-12-05GUIZHOU POWER GRID CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510940357.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-09
Publication Date
2025-12-05

AI Technical Summary

Technical Problem

Existing point cloud segmentation technologies suffer from problems such as noise interference and sparse point clouds, insufficient 3D feature processing, difficulty in data annotation, and high computational efficiency and resource consumption when dealing with single tree identification in complex environments, making it difficult to achieve high-precision segmentation and real-time inspection.

Method used

Using the SegNet deep learning framework, semantic segmentation of point cloud data is performed by optimizing the loss function and learning rate, combining the cross-entropy loss function and the Dice coefficient loss function. Robustness is enhanced through preprocessing and feature extraction, classification is performed using activation functions, and finally, the segmentation accuracy is verified through evaluation metrics.

Benefits of technology

It improves the accuracy and robustness of point cloud segmentation, effectively addresses issues such as noise, sparse point clouds, and data imbalance, and is suitable for tree monitoring and ecological safety assessment in power transmission line corridors, meeting the needs for rapid and accurate segmentation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121074385A_ABST
    Figure CN121074385A_ABST
Patent Text Reader

Abstract

The invention discloses a point cloud single tree segmentation method and system. The method comprises the steps of obtaining point cloud data of a target tree and an environment in a power transmission corridor area; constructing a segmentation network model, and performing model training through the optimized loss function and adjustment of the adaptive learning rate to obtain an optimized segmentation network model; inputting the preprocessed point cloud data into the optimized segmentation network model, calculating the category of each point through an activation function, and outputting the category prediction of each point; and point cloud segmentation is carried out based on the category, and a segmentation result is evaluated. According to the invention, point cloud data segmentation is carried out through the segmentation network architecture, the learning rate and the loss function in the architecture are optimized, and the recognition and segmentation precision of the tree monomers is improved in combination with the probability distribution of deep learning; the robustness in a complex environment is enhanced, the problems of noise, sparse point clouds and data imbalance can be effectively solved, and the method is suitable for tree monitoring, accurate positioning and safety evaluation of the transmission line corridor.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of point cloud data processing, and in particular to a point cloud tree segmentation method, system, device and storage medium. BACKGROUND

[0002] In the inspection and maintenance of the transmission line corridor, the distribution and growth of trees directly affect the safe and stable operation of the line. With the natural growth of vegetation or the action of external forces such as wind, trees may intrude into the safety distance of the line, causing collision, discharge or even short circuit accidents, and in severe cases, causing large-scale power outages or equipment damage. Therefore, timely and accurate identification and segmentation of single tree information in the corridor is a key link to prevent tree-line conflicts and ensure the safety of the power grid. Currently, single tree segmentation technology based on LiDAR point cloud data has become the mainstream method, which can reconstruct the spatial structure of trees in three dimensions and provide a basis for risk assessment.

[0003] However, the existing point cloud segmentation technology still has the following problems in processing single tree identification in complex environments: noise interference and sparse point cloud: due to the influence of sensor accuracy, environmental factors and other factors, point cloud data often has noise and sparsity, and existing segmentation methods are difficult to achieve high-precision segmentation in low-density or incomplete point cloud areas; insufficient three-dimensional feature processing: existing methods project point cloud data into two-dimensional images or voxels, ignoring the three-dimensional geometric features of point cloud, resulting in insufficient segmentation effect, especially in processing complex spatial relationships between trees and other objects, the accuracy is low; data labeling is difficult: point cloud data labeling is time-consuming and difficult, especially in large-scale transmission line corridors, the inconsistency of manual labeling and data quality makes the training of deep learning models challenging; calculation efficiency and resource consumption: traditional deep learning methods require high computing resources for processing large-scale point cloud data, and the inference speed is slow, which cannot meet the needs of real-time inspection and dynamic monitoring. SUMMARY

[0004] In view of the above existing problems, the present application is proposed.

[0005] Therefore, the present application provides a point cloud tree segmentation method and system to solve the problems of current segmentation methods that are difficult to achieve high-precision segmentation in low-density or incomplete point cloud areas, insufficient three-dimensional feature processing, and high computational efficiency and resource consumption.

[0006] To solve the above technical problems, the present application provides the following technical solutions:

[0007] In a first aspect, the present application provides a point cloud tree segmentation method, comprising:

[0008] obtaining point cloud data of target trees and the environment in the transmission corridor area;

[0009] A segmentation network model is constructed, and the model is trained using an optimized loss function and an adjusted adaptive learning rate to obtain an optimized segmentation network model.

[0010] The preprocessed point cloud data is input into the optimized segmentation network model, the category of each point is calculated through the activation function, and the category prediction of each point is output.

[0011] Point cloud segmentation is performed based on the category, and the segmentation results are evaluated.

[0012] As a preferred embodiment of the point cloud single-tree segmentation method described in this invention, the optimized loss function includes:

[0013] Set the first weight for the cross-entropy loss function;

[0014] Set a second weight for the Dice coefficient loss function;

[0015] The two loss functions, each with its own weight coefficient, are weighted and combined to obtain the optimized loss function.

[0016] The beneficial effects of this preferred technical solution are: by using a weighted combination of cross-entropy loss function and Dice coefficient loss function, it can balance classification accuracy and boundary recovery accuracy.

[0017] As a preferred embodiment of the point cloud single-tree segmentation method described in this invention, the model training is performed by adjusting the adaptive learning rate, including:

[0018] A warm-up mechanism is adopted to gradually increase the learning rate within the first threshold range of rounds;

[0019] After increasing the learning rate, cosine annealing is used to gradually decrease the learning rate.

[0020] The beneficial effects of this preferred technical solution are: by optimizing the learning rate, it can have a stronger generalization ability, adapt to tree segmentation tasks in different terrains and environments, avoid overfitting, and improve performance in new scenarios.

[0021] As a preferred embodiment of the point cloud single-tree segmentation method described in this invention, the preprocessed point cloud data is input into the optimized segmentation network model, including:

[0022] The preprocessed point cloud data is input into the optimized SegNet segmentation network model in the form of three-dimensional coordinates.

[0023] By progressively extracting local and global features of the point cloud through multiple convolutional layers, tree features and features distinguishing trees from the background are obtained.

[0024] All features are recovered to the original point cloud space size through a deconvolution layer.

[0025] As a preferred scheme of the point cloud single tree segmentation method, wherein: the class to which each point belongs is calculated through an activation function, and the class prediction of each point is outputted, including:

[0026] The distribution probability of each point in each class is calculated through a softmax activation function;

[0027] The class with the maximum probability is selected as the final prediction class of the point.

[0028] As a preferred scheme of the point cloud single tree segmentation method, wherein: the class includes a trunk, a crown and an environmental background.

[0029] As a preferred scheme of the point cloud single tree segmentation method, wherein: the point cloud is segmented based on the class, and the segmentation result is evaluated, including:

[0030] The accuracy value is calculated for each type through a Dice coefficient and / or an intersection over union;

[0031] The segmentation accuracy is judged based on the accuracy value, and is visualized.

[0032] In a second aspect, the present application provides a point cloud single tree segmentation system, comprising:

[0033] An acquisition module is configured to acquire point cloud data of target trees and an environment in a power transmission corridor region;

[0034] A training module is configured to construct a segmentation network model, and train the model through an optimized loss function and an adjusted adaptive learning rate to obtain an optimized segmentation network model;

[0035] A prediction module is configured to input preprocessed point cloud data into the optimized segmentation network model, calculate the class to which each point belongs through an activation function, and output the class prediction of each point;

[0036] An evaluation module is configured to segment the point cloud based on the class, and evaluate the segmentation result.

[0037] In a third aspect, the present application provides an electronic device, comprising:

[0038] A memory and a processor;

[0039] The memory is configured to store computer executable instructions, and the processor is configured to execute the computer executable instructions, which implement the steps of the point cloud single tree segmentation method when executed by the processor.

[0040] In a fourth aspect, the present application provides a computer readable storage medium storing computer executable instructions, which, when executed by a processor, implement the steps of the point cloud tree segmentation method.

[0041] Compared with the prior art, the present application has the following beneficial effects: the present application performs semantic segmentation on point cloud data through the encoding-decoding architecture of a segmentation network (SegNet), optimizes the learning rate and loss function in the architecture, and improves the recognition and segmentation accuracy of tree individuals in combination with the probability distribution of deep learning; at the same time, the present application enhances the robustness in complex environments by optimizing the preprocessing and feature extraction of point cloud data, and can effectively deal with the problems of noise, sparse point cloud and data imbalance; and further verifies the classification accuracy based on evaluation and detection, and is suitable for tree monitoring, accurate positioning and ecological safety evaluation of power line corridors. BRIEF DESCRIPTION OF DRAWINGS

[0042] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0043] Figure 1 The overall flowchart of the point cloud tree segmentation method according to an embodiment of the present application.

[0044] Figure 2 The encoding-decoding structure diagram of the SegNet segmentation model in the point cloud tree segmentation method according to an embodiment of the present application. DETAILED DESCRIPTION

[0045] In order to make the above-mentioned objects, features and advantages of the present application more apparent and easy to understand, the specific embodiments of the present application will be described in detail below with reference to the drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should be within the scope of protection of the present application.

[0046] Embodiment 1, refer to Figure 1 According to an embodiment of the present application, a point cloud tree segmentation method is provided, comprising:

[0047] S100: acquiring point cloud data of target trees and environment in a power corridor area;

[0048] S200: constructing a segmentation network model, and training the model through an optimized loss function and an adjusted adaptive learning rate to obtain an optimized segmentation network model;

[0049] S300: input the preprocessed point cloud data into the optimized segmentation network model, calculate the category to which each point belongs through an activation function, and output the category prediction of each point;

[0050] S400: perform point cloud segmentation based on the category, and evaluate the segmentation result.

[0051] It should be noted that, at present, due to the influence of factors such as sensor accuracy, flight height, and occlusion, the collected point cloud data often contains noise and is unevenly distributed, especially in the edge of the tree crown or the low-vegetation area, the point cloud density is insufficient, which makes it difficult for the existing algorithm to achieve complete and accurate segmentation; and the current method often converts the point cloud into a two-dimensional image or a regular grid for processing through projection or voxelization, which destroys the geometric structure of the original data, makes it difficult to capture the complex three-dimensional spatial distribution of tree branches and leaf clusters, and affects the segmentation accuracy, especially when the tree overlaps with objects such as wires and towers, the misclassification rate is high; if a unified point cloud deep learning model such as PointNet++ is used, the hardware computing power requirement is high, and the inference speed is slow when processing large-scale corridor point clouds, which is difficult to meet the demand for rapid response of the inspection system.

[0052] Therefore, in view of the above specific problems existing in point cloud data processing, through the steps of S100-S400, a complete closed loop is formed from data acquisition to model optimization, a lightweight segmentation model suitable for the power transmission corridor scene is designed to solve the problems of noise, sparsity, and three-dimensional feature extraction; the trained model is used to classify the input point cloud point by point, and the model accuracy is verified to provide a basis for subsequent algorithm improvement and operation and maintenance ideas.

[0053] Embodiment 2, refer to Figures 1-2 and Table 1, based on the above embodiment, a point cloud single tree segmentation method is provided.

[0054] In the embodiments of the present application, the point cloud data of the target trees and the environment in the power transmission corridor region acquired in step S100 can be obtained by a laser radar (LiDAR) device for high-precision point cloud scanning of the target trees and the surrounding environment in the power transmission corridor region.

[0055] The point cloud data of the target trees and the environment can include multiple types of point cloud data such as tree trunks, tree crowns, branches, terrain, low-vegetation, and power transmission channel structures.

[0056] In an optional embodiment, the data acquisition in step S100 can also be performed by a multi-camera unmanned aerial vehicle to generate dense three-dimensional point clouds using a stereo matching algorithm; or, the ground three-dimensional structure is reconstructed through radar wave reflection signals to generate point cloud data.

[0057] In another optional implementation, the point cloud data in step S100 can further include: power transmission equipment details, such as power transmission lines and insulators; and dynamic environmental elements, such as temporary obstacles.

[0058] It should be noted that, in order to ensure the accuracy of the data, the data is collected in clear weather conditions as much as possible to avoid the interference of environmental noise. Optionally, the resolution of the point cloud data can be 5 cm, and the coverage area can be a power transmission corridor area of 500 meters long and 50 meters wide.

[0059] In the embodiments of the present application, the optimized loss function in step S200 includes:

[0060] a first weight of the cross-entropy loss function is set;

[0061] a second weight of the Dice coefficient loss function is set;

[0062] The two loss functions combined with respective weight coefficients are combined by weighting to obtain the optimized loss function.

[0063] Specifically, the cross-entropy loss (Cross-Entropy Loss) is used to calculate the error of each point belonging to a certain category. For a single point i, the cross-entropy loss formula is represented as:

[0064]

[0065] where y ic is the true label, is the probability predicted by the model, and C is the number of categories.

[0066] Specifically, the Dice coefficient loss (Dice Loss) measures the similarity between the prediction result and the true label, which can be specifically represented as:

[0067]

[0068] where A is the predicted region, B is the true label region, and |A| and |B| are the corresponding pixel numbers.

[0069] It should be noted that the Dice coefficient loss is particularly suitable for the point cloud category imbalance problem of eucalyptus, i.e., the number of background points is much larger than the number of tree points. If only cross-entropy is used, the model may tend to predict the background. Therefore, the present application introduces DiceLoss to enhance the sensitivity to small categories (trunk and crown), and considers the classification accuracy and the accuracy of the segmentation boundary. The weights of the two are adjusted to make the segmentation of the crown and the trunk area more accurate.

[0070] Specifically, the optimized loss function can be represented as:

[0071]

[0072] where λ1 and λ2 are hyperparameters to balance the two loss functions.

[0073] It should also be noted that different weights should be assigned to different categories of points, such as assigning higher weights to eucalyptus trunks to increase the sensitivity of the model to trunks near power transmission lines; in addition, when calculating the Dice Loss, the label consistency of adjacent points should be considered to reduce the influence of noise points on the model.

[0074] In an optional embodiment, the optimized loss function in step S200 can also be obtained by combining the cross-entropy loss with a geometric regularization term, where the geometric regularization term can be directly calculated using the original point cloud coordinates and normal vector information collected in S100.

[0075] In another optional embodiment, the optimized loss function in step S200 can also be obtained by multiplying the dynamic focal point weight with the distance weighted Dice loss, where the distance-aware loss can be combined with the existing tower coordinate database of the inspection system to generate a distance field feature map in the point cloud preprocessing stage as an additional channel for model input.

[0076] In the embodiments of the present application, the model training in step S200 is performed by adjusting the adaptive learning rate, including:

[0077] A warm-up mechanism is used to gradually increase the learning rate within the first threshold range of rounds;

[0078] After increasing the learning rate, a cosine annealing is used to gradually decay the learning rate.

[0079] For example, the first threshold range can be selected to gradually increase the learning rate within the first 10 rounds (Epoch), and then the learning rate is reduced using cosine annealing to improve the convergence speed.

[0080] It should be noted that the adaptive learning rate is applicable in backpropagation, which calculates the gradient of the loss function and updates the model parameters using the gradient descent method (usually using the Adam optimizer).

[0081] For example, the update rule of the Adam optimizer is as follows:

[0082]

[0083] where m t and v tare the first and second momentum of the gradient, respectively, a is the learning rate, and e is a constant to prevent division by zero errors; b1=0.9, b2=0.999 control the smoothness of the gradient.

[0084] In an alternative embodiment, the optimization of the learning rate in step S200 can also be achieved by dividing the lightweight segmentation network into a feature extraction layer (shallow layer) and a semantic discrimination layer (deep layer), thereby obtaining the trained learning rate.

[0085] In the embodiments of the present application, the optimized segmentation network model in step S200 is a SegNet model based on the optimized loss function and learning rate in step S200, as shown in Figure 2 .

[0086] It should be noted that the basic architecture of SegNet consists of two main parts: an encoder and a decoder. The encoder part is responsible for extracting local and global features of the eucalyptus point cloud data, such as tree trunk, crown boundary, texture information, etc., while the decoder part is responsible for gradually restoring the original spatial size of the point cloud and performing point classification to achieve accurate segmentation.

[0087] Preferably, the training of the model in step S200 uses Xavier initialization to ensure stable propagation of gradients across different layers. The model is first trained using synthetic point cloud data, and then transferred to real eucalyptus point cloud data to improve generalization ability.

[0088] In the model encoder part, the point cloud data is first subjected to multiple convolutional layers for feature extraction. Since the point cloud data is sparse three-dimensional data, the point cloud data is converted to voxel representation before being input into the SegNet, and 3D convolution is used to extract local features.

[0089] Let the three-dimensional tensor of the input point cloud data be X, the convolution kernel (filter) be K, and the bias term be b. The convolution calculation formula is as follows:

[0090] Y = X * K + b

[0091] where * is the convolution operation, and Y is the output feature map. Each convolutional layer is followed by a ReLU activation function to enhance the non-linear feature expression capability.

[0092] For example, for eucalyptus trees, the types of features that can be extracted by multi-layer convolution are as follows:

[0093] Geometric morphological features: used to identify the main structure of the eucalyptus tree, including the trunk, crown, and their boundary regions.

[0094] Low-level convolution (first layer): Mainly extracts local geometric patterns, such as the spatial distribution of points, the vertical structure of the trunk, and the hierarchical characteristics of the crown. The trunk point cloud has a regular cylindrical structure, while the crown point cloud is sparse and irregular.

[0095] High-level convolution (second and higher layers): Recognizes more complex geometric patterns, such as the transition area between the trunk and the crown. Convolution layers can learn that the trunk area is usually straight, while the crown area is more dense and has curvature changes.

[0096] Texture and density features: Used to analyze the density changes of eucalyptus point clouds to distinguish different parts.

[0097] Point cloud density: The point density of the trunk area is higher because the LiDAR scanning of the trunk points is usually more concentrated. The point density of the crown area is lower because the point cloud data is sparse due to the shielding of leaves. Deep convolution can learn the density difference to help the model distinguish between the trunk and the crown.

[0098] Spatial distribution features: Used to analyze the spatial position of point cloud data to enhance classification accuracy.

[0099] Due to the different distributions of the trunk and the crown, convolution layers learn the coordinate patterns of points in three-dimensional space:

[0100] The trunk is mainly distributed in the central area of the tree and has less height variation; the crown is widely distributed and has large height variation, and its shape is more complex.

[0101] To reduce computational complexity and control feature dimensionality while preserving important feature information, a max-pooling operation is performed after each convolution layer. For example, a 2x2x2 pooling window is preferred, and each pooling operation retains the maximum value in a local area and reduces the feature dimension.

[0102] P ij =max(X m,n )

[0103] where X m,n represents all values within the pooling window, and P ij is the pooled value. The key features extracted by the max-pooling layer are mainly the spatial structure features of eucalyptus point cloud data, including the trunk structure of the trunk, the overall outline of the crown, and the distribution of the background area.

[0104] Hierarchical structure: The encoder is usually composed of multiple convolution layers and pooling layers, and each level gradually reduces the spatial dimension and extracts more abstract features.

[0105] The decoder of the subsequent SegNet model restores the spatial size of the image through a deconvolution operation. The deconvolution layer restores the high-dimensional feature map extracted from the encoder to the original size of the input point cloud.

[0106] Given an input feature map X and a deconvolution kernel K, the deconvolution operation is calculated as follows:

[0107]

[0108] wherein, denotes the deconvolution (up-sampling) operation, and Y is the restored feature map.

[0109] A ReLU activation function is used after each deconvolution layer in the decoder to enhance the nonlinear expression ability of the model.

[0110] It should be noted that the optimized SegNet model is preferably used as a segmentation framework, which can effectively overcome the limitations of traditional point cloud segmentation methods in complex environments. The SegNet architecture can simultaneously extract spatial and spectral features of point cloud data, making the segmentation of trees more accurate, especially in distinguishing between tree trunks, tree crowns, and backgrounds. Compared with traditional segmentation methods based on geometric features or image projection, it has stronger nonlinear modeling ability and can handle more complex point cloud data, adapt to trees at different growth stages and changes in complex environments. For point cloud data under different climates, lighting, tree species, or tree morphology, this model can effectively improve the segmentation accuracy and ensure robustness, and can adapt to changing environmental conditions.

[0111] In the embodiments of the present application, the pre-processed point cloud data in step S300 is input into the optimized segmentation network model, which includes the following steps A1-A3:

[0112] A1: The pre-processed point cloud data is input into the optimized segmentation network model in the form of three-dimensional coordinates;

[0113] A2: Local and global features of the point cloud are extracted step by step through multiple convolution layers to obtain tree features and distinguishing features between trees and backgrounds;

[0114] A3: All features are restored to the original point cloud spatial size through a deconvolution layer.

[0115] In an alternative embodiment, the pre-processing of step S300 can include data loading and point cloud format conversion, noise removal and filtering, ground point removal, geographic coordinate system and standardization, and data enhancement and segmentation label preparation.

[0116] Specifically, the above-mentioned pre-processing methods can be embodied as:

[0117] (1) In terms of data loading and point cloud format conversion

[0118] Point cloud data acquired from a lidar scanning system is typically stored in .pcd, .las, or .ply format and needs to be loaded using PCL (Point Cloud Library) or Open3D. Each point in the point cloud data contains three-dimensional coordinates (X,Y,Z), as well as additional features such as reflection intensity, RGB color, elevation information, and echo count.

[0119] Convert point cloud data into a standardized 3D coordinate matrix:

[0120] P i =(X i ,Y i Z i ,I i )

[0121] Among them, I i It indicates the intensity of reflection and can be used to enhance the distinction between different materials (such as tree trunks and crowns).

[0122] By combining Geographic Information System (GIS) data, the coordinates are transformed to a local Cartesian coordinate system to avoid the impact of using geographic coordinate systems such as WGS84 on calculation accuracy.

[0123] (2) Noise Removal and Filtering

[0124] Point cloud data often contains noise from sensors, environmental interference (such as weather factors like rain and fog), and redundant points due to uneven object surfaces or errors in the sensors themselves. Removing noise and irrelevant points is crucial before performing tree segmentation.

[0125] 1) Density-based multi-scale noise reduction:

[0126] Point cloud data is downsampled using a Voxel Grid filter. The basic principle of the Voxel Grid filter is to divide the space into multiple small cubes (called voxels), and all points within each voxel are represented by the average value of the points within that voxel. This effectively removes redundant points, reduces the data size, and preserves the spatial distribution characteristics of the point cloud. The calculation formula is:

[0127]

[0128] Where, p i Let p be the coordinates of each point within the voxel, n be the number of points within the voxel, and p be the coordinates of each point within the voxel. filtered Points are represented by voxels.

[0129] 2) Remove outliers:

[0130] KD tree weighted statistical filtering is adopted to calculate the average distance of k-neighborhood of each point, and the specific calculation formula is as follows:

[0131]

[0132] An adaptive standard deviation threshold σ is set to remove abnormal points and improve the segmentation accuracy of dense point cloud regions.

[0133] 3) Ground point removal

[0134] In order to ensure that the point cloud only contains points of trees and other important objects, ground points in the point cloud must be removed, because ground points are not helpful for tree segmentation. Commonly used ground point removal methods include plane fitting based algorithms such as RANSAC (Random Sample Consensus) algorithm.

[0135] The RANSAC algorithm is used to extract the ground plane from the point cloud. By randomly selecting three points from the point cloud, a plane is fitted, and it is checked whether other points in the point cloud conform to the fitted plane (i.e. the distance of these points is less than a certain threshold). If a large number of points meet this condition, it means that these points belong to the ground plane.

[0136] The specific steps of the RANSAC algorithm are as follows:

[0137] Randomly select 3 points to calculate the plane equation;

[0138] Calculate the distance of all points to the plane;

[0139] Set a distance threshold, if the distance of a point to the plane is less than the threshold, the point is considered as a ground point;

[0140] Remove the ground points and keep the remaining points.

[0141] It should be noted that the RANSAC method has a small problem of misjudging high grass vegetation as trees, which will affect the single tree segmentation accuracy, so in combination with the multi-level segmentation strategy (Multi-Level Ground Segmentation, MLGS), the flat ground points are roughly removed first, and then iteratively segmented finely:

[0142] The RANSAC algorithm is used to fit the ground plane of low height points, and the ground points are removed initially;

[0143] For the slope of the power transmission corridor, the height gradient change rate (ΔH) is calculated to remove the slope terrain misjudgment points;

[0144] In combination with the topological structure optimization, the removal effect of non-planar terrain regions is enhanced.

[0145] (4) Geographic coordinate system and standardization

[0146] ​Point cloud data often contains information about global or local coordinate systems. To unify processing and standardize input, coordinate transformation of the point cloud is usually required.

[0147] Coordinate transformation: If the coordinates of the point cloud data are in a geographic coordinate system (such as WGS84 or UTM), it may be necessary to convert them to a unified Cartesian coordinate system (such as X, Y, Z) to simplify processing. This step can be achieved through existing geographic information system (GIS) tools or coordinate transformation libraries.

[0148] Data standardization: To ensure stability during neural network training, point cloud data is usually standardized. Standardization steps include: zero mean: subtract the mean of the point cloud from each point's coordinates to align the center of the point cloud to the origin; normalization: scale the coordinates of the point cloud to the [-1, 1] or [0, 1] interval to avoid gradient explosion problems caused by excessively large values during neural network training.

[0149] (5) Data augmentation and segmentation label preparation

[0150] To improve the generalization ability of the model and avoid overfitting, data augmentation operations are usually performed on the point cloud data.

[0151] For example, each point is labeled with its class, such as: eucalyptus trunk, tree crown, or background.

[0152] 1) Data augmentation based on geometric transformation:

[0153] Random rotation: Randomly rotate the point cloud within [-15°, +15°] to simulate the growth angle and position changes of eucalyptus trees, thereby enhancing the robustness of the model.

[0154] Random scaling: Randomly scale within the range of [0.9, 1.1] to enhance the model's adaptability to eucalyptus trees.

[0155] Randomly remove points: Randomly remove 5% to 10% of the points to improve the model's robustness to incomplete point clouds.

[0156] Noise addition: Add appropriate noise to the point cloud to further improve the model's fault tolerance to noise.

[0157] 2) Segmentation label preparation:

[0158] Use the Self-Supervised Label Generation (SSLG) method to combine hyperspectral data + RGB features to adaptively adjust the trunk / tree crown segmentation boundary and improve the SegNet segmentation accuracy. According to the manually labeled point cloud data, assign a class label to each point.

[0159] It should be noted that for the preprocessing of the point cloud data, the above-mentioned manner of the present application can effectively eliminate the interference of noise and irrelevant points, enhance the quality of the training data, and provide cleaner and standardized input data for subsequent deep learning model training. Not only can the training efficiency of the model be improved, but also the final segmentation effect can be improved.

[0160] In the embodiments of the present application, the categories in step S300 include tree trunk, tree crown and environmental background.

[0161] It should be noted that each point in each point cloud data is assigned a label indicating whether it is a tree trunk, a tree crown or a background, and these labels are used together with the point cloud data for training. Among them, the tree trunk: mainly used to determine the safety distance of the power line. The tree crown: detects the branch and leaf area that may touch the line. The background: ground, sky and other irrelevant areas.

[0162] For example, each point can be labeled as:

[0163] Trunk (category 1), tree crown (category 2), background (category 0).

[0164] In the embodiments of the present application, the category to which each point belongs is calculated by the activation function in step S300, and the category prediction of each point is output, including:

[0165] The distribution probability of each point in each category is calculated by the softmax activation function;

[0166] The category with the maximum probability is selected as the final predicted category of the point.

[0167] Specifically, the last layer of the decoder outputs the category of each point (such as eucalyptus tree trunk, tree crown or background). In order to perform multi-class segmentation, the output layer uses a softmax activation function to calculate the probability distribution of each point.

[0168] For example, there are three categories: tree trunk (category 1), tree crown (category 2), and background (category 0). The softmax calculation formula is as follows:

[0169]

[0170] where z ic is the predicted score of the output layer for category c (such as eucalyptus tree trunk, tree crown, background), and c represents the category index (for example, type label 1, 2, 0); P(y i =c) is the probability that the point belongs to category c, and C is the total number of categories.

[0171] For example, referring to the partial probability distribution of Table 1, after forward inference, the class prediction score of each point is calculated, and for each point, the class with the highest probability is selected as the final predicted class of the point.

[0172] Table 1: Partial probability distribution

[0173]

[0174] For each point P i , the class with the highest probability is selected as the final classification label of the point:

[0175]

[0176] where y i is the final class label of point P i .

[0177] In an optional embodiment, the calculation of the class to which each point belongs in step S300 by the activation function can also be performed by using Sparsemax, which forces the output to be a sparse probability distribution, assigning probabilities only to a small number of high-confidence classes; wherein the loss function is replaced by Sparsemax Loss, which optimizes sparsity by projecting the gradient; adaptive learning rate adjustment needs to consider the sparsity constraint, which can accelerate the convergence of the model.

[0178] In the embodiments of the present application, the point cloud is segmented based on the class to which each point belongs in step S400, and the segmentation result is evaluated, including:

[0179] The precision value is calculated for each type by the Dice coefficient and / or the intersection over union;

[0180] The segmentation accuracy is judged based on the precision value, and visualized.

[0181] Specifically, through step S300, the class label of each point can be obtained, and the point cloud is segmented based on these labels.

[0182] For example, taking eucalyptus as an example, a point cloud data containing 1000 points is segmented, and the class distribution predicted by the model is as follows:

[0183] Trunk: 600 points (class 1), all points predicted as trunk class are segmented into trunk part.

[0184] Crown: 300 points (class 2), all points predicted as crown class are segmented into crown part.

[0185] Background: 100 points (class 0), all points predicted as background are removed or marked as background area.

[0186] The segmentation results are evaluated, and the Dice coefficient and other indicators are calculated to evaluate the segmentation accuracy of the model on each class. The formula is:

[0187]

[0188] where A and B are the predicted region and the true label region, respectively.

[0189] For example, the Dice coefficient is calculated for the above 1000 points, and the result is:

[0190] Dice tree trunk = 0.94

[0191] Dice tree crown = 0.91

[0192] Dice background = 0.95

[0193] In an alternative embodiment, the evaluation method can also use the Intersection over Union (IoU) to calculate the formula:

[0194]

[0195] where A is the region predicted by the model, and B is the region of the true label.

[0196] For example, the IoU is calculated for the above 1000 points, and the result is:

[0197] IoU tree trunk = 0.89

[0198] IoU tree crown = 0.84

[0199] IoU background = 0.91

[0200] It should be noted that from the above results, for a single tree, the segmentation accuracy of the model on the trunk and crown reaches 94% and 91%, respectively. This shows that the SegNet model performs very well in eucalyptus point cloud segmentation, especially in the segmentation accuracy of the trunk and background. Both the Dice coefficient and the IoU reach a high value, indicating that the model can effectively distinguish trees from the background in a complex environment.

[0201] In summary, the application optimizes the SegNet deep learning framework, enabling the entire point cloud segmentation process to be automated, reducing human intervention. Traditional methods often rely on manual extraction of geometric features, which is time-consuming and susceptible to human factors. In contrast, the automatic segmentation based on SegNet is not only efficient but also capable of handling large-scale point cloud datasets, meeting the demand for fast and accurate segmentation. The use of this model can effectively distinguish different parts of trees (such as trunks and canopies), and through the decoder part of SegNet, it can restore the spatial details of the point cloud, making the segmentation results more refined and accurate. This has important significance for subsequent applications such as power transmission corridor clearance.

[0202] During the training process, the weighted combination of cross-entropy loss function and Dice coefficient loss function can balance the classification accuracy and boundary recovery accuracy. The trained SegNet model can handle eucalyptus trees at different growth stages and morphologies, and the model has stronger generalization ability, can adapt to tree segmentation tasks in different terrains and environments, avoid overfitting, and improve performance in new scenarios.

[0203] Finally, the commonly used segmentation evaluation indicators such as IoU and Dice coefficient can be used to comprehensively evaluate the segmentation effect of the model. The IoU and Dice coefficient of the model have reached a high level, reflecting the efficiency and accuracy of the method in complex scenarios.

[0204] Embodiment 3, the above is a schematic scheme of a point cloud single tree segmentation method. It should be noted that the technical scheme of the point cloud single tree segmentation system belongs to the same concept as the technical scheme of the point cloud single tree segmentation method described above. The technical scheme of the point cloud single tree segmentation system in this embodiment is not described in detail, and the description of the technical scheme of the point cloud single tree segmentation method can be referred to.

[0205] The embodiment also provides a point cloud single tree segmentation system, comprising:

[0206] The acquisition module is configured to acquire point cloud data of target trees and the environment in the power transmission corridor area.

[0207] The training module is configured to construct a segmentation network model and train the model by using an optimized loss function and adjusting an adaptive learning rate to obtain an optimized segmentation network model.

[0208] The prediction module is configured to input the preprocessed point cloud data into the optimized segmentation network model, calculate the class to which each point belongs by using an activation function, and output the class prediction of each point.

[0209] The evaluation module is configured to perform point cloud segmentation based on the class and evaluate the segmentation result.

[0210] The embodiment also provides an electronic device suitable for point cloud tree segmentation, comprising a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions to realize the point cloud tree segmentation method proposed in the above embodiment.

[0211] The embodiment also provides a storage medium having a computer program stored thereon, and the computer program is executed by a processor to realize the point cloud tree segmentation method proposed in the above embodiment.

[0212] The storage medium proposed in the embodiment and the point cloud tree segmentation method proposed in the above embodiment belong to the same inventive concept, and the technical details not described in the embodiment can be referred to the above embodiment, and the embodiment has the same beneficial effects as the above embodiment.

[0213] Through the above description of the embodiments, those skilled in the art can clearly understand that the present application can be realized by means of software and necessary general hardware, and of course can also be realized by hardware. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, and the computer software product can be stored in a computer readable storage medium, such as a floppy disk, a read-only memory (ROM), a random access memory (RAM), a FLASH memory, a hard disk, or an optical disk, and includes a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods of various embodiments of the present application.

[0214] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application but not limit the present application, and although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or replaced by equivalents without departing from the spirit and scope of the present application, and all of them should be covered in the scope of the claims of the present application.

Claims

1. A point cloud tree segmentation method, characterized in that, The method comprises the following steps: acquiring point cloud data of target trees and environment in a power transmission corridor area; constructing a segmentation network model, and training the model by using an optimized loss function and adjusting an adaptive learning rate to obtain an optimized segmentation network model; inputting the preprocessed point cloud data into the optimized segmentation network model, calculating the category of each point by using an activation function, and outputting the category prediction of each point; segmenting the point cloud based on the category, and evaluating the segmentation result.

2. The point cloud tree segmentation method of claim 1, wherein, The optimized loss function comprises: setting a first weight of a cross-entropy loss function; setting a second weight of a Dice coefficient loss function; combining the two loss functions with their respective weight coefficients to obtain the optimized loss function.

3. The point cloud tree segmentation method of claim 2, wherein, The model training by adjusting the adaptive learning rate comprises: adopting a preheating mechanism to gradually increase the learning rate within a first threshold range of rounds; after increasing the learning rate, adopting a cosine annealing to gradually decay the learning rate.

4. The point cloud tree segmentation method of claim 3, wherein, The inputting of the preprocessed point cloud data into the optimized segmentation network model comprises: inputting the preprocessed point cloud data into the optimized segmentation network SegNet model in the form of three-dimensional coordinates; gradually extracting local and global features of the point cloud by using multiple convolution layers to obtain tree features and distinguishing features of trees and backgrounds; restoring all features to the original point cloud space size by using a deconvolution layer.

5. The point cloud tree segmentation method of claim 4, wherein, The calculation of the category of each point by using the activation function and the output of the category prediction of each point comprise: calculating the distribution probability of each point in each category by using a softmax activation function; selecting the category with the maximum probability as the final prediction category of the point.

6. The point cloud tree segmentation method of claim 5, wherein, The categories comprise tree trunks, tree crowns, and environmental backgrounds.

7. The point cloud tree segmentation method of claim 5 or 6, wherein, The segmentation of the point cloud based on the category and the evaluation of the segmentation result comprise: calculating the precision value of each type by using a Dice coefficient and / or an intersection over union; judging the segmentation accuracy based on the precision value, and visualizing and displaying the segmentation result.

8. A point cloud tree segmentation system, applying the method of any one of claims 1-7, characterized in that, The method comprises the following steps: an acquisition module, configured to acquire point cloud data of target trees and environment in a power transmission corridor area; a training module, configured to construct a segmentation network model, and train the model by using an optimized loss function and adjusting an adaptive learning rate to obtain an optimized segmentation network model; a prediction module, configured to input the preprocessed point cloud data into the optimized segmentation network model, calculate the category of each point by using an activation function, and output the category prediction of each point; an evaluation module, configured to segment the point cloud based on the category, and evaluate the segmentation result. 9.An electronic device, comprising: a memory and a processor; the memory is configured to store computer executable instructions, and the processor is configured to execute the computer executable instructions, and the computer executable instructions, when executed by the processor, implement the steps of the point cloud single tree segmentation method in any one of claims 1 to 7. 10.A computer readable storage medium storing computer executable instructions, and the computer executable instructions, when executed by a processor, implement the steps of the point cloud single tree segmentation method in any one of claims 1 to 7.

Citation Information

Cited By

  • Landscape space quality evaluation method and device, terminal and medium

    CN121708308A