Forestry forest single plant segmentation model
By using the OCSVM model and convolutional neural network based on the L1 norm in forest individual tree segmentation, combined with the acceleration strategy, the problem of insufficient robustness and real-time detection limitations in the existing technology is solved, and efficient and accurate forest trees are achieved. Single plant segmentation improves detection efficiency and accuracy.
Patent Information
- Application Number
- CN202410380516.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-30
- Publication Date
- 2024-10-29
AI Technical Summary
Existing single-class classification models have insufficient robustness, non-sparse solutions, and high-precision real-time detection limitations in forest individual plant segmentation, resulting in poor performance in complex and variable data and high-precision real-time detection tasks. The training time is long and the purity of the training data is uncertain.
A new OCSVM model based on L1 norm is used, combined with convolutional neural network and acceleration strategy, to perform individual tree segmentation of forest trees through L1-OCSVM. The sparsity characteristics of L1 norm are used to improve detection efficiency and accuracy, and through post-processing Steps to improve the completeness of segmentation results.
It achieves real-time target detection and recognition in the segmentation of individual forest trees, significantly improves training time, detection accuracy and real-time capabilities, and reduces computational complexity and error warning rates.
Smart Images

Figure CN118864833A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of image recognition, and in particular to a forestry single tree segmentation model. Background Art
[0002] Forest tree segmentation technology is a technology used in forest ecology, geographic information system (GIS), remote sensing technology and image processing. The development and application background of this technology involves the following aspects: 1) Ecological research: Forests are one of the most important ecosystems on Earth, and are of great significance for understanding the structure, species composition, growth status, and functions of forest ecosystems. By segmenting and identifying individual trees in the forest, we can obtain individual information about trees and provide detailed data support for the study of forest ecology.
[0003] 2) Resource management: For the rational management and protection of forest resources, it is necessary to understand the distribution, quantity and health of individual trees in the forest. Forest tree segmentation technology can help develop more effective forest resource management strategies, monitor the dynamic changes of vegetation, and assess the health of forests.
[0004] 3) Environmental monitoring: Forest tree segmentation technology can also be used for environmental monitoring, such as monitoring the spread of forest fires, assessing changes in forest coverage, etc. This is of great significance for taking timely environmental protection measures and disaster warnings.
[0005] 4) Geographic Information System (GIS): GIS is a system that integrates, analyzes and displays geographic spatial information, and forest tree segmentation technology provides GIS with high-resolution geographic information data, which helps to make accurate maps and conduct geographic information analysis.
[0006] 5) Application of remote sensing technology: Using images obtained by remote sensing technologies such as satellites, aerial photography and drones, forest information can be extracted more accurately through forest individual tree segmentation technology. This provides an efficient means for large-scale forest monitoring and investigation.
[0007] With the continuous development of machine learning and deep learning technologies, forest tree segmentation technology has also been supported by more advanced algorithms and models. The development of these technologies makes it possible to efficiently process and analyze large-scale image data.
[0008] The general steps and methods for forest tree segmentation are: Step 1: Image acquisition and preprocessing: Use aerial photos, satellite photos, or drone images to obtain forest image data. In the preprocessing stage, operations such as image denoising, color correction, and scale calibration may be required.
[0009] Step 2: Segmentation algorithm selection: Select an appropriate image segmentation algorithm to separate the forest area from other areas in the image. Common segmentation algorithms include region-based segmentation, edge-based segmentation, and pixel-based segmentation.
[0010] Step 3: Feature extraction: For each segmented area, relevant features are extracted, such as color, texture, shape, etc. These features are helpful for subsequent tree classification and identification.
[0011] Step 4: Tree classification: Use machine learning or deep learning technology to build a tree classification model. The model can classify each segmented area based on the extracted features to determine whether it belongs to a tree.
[0012] Step 5: Post-processing: Perform post-processing operations such as removing misclassified areas, filling missed trees, etc. This helps improve the accuracy of segmentation and recognition.
[0013] A single-class classification model is a machine learning model, also known as a single-class classification or anomaly detection model. These models are mainly used to solve the problem of classification or anomaly detection when there is only a single category of data (normal samples). The core idea is to learn from known normal samples, build a model that describes normal samples, and then use the model to distinguish whether new samples belong to this known single category. Such models are usually only exposed to normal samples during training, and other abnormal or multi-category data are not considered. Two common single-class classification models, SVDD (Support Vector Data Description) and OCSVM (One-Class Support Vector Machine), have been widely used in various applications.
[0014] SVDD is based on support vector machines, but unlike traditional classification tasks, it establishes a boundary when the training set contains only normal samples, gathers normal samples within the boundary, and thus identifies new abnormal samples that are different from the normal pattern. The goal of SVDD is to find a spherical or ellipsoidal hypersphere that minimizes the radius of the hypersphere containing normal samples and excludes abnormal samples as much as possible. The optimization process can be completed by solving a convex optimization problem.
[0015] OCSVM is mainly used for single-class classification problems, that is, only one type of data (normal samples) is available for training the model. The goal is to learn the characteristics of normal samples so that abnormal samples that are significantly different from these normal samples can be identified. Similar to traditional SVM, OCSVM tries to find a hyperplane in the feature space that separates normal samples from the rest of the space. The difference is that OCSVM focuses more on marginal samples (normal samples closest to the hyperplane) and ignores most of the samples in the training set.
[0016] These models have a wide range of applications in many fields, such as anomaly detection, fraud detection, and fault diagnosis. Their goal is to model single-category data so that they can identify anomalies or rare situations that are different from known categories when faced with new data. However, current models still have the following problems: 1) Lack of robustness: For complex and changing data, the model may show relatively low robustness, resulting in its performance degradation when faced with new and slightly different scenarios; 2) Non-sparseness of solutions: Some models may generate very complex decision boundaries or hyperspheres describing boundaries, which makes the interpretation and understanding of the model more difficult. Non-sparse solutions may make it more difficult for the model to generalize to unseen data and may cause unnecessary trouble in the identification of abnormal samples; 3) Limitations in high-precision real-time detection tasks: Some single-class classification models also have limitations in high-precision real-time detection tasks. Real-time requires the model to make decisions quickly when processing large-scale data, but some models may cause delayed response time due to complex computational processes. This may limit the practical application of the model in application scenarios where anomalies need to be identified quickly and accurately.
[0017] The existing single-class models cannot solve the following problems well: 1) High accuracy and real-time performance: For example, in forest fire video monitoring, detection / recognition is expected to be pixel-accurate and performed in frames. The goal of pixel accuracy is easy to achieve, for example, by using pixel classification techniques, where each pixel is considered as a sample, i.e., a representation of the pixel pattern. However, due to the non-sparseness of the L2 norm solution, real-time performance cannot be achieved, and they usually require the storage of so many support vectors that are then used for target pixel detection. If they are used for frame-based detection, the result will be insufficient memory or too long detection time.
[0018] 2) Long training time: When facing a large-scale training task, although images and videos are easy to obtain, data labels are usually not available. However, sample labeling is not easy, it is a time-consuming and laborious task. In existing annotation methods, users interact with computers and only need to draw a curve / polygon region of interest (ROI), and then the ROI pixels can be automatically extracted to form a training set.
[0019] 3) Uncertain purity of training data: In order to improve the representativeness of the desired object, the pixels used as training samples need to be extracted from the entire object or sub-object, such as from the entire cloud or tree canopy. Doing so will have two negative effects. One of the effects is that if there are too many pixels in the ROI provided by the user, a large-scale training task will be carried out; the other impact is the purity of the training data, which is also the third aspect mentioned above. This means that the data provided by the user may be pure; it may be impure, but the user thinks it is pure because human vision is not accurate to the pixel level. For example, there may be a few non-canopy pixels mixed in the extracted canopy pixels. These non-canopy pixels come from other landmark objects and can be seen from the leaf gaps in the overhead view, which are usually regarded as outliers of the canopy.
[0020] Therefore, it is necessary to invent a new forestry forest individual tree segmentation model to solve the above problems. Summary of the invention
[0021] The purpose of the present invention is to provide a forestry forest single tree segmentation model, which uses a new OCSVM based on the L1 norm for single-class target detection, fully utilizes the characteristics of the L1 norm to meet the requirements of real-time target detection / recognition, thereby realizing single tree segmentation of forest trees, and has significant advantages in training time, detection accuracy, false warning rate and real-time capability.
[0022] In order to achieve the above object, the present invention provides the following technical solutions: A forestry forest single tree segmentation model, the establishment process of the single tree segmentation model comprises the following steps: S1. Data collection and dataset preparation: Use drones to sample the target forest area, preprocess and annotate the collected remote sensing images, and divide the annotated samples into training datasets, validation datasets, and test datasets to ensure the generalization performance of the model; S2. Feature extraction: Use convolutional neural network (CNN) to learn the color features of images and perform tree segmentation end-to-end. In CNN, the color features of images are extracted through convolutional layers and pooling layers, thereby achieving accurate segmentation of trees. S3, segmentation algorithm: classify each pixel in the image as a tree or non-tree, use the L1-norm based one-class support vector machine L1-OCSVM to train the classifier, and use the pixel features in the image for classification; S4, post-processing of segmentation results: performing post-processing on the segmentation results to improve the accuracy and completeness of the segmentation results, wherein the post-processing includes removing small noise areas, filling broken tree edges, and merging adjacent segmented areas; S5. Evaluation and verification: Use the test data set to evaluate and verify the post-processed segmentation results to ensure that the segmentation results meet the expected requirements.
[0023] Furthermore, step S2 also includes: applying a convolution kernel to the input image, element-wise multiplying the convolution kernel with each position of the image, and then adding the results to generate an output feature map; repeating this process to move the convolution kernel over the entire image to generate a complete feature map; dividing the feature map into non-overlapping areas, selecting the maximum value for each area as the output value of the area, and using a new feature map composed of all maximum values as the output of the pooling layer.
[0024] Furthermore, the step S3 further includes: Define the single-class support vector machine L1-OCSVM based on the L1 norm, define is the weight of the hyperplane in the feature space, w is the weight in the input space, and the model formula of the single plant segmentation model is:
[0025]
[0026]
[0027] Distance redefinition in L1-OCSVM: The L∞ norm distance of any point x0 in L1-OCSVM to a hyperplane Rewritten in minimal form, ; Rewrite the model in matrix form, the model formula is:
[0028]
[0029]
[0030] Solve the rewritten model formula: further separate the validation data set to obtain a tuning data set, select parameters from the tuning data set, the parameters include the selected kernel function, parameters and regularization factors, optimize the parameters through the model, and rewrite the model based on the equivalence of the solution:
[0031] In order to avoid Approaching 0, When the value of θ approaches 0, there is a zero solution. We add a constraint to the above model. ,The resulting problem is still linear and can be solved by LP methods; Acceleration strategy: The convergence speed is improved by using two acceleration strategies, NLP L1-OCSVM and GN L1-OCSVM. The above constraint sets are combined by GN L1-OCSVM and reformulated as an unconstrained minimization problem to reduce memory storage overload. NLP L1-OCSVM is used to solve the converted LP problem.
[0032] Furthermore, it is characterized in that the step S4 also includes: An area threshold is defined, and the areas in the segmentation results with an area smaller than the threshold are regarded as noise and removed. The broken edges are connected using the pixel connection algorithm, and the shape characteristics of the trees are used to correct the segmentation results through shape prior knowledge.
[0033] The beneficial effects of the present invention are: The present invention provides a single-class support vector machine L1-OCSVM based on L1 norm for single-class target detection, making full use of the characteristics of L1 norm to meet the requirements of real-time target detection / recognition, thereby realizing the single-tree segmentation of forest trees; by introducing an infinite margin term to replace the traditional L2 norm to design L1-OCSVM, the principle of structural risk minimization is maintained; an equivalent optimization method is used to solve the nonlinear L1-OCSVM to solve the problems of non-differentiability and nonlinearity of the L1 norm; by directly minimizing the L1 norm of the combination coefficient, the obtained solution is more likely to have high sparsity than the L2 norm solution, thereby reducing the complexity of calculation; two acceleration algorithms are used to improve the training speed. Compared with existing SOTA and other methods, the method proposed by the present invention has significant advantages in training time, detection accuracy, false warning rate and real-time capability.
[0034] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention and implement it according to the contents of the specification, the following is a detailed description of the preferred embodiments of the present invention in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 A comparison diagram of Gaussian distribution data including outliers obtained using three models as shown in Example 1 of the present invention; Figure 2 A comparison diagram of single plant segmentation results obtained using various models shown in Example 1 of the present invention; Figure 3 These are comparative numerical results obtained using various models as shown in Example 1 of the present invention. DETAILED DESCRIPTION
[0035] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0036] The technical solutions described in the present invention, unless otherwise specified, are all conventional solutions in the art; the reagents or materials described, unless otherwise specified, are all from commercial channels.
[0037] See also Figures 1 to 3 The present invention discloses a forestry forest single tree segmentation model, which can be applied to the single tree segmentation of forest trees. By using a new OCSVM based on the L1 norm for single-class target detection, the characteristics of the L1 norm are fully utilized to meet the requirements of real-time target detection / recognition, thereby realizing the single tree segmentation of forest trees, which has significant advantages in training time, detection accuracy, false warning rate and real-time capability. The steps of establishing the model are as follows: A forestry forest single tree segmentation model, the establishment process of the single tree segmentation model comprises the following steps: S1. Data collection and dataset production: Use drones to sample the target forest area, preprocess and annotate the collected remote sensing images. Sample annotation includes manually annotating the location and boundaries of each tree in the remote sensing image. The annotated samples are divided into training datasets, validation datasets, and test datasets to ensure the generalization performance of the model. Using drones for sampling can achieve low-altitude, high-resolution, high-speed, and precise sampling, providing scientific and accurate data support for the model to ensure that the characteristics of the trees can be clearly identified. Preprocessing the collected remote sensing images can ensure that the image quality meets the requirements of the segmentation task.
[0038] S2. Feature extraction: Use convolutional neural network (CNN) to learn the color features of images end-to-end and perform tree segmentation. In CNN, the color features of the image are extracted through convolutional layers and pooling layers, thereby achieving accurate segmentation of trees.
[0039] Specifically, the extraction process also includes: applying a convolution kernel to the input image, multiplying the convolution kernel by each position of the image element by element, and then adding the results to generate an output feature map; repeating this process to move the convolution kernel over the entire image to generate a complete feature map; dividing the feature map into non-overlapping areas, selecting the maximum value for each area as the output value of the area, and using a new feature map composed of all maximum values as the output of the pooling layer.
[0040] S3. Segmentation algorithm: Classify each pixel in the image as a tree or non-tree. Use the L1-norm based one-class support vector machine L1-OCSVM to train the classifier and use the pixel features in the image for classification.
[0041] The specific process is as follows: Define the single-class support vector machine L1-OCSVM based on the L1 norm, define is the weight of the hyperplane in the feature space, w is the weight in the input space, and the model formula of the single plant segmentation model is:
[0042]
[0043]
[0044] Distance redefinition in L1-OCSVM: The L∞-norm distance from any point x0 to a hyperplane (w' x0−ρ=0) is defined as d(x0)= , for L1-OCSVM, considering the origin as x0, this distance should be , rewritten into a minimized form, namely .
[0045] Rewrite the model in matrix form, the model formula is:
[0046]
[0047]
[0048] Solve the rewritten model formula: When a set of parameters is established in advance, a model can be effectively solved. The parameters include the selected kernel (kernel function and parameters) and regularization factor. Once they are selected from the tuning dataset (the tuning dataset refers to the sub-dataset used to select model parameters. In cross-validation, the dataset is usually divided into a training dataset, a validation dataset, and a test dataset, where the validation dataset is used to adjust the hyperparameters of the model, and the test dataset is used to finally evaluate the model performance. The tuning dataset is further separated from the part of the data divided into the validation dataset. The present invention adopts a cross-validation method to divide the training dataset and the validation dataset multiple times, and each time a different validation dataset is used to perform model tuning.) They will be output to the model for optimization. Based on the equivalence of the solution, rewrite the model:
[0049] Acceleration strategy: Try to apply Newton LP (NLP) method to the problem in a coordinated manner to improve the convergence speed. In order to solve the complexity of time and space. The present invention provides two acceleration strategies, namely NLP L1-OCSVM and GN L1-OCSVM. GNL1-OCSVM combines some constraint groups in the original problem and reformulates it as an unconstrained minimization problem. This method can reduce the storage overload of the memory, and then uses NLP L1-OCSVM to solve the converted LP problem.
[0050] The specific effects of the above two methods in solving time complexity and space complexity are as follows: 1) Time complexity: Since NLP is a Newton algorithm, it usually has a faster convergence speed, so the time complexity of calculating (3n+1) variables in each iteration is low. In addition, by converting it to an unconstrained minimization problem and applying the NLP algorithm, the convergence process can be accelerated, further reducing the time complexity.
[0051] 2) Space complexity: Since GN L1-OCSVM operates directly on the original problem without matrix augmentation or other transformations, it can reduce memory consumption. Although some additional memory overhead may be incurred in the algorithm itself, the overall space complexity is usually lower due to avoiding the transformation process.
[0052] S4, post-processing of segmentation results: Post-process the segmentation results to improve the accuracy and completeness of the segmentation results, including removing small noise areas, filling broken tree edges, and merging adjacent segmented areas. Specifically, define an area threshold, treat the area in the segmentation result that is smaller than the threshold as noise and remove it, use the pixel connection algorithm to connect the broken edges, and use the shape characteristics of the trees to correct the segmentation results through shape prior knowledge.
[0053] S5. Evaluation and verification: Use the test data set to evaluate and verify the post-processed segmentation results to ensure that the segmentation results meet the expected requirements.
[0054] The forestry forest single tree segmentation model shown in the present invention is further described below in conjunction with specific embodiments: Example
[0055] See also Figures 1 to 3 , L1-OCSVM, SVDD, and L2-OCSVM were used for single plant segmentation experiments. Figure 1This is a comparison chart of Gaussian distribution data including outliers obtained using three models. The results show that L1-OCSVM and SVDD are relatively stable in the face of outliers, while L2-OCSVM is relatively sensitive. This indicates that in the segmentation of individual trees, the presence of outliers may have a greater impact on the performance of the model, and a more robust anomaly detection algorithm needs to be selected. L1-OCSVM has a smaller number of support vectors while maintaining high performance. This means that in the task of segmenting individual trees, choosing L1-OCSVM may reduce computational costs and resource requirements while maintaining model performance. The base outlier planes of SVDD and L1-OCSVM show stability in the face of outliers. This suggests that in the segmentation of individual trees, choosing an algorithm with good robustness may be more conducive to dealing with abnormal situations that may occur in various scenarios.
[0056] Figure 2 A comparison chart of single plant segmentation results obtained using various models; Figure 3 Comparative numerical results obtained using multiple models. The results show that although the above methods can achieve a high target detection rate and a low false warning rate at the same time, the forestry forest single tree segmentation model described in the present invention is much stronger than the other two because its real-time performance is better than the current state of the art without sacrificing the accuracy of the object. Single tree segmentation usually requires processing a large amount of image data, so real-time performance is an important consideration. If the model can achieve high real-time performance while maintaining accuracy, it will have a positive impact on the efficiency and speed of single tree segmentation. The accuracy of single tree segmentation directly affects the subsequent analysis of forest growth conditions and environmental conditions. If the model can maintain high accuracy on the basis of real-time performance, it will be more conducive to providing accurate analysis results.
[0057] In summary, the present invention provides a single-class support vector machine L1-OCSVM based on L1 norm for single-class target detection, making full use of the characteristics of L1 norm to meet the requirements of real-time target detection / recognition, thereby realizing the segmentation of single trees in forests; by introducing an infinite margin term to replace the traditional L2 norm to design L1-OCSVM, the principle of structural risk minimization is maintained; an equivalent optimization method is used to solve the nonlinear L1-OCSVM to solve the problems of non-differentiability and nonlinearity of the L1 norm; by directly minimizing the L1 norm of the combination coefficient, the obtained solution is more likely to be highly sparse than the L2 norm solution, thereby reducing the complexity of calculation; two acceleration algorithms are used to improve the training speed. Compared with existing SOTA and other methods, the method proposed by the present invention has significant advantages in training time, detection accuracy, false warning rate and real-time capability.
[0058] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0059] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A forestry forest single tree segmentation model, characterized in that: The process of establishing the single plant segmentation model comprises the following steps: S1. Data collection and dataset preparation: Use drones to sample the target forest area, preprocess and annotate the collected remote sensing images, and divide the annotated samples into training datasets, validation datasets, and test datasets to ensure the generalization performance of the model; S2. Feature extraction: Use convolutional neural network (CNN) to learn the color features of images and perform tree segmentation end-to-end. In CNN, the color features of images are extracted through convolutional layers and pooling layers, thereby achieving accurate segmentation of trees. S3. Segmentation algorithm: Classify each pixel in the image as a tree or non-tree. Use the L1-norm based one-class support vector machine L1-OCSVM to train the classifier and use the pixel features in the image for classification. S4, post-processing of segmentation results: performing post-processing on the segmentation results to improve the accuracy and completeness of the segmentation results, wherein the post-processing includes removing small noise areas, filling broken tree edges, and merging adjacent segmented areas; S5. Evaluation and verification: Use the test data set to evaluate and verify the post-processed segmentation results to ensure that the segmentation results meet the expected requirements.
2. The forestry forest single tree segmentation model according to claim 1, characterized in that: The step S2 also includes: applying a convolution kernel to the input image, element-wise multiplying the convolution kernel with each position of the image, and then adding the results to generate an output feature map; repeating this process to move the convolution kernel over the entire image, thereby generating a complete feature map; dividing the feature map into non-overlapping areas, selecting the maximum value for each area as the output value of the area, and using a new feature map composed of all maximum values as the output of the pooling layer.
3. The forestry forest single tree segmentation model according to claim 1, characterized in that: The step S3 further comprises: Define the single-class support vector machine L1-OCSVM based on the L1 norm, define is the weight of the hyperplane in the feature space, w is the weight in the input space, and the model formula of the single plant segmentation model is: ; ; ; Distance redefinition in L1-OCSVM: The L∞ norm distance of any point x0 in L1-OCSVM to a hyperplane Rewritten in minimal form, ; Rewrite the model in matrix form, the model formula is: ; ; ; Solve the rewritten model formula: further separate the validation data set to obtain a tuning data set, select parameters from the tuning data set, the parameters include the selected kernel function, parameters and regularization factors, optimize the parameters through the model, and rewrite the model based on the equivalence of the solution: ; In order to avoid Approaching 0, When it approaches 0, there is a zero solution. We add a constraint to the above model. ,The resulting problem is still linear and can be solved by LP methods; Acceleration strategy: The convergence speed is improved by using two acceleration strategies, NLP L1-OCSVM and GN L1-OCSVM. The above constraint sets are combined by GNL1-OCSVM and reformulated as an unconstrained minimization problem to reduce memory storage overload. NLP L1-OCSVM is used to solve the converted LP problem.
4. The forestry forest single tree segmentation model according to claim 1, characterized in that: The step S4 further comprises: An area threshold is defined, and the areas in the segmentation results with an area smaller than the threshold are regarded as noise and removed. The broken edges are connected using the pixel connection algorithm, and the shape characteristics of the trees are used to correct the segmentation results through shape prior knowledge.
Citation Information
Cited By
Single tree point cloud segmentation method based on control point guidance and feature adaptation
CN122391283A
