Search

CN-116246086-B - Image clustering method and device, electronic equipment and storage medium

CN116246086BCN 116246086 BCN116246086 BCN 116246086BCN-116246086-B

Abstract

The disclosure relates to the technical field of artificial intelligence and provides an image clustering method, an image clustering device, electronic equipment and a storage medium. The method comprises the steps of obtaining a plurality of images to be clustered, wherein one image to be clustered is a graph node, extracting node characteristic information of each graph node, constructing a node similarity matrix according to the node characteristic information, calculating distance metric values between each graph node and other graph nodes based on the node similarity matrix, and classifying the images to be clustered in the image data set according to the distance metric values to obtain at least one cluster. The method and the device can effectively relieve the problem of high sparsity or small sample number in the cluster, and have good clustering effect on the cluster with small sample number or high sparsity.

Inventors

  • QI XIAOTING
  • HUANG ZEYUAN
  • YANG ZHANBO
  • JIANG ZHAO

Assignees

  • 北京龙智数科科技服务有限公司

Dates

Publication Date
20260508
Application Date
20230301

Claims (7)

  1. 1. An image clustering method, comprising: Acquiring a plurality of images to be clustered, wherein one image to be clustered is a graph node; extracting node characteristic information of each graph node; constructing a node similarity matrix according to the node characteristic information; Calculating distance metric values between each graph node and other graph nodes based on the node similarity matrix; classifying the images to be clustered in the image data set to be clustered according to the distance metric value to obtain at least one cluster; according to the node characteristic information, constructing a node similarity matrix, which comprises the following steps: updating the node characteristic information of each graph node according to the association relation among the graph nodes to obtain updated node characteristic information of each graph node; constructing a node similarity matrix according to the updated node characteristic information; Updating the node characteristic information of each graph node according to the association relation among the graph nodes to obtain updated node characteristic information of each graph node, wherein the updating comprises the following steps: constructing a sparse symmetrical adjacency matrix according to the association relation among the graph nodes; determining neighbor nodes of each graph node based on the sparse symmetric adjacency matrix; The original node characteristic information of the graph node and the node characteristic information of the neighbor graph node are aggregated, and the updated node characteristic information obtained by aggregation covers the original node characteristic information of the graph node; The calculating the distance metric value between every two graph nodes based on the node similarity matrix comprises the following steps: Determining public neighbor nodes of an ith graph node and a jth graph node, wherein i is a positive integer of 1-N, j is N-i positive integers after i, and N is the total number of all the graph nodes; And calculating a distance metric value between the ith graph node and the jth graph node according to the public neighbor node and the node similarity matrix.
  2. 2. The method of claim 1, wherein constructing a node similarity matrix from the updated node characteristic information comprises: calculating the similarity between the updated node characteristic information of each graph node and the updated node characteristic information of the neighbor graph nodes; and constructing a node similarity matrix according to the similarity.
  3. 3. The method of claim 1, wherein calculating a distance metric between an i-th graph node and a j-th graph node based on the common neighbor node and the node similarity matrix comprises: determining a first similarity between the ith graph node and the public neighbor node based on the node similarity matrix, and a second similarity between the jth graph node and the public neighbor node; and calculating a distance measurement value between the ith graph node and the jth graph node according to the first similarity and the second similarity.
  4. 4. A method according to claim 3, wherein classifying the images to be clustered in the image dataset to be clustered according to the distance metric value, to obtain at least one cluster, comprises: Comparing the distance measurement value between the ith graph node and the jth graph node with a preset measurement threshold value; and classifying the ith graph node and the jth graph node of which the distance measurement values are smaller than a preset measurement threshold into the same category to obtain at least one cluster.
  5. 5. An image clustering device, which is used for implementing the method according to any one of claims 1 to 4, and comprises: the acquisition module is configured to acquire a plurality of images to be clustered, wherein one image to be clustered is a graph node; An extraction module configured to extract node characteristic information of each of the graph nodes; the construction module is configured to construct a node similarity matrix according to the node characteristic information; A calculation module configured to calculate a distance metric value between each graph node and other graph nodes based on the node similarity matrix; and the classifying module is configured to classify the images to be clustered in the image data set to be clustered according to the distance measurement value to obtain at least one cluster.
  6. 6. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 4 when the computer program is executed.
  7. 7. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method according to any one of claims 1 to 4.

Description

Image clustering method and device, electronic equipment and storage medium Technical Field The disclosure relates to the technical field of artificial intelligence, and in particular relates to an image clustering method, an image clustering device, electronic equipment and a storage medium. Background Clustering is a basic and effective tool for processing large-scale unmarked data, and image clustering is a basic task in image analysis, and has wide application in the fields of image recognition, retrieval, management and the like. At present, how to solve the recognition effect of clusters with small sample number or high sparsity becomes a core challenge of the current image clustering algorithm. However, the existing image clustering method is generally poor in recognition effect on clusters with a small number of samples or high sparsity. Disclosure of Invention In view of the above, embodiments of the present disclosure provide an image clustering method, apparatus, electronic device, and storage medium, so as to solve the problem in the prior art that the recognition effect for clusters with a small number of samples or high sparsity is generally poor. In a first aspect of an embodiment of the present disclosure, there is provided an image clustering method, including: Acquiring a plurality of images to be clustered, wherein one image to be clustered is a graph node; extracting node characteristic information of each graph node; constructing a node similarity matrix according to the node characteristic information; Calculating distance metric values between each graph node and other graph nodes based on the node similarity matrix; classifying the images to be clustered in the image data set to be clustered according to the distance metric value to obtain at least one cluster In a second aspect of the embodiments of the present disclosure, there is provided an image clustering apparatus, including: the acquisition module is configured to acquire a plurality of images to be clustered, wherein one image to be clustered is a graph node; An extraction module configured to extract node characteristic information of each of the graph nodes; the construction module is configured to construct a node similarity matrix according to the node characteristic information; A calculation module configured to calculate a distance metric value between each graph node and other graph nodes based on the node similarity matrix; and the classifying module is configured to classify the images to be clustered in the image data set to be clustered according to the distance measurement value to obtain at least one cluster. In a third aspect of the disclosed embodiments, an electronic device is provided, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the above method when executing the computer program. In a fourth aspect of the disclosed embodiments, a computer-readable storage medium is provided, which stores a computer program which, when executed by a processor, implements the steps of the above-described method. Compared with the prior art, the method and the device have the advantages that at least one clustering cluster is obtained by acquiring a plurality of images to be clustered, one image to be clustered is a graph node, node characteristic information of each graph node is extracted, a node similarity matrix is constructed according to the node characteristic information, distance metric values between each graph node and other graph nodes are calculated based on the node similarity matrix, the images to be clustered in the image data set to be clustered are classified according to the distance metric values, the problem that the sparsity in the cluster is high or the number of samples is small is effectively solved, and the clustering effect of the clusters with the small number of samples or the high sparsity is good. Drawings In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings that are required for the embodiments or the description of the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and other drawings may be obtained according to these drawings without inventive effort for a person of ordinary skill in the art. Fig. 1 is a schematic flow chart of an image clustering method provided in an embodiment of the disclosure; fig. 2 is a schematic diagram of a point-edge connection relationship of a graph node in an image clustering method according to an embodiment of the disclosure; FIG. 3 is a schematic diagram of a sparse symmetric adjacency matrix A constructed based on the point-to-edge connection relationship structure of the graph nodes of FIG. 2; FIG. 4 is a schematic diagram of a degree matrix D constructed based on FIGS. 2 and