An improved kernel density peak clustering method for plant image segmentation

By using the kernel density peak clustering method in high-dimensional space, combined with the DPC and RBF algorithms, the shortcomings of K-means and DPC methods in biased selection and non-linear data set processing in crop image segmentation are solved, and plant images are realized. Effective segmentation and clustering improve the accuracy of agricultural image processing.

CN114782456BInactive Publication Date: 2024-10-18ANHUI AGRICULTURAL UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210360615.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-07
Publication Date
2024-10-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing K-means and DPC clustering methods have the problem of biased selection of cluster centers when processing crop image segmentation and poor performance on nonlinear data sets. Especially in data sets with high dimensions or overlapping point distributions, it is difficult to achieve satisfactory results. the clustering results.

Method used

An improved kernel density peak clustering method is proposed. By testing on multiple artificial data sets and UCI data sets, and combining the density peak clustering DPC algorithm and the radial basis function RBF algorithm, the sample points are mapped to high-dimensional space. Use the decision diagram to select the center point, and use the allocation strategy to perform image clustering. The allocation is completed until the temporary boundary point is found, and the unassigned points are allocated to the maximum similarity cluster.

Benefits of technology

This method shows good clustering effect on non-linear data sets, and can effectively solve the clustering problem in crop image segmentation. Especially in the image segmentation of early plant growth, it improves the accuracy of farmland construction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114782456B_ABST
    Figure CN114782456B_ABST
Patent Text Reader

Abstract

The present invention proposes an improved kernel density peak clustering method for plant image segmentation. After selecting the center point using a decision diagram, the method uses RBF to map the data to a high-dimensional space, and then clusters the sample points in the high-dimensional space using two allocation strategies, thereby better solving the shortcomings of the K-Means clustering algorithm and the DPC clustering algorithm in agricultural image segmentation. The method is tested on multiple artificial data sets and UCI data sets, compared with other clustering algorithms, and finally applied to plant image segmentation. The experimental results show that the algorithm of the present invention has a good clustering effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, specifically to an improved kernel density peak clustering method for plant image segmentation. Background Technology

[0002] When studying crops, plants require additional water and fertilizer under different conditions, making it crucial to accurately understand their current growth status. Image segmentation is a fundamental image processing technique, and its application in agriculture is increasingly demanding. With the deepening research into image segmentation techniques, many machine learning methods have also been applied to this field. Clustering aims to group similar points into similar groups and has been widely used in many fields. The K-means method is a distance-based clustering method with fast convergence and robust generality. It is one of the more effective clustering methods, and in agriculture, K-means is frequently used to segment crop morphology images. However, the color of crops in the early stages of growth often resembles the soil color, exposing a limitation of the k-means method. The K value in the K-means method needs to be manually set. It then iteratively searches for cluster centers. In many cases, this method tends to favor selecting cluster centers, and the k-means method is more difficult to converge with non-convex data.

[0003] Furthermore, clustering using DPC (Density-Based Clustering) with fast search and density peak finding is a density-based clustering method, and more datasets are suitable for DPC compared to the k-means method. However, this method still has some shortcomings. (1) After selecting the center point of the points according to the decision graph, the remaining points are assigned to their nearest neighbors with higher density. In the point assignment process of the DPC method, points closer to the cluster center are correctly assigned. However, as the assignment proceeds, if a point is incorrectly assigned to an unrelated or incorrect cluster, a chain reaction will lead to a series of points being incorrectly assigned to unrelated clusters. (2) For some nonlinear datasets, especially some high-dimensional datasets or datasets with overlapping point distributions, the DPC method cannot achieve satisfactory clustering results. Summary of the Invention

[0004] To address the aforementioned technical problems, this invention proposes an improved kernel density peak clustering method for plant image segmentation. Experiments were conducted on multiple artificial datasets and the UCI dataset, and the method was compared with other clustering algorithms before being applied to plant image segmentation. Experimental results show that the algorithm of this invention has better clustering performance.

[0005] According to embodiments of the present invention, an improved kernel density peak clustering method for plant image segmentation is proposed, the method comprising:

[0006] Input the image to be segmented.

[0007] The decision map is generated by selecting the center point of the dataset based on the local density ρ and the minimum distance δ of high density in the density peak clustering (DPC) algorithm.

[0008] The radial basis function (RBF) algorithm is used to map all sample points into a high-dimensional space to obtain a matrix containing the similarity between each sample. The center point of the dataset is used as the initial value to allocate other samples, and an allocation strategy is adopted for image clustering.

[0009] This image clustering method is used to segment plant images.

[0010] Furthermore, the steps for generating a decision map by selecting the center point of the dataset based on the local density ρ and the minimum distance δ of high density in the density peak clustering (DPC) algorithm include: drawing the decision map based on the truncated density kernel, Gaussian density kernel, logistic judgment function, and minimum distance δ in the DPC algorithm, and taking the point in the upper right corner of the decision map as the cluster center.

[0011] Furthermore, an assignment strategy is employed for image clustering, including:

[0012] For a given integers i and j, first, the cluster center object C n The object with the highest similarity in the sample space Ω is X. i Secondly, object X i Repeat C in the sample space Ω for the core. n Search methods

[0013] Search for samples X that have not been assigned a category. j (i≠j); Finally, with sample X j Replace object X i Perform a search. During the repeated search for the maximum similarity point among the sample points, each searched object is assigned to C. n Within the cluster, record the similarity value S of the k-th search point in the sample space Ω. k Similarity average difference D i ,in,

[0014]

[0015]

[0016] If a temporary boundary point is found, the search will stop and the current allocation method will end.

[0017] Furthermore, the temporary boundary point is defined as: if the similarity average difference D iThe sum of the local densities of all cluster centers in the sample space Ω is greater than the average of the sum of their local densities. hour:

[0018]

[0019] Then this i-th point is called a temporary boundary point.

[0020] Furthermore, after the current allocation method ends, the method further includes assigning un-clustered sample points to the cluster of data points with the highest similarity to them, and setting the similarity score for each allocation:

[0021] S k =N ij =K(X) i ,X j )

[0022] Sort in descending order.

[0023] This paper proposes a novel clustering method. First, a decision graph is used to determine centroids, similar to the DPC method. Then, a Gaussian kernel (radial basis function (RBF)) is used to map the data into a high-dimensional space. Finally, starting from each centroid, the most relevant points are searched in the high-dimensional space until a temporary boundary point for the cluster is found. Unclustered points are then assigned to the cluster with the highest similarity. In summary, the proposed method supports the selection of appropriate centroids and can effectively address the problem of nonlinear dataset clustering. More importantly, the proposed method has been successfully applied to image segmentation during the early stages of plant growth to enhance farmland development. Attached Figure Description

[0024] Figure 1 Figure 1 shows an embodiment of the improved kernel density peak clustering method for plant image segmentation proposed in this invention.

[0025] Figure 2 This is a conceptual diagram of temporary boundary points for the improved kernel density peak clustering method for plant image segmentation proposed in this invention.

[0026] Figure 3 This is a schematic diagram showing the result after the current assignment method is completed in the improved kernel density peak clustering method for plant image segmentation proposed in this invention;

[0027] Figure 4 This is an example diagram of the improved kernel density peak clustering method for plant image segmentation proposed in this invention, after descending order arrangement.

[0028] Figure 5 This is a diagram illustrating the clustering impact of four clustering algorithms on a spiral dataset.

[0029] Figure 6Figure 1 shows an example of the clustering effects of four clustering algorithms on a flame dataset.

[0030] Figure 7 The diagram illustrates the clustering impact of four clustering algorithms on a double-row dataset.

[0031] Figure 8 A decision graph for determining cluster centers before segmenting an image from one angle in a weed image segmentation experiment;

[0032] Figure 9 A decision map for determining cluster centers before segmenting an image from another angle in a weed image segmentation experiment;

[0033] Figure 10 Comparison of image segmentation from one angle using different algorithms;

[0034] Figure 11 A comparison image segmentation from another angle using different algorithms; Detailed Implementation

[0035] For ease of understanding, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0036] like Figure 1 As shown, this invention proposes an improved kernel density peak clustering method for plant image segmentation, the method comprising:

[0037] Input the image to be segmented.

[0038] The decision map is generated by selecting the center point of the dataset based on the local density ρ and the minimum distance δ of high density in the density peak clustering (DPC) algorithm.

[0039] The radial basis function (RBF) algorithm is used to map all sample points into a high-dimensional space to obtain a matrix containing the similarity between each sample. The center point of the dataset is used as the initial value to allocate other samples, and an allocation strategy is adopted for image clustering.

[0040] This image clustering method is used to segment plant images.

[0041] According to an embodiment of the present invention, the step of generating a decision graph by selecting the center point of the dataset based on the local density ρ and the minimum distance δ of high density in the density peak clustering (DPC) algorithm includes: drawing a decision graph based on the truncated density kernel, Gaussian density kernel, logistic judgment function and minimum distance δ in the DPC algorithm, and taking the point in the upper right corner of the decision graph as the cluster center.

[0042] According to an embodiment of the present invention, image clustering is performed using an allocation strategy, including:

[0043] For a given integers i and j, first, the cluster center object C n The object with the highest similarity in the sample space Ω is X. i Secondly, object X i Repeat C in the sample space Ω for the core. n Search methods

[0044] Search for samples X that have not been assigned a category. j (i≠j); Finally, with sample X j Replace object X i Perform a search. During the repeated search for the maximum similarity point among the sample points, each searched object is assigned to C. n Within the cluster, record the similarity value S of the k-th search point in the sample space Ω. k Similarity average difference D i ,in,

[0045]

[0046]

[0047] If a temporary boundary point is found, the search will stop and the current allocation method will end.

[0048] In this embodiment, as Figure 2 As shown, the improved kernel density peak clustering method for plant image segmentation proposed in this invention presents a conceptual diagram of temporary boundary points. Here, temporary boundary points are defined as follows: if the similarity mean difference D... i The sum of the local densities of all cluster centers in the sample space Ω is greater than the average of the sum of their local densities. hour:

[0049]

[0050] Then this i-th point is called a temporary boundary point.

[0051] like Figure 3 The diagram shown illustrates the process after the current assignment method is completed in the improved kernel density peak clustering method for plant image segmentation proposed in this invention.

[0052] After the current allocation method ends, the method further includes assigning un-clustered sample points to the cluster of data points with the highest similarity to them, and assigning similarity to each data point in each allocation:

[0053] S k =N ij =K(X) i ,X j )

[0054] Sort in descending order.

[0055] like Figure 4 The figure shown is an example of the improved kernel density peak clustering method for plant image segmentation proposed in this invention, after descending order.

[0056] To verify the effectiveness of this algorithm, this paper tests the performance of the clustering results on both artificial and real datasets. The method is compared with the k-means algorithm, k-means++ algorithm, and kernel k-means algorithm in terms of clustering performance, and three clustering evaluation metrics—Accuracy (ACC), Normalized Mutual Information (NMI), and Adjusted Rand Index (ARI)—are used to evaluate the results. The Accuracy metric measures the proportion of correct labels in the clustering results, judging whether the predicted values ​​match the true values; its result is in the range [0,1]. The Normalized Mutual Information metric measures the similarity between the clustering results and the correct label results, effectively verifying the robustness of the clustering results; its result is in the range [0,1]. The Adjusted Rand Index metric measures the degree of fit between two data distributions; its result is in the range [-1,1]. A negative number indicates a poor fit between the clustering results and the true situation. For all three evaluation metrics, the closer to 1, the better the result.

[0057] The parameter settings for the comparison algorithms are as follows: the maximum number of iterations for the k-means algorithm, k-means++ algorithm, and kernel k-means algorithm is 500. The density peak clustering threshold is set to the default value of 2%. For the kernel k-means algorithm, the radial basis function (RBF) is set as the similarity calculation function. Each of the three algorithms is tested independently for each batch of datasets 20 to 25 times. The optimal evaluation index for each algorithm within the parameter value range is selected and compared with the clustering results and the results of this method.

[0058] The experimental environment is as follows: The system uses a Core™ i5-9300H CPU at 2.40GHz, 8.00GB of RAM, and runs on Microsoft Windows 10. The algorithm was written in Python 3.8. Basic information about the artificially synthesized dataset and the UCI dataset used in the experiment is shown in Tables 1 and 2, respectively.

[0059] Table 1 Artificial Dataset

[0060]

[0061] In the artificial dataset, three artificial datasets were selected to verify the method and the clustering results were compared with those of three other clustering algorithms. Figure 5 , Figure 6 , Figure 7 The images show the clustering results of four algorithms on the Spiral, Flame, and Twomoons datasets.

[0062] The Spiral dataset, characterized by its spiral distribution and consisting of three circular clusters, can be used to test an algorithm's ability to handle circular datasets. Figure 5 As can be seen, due to improvements in the k-means clustering method and optimization of the clustering results, this method accurately clusters each point in the dataset. The k-means algorithm divides the dataset into equal parts in space, classifying the points in each part into a single class, resulting in poor clustering results. The k-means++ algorithm only optimizes the selection of cluster centers based on k-means, without improving the method for determining the cluster to which each point belongs. Therefore, its spatial clustering effect is similar to k-means, resulting in poor clustering performance. In this paper, the kernel k-means algorithm calculates the similarity between points based on the Radial Basis Function, but its poor selection of cluster centers leads to a failure to achieve satisfactory clustering results. Therefore, this method has excellent clustering ability for circular datasets.

[0063] The Flame dataset, generated from two classes of data, with the upper cluster surrounded by the lower cluster, aims to test whether the algorithm can effectively distinguish the boundary points of different clusters. Figure 6 As can be seen, the algorithm in this paper detected the correct number of clusters, accurately separated the upper clusters from the lower clusters, and obtained the correct clustering results; the three comparison algorithms all input the correct number of clusters, but some points were clustered into the wrong clusters.

[0064] The Twomoons dataset, consisting of two crescent-shaped clusters, can be used to test the ability of various algorithms to distinguish boundary points. Figure 7It can be seen that the algorithm in this paper has excellent clustering effect on this type of dataset; however, the other three comparison algorithms cannot identify non-convex clusters well and obtain poor clustering results.

[0065] In this embodiment, seven real-world UCI datasets were selected for clustering experiments, including datasets with various dimensions. Four clustering methods were applied to each dataset, and the evaluation metrics for the clustering results were recorded and summarized in Table 2. The bolded data in the table represents the optimal value for the corresponding dataset among the four clustering algorithms.

[0066] As shown in Table 2, this method outperforms the k-means algorithm and its improved algorithms in measuring the NMI index.

[0067] In the Aggregation dataset, DPC achieved a score of 1 in all three evaluation metrics, demonstrating excellent performance with minimal error. On the Seed dataset, this method achieved the highest NMI score, but its ACC and ARI scores were slightly lower than the Kernel K-Means algorithm. On the Jain dataset, a low-dimensional dataset, this method yielded excellent clustering results, with all three evaluation metrics at 1. The Robotnavigation dataset, with its high instance count and dimensionality, showed superior performance compared to the other three algorithms, improving ACC by approximately 30%, and also demonstrating significant improvements in NMI and ARI.

[0068] In summary, this method can achieve a relatively accurate clustering result on both high-dimensional and low-dimensional datasets.

[0069] Table 2 UCI Dataset

[0070]

[0071]

[0072] According to an embodiment of the present invention, the Leaf Counting dataset released by Aarhus University was selected. This dataset can be used to segment images of small plants, which is beneficial for estimating their growth stages. In this experiment, two images from different angles were selected for segmentation, each image being 100×100 pixels in size, and the results were compared with the k-means algorithm, the k-means++ algorithm, and the kernel k-means algorithm. Figure 8 and Figure 9 This is a decision graph for determining cluster centers before image segmentation using the method presented in this paper.

[0073] In the Figure 10When segmenting small plant images, three center points are selected based on the decision map. Based on the segmentation results, the algorithm in this paper clearly draws the plant outlines and clusters the main plant pixels relatively completely. However, because each component of the RGB color space is affected by brightness, the central areas of the small plants are not completely clustered. However, compared with the DPC algorithm, this method shows better clustering results in areas with higher brightness. The other three comparison algorithms all draw some soil and plants together, making it difficult to correctly classify similar colors, resulting in poor image segmentation results.

[0074] Judgment by decision diagram Figure 11 The image can be segmented into two classes, and the same number of clusters can be input into three comparison algorithms. The method presented in this paper accurately segments soil and small plant leaves, and the clustering results for the main plant pixels are relatively good. Because... Figure 11 The plant body and soil have similar color values, which leads to messy edges between the parts after segmentation by the other three different clustering algorithms, resulting in poor image segmentation results.

[0075] K-Means and DPC are common and relatively effective clustering algorithms, but both have some shortcomings. This paper proposes a novel strategy for partitioning samples in a high-dimensional space, which can effectively segment crop images. This method retains the center point selection method of DPC. First, a kernel method is used to map the data into a high-dimensional space. Then, the first partitioning is performed starting from the center point. When a temporary boundary point is found, the first sample allocation ends and the second sample allocation begins. During the second sample allocation, unassigned points are clustered based on similarity. Experiments on artificially synthesized datasets and the UCI dataset demonstrate the strong effectiveness of the proposed algorithm. Finally, the method is applied to agricultural image segmentation, preparing for subsequent processing such as plant subject image recognition.

[0076] It will be apparent to those skilled in the art that the embodiments of the present invention are not limited to the details of the exemplary embodiments described above, and that the embodiments of the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the embodiments of the present invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the embodiments of the present invention is defined by the appended claims rather than the foregoing description. Therefore, all variations falling within the meaning and scope of equivalents of the claims are intended to be encompassed within the embodiments of the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims. Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units, modules, or devices recited in the system, apparatus, or terminal claims may also be implemented by the same unit, module, or device through software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any particular order.

[0077] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention and are not intended to limit them. Although the embodiments of the present invention have been described in detail with reference to the above preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions to the technical solutions of the embodiments of the present invention should not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An improved kernel density peak clustering method for plant image segmentation, It is characterized in that The method comprises: Input the image to be segmented. Local density in the density peak clustering DPC algorithm and relative distance Select the center point of the data set to generate a decision graph; All sample points are mapped into a high-dimensional space using the radial basis function (RBF) algorithm to obtain a matrix containing the similarity between each sample. The center point of the data set is used as the initial value to allocate other samples, and the allocation strategy is used to perform image clustering. Use assignment strategies for image clustering, including: For given integers i and j, first, the cluster center object In the sample space The object with the greatest similarity is ; Secondly, the object The core in the sample space Repeat How to find Search for samples that have not been assigned a category ; Finally, with the sample Replace Object Conduct a search; In the process of repeatedly searching for the maximum similarity point among the sample points, each searched object is divided into and record the sample space The k-th similarity value of the search point Similar mean difference in, ; If a temporary boundary point is found, the search will stop and the current allocation method will end; The temporary boundary point is defined as: if the similarity mean difference Larger than the sample space The average value of the local density and the average value of all cluster centers in hour: ; Then this i-th point is called a temporary boundary point; The image clustering is used to segment the plant images.

2. The plant image segmentation method using the improved kernel density peak clustering technique according to claim 1, It is characterized in that Local density in the density peak clustering DPC algorithm and high density minimum distance The steps of selecting the center point of the data set to generate a decision diagram include: based on the truncated density kernel, Gaussian density kernel, logical judgment function and minimum distance in the DPC algorithm Draw a decision diagram and use the point in the upper right corner of the decision diagram as the cluster center.

3. The plant image segmentation method based on the improved kernel density peak clustering technique according to claim 1, It is characterized in that After the current allocation mode is ended, the method further includes allocating the sample points that have not been divided into clusters to the cluster of the data points with the maximum similarity thereto and each allocation will increase the similarity: ; Sort in descending order.

Citation Information

Patent Citations

  • Image characteristic density peak searching-based image segmentation method, system and medium

    CN108629783A

  • A K-nearest neighbor and multi-class merge based density peak clustering method and image segmentation system

    CN109409400A