An image segmentation method and system based on adaptive hyperbolic density peak clustering
By adopting the adaptive hyperbolic density peak clustering method, the problem of inaccurate clustering of traditional density peak clustering algorithms on non-uniform medical image data is solved, achieving more efficient and accurate image segmentation and improving the effect of medical image analysis.
Patent Information
- Application Number
- CN202511234365.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-01
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2045-09-01
AI Technical Summary
Traditional density peak clustering algorithms rely on Euclidean distance when processing non-uniform medical image data, leading to inaccurate clustering results. Furthermore, they struggle to effectively cluster dissimilar data points in hyperbolic space, resulting in misclassification.
An adaptive hyperbolic density peak clustering method is adopted. An adaptive hyperbolic distance matrix is constructed by introducing adaptive weights to obtain the optimal cutoff distance. The local density and high density minimum distance are calculated using the exponential density function, and the cluster center is selected for image segmentation.
It improves the accuracy and computational efficiency of image segmentation, effectively alleviates the limitations of traditional algorithms on non-uniform datasets, reduces misclassification, and enhances the accuracy of medical image analysis.
Smart Images

Figure CN120782794B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image segmentation technology, specifically relating to an image segmentation method and system based on adaptive hyperbolic density peak clustering. Background Technology
[0002] With the rapid development of medical imaging technologies (such as MRI, CT, ultrasound, and pathology images), massive amounts of medical image data are constantly being stored in medical storage devices. How to effectively extract key information from these images has become a core challenge in medical diagnosis and scientific research. Image clustering, as a key technology in unsupervised learning, has wide applications in medical image segmentation, anomaly detection, lesion localization, and assisted diagnosis.
[0003] Density Peak Clustering (DPC), an image clustering method, aims to address the limitations of traditional clustering algorithms when handling complex data distributions. In recent years, with the rapid development of big data, artificial intelligence, and bioinformatics, clustering analysis, as a core technology in data mining, faces the challenge of handling high-dimensional, noisy, and non-uniformly distributed data. Against this backdrop, DPC algorithms have gradually become an important research direction in clustering analysis. Existing research has not only provided new technical means for clustering analysis but also laid the foundation for automated pattern recognition and knowledge discovery in complex data scenarios. Medical images, as typical high-dimensional, unstructured data, often exhibit highly non-uniform feature distributions and complex spatial structures. However, traditional clustering methods often struggle to effectively characterize potential tissue differences and lesion regions in images. Therefore, applying density peak clustering to medical image analysis has become an important technique for improving image segmentation and diagnostic accuracy.
[0004] However, the DPC algorithm and its variants rely on calculating the Euclidean distance between data points to estimate local density in planar Euclidean space, and have not yet considered extending the DPC algorithm to hyperbolic space to alleviate the challenges posed by non-uniform datasets. In medical image datasets, Euclidean distance only calculates the shortest planar distance between two points; however, when dissimilar data points are close to each other in Euclidean space, it cannot accurately reflect the actual differences or similarities between the two points, leading to inaccurate clustering results. Furthermore, in hyperbolic space, when data points located at the boundaries of density-varying clusters have hyperbolic distances close to other cluster centers, or when extreme hyperbolic distance values exist, it is difficult to effectively cluster these data points using the DPC algorithm, resulting in misclassifications in hyperbolic space. Summary of the Invention
[0005] The purpose of this invention is to provide an image segmentation method and system based on adaptive hyperbolic density peak clustering.
[0006] In a first aspect, the present invention provides an image segmentation method based on adaptive hyperbolic density peak clustering, the method comprising:
[0007] A segmented image containing the target object is acquired and preprocessed. Key parameters are obtained based on the preprocessed segmented image. The key parameters include the trace of the global covariance matrix, the maximum pairwise distance, the feature enhancement matrix, and the center deviation. An adaptive hyperbolic distance matrix is constructed by introducing adaptive weights, and the optimal cutoff distance is obtained. The adaptive weights are obtained based on the key parameters.
[0008] The local density and minimum high-density distance of different samples in the segmented image are obtained based on the adaptive hyperbolic distance matrix and the optimal cutoff distance. Decision values are obtained based on the local density and minimum high-density distance of the samples, and multiple cluster centers are selected from all samples based on the decision values. Non-cluster center samples are assigned to the category of the cluster center with the smallest adaptive hyperbolic distance to them, and the clustering of all samples is completed. According to the category to which each sample belongs, the segmented image is divided into several regions to achieve the segmentation of the target object.
[0009] Preferably, the adaptive weights are obtained by weighted averaging of the trace of the global covariance matrix, the feature enhancement matrix, the maximum pairwise distance, and the center deviation.
[0010] Preferably, the method for obtaining the adaptive hyperbolic distance matrix is as follows: based on the adaptive weights Constructing adaptive hyperbolic distance between different samples Its expression is:
[0011]
[0012] in, It is an inverse hyperbolic cosine function; and To segment samples in an image; The Euclidean norm is represented; the adaptive hyperbolic distance matrix is constructed using the adaptive hyperbolic distance as the elements in the adaptive hyperbolic distance matrix.
[0013] Preferably, the local density is obtained by establishing an exponential density function through an adaptive hyperbolic distance.
[0014] Preferably, the preprocessing process is as follows: flattening the segmented image and normalizing the flattened result.
[0015] Preferably, the method for obtaining the minimum distance of high density is as follows:
[0016] If there exists a local density of sample b that is greater than that of sample a, then the minimum adaptive hyperbolic distance between sample b and sample a is selected from all samples b that meet the condition as the minimum high-density distance of sample a; otherwise, the maximum adaptive hyperbolic distance between sample b and sample a is selected from all samples b as the minimum high-density distance of sample a.
[0017] Preferably, each element in the feature enhancement matrix is the sum of the Euclidean norms of the two corresponding samples divided by the maximum value of the Euclidean norms of twice the samples in the segmented image.
[0018] Preferably, the center deviation is the Euclidean norm of two decentralized samples divided by the maximum value of the center distance from each point in the center distance matrix.
[0019] Preferably, the method for obtaining the optimal cutoff distance is as follows:
[0020] The average of the maximum and minimum adaptive hyperbolic distances in the adaptive hyperbolic distance matrix is used as the cutoff distance. An objective function is constructed based on the cutoff distance. If the objective function does not reach the preset target, the maximum or minimum adaptive hyperbolic distance is updated according to the objective function, and the cutoff distance is updated based on the updated maximum and minimum adaptive hyperbolic distances. The above process is repeated until the objective function reaches the preset target, and the cutoff distance of the current iteration is used as the optimal cutoff distance.
[0021] Secondly, this invention provides a target detection system based on adaptive hyperbolic density peak clustering, which is used to perform the image segmentation method described above. The target detection system includes a data acquisition module, a data preprocessing module, an adaptive weighting module, an adaptive hyperbolic distance construction module, an adaptive cutoff distance module, an exponential density module, a high-density minimum distance module, and a clustering module. The data acquisition module is used to acquire segmented images; the data preprocessing module is used to preprocess the segmented images; the adaptive weighting module is used to obtain key parameters and calculate adaptive weights; the adaptive hyperbolic distance construction module is used to introduce adaptive weights to establish adaptive hyperbolic distance; the adaptive cutoff distance module is used to select the optimal cutoff distance; the exponential density module is used to obtain the local density of different samples based on the adaptive hyperbolic distance; the high-density minimum distance module is used to calculate the high-density minimum distance for each sample; and the clustering module is used to calculate decision values based on local density and high-density minimum distance to select cluster centers, and to cluster the remaining non-cluster center samples, completing the clustering of all samples, and dividing the segmented image into several regions based on the clustering results.
[0022] The beneficial effects of this invention are:
[0023] 1. This invention extends the density peak clustering algorithm to hyperbolic space, solving the problem that the traditional density peak clustering algorithm relies on planar Euclidean space for clustering, resulting in inaccurate clustering results on non-uniformly distributed datasets, and alleviating the limitations of traditional algorithms when dealing with complex data distributions.
[0024] 2. This invention utilizes the trace of the global covariance matrix and the Euclidean norm of the dataset to calculate the adaptive hyperbolic distance, suppressing the outward diffusion of data points within the same cluster and reducing misclassification problems caused by data points at the boundary between high-density and low-density clusters. Simultaneously, by calculating the maximum pairwise distance between samples in the segmented image and the deviation of each sample from the cluster center, this invention further avoids classification errors caused by extreme hyperbolic distance values. Furthermore, by averaging key parameters, an adaptive hyperbolic distance metric is constructed, thus more accurately reflecting the true internal structure of the data.
[0025] 3. This invention obtains the optimal adaptive cutoff distance based on the bisection method, avoiding manual parameter selection, and uses the exponential density function to construct local density estimation, which effectively improves the algorithm's computational efficiency and makes it highly valuable for practical applications in big data scenarios. Attached Figure Description
[0026] Figure 1 This is an overall flowchart of the image segmentation method in this invention.
[0027] Figure 2 This is a schematic diagram of data preprocessing in this invention.
[0028] Figure 3 This is a schematic diagram of the adaptive hyperbolic distance for different samples in this invention.
[0029] Figure 4 This is a heatmap corresponding to the adaptive hyperbolic distance matrix in this invention.
[0030] Figure 5 This is a schematic diagram of the process of selecting the optimal cutoff distance in this invention.
[0031] Figure 6 This is a schematic diagram of the local density distribution process in this invention.
[0032] Figure 7 This is a decision graph for determining cluster centers in this invention.
[0033] Figure 8 This is a schematic diagram of the predicted pixel distribution results in this invention.
[0034] Figure 9 This is a schematic diagram of the image segmentation results of the present invention.
[0035] Figure 10The diagrams show the clustering results using different types of distance clustering; (a) is a diagram of the clustering results based on Euclidean distance clustering; (b) is a diagram of the clustering results based on hyperbolic distance clustering; and (c) is a diagram of the clustering results of the present invention.
[0036] Figure 11 This is a schematic diagram of the image segmentation system in this invention. Detailed Implementation
[0037] The present invention will be further described below with reference to the accompanying drawings.
[0038] Example 1
[0039] like Figure 1 As shown, an image segmentation method based on adaptive hyperbolic density peak clustering includes the following steps:
[0040] Step 1: Data Preprocessing
[0041] Acquire a segmented image containing the target object, and flatten the segmented image, as shown below:
[0042]
[0043] in, This represents the segmented image after flattening. Represents the original segmented image; Indicates the height of the original segmented image; Indicates the width of the original segmented image; This represents the number of channels in the original segmented image; This represents the function for rearrangement operations.
[0044] like Figure 2 As shown, the segmented image undergoes data normalization processing. The data normalization processing method is as follows:
[0045]
[0046] in, This represents the segmented image after normalization. For the sample size, ; For characteristic number, ; Indicates the scaling factor; This represents the Euclidean norm.
[0047] Step 2: Obtain key parameters
[0048] 2-1. Obtain the trace of the global covariance matrix
[0049] Obtain the mean of each sample in the segmented image. Its expression is:
[0050]
[0051] in, To segment the image The first sample A feature, namely, the j-th channel of the i-th pixel in the segmented image; ; .
[0052] Based on the mean of each sample Centering is performed on the segmented image, that is, subtracting the mean of each sample in the segmented image to obtain the center distance matrix. According to the center distance matrix Obtain the global covariance matrix It is represented as:
[0053]
[0054] in, The center distance matrix The transpose of .
[0055] Obtain the trace of the global covariance matrix It is represented as:
[0056]
[0057] in, These are the diagonal elements of the global covariance matrix.
[0058] 2-2. Obtain the maximum pairwise distance
[0059] Obtain the maximum pairwise distance based on different samples in the segmented image. Its expression is:
[0060]
[0061] in, and All are samples from segmented images; .
[0062] 2-3. Obtain the feature enhancement matrix
[0063] Constructing a feature enhancement matrix Feature enhancement matrix Each element The method to obtain it is as follows:
[0064]
[0065] in, This represents the maximum value of the Euclidean norm of the samples in the segmented image.
[0066] 2-4. Obtain the center deviation Its expression is:
[0067]
[0068] in, The mean of the sample; The center distance matrix The maximum distance from each point to the center.
[0069] Step 3: Extract the trace of the global covariance matrix. Feature enhancement matrix Maximum pairwise distance and center deviation Perform a weighted average to obtain adaptive weights. Its expression is:
[0070]
[0071] in, This represents the maximum value of the trace of the global covariance matrix.
[0072] Based on adaptive weights Constructing adaptive hyperbolic distance between different samples Its expression is:
[0073]
[0074] in, It is an inverse hyperbolic cosine function.
[0075] like Figure 3 and Figure 4 As shown, an adaptive hyperbolic distance matrix is constructed to adapt the hyperbolic distance. As an element in the adaptive hyperbolic distance matrix.
[0076] Step 4, as follows Figure 5 As shown, based on the obtained adaptive hyperbolic distance matrix, the optimal cutoff distance is adaptively selected using a bisection strategy. The specific process is as follows:
[0077] The cutoff distance is the average of the maximum and minimum adaptive hyperbolic distances in the adaptive hyperbolic distance matrix. It is represented as:
[0078]
[0079] in, For the maximum adaptive hyperbolic distance; The minimum adaptive hyperbolic distance.
[0080] Based on cutoff distance Construct the objective function Its expression is:
[0081]
[0082] Where index is the indicator function. ; A set of sample pairs; This represents the total number of unordered pairs formed by randomly selecting two samples from n samples. .
[0083] According to the objective function Select to update the maximum adaptive hyperbolic distance. or minimum adaptive hyperbolic distance and with the updated maximum adaptive hyperbolic distance and minimum adaptive hyperbolic distance Update the cutoff distance. Repeat the above process until the objective function reaches the preset target, using the cutoff distance of the current iteration. As the optimal cutoff distance .
[0084] Step 5: Select cluster centers
[0085] like Figure 6 As shown, based on the exponential distribution characteristics of hyperbolic space, an exponential density function is established and the local density of sample a is obtained. Its expression is:
[0086]
[0087] By determining the minimum high-density distance between different samples based on their local density, the system effectively captures the nearest neighbor relationships and spatial distribution structure between samples. If a local density exists for sample b... Local density greater than sample a If the condition is not met, then the minimum adaptive hyperbolic distance between sample b and sample a is selected from all samples b that meet the condition as the high-density minimum distance for sample a; otherwise, the maximum adaptive hyperbolic distance between sample b and sample a is selected from all samples b as the high-density minimum distance for sample a. The formula is expressed as:
[0088]
[0089] like Figure 7 As shown, based on the local density of the sample and high density minimum distance Obtain decision value Its expression is:
[0090]
[0091] decision value Sort by size from largest to smallest, and select the top... The samples corresponding to each decision value are used as cluster centers; where R is the preset number of cluster centers.
[0092] Step 6: Obtain the adaptive hyperbolic distance between non-cluster center samples and each cluster center, and assign each non-cluster center sample to the category of the nearest cluster center to complete the clustering of all pixels. The calculation formula is as follows:
[0093]
[0094] in, This indicates the cluster center assigned to a sample that is not a cluster center. This represents the value of the independent variable that minimizes the objective function.
[0095] like Figure 8 As shown, based on the category of each sample, the segmented image is divided into several regions, achieving accurate segmentation of the target object and thus improving the efficiency and accuracy of image resolution. A schematic diagram of the image segmentation result of this invention is shown below. Figure 9 As shown. This invention, along with the clustering results based on Euclidean distance and hyperbolic distance, are as follows. Figure 10 As shown in Table 1. From Figure 10 As can be seen from Table 1, the clustering effect of the present invention is better than the other two clustering methods.
[0096] Table 1. Clustering results of different clustering methods
[0097]
[0098] Example 2
[0099] like Figure 11As shown, an adaptive hyperbolic density peak clustering-based target detection system is used to execute the target detection method in Example 1. This target detection system includes a data acquisition module, a data preprocessing module, an adaptive weighting module, an adaptive hyperbolic distance construction module, an adaptive cutoff distance module, an exponential density module, a high-density minimum distance module, and a clustering module. The data acquisition module is used to acquire segmented images; the data preprocessing module is used to preprocess the input segmented images. The adaptive weighting module is used to calculate the trace of the global covariance matrix, the feature enhancement matrix, the maximum pairwise distance, and the central deviation of the segmented images. The adaptive hyperbolic distance construction module is used to perform a weighted average of the trace of the global covariance matrix, the feature enhancement matrix, the maximum pairwise distance, and the central deviation to form adaptive weights and establish an adaptive hyperbolic distance. The adaptive cutoff distance module is used to adaptively select the optimal cutoff distance using a bisection strategy to avoid manual intervention. The exponential density module is used to establish an exponential density function based on the exponential distribution characteristics of hyperbolic space to calculate the local density of different samples. The high-density minimum distance module calculates the high-density minimum distance for each sample based on the acquired local density and adaptive hyperbolic distance, accurately reflecting the spatial distribution relationship between data points. The clustering module calculates decision values based on local density and high-density minimum distance to select cluster centers. It also calculates the adaptive hyperbolic distance between non-cluster center samples and each cluster center in hyperbolic space, assigning each non-cluster center sample to the category of the nearest cluster center, thus completing the clustering of all samples. After clustering, the segmented image is divided into several regions according to the category of each sample, achieving accurate segmentation of the target and assisting doctors in developing personalized treatment plans.
[0100] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above 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.
[0101] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention patent should be determined by the appended claims.
Claims
1. An image segmentation method based on adaptive hyperbolic density peak clustering, characterized in that: The method comprises: Collecting a segmentation image containing a measured target, and pre-processing the segmentation image; obtaining key parameters based on the pre-processed segmentation image; the key parameters include the trace of a global covariance matrix, a maximum pairwise distance, a feature enhancement matrix, and a center deviation; introducing an adaptive weight to construct an adaptive hyperbolic distance matrix, and obtaining an optimal cutoff distance; the adaptive weight is obtained based on the key parameters; The adaptive weight is obtained by weighted average of the trace of the global covariance matrix, the feature enhancement matrix, the maximum pairwise distance, and the center deviation; The adaptive hyperbolic distance matrix is obtained by Constructing adaptive hyperbolic distance between different samples The expression is: ; wherein is the inverse hyperbolic cosine function; and segmenting samples in an image; denotes the Euclidean norm; constructing an adaptive hyperbolic distance matrix with adaptive hyperbolic distances as elements in the adaptive hyperbolic distance matrix; Based on the adaptive hyperbolic distance matrix and the optimal cutoff distance, the local density of different samples in the segmentation image and the high-density minimum distance are obtained; the decision value is obtained according to the local density and the high-density minimum distance of the samples, and a plurality of clustering centers are selected from all samples based on the decision value; the non-clustering center samples are assigned to the category to which the clustering center belonging to the smallest adaptive hyperbolic distance belongs, and the clustering of all samples is completed; the segmentation image is divided into several regions according to the category to which each sample belongs, and the segmentation of the measured target is realized. The local density is obtained by establishing an exponential density function based on the adaptive hyperbolic distance.
2. The image segmentation method based on adaptive hyperbolic density peak clustering according to claim 1, characterized in that: The pre-processing process is: flattening the segmentation image, and performing data normalization on the flattened result.
3. The image segmentation method based on adaptive hyperbolic density peak clustering according to claim 1, characterized in that: The high-density minimum distance is obtained as follows: If there is a sample b whose local density is greater than that of sample a, the smallest adaptive hyperbolic distance between sample a and all sample b satisfying the condition is selected as the high-density minimum distance of sample a; otherwise, the maximum adaptive hyperbolic distance between sample a and all sample b is selected as the high-density minimum distance of sample a.
4. The image segmentation method based on adaptive hyperbolic density peak clustering according to claim 1, characterized in that: Each element in the feature enhancement matrix is the sum of the Euclidean norms of the corresponding two samples divided by twice the maximum value of the Euclidean norm of the samples in the segmentation image.
5. The image segmentation method based on adaptive hyperbolic density peak clustering according to claim 1, characterized in that: The center deviation is the maximum value of the distance from each point in the center distance matrix to the center distance after the Euclidean norm of the two decentralized samples.
6. The image segmentation method based on adaptive hyperbolic density peak clustering according to claim 1, characterized in that: The optimal cutoff distance is obtained as follows: The average of the maximum adaptive hyperbolic distance and the minimum adaptive hyperbolic distance in the adaptive hyperbolic distance matrix is taken as the cutoff distance; A target function is constructed based on the cutoff distance; If the target function does not reach the preset target, the maximum adaptive hyperbolic distance or the minimum adaptive hyperbolic distance is updated according to the target function, and the cutoff distance is updated based on the updated maximum adaptive hyperbolic distance and minimum adaptive hyperbolic distance; Repeat the above process until the target function reaches the preset target, and take the cutoff distance of the current iteration as the optimal cutoff distance.
7. A target detection system based on adaptive hyperbolic density peak clustering, characterized by: A target detection system for performing the image segmentation method based on adaptive hyperbolic density peak clustering of claim 1; the target detection system comprises a data acquisition module, a data preprocessing module, an adaptive weight module, an adaptive hyperbolic distance construction module, an adaptive cutoff distance module, an exponential density module, a high-density minimum distance module, and a clustering module; the data acquisition module is used to collect a segmentation image; the data preprocessing module is used to pre-process the segmentation image; the adaptive weight module is used to obtain key parameters and calculate an adaptive weight; The adaptive hyperbolic distance construction module is used for introducing adaptive weights to establish an adaptive hyperbolic distance; The adaptive cut-off distance module is used for selecting an optimal cut-off distance; the exponential density module is used for obtaining local densities of different samples according to the adaptive hyperbolic distance; the high-density minimum distance module is used for calculating high-density minimum distances of each sample; the clustering module is used for calculating decision values according to the local densities and the high-density minimum distances to select clustering centers, clustering the remaining non-clustering center samples, completing clustering of all samples, and dividing the segmented image into several regions according to the clustering result.