Gravity model-based image clustering method and system

Through the image clustering method based on gravitational model, combined with adaptive neighbor technology and iterative merging strategy, the shortcomings of existing clustering algorithms in noise interference and complex data sets are solved, and more accurate and robust clustering results are achieved.

CN119445174APending Publication Date: 2025-02-14CHONGQING BITMAP INFORMATION TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411491602.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

When existing clustering algorithms deal with noise interference, complex shape clusters and data sets with large density differences, they are not robust enough, clustering results are inaccurate, and parameter selection is sensitive, which affects clustering performance.

Method used

Using the image clustering method based on the gravity model, the data set is processed through adaptive neighbor technology, and the gravitational model is used to merge samples with the same initial cluster label and local microcluster label to form the initial cluster and local microcluster set, and iterate through Merge to obtain the final cluster set.

Benefits of technology

It improves the accuracy and robustness of clustering results, reduces noise interference, and is suitable for processing data sets with complex shapes and large density differences, reducing the impact of manual intervention and parameter selection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119445174A_ABST
    Figure CN119445174A_ABST
Patent Text Reader

Abstract

The invention provides an image clustering method and system based on a gravitational model, and the method comprises the steps: obtaining a self-adaptive neighbor set of each sample in a to-be-clustered image data set D, and carrying out the denoising of the data set D through combining the distribution characteristics of the data set D; combining samples with the same initial cluster label in the data set D by using a gravitation model to form an initial cluster set; constructing a new data set Dc by taking all convergence points in the current initial cluster set as samples; combining samples with the same local micro-cluster labels in the data set Dc by using a gravitation model to form a local micro-cluster set; and iteratively combining all local micro-clusters in the local micro-cluster set to obtain a final cluster set, and outputting the final cluster set as an image data clustering result. The problems that in the prior art, some clustering algorithms are prone to noise interference in the clustering process, the clustering result is inaccurate, and the clustering performance on a data set with the complex shape and the large density difference is poor are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data mining, and in particular to an image clustering method and system based on a gravity model. Background Art

[0002] Cluster analysis, as an unsupervised learning technique, can divide a data set into several clusters based on the similarity of data points without preset labels. The core of this method is to ensure that data points within the same cluster have high similarity, while the similarity between different clusters is relatively low. Cluster analysis plays an important role in many fields, and its main goal is to discover structures and patterns in unlabeled data sets. For example, in marketing, it can help companies understand the preferences of different customer groups and personalize product recommendations; in bioinformatics, it can classify protein sequences based on their similarity and predict the structure and function of proteins; in supply chain management, it helps to classify products based on sales and inventory data and optimize inventory management. In the field of face recognition, cluster analysis also plays a vital role. Especially with the popularization of cameras and smart devices, cluster analysis can automatically group face data, improve the management efficiency of large-scale image data, and reduce manual intervention to improve the efficiency of data processing.

[0003] Traditional clustering methods can be mainly divided into five types: partition-based clustering, hierarchy-based clustering, density-based clustering, grid-based clustering and model-based clustering.

[0004] Partition-based clustering: Usually starts from a randomly selected initial cluster center and divides the data points according to the Euclidean distance between them. It requires the user to specify the number of clusters in advance and is suitable for spherical or ellipsoidal data distribution.

[0005] Hierarchical clustering: Organize data by constructing a tree diagram. Data points can be merged or decomposed from bottom to top or top to bottom, and the output is a hierarchical classification tree, but the division process is irreversible.

[0006] Density-based clustering: identifies high-density regions separated by low-density regions as clusters. It is able to identify clusters of arbitrary shapes, but does not work well on high-dimensional data and is very sensitive to the choice of parameters.

[0007] Grid-based clustering: Divide the data space into grid cells and merge or delete grids based on density thresholds, reducing computational complexity but relying on grid division and threshold selection.

[0008] Model-based clustering: It estimates the clustering structure of the data through a multivariate probability distribution, where each distribution component represents a cluster, but it is slow when processing large data sets.

[0009] In summary, although the existing clustering algorithms have their own advantages, they also face some challenges. First, these algorithms usually require manual setting of key parameters, such as the number of clusters, and their optimal values ​​often require in-depth data mining to determine. Second, these algorithms are not robust enough when dealing with data sets containing complex shape clusters and areas of different densities, and the clustering effect may not be ideal; at the same time, these algorithms have difficulty in correctly identifying noise points, and the final clustering results are easily disturbed by noise points. In addition, obtaining the accurate neighbor set of samples is crucial to the performance of clustering algorithms. Although the natural neighbor technique is widely used to determine the neighbor set of data due to its intuitiveness, this method requires pairwise mutual neighbor relationships, which may result in some samples being unable to obtain sufficient neighbor information during the calculation process, thereby affecting the accuracy and robustness of the clustering results. Summary of the invention

[0010] In view of the deficiencies in the prior art, the present invention provides an image clustering method and system based on a gravitational model, which solves the problems that some clustering algorithms in the prior art are easily affected by noise during the clustering process, the clustering results are inaccurate, and the clustering performance is poor on data sets with complex shapes and large density differences.

[0011] On the one hand, an embodiment of the present invention provides an image clustering method and system based on a gravity model, comprising the following steps:

[0012] Step S100, obtaining an adaptive neighbor set of each sample in the image data set D to be clustered, and denoising the data set D in combination with the distribution characteristics of the data set D;

[0013] Step S200: using a gravitational model to merge samples in the data set D with the same initial cluster label to form an initial cluster set;

[0014] Step S300, using all convergence points in the current initial cluster set as samples to construct a new data set Dc;

[0015] Step S400: using a gravity model to merge samples with the same local micro-cluster label in the data set Dc to form a local micro-cluster set;

[0016] Step S500: iteratively merge all local micro-clusters in the local micro-cluster set to obtain a final cluster set, and output the final cluster set as an image data clustering result.

[0017] Preferably, in step S100, the adaptive neighbor set of each sample in the image data set D to be clustered is obtained by the following steps:

[0018] Step S101, transmitting the image data set D to be clustered to the GPGPU acceleration platform to calculate the Euclidean distance between each pair of samples in the data set D to obtain a distance matrix;

[0019] Step S102, using acceleration technology to sort the distance matrix in ascending order;

[0020] Step S103, identifying the λth nearest neighbor of each sample according to the sorted distance matrix, where λ is a positive integer with an initial value of 1;

[0021] Step S104: construct an adaptive neighbor set of the corresponding sample based on the identified λth nearest neighbor sample, and update the inverse nearest neighbor set of the corresponding sample;

[0022] Step S105: determine whether the inverse neighbor set of the corresponding sample is empty after each iteration, or whether the number of samples whose inverse neighbor set is empty changes between two consecutive iterations;

[0023] If the inverse neighbor set of a sample is empty, or the number of samples whose inverse neighbor set is empty changes, then increase λ and continue iterating;

[0024] If the inverse neighbor sets of all samples are not empty, or the number of samples whose inverse neighbor sets are empty does not change, the iteration is exited to obtain an adaptive neighbor set for each sample.

[0025] Preferably, the acceleration technology used in step S102 includes a GPGPU graph processor and a KD-tree algorithm.

[0026] Preferably, in step S100, the data set D is denoised by the following steps:

[0027] Step S110, calculating the sum of distances between samples according to the adaptive neighbor set of each sample;

[0028] Step S120, calculating the adaptive unit density of each sample according to the sum of the distances between the samples;

[0029] Step S130, calculating an adaptive denoising threshold for each sample based on the distribution characteristics of the data set D and the adaptive unit density of the sample;

[0030] Step S140: Identify samples whose adaptive unit density values ​​are greater than or equal to the adaptive denoising threshold as noise, and remove them from the data set D to obtain a denoised data set D.

[0031] Preferably, in step S110, the sum of the distances between samples is calculated by the following formula:

[0032]

[0033] In the formula, SoD(x) represents the sum of the distances from each sample in the adaptive neighbor set of sample x to sample x, d xy represents the Euclidean distance between sample x and sample y, and AdN(x) represents the adaptive neighbor set of sample x.

[0034] Preferably, in step S120, the adaptive unit density of each sample is calculated by the following formula:

[0035]

[0036] Where AUD(x) represents the adaptive unit density of sample x, SoD(x) represents the sum of the distances from each sample in the adaptive neighbor set of sample x to sample x, and |AdN(x)| represents the number of samples in the adaptive neighbor set of sample x.

[0037] Preferably, in step S130, the adaptive denoising threshold of each sample is calculated by the following calculation formula:

[0038] ADT=MIN(AUD)+EX(AUD)+ω*(STD(AUD)-MAX(AUD));

[0039] Wherein, ADT represents the adaptive denoising threshold of all samples, MIN(AUD) represents the minimum value of the adaptive unit density of all samples, EX(AUD) represents the expectation of the adaptive unit density of all samples, STD(AUD) represents the standard deviation of the adaptive unit density of all samples, MAX(AUD) represents the maximum value of the adaptive unit density of all samples, ω represents the weight and the value of ω is determined according to the specific situation.

[0040] Preferably, in step S200, using the gravity model to merge samples with the same initial cluster label in the data set D to form an initial cluster set includes the following steps:

[0041] Step S201, calculating the gravity parameters between samples in the data set D based on the gravity model;

[0042] Step S202, calculating the maximum gravity parameter value of each sample in the data set D, the sample corresponding to the maximum gravity parameter value of the sample, and the sample set corresponding to the inverse maximum gravity parameter value of the sample according to the gravity parameter and in combination with the parallel reduction algorithm;

[0043] Step S203, searching for the initial cluster convergence point through a depth-first search algorithm and assigning a new cluster label to it, and back-propagating the cluster label to the samples in the sample set corresponding to the inverse maximum gravitational parameter value of the current convergence point;

[0044] Step S204: merge the samples with the same initial cluster label in the data set D to form an initial cluster set including several initial cluster ICs;

[0045] Among them, ICs i ={λ i , CP i ,ICSd i}, ICs i represents the i-th initial cluster, λ i represents the cluster label of the i-th initial cluster, CP i represents the sample corresponding to the convergence point of the i-th initial cluster, ICSd i Represents the sample set in the i-th initial cluster.

[0046] Preferably, in step S201, the gravity model adopts the Newton gravity model, and the gravity parameters between samples in the data set D are calculated by the Newton gravity model:

[0047]

[0048] In the formula, represents the gravitational parameter between sample a and sample b in data set D, m a and m b Represent the masses of sample a and sample b respectively, represents the unit vector from sample a to sample b, and G represents the gravitational parameter constant.

[0049] Preferably, in step S202, the relationship between the maximum gravity parameter value of the sample and the sample is defined as follows:

[0050]

[0051] Where, MGS a Indicates the sample with the maximum gravity parameter value of sample a; sample b is the sample with the largest gravity parameter value between sample a and data set D, and b is not equal to a;

[0052] The relationship between the inverse maximum gravitational parameter value of the sample and the sample set is defined as follows:

[0053] RMGSs a ={b|b∈D∧MGS b =a};

[0054] In the formula, RMGSs a It represents the sample set corresponding to the inverse maximum gravitational parameter value of sample a; sample b is the sample in data set D that takes sample a as its maximum gravitational parameter value.

[0055] Preferably, in step S203, searching the initial cluster convergence point by a depth-first search algorithm and assigning a new cluster label to it, and back-propagating the cluster label to the samples in the sample set corresponding to the inverse maximum gravitational parameter value of the current convergence point, comprises the following specific steps:

[0056] Step S2031, identifying samples in the data set D that have not yet been assigned initial cluster labels, and constructing a directed graph G with nodes corresponding to the samples;

[0057] Step S2032: traverse the directed graph G using a depth-first search algorithm, and mark the node where the first traversal completes the cycle as a convergence point CP;

[0058] Step S2033: assign a new cluster label to the current convergence point CP, and back-propagate the cluster label to samples in the sample set corresponding to the inverse maximum gravitational parameter value of the current convergence point CP;

[0059] Among them, the definition of the convergence point CP is as follows:

[0060] CP={x|x∈V(P ab )∧P ab =P ax +P xb ∧V(P ab )∈D∧x∈D};

[0061] Where P ab Represents a path from node a to node b in a directed graph G, V(P ab ) represents the set of all nodes on the path; P ax represents a path from node a to node x in the directed graph G; P xb Represents a path from node x to node b in the directed graph G.

[0062] Preferably, in step S400, samples with the same local micro-cluster label in the data set Dc are merged using a gravity model to form a local micro-cluster set, which includes the following specific steps:

[0063] Step S401, based on the gravity model, calculate the gravity parameters between samples in the data set Dc;

[0064] Step S402, calculating the maximum gravity parameter value of each sample in the data set Dc, the sample corresponding to the maximum gravity parameter value of the sample, and the sample set corresponding to the inverse maximum gravity parameter value of the sample according to the gravity parameter and in combination with the parallel reduction algorithm;

[0065] Step S403, searching for convergence points of all samples in the data set Dc by a depth-first search algorithm to form convergence clusters and assigning cluster labels to them;

[0066] Step S404, back-propagating the cluster label of the convergent cluster to the samples in the sample set corresponding to the inverse maximum gravitational parameter value of the current convergent point in the data set Dc;

[0067] Step S405: merge the samples with the same convergent cluster label in the data set Dc to form a local micro-cluster set including several local micro-clusters LMCs;

[0068] Step S406: Update the initial cluster labels of the samples in all the initial cluster sets in the local micro-cluster LMCs to the cluster labels of the current local micro-cluster; wherein LMCs i ={ξ i ,LMCSd i}, LMCs i represents the i-th local micro-cluster, ξ i represents the cluster label of the i-th local micro-cluster, LMCSd i represents the sample set in the i-th local micro-cluster.

[0069] Preferably, in step S500, all local micro-clusters in the local micro-cluster set are iteratively merged to obtain a final cluster set, and the final cluster set is output as an image data clustering result, including the following steps:

[0070] Step S501, obtaining the largest local micro-cluster MLMC in the local micro-cluster set, wherein the largest local micro-cluster MLMC is the local micro-cluster with the largest number of samples in the local micro-cluster set;

[0071] Step S502: Based on the merging relationship between local micro-clusters, a breadth-first search algorithm is used to search for all available local micro-clusters that can be merged with the current largest local micro-cluster MLMC;

[0072] Step S503: merge the current largest local micro-cluster MLMC with all available local micro-clusters found to form a new local micro-cluster.

[0073] Step S504: remove the available local micro-cluster from the local micro-cluster set, and update the cluster labels of all samples in the new local micro-cluster;

[0074] Step S505, repeating steps S501-504 until the local micro-cluster set is empty, and then stopping iteration;

[0075] Step S506: Obtain a final cluster set including a number of new local micro-clusters, and output the final cluster set as an image data clustering result.

[0076] Preferably, the merging relationship between local micro-clusters in step S502 includes direct merging, indirect merging and connected merging.

[0077] On the other hand, an embodiment of the present invention further provides an image data clustering system based on a gravity model, the system comprising:

[0078] Data denoising unit: used to obtain an adaptive neighbor set of each sample in the image data set D to be clustered, and denoise the data set D in combination with the distribution characteristics of the data set D;

[0079] A first merging unit: used for merging samples with the same initial cluster label in the data set D by using a gravitational model to form an initial cluster set;

[0080] Data reconstruction unit: used to construct a new data set Dc using all the convergence points in the current initial cluster set as samples;

[0081] A second merging unit: used for merging samples with the same local micro-cluster label in the data set Dc by using a gravity model to form a local micro-cluster set;

[0082] Iterative output unit: used for iteratively merging all local micro-clusters in the local micro-cluster set to obtain a final cluster set, and outputting the final cluster set as the image data clustering result.

[0083] Compared with the prior art, the present invention has the following beneficial effects:

[0084] The present invention dynamically obtains an adaptive denoising threshold by combining adaptive neighbor technology and data distribution characteristics, which is used for denoising of data sets before clustering. Compared with traditional denoising technology, it can more accurately identify and remove noise, thereby avoiding the interference of noise points on the final clustering results. In addition, the present invention introduces an image data clustering method based on gravity model and micro-cluster merging technology to automatically group unlabeled image data. This automated clustering method not only improves the efficiency of clustering, but also accurately identifies local micro-clusters that can be merged by evaluating the gravity parameter strength between samples. In the clustering process, the present invention maintains the shape of the cluster, which is particularly suitable for processing image data with complex shapes and large density differences, thereby constructing more accurate clustering results. Finally, the clustering structure is gradually simplified through iterative merging, the computational complexity is reduced, and the high stability of the clustering results is maintained. The automated clustering process reduces human intervention and reduces the fluctuation of clustering performance caused by improper parameter selection. In summary, the technical solution proposed by the present invention has significant improvements in clustering accuracy, efficiency and stability compared with the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0085] Figure 1 A flowchart of the steps of an image clustering method based on a gravity model provided by the present invention;

[0086] Figure 2 A schematic diagram of an example face dataset olivetti faces provided by the present invention;

[0087] Figure 3 A schematic diagram of a convergence point X provided by the present invention;

[0088] Figure 4 A schematic diagram of the distribution results of local microclusters in a data set provided by the present invention;

[0089] Figure 5 A structural schematic diagram of an image clustering system based on a gravity model provided by the present invention. DETAILED DESCRIPTION

[0090] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0091] In the related art, especially in the field of face recognition, cluster analysis can manage and classify a large number of face images generated by image devices, reduce manual intervention and improve management efficiency. However, the inventors found that the existing cluster analysis method cannot remove the noise interference in the clustering process, resulting in inaccurate clustering results, poor clustering performance when processing data sets with complex shapes and large density differences, and slow execution of the denoising process and clustering process due to the large amount of data.

[0092] In order to solve the above technical problems, the present disclosure provides an image clustering method and system based on a gravity model.

[0093] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0094] like Figure 1 As shown, the embodiment of the present invention provides an image clustering method and system based on a gravity model, comprising the following steps:

[0095] Step S100, obtain the adaptive neighbor set of each sample in the image data set D to be clustered, and denoise the data set D in combination with the distribution characteristics of the data set D; Step S200, use the gravity model to merge the samples with the same initial cluster label in the data set D to form an initial cluster set; Step S300, use all convergence points in the current initial cluster set as samples to construct a new data set Dc; Step S400, use the gravity model to merge the samples with the same local micro-cluster label in the data set Dc to form a local micro-cluster set; Step S500, iteratively merge all local micro-clusters in the local micro-cluster set to obtain the final cluster set, and output it as the image data clustering result. By using the adaptive neighbor technology, the noise recognition is made more accurate. In the clustering process, the gravity model is used to maintain the cluster shape, and the cluster structure is optimized by merging local micro-clusters to enhance the hierarchy and details of the clustering. Finally, the present application uses acceleration technology to accelerate the clustering process in the clustering process, which can provide high-quality clustering results while maintaining high efficiency.

[0096] In a specific embodiment, reference Figure 2 , Figure 2 A schematic diagram of the example face dataset olivettifaces provided by the present invention. We used the example face dataset olivetti faces, which contains 400 facial expression pictures of 40 different individuals, and each row shows 10 different expressions of two people. First, we converted these pictures into a pixel matrix of size 400×10304 to facilitate subsequent processing. In view of the very high dimensionality of this type of data, we used the principal component analysis (PCA) algorithm to perform dimensionality reduction. Through PCA, we converted the 400 pictures into a reduced-dimensional matrix D of size 400×200. In this reduced-dimensional matrix, each row represents an expression picture, which effectively reduces the dimensionality of the data while retaining key information, laying the foundation for subsequent clustering analysis.

[0097] Through step S100, an adaptive neighbor set of each sample in the image data set D to be clustered is obtained.

[0098] In this case, step S100 may specifically include the following steps: step S101, transmitting the image data set D to be clustered to the GPGPU acceleration platform to calculate the Euclidean distance between each pair of samples in the data set D to obtain a distance matrix; step S102, using the acceleration technology to sort the distance matrix in ascending order; step S103, identifying the λth nearest neighbor of each sample according to the sorted distance matrix, where λ is a positive integer with an initial value of 1; step S104, constructing an adaptive neighbor set of the corresponding sample based on the identified λth nearest neighbor sample, and updating the inverse neighbor set of the corresponding sample; step S105, judging whether the inverse neighbor set of the corresponding sample is empty after each iteration, or whether the number of samples whose inverse neighbor set is empty changes between two adjacent iterations; if the inverse neighbor set of a sample is empty, or the number of samples whose inverse neighbor set is empty changes, then increment λ and continue iteration; if the inverse neighbor sets of all samples are not empty, or the number of samples whose inverse neighbor set is empty does not change, then exit iteration to obtain an adaptive neighbor set of each sample.

[0099] In this embodiment, we construct an adaptive neighbor set of samples by weakening the constraints of natural neighbors. In the traditional definition of natural neighbors, two samples must be regarded as neighbors of each other in order to exist in each other's natural neighbor sets at the same time. In contrast, the adaptive neighbor set is more flexible, which allows one sample to unilaterally regard another sample as its neighbor during the iteration process without the other party also regarding it as a neighbor. This one-way neighbor relationship makes the adaptive neighbor set more dynamic and adaptable. At the same time, the inverse neighbor set of the sample refers to all the corresponding samples that select sample x as its neighbor during the adaptive neighbor construction process.

[0100] As described in step S101, the image data set D to be clustered is transferred to the GPGPU acceleration platform to calculate the Euclidean distance between each pair of samples in the data set D to obtain a distance matrix. In the specific implementation process, first, we transfer the entire image data set D from the host memory to the memory of the GPGPU acceleration platform, and then write a kernel function that is specifically used to calculate the Euclidean distance between two samples. In order to execute kernel functions in parallel on GPGPU, it is necessary to reasonably configure thread grids and thread blocks; wherein, the thread grid sets the overall structure of parallel execution, and the thread block is the basic unit that constitutes the grid, and each thread block contains a certain number of threads, which can work in parallel. Once the kernel function and thread configuration are completed, these kernel functions can be executed in parallel on the GPGPU to calculate the Euclidean distance between all pairs of samples in the data set D. After the calculation is completed, the distance matrix is ​​transferred from the GPGPU memory back to the host memory.

[0101] Furthermore, the obtained distance matrix can be sorted from small to large using acceleration technologies such as GPGPU image processor or KD-tree algorithm, so as to facilitate identification of the λth nearest neighbor of each sample, where λ is a positive integer with an initial value of 1; and then through step S104, based on the identified λth nearest neighbor, an adaptive neighbor set can be constructed for each sample, and at the same time, the inverse neighbor set of the corresponding sample is also updated, so as to accelerate the key computing tasks in the clustering process and improve the efficiency and performance of the algorithm.

[0102] In step S105, we need to determine whether to continue iteration or exit iteration according to the following conditions:

[0103] Determine whether the inverse neighbor set of the corresponding sample is empty after each iteration, or whether the number of samples with empty inverse neighbor sets changes between two consecutive iterations; if the inverse neighbor set of a sample is empty, it indicates that these samples are not regarded as neighbors by any other sample under the current λ value; or the number of samples with empty inverse neighbor sets changes. If this number changes, that is, the inverse neighbor set of a new sample becomes empty, or the originally empty inverse neighbor set now has samples added, then it is necessary to adjust the λ value to continue to build the neighbor relationship, that is, to increase λ and continue to iterate; if the inverse neighbor sets of all samples are not empty, or the number of samples with empty inverse neighbor sets does not change, then the current λ value can ensure that each sample has at least one neighbor, then exit the iteration, and obtain the adaptive neighbor set of each sample, and the adaptive neighbor set of each sample has stabilized.

[0104] Further, in step S100, the data set D is denoised by the following steps: step S110, according to the adaptive neighbor set of each sample, the distance sum between samples is calculated; step S120, according to the distance sum between samples, the adaptive unit density of each sample is calculated; step S130, based on the distribution characteristics of the data set D and the adaptive unit density of the sample, the adaptive denoising threshold of each sample is calculated; step S140, the sample whose adaptive unit density value is greater than or equal to the adaptive denoising threshold is identified as noise, and removed from the data set D, to obtain the denoised data set D. Thus, by combining the adaptive neighbor technology and the adaptive unit density of the sample, and then obtaining the adaptive denoising threshold of the sample based on the distribution characteristics of the data set itself, the noise identification is more accurate, the accuracy and efficiency of denoising are improved, and the important characteristics of the data are retained at the same time.

[0105] Furthermore, in step S110, the sum of the distances between samples is calculated by the following formula:

[0106]

[0107] In the formula, SoD(x) represents the sum of the distances from each sample in the adaptive neighbor set of sample x to sample x, d xy represents the Euclidean distance between sample x and sample y, and AdN(x) represents the adaptive neighbor set of sample x.

[0108] Furthermore, in step S120, the adaptive unit density of each sample is calculated by the following formula:

[0109]

[0110] Where AUD(x) represents the adaptive unit density of sample x, SoD(x) represents the sum of the distances from each sample in the adaptive neighbor set of sample x to sample x, and |AdN(x)| represents the number of samples in the adaptive neighbor set of sample x.

[0111] Furthermore, in step S130, the adaptive denoising threshold of each sample is calculated by the following calculation formula:

[0112] ADT=MIN(AUD)+EX(AUD)+ω*(STD(AUD)-MAX(AUD));

[0113] Wherein, ADT represents the adaptive denoising threshold of all samples, MIN(AUD) represents the minimum value of the adaptive unit density of all samples, EX(AUD) represents the expectation of the adaptive unit density of all samples, STD(AUD) represents the standard deviation of the adaptive unit density of all samples, MAX(AUD) represents the maximum value of the adaptive unit density of all samples, ω represents the weight and the value of ω is determined according to the specific situation.

[0114] In this embodiment, we use a statistical method to determine the adaptive denoising threshold ADT based on the distribution characteristics of the data set. This method allows the value of ADT to be dynamically adjusted not only within the fluctuation range defined by the standard deviation of the adaptive unit density AUD value, but also fluctuates around the baseline set by the expected value of the AUD value. In addition, the method also comprehensively considers the influence of the maximum and minimum values ​​of the AUD value to ensure that the calculation of the threshold is more comprehensive and accurate. Through this comprehensive consideration, the adaptive denoising threshold ADT can respond more sensitively to local changes in the data set while maintaining adaptability to the overall data distribution. It can capture subtle differences in the data, thereby more effectively distinguishing noise from real signals during the denoising process. Among them, ω is a weight parameter that can be adjusted according to the specific situation, and the threshold is flexibly adjusted according to the characteristics of the data set and the denoising requirements. Through the adaptive denoising technology, not only the robustness of the denoising algorithm is improved, but also the noise is more accurately identified and removed, thereby improving the accuracy of image clustering.

[0115] Furthermore, in step S200, samples with the same initial cluster label in the data set D are merged using the gravitational model to form an initial cluster set, including the following steps: step S201, based on the gravitational model, the gravitational parameters between samples in the data set D are calculated; step S202, according to the gravitational parameters and in combination with the parallel reduction algorithm, the maximum gravitational parameter value of each sample in the data set D, the sample corresponding to the maximum gravitational parameter value of the sample, and the sample set corresponding to the inverse maximum gravitational parameter value of the sample; step S203, using the depth-first search algorithm to find the initial cluster convergence point and assign a new cluster label to it, and back-propagate the cluster label to the sample in the sample set corresponding to the inverse maximum gravitational parameter value of the current convergence point; step S204, samples with the same initial cluster label in the data set D are merged to form an initial cluster set containing several initial clusters ICs; wherein, ICs i ={λ i , CP i ,ICSd i}, ICs i represents the i-th initial cluster, λ i represents the cluster label of the i-th initial cluster, CP i represents the sample corresponding to the convergence point of the i-th initial cluster, ICSd i Represents the sample set in the i-th initial cluster.

[0116] In the above embodiment, the mutual attraction relationship between samples is quantified by using a gravitational model. By accurately calculating the maximum gravitational parameter value between samples, the closeness between samples is effectively identified, thereby significantly reducing errors in the clustering process. It ensures that similar samples can be accurately classified into the same cluster, while those dissimilar samples are wisely assigned to different clusters. In addition, the gravitational model significantly improves the clustering efficiency when processing complex data sets by reducing the number of sample pairs that need to be compared. When faced with data sets with complex relationships between samples, this model can greatly improve the speed and efficiency of clustering by simplifying the comparison process while maintaining the accuracy of the clustering results.

[0117] Furthermore, in step S201, the gravity model adopts the Newton gravity model, and the gravity parameters between samples in the data set D are calculated by the Newton gravity model:

[0118]

[0119] In the formula, represents the gravitational parameter between sample a and sample b in data set D, m a and m b Represent the masses of sample a and sample b respectively, represents the unit vector from sample a to sample b, and G represents the gravitational parameter constant.

[0120] In a specific implementation process, suppose there are two sample features in the data set D, and sample a is (x 1 ,y 1 ), sample b is (x 2 ,y 2 ), then: In this embodiment, for the consideration of computational complexity and performance, the present invention sets the gravitational parameter constant G to 1, and fixes the mass of each sample to unit mass, then the above formula can be simplified to:

[0121]

[0122] Furthermore, in step S202, the relationship between the maximum gravity parameter value of the sample and the corresponding sample is defined as follows:

[0123]

[0124] Where, MGS a Indicates the sample with the maximum gravitational parameter value of sample a; sample b is the sample in data set D that has the gravitational parameter value between it and sample a. The largest sample, and b is not equal to a;

[0125] The relationship between the inverse maximum gravitational parameter value of the sample and the sample set is defined as follows:

[0126] RMGSs a ={b|b∈D∧MGS b =a};

[0127] In the formula, RMGSs a It indicates the sample set corresponding to the inverse maximum gravitational parameter value of sample a; sample b is the sample corresponding to the maximum gravitational parameter value of sample a in data set D. It should be noted that if sample a is considered by sample b as the sample corresponding to its maximum gravitational parameter value, then sample b is included in the sample set of the inverse maximum gravitational parameter value of sample a.

[0128] Further, in step S203, the method of searching the initial cluster convergence point by the depth-first search algorithm and assigning a new cluster label to it, and back-propagating the cluster label to the samples in the sample set corresponding to the inverse maximum gravitational parameter value of the current convergence point, includes the following specific steps:

[0129] like Figure 3 As shown, Figure 3 This is a schematic diagram of the convergence point X provided by the present invention.

[0130] Step S2031, identify samples in the data set D that have not been assigned initial cluster labels, and construct a directed graph G with the nodes corresponding to the samples; Step S2032, traverse the directed graph G using a depth-first search algorithm, and mark the nodes that complete the cycle for the first time as convergence points CP; Step S2033, assign a new cluster label to the current convergence point CP, and back-propagate the cluster label to the samples in the sample set corresponding to the inverse maximum gravity parameter value of the current convergence point CP;

[0131] Among them, the definition of the convergence point CP is as follows:

[0132] CP={x|x∈V(P ab )∧P ab =P ax +P xb ∧V(P ab )∈D∧x∈D};

[0133] Where P ab Represents a path from node a to node b in a directed graph G, V(P ab ) represents the set of all nodes on the path; P ax represents a path from node a to node x in the directed graph G; P xb Represents a path from node x to node b in the directed graph G.

[0134] Therefore, the embodiment of the present invention forms initial clusters based on the depth-first search algorithm DFS by identifying convergence points and assigning cluster labels. First, each sample in the data set D is regarded as a node, and a directed edge is established between each sample and the sample corresponding to its maximum gravitational parameter value (MGS), and a directed graph G is constructed. Starting from the node that has not been visited, the DFS algorithm is used to traverse. When a node that has been visited is encountered during the traversal process, this node is the convergence point CP. See Figure 3 , the convergence point CP means that in the directed graph G, the path from node a to node b can be decomposed into two paths from a to x and from b to x, where x is the convergence point. Then, a new cluster label is assigned to each identified convergence point, and this label is back-propagated to the samples in the sample set RMGSs corresponding to the inverse maximum gravitational parameter value of the convergence point, so as to ensure that the samples with the closest relationship to the convergence point gravitational parameter are classified into the same cluster. Samples with the same initial cluster label are merged to form several initial clusters ICs, each of which consists of a cluster label, the samples corresponding to the convergence point of the initial cluster, and the sample set belonging to the cluster.

[0135] Furthermore, in step S400, the samples with the same local micro-cluster label in the data set Dc are merged using the gravity model to form a local micro-cluster set, which includes the following specific steps:

[0136] Step S401, based on the gravity model, calculate the gravity parameters between samples in the data set Dc; step S402, calculate the maximum gravity parameter value of each sample in the data set Dc, the sample corresponding to the maximum gravity parameter value of the sample, and the sample set corresponding to the inverse maximum gravity parameter value of the sample according to the gravity parameter and the parallel reduction algorithm. Among them, the template in step S401 and step S402 repeats the specific implementation content of step S201 and step S202 for all samples in the data set DC to obtain the maximum gravity parameter value of each sample in the data set DC, the sample index corresponding to the maximum gravity parameter value, and the sample index set of the inverse maximum gravity parameter value. The specific implementation process is not repeated here.

[0137] Step S403, search for the convergence points of all samples in the data set Dc by a depth-first search algorithm to form a convergence cluster and assign a cluster label to it; Step S404, back-propagate the cluster label of the convergence cluster to the samples in the sample set corresponding to the inverse maximum gravity parameter value of the current convergence point in the data set Dc; Step S405, merge the samples with the same convergence cluster label in the data set Dc to form a local micro-cluster set containing several local micro-clusters LMCs; Step S406, update the initial cluster labels of the samples in all initial cluster sets in the local micro-clusters LMCs to the cluster label of the current local micro-cluster; wherein, LMCs i ={ξ i ,LMCSd i}, LMCs i represents the i-th local micro-cluster, ξ i represents the cluster label of the i-th local micro-cluster, LMCSd i represents the sample set in the i-th local micro-cluster.

[0138] like Figure 4 As shown, Figure 4 This is a schematic diagram of the distribution results of local microclusters in a data set provided by the present invention, wherein different colors represent different local microclusters.

[0139] Specifically, the depth-first search DFS algorithm is used to perform a deep traversal starting from the samples that have not been traversed to find the convergence point of the convergence point, that is, the convergence cluster, wherein if the convergence point in an initial cluster is also the convergence point of the convergence point in other initial clusters, then the initial cluster is regarded as a convergence cluster. The initial clusters with the same local micro-cluster cluster label are merged to form a local micro-cluster, and then the initial cluster labels of all samples in the local micro-cluster are uniformly updated to the cluster label of the current local micro-cluster, effectively identifying the clustering structure in the data set, and forming convergence clusters and local micro-clusters.

[0140] Further, in step S500, all local micro-clusters in the local micro-cluster set are iteratively merged to obtain a final cluster set, and the final cluster set is output as an image data clustering result, including the following steps:

[0141] Step S501 : obtaining the largest local micro-cluster MLMC in the local micro-cluster set, wherein the largest local micro-cluster MLMC is the local micro-cluster with the largest number of samples in the local micro-cluster set.

[0142] Step S502: Based on the merging relationship between local micro-clusters, a breadth-first search algorithm is used to search for all available local micro-clusters that can be merged with the current largest local micro-cluster MLMC; the merging relationship between local micro-clusters includes direct merging, indirect merging and connected merging. Specifically,

[0143] First, the direct merging relationship means that if the local micro-cluster attraction parameter between two local micro-clusters is greater than the merging threshold MT, then the two local micro-clusters will be directly merged;

[0144] The calculation formula of the local micro-cluster attraction parameter FLMC is:

[0145]

[0146] Where LMCs i represents the i-th local microcluster, LMCs j represents the jth local micro-cluster, represents the gravitational parameter between sample a and sample b;

[0147] The calculation formula of the merge threshold MT is:

[0148] MT=EX{MFLMC i};

[0149] Where MT represents the average value of the maximum attraction parameter among all local microclusters, MFLMC i Represents the maximum value of the local micro-cluster attraction parameter between the local micro-cluster and other local micro-clusters.

[0150] Secondly, the indirect merging relationship means that two local microclusters are connected in a chain manner through a series of intermediate microclusters, and if the attraction parameter of each pair of adjacent microclusters exceeds the merging threshold MT, then the two microclusters can be merged indirectly;

[0151] For example: for local microclusters LMCs i and LMCs j , assuming that there exists a sequence of local microclusters LMCs 1 , LMCs 2 , ..., LMCs k , where LMCs1 =LMCs i , LMCs k =LMCs j , and LMCs i and LMCs j can be directly merged, then LMCs i and LMCs j Can be merged indirectly.

[0152] Thirdly, the connected-merge relationship means that a local microcluster can eventually merge with another local microcluster through an indirectly merged microcluster chain, and then these two local microclusters can be connected and merged;

[0153] For example: if local microclusters LMCs i and LMCs j Can be indirectly merged, LMCs j and LMCs k It can also be merged indirectly, then local microclusters LMCs i and LMCs k Can be connected and merged.

[0154] Step S503: merge the current largest local microcluster MLMC with all available local microclusters found to form a new local microcluster; wherein the available local microclusters are all local microclusters found by the breadth-first search algorithm that can be directly, indirectly or continuously merged with the current largest local microcluster MLMC.

[0155] Step S504: remove the available local micro-cluster from the local micro-cluster set, and update the cluster labels of all samples in the new local micro-cluster;

[0156] Step S505, repeating steps S501-504 until the local micro-cluster set is empty, and then stopping iteration; Step S506, obtaining a final cluster set including several new local micro-clusters, and outputting the final cluster set as the image data clustering result.

[0157] The clustering method based on iterative merging of micro-clusters proposed in the present invention effectively identifies and constructs the clustering structure in the data set by accurately measuring the gravitational parameter relationship between samples. When specifically applied to the clustering of face image data, the present invention adopts a micro-cluster merging technology based on a gravitational model, which can maintain the shape characteristics of the cluster during the clustering process and can effectively process image data with complex shapes and large density differences.

[0158] like Figure 5 As shown, an embodiment of the present invention further provides an image data clustering system based on a gravity model, the system comprising:

[0159] Data denoising unit: used to obtain an adaptive neighbor set of each sample in the image data set D to be clustered, and denoise the data set D in combination with the distribution characteristics of the data set D;

[0160] A first merging unit: used for merging samples with the same initial cluster label in the data set D by using a gravitational model to form an initial cluster set;

[0161] Data reconstruction unit: used to construct a new data set Dc using all the convergence points in the current initial cluster set as samples;

[0162] A second merging unit: used for merging samples with the same local micro-cluster label in the data set Dc by using a gravity model to form a local micro-cluster set;

[0163] Iterative output unit: used for iteratively merging all local micro-clusters in the local micro-cluster set to obtain a final cluster set, and outputting the final cluster set as the image data clustering result.

[0164] The present invention identifies local microclusters that can be merged by dynamically evaluating the strength of gravitational parameters between samples, thereby gradually building a more accurate clustering result while maintaining the integrity of facial features. This method not only improves the accuracy of clustering, but also avoids the subjectivity of manually setting the number of clusters, making the clustering process more objective and automated. In addition, the present invention gradually simplifies the clustering structure and reduces the computational complexity through an iterative merging strategy, while maintaining the high stability of the clustering results. This automated clustering process reduces human intervention, reduces the fluctuation of clustering performance caused by improper parameter selection, and improves the reliability of clustering results.

[0165] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution of the present invention, which should be included in the scope of the claims of the present invention.

Claims

1. An image clustering method based on a gravitational model, characterized in that: The steps include: Step S100, obtaining an adaptive neighbor set of each sample in the image data set D to be clustered, and denoising the data set D in combination with the distribution characteristics of the data set D; Step S200: using a gravitational model to merge samples in the data set D with the same initial cluster label to form an initial cluster set; Step S300, using all convergence points in the current initial cluster set as samples to construct a new data set Dc; Step S400: using a gravity model to merge samples with the same local micro-cluster label in the data set Dc to form a local micro-cluster set; Step S500: iteratively merge all local micro-clusters in the local micro-cluster set to obtain a final cluster set, and output the final cluster set as an image data clustering result.

2. The image clustering method based on the gravity model according to claim 1, characterized in that: In step S100, the adaptive neighbor set of each sample in the image data set D to be clustered is obtained by the following steps: Step S101, transmitting the image data set D to be clustered to the GPGPU acceleration platform to calculate the Euclidean distance between each pair of samples in the data set D to obtain a distance matrix; Step S102, using acceleration technology to sort the distance matrix in ascending order; Step S103, identifying the λth nearest neighbor of each sample according to the sorted distance matrix, where λ is a positive integer with an initial value of 1; Step S104: construct an adaptive neighbor set of the corresponding sample based on the identified λth nearest neighbor sample, and update the inverse nearest neighbor set of the corresponding sample; Step S105: determine whether the inverse neighbor set of the corresponding sample is empty after each iteration, or whether the number of samples whose inverse neighbor set is empty changes between two consecutive iterations; If the inverse neighbor set of a sample is empty, or the number of samples whose inverse neighbor set is empty changes, then increase λ and continue iterating; If the inverse neighbor sets of all samples are not empty, or the number of samples whose inverse neighbor sets are empty does not change, the iteration is exited to obtain an adaptive neighbor set for each sample.

3. The image clustering method based on the gravity model according to claim 2, characterized in that: The acceleration technology used in step S102 includes a GPGPU image processor and a KD-tree algorithm.

4. The image clustering method based on gravity model according to claim 1, characterized in that: In step S100, the data set D is denoised by the following steps: Step S110, calculating the sum of distances between samples according to the adaptive neighbor set of each sample; Step S120, calculating the adaptive unit density of each sample according to the sum of the distances between the samples; Step S130, calculating an adaptive denoising threshold for each sample based on the distribution characteristics of the data set D and the adaptive unit density of the sample; Step S140: Identify samples whose adaptive unit density values ​​are greater than or equal to the adaptive denoising threshold as noise, and remove them from the data set D to obtain a denoised data set D.

5. The image clustering method based on the gravity model according to claim 4, characterized in that: In step S110, the distance sum between samples is calculated by the following formula: In the formula, SoD(x) represents the sum of the distances from each sample in the adaptive neighbor set of sample x to sample x, d xy represents the Euclidean distance between sample x and sample y, and AdN(x) represents the adaptive neighbor set of sample x.

6. The image clustering method based on gravity model according to claim 4, characterized in that: In step S120, the adaptive unit density of each sample is calculated by the following formula: Where AUD(x) represents the adaptive unit density of sample x, SoD(x) represents the sum of the distances from each sample in the adaptive neighbor set of sample x to sample x, and |AdN(x)| represents the number of samples in the adaptive neighbor set of sample x.

7. The image clustering method based on gravity model according to claim 4, characterized in that: In step S130, the adaptive denoising threshold of each sample is calculated by the following calculation formula: ADT=MIN(AUD)+EX(AUD)+ω*(STD(AUD)-MAX(AUD)); Wherein, ADT represents the adaptive denoising threshold of all samples, MIN(AUD) represents the minimum value of the adaptive unit density of all samples, EX(AUD) represents the expectation of the adaptive unit density of all samples, STD(AUD) represents the standard deviation of the adaptive unit density of all samples, MAX(AUD) represents the maximum value of the adaptive unit density of all samples, ω represents the weight and the value of ω is determined according to the specific situation.

8. The image clustering method based on gravity model according to claim 1, characterized in that: In step S200, using the gravity model to merge samples with the same initial cluster label in the data set D to form an initial cluster set includes the following steps: Step S201, calculating the gravity parameters between samples in the data set D based on the gravity model; Step S202, calculating the maximum gravity parameter value of each sample in the data set D, the sample corresponding to the maximum gravity parameter value of the sample, and the sample set corresponding to the inverse maximum gravity parameter value of the sample according to the gravity parameter and in combination with the parallel reduction algorithm; Step S203, searching for the initial cluster convergence point through a depth-first search algorithm and assigning a new cluster label to it, and back-propagating the cluster label to the samples in the sample set corresponding to the inverse maximum gravitational parameter value of the current convergence point; Step S204: merge the samples with the same initial cluster label in the data set D to form an initial cluster set including several initial cluster ICs; Among them, ICs i ={λ i , CP i ,ICSd i }, ICs i represents the i-th initial cluster, λ i represents the cluster label of the i-th initial cluster, CP i represents the sample corresponding to the convergence point of the i-th initial cluster, ICSd i Represents the sample set in the i-th initial cluster.

9. The image clustering method based on gravity model according to claim 8, characterized in that: In step S201, the gravity model adopts the Newton gravity model, and the gravity parameters between samples in the data set D are calculated by the Newton gravity model: In the formula, represents the gravitational parameter between sample a and sample b in data set D, m a and m b Represent the masses of sample a and sample b respectively, represents the unit vector from sample a to sample b, and G represents the gravitational parameter constant.

10. The image clustering method based on gravity model according to claim 9, characterized in that: In step S202, the relationship between the maximum gravity parameter value of the sample and the corresponding sample is defined as follows: Where, MGS a Indicates the sample with the maximum gravity parameter value of sample a; sample b is the sample with the largest gravity parameter value between sample a and data set D, and b is not equal to a; The relationship between the inverse maximum gravitational parameter value of the sample and the sample set is defined as follows: RMGSs a ={b|b∈D∧MGS b =a}; In the formula, RMGSs a It represents the sample set corresponding to the inverse maximum gravitational parameter value of sample a; sample b is the sample in data set D that takes sample a as its maximum gravitational parameter value.

11. The image clustering method based on gravity model according to claim 8, characterized in that: In step S203, the process of searching the initial cluster convergence point by the depth-first search algorithm and assigning a new cluster label to the initial cluster convergence point, and back-propagating the cluster label to the samples in the sample set corresponding to the inverse maximum gravitational parameter value of the current convergence point, includes the following specific steps: Step S2031, identifying samples in the data set D that have not yet been assigned initial cluster labels, and constructing a directed graph G with nodes corresponding to the samples; Step S2032: traverse the directed graph G using a depth-first search algorithm, and mark the node where the first traversal completes the cycle as a convergence point CP; Step S2033: assign a new cluster label to the current convergence point CP, and back-propagate the cluster label to the samples in the sample set corresponding to the inverse maximum gravitational parameter value of the current convergence point CP; Among them, the definition of the convergence point CP is as follows: CP={x|x∈V(P ab )∧P ab =P ax +P xb ∧V(P ab )∈D∧x∈D}; Where P ab Represents a path from node a to node b in a directed graph G, V(P ab ) represents the set of all nodes on the path; P ax represents a path from node a to node x in the directed graph G; P xb Represents a path from node x to node b in the directed graph G.

12. The image clustering method based on gravity model according to claim 1, characterized in that: In step S400, samples with the same local micro-cluster label in the data set Dc are merged using the gravity model to form a local micro-cluster set, which includes the following specific steps: Step S401, based on the gravity model, calculate the gravity parameters between samples in the data set Dc; Step S402, calculating the maximum gravity parameter value of each sample in the data set Dc, the sample corresponding to the maximum gravity parameter value of the sample, and the sample set corresponding to the inverse maximum gravity parameter value of the sample according to the gravity parameter and in combination with the parallel reduction algorithm; Step S403, searching for convergence points of all samples in the data set Dc by a depth-first search algorithm to form convergence clusters and assigning cluster labels to them; Step S404, back-propagating the cluster label of the convergent cluster to the samples in the sample set corresponding to the inverse maximum gravitational parameter value of the current convergent point in the data set Dc; Step S405: merge the samples with the same convergent cluster label in the data set Dc to form a local micro-cluster set including several local micro-clusters LMCs; Step S406: Update the initial cluster labels of the samples in all the initial cluster sets in the local micro-cluster LMCs to the cluster labels of the current local micro-cluster LMCs; wherein LMCs i ={ξ i ,LMCSd i }, LMCs i represents the i-th local micro-cluster, ξ i represents the cluster label of the i-th local micro-cluster, LMCSd i represents the sample set in the i-th local micro-cluster.

13. The image clustering method based on gravity model according to claim 1, characterized in that: In step S500, all local micro-clusters in the local micro-cluster set are iteratively merged to obtain a final cluster set, which is output as an image data clustering result, including the following steps: Step S501, obtaining the largest local micro-cluster MLMC in the local micro-cluster set, wherein the largest local micro-cluster MLMC is the local micro-cluster with the largest number of samples in the local micro-cluster set; Step S502: Based on the merging relationship between local micro-clusters, a breadth-first search algorithm is used to search for all available local micro-clusters that can be merged with the current largest local micro-cluster MLMC; Step S503: merge the current largest local micro-cluster MLMC with all available local micro-clusters found to form a new local micro-cluster. Step S504: remove the available local micro-cluster from the local micro-cluster set, and update the cluster labels of all samples in the new local micro-cluster; Step S505, repeating steps S501-504 until the local micro-cluster set is empty, and then stopping iteration; Step S506: Obtain a final cluster set including a number of new local micro-clusters, and output the final cluster set as an image data clustering result.

14. The image clustering method based on gravity model according to claim 13, characterized in that: The merging relationship between local micro-clusters in step S502 includes direct merging, indirect merging and connected merging.

15. An image data clustering system based on a gravity model, characterized in that: The system comprises: Data denoising unit: used to obtain an adaptive neighbor set of each sample in the image data set D to be clustered, and denoise the data set D in combination with the distribution characteristics of the data set D; A first merging unit: used for merging samples with the same initial cluster label in the data set D by using a gravitational model to form an initial cluster set; Data reconstruction unit: used to construct a new data set Dc using all the convergence points in the current initial cluster set as samples; A second merging unit: used for merging samples with the same local micro-cluster label in the data set Dc by using a gravity model to form a local micro-cluster set; Iterative output unit: used for iteratively merging all local micro-clusters in the local micro-cluster set to obtain a final cluster set, and outputting the final cluster set as the image data clustering result.

Citation Information

Cited By

  • Incremental clustering method and system of atmospheric aerosol particle mass spectrum data set, terminal and storage medium

    CN120354154A

  • Self-adaptive clustering method and system for large-scale image classification

    CN122220919A