A method, apparatus and electronic device for portrait clustering

By optimizing the clustering parameters of self-organizing mapping networks and checkpoint features, combined with neighborhood spatiotemporal domain correction, the accuracy and recall of human image clustering are improved, solving the problem of low clustering accuracy in massive human image data.

CN114611628BActive Publication Date: 2025-11-04ZHEJIANG DAHUA TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210323046.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-29
Publication Date
2025-11-04
Estimated Expiration
2042-03-29

AI Technical Summary

Technical Problem

Existing technologies suffer from low accuracy in clustering results when performing facial image clustering on massive amounts of facial image data.

Method used

By acquiring multiple spatial attribute features of checkpoints, checkpoint clustering is performed using a self-organizing map network. The checkpoint clustering parameters are updated to optimize the clustering results. Furthermore, secondary human image clustering is performed by combining the neighboring spatiotemporal domain to correct the final results.

Benefits of technology

It improves the accuracy and recall of human image clustering, and solves the problem of low accuracy of clustering results in existing technologies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114611628B_ABST
    Figure CN114611628B_ABST
Patent Text Reader

Abstract

The application discloses a portrait clustering method, device and electronic equipment. The method comprises the following steps: acquiring respective card slot features of multiple card slots; when a first termination condition is not triggered, performing card slot clustering on the card slot features of the multiple card slots based on a card slot clustering parameter set, obtaining N card slot clustering results corresponding to N card slot clustering parameter sets, and then updating the N card slot clustering parameter sets based on N card slot clustering evaluation values of the N card slot clustering results; when the first termination condition is triggered, determining the respective categories to which the multiple card slots belong based on a card slot clustering result corresponding to a maximum card slot clustering evaluation value among all card slot clustering evaluation values, performing portrait clustering on the person images corresponding to the card slots belonging to the same category within a preset time period, and obtaining a final portrait clustering result. Based on the above method, the accuracy of portrait clustering can be improved, and the problem of low accuracy of clustering results in the current portrait clustering of massive portrait data can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, and particularly relates to a portrait clustering method and device and electronic equipment. BACKGROUND

[0002] Portrait clustering is a process of classifying portrait images into different categories (or clusters). Since portrait images in the same category have great similarity, and portrait images in different categories have great dissimilarity, the prior art generally realizes the portrait clustering process by comparing the feature similarity of two portrait images.

[0003] However, when the prior art is used to perform portrait clustering on massive portrait data, since there are many irrelevant and similar portrait images in the massive portrait data, the object A in the portrait image A and the object B in the portrait image B will be classified into the same category, thereby causing the problem of low accuracy of the clustering result. SUMMARY

[0004] The present application provides a portrait clustering method, device and electronic equipment for performing portrait clustering on massive portrait data.

[0005] In a first aspect, the present application provides a portrait clustering method, comprising:

[0006] Obtaining a camera feature of each of a plurality of cameras; wherein the camera feature of a camera is used to represent a plurality of spatial attributes of the camera;

[0007] When the first termination condition is not triggered, performing camera clustering on the camera features of the plurality of cameras based on a camera clustering parameter set to obtain N camera clustering results corresponding to N camera clustering parameter sets; wherein the camera clustering parameter set is a set containing at least one camera clustering parameter;

[0008] Updating the N camera clustering parameter sets based on N camera clustering evaluation values of the N camera clustering results;

[0009] When the first termination condition is triggered, determining the category to which each of the plurality of cameras belongs based on the camera clustering result corresponding to the maximum camera clustering evaluation value among all camera clustering evaluation values;

[0010] Performing portrait clustering on the portrait images corresponding to the cameras belonging to the same category within a preset time period to obtain a final portrait clustering result.

[0011] By the above method, on the one hand, the characteristics of the card mouth are determined in combination with various spatial attributes of the card mouth, and the card mouth characteristics help to improve the accuracy of the final portrait clustering. On the other hand, the card mouth clustering parameters used for card mouth clustering are updated, the card mouth clustering is performed using the updated card mouth clustering parameters, and then a card mouth clustering result is selected. Based on the card mouth clustering result, the final portrait clustering result is obtained. By improving the accuracy of the clustering result of the card mouth clustering, the accuracy of the final portrait clustering result is improved, and the problem of low accuracy of the clustering result in the prior art when applied to portrait clustering of massive portrait data is solved.

[0012] In a possible design, the card mouth clustering of the card mouth features of the plurality of card mouths based on the card mouth clustering parameter set comprises: determining a self-organizing mapping network using the card mouth clustering parameter set for card mouth clustering; determining the corresponding winning neurons of the plurality of card mouths in the self-organizing mapping network based on the card mouth features of the plurality of card mouths; wherein the winning neuron is the neuron with the maximum similarity between the single card mouth feature in the plurality of neurons contained in the self-organizing mapping network; determining the category to which each of the plurality of card mouths belongs based on the corresponding winning neurons of the plurality of card mouths, to obtain the card mouth clustering result corresponding to the card mouth clustering parameter set.

[0013] By the above method, after the card mouth clustering parameter set is determined, the corresponding winning neurons of each card mouth in the self-organizing mapping network are determined, and then the card mouth clustering result of the card mouth clustering parameter set is obtained, which can effectively improve the accuracy of the card mouth clustering result.

[0014] In a possible design, the determination of the corresponding winning neurons of the plurality of card mouths in the self-organizing mapping network based on the card mouth features of the plurality of card mouths comprises:

[0015] For a single card mouth in the plurality of card mouths, at least one iteration operation is performed as follows:

[0016] The winning neuron corresponding to the single card mouth is calculated; the neighborhood range centered on the winning neuron is determined based on the neighborhood radius in the card mouth clustering parameter set; wherein the neighborhood range includes at least one neuron; the weights of the neurons in the neighborhood range are updated based on the learning rate in the card mouth clustering parameter set; the neighborhood radius in the card mouth clustering parameter set is updated based on the neighborhood radius adjustment parameter in the card mouth clustering parameter set; the learning rate in the card mouth clustering parameter set is updated based on the learning rate adjustment parameter in the card mouth clustering parameter set;

[0017] Until the second termination condition is triggered, the winning neuron determined in the last iteration operation is taken as the winning neuron corresponding to the single card mouth.

[0018] By the above method, based on the unsupervised clustering model of the self-organizing mapping network, a single lens can be taken as the main body, a plurality of lens features representing different attributes of the lens can be obtained, and then based on the lens features of different attributes, the winning neuron corresponding to the single lens can be determined.

[0019] In a possible design, the second termination condition is triggered, specifically: if the updated learning rate is less than or equal to a preset learning rate, the second termination condition is triggered; or if the number of iterations of the iterative operation performed by the single lens is greater than a preset iteration number, the second termination condition is triggered.

[0020] By the above method, on the one hand, the preset iteration number is set, which can effectively avoid falling into a dead loop in the process of performing lens clustering, and on the other hand, the preset learning rate is set, which can effectively save the time and computing resources of performing lens clustering and improve the efficiency of lens clustering.

[0021] In a possible design, the updating of the N lens clustering parameter sets based on the N lens clustering evaluation values of the N lens clustering results comprises: calculating the lens clustering evaluation value corresponding to each lens clustering result respectively to obtain the N lens clustering evaluation values of the N lens clustering results; sorting the N lens clustering evaluation values according to the numerical value, and selecting the M lens clustering parameter sets corresponding to the first M lens clustering evaluation values; and updating the N lens clustering parameter sets based on the M lens clustering parameter sets.

[0022] By the above method, the lens clustering parameter set is optimized by calculating the lens clustering evaluation value and selecting the lens clustering result corresponding to the optimal lens clustering evaluation value in the current round, and then a better lens clustering result is obtained by using the optimized lens clustering parameter set, which can effectively improve the accuracy of the final portrait clustering result.

[0023] In a possible design, the updating of the N lens clustering parameter sets based on the M lens clustering parameter sets comprises: determining a first position vector of each of the N lens clustering parameter sets in space to obtain N first position vectors of the N lens clustering parameter sets in space; adjusting the N first position vectors based on the distance between each of the N first position vectors and a preset position vector to obtain N second position vectors; determining M second position vectors corresponding to the M lens clustering parameter sets, calculating an average second position vector of the M second position vectors; adjusting the N second position vectors based on the average second position vector to obtain N target position vectors; and determining N lens clustering parameter sets corresponding to the N target position vectors.

[0024] By the above method, the lens cluster parameters in the lens cluster parameter set used in the lens cluster process can be continuously optimized, and the lens cluster parameters in the optimized lens cluster parameter set are used to obtain better lens cluster results, thereby improving the accuracy of the final portrait clustering.

[0025] In a possible design, after the final portrait clustering result is obtained, the method further includes: determining a portrait clustering result corresponding to each spatiotemporal domain in a spatiotemporal domain set; wherein a single spatiotemporal domain contains portrait images corresponding to lenses belonging to the same category within a preset time period; for each single spatiotemporal domain in the spatiotemporal domain set, the following operations are respectively performed: determining a neighboring spatiotemporal domain of the single spatiotemporal domain; determining portrait images contained in the single spatiotemporal domain and the neighboring spatiotemporal domain, performing portrait clustering on the determined portrait images to obtain a reference portrait clustering result corresponding to the single spatiotemporal domain; correcting the portrait clustering result corresponding to the single spatiotemporal domain based on the reference portrait clustering result; and correcting the final portrait clustering result according to the corrected portrait clustering result corresponding to each spatiotemporal domain in the spatiotemporal domain set.

[0026] By the above method, interference of neighboring spatiotemporal domains can be effectively avoided, that is, the category labels of the portrait clustering result corresponding to the same object 1 in different spatiotemporal domains are different, and the second portrait clustering is performed based on the determination of the neighboring spatiotemporal domains to correct the first portrait clustering result, thereby effectively improving the clustering effect and recall rate.

[0027] In a possible design, the determination of the neighboring spatiotemporal domain of the single spatiotemporal domain includes: calculating a time similarity and a space similarity between each of other spatiotemporal domains and the single spatiotemporal domain; wherein the other spatiotemporal domains are spatiotemporal domains in the spatiotemporal domain set except the single spatiotemporal domain; and in the other spatiotemporal domains, a spatiotemporal domain with a time similarity greater than a preset time threshold and / or a space similarity greater than a preset space threshold is selected as the neighboring spatiotemporal domain of the single spatiotemporal domain.

[0028] By the above method, the similarity between spatiotemporal domains is calculated based on the time and / or space dimensions, the neighboring spatiotemporal domains can be more accurately determined, and the effect of correcting the portrait clustering result based on the neighboring spatiotemporal domains is effectively improved, thereby improving the final clustering result and the clustering recall rate.

[0029] In a second aspect, the present application provides a portrait clustering device, which includes:

[0030] The acquisition module acquires lens features of a plurality of lenses; wherein the lens features of a lens are used to represent a plurality of spatial attributes of the lens.

[0031] The checkpoint clustering module, when the first termination condition is not triggered, performs checkpoint clustering on the checkpoint features of the multiple checkpoints based on the checkpoint clustering parameter set, and obtains N checkpoint clustering results corresponding to N checkpoint clustering parameter sets; wherein, the checkpoint clustering parameter set is a set containing at least one checkpoint clustering parameter;

[0032] The parameter update module updates the set of N checkpoint clustering parameters based on the N checkpoint clustering evaluation values ​​calculated from the N checkpoint clustering results.

[0033] The checkpoint category determination module, when the first termination condition is triggered, determines the category to which each of the multiple checkpoints belongs based on the checkpoint clustering result corresponding to the highest checkpoint clustering evaluation value among all checkpoint clustering evaluation values.

[0034] The portrait clustering module performs portrait clustering on portrait images corresponding to the same category of checkpoints within a preset time period to obtain the final portrait clustering result.

[0035] In one possible design, the checkpoint clustering module is specifically used for: determining a self-organizing map network (SOM) for checkpoint clustering using a checkpoint clustering parameter set; determining the winning neuron for each of the multiple checkpoints in the SOM based on their respective checkpoint features; wherein the winning neuron is the neuron with the highest similarity to a single checkpoint feature among the multiple neurons included in the SOM; and determining the category to which each of the multiple checkpoints belongs based on the winning neuron corresponding to each of the multiple checkpoints, thereby obtaining the checkpoint clustering result corresponding to the checkpoint clustering parameter set.

[0036] In one possible design, the checkpoint clustering module is specifically used to: perform at least one iterative operation on each of the plurality of checkpoints for a single checkpoint:

[0037] Calculate the winning neuron corresponding to each individual checkpoint; determine the neighborhood range centered on the winning neuron based on the neighborhood radius in the checkpoint clustering parameter set; wherein the neighborhood range includes at least one neuron; update the weights of the neurons within the neighborhood range based on the learning rate in the checkpoint clustering parameter set; update the neighborhood radius in the checkpoint clustering parameter set based on the neighborhood radius adjustment parameter in the checkpoint clustering parameter set; update the learning rate in the checkpoint clustering parameter set based on the learning rate adjustment parameter in the checkpoint clustering parameter set.

[0038] Until the second termination condition is triggered, the winning neuron determined in the last iteration is taken as the winning neuron corresponding to the single checkpoint.

[0039] In a possible design, the socket clustering module is specifically configured to: trigger a second termination condition if the updated learning rate is less than or equal to a preset learning rate; or trigger the second termination condition if the iteration number of the single socket performing the iteration operation is greater than a preset iteration number.

[0040] In a possible design, the parameter updating module is specifically configured to: calculate a socket clustering evaluation value corresponding to each socket clustering result respectively, to obtain N socket clustering evaluation values of the N socket clustering results; sort the N socket clustering evaluation values according to numerical values, and select M socket clustering parameter sets corresponding to the first M socket clustering evaluation values; and update the N socket clustering parameter sets based on the M socket clustering parameter sets.

[0041] In a possible design, the socket clustering parameter set determining module is specifically configured to: determine a first position vector of each of the N socket clustering parameter sets in a space, to obtain N first position vectors of the N socket clustering parameter sets in the space; adjust the N first position vectors based on distances between the N first position vectors and preset position vectors respectively, to obtain N second position vectors; determine M second position vectors corresponding to the M socket clustering parameter sets, calculate an average second position vector of the M second position vectors; adjust the N second position vectors based on the average second position vector, to obtain N target position vectors; and determine N socket clustering parameter sets corresponding to the N target position vectors.

[0042] In a possible design, the apparatus is further configured to: determine a portrait clustering result corresponding to each space-time domain in a space-time domain set; wherein a single space-time domain contains portrait images corresponding to sockets belonging to a same category in a preset time period; and perform the following operations on the single space-time domain in the space-time domain set respectively;

[0043] determine a neighboring space-time domain of the single space-time domain; determine portrait images contained in the single space-time domain and the neighboring space-time domain; perform portrait clustering on the determined portrait images, to obtain a reference portrait clustering result corresponding to the single space-time domain; and correct a portrait clustering result corresponding to the single space-time domain based on the reference portrait clustering result.

[0044] correct the final portrait clustering result according to the corrected portrait clustering result corresponding to each space-time domain in the space-time domain set.

[0045] In a possible design, the apparatus is further configured to: calculate respective time similarity and space similarity between each of the other spatio-temporal domains and the single spatio-temporal domain; wherein the other spatio-temporal domains are spatio-temporal domains in the set of spatio-temporal domains except the single spatio-temporal domain; and select, from the other spatio-temporal domains, a spatio-temporal domain with time similarity greater than a preset time threshold and / or space similarity greater than a preset space threshold as a neighboring spatio-temporal domain of the single spatio-temporal domain.

[0046] In a third aspect, the present application provides an electronic device, which comprises:

[0047] a memory configured to store a computer program;

[0048] a processor configured to execute the computer program stored in the memory, so as to implement the method steps of the portrait clustering method.

[0049] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the method steps of the portrait clustering method.

[0050] The technical effects of each of the above-mentioned second aspect to fourth aspect and each of the possible solutions can be referred to the above-mentioned technical effect descriptions of the first aspect or the possible solutions of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0051] Figure 1 A flowchart of the portrait clustering method provided by the present application;

[0052] Figure 2 A flowchart of the process of the bayonet clustering provided by the present application;

[0053] Figure 3 A schematic diagram of the output layer of the self-organizing mapping network provided by the present application;

[0054] Figure 4 A schematic diagram of the input layer of the self-organizing mapping network provided by the present application;

[0055] Figure 5 A schematic diagram of the self-organizing mapping network provided by the present application;

[0056] Figure 6 A flowchart of the process of determining the winning neuron provided by the present application;

[0057] Figure 7 A schematic diagram of the neighborhood range of the winning neuron provided by the present application;

[0058] Figure 8 A schematic diagram of a cluster of a socket clustering process is provided for the present application;

[0059] Figure 9 A flowchart of a process of revising a portrait clustering result is provided for the present application;

[0060] Figure 10 A schematic diagram of an apparatus of a portrait clustering is provided for the present application;

[0061] Figure 11 A schematic diagram of a structure of an electronic device is provided for the present application. DETAILED DESCRIPTION

[0062] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings. The specific operation methods in the method embodiments can also be applied to the device embodiments or system embodiments. It should be noted that in the description of the present application, "multiple" is understood as "at least two". The association relationship of the associated objects is described, which means that there can be three relationships, for example, A and / or B can represent the following three cases: A exists alone, A and B exist together, and B exists alone. A is connected with B, which means that A is directly connected with B and A is connected with B through C. In addition, in the description of the present application, "first", "second", etc. are used only for the purpose of distinguishing the description, and cannot be understood as indicating or implying relative importance, nor can it be understood as indicating or implying order.

[0063] In order to facilitate those skilled in the art to better understand the technical solutions provided by the embodiments of the present application, the professional terms involved are briefly described as follows:

[0064] Portrait clustering: a process of comparing and grouping image data in a database to form a plurality of portrait image data sets, which generally includes face image data and body image data.

[0065] Space-time domain division: the space-time domain includes two existing object and activity subject world dimensions of time and space. Time is the time span representing the activity of an object in a certain space range, and space is the geographical interval of the activity of an object in a continuous time period, both of which can be used as the main carrier of the appearance of an object in a certain space-time domain. It should be noted that a space-time domain is composed of a group of continuous time points and space points, and the space points can be discretized into specific monitoring camera sockets in practice.

[0066] Cluster: a set of people who can represent the activity of a subset of a space-time domain in a certain space-time range.

[0067] SOM(Self-organizing Maps, self-organizing maps) algorithm: also known as self-organizing map network, the network is a hierarchical structure, generally only has input layer and output layer (competitive layer) two layers. SOM can convert one-dimensional input signal mode to one-dimensional or two-dimensional discrete mapping, and adaptively perform the conversion in a topologically ordered manner. In the embodiment of the application, the topological transformation refers to projecting a plurality of attributes dependent on the card hole to form a two-dimensional topological mapping plane.

[0068] The embodiment of the application provides a portrait clustering method and device and electronic equipment, and solves the problem of low clustering result accuracy rate in the prior art applied to portrait clustering of massive portrait data.

[0069] According to the method provided in the embodiment of the application, the card hole features of a plurality of card holes are first determined, then different card hole clustering parameter sets are selected to perform card hole clustering on the plurality of card holes, the card hole clustering process is optimized by updating the card hole clustering parameter set, the clustering result with the highest clustering evaluation parameter is selected as the final clustering result of the plurality of card holes, the person images corresponding to the card holes belonging to the same category in a preset time period are clustered to obtain the final portrait clustering result.

[0070] Further, the person images corresponding to the card holes belonging to the same category in a preset time period are regarded as the person images in the same space-time domain, the adjacent space-time domains of each space-time domain are determined, and the person images in each space-time domain are subjected to secondary portrait clustering in combination with the adjacent space-time domains to obtain the secondary portrait clustering result, so as to correct the final portrait clustering result.

[0071] The method provided in the embodiment of the application will be further described in detail below with reference to the accompanying drawings.

[0072] Referring to Figure 1 The embodiment of the application provides a portrait clustering method, and the specific process is as follows:

[0073] Step 101: acquiring card hole features of a plurality of card holes respectively;

[0074] In the embodiment of the application, the card hole features of a card hole are used to represent a plurality of spatial attributes of the card hole.

[0075] Specifically, the spatial attribute can be used to represent the cluster behavior mode of the card hole, and each spatial attribute can be represented by corresponding attribute data, which includes but is not limited to: the latitude and longitude coordinates of the card hole, the road information where the card hole is located, the inner and outer ring information where the card hole is located, the business circle information where the card hole is located, the AOI (Point of Interest, interest point) information of the card hole, the POI (Area of Interest, interest surface) information of the card hole, and the like.

[0076] For example, a plurality of attribute data of at least one tollbooth in a certain place (a certain city) is acquired, and the plurality of attribute data of each tollbooth can include but is not limited to one or more of the following: the latitude and longitude coordinates of the tollbooth, the road information where the tollbooth is located, the inner and outer ring information where the tollbooth is located, the commercial district information where the tollbooth is located, the AOI information of the tollbooth, and the POI information of the tollbooth, and then the plurality of attribute data of each tollbooth is taken as the tollbooth characteristics of each tollbooth.

[0077] Step 102: determining whether a first termination condition is triggered;

[0078] If not, step 103 is executed; if yes, step 105 is executed.

[0079] In the embodiments of the present application, the first termination condition can be determined according to actual application: if the number of times of currently executing the outer loop iteration is greater than or equal to the preset number of times of outer loop iteration, the first termination condition is triggered; if the number of times of currently executing the outer loop iteration is less than the preset number of times of outer loop iteration, the first termination condition is not triggered, and here, each execution of steps 103-104 is equivalent to adding one to the number of times of currently executing the outer loop iteration.

[0080] Step 103: performing tollbooth clustering on the tollbooth characteristics of the plurality of tollbooths based on a set of tollbooth clustering parameters, to obtain N tollbooth clustering results corresponding to N sets of tollbooth clustering parameters;

[0081] In the embodiments of the present application, the set of tollbooth clustering parameters is a set composed of one or more tollbooth clustering parameters, and the tollbooth clustering parameter is a parameter used by a clustering algorithm or a clustering function to perform tollbooth clustering. Here, N different sets of tollbooth clustering parameters are used to perform N times of tollbooth clustering on the plurality of tollbooths, to obtain N tollbooth clustering results.

[0082] It is worth noting that the above-mentioned tollbooth clustering parameter can also be a parameter that has an impact on the tollbooth clustering result, and the above-mentioned N is a positive integer greater than or equal to 1.

[0083] Specifically, a self-organizing mapping network can be used to perform tollbooth clustering, and the size of the output layer topology mapping plane of the self-organizing mapping network, the neighborhood radius of the output layer neuron correction weight, the neighborhood radius adjustment parameter, the learning rate, and the learning rate adjustment parameter are taken as the tollbooth clustering parameters in the set of tollbooth clustering parameters, and here, the set of tollbooth clustering parameters can refer to the following formula (1):

[0084] X={pr,pc,R,r,η,γ} (1)

[0085] wherein pr is the row of the output layer topology plane, pc is the column of the output layer topology plane, pr x pc is the number of neurons of the output layer topology plane, R is the neighborhood radius of the output layer neuron correction weight, r is the neighborhood radius adjustment parameter, η is the learning rate, and γ is the learning rate adjustment parameter.

[0086] In addition, pr, pc, and R in formula (1) can be determined according to actual application, such as according to the number of card slots, r can be specifically a reduction rate of the neighborhood radius, η can be specifically a reduction rate of the learning rate radius, the value range of r can be set as [0.05, 0.2], the value range of η can be set as [0.1, 0.0], and the value range of γ can be set as [0.1, 0.9].

[0087] Next, taking single card slot clustering as an example, card slot clustering is performed based on the card slot clustering parameter set through the self-organizing mapping network.

[0088] It should be noted that the self-organizing mapping network is a possible clustering algorithm, and other clustering algorithms can also be used, and the above card slot clustering parameter set can be adjusted according to different clustering algorithms or different actual application requirements.

[0089] Next, the process of card slot clustering will be explained in detail in combination with the flowchart shown in Figure 2 , which specifically includes S1-S3.

[0090] S1: determining a self-organizing mapping network that uses a card slot clustering parameter set to perform card slot clustering;

[0091] The self-organizing mapping network mainly includes an output layer and an input layer. First, the card slot clustering parameter set required by the self-organizing mapping network is determined, then the topology plane size of the output layer is determined based on the card slot clustering parameters in the card slot clustering parameter set to determine the number of neurons of the output layer, and then the number of input neurons of the input layer is determined based on card slot features containing multiple spatial attributes.

[0092] Specifically, the card slot clustering parameter set of the self-organizing mapping network is determined as shown in formula (1). If the row pr of the output layer topology plane is 8 and the column pc of the output layer topology plane is 5, it can be determined that the output layer of the self-organizing mapping network contains pr x pc = 40 neurons, as shown in Figure 3 .

[0093] Then, the characteristics of the plurality of spatial attributes of the node are determined, and if six spatial attributes of the node are determined as the characteristics of the node, such as the longitude and latitude coordinates of the node, the road information where the node is located, the inner and outer ring information where the node is located, the commercial circle information where the node is located, the AOI information of the node, and the POI information of the node, it can be determined that the input layer of the self-organizing mapping network contains 6 input neurons. In addition, the number of types of the spatial attributes of the node can be determined according to actual conditions, and if D types of the spatial attributes of the node are determined as the characteristics of the node, and D is a positive integer greater than or equal to 1, it can be determined that the input layer of the self-organizing mapping network contains D input neurons, as shown in Figure 4

[0094] In addition, the neighborhood radius R of the output neuron correction weight in the node clustering parameter set, the neighborhood radius adjustment parameter r, the learning rate η, and the learning rate adjustment parameter γ are also determined here.

[0095] S2: Based on the node characteristics of each of the plurality of nodes, the corresponding winning neuron of each of the plurality of nodes in the self-organizing mapping network is determined.

[0096] After determining the currently used node clustering parameter set and the output layer and the input layer of the self-organizing mapping network, based on the node characteristics of each of the plurality of nodes, the corresponding winning neuron of each of the plurality of nodes in the self-organizing mapping network is determined.

[0097] Specifically, the node characteristics of each of the plurality of nodes are input one by one to the self-organizing mapping network as the input layer for training. For each node, the similarity of the node characteristics and each neuron of the output layer is compared, and then in the output layer plane, the neuron with the highest similarity is taken as the winning neuron, that is, the winning neuron is the neuron with the highest similarity between the single node characteristics and the plurality of neurons contained in the self-organizing mapping network.

[0098] For example, the Euclidean distance can be used to calculate the similarity in the embodiment of the present application, and the following specific description is made in combination with Figure 5 .

[0099] It is worth noting that the Euclidean distance is a possible method for calculating the similarity, and the similarity can also be calculated based on the actual application situation using the corresponding distance algorithm.

[0100] As shown in Figure 5 , the output layer contains a total of 40 neurons: X1, X2, …, X D ​The input layer includes D socket features, wherein one socket feature can be used to represent one socket attribute data, i.e., D input neurons are used to represent D socket attribute data of the socket, and the D socket features can include, but are not limited to, latitude and longitude coordinates of the socket, road information where the socket is located, inner and outer ring information where the socket is located, commercial circle information where the socket is located, AOI information of the socket, and POI information of the socket.

[0101] As shown in Figure 5 , a single neuron and a single socket feature can have a link weight, a single neuron and D socket features have D link weights, and the i-th neuron C i is represented by a weight vector as W Ci =[w1,w2,w3,……,w D ]. That is, the total number of connection weights in the self-organizing mapping network can be seen from the following formula (2).

[0102] N=Pr×Pc×D (2)

[0103] Wherein, N is the total number of connection weights in the self-organizing mapping network, pr is the row of the output layer topology plane, pc is the column of the output layer topology plane, and D is the number of socket features.

[0104] After the connection weight is determined, the process of determining the winning neuron is explained by taking the Euclidean distance as an example, i.e., the similarity calculation between D socket features and 40 neurons can be seen from the following formula (3).

[0105] dis=||X j -C i || (3)

[0106] Wherein, dis is the metric value, X j is the j-th socket feature, j=1~m, m is the number of actual open portrait equipment socket, if all are opened, m=D, C i is the i-th neuron, i=1~40.

[0107] In Figure 5 , for a single socket, the metric value between each of the D socket features of the single socket and the neuron can be calculated, and the neuron with the smallest metric value is selected as the winning neuron of the single socket.

[0108] Based on the above method of calculating the winning neuron, the following iteration operation is performed at least once for a single socket in multiple sockets:

[0109] Through the iteration operation of the following steps S21-S27, the winning neuron corresponding to the socket is determined, as Figure 6The flowchart shown is for determining the winning neuron corresponding to the checkpoint, and specifically includes:

[0110] S21: Calculate the winning neuron corresponding to the single checkpoint;

[0111] S22: Determine the neighborhood range centered on the winning neuron based on the neighborhood radius in the set of clustering parameters.

[0112] In the embodiments of this application, the neighborhood range includes at least one neuron.

[0113] S23: Based on the learning rate in the set of clustering parameters, update the weights of neurons in the neighborhood;

[0114] In this embodiment, the WTA (Winner Take All) learning rule can be adopted. For each checkpoint, the winning neuron is marked as 1 in the output grid (a two-dimensional topological mapping plane of Pr×Pc), and the rest are marked as 0. That is, the winning neuron has the largest weight adjustment weight. At the same time, all neurons falling within the neighborhood range have a certain degree of weight adjustment weight, while neurons falling outside the neighborhood range do not have their weights corrected.

[0115] For example, such as Figure 7 As shown, A is the winning neuron, R is the neighborhood radius, and the circle formed by the dashed lines in the figure is the neighborhood range with A as the center and R as the radius. Among them, B, C, D, E, F, and G are neurons that fall within the neighborhood range, that is, they have a certain degree of weight adjustment.

[0116] S24: Update the neighborhood radius in the checkpoint clustering parameter set based on the neighborhood radius adjustment parameter in the checkpoint clustering parameter set;

[0117] In this embodiment of the application, the neighborhood radius can be updated using the following formula (4).

[0118] R = R × α (4)

[0119] In this equation, R on the left side is the updated neighborhood radius, R on the right side is the original neighborhood radius, and α is the neighborhood radius adjustment parameter.

[0120] S25: Update the learning rate in the checkpoint clustering parameter set based on the learning rate adjustment parameter in the checkpoint clustering parameter set;

[0121] In this embodiment of the application, the learning rate can be updated using the following formula (5).

[0122] η=η×γ (5)

[0123] Wherein, η on the left side of the equation is the updated learning rate, η on the right side of the equation is the learning rate before updating, and γ is the learning rate adjustment parameter.

[0124] S26: Determine whether the second termination condition is triggered;

[0125] If yes, S27 is executed; if no, S21 is executed.

[0126] Specifically, the second termination condition is triggered if the updated learning rate is less than or equal to the preset learning rate, or the iteration number of the single lens performing the iteration operation is greater than the preset iteration number.

[0127] S27: The winning neuron determined by the last iteration operation is determined as the winning neuron corresponding to the single lens.

[0128] Through the above seven steps S21-S27, the winning neuron corresponding to the single lens can be determined, and the winning neurons corresponding to other lenses can be determined in the same way, thereby completing the process of determining the winning neurons corresponding to the lenses.

[0129] S3: Based on the winning neurons corresponding to the plurality of lenses respectively, the categories to which the plurality of lenses belong respectively are determined, and the lens clustering result corresponding to the lens clustering parameter set is obtained.

[0130] In the embodiment of the present application, as shown in Figure 8 For N lenses, the lens clustering parameter set of the self-organizing mapping network is determined, taking the self-organizing mapping network as an example, including the size of the output layer topology mapping plane, the neighborhood radius adjustment parameter, the neighborhood radius, the learning rate, and the learning rate adjustment parameter. Then the winning neurons corresponding to the N lenses respectively are determined, and the category identifiers corresponding to the winning neurons are determined. Then, based on the correspondence between the lenses and the category identifiers, the lens clustering result is obtained.

[0131] Through the above three steps S1-S3, the lens clustering process of the N lenses is completed, and the lens clustering results corresponding to the N lenses respectively are obtained.

[0132] Step 104: Update the N lens clustering parameter set based on the N lens clustering evaluation values of the N lens clustering results.

[0133] In the embodiment of the present application, the N lens clustering evaluation values of the N lens clustering results are obtained by calculating the lens clustering evaluation values corresponding to each lens clustering result respectively. Then, the N lens clustering evaluation values are sorted according to the numerical value, and the M lens clustering parameter sets corresponding to the first M lens clustering evaluation values are selected. Then, the N lens clustering parameter set is updated based on the M lens clustering parameter sets.

[0134] Specifically, the value of the lens cluster evaluation can be determined by calculating a silhouette score (SC), wherein the silhouette score can combine both cohesion and separation, and the value range is [-1, 1], and the closer the final value is to 1, the better the lens cluster effect is. The lens cluster evaluation function based on the silhouette score can be seen from the following formula (6).

[0135] F = 1 - SC (6)

[0136] Wherein, the smaller F represents the better clustering effect.

[0137] Here, the closer the silhouette score as the lens cluster evaluation is to 0, the better the lens cluster effect is, so the N lens cluster evaluations are arranged in descending order, and the M lens cluster parameter sets corresponding to the first M lens cluster evaluations are selected, and then the N lens cluster parameter sets are updated based on the M lens cluster parameter sets.

[0138] Further, the grey wolf algorithm can be used to update the N lens cluster parameter sets based on the M lens cluster parameter sets.

[0139] Specifically, first, the lens parameter set is updated, then the first position vector of each of the N lens cluster parameter sets in the space is determined, N first position vectors of the N lens cluster parameter sets in the space are obtained, and the N first position vectors are adjusted based on the distance between each of the N first position vectors and the preset position vector, to obtain N second position vectors, then M second position vectors corresponding to the M lens cluster parameter sets are determined, an average second position vector of the M second position vectors is calculated, and finally the N second position vectors are adjusted based on the average second position vector to obtain N target position vectors, so as to determine the N lens cluster parameter sets corresponding to the N target position vectors.

[0140] For example, a group of lens cluster parameters and lens cluster parameter sets having a corresponding relationship are taken as a wolf, that is, there are N wolves, if M = 3, then the M lens cluster parameter sets correspond to 3 wolves α, β, and δ, in the grey wolf algorithm, each wolf judges the distance between itself and the wolves α, β, and δ, as shown in the following formula (7), and each calculates the distance vector moving to the wolves α, β, and δ, as shown in the following formula (8), and finally searches in the encirclement of the wolves α, β, and δ through the model shown in the following formula (9).

[0141]

[0142] Wherein, X α (t), X β (t), X δ(t) respectively represent the position vectors of the alpha, beta and delta wolves in the solution space at the tth iteration, D α , D β , D δ are intermediate parameters, i.e. the distances between each wolf and the alpha, beta and delta wolves respectively.

[0143] X1 = X α (t) - A1 · D α (8)

[0144] X2 = X β (t) - A2 · D β

[0145] X3 = X δ (t) - A3 · D δ

[0146] wherein X α (t), X β (t), X δ (t) respectively represent the position vectors of the alpha, beta and delta wolves in the solution space at the tth iteration, X1, X2, X3 are distance vectors of each wolf moving towards the alpha, beta and delta wolves respectively, i.e. the second position vectors.

[0147]

[0148] wherein X(t+1) represents the average second position vector at the t+1th iteration.

[0149] Further, after the positions of the wolves are all updated, the C in the above formula (7) needs to be updated, as shown in the following formula (10), and the A in the above formula (8) needs to be updated, as shown in the following formula (11).

[0150] C = 2 · r1 (10)

[0151] wherein C is the intermediate value in formula (7), and r1 is a random vector between 0 and 1.

[0152] A = 2a · r2 - a (11)

[0153] wherein A is the intermediate value in formula (8), r2 is a random vector between 0 and 1, a is a convergence factor, and the specific calculation is as follows: wherein max_iteration is the maximum number of iterations of the self-organizing mapping network.

[0154] Based on the calculations of formula (7) to formula (11), the updated N sets of dome cluster parameters can be obtained, and after step 104 is executed, step 102 is executed to determine whether the first termination condition is triggered.

[0155] Step 105: When the first termination condition is triggered, among all the values of the lens cluster evaluation, based on the lens cluster result corresponding to the maximum value of the lens cluster evaluation, the category to which each of the plurality of lenses belongs is determined;

[0156] In the embodiments of the present application, the maximum value of the lens cluster evaluation is selected from all the values of the lens cluster evaluation calculated through steps 101-104, and the lens cluster result corresponding to the maximum value of the lens cluster evaluation is taken as the final lens cluster result, based on which the category to which each of the plurality of lenses belongs is determined.

[0157] Step 106: Portrait clustering is performed on the person images corresponding to the lenses belonging to the same category within a preset time period to obtain a final portrait clustering result.

[0158] Based on the category to which the lens belongs, the person images corresponding to the lenses belonging to the same category within a preset time are selected as the person images corresponding to a spatiotemporal domain. According to this idea, the person images corresponding to the lenses belonging to different categories are divided according to the preset time to obtain a spatiotemporal domain set containing a plurality of spatiotemporal domains, and portrait clustering is performed on the person images corresponding to each spatiotemporal domain in the spatiotemporal domain set to obtain a final portrait clustering result.

[0159] Further, in order to avoid interference of adjacent spatiotemporal domains, i.e., object 1 appearing in spatiotemporal domain A and spatiotemporal domain B at the same time, causing the portrait clustering result corresponding to spatiotemporal domain A to give object 1 a category label A and the portrait clustering result corresponding to spatiotemporal domain B to give object 1 another category label B.

[0160] After determining the portrait clustering result corresponding to each spatiotemporal domain in the spatiotemporal domain set, referring to FIG. 6, for a single spatiotemporal domain in the spatiotemporal domain set, the following operations S31-S34 are performed respectively: Figure 9

[0161] S31: Determine the adjacent spatiotemporal domains of the single spatiotemporal domain;

[0162] In the embodiments of the present application, the similarity between the single spatiotemporal domain and other spatiotemporal domains can be calculated, and then the target similarity is selected, and the spatiotemporal domain corresponding to the target similarity is taken as the adjacent spatiotemporal domain of the single spatiotemporal domain.

[0163] Specifically, the similarity between spatiotemporal domains can be calculated in various ways, such as calculating the similarity between spatiotemporal domain A and spatiotemporal domain B. The following specific exemplary descriptions are made in the space, time, and spatiotemporal three ways respectively.

[0164] ​The first way is space. The average value A of the geographical positions of all the lens ports in the time-space domain A and the average value B of the geographical positions of all the lens ports in the time-space domain B are calculated. Then, the absolute value of the difference between the average value A and the average value B is calculated. Here, the smaller the absolute value is, the more similar the time-space domain A and the time-space domain B are. The larger the absolute value is, the less similar the time-space domain A and the time-space domain B are. The negative value of the absolute value is taken as the space similarity. The space similarity greater than the preset space threshold is taken as the target similarity.

[0165] The second way is time. If the preset time period is 6 hours, the acquisition time A of the person image corresponding to the time-space domain A and the acquisition time B of the person image corresponding to the time-space domain B are determined. Then, the absolute value of the difference between the acquisition time A and the acquisition time B is calculated. Here, the smaller the absolute value is, the more similar the time-space domain A and the time-space domain B are. The larger the absolute value is, the less similar the time-space domain A and the time-space domain B are. The negative value of the absolute value is taken as the time similarity. The time similarity greater than the preset time threshold is taken as the target similarity.

[0166] The third way is time-space. The space similarity is calculated by the first way and the time similarity is calculated by the second way. The space similarity and the time similarity are weighted and summed to obtain the time-space similarity. Here, the larger the time-space similarity is, the more similar the time-space domain A and the time-space domain B are. The smaller the time-space similarity is, the less similar the time-space domain A and the time-space domain B are. The time-space similarity greater than the preset time-space threshold is taken as the target similarity. In addition, the weight of the weighted sum can be determined according to the actual application scenario.

[0167] It is worth noting that the above three ways are a possible method for determining the adjacent time-space domain of a single time-space domain.

[0168] S32: Determine the person images corresponding to the single time-space domain and the adjacent time-space domain. Perform portrait clustering on the determined person images to obtain a reference portrait clustering result corresponding to the single time-space domain.

[0169] After determining the adjacent time-space domain of the single time-space domain, perform portrait clustering on the person images corresponding to the single time-space domain and the adjacent time-space domain, and take the portrait clustering result as the reference portrait clustering result corresponding to the single time-space domain.

[0170] For example, if the adjacent time-space domain of the time-space domain A is the time-space domain B, determine the person images corresponding to the two time-space domains, and perform portrait clustering on the person images to obtain the portrait clustering result of the time-space domain A and the time-space domain B. Take the portrait clustering result as the reference portrait clustering result corresponding to the time-space domain A.

[0171] S33: Based on the reference portrait clustering result, correct the portrait clustering result corresponding to the single time-space domain.

[0172] In the embodiments of the present application, the reference portrait clustering result of a single space-time domain is used to correct the portrait clustering result corresponding to the single space-time domain.

[0173] S34: Correct the final portrait clustering result according to the corrected portrait clustering result corresponding to each space-time domain in the set of space-time domains.

[0174] In the embodiments of the present application, the same idea is used to calculate the adjacent space-time domain of each space-time domain in the set of space-time domains, to perform secondary clustering on the space-time domains having adjacent space-time domains, to obtain the corresponding reference portrait clustering result, and to correct the final portrait clustering result based on the calculated reference portrait clustering result, to obtain the optimized portrait clustering result.

[0175] Based on the above method, the adjacent space-time domains can be effectively avoided from forming interference, and the clustering effect and recall rate can be effectively improved.

[0176] The method provided in the embodiments of the present application can be used to perform portrait clustering on massive portrait data, and can effectively improve the accuracy of portrait clustering, and can achieve the following technical effects:

[0177] 1. On the one hand, the multiple spatial attributes of the lens are combined to determine the lens feature, and the lens feature is helpful to improve the accuracy of the final portrait clustering. On the other hand, the lens clustering parameters used for updating the lens clustering are adopted, the lens clustering is performed by using the updated lens clustering parameters, and then a lens clustering result is selected, and based on the lens clustering result, the final portrait clustering result is obtained. By improving the accuracy of the clustering result of the lens clustering, the accuracy of the final portrait clustering result is improved, and the problem of low accuracy of the clustering result in the prior art applied to the portrait clustering of massive portrait data is solved.

[0178] 2. After the set of lens clustering parameters is determined, the corresponding winning neurons of each lens in the unsupervised self-organizing mapping network are determined, and then the lens clustering result of the set of lens clustering parameters is obtained, which can effectively improve the accuracy of the lens clustering result.

[0179] 3. The set of lens clustering parameters is optimized by calculating the lens clustering evaluation value and selecting the lens clustering result corresponding to the optimal lens clustering evaluation value in the current round, and then a better lens clustering result is obtained by using the optimized set of lens clustering parameters, which can effectively improve the accuracy of the final portrait clustering result.

[0180] 4. The similarity between the time and / or space dimensions is calculated to determine the adjacent space-time domain more accurately, and the second portrait clustering is performed based on the determination of the adjacent space-time domain to correct the first portrait clustering result, thereby effectively avoiding the interference of adjacent space-time domains, i.e., the different class labels of the portrait clustering result corresponding to the object 1 in different space-time domains, which can effectively improve the clustering effect and recall rate.

[0181] Based on the same inventive concept, the present application also provides a portrait clustering device to improve the accuracy of portrait clustering and solve the problem of low accuracy of clustering results in the prior art when applied to portrait clustering of massive portrait data, as described in Figure 10 The device comprises:

[0182] The acquisition module 201 acquires the respective camera features of the plurality of cameras, wherein the camera features of a camera are used to represent the spatial attributes of the camera.

[0183] The camera clustering module 202 performs camera clustering on the camera features of the plurality of cameras based on a camera clustering parameter set when the first termination condition is not triggered, to obtain N camera clustering results corresponding to N camera clustering parameter sets; wherein the camera clustering parameter set is a set containing at least one camera clustering parameter.

[0184] The parameter updating module 203 updates the N camera clustering parameter sets based on the N camera clustering evaluation values of the N camera clustering results.

[0185] The camera class determination module 204 determines the respective classes of the plurality of cameras based on the camera clustering result corresponding to the maximum camera clustering evaluation value among all camera clustering evaluation values when the first termination condition is triggered.

[0186] The portrait clustering module 205 performs portrait clustering on the person images corresponding to the cameras belonging to the same class within a preset time period to obtain the final portrait clustering result.

[0187] In one possible design, the camera clustering module 202 is specifically configured to determine a self-organizing mapping network using a camera clustering parameter set to perform camera clustering, determine the respective winning neurons of the plurality of cameras in the self-organizing mapping network based on the respective camera features of the plurality of cameras, wherein the winning neuron is the neuron having the maximum similarity with a single camera feature among a plurality of neurons contained in the self-organizing mapping network, and determine the respective classes of the plurality of cameras based on the respective winning neurons of the plurality of cameras to obtain the camera clustering result corresponding to the camera clustering parameter set.

[0188] In a possible design, the socket clustering module 202 is specifically configured to: perform at least one iteration operation on each of the plurality of sockets respectively, until a second termination condition is triggered.

[0189] calculate a winning neuron corresponding to the single socket; determine a neighborhood range centered at the winning neuron based on a neighborhood radius in the socket clustering parameter set; wherein the neighborhood range includes at least one neuron; update weights of the neurons in the neighborhood range based on a learning rate in the socket clustering parameter set; update the neighborhood radius in the socket clustering parameter set based on a neighborhood radius adjustment parameter in the socket clustering parameter set; update the learning rate in the socket clustering parameter set based on a learning rate adjustment parameter in the socket clustering parameter set;

[0190] until the second termination condition is triggered, the winning neuron determined by the last iteration operation is taken as the winning neuron corresponding to the single socket.

[0191] In a possible design, the socket clustering module 202 is specifically configured to: trigger the second termination condition if the updated learning rate is less than or equal to a preset learning rate; or trigger the second termination condition if the number of iterations of the iteration operation performed on the single socket is greater than a preset iteration number.

[0192] In a possible design, the parameter updating module 203 is specifically configured to: calculate a socket clustering evaluation value corresponding to each of the N socket clustering results respectively, to obtain N socket clustering evaluation values of the N socket clustering results; sort the N socket clustering evaluation values according to numerical values, and select M socket clustering parameter sets corresponding to the first M socket clustering evaluation values; and update the N socket clustering parameter sets based on the M socket clustering parameter sets.

[0193] In a possible design, the socket category determining module 204 is specifically configured to: determine a first position vector of each of the N socket clustering parameter sets in a space, to obtain N first position vectors of the N socket clustering parameter sets in the space; adjust the N first position vectors based on distances between the N first position vectors and a preset position vector, to obtain N second position vectors; determine M second position vectors corresponding to the M socket clustering parameter sets, and calculate an average second position vector of the M second position vectors; adjust the N second position vectors based on the average second position vector, to obtain N target position vectors; and determine N socket clustering parameter sets corresponding to the N target position vectors.

[0194] In a possible design, the apparatus is further configured to: determine a portrait clustering result corresponding to each spatiotemporal domain in the set of spatiotemporal domains; wherein a single spatiotemporal domain contains person images corresponding to a camera in a preset time period and belonging to a same category; and perform the following operations on the single spatiotemporal domain in the set of spatiotemporal domains respectively.

[0195] determine a neighboring spatiotemporal domain of the single spatiotemporal domain; determine person images contained in the single spatiotemporal domain and the neighboring spatiotemporal domain, and perform portrait clustering on the determined person images to obtain a reference portrait clustering result corresponding to the single spatiotemporal domain; and correct the portrait clustering result corresponding to the single spatiotemporal domain based on the reference portrait clustering result.

[0196] correct the final portrait clustering result according to the corrected portrait clustering result corresponding to each spatiotemporal domain in the set of spatiotemporal domains.

[0197] In a possible design, the apparatus is further configured to: calculate a time similarity and a space similarity between each of other spatiotemporal domains and the single spatiotemporal domain; wherein the other spatiotemporal domains are spatiotemporal domains in the set of spatiotemporal domains except the single spatiotemporal domain; and select, from the other spatiotemporal domains, a spatiotemporal domain with a time similarity greater than a preset time threshold and / or a space similarity greater than a preset space threshold as the neighboring spatiotemporal domain of the single spatiotemporal domain.

[0198] Based on the apparatus, on one hand, the camera features are determined in combination with a plurality of space attributes of the camera, and the camera features are helpful to improve the accuracy of the final portrait clustering; on the other hand, the camera clustering parameters used for updating the camera clustering are adopted, the camera clustering is performed by using the updated camera clustering parameters, and then a camera clustering result is selected, and the final portrait clustering result is obtained based on the camera clustering result, which is helpful to improve the accuracy of the final portrait clustering result by improving the accuracy of the clustering result of the camera clustering, and solves the problem of low accuracy of the clustering result in the prior art when the prior art is applied to portrait clustering of massive portrait data.

[0199] Based on the same inventive concept, the embodiments of the present application further provide an electronic device, which can implement the functions of the foregoing portrait clustering apparatus, and refer to Figure 11 , the electronic device includes:

[0200] at least one processor 301 and a memory 302 connected with the at least one processor 301, and the specific connection medium between the processor 301 and the memory 302 is not limited in the embodiments of the present application, Figure 11 for example, the processor 301 and the memory 302 are connected through a bus 300. The bus 300 is used for Figure 11The connection between the other components is indicated by a thick line, which is only illustrative and not limited. The bus 300 can be divided into an address bus, a data bus, a control bus, etc. For convenience of representation, Figure 11 The bus is indicated by a thick line, but it does not mean that there is only one bus or only one type of bus. Alternatively, the processor 301 can also be called a controller, and the name is not limited.

[0201] In the embodiment of the present application, the memory 302 stores instructions executable by the at least one processor 301, and the at least one processor 301 can execute the portrait clustering method discussed above by executing the instructions stored in the memory 302. The processor 301 can implement the functions of each module in the device shown in the figure. Figure 10 The functions of each module in the device shown in the figure.

[0202] The processor 301 is the control center of the device, and can connect each part of the entire control device through various interfaces and lines, and monitor the entire device by running or executing the instructions stored in the memory 302 and calling the data stored in the memory 302. Various functions and processing data of the device, thereby overall monitoring the device.

[0203] In a possible design, the processor 301 can include one or more processing units, and the processor 301 can integrate an application processor and a modem processor, where the application processor mainly processes operating systems, user interfaces, and application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 301. In some embodiments, the processor 301 and the memory 302 can be implemented on the same chip, and in some embodiments, they can also be implemented on independent chips respectively.

[0204] The processor 301 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array, or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, which can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the portrait clustering method disclosed in conjunction with the embodiments of the present application can be directly embodied as execution completed by a hardware processor, or executed by a combination of hardware and software modules in the processor.

[0205] The memory 302, as a non-volatile computer readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 302 can include at least one type of storage medium, for example, can include flash memory, hard disk, multimedia card, card type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. The memory 302 is any other medium capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by a computer, but is not limited thereto. The memory 302 in the embodiments of the present application can also be a circuit or any other device capable of realizing a storage function, used to store program instructions and / or data.

[0206] By designing and programming the processor 301, the code corresponding to the portrait clustering method introduced in the foregoing embodiments can be fixed in the chip, so that the chip can execute the steps of the portrait clustering method of the embodiments shown in the running time. Figure 1 How to design and program the processor 301 is a technology known to those skilled in the art, and will not be described here.

[0207] Based on the same inventive concept, the embodiments of the present application also provide a storage medium storing computer instructions, when the computer instructions run on a computer, the computer instructions make the computer execute the portrait clustering method discussed above.

[0208] In some possible implementations, various aspects of the portrait clustering method provided by the present application can also be implemented in the form of a program product, which includes program code for making the control device execute the steps of the portrait clustering method according to various exemplary embodiments of the present application described above in the specification when the program product runs on the device.

[0209] Those skilled in the art will appreciate that embodiments of the present application can be devised for a variety of applications. FIG. 1 illustrates an example of a system 100 that can employ an embodiment of the present application. As shown in FIG. 1, system 100 can include a host computer 110 that is configured to communicate via one or more wired or wireless communication links 120 with one or more client devices 130. Host computer 110 can include a processor 112, a storage 114, and a communications interface 116. Processor 112 can include one or more processors, such as one or more general purpose processors (e.g., as described below in connection with FIG. 2). Storage 114 can include one or more non-transitory computer-readable storage medium, such as one or more hard disk drives, flash memories, or the like. Storage 114 can store a computer program 118 that is executable by processor 112. Communications interface 116 can include one or more interfaces to enable communications with a client device 130. For example, communications interface 116 can include a network interface controller (NIC) or the like. In some embodiments, host computer 110 can be a server computer that is configured to provide a service to a client device 130, such as a web server that provides web pages to a client device 130.

[0210] The present application is described below in reference to flowcharts and / or block diagrams that illustrate the methods, apparatus (systems) and computer program products according to embodiments of the present application. It will be understood that each block of the flowchart and / or block diagrams, and combinations of blocks in the flowchart and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processing element or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks.

[0211] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks.

[0212] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks. Figure 1 one or more functions specified in the flowchart and / or block diagram block or blocks.

[0213] Obviously, numerous modifications and variations of the present application are possible in light of the above teachings. It is therefore to be understood that within the scope of the claims and their equivalents, the application can be practiced otherwise than as specifically described.

Claims

1. A method for human face clustering, characterized in that, The method includes: Obtain the checkpoint features of each of the multiple checkpoints; wherein, the checkpoint features of a checkpoint are used to characterize multiple spatial attributes of the checkpoint. When the first termination condition is not triggered, checkpoint clustering is performed on the checkpoint features of the multiple checkpoints based on the checkpoint clustering parameter set, resulting in N checkpoint clustering results corresponding to N checkpoint clustering parameter sets; wherein, the checkpoint clustering parameter set is a set containing at least one checkpoint clustering parameter. The N checkpoint clustering evaluation values ​​are determined by calculating the silhouette coefficient SC. The N checkpoint clustering evaluation values ​​are sorted according to their numerical values, and the M checkpoint clustering parameter sets corresponding to the top M checkpoint clustering evaluation values ​​are selected. The Gray Wolf algorithm is used to update the N checkpoint clustering parameter sets based on the M checkpoint clustering parameter sets. When the first termination condition is triggered, the category to which each of the multiple checkpoints belongs is determined based on the checkpoint clustering result corresponding to the largest checkpoint clustering evaluation value among all checkpoint clustering evaluation values. Human image clustering is performed on the human images corresponding to the same checkpoint within a preset time period to obtain the final human image clustering result.

2. The method as described in claim 1, characterized in that, The step of performing checkpoint clustering based on the checkpoint clustering parameter set on the checkpoint features includes: A self-organizing mapping network for checkpoint clustering was determined using a checkpoint clustering parameter set; Based on the checkpoint features of each of the multiple checkpoints, the winning neuron corresponding to each of the multiple checkpoints in the self-organizing map network is determined; wherein, the winning neuron is the neuron with the highest similarity to a single checkpoint feature among the multiple neurons included in the self-organizing map network; Based on the winning neurons corresponding to each of the multiple checkpoints, the category to which each of the multiple checkpoints belongs is determined, and the checkpoint clustering result corresponding to the checkpoint clustering parameter set is obtained.

3. The method as described in claim 2, characterized in that, The step of determining the winning neuron corresponding to each of the multiple checkpoints in the self-organizing map network based on their respective checkpoint features includes: For each of the plurality of checkpoints, perform at least one of the following iterative operations: Calculate the winning neuron corresponding to each individual checkpoint; Based on the neighborhood radius in the set of clustering parameters, a neighborhood range centered on the winning neuron is determined; wherein, the neighborhood range includes at least one neuron; Based on the learning rate in the set of clustering parameters, update the weights of neurons within the neighborhood. The neighborhood radius in the checkpoint clustering parameter set is updated based on the neighborhood radius adjustment parameter in the checkpoint clustering parameter set. The learning rate in the checkpoint clustering parameter set is updated based on the learning rate adjustment parameter in the checkpoint clustering parameter set. Until the second termination condition is triggered, the winning neuron determined in the last iteration is taken as the winning neuron corresponding to the single checkpoint.

4. The method as described in claim 3, characterized in that, The second termination condition is specifically triggered as follows: If the updated learning rate is less than or equal to the preset learning rate, the second termination condition is triggered; or If the number of iterations performed by a single checkpoint exceeds the preset number of iterations, the second termination condition is triggered.

5. The method as described in claim 1, characterized in that, The step of updating the N checkpoint clustering parameter sets based on the M checkpoint clustering parameter sets includes: Determine the first position vector of each of the N checkpoint clustering parameter sets in space to obtain the N first position vectors of the N checkpoint clustering parameter sets in space; Based on the distance between each of the N first position vectors and the preset position vector, the N first position vectors are adjusted to obtain N second position vectors; Determine the M second position vectors corresponding to the M checkpoint clustering parameter sets, and calculate the average second position vector of the M second position vectors; Based on the average second position vector, the N second position vectors are adjusted to obtain N target position vectors; Determine the set of N checkpoint clustering parameters corresponding to the N target position vectors.

6. The method according to any one of claims 1-4, characterized in that, After obtaining the final portrait clustering results, the following is also included: Determine the human image clustering results corresponding to each spatiotemporal domain in the spatiotemporal domain set; wherein, a single spatiotemporal domain contains human images corresponding to checkpoints belonging to the same category within a preset time period; For each individual spatiotemporal domain in the set of spatiotemporal domains, the following operations are performed; Determine the neighboring spatiotemporal domains of the single spatiotemporal domain; The images of people contained in the single spatiotemporal domain and the neighboring spatiotemporal domains are determined, and portrait clustering is performed on the determined images of people to obtain the reference portrait clustering result corresponding to the single spatiotemporal domain. Based on the reference portrait clustering results, the portrait clustering results corresponding to the single spatiotemporal domain are corrected; The final portrait clustering result is corrected according to the corrected portrait clustering result corresponding to each spatiotemporal domain in the spatiotemporal domain set.

7. The method as described in claim 6, characterized in that, Determining the neighboring spatiotemporal domains of the single spatiotemporal domain includes: Calculate the temporal similarity and spatial similarity between each of the other spatiotemporal domains and the single spatiotemporal domain; wherein, the other spatiotemporal domains are the spatiotemporal domains in the set of spatiotemporal domains other than the single spatiotemporal domain; In the other spatiotemporal domains, a spatiotemporal domain with a temporal similarity greater than a preset time threshold and / or a spatial similarity greater than a preset spatial threshold is selected as the neighboring spatiotemporal domain of the single spatiotemporal domain.

8. A device for human face clustering, characterized in that, The device includes: The acquisition module acquires the checkpoint features of multiple checkpoints; wherein, the checkpoint features of a checkpoint are used to characterize multiple spatial attributes of the checkpoint. The checkpoint clustering module, when the first termination condition is not triggered, performs checkpoint clustering on the checkpoint features of the multiple checkpoints based on the checkpoint clustering parameter set, and obtains N checkpoint clustering results corresponding to N checkpoint clustering parameter sets; wherein, the checkpoint clustering parameter set is a set containing at least one checkpoint clustering parameter; The parameter update module determines the N checkpoint clustering evaluation values ​​of the N checkpoint clustering results by calculating the silhouette coefficient SC, sorts the N checkpoint clustering evaluation values ​​according to their numerical values, selects the M checkpoint clustering parameter sets corresponding to the top M checkpoint clustering evaluation values, and uses the Grey Wolf algorithm to update the N checkpoint clustering parameter sets based on the M checkpoint clustering parameter sets. The checkpoint category determination module, when the first termination condition is triggered, determines the category to which each of the multiple checkpoints belongs based on the checkpoint clustering result corresponding to the highest checkpoint clustering evaluation value among all checkpoint clustering evaluation values. The portrait clustering module performs portrait clustering on the images of people corresponding to the same category of checkpoints within a preset time period, and obtains the final portrait clustering result.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, when executing a computer program stored in the memory, implements the method steps of any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method described in any one of claims 1-7.

Citation Information

Patent Citations

  • Website clustering method and device

    CN111126419A

  • Portrait clustering method and device, electronic equipment and storage medium

    CN114037852A

  • Character image clustering method and device

    CN114155550A