A power transmission line tree segmentation method and system based on supervised learning

By constructing an adjacency graph of point cloud data and a supervised learning graph neural network, combined with a graph convolutional network and a fully connected layer, the problem of insufficient accuracy of single tree segmentation in complex terrain and dense forest areas is solved, and high-precision single tree segmentation is achieved.

CN119339081BActive Publication Date: 2025-10-17HUNAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411426418.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2025-10-17
Estimated Expiration
2044-10-14

AI Technical Summary

Technical Problem

The existing technology for single tree segmentation has problems such as unsatisfactory results when dealing with complex terrain and dense forest areas, high dependence on parameter selection, insufficient adaptability, and high computational complexity.

Method used

By constructing an adjacency graph of point cloud data, introducing a supervised learning graph neural network, combining a graph convolutional network and a fully connected layer, using the adjacency graph to simultaneously capture local and global features, and designing contrast loss and Rand coefficient loss functions for supervised learning training.

Benefits of technology

The accuracy of single tree segmentation is significantly improved, and it can accurately distinguish the point cloud features of different trees in complex terrain and dense forest areas, reduce dependence on parameter selection, and improve the adaptability of the model and the stability of the segmentation effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119339081B_ABST
    Figure CN119339081B_ABST
Patent Text Reader

Abstract

The application discloses a kind of power transmission line tree segmentation method and system based on supervised learning, comprising: obtaining the point cloud data collected along power transmission line channel;Adjacent graph is constructed using point cloud data;Adjacent graph is input to the graph neural network model constructed to obtain characteristic space parameter and then be mapped to single tree instance label space to obtain single tree instance label probability distribution, then the predicted value of the single tree instance label of maximum probability is used as the single tree segmentation prediction result of corresponding point;Wherein, through the actual value of the point cloud data sample and the single tree instance label of point, then supervised learning training is carried out according to the predicted value of single tree instance label and the actual value of single tree instance label.The application introduces the geometric relationship of point cloud data by constructing adjacent graph, uses graph convolution network to capture local and global features, and uses single tree instance label information for supervised training, so that the model can learn and distinguish the point cloud features of different trees, and improve the accuracy and efficiency of single tree segmentation.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of image segmentation, and particularly relates to a power line tree segmentation method and system based on supervised learning. BACKGROUND

[0002] At present, the technology for power line single tree segmentation mainly relies on the processing and analysis of airborne LiDAR point cloud data. The point cloud single tree segmentation method based on airborne LiDAR data generally includes the following steps: first, the point cloud data is preprocessed, including removing ground points and noise points, then different algorithms are used to segment the tree point cloud. Typical methods include the segmentation method based on canopy height model (CHM), the clustering method based on point cloud density, and the graph cut algorithm, etc.

[0003] For example, the method based on canopy height model (CHM) generates CHM images from LiDAR data, thereby using image processing techniques to regionally segment the tree crown and extract single tree information. This method relies on the generation accuracy of CHM, and the processing effect on dense forest areas and complex terrain is limited. Clustering algorithms such as K-means and DBSCAN use the spatial distribution characteristics of point cloud data to segment point cloud data into different single trees, and then extract single tree information according to the geometric characteristics of single trees. However, the effect of clustering algorithms is limited by parameter selection, and they lack adaptive ability to point cloud data of different densities and shapes. The graph cut algorithm constructs an adjacency graph of point cloud data and uses the cut algorithm in graph theory for segmentation, which can better handle the global information of point cloud data, but has high computational complexity.

[0004] Although the above existing technologies have achieved certain effects in single tree segmentation, they still have some significant shortcomings and deficiencies. First, the method based on CHM may cause loss of details of point cloud data due to data rasterization and interpolation processing in the process of generating CHM, especially in the extraction accuracy of lower structure in dense forest areas and canopy. In addition, this method is sensitive to terrain changes and has unsatisfactory results when dealing with complex terrain. Second, the clustering methods based on point cloud density such as K-means and DBSCAN are highly dependent on parameters, and it is difficult for them to automatically adapt to point cloud data of different densities and shapes, which are easily affected by noise and uneven point cloud data density, resulting in poor segmentation results. The K-means algorithm needs to pre-set the number of single trees, which lacks adaptability; although the DBSCAN algorithm can automatically determine the number of single trees, it is very sensitive to the selection of distance threshold, and different thresholds will significantly affect the segmentation results. In addition, these clustering algorithms have high computational complexity when dealing with large-scale point cloud data, and have low processing efficiency.

[0005] In summary, the prior art has the following shortcomings in single tree segmentation: the effect is not ideal when dealing with complex terrain and dense forest areas, it depends greatly on parameter selection, has insufficient adaptive ability, high computational complexity and low processing efficiency. Therefore, the technical field still needs to explore a single tree segmentation method with higher precision, which can guarantee the segmentation effect in complex terrain and dense forest areas. SUMMARY

[0006] The purpose of the present application is to solve the technical problems of the prior art that the single tree segmentation precision needs to be improved and it is difficult to guarantee the segmentation effect in complex terrain and dense forest areas, and to provide a power line tree segmentation method and system based on supervised learning. Among them, the technical scheme of the present application introduces the geometric relationship of point cloud data by constructing an adjacency graph of point cloud data, simultaneously introduces a network model capable of extracting global and local features, and combines a supervised learning deep model trained in a supervised manner. By capturing local and global features through the adjacency graph, the single tree segmentation effect is improved. In addition, the model is supervised learning and trained by using the set single tree instance label information. Even in complex terrain and dense forest areas, the point cloud features of different trees can be learned and distinguished, and the segmentation precision is significantly improved.

[0007] To this end, the present application provides the following technical solutions:

[0008] A power line tree segmentation method based on supervised learning, comprising the following steps:

[0009] Step 1: acquiring point cloud data collected along the power line channel;

[0010] Step 2: constructing an adjacency graph using the point cloud data, wherein the nodes of the adjacency graph represent the points of the point cloud, and the edges represent the adjacency relationship between two points;

[0011] Step 3: inputting the adjacency graph into the constructed supervised learning deep model to obtain feature space parameters, mapping the feature space parameters to single tree instance label space to obtain single tree instance label probability distribution, and taking the predicted value of the single tree instance label with the maximum probability in the single tree instance label probability distribution as the single tree segmentation prediction result of the corresponding point;

[0012] The single tree instance label is a number or code used to identify whether it is a single tree or a single tree individual identifier; the supervised learning deep model simultaneously extracts global and local features from the adjacency graph, and then generates the feature space parameters;

[0013] Wherein, by collecting point cloud data samples and the actual value of the corresponding single tree instance label, according to steps 2-3, and then according to the supervised learning model training of the predicted value of the single tree instance label and the actual value of the single tree instance label.

[0014] Further optionally, the supervised learning deep model is a graph neural network, if a graph convolutional network in the graph neural network is selected, the graph convolutional network comprises a multi-layer structure of graph convolutional layers and a fully connected layer, wherein a calculation formula of the multi-layer structure of graph convolutional layers is represented as:

[0015] H (l+1) =σ(AH (l) W (l) )l≥0

[0016] wherein H (l+1) , H (l) distribution represents the node feature matrix of the l+1th layer and the lth layer, W (l) is the weight matrix of the lth layer, and σ l represents the activation function of the lth layer; when the graph convolution is the initial layer, H (0) =X, X is a node feature matrix with a size of NxF, N is the number of nodes, i.e. the number of points in the point cloud, and F is the feature dimension corresponding to the coordinates of the points in the point cloud; A is an adjacency matrix determined based on the adjacency graph, and the adjacency matrices of the same point cloud corresponding to different layers of graph convolution layers are the same or different;

[0017] A calculation formula of the fully connected layer of the graph convolutional network is represented as:

[0018] E=σ(ZW fc +b fc )

[0019] wherein E represents a feature space parameter output by the fully connected layer, Z is the output of the last graph convolutional layer or the output of the previous fully connected layer, W fc and b fc represent the weight matrix and the bias vector of the fully connected layer, respectively, if there are two or more fully connected layers, the weight matrix and the bias vector of each fully connected layer are independent of each other, and σ fc is the activation function of the fully connected layer.

[0020] Further optionally, the single tree instance label represents a single tree individual identifier, and when model training is performed according to the predicted value of the single tree instance label and the actual value of the single tree instance label, the loss function is used for training, and the loss function at least comprises a contrastive loss function and / or a Tanimoto coefficient loss function.

[0021] Further optionally, the contrastive loss function is represented as:

[0022]

[0023] wherein, is the contrastive loss function, e i and e jrespectively represent the i-th row and the j-th row of the feature space parameter E extracted by the full connection layer, and represent the feature vectors of points i and j, represent a set of point pairs of the same single tree instance, represent a set of point pairs of different single tree instances, m is a boundary value, and is a hyperparameter for controlling the distance threshold between different instances.

[0024] Further optionally, the Tanimoto coefficient loss function is represented as:

[0025]

[0026] wherein, is the Tanimoto coefficient loss function, wherein pred={pred1, pred2,...pred n} represents the predicted value of the single tree instance label of all points, pred i is the predicted value of the single tree instance label of the i-th point, label={label1, label2,...label n} is the true value of the single tree instance label of all points, label i is the true value of the single tree instance label of the i-th point, and the calculation formula of the ARI loss function is:

[0027]

[0028] In the formula, a represents the number of point pairs in which both the predicted and true labels are in the same single tree, b represents the number of point pairs in which both the predicted and true labels are not in the same single tree, c represents the number of point pairs in which the predicted label is in the same single tree but the true label is not in the same single tree, and d represents the number of point pairs in which the predicted label is not in the same single tree but the true label is in the same single tree, wherein the predicted label and the true label correspond to the predicted single tree instance label and the true single tree instance label respectively.

[0029] represents the number of combinations of selecting two points from n points.

[0030] Further optionally, the step 2 of constructing an adjacency graph using the point cloud data is performed by using a kNN algorithm or a distance threshold method or a density-based method or a Delaunay triangulation-based method.

[0031] Further optionally, after obtaining the point cloud data, the point cloud data is further preprocessed, and the preprocessing at least includes normalization processing.

[0032] In a second aspect, the application provides a segmentation system based on the above method, which at least includes:

[0033] A point cloud data acquisition module is configured to acquire point cloud data collected along a power transmission line channel.

[0034] An adjacency graph construction module is configured to construct an adjacency graph using the point cloud data, wherein nodes of the adjacency graph represent points of the point cloud, and edges represent adjacency relationships between two points.

[0035] A feature extraction and segmentation module is configured to input the adjacency graph into a constructed supervised learning deep model to obtain feature space parameters, map the feature space parameters to a single tree instance label space to obtain a single tree instance label probability distribution, and take a predicted value of a single tree instance label with the maximum probability in the single tree instance label probability distribution as a single tree segmentation prediction result of a corresponding point.

[0036] The single tree instance label is a number or code, and is used to identify whether it is a single tree or an individual identifier of a single tree; the supervised learning deep model simultaneously extracts global features and local features from the adjacency graph to generate the feature space parameters.

[0037] In three aspects, the present application provides an electronic terminal, which at least comprises:

[0038] One or more processors;

[0039] A memory storing one or more computer programs;

[0040] The processor calls the computer program to achieve:

[0041] Steps of a power transmission line tree segmentation method and system based on supervised learning.

[0042] In four aspects, the present application provides a computer readable storage medium, which is characterized by storing a computer program, wherein the computer program is called by a processor to achieve:

[0043] Steps of a power transmission line tree segmentation method and system based on supervised learning.

[0044] Advantages

[0045] Compared with the prior art, the present application has the following advantages:

[0046] Different from the existing unsupervised clustering algorithm which does not use label information for supervised learning, the effect is not ideal when processing complex terrain and dense forest, and the segmentation accuracy is low, and the technical scheme of the present application further sets a single tree instance label, and supervised learning is realized by combining a network capable of extracting global features and local features to realize single tree segmentation, so that the model can learn and distinguish the point cloud features of different trees even under complex terrain and dense forest, and the segmentation accuracy is significantly improved. Especially, the technical scheme of the present application uses an adjacency graph to strengthen the local features of the tree point cloud, processes the adjacency graph through a neural network, fully utilizes the geometric relationship of the point cloud data, captures the local and global features of the point cloud data, and enhances the adaptability of the model to complex scenes.

[0047] In addition, considering that the existing method has great challenges in instance numbering consistency. If the commonly used supervised learning semantic segmentation method is directly applied to the single tree segmentation task of the power line, it cannot effectively handle the numbering problem between different tree instances, resulting in instability of the segmentation result, and in the preferred scheme of the present application, the instance numbering problem is solved by designing a contrast loss and adjusting the Rand index (ARI) loss. The contrast loss constrains the distance between point pairs in the same instance to be minimized, and the distance between point pairs in different instances to be maximized. The ARI loss eliminates the influence of instance numbering order on the evaluation result by measuring the consistency of the segmentation result and the real label, and the model can automatically adapt to point cloud data of different densities and shapes, reducing the dependence on parameter selection. BRIEF DESCRIPTION OF DRAWINGS

[0048] Figure 1 is a flowchart of the segmentation method provided by the embodiment of the present application;

[0049] Figure 2 is a point cloud subset division schematic diagram;

[0050] Figure 3 is a visualization schematic diagram of the point cloud adjacency graph;

[0051] Figure 4 is a schematic diagram of the graph neural network structure provided by the embodiment of the present application. DETAILED DESCRIPTION

[0052] The existing power line single tree segmentation method is not ideal in dealing with complex terrain and dense forest area, especially the method based on canopy height model (CHM) and clustering algorithm, which is easy to lose the details of point cloud data in complex terrain and dense forest area, and cannot accurately extract the point cloud data of the lower structure of the canopy, resulting in reduced segmentation accuracy. In addition, the existing single tree segmentation method depends greatly on parameter selection and has insufficient adaptive ability, and manual adjustment of parameters is required to adapt to point cloud data of different densities and shapes, which is complex and inflexible. And the existing technology can usually only capture local or global features of point cloud data, and it is difficult to take into account both at the same time, resulting in unsatisfactory segmentation effect. For example, the canopy height model (CHM) focuses on local canopy structure, and the graph cut algorithm focuses on global information, but it is difficult to take into account both.

[0053] The technical scheme of the present application provides a power line tree segmentation method based on supervised learning to improve the segmentation accuracy, which realizes single tree segmentation according to the following technical idea:

[0054] Step 1: obtaining point cloud data collected along the power line channel;

[0055] Step 2: constructing an adjacency graph using the point cloud data, wherein the nodes of the adjacency graph represent the points of the point cloud, and the edges represent the adjacency relationship between two points;

[0056] Step 3: inputting the adjacency graph into the constructed graph neural network model to obtain feature space parameters, mapping the feature space parameters to single tree instance label space to obtain single tree instance label probability distribution, and taking the predicted value of the single tree instance label with the maximum probability in the single tree instance label probability distribution as the single tree segmentation prediction result of the corresponding point;

[0057] Wherein, by collecting point cloud data samples and the actual value of the point corresponding single tree instance label, according to step 2-step 3 processing, and then according to the supervised learning model training of the predicted value of the single tree instance label and the actual value of the single tree instance label, the single tree instance label is a number or code, which is used to identify whether it is a single tree or an individual identifier.

[0058] It should be understood that the "single tree" referred to in the present application refers to a single tree detected in the power line channel. Each point in the point cloud data represents a part of the tree, and multiple points combined represent the whole tree. In the single tree segmentation task, the purpose is to divide each point into different tree (single tree) instances through the model.

[0059] In some embodiments, the single tree instance label is used to identify whether the point is on a single tree, i.e. the classification task is used to identify whether it is a single tree; in some embodiments, the single tree instance label is a unique identifier assigned to each tree, used to distinguish different trees. For example, assuming there are three trees in the point cloud data along the power transmission line, and the point cloud data of each tree is composed of multiple points, the model needs to assign a label to each point to indicate which tree the point belongs to. The individual label can be a number or a code, for example: the point cloud data of tree A is assigned a label "1", the point cloud data of tree B is assigned a label "2", and the point cloud data of tree C is assigned a label "3".

[0060] In the above technical process, the adjacency graph of the point cloud data is constructed, the geometric features of the point cloud are introduced, and the graph neural network is integrated, and in combination with the single tree instance label, the combination of supervised learning and graph neural network is realized for single tree segmentation, which effectively improves the single tree segmentation accuracy. In addition, based on the above technical idea, in some embodiments, the problem of inconsistent single tree instance numbers is faced, i.e. in the semantic segmentation task of supervised learning, the label numbers of different instances are inconsistent, thereby affecting the training and evaluation of the model. For example, in the tree segmentation task of the power transmission line, each tree will be assigned a single tree instance number (label). However, in actual application, the number of the same tree may not be consistent in different data sets, different training batches or different model predictions. For example, in one training, the number of tree A is 1, while in another training or in another part of the data set, tree A may be numbered as 2. If the existing deep learning semantic segmentation method is directly used, the following problems will occur:

[0061] 1. Inconsistency in training and prediction: the model may give different instance numbers for the same tree in different data sets or different training batches, making it difficult for the model to learn the features of different trees stably.

[0062] 2. Inconsistency in evaluation: when evaluating the segmentation performance of the model, simply comparing the numbers will cause confusion, because the numbers output by different models do not necessarily correspond to the same tree.

[0063] Therefore, the present application further solves the problem of inconsistent instance numbers by optimizing the loss function, designs a contrast loss and a Rand loss, which are equivalent to comparing the consistency of the labels, and do not depend on the specific values of the instance numbers, optimizes the segmentation effect of the model, and ensures the accuracy and consistency of the results; and optimizes the graph convolutional network (GCN), which realizes the extraction of local features and global features through the set multi-layer convolutional layer and fully connected layer. The present application will be further described below with reference to the embodiments.

[0064] Embodiment 1:

[0065] The embodiment provides a power transmission line tree segmentation method based on supervised learning, and comprises the following steps.

[0066] Step 1: Obtain point cloud data collected along a power transmission line channel and perform data preprocessing.

[0067] Step 1.1: Read the point cloud data file. In this embodiment, the original point cloud data file pre-stored in the storage device is read, and each file contains the three-dimensional coordinates (X, Y, Z) of a plurality of points and the corresponding single tree instance label.

[0068] As shown in Table 1:

[0069] Table 1: First 10 columns of point cloud data of a certain line

[0070]

[0071]

[0072] Step 1.2: Normalization processing. The three-dimensional coordinates (X, Y, Z) of the point cloud data are normalized respectively, so that the value of each dimension is between 0 and 1. The normalization formula is as follows:

[0073]

[0074] Where P represents the original point cloud, which is composed of coordinates (X, Y, Z), and max(P) and min(P) represent the maximum and minimum values of the point cloud data. Normalization processing helps to eliminate the scale difference between different point cloud data and improve the stability of network training. As shown in Table 2:

[0075] Table 2: First 10 columns of normalized point cloud data of a certain line

[0076]

[0077] Step 2: Construct an adjacency graph.

[0078] Step 2.1: Point cloud data division. Since the point cloud data is collected along the power transmission line channel, the scale of each segment of point cloud data is large, therefore, in this embodiment, different segments of point cloud data are divided into a plurality of subsets according to certain rules, and then different subset quantities are selected as the training set and the test set according to a 7:3 ratio. As shown in Figure 2 The embodiment fits the center line of the point cloud in the X and Y directions, and makes a plurality of vertical lines on the center line, and divides the segment of point cloud file into a plurality of subsets by using the vertical lines.

[0079] In other feasible embodiments, whether to segment and the division ratio of the training set and the test set are adaptively set / adjusted according to the amount of point cloud data and experimental results.

[0080] Step 2.2: Adjacency graph construction. The adjacency graph is used to represent the connection relationship between points in the point cloud data. In the adjacency graph, each point is a node, and the edge between the nodes represents the adjacency relationship of the two points. The main purpose of constructing the adjacency graph is to introduce geometric information in the point cloud data to help the graph neural network extract effective features.

[0081] In this embodiment, the kNN algorithm is selected to construct the adjacency graph. Other feasible embodiments, such as the distance threshold method, the density-based method, and the Delaunay triangulation method, are also feasible and fall within the protection scope of the present application.

[0082] The following is described by taking the k-nearest neighbors (kNN) algorithm as an example:

[0083] For each point, the Euclidean distance between it and the remaining points is calculated, and then the k nearest points are selected as the adjacency points of the point, and an adjacency matrix A is constructed. The value of the element A ij in the adjacency matrix represents whether there is an edge between point i and point j. If A ij is 1, it means that there is an edge between point i and point j; if A ij is 0, there is no edge. The element A ij of the adjacency matrix is represented as:

[0084]

[0085] where kNN(i) represents the nearest neighbor set of point i, which can be represented as:

[0086] kNN(i)={j|j∈argsort({d(i,j)})[1:k+1]}

[0087] argsort({d(i,j)}) represents the index set of the points sorted in ascending order of distance, and [1:k+1] represents the index of the first k+1 points. In this embodiment, k is set to 10, and the adjacency graph is constructed for the point cloud subset. Taking the first subset in the training set as an example, the points with adjacency relationship are connected together, and the visualization of the constructed adjacency graph is shown in Figure 3 . In other feasible embodiments, the value of k is adaptively adjusted according to the accuracy requirement.

[0088] Step 3: Constructing a supervised learning deep model.

[0089] Step 3.1: Graph convolution layer feature extraction. After obtaining the adjacency graph (adjacency matrix) of the point cloud data in step 2, the local and global features of the point cloud data are extracted through several layers of graph convolution layers. The calculation formula of the graph convolution layer is as follows:

[0090] H (l+1)=σ l (AH (l) W (l) )l≥0

[0091] Among them, H (l) is the node feature matrix of the lth layer, W (l) is the weight matrix of this layer, which is learned by the network, σ l Indicates the activation function of the layer, such as the ReLU activation function. In particular, when the graph convolution is the initial layer, H (0) =X, X is a node feature matrix with a size of N×F, N is the number of nodes, and F is the feature dimension. norm , represents the normalized point cloud data, the number of nodes N is equal to the number of points in the point cloud, and F = 3 represents the dimension of the point coordinates (x, y, z).

[0092] The adjacency matrix A in the above formula is fixed and obtained in step 2. In this embodiment, the adjacency matrix A used in different graph convolution layers for the same point cloud subset is the same. In the prior art, multi-scale graph convolution can use different adjacency matrices in different layers to represent adjacency relationships of different scales; the self-attention mechanism can dynamically calculate the weights of the adjacency matrix, allowing the adjacency relationship to be adaptively adjusted based on node features, which is also applicable to the technical solution of the present invention.

[0093] like Figure 4 As shown, the graph neural network model of this embodiment is provided with three layers of graph convolution layers, which respectively accept the output features and adjacency matrix from the previous layer of graph convolution as input. When it is the first layer of graph convolution, the output of the previous layer is the original point cloud data; secondly, there are two layers of fully connected layers for further mapping the features extracted by graph convolution into a high-dimensional feature space.

[0094] Step 3.2: Fully connected layer processing. The extracted features are further processed through two layers of fully connected layers. If a layer of graph convolution layer is used previously, the calculation formula for the two layers of fully connected layers is as follows:

[0095] Z=σ(H (l) W fc1 +b fc1 )

[0096] E=σ(ZW fc2 +b fc2 )

[0097] W fc1 、W fc2 Represents the weight matrix of the fully connected layer, b fc1 、b fc2respectively represent the bias vectors of the full connection layers, which are trained by the network, and sigma represents an activation function, and in the embodiment, the ReLU function is selected. The embodiment extracts local features of the point cloud data step by step through the hierarchical structure of the graph convolution network, while retaining global information in the adjacency relationship, so that the final features are comprehensive of both aspects.

[0098] It should be noted that in the embodiment, supervised learning is combined with the graph convolution network (GCN), and in the construction of the graph neural network model GNN, the application can select other graph neural network architectures, such as GraphSAGE, GAT (graph attention network), etc. These architectures have different mechanisms in feature extraction, which can improve the performance of the model. Secondly, without using the graph convolution network, the point cloud feature can also be extracted by using the Transformer architecture and the like. That is, the supervised learning deep model capable of simultaneously extracting local and global features from the adjacency graph can be considered to meet the needs of the application, but the effects of different network architectures are different. For example, GraphSAGE extracts local information through neighbor sampling and captures global information through layer-by-layer propagation; GAT dynamically allocates the importance of neighbors through a self-attention mechanism, thereby simultaneously processing local and global features. Although the Transformer is not a graph convolution, it can capture global relationships through a global attention mechanism and can process local features, that is, the above examples can extract global and local features at different levels.

[0099] Step 4: Constructing a loss function.

[0100] In the embodiment, the contrast loss function and the adjusted Rand index loss function are preferably fused, and other feasible embodiments can also introduce other loss functions to solve the problem of inconsistent tree instance numbers, such as a clustering loss. The clustering loss optimizes the single tree segmentation effect of the model by constraining the distance between points of the same class.

[0101] The contrast loss function and the adjusted Rand index loss function designed in the embodiment are as follows:

[0102] Step 4.1: Designing a contrast loss function. The contrast loss function is mainly used to ensure that points of the same instance (i.e., points belonging to the same single tree) are closer in the embedding space, and points of different instances (i.e., points belonging to different single trees) are farther apart in the feature space. Based on this, the contrast loss function formula is as follows:

[0103]

[0104] wherein e i and e j respectively represent the i-th row and the j-th row of the feature space E extracted by the full connection layer, and e

[0105] e i = E[i, :]

[0106] denote the set of point pairs of the same instance, denote the set of point pairs of different instances, m is a boundary value, which is a key hyperparameter, used to control the distance threshold between different instances, and the specific value is not limited by the present application.

[0107] Step 4.2: Designing the Adjusted Rand Index loss function. The Adjusted Rand Index (ARI) is used to evaluate the consistency between the clustering results and the true labels. In order to further constrain the output of the model, the present application designs an ARI loss function based on supervised learning according to ARI, which is used to supervise the difference between the predicted single tree segmentation result and the true single tree segmentation result. First, map the feature space E to the single tree instance label space:

[0108] S = Softmax(EW + b)

[0109] where S denotes the mapped single tree instance label probability distribution, W and b are the weights and biases of the fully connected layer, and for each point, the label with the highest probability is selected as the predicted label:

[0110]

[0111] where pred i is the predicted label of the i-th point. Based on this, the ARI loss function is defined to supervise the consistency of the predicted label and the true label:

[0112]

[0113] where the calculation formula of ARI is:

[0114]

[0115] where a denotes the number of point pairs in the same single tree, b denotes the number of point pairs not in the same single tree, c denotes the number of point pairs in the same single tree but not in the same single tree, and d denotes the number of point pairs not in the same single tree but in the same single tree.

[0116] denotes the number of combinations of selecting two points from n points.

[0117] Finally, the loss function of the network is the weighted sum of the contrastive loss and the ARI loss:

[0118]

[0119] wherein λ1 and λ2 are weight hyperparameters of the loss function for balancing the contribution of the contrastive loss and the ARI loss. In the present embodiment, λ1 = 0.6 and λ2 = 0.4. In other feasible embodiments, the values of λ1 and λ2 are adjusted adaptively.

[0120] Step 5: training the model and outputting the single tree instance segmentation result.

[0121] Using the adjacency graph, network structure and loss function constructed in the foregoing, the single tree instance segmentation network model is trained. First, the graph neural network model is initialized, and the optimizer is defined. The point cloud data is input into the model, and the feature vector and single tree instance label probability distribution are calculated through the graph convolution layer and the fully connected layer. The total loss is calculated using the contrastive loss function and the ARI loss function. The gradient is calculated through the back propagation algorithm and the model weight is updated. The process of forward propagation, loss calculation, back propagation and weight updating is repeated until the preset training number or loss convergence is reached.

[0122] After the training is completed, the test power line point cloud data is input into the trained model to obtain the single tree instance label probability distribution of each point, and the single tree instance label of each point is output to realize the single tree instance segmentation. In actual application, after obtaining the point cloud data to be segmented, the adjacency graph is constructed, and then the trained model is input to obtain the single tree instance label probability distribution of each point, and then the segmentation result is obtained.

[0123] Embodiment 2:

[0124] The present embodiment provides a segmentation system based on the above power line tree segmentation method, which at least comprises: a point cloud data acquisition module, an adjacency graph construction module, and a feature extraction and segmentation module.

[0125] The point cloud data acquisition module is used to acquire point cloud data collected along the power line channel; the adjacency graph construction module is used to construct an adjacency graph using the point cloud data, wherein the nodes of the adjacency graph represent the points of the point cloud, and the edges represent the adjacency relationship between two points; and the feature extraction and segmentation module is used to input the adjacency graph into the constructed graph neural network model to obtain a feature space parameter, map the feature space parameter to a single tree instance label space to obtain a single tree instance label probability distribution, and then take the predicted value of the single tree instance label with the maximum probability in the single tree instance label probability distribution as the single tree segmentation prediction result of the corresponding point.

[0126] In some embodiments, the segmentation system further comprises a model training module for training the model through supervised learning according to the predicted value of the single tree instance label and the actual value of the single tree instance label by collecting point cloud data samples and the actual value of the single tree instance label of the points.

[0127] In some embodiments, the segmentation system can also load a model pre-trained according to the above method, thereby realizing the tree segmentation of the to-be-segmented point cloud.

[0128] It should be understood that the specific implementation process of the above unit modules is referred to the method content, and the present application will not be specifically described here, and the division of the above functional module units is only a logical division, and another division mode can be used in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. At the same time, the integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0129] Embodiment 3:

[0130] The electronic terminal provided by the embodiment of the present application at least includes one or more processors and a memory storing one or more computer programs.

[0131] The processor calls the computer program to implement the steps of the power line tree segmentation method and system based on supervised learning.

[0132] Specifically, the steps are as follows:

[0133] Step 1: Obtain point cloud data collected along a power line channel;

[0134] Step 2: Construct an adjacency graph using the point cloud data, wherein the nodes of the adjacency graph represent the points of the point cloud, and the edges represent the adjacency relationship between two points.

[0135] Step 3: Input the adjacency graph into a constructed graph neural network model to obtain a feature space parameter, map the feature space parameter to a tree instance label space to obtain a tree instance label probability distribution, and then take the predicted value of the tree instance label with the maximum probability in the tree instance label probability distribution as the tree segmentation prediction result of the corresponding point.

[0136] The tree instance label is a tree number / code, which is used to identify whether it is a tree and its individual label.

[0137] According to steps 2-3, the model is trained based on supervised learning according to the predicted value of the tree instance label and the actual value of the tree instance label.

[0138] The terminal also includes a communication interface for communicating with external devices to transmit data. For example, the terminal communicates with an external electrocardiograph to obtain electrocardiogram data.

[0139] The memory can include a high-speed RAM memory, and can also include a non-volatile defibrillator, such as at least one disk memory.

[0140] If the memory, the processor and the communication interface are independently implemented, the memory, the processor and the communication interface can be connected to each other through a bus and complete communication between each other. The bus can be an industry standard architecture bus, an external device interconnection bus or an extended industry standard architecture bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc.

[0141] Optionally, in a specific implementation, if the memory, the processor and the communication interface are integrated on a chip, the memory, the processor and the communication interface can complete communication between each other through an internal interface.

[0142] The specific implementation process of each step can refer to the description of the foregoing method.

[0143] It should be understood that, in the embodiments of the present application, the processor can be a central processing unit (CPU), and the processor can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The memory can include read-only memory and random access memory, and provide instructions and data for the processor. A part of the memory can also include a non-volatile random access memory. For example, the memory can also store device type information.

[0144] Embodiment 4:

[0145] The present application provides a computer readable storage medium, characterized in that: a computer program is stored, the computer program is called by a processor to realize:

[0146] A power line tree segmentation method and system based on supervised learning.

[0147] In particular implementation, the steps include:

[0148] Step 1: acquiring point cloud data collected along the power line channel;

[0149] Step 2: constructing an adjacency graph using the point cloud data, nodes of the adjacency graph representing points of the point cloud, and edges representing adjacency relationship between two points;

[0150] Step 3: inputting the adjacency graph into a constructed graph neural network model to obtain feature space parameters, mapping the feature space parameters to a tree instance label space to obtain a tree instance label probability distribution, and then taking a predicted value of a tree instance label with the maximum probability in the tree instance label probability distribution as a tree segmentation prediction result of the corresponding point;

[0151] The tree instance label is a tree number / code, used to identify whether it is a tree and its individual label;

[0152] The actual value of the tree instance label of the point cloud data sample and the point is collected, and then processed according to steps 2-3, and then the model is trained according to the supervised learning of the predicted value of the tree instance label and the actual value of the tree instance label.

[0153] The specific implementation process of each step is described in the foregoing method.

[0154] The readable storage medium is a computer readable storage medium, which can be an internal storage unit of the controller, such as a hard disk or a memory of the controller. The readable storage medium can also be an external storage device of the controller, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Further, the readable storage medium can include both the internal storage unit and the external storage device of the controller. The readable storage medium is used to store the computer program and other programs and data required by the controller. The readable storage medium can also be used to temporarily store data that has been output or will be output.

[0155] Based on this understanding, the technical solutions of the present application essentially or say the part that contributes to the prior art, or the whole or part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in various embodiments of the present application. The aforementioned readable storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0156] In summary, in order to improve the single tree segmentation accuracy, the application proposes to strengthen the tree point cloud features through the adjacent graph, introduces the geometric relationship of point cloud data, and makes the graph convolution network able to capture local and global features at the same time, thereby improving the segmentation accuracy in complex scenes. Furthermore, the use of label information enables the model to accurately distinguish point clouds of different categories (trees). GCN effectively extracts multi-scale features in point cloud data through graph structure information, ensuring the accuracy and robustness of the segmentation results. Supervised learning provides a clear learning goal, i.e., assigning different single tree instance labels to each point. This enables the model to learn more useful features during the training process. In addition, through the design of contrastive loss and ARI loss, the model can automatically adapt to point cloud data of different densities and shapes, reducing the dependence on parameter selection. Contrastive loss ensures that the distance between points in the same instance is minimized, and the distance between points in different instances is maximized, enabling the model to effectively distinguish point clouds of different trees. ARI eliminates the problem of differences in the order of predicted tree numbers and real tree numbers, and by measuring the consistency between the segmentation results and the real labels, it optimizes the segmentation effect of the model, ensuring the accuracy and consistency of the results.

[0157] It should be emphasized that the examples described in the present application are illustrative rather than limiting, and therefore the present application is not limited to the examples described in the specific embodiments, and any other embodiments derived by those skilled in the art from the technical solutions of the present application, without departing from the purpose and scope of the present application, whether modified or replaced, also belong to the protection scope of the present application.

Claims

1. A method for tree segmentation along power transmission lines based on supervised learning, characterized by: The following steps are involved: Step 1: Obtain point cloud data collected along the transmission line channel; Step 2: construct an adjacency graph using the point cloud data, where the nodes of the adjacency graph represent the points of the point cloud and the edges represent the adjacency relationship between two points; Step 3: Input the adjacency graph into the constructed supervised learning deep model to obtain feature space parameters, map the feature space parameters to the single tree instance label space to obtain the single tree instance label probability distribution, and then use the predicted value of the single tree instance label with the maximum probability in the single tree instance label probability distribution as the single tree segmentation prediction result of the corresponding point; The single tree instance label is a number or code used to identify whether it is a single tree or a single tree individual identifier; the supervised learning deep model simultaneously extracts global features and local features from the adjacency graph, thereby generating the feature space parameters; The point cloud data samples and the actual values ​​of the individual tree instance labels corresponding to the points are collected and processed according to steps 2 and 3. Then, the supervised learning model training is performed based on the predicted values ​​of the individual tree instance labels and the actual values ​​of the individual tree instance labels. The single tree instance label represents a single tree individual identifier, and when the model is trained based on the predicted value of the single tree instance label and the actual value of the single tree instance label, the training is performed using a constructed loss function, wherein the loss function at least includes a contrast loss function and a Rand coefficient loss function; The contrast loss function is expressed as: in, is the contrast loss function, e i and e j Respectively represent the i-th and j-th rows of the feature space parameters E extracted by the fully connected layer, representing the feature vectors of points i and j, represents a set of point pairs representing the same single tree instance, Represents a set of point pairs of different single tree instances, m is the boundary value, which is a hyperparameter used to control the distance threshold between different instances; The Rand coefficient loss function is expressed as: in, is the Rand coefficient loss function, where pred={pred1,pred2,...pred n }, represents the predicted value of the single instance label of all points, pred i is the predicted value of the single instance label of the i-th point, label = {label1, label2, ...label n } is the true value of the single instance label of all points, label i is the true value of the single instance label of the i-th point, and the calculation formula of the ARI loss function is: Where a represents the number of point pairs whose predicted and true labels are in the same tree, b represents the number of point pairs whose predicted and true labels are not in the same tree, c represents the number of point pairs whose predicted labels are in the same tree but whose true labels are not in the same tree, and d represents the number of point pairs whose predicted labels are not in the same tree but whose true labels are in the same tree. The predicted label and the true label correspond to the predicted tree instance label and the true tree instance label, respectively. It represents the number of combinations of selecting two points from n points.

2. The method according to claim 1, wherein: The supervised learning deep model is a graph neural network. If a graph convolutional network in the graph neural network is selected, the graph convolutional network includes a multi-layer graph convolution layer and a fully connected layer. The calculation formula of the multi-layer graph convolution layer is expressed as: H (l+1) =s l (AH (l) W (l) )l≥0 Among them, H (l+1) 、H (l) The distribution represents the node feature matrix of the l+1th layer and the lth layer, W (l) is the weight matrix of the lth layer, σ l represents the activation function of the lth layer; when the graph convolution is the initial layer, H (0) =X, X is the node feature matrix of size N×F, N is the number of nodes, that is, the number of points in the point cloud, F is the feature dimension, corresponding to the coordinates of the points in the point cloud; A is the adjacency matrix determined based on the adjacency graph. The adjacency matrices of the same point cloud corresponding to different layers of the graph convolution layer may be the same or different; The calculation formula of the fully connected layer of the graph convolutional network is expressed as: E=σ fc (ZW fc +b fc ) Among them, E represents the feature space parameter output by the fully connected layer, Z is the output of the last graph convolution layer or the output of the previous fully connected layer, and W fc 、b fc Represent the weight matrix and bias vector of the fully connected layer respectively. If there are two or more fully connected layers, the weight matrix and bias vector of each fully connected layer are independent of each other. fc is the activation function of the fully connected layer.

3. The method according to claim 1, wherein: In step 2, the adjacency graph is constructed by using the point cloud data using a kNN algorithm, a distance threshold method, a density-based method, or a Delaunay triangulation-based adjacency graph.

4. The method according to claim 1, wherein: After acquiring the point cloud data, the point cloud data is preprocessed, and the preprocessing at least includes normalization processing.

5. A segmentation system based on the method according to any one of claims 1 to 4, characterized in that: At least: Point cloud data acquisition module, used to acquire point cloud data collected along the transmission line channel; An adjacency graph construction module, configured to construct an adjacency graph using the point cloud data, wherein a node of the adjacency graph represents a point in the point cloud, and an edge represents an adjacency relationship between two points; A feature extraction and segmentation module is used to input the adjacency graph into the constructed supervised learning deep model to obtain feature space parameters, map the feature space parameters to the single tree instance label space to obtain the single tree instance label probability distribution, and then use the predicted value of the single tree instance label with the maximum probability in the single tree instance label probability distribution as the single tree segmentation prediction result of the corresponding point; The single tree instance label is a number or code used to identify whether it is a single tree or an individual identifier of a single tree; the supervised learning deep model simultaneously extracts global features and local features from the adjacency graph, and then generates the feature space parameters.

6. An electronic terminal, characterized in that: At least: one or more processors; a memory storing one or more computer programs; The processor calls the computer program to implement: The steps of the method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that: A computer program is stored, which is called by a processor to implement: The steps of the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Weak supervision point cloud semantic segmentation method for cross-scene contrast learning

    CN114187446A

  • Domain-adaptive laser radar point cloud semantic segmentation method and device, and storage medium

    CN115841574A