Processing Method for Image Clustering, Computer Device, and Storage Device

By acquiring and utilizing the centroid spatiotemporal information in image clustering, pairing and assigning the centroids to the constraint group, and clustering is performed based on similarity, the problems of poor clustering effect of single centroids and low efficiency of multicentroids are solved, and more efficient image clustering is achieved.

CN114139008BActive Publication Date: 2025-07-25ZHEJIANG DAHUA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111205564.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-15
Publication Date
2025-07-25
Estimated Expiration
2041-10-15

AI Technical Summary

Technical Problem

In the prior art, the effect is poor when using a single centroid for image clustering, and the multicentroid clustering efficiency is low, resulting in low image clustering efficiency.

Method used

By obtaining the spatiotemporal information of each centroid in the two clusters to be clustered, the centroid pair is paired based on the spatiotemporal information, and allocating it to the corresponding constraint group, and clustering is performed based on the similarity of the constraint group.

Benefits of technology

The effect of image clustering is improved, the number of times of multi-centroid comparison is reduced, and the clustering efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114139008B_ABST
    Figure CN114139008B_ABST
Patent Text Reader

Abstract

The present application discloses a processing method, a computer device, and a storage device for image clustering. The method includes: obtaining the spatio-temporal information of each centroid in two clusters to be clustered, where each cluster to be clustered includes at least one centroid; based on the spatio-temporal information of each centroid, pairing the centroids in the two clusters to be clustered to form centroid pairs, and assigning the centroid pairs to corresponding constraint groups; and performing clustering processing on the two clusters to be clustered based on the similarity of the constraint groups. The above solution can improve the efficiency of image clustering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular, to a method for processing image clustering, a computer device, and a storage device. Background Art

[0002] Clustering algorithms are important unsupervised learning methods and have good applicability in fields such as machine learning, bioinformatics, pattern recognition, and multimedia. For example, clustering of face images plays an important role in the field of intelligent security. Clustering face images can group face images belonging to the same person into the same cluster, achieving the purpose of grouping face images of multiple people by person. However, currently, each cluster can include one or more centroids, and the centroid can be used to represent all face images in the cluster. Clustering face images using a single centroid has poor clustering effects, and using multiple centroids for face image clustering has low clustering efficiency. Summary of the Invention

[0003] The main technical problem to be solved by this application is to provide a method for processing image clustering, a computer device, and a storage device, which can improve the efficiency of image clustering.

[0004] To solve the above problems, in the first aspect of this application, a method for processing image clustering is provided. The method includes: obtaining the spatio-temporal information of each centroid in two clusters to be clustered, where each cluster to be clustered includes at least one of the centroids; based on the spatio-temporal information of each centroid, pairing the centroids in the two clusters to be clustered to form centroid pairs, and assigning the centroid pairs to corresponding constraint groups; and performing clustering processing on the two clusters to be clustered based on the similarity of the constraint groups.

[0005] To solve the above problems, in the second aspect of this application, a computer device is provided. The computer device includes a memory and a processor coupled to each other. Program data is stored in the memory, and the processor is configured to execute the program data to implement any step in the above method for processing image clustering.

[0006] To solve the above problems, in the third aspect of this application, a storage device is provided. The storage device stores program data that can be run by a processor, and the program data is used to implement any step in the above method for processing image clustering.

[0007] In the above solution, by obtaining the spatio-temporal information of each centroid in two clusters to be clustered, where each cluster to be clustered includes at least one centroid; based on the spatio-temporal information of each centroid, pairing the centroids in the two clusters to be clustered to form centroid pairs, and assigning the centroid pairs to corresponding constraint groups; clustering the two clusters to be clustered based on the similarity of the constraint groups. Since the clusters are clustered through the spatio-temporal information of the centroids, the image clustering effect is improved. In addition, each cluster includes at least one centroid, pairing the centroids to form centroid pairs and constraining the centroid pairs, so that the clustering effect can be improved and the number of comparisons of multiple centroids can be reduced, thereby improving the image clustering efficiency. Brief Description of the Drawings

[0008] To more clearly illustrate the technical solutions in the present application, the following will briefly introduce the drawings required in the description of the embodiments. Obviously, the following described drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings. Among them:

[0009] Figure 1 is a schematic flowchart of an embodiment of the method for processing image clustering in the present application;

[0010] Figure 2 is the present application Figure 1 is a schematic flowchart of an embodiment of step S12 in the present application;

[0011] Figure 3 is a schematic example diagram of an embodiment of the cluster of image clustering in the present application;

[0012] Figure 4 is an example diagram of an embodiment of the distance information of locations A, B, and C in the present application;

[0013] Figure 5 is a schematic example diagram of an embodiment of the centroid of the cluster in the present application;

[0014] Figure 6 is the present application Figure 1 is a schematic flowchart of an embodiment of step S13 in the present application;

[0015] Figure 7 is a schematic structural diagram of an embodiment of the processing device for image clustering in the present application;

[0016] Figure 8 is a schematic structural diagram of an embodiment of a computer device in the present application;

[0017] Figure 9 is a schematic structural diagram of an embodiment of a storage device in the present application. Detailed Description of the Embodiments

[0018] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0019] The terms "first" and "second" in the present application are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of such features. In the description of the present application, the meaning of "a plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products or devices.

[0020] Referring to "embodiments" in the present application means that the specific features, structures or characteristics described in connection with the embodiments can be included in at least one embodiment of the present application. The phrase appears in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.

[0021] Clustering is the process of dividing a set of physical or abstract objects into multiple classes composed of similar objects. The clusters generated by clustering are a set of data objects, and these objects are similar to each other within the same cluster and different from the objects in other clusters. The clustering process classifies data into different classes or clusters, so the objects within the same cluster have great similarity, while the objects between different clusters have great dissimilarity. For example, clustering can divide a data set into different clusters according to a certain specific criterion (such as distance or time), so that the similarity of data objects within the same cluster is as large as possible, and at the same time, the difference of data objects not in the same cluster is also as large as possible. That is, after clustering, the data of the same class are gathered together as much as possible, and the data of different classes are separated as much as possible.

[0022] Clustering algorithms can be divided into partition-based methods, density-based methods, hierarchical methods, etc. For example, the clustering algorithm can be k-means clustering algorithm, k-medoids clustering algorithm, BIRCH clustering algorithm, DBSCAN clustering algorithm, etc., and this application does not limit this.

[0023] In some application scenarios, images can be clustered. For example, a large number of accumulated face images can be clustered. By clustering the face images, it is possible to archive the images containing person information by person.

[0024] In the face image clustering method, each cluster usually corresponds to only a single centroid, that is, one cluster corresponds to one centroid, and one centroid represents the entire cluster. However, in the actual process of clustering face images, using a single centroid for image clustering often cannot achieve a good image clustering effect.

[0025] In some embodiments, in the face image clustering method, multiple centroids can be set for each cluster, that is, each cluster can correspond to multiple centroids, so that the cluster can be represented more comprehensively from multiple different perspectives. However, during the clustering process, the number of comparisons between multiple centroids will increase, thus reducing the clustering efficiency of the images.

[0026] To solve the above technical problems, this application provides the following embodiments, and the following is a specific description of each embodiment.

[0027] Please refer to Figure 1 , Figure 1 which is a schematic flowchart of an embodiment of the image clustering processing method of this application. The method may include the following steps:

[0028] S11: Obtain the spatio-temporal information of each centroid in two clusters to be clustered, where each cluster to be clustered includes at least one centroid.

[0029] This application takes clustering face images as an example for illustration. The clustering processing method of this application can also be applied to the clustering processing of other data sets, and this application is not limited thereto.

[0030] Obtain the spatio-temporal information of each centroid in two clusters to be clustered. The spatio-temporal information of each centroid can include time information and space information. Among them, each cluster to be clustered includes at least one centroid. Each cluster can include one centroid, and each centroid can also include multiple centroids. The centroid can be used to represent all face images in the cluster to be clustered.

[0031] In some embodiments, a face image set to be clustered can be obtained. The face image set can be clustered to obtain several clusters to be clustered, and any two clusters can be selected from the several clusters as the two clusters to be clustered obtained. The purpose of clustering face images is to classify face images belonging to the same person into the same cluster, so as to achieve the situation of one person with one file. Among them, a cluster can correspondingly include one centroid, and a cluster can also correspondingly include multiple centroids. The present application does not limit this.

[0032] In some embodiments, a face image set to be clustered can be obtained; the face image set can be divided into multiple face image subsets; each face image subset can be clustered into several clusters to be clustered. Among them, the face image set can be divided into multiple face image subsets according to similar spatio-temporal information. For example, face images with similar shooting times and similar shooting spaces (or locations) can be divided into the same face image subset. Of course, the face image set can also be divided into multiple face image subsets according to similar spatial information, etc.

[0033] In some embodiments, in the application scenario of intelligent video surveillance, a person can be photographed by a surveillance camera, and multiple face images taken can be used as the face image set to be clustered. Each face image in the face image set corresponds to a shooting time and a shooting location. Based on the shooting time and shooting location corresponding to each face image, the time information and space information corresponding to each face image can be obtained, so that the spatio-temporal information of each centroid of the cluster can be obtained through the spatio-temporal information of the face image.

[0034] S12: Based on the spatio-temporal information of each centroid, the centroids in the two clusters to be clustered are paired to form centroid pairs, and the centroid pairs are assigned to the corresponding constraint groups.

[0035] After obtaining the spatio-temporal information of each centroid of the cluster, that is, after obtaining the time information and space information of each centroid, based on the spatio-temporal information of each centroid, for example, the centroids in the two clusters to be clustered are paired to form centroid pairs according to the time information and space information. The two centroids included in a centroid pair can be centroids from different clusters. Thus, each centroid pair is assigned to the corresponding constraint group, where the constraint group can be a constraint group that is constrained based on time information and space information.

[0036] S13: Based on the similarity of the constraint groups, clustering processing is performed on the two clusters to be clustered.

[0037] Obtain the similarity between the centroid pairs in each constraint group, so as to perform clustering processing on the two clusters to be clustered based on the similarity of the constraint groups.

[0038] The similarity between the face image / centroid pairs mentioned in this application is the similarity of the face image / centroid pairs in the feature space, that is, the similarity of the features of the face image / centroid pairs.

[0039] In some embodiments, it is possible to determine whether two clusters are similar according to the judgment result by determining whether the similarity of the constraint group is greater than a preset similarity threshold, so as to perform clustering processing on the two clusters to be clustered. If the similarity of the constraint group is greater than the preset similarity threshold, it is determined that the two clusters are similar, and the two clusters to be clustered can be merged (filed) for processing. Otherwise, the two clusters to be clustered can be retained without merging, or the two clusters to be clustered are respectively executed with the above steps S11 to step S13 with other clusters to further perform clustering processing on the clusters to be clustered.

[0040] In this embodiment, by obtaining the spatio-temporal information of each centroid in the two clusters to be clustered, where each cluster to be clustered includes at least one centroid; based on the spatio-temporal information of each centroid, the centroids in the two clusters to be clustered are paired to form centroid pairs, and the centroid pairs are assigned to the corresponding constraint groups; based on the similarity of the constraint groups, clustering processing is performed on the two clusters to be clustered. Since the clusters are clustered by the spatio-temporal information of the centroids, the image clustering effect is improved. In addition, each cluster includes at least one centroid, the centroids are paired to form centroid pairs, and the centroid pairs are constrained, so that the clustering effect can be improved and the number of comparisons of multiple centroids can be reduced, thereby improving the image clustering efficiency.

[0041] In some embodiments, please refer to Figure 2 , the above step S12, based on the spatio-temporal information of each centroid, pairing the centroids in the two clusters to be clustered to form centroid pairs, and assigning the centroid pairs to the corresponding constraint groups, may further include the following steps:

[0042] S121: Based on the spatio-temporal constraint level, set multiple constraint groups of spatio-temporal constraints, and set the weight of each constraint group.

[0043] After obtaining the spatio-temporal information of each centroid in the two clusters to be clustered, multiple constraint groups of spatio-temporal constraints can be set based on the spatio-temporal constraint level, where the spatio-temporal constraint level can perform different levels of constraints on the spatio-temporal information.

[0044] The spatio-temporal information of each centroid includes time information and space information. To better constrain the time information and space information, the spatio-temporal constraint level includes a time constraint level and a space constraint level. Thus, the time information and space information can be constrained separately. The time constraint level can be determined according to the distribution of the time information of the face image set or all clusters. For example, the time constraint can be divided into 3 levels, 4 levels, and so on. The space constraint level can be determined according to the distribution of the space information of the face image set or all clusters. For example, the space constraint can be divided into 3 levels, 4 levels, and so on. The present application does not limit this.

[0045] After setting multiple constraint groups of spatio-temporal constraints, set the weight of each constraint group. Among them, the constraint group includes a constraint group with a non-zero weight and a constraint group with a weight of 0, and the sum of the weights of all constraint groups is 1. And the weight of the constraint group with a higher spatio-temporal constraint level is greater than the weight of the constraint group with a lower spatio-temporal constraint level. The weight of the constraint group of the present application can be set according to the data specifically processed by clustering. The present application does not limit this.

[0046] As an example, please refer to Figure 3 , face images taken in multiple places can be obtained to form a face image set 20, and the face image set 20 is clustered. In combination with Figure 3 for illustration, clustering the face image set 20 results in three clusters, that is, the face image set 20 is divided into cluster 1 (21), cluster 2 (22), and cluster 3 (23), and each cluster includes multiple face images.

[0047] Cluster 1 (21) includes 4 centroids, namely centroid 1 (211), centroid 2 (212), centroid 3 (213), and centroid 4 (214), and these 4 centroids can represent cluster 1 (21).

[0048] Cluster 2 (22) includes 2 centroids, namely centroid 5 (221) and centroid 6 (222), and these 2 centroids can represent cluster 2 (22).

[0049] Cluster 3 (23) includes 2 centroids, namely centroid 7 (231) and centroid 8 (232), and these 2 centroids can represent cluster 3 (23).

[0050] Please refer to Figure 4 , Figure 4It is an example diagram of an embodiment of the distance information of Location A, Location B, and Location C in this application. If face images of a person are taken at Location A, Location B, and Location C respectively to obtain face image sets of the three locations. Among them, the distance between Location A and Location B is 1200 meters, the distance between Location A and Location C is 200 meters, and the distance between Location B and Location C is 1000 meters. The spatial information of the face images obtained at Location A can be Location A, the spatial information of the face images obtained at Location B can be Location B, and the spatial information of the face images obtained at Location C can be Location C.

[0051] Cluster the face image sets obtained at Location A, Location B, and Location C to obtain at least two clusters to be clustered. Please refer to Figure 5 , for example, divide the face image set into Cluster 1 (31) and Cluster 2 (32). Cluster 1 (31) can contain 4 centroids, and the 4 centroids can be Centroid 1, Centroid 2, Centroid 3, and Centroid 4. The centroid can be a face image in Cluster 1 (31), and Centroid 1, Centroid 2, Centroid 3, or Centroid 4 can be used to represent all the face images in Cluster 1 (31). Cluster 2 (32) can contain 2 centroids, and the 2 centroids can be Centroid 5 and Centroid 6, and Centroid 5 or Centroid 6 can be used to represent all the face images in Cluster 2 (32).

[0052] In some embodiments, the time information corresponding to each centroid can be the time information corresponding to the face image, or the shooting time of the face image can be divided according to a preset time interval to convert the time information corresponding to each face image. For example, taking 1 hour as the time interval, the shooting time from 0 o'clock to 24 o'clock can be converted at intervals of 1 hour. For example, the time information converted for the shooting time from 8 o'clock to 9 o'clock is 9, and the time information converted for the shooting time from 9 o'clock to 10 o'clock is 10, and so on. Of course, this application can also set the time information corresponding to each face image using other preset time intervals, or directly use the shooting time of the face image as the time information, and this application does not limit this.

[0053] In some embodiments, each centroid in the cluster can be represented, that is, the cluster information, time information, and spatial information of the centroid can be expressed. Its representation form can be: {cluster identifier [centroid serial number, spatial information, time information]}. Of course, other representation forms can also be used to represent the information of the centroid of the cluster.

[0054] Continue to refer to Figure 4, each centroid in cluster 1 (31) can be represented. Centroid 1 (311) can be represented as: {class 1 [1, A, 8]}, centroid 2 (312) can be represented as: {class 1 [2, C, 9]}, centroid 3 (313) can be represented as: {class 1 [3, B, 9]}, and centroid 4 (314) can be represented as: {class 1 [4, C, 22]}. Similarly, for each centroid in cluster 2 (32), centroid 5 (321) can be represented as: {class 2 [1, A, 7]}, and centroid 6 (322) can be represented as: {class 2 [2, B, 9]}.

[0055] If the distinction between the time information and space information of the centroids in the cluster is not considered, in order to measure whether cluster 1 (31) and cluster 2 are similar, the centroids of cluster 1 (31) and cluster 2 (32) need to be compared pairwise. At this time, cluster 1 (31) contains 4 centroids and cluster 2 (32) contains 2 centroids, and 8 comparisons are required. In order to reduce the number of comparisons of the centroids of cluster 1 (31) and cluster 2 (32), multiple constraint groups of spatio-temporal constraints can be set based on the spatio-temporal constraint level, where the spatio-temporal constraint level includes a time constraint level and a space constraint level.

[0056] As an example of an implementation method, the centroids are grouped according to the time constraint level and the space constraint level. The time constraint level can include a first time constraint, a second time constraint, and a third time constraint. The first time constraint can be that the time information differs by 0 or is equal, that is, the time information of the centroids is the same, indicating that the time of the centroids is the closest. The second time constraint can be that the time information differs by less than or equal to 2 hours, that is, it indicates that the time of the centroids is close. The third time constraint can be that the time information differs by more than 2 hours, that is, it indicates that the time of the centroids is not close. Among them, the levels of the first time constraint, the second time constraint, and the third time constraint decrease in turn.

[0057] The space constraint level can include a first space constraint, a second space constraint, and a third space constraint. The first space constraint can be that the distance of the space information is 0 or the same, that is, it indicates that the distance of the centroids is the closest. The second space constraint can be that the distance of the space information is less than or equal to 500 meters, that is, it indicates that the distance of the centroids is close. The third space constraint can be that the distance of the space information is greater than 500 meters, that is, it indicates that the distance of the centroids is not close. Among them, the levels of the first space constraint, the second space constraint, and the third space constraint decrease in turn.

[0058] Based on the spatio-temporal constraint level, multiple constraint groups of spatio-temporal constraints are set, and the weight of each constraint group is set. The constraint groups and the weight of each of its constraint groups can be represented by the following table:

[0059] Table 1 Weight table of constraint groups

[0060]

[0061] In the above Table 1, a to i represent constraint groups that set multiple spatio-temporal constraints based on the spatio-temporal constraint level. The constraint group a is set based on the first constraint time and the first spatial constraint, and the weight of the constraint group a is 0.25. Similarly, other constraint groups and their weights are set. In addition, the weight of the constraint group with a higher spatio-temporal constraint level is greater than the weight of the constraint group with a lower spatio-temporal constraint level. For example, the weight corresponding to the constraint group a is greater than the weights corresponding to the constraint group b or the constraint group d.

[0062] In this step, different weights are set for the constraint groups corresponding to each spatio-temporal information, so that different weights of different sizes can be set for different constraint groups according to the importance of the constraint groups. The weight of the constraint group with a higher spatio-temporal constraint level is greater than the weight of the constraint group with a lower spatio-temporal constraint level, meeting the importance of the similarity comparison of the centroids with similar time information and spatial information.

[0063] S122: Pair the centroids in the two clusters to be clustered to form centroid pairs.

[0064] Based on the spatio-temporal constraint level, the centroids in the two clusters to be clustered can be paired to form centroid pairs, that is, any centroids from different clusters can be paired to form centroid pairs.

[0065] As an example, the 4 centroids of the above-mentioned cluster 1 and the 2 centroids of cluster 2 can be paired to form centroid pairs. The centroids of cluster 1 and cluster 2 can be paired to form centroid pairs according to the time constraint level and / or the spatial constraint level.

[0066] S123: Based on the spatio-temporal information of the centroids in the centroid pair, assign the centroid pair to the corresponding constraint group.

[0067] Based on the spatio-temporal information of the centroids in the centroid pair, according to the time constraint level and the spatial constraint level, assign the centroid pair to the corresponding constraint group.

[0068] In some embodiments, based on the time information and / or the spatial information of the centroids in the centroid pair, the spatio-temporal constraint level corresponding to the centroid pair can be determined, that is, the time constraint level and / or the spatial constraint level corresponding to the centroid pair can be determined, so as to assign the centroid pair to the corresponding constraint group according to the time constraint level and the spatial constraint level.

[0069] As an example, the centroids of the above-mentioned cluster 1 and cluster 2 are paired to form centroid pairs and assigned to the corresponding constraint groups. Based on the spatio-temporal information of the centroids in the centroid pair, the spatio-temporal constraint level corresponding to the centroid pair can be determined, that is, the time constraint level and / or the spatial constraint level corresponding to the centroid pair can be determined, so as to assign the centroid pairs formed by the centroids of cluster 1 and cluster 2 to the corresponding constraint groups according to the time constraint level and the spatial constraint level.

[0070] Among them, the centroid pairs of the constraint group and each of its constraint groups can be represented by the following table:

[0071] Table 2 Constraint Group Table of Centroids

[0072]

[0073] In the above Table 2, the centroid pairs included in constraint group a are centroid 3 {class 1 [3, B, 9]} and centroid 6 {class 2 [2, B, 9]}.

[0074] The centroid pairs included in constraint group c are centroid 1 {class 1 [1, A, 8]} and centroid 6 {class 2 [2, B, 9]}.

[0075] The centroid pairs included in constraint group d are centroid 1 {class 1 [1, A, 8]} and centroid 5 {class 2 [1, A, 7]}.

[0076] The centroid pairs included in constraint group e are centroid 2 {class 1 [2, C, 9]} and centroid 5 {class 2 [1, A, 7]}.

[0077] The centroid pairs included in constraint group f are centroid 2 {class 1 [2, C, 9]} and centroid 6 {class 2 [2, B, 9]}.

[0078] The centroid pairs included in constraint group h are centroid 4 {class 1 [4, C, 22]} and centroid 5 {class 2 [1, A, 7]}.

[0079] The centroid pairs included in constraint group i are centroid 3 {class 1 [3, B, 9]} and centroid 5 {class 2 [1, A, 7]}, centroid 4 {class 1 [4, C, 22]} and centroid 6 {class 2 [2, B, 9]}.

[0080] In addition, in the examples of the above cluster 1 and cluster 2, the above constraint groups b and g do not contain centroid pairs, that is, no centroid pairs are assigned to constraint groups b and g.

[0081] In this embodiment, when the cluster includes multiple centroids, the time constraint level and the space constraint level are constrained according to the time information and space information of the centroids. Considering the situation of the centroids in time and space and assigning the centroid pairs to the corresponding constraint groups can improve the final clustering effect of the image, reduce the comparison times of multiple centroids between clusters, and improve the clustering efficiency of the image.

[0082] In some embodiments, referring to Figure 6 , the above step S13, performing clustering processing on the two clusters to be clustered based on the similarity of the constraint groups, may further include the following steps:

[0083] S131: Obtain the similarity of the centroid pairs in a partial constraint group as the similarity of the corresponding constraint group.

[0084] The similarity between the centroid pairs in the constraint group can be obtained, and the similarity of the centroid pairs can be used as the similarity of the corresponding constraint group. Among them, the similarity of the centroid pairs in a constraint group can be used as the similarity of the constraint group.

[0085] In some embodiments, the similarity of the centroid pairs in a partial constraint group among all constraint groups can be obtained to obtain the similarity of all constraint groups through the similarity of the centroid pairs in the partial constraint group.

[0086] In some embodiments, the partial constraint groups include constraint groups with non-zero weights, that is, the similarity of the centroid pairs in the constraint groups with non-zero weights can be obtained to obtain the similarity of all constraint groups by taking the similarity of the centroid pairs in the constraint groups with non-zero weights.

[0087] In some embodiments, when the centroid pairs are assigned to the corresponding constraint groups according to the spatio-temporal constraint level based on the spatio-temporal information of the centroids in the centroid pairs, a constraint group may include a pair of centroid pairs, may also include multiple pairs of centroid pairs, and of course, may not include centroid pairs.

[0088] If any constraint group includes a pair of centroid pairs, the similarity of the centroids in the pair of centroid pairs included in the constraint group can be obtained as the similarity of the corresponding constraint group.

[0089] If any constraint group includes multiple pairs of centroid pairs, obtain the similarity of the centroids in each centroid pair, that is, obtain the similarities of multiple pairs of centroid pairs respectively, and obtain the average similarity of the similarities of multiple pairs of centroid pairs as the similarity of the corresponding constraint group.

[0090] If any constraint group does not include centroid pairs, the similarity of the constraint group may not be obtained.

[0091] If the weight corresponding to any constraint group is 0, the similarity of the constraint group may not be obtained.

[0092] S132: Obtain the comprehensive similarity based on the similarity of the constraint group and the weight of the constraint group.

[0093] After obtaining the similarity of the constraint group, the comprehensive similarity can be obtained based on the similarity of the constraint group and the weight of the constraint group. Specifically, the obtained similarity of the constraint group can be multiplied by the similarity of the constraint group, and the products can be summed, and the sum is used as the comprehensive similarity of all constraint groups.

[0094] S133: Perform clustering processing on the two clusters to be clustered based on the comprehensive similarity.

[0095] It is possible to determine whether two clusters are similar through the comprehensive similarity and the judgment result, so as to perform clustering processing on the two clusters to be clustered. If the comprehensive similarity is greater than the preset similarity threshold, it is determined that the two clusters are similar, and the two clusters to be clustered can be merged. Otherwise, the two clusters to be clustered can be retained without merging, or the two clusters to be clustered can be compared with other clusters respectively for similarity, so as to further perform clustering processing on other clusters to be clustered.

[0096] In this embodiment, by obtaining the similarity of the weight non-zero constraint group, the comparison times between multiple centroid pairs can be reduced, that is, the calculation times of the similarity between the centroids in the centroid pair can be reduced. In addition, based on the similarity of the constraint group and the weight of the constraint group, the comprehensive similarity is obtained. Based on the comprehensive similarity, clustering processing is performed on the two clusters to be clustered, which can comprehensively consider the similarity between the clusters in terms of time and space, perform clustering processing on the two clusters, improve the effect of clustering processing, and improve the clustering processing efficiency.

[0097] For the above embodiment, the present application provides an image clustering processing device. Please refer to Figure 7 , Figure 7 FIG. is a schematic structural diagram of an embodiment of the image clustering processing device of the present application. The image clustering processing device 70 may include an acquisition module 71, an allocation module 72, and a clustering module 73, wherein the acquisition module 71, the allocation module 72, and the clustering module 73 are connected.

[0098] The acquisition module 71 is used to acquire the spatio-temporal information of each centroid in the two clusters to be clustered, wherein each cluster to be clustered includes at least one centroid.

[0099] The allocation module 72 is used to pair the centroids in the two clusters to be clustered based on the spatio-temporal information of each centroid to form centroid pairs, and allocate the centroid pairs to the corresponding constraint groups;

[0100] The clustering module 73 is used to perform clustering processing on the two clusters to be clustered based on the similarity of the constraint groups.

[0101] In some embodiments, the allocation module 72 is used to pair the centroids in the two clusters to be clustered based on the spatio-temporal information of each centroid to form centroid pairs, and allocate the centroid pairs to the corresponding constraint groups, including: setting multiple constraint groups of spatio-temporal constraints based on the spatio-temporal constraint level, and setting the weight of each constraint group; pairing the centroids in the two clusters to be clustered to form centroid pairs; and allocating the centroid pairs to the corresponding constraint groups based on the spatio-temporal information of the centroids in the centroid pairs.

[0102] In some embodiments, the spatio-temporal constraint level includes a time constraint level and a space constraint level, and the spatio-temporal information of each centroid includes time information and space information.

[0103] In some embodiments, the clustering module 73 is configured to perform clustering processing on two clusters to be clustered based on the similarity of constraint groups, including: obtaining the similarity of centroid pairs in a part of the constraint groups as the similarity of the corresponding constraint groups; obtaining a comprehensive similarity based on the similarity of the constraint groups and the weights of the constraint groups; and performing clustering processing on the two clusters to be clustered based on the comprehensive similarity.

[0104] In some embodiments, a part of the constraint groups includes constraint groups with non-zero weights. The sum of the weights of the constraint groups is 1.

[0105] In some embodiments, the weight of a constraint group with a higher spatio-temporal constraint level is greater than the weight of a constraint group with a lower spatio-temporal constraint level.

[0106] In some embodiments, the clustering module 73 is configured to obtain the similarity of centroid pairs in a part of the constraint groups as the similarity of the corresponding constraint groups, including: if any constraint group includes a pair of centroid pairs, obtaining the similarity of the centroids in the centroid pair as the similarity of the corresponding constraint group; if any constraint group includes multiple pairs of centroid pairs, obtaining the similarity of the centroids in each centroid pair and obtaining the average similarity as the similarity of the corresponding constraint group.

[0107] For the specific implementation of this embodiment, reference may be made to the implementation process of the above embodiments, which will not be elaborated here.

[0108] For the above embodiments, the present application provides a computer device. Please refer to Figure 8 , Figure 8 is a schematic structural diagram of an embodiment of the computer device of the present application. The computer device 80 includes a memory 81 and a processor 82. Among them, the memory 81 and the processor 82 are coupled to each other. The memory 81 stores program data, and the processor 82 is configured to execute the program data to implement the steps in any embodiment of the above image clustering processing method.

[0109] In this embodiment, the processor 82 may also be referred to as a CPU (Central Processing Unit). The processor 82 may be an integrated circuit chip with signal processing capabilities. The processor 82 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor 82 may also be any conventional processor, etc.

[0110] For the specific implementation of this embodiment, reference may be made to the implementation process of the above embodiments, which will not be elaborated here.

[0111] For the method of the above embodiment, it can be implemented in the form of a computer program. Therefore, the present application proposes a storage device. Please refer to Figure 9 , Figure 9 which is a schematic structural diagram of an embodiment of the storage device of the present application. The storage device 90 stores program data 91 that can be run by a processor. The program data can be executed by the processor to implement the steps of any one of the above embodiments of the image clustering processing method.

[0112] For the specific implementation of this embodiment, reference may be made to the implementation process of the above embodiments, which will not be elaborated here.

[0113] The storage device 90 of this embodiment can be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc, etc., which can store program data, or it can also be a server storing the program data. The server can send the stored program data to other devices for running, or it can also run the stored program data itself.

[0114] In several embodiments provided by the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of devices or units can be in electrical, mechanical, or other forms.

[0115] The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they can be located in one place, or they can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0116] In addition, the functional units in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.

[0117] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage device, which is a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing an electronic device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods in various embodiments of the present application.

[0118] Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present application can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. Optionally, they can be implemented by program codes executable by the computing device. Thus, they can be stored in the storage device and executed by the computing device, or they can be separately fabricated into individual integrated circuit modules, or multiple modules or steps among them can be fabricated into a single integrated circuit module to be implemented. In this way, the present application is not limited to any specific combination of hardware and software.

[0119] The above are only the embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present application.

Claims

1. A processing method for image clustering, characterized in that, The method includes: Obtaining the spatio-temporal information of each centroid in two clusters to be clustered, where each of the clusters to be clustered includes at least one centroid; Based on the spatio-temporal information of each centroid, pairing the centroids in the two clusters to be clustered to form centroid pairs, and assigning the centroid pairs to corresponding constraint groups, including: Based on the spatio-temporal constraint level, setting multiple constraint groups of spatio-temporal constraints, and setting the weight of each constraint group; wherein the weight of the constraint group with a higher spatio-temporal constraint level is greater than the weight of the constraint group with a lower spatio-temporal constraint level; Pairing the centroids in the two clusters to be clustered to form the centroid pairs; Based on the spatio-temporal information of the centroids in the centroid pairs, assigning the centroid pairs to the corresponding constraint groups; Performing clustering processing on the two clusters to be clustered based on the similarity of the constraint groups and the weights of the constraint groups.

2. The method according to claim 1, wherein The performing clustering processing on the two clusters to be clustered based on the similarity of the constraint groups and the weights of the constraint groups includes: Obtaining the similarity of the centroid pairs in some of the constraint groups as the similarity of the corresponding constraint groups; Based on the similarity of the constraint groups and the weights of the constraint groups, obtaining the comprehensive similarity; Performing clustering processing on the two clusters to be clustered based on the comprehensive similarity.

3. The method according to claim 2, wherein Some of the constraint groups include constraint groups with non-zero weights.

4. The method according to claim 3, wherein The obtaining the similarity of the centroid pairs in some of the constraint groups as the similarity of the corresponding constraint groups includes: If any one of the constraint groups includes a pair of centroid pairs, obtaining the similarity of the centroids in the centroid pair as the similarity of the corresponding constraint group; If any one of the constraint groups includes multiple pairs of centroid pairs, obtaining the similarity of the centroids in each centroid pair and obtaining the average similarity as the similarity of the corresponding constraint group.

5. The method according to claim 1, wherein The sum of the weights of the constraint groups is 1.

6. The method according to claim 1, wherein The spatio-temporal constraint level includes a time constraint level and a space constraint level, and the spatio-temporal information of each centroid includes time information and space information.

7. A computer device, characterized in that, Including a mutually coupled memory and a processor, where program data is stored in the memory, and the processor is configured to execute the program data to implement the steps of the method according to any one of claims 1 to 6.

8. A storage device, characterized in that, There is stored program data that can be run by a processor, and the program data is used to implement the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Image clustering method and device, electronic equipment and computer readable storage medium

    CN112101483A