Method for obtaining target training sample set and related device

By using multiple rounds of iterative clustering and pseudo-label filtering, the problem of inaccurate training sample sets for face recognition models was solved, thus improving the recognition accuracy.

CN115690883BActive Publication Date: 2026-04-14ZHEJIANG DAHUA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG DAHUA TECH CO LTD
Filing Date
2022-11-07
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

In existing technologies, the training sample set of face recognition models relies on the facial features of the initial training samples due to density clustering methods, resulting in the same object being distributed in multiple clusters, which reduces the recognition accuracy.

Method used

Through multiple rounds of iterative clustering, the pairs of clusters to be inspected are merged and pseudo-labels are set to select target clusters that meet the preset quality conditions, thus forming the target training sample set.

Benefits of technology

This improves the recognition accuracy of the face recognition model, avoids the situation where the same object's data is distributed across multiple clusters, and enhances the accuracy of the training sample set.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115690883B_ABST
    Figure CN115690883B_ABST
Patent Text Reader

Abstract

The application relates to the computer technical field, and in particular to a target training sample set obtaining method and related device, the method is: based on the initial training sample set containing each sample face feature, performing multi-round iteration clustering to obtain a candidate cluster set; each suspected data is respectively attributed to a candidate cluster as a to-be-checked cluster pair, and for each to-be-checked cluster pair, the following operations are respectively performed: when the similarity of the non-face features respectively associated with each sample face feature contained in a to-be-checked cluster pair reaches a non-face feature threshold, the to-be-checked cluster pair is merged into a corresponding fusion cluster; from each candidate cluster and each fusion cluster obtained by not being merged, each target cluster meeting a preset quality condition is screened out, and a pseudo label representing a sample object type is respectively set for each target cluster to obtain a target training sample set. In this way, the accuracy of the target training sample set is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method and related apparatus for obtaining a target training sample set. Background Technology

[0002] Facial recognition models are often trained using deep learning on massive amounts of training data. However, this training data cannot cover all styles of data, inevitably leading to inadequacies in adaptability to image data of certain groups, such as ethnic differences, resulting in poor training performance. Furthermore, this data often comes from on-site observation, and manually adding supervised labels on-site consumes significant resources. Therefore, unsupervised facial recognition learning methods are needed, allowing the facial recognition model to automatically and unsupervisedly iterate and optimize on-site to better adapt to the styles of the people present.

[0003] In related technologies, when training a face recognition model, facial features are usually extracted from the initial training sample set and then density clustering is performed to obtain various clusters. Then, each cluster is assigned a corresponding pseudo-label to mark the data type of different clusters, thus obtaining the target training sample set. Finally, the face recognition model is trained based on the target training sample set.

[0004] However, since density clustering methods rely on facial feature data contained in the initial training samples, when facial feature data is not obvious, the same object may be distributed in multiple clusters, resulting in an inaccurate target training sample set. This interferes with the training of the face recognition model and reduces the recognition accuracy of the face recognition model.

[0005] In view of this, the sample quality of the target training sample set used to train face recognition models under the relevant technologies needs to be further improved. Summary of the Invention

[0006] This application provides a method and related apparatus for obtaining a target training sample set to improve the recognition accuracy of a face recognition model.

[0007] The specific technical solutions provided in this application are as follows:

[0008] Firstly, a method for obtaining a target training sample set is provided, including:

[0009] Based on the initial training sample set containing facial features of each sample, multiple rounds of iterative clustering are performed to obtain a candidate cluster set. In one round of iteration, the following operations are performed: training sample clustering is performed based on the similarity between facial features of each sample currently contained in the initial training sample set to obtain at least one candidate cluster. Two sample facial features whose values ​​belong to a preset suspected interval are marked as suspected data pairs. An updated initial training sample set is obtained based on at least one candidate cluster.

[0010] Each suspected data pair is assigned to a candidate cluster as a cluster to be checked. For each cluster to be checked, the following operations are performed: when the similarity of the non-facial features associated with the facial features of each sample in a cluster to be checked reaches the non-facial feature threshold, the cluster to be checked is merged into the corresponding fusion cluster.

[0011] From the candidate clusters that have not been merged and the fused clusters that have been obtained, select the target clusters that meet the preset quality conditions, and set pseudo-labels representing the sample object type for each target cluster to obtain the target training sample set.

[0012] Secondly, an apparatus for obtaining a target training sample set is provided, comprising:

[0013] The first processing module is used to perform multiple rounds of iterative clustering based on an initial training sample set containing facial features of each sample to obtain a candidate cluster set. In one round of iteration, the following operations are performed: training sample clustering is performed based on the similarity between facial features of each sample currently contained in the initial training sample set to obtain at least one candidate cluster; two sample facial features whose values ​​belong to a preset suspected interval are marked as suspected data pairs; and an updated initial training sample set is obtained based on at least one candidate cluster.

[0014] The second processing module is used to treat each suspected data pair as a candidate cluster to be checked as a cluster pair to be checked, and to perform the following operations for each cluster pair to be checked: when the similarity of the non-facial features associated with the facial features of each sample in a cluster pair to be checked reaches the non-facial feature threshold, the cluster pair to be checked is merged into the corresponding fusion cluster.

[0015] The determination module is used to select target clusters that meet preset quality conditions from the unmerged candidate clusters and the obtained fused clusters, and to set pseudo-labels representing the sample object type for each target cluster to obtain the target training sample set.

[0016] Optionally, when clustering training samples based on the similarity between facial features of each sample currently included in the initial training sample set to obtain at least one candidate cluster, and marking two sample facial features whose values ​​belong to a preset suspected interval as suspected data pairs, the first processing module is further configured to:

[0017] Based on the preset data attribute information, the initial training sample set is divided into various initial sample blocks;

[0018] For each initial sample block, perform the following operations:

[0019] Training samples are clustered based on the similarity between facial features of each sample contained in an initial sample block to obtain at least one candidate cluster corresponding to an initial sample block; wherein, during the clustering process, two sample facial features whose values ​​belong to a preset suspected interval are marked as suspected data pairs.

[0020] Optionally, when clustering training samples based on the similarity between facial features of each sample contained in an initial sample block to obtain at least one candidate cluster corresponding to the initial sample block; wherein, during the clustering process, two sample facial features whose values ​​belong to a preset suspected interval are marked as suspected data pairs, the first processing module is further configured to:

[0021] The first clustering is performed based on the similarity between the facial features of each sample contained in an initial sample block to obtain the initial clusters corresponding to the initial sample block;

[0022] For each sample's facial features, perform the following operations: if the similarity between any two sample facial features is less than the first similarity threshold and greater than the suspected similarity threshold, then mark the two sample facial features as the corresponding suspected data pair;

[0023] For each initial class group, perform the following operations: divide an initial class group into at least one subclass group, perform feature extraction processing on the facial features of each sample contained in each subclass group to obtain the target class group features corresponding to at least one subclass group, and add the obtained at least one target class group features to an initial class group to obtain the corresponding target class group.

[0024] A second clustering is performed based on the similarity between the target clusters to obtain at least one candidate cluster.

[0025] Optionally, when obtaining the updated initial training sample set based on at least one candidate class cluster, the first processing module is further configured to:

[0026] For at least one candidate cluster, perform the following operations respectively: divide a candidate cluster into at least one sub-cluster, and perform feature extraction processing on the facial features of each sample contained in each sub-cluster to obtain the target cluster features corresponding to at least one sub-cluster.

[0027] Each sample facial feature in each initial sample block is replaced with the target cluster feature corresponding to each initial sample block, and then used as the target sample block.

[0028] Based on the preset data attribute information, each target sample block is summarized to obtain each updated sample block, and each updated sample block is used as the updated initial training sample set.

[0029] Optionally, after treating each suspected data pair and its corresponding candidate cluster as a single cluster pair to be checked, the second processing module is further configured to:

[0030] For each pair of class clusters to be checked, perform the following operations:

[0031] When the similarity of the suspected data pairs contained in a pair of clusters to be checked to their respective associated non-facial features does not reach the non-facial feature threshold, the pair of clusters to be checked is treated as a pair of clusters to be judged.

[0032] Based on the number of samples and sample evaluation results of the two candidate clusters within a pair of clusters to be determined, the interference determination results of the two candidate clusters within a pair of clusters to be determined are obtained. The sample evaluation results include the quality evaluation values ​​of each training sample in each of the two candidate clusters.

[0033] The interference determination results are used to identify candidate clusters that represent interference.

[0034] Optionally, when obtaining the interference determination results for each of the two candidate clusters within a pair of clusters to be determined based on the sample count and sample evaluation results of each of the two determination clusters, the second processing module is further configured to:

[0035] If two candidate clusters within a pair of clusters to be determined satisfy at least one of the following conditions, then based on the number of samples corresponding to each of the two candidate clusters within the pair of clusters to be determined, the interference determination result corresponding to each of the two candidate clusters within the pair of clusters to be determined is determined:

[0036] The number of samples corresponding to at least one candidate cluster within a pair of clusters to be determined is not greater than the first sample number threshold.

[0037] The maximum evaluation value among the quality evaluation values ​​included in the sample evaluation result corresponding to at least one candidate cluster within a cluster pair to be determined is not greater than a preset first evaluation threshold.

[0038] The average quality assessment value of the sample evaluation results corresponding to at least one candidate cluster within a cluster pair to be determined is not greater than a preset second evaluation threshold.

[0039] Optionally, when determining the interference determination result for each of the two candidate clusters within a pair of clusters to be determined, based on the number of samples corresponding to each of the two candidate clusters, the second processing module is further configured to:

[0040] Compare the number of samples corresponding to one candidate cluster within a cluster to be determined with the number of samples corresponding to another candidate cluster;

[0041] The interference result of the candidate cluster with a small number of samples is recorded as interference.

[0042] Optionally, when selecting target clusters that meet preset quality conditions from the unmerged candidate clusters and the obtained fused clusters, the determining module is further configured to:

[0043] All unmerged candidate clusters and all obtained fused clusters are treated as clusters to be screened, and the following operations are performed on each cluster to be screened:

[0044] Based on the number of samples and the sample evaluation results of a cluster to be screened, a pass / fail determination result for a cluster to be screened is obtained; wherein, the sample evaluation results include: the quality evaluation value of each training sample in the cluster to be screened;

[0045] The clusters to be screened that meet the criteria are identified by the criteria assessment results and are used as the target clusters.

[0046] Delete the screening clusters whose criteria for compliance have not been met.

[0047] Optionally, when selecting target clusters that meet preset quality conditions from the unmerged candidate clusters and the obtained fused clusters, the determining module is further configured to:

[0048] All unmerged candidate clusters and all obtained fused clusters are treated as clusters to be screened, and the following operations are performed on each cluster to be screened:

[0049] Based on the number of samples and the sample evaluation results of a cluster to be screened, a pass / fail determination result for a cluster to be screened is obtained; wherein, the sample evaluation result includes: the quality evaluation value of each training sample in the cluster to be screened;

[0050] The clusters to be screened that meet the criteria are identified by the criteria assessment results and are used as the target clusters.

[0051] Delete the screening clusters whose criteria for compliance have not been met.

[0052] Optionally, when determining the compliance judgment result of a cluster to be screened based on the maximum evaluation value among the quality evaluation values ​​included in the sample evaluation results, and the average evaluation value of the quality evaluation values, the determining module is further used to:

[0053] If the maximum evaluation value of a cluster to be screened is greater than the preset third evaluation threshold, and the average evaluation value of a cluster to be screened is greater than the preset fourth evaluation threshold, then the standard-reaching result of a cluster to be screened is determined to be compliant.

[0054] If the maximum evaluation value corresponding to a cluster to be screened is not greater than the preset third evaluation threshold, or if the average evaluation value corresponding to a cluster to be screened is not greater than the preset fourth evaluation threshold, then the compliance determination result of a cluster to be screened is determined to be non-compliant.

[0055] Thirdly, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method described in any of the first aspects above.

[0056] Fourthly, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any of the first aspects above.

[0057] In this embodiment, after obtaining the initial training sample set, multiple rounds of iterative clustering are performed based on the initial training sample set containing the facial features of each sample to obtain a candidate cluster set. Each suspected data pair is assigned to a candidate cluster as a pair of clusters to be checked. For each pair of clusters to be checked, the following operations are performed: when the similarity of the non-facial features associated with the facial features of each sample in a pair of clusters to be checked reaches a non-facial feature threshold, the pair of clusters to be checked is merged into a corresponding fusion cluster. From the unmerged candidate clusters and the obtained fusion clusters, target clusters that meet preset quality conditions are selected, and pseudo-labels representing the sample object type are set for each target cluster to obtain the target training sample set. In this way, after clustering the initial training sample set, the pairs of clusters to be checked are merged based on non-facial features, avoiding the situation where training samples of the same object are distributed under multiple target clusters, improving the accuracy of the target training sample set, and thus improving the recognition accuracy of the face recognition model. Attached Figure Description

[0058] Figure 1 This is a schematic diagram of an application scenario in the embodiments of this application;

[0059] Figure 2 This is a flowchart illustrating the method for obtaining the target training sample set in an embodiment of this application;

[0060] Figure 3 This is a flowchart illustrating the clustering process in an embodiment of this application;

[0061] Figure 4 This is a schematic diagram of the process for determining at least one candidate cluster and each suspected data pair corresponding to the initial training sample set in an embodiment of this application;

[0062] Figure 5 This is a schematic diagram of each initial sample block in the embodiments of this application;

[0063] Figure 6 This is a schematic diagram illustrating the process of determining at least one candidate cluster and each suspected data pair corresponding to an initial sample block in an embodiment of this application.

[0064] Figure 7 This is a schematic diagram of the first clustering in an embodiment of this application;

[0065] Figure 8 This is a schematic diagram illustrating the acquisition of the target class group in an embodiment of this application;

[0066] Figure 9 This is a schematic diagram of the process for obtaining the updated initial training sample set in an embodiment of this application;

[0067] Figure 10 This is a schematic diagram illustrating the acquisition of each target sample block in the embodiments of this application;

[0068] Figure 11 This is a schematic diagram illustrating the obtained updated sample blocks in the embodiments of this application;

[0069] Figure 12 This is a schematic diagram illustrating the process of obtaining fused clusters and deleting interfering candidate clusters in an embodiment of this application;

[0070] Figure 13 This is a schematic diagram illustrating the fusion cluster obtained in an embodiment of this application;

[0071] Figure 14 This is a flowchart illustrating the process of obtaining the interference determination results for each of the two candidate clusters within a pair of clusters to be determined in this application embodiment.

[0072] Figure 15 This is a schematic diagram illustrating the candidate clusters representing interference based on the interference determination results in the embodiments of this application;

[0073] Figure 16 This is a flowchart illustrating the process of determining the interference determination result in an embodiment of this application;

[0074] Figure 17 This is a schematic diagram illustrating the acquisition of the target training sample set in an embodiment of this application;

[0075] Figure 18 This is a schematic diagram illustrating the process of determining each target cluster in the embodiments of this application;

[0076] Figure 19 This is a schematic diagram of the first process for determining the compliance judgment result of a cluster to be screened in an embodiment of this application;

[0077] Figure 20 This is a schematic diagram of the second process for determining the compliance judgment result of a cluster to be screened in an embodiment of this application;

[0078] Figure 21 This is a schematic diagram of the structure of the device for obtaining the target training sample set in the embodiments of this application;

[0079] Figure 22 This is a schematic diagram of the structure of the electronic device in the embodiments of this application. Detailed Implementation

[0080] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0081] The following explanations of some terms used in the embodiments of this application are provided to facilitate understanding by those skilled in the art.

[0082] The following explanations of some terms used in the embodiments of this application are provided to facilitate understanding by those skilled in the art.

[0083] (1) Face recognition: also known as facial recognition, is a biometric technology that identifies individuals based on their facial features. It involves using cameras or webcams to capture images or video streams containing faces, automatically detecting and tracking faces in the images, and then performing face recognition on the detected faces.

[0084] (2) Density clustering: Examine the continuity between training samples from the perspective of training sample density, and continuously expand the clusters based on the connectable training samples to obtain the final clustering result.

[0085] (3) Hierarchical clustering: The training sample set is divided at different levels to form a tree-like clustering structure. The training sample set can be divided using a bottom-up aggregation strategy or a top-down splitting strategy.

[0086] (4) Processing Equipment: Used to process the acquired initial training sample set to obtain the target training sample set. The processing equipment can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. It can also be an electronic device, including but not limited to mobile phones, computers, intelligent voice interaction devices, e-book readers, smart home appliances, vehicle terminals, and aircraft, etc., which are computer devices with certain computing capabilities, or electronic devices with image acquisition capabilities.

[0087] (5) Terminal equipment: used to collect training samples. The terminal equipment can be any one or a combination of cameras, mobile phones, computers, and other terminal equipment capable of collecting images or videos.

[0088] The preferred embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0089] like Figure 1 The diagram illustrates an application scenario of an embodiment of this application. The application scenario diagram includes a processing device 110 and terminal devices 120 (including terminal devices 1201, 1202, ..., 120n). The processing device 110 and the terminal devices 120 can communicate via a communication network. The processing device 110 receives a training sample set sent by the terminal devices 120. The processing device 110 performs multiple rounds of iterative clustering on the initial training sample set to obtain a candidate cluster set. Then, it treats each suspected data pair and its respective candidate cluster as a pair of clusters to be checked, merges and deletes these pairs, and finally, from the unmerged candidate clusters and the obtained fused clusters, it selects target clusters that meet preset quality conditions. It then sets pseudo-labels representing the sample object type for each target cluster to obtain a target training sample set, and uses this target training sample set to train the face recognition model to be trained.

[0090] It should be noted that in some possible application scenarios of this application, the face recognition model can be installed on the processing device 110, so that the processing device 110 can directly use the face recognition model to process the training samples obtained directly or indirectly. The face recognition model can be trained by the processing device 110 itself, or it can be trained by other devices and then provided to the processing device 110. The training samples recognized by the processing device 110 may be collected by itself, or they may be obtained from other devices.

[0091] Based on the above embodiments, see Figure 2 The diagram shown is a flowchart illustrating a vehicle lane change determination method according to an embodiment of this application, specifically including:

[0092] Step 20: Based on the initial training sample set containing the facial features of each sample, perform multiple rounds of iterative clustering to obtain a candidate class cluster set.

[0093] In this embodiment of the application, an initial training sample set is received from a terminal device, features are extracted from the initial training sample set to obtain an initial training sample set containing facial features of each sample, and multiple rounds of iterative clustering are performed based on the obtained initial training sample set to obtain a candidate class cluster set.

[0094] See Figure 3 As shown, it is a flowchart illustrating the clustering process in an embodiment of this application. The following is a detailed explanation in conjunction with the attached diagram. Figure 3 The operations performed during one iteration of the initial training sample set are explained.

[0095] Step 200: Cluster the training samples based on the similarity between the facial features of each sample currently included in the initial training sample set to obtain at least one candidate cluster, and mark two sample facial features whose values ​​belong to the preset suspected interval as suspected data pairs.

[0096] Specifically, during step 200, the processing device performs the following operations. (See also...) Figure 4 As shown, this is a flowchart illustrating the process of determining at least one candidate cluster and each suspected data pair corresponding to the initial training sample set in an embodiment of this application. The following is a detailed explanation in conjunction with the attached diagram. Figure 4 The specific operations to be performed will be explained in detail:

[0097] Step 2000: Based on the preset data attribute information, divide the initial training sample set into initial sample blocks.

[0098] In this embodiment of the application, the obtained initial training sample set is divided into initial sample blocks based on preset data attribute information.

[0099] The preset data attribute information can be at least one of time interval, location range and sample number threshold, and this application embodiment does not impose any restrictions on this.

[0100] For example, see Figure 5 The diagram shown is a schematic representation of each initial sample block in an embodiment of this application. Assuming a time interval of one day and a sample size threshold of 100,000, the training samples within one day are... Figure 5The indicated location range is divided into initial sample blocks A, B, C, D, E, F, G, and H. The number of samples in each initial sample block does not exceed the sample number threshold of 100,000.

[0101] Step 2001: For each initial sample block, perform the following operations: cluster the training samples based on the similarity between the facial features of each sample contained in an initial sample block to obtain at least one candidate cluster corresponding to an initial sample block. In the clustering process, two sample facial features whose values ​​belong to the preset suspected interval are marked as suspected data pairs.

[0102] Specifically, during step 2001, the processing device performs the following operations. (See also...) Figure 6 As shown, this is a flowchart illustrating the process of determining at least one candidate cluster and each suspected data pair corresponding to an initial sample block in an embodiment of this application. The following is a detailed explanation in conjunction with the attached diagram. Figure 6 The specific operations to be performed will be explained in detail:

[0103] Step 2001-1: Perform the first clustering based on the similarity between the facial features of each sample contained in an initial sample block to obtain the initial clusters corresponding to the initial sample block.

[0104] In this embodiment of the application, a first clustering is performed based on the similarity between the facial features of each sample contained in an initial sample block. The facial features of each sample with a similarity greater than a similarity threshold are connected into an initial cluster to obtain the initial clusters corresponding to an initial sample block.

[0105] For example, see Figure 7 The diagram shown illustrates the first clustering process in this embodiment. Density clustering is performed based on the cosine similarity between facial features of each sample in an initial sample block. The cosine similarity between facial feature a and facial feature c is 0.71, the cosine similarity between facial feature a and facial feature d is 0.73, and the cosine similarity between facial feature c and facial feature d is 0.72. Facial features a, c, and d with a cosine similarity greater than the cosine similarity threshold of 0.7 are connected into an initial cluster.

[0106] Step 2001-2: For each sample facial feature, perform the following operations: If the similarity between any two sample facial features is less than the first similarity threshold and greater than the suspected similarity threshold, then mark the two sample facial features as the corresponding suspected data pair.

[0107] In this embodiment of the application, during the first clustering process, if the similarity between the facial features of any two samples is less than the first similarity threshold and greater than the suspected similarity threshold, then the facial features of the two samples are marked as the corresponding suspected data pair.

[0108] For example, such as Figure 7 As shown, assuming the first similarity threshold is 0.7, the suspected similarity threshold is 0.6, and the cosine similarity between sample facial feature a and sample facial feature b is 0.66, then sample facial feature a and sample facial feature b are marked as suspected data pairs.

[0109] Step 2001-3: For each initial class group, perform the following operations: Divide an initial class group into at least one subclass group, perform feature extraction processing on the facial features of each sample contained in each subclass group, obtain the target class group features corresponding to at least one subclass group, and add the obtained at least one target class group features to an initial class group to obtain the corresponding target class group.

[0110] In this embodiment of the application, after obtaining each initial class group, the following operations are performed for each initial class group: dividing an initial class group into at least one subclass group, calculating the average value of sample facial features for each sample facial feature contained in each subclass group, and adding the obtained average value of at least one sample facial feature to the initial class group to obtain the target class group corresponding to the initial class group.

[0111] For example, see Figure 8 The diagram shown is a schematic of obtaining the target class group in an embodiment of this application. The initial class group 1 is divided into subclass groups 1.1, 1.2, and 1.3. The mean value of the sample facial features of each subclass group is calculated to obtain the mean values ​​of the sample facial features 50, 60, and 55 corresponding to subclass groups 1.1, 1.2, and 1.3. The obtained target class group features 50, 60, and 55 are added to the initial class group 1 to obtain the target class group 1 containing the sample facial features of the initial class group 1 and the values ​​50, 60, and 55.

[0112] In addition, it should be noted that obtaining the target cluster features corresponding to at least one sub-cluster can also be achieved by selecting some facial sample features as target cluster features through factors such as training sample quality and training sample collection time. This application does not impose any restrictions on this.

[0113] Step 2001-4: Perform a second clustering based on the similarity between each target cluster to obtain at least one candidate cluster.

[0114] In this embodiment of the application, after obtaining each target cluster, hierarchical clustering is performed based on the average distance, connection ratio, average distance threshold and connection ratio threshold between each target cluster to obtain at least one candidate cluster.

[0115] For example, assuming the average distance threshold is 75, the connection ratio threshold is 65%, the average distance between target cluster 1 and target cluster 2 is 80, the connection ratio between target cluster 1 and target cluster 2 is 70%, the average distance between target cluster 1 and target cluster 3 is 79, and the connection ratio between target cluster 1 and target cluster 2 is 71%, then the average distance between target cluster 1 and target cluster 2 is greater than the average distance threshold, the connection ratio between target cluster 1 and target cluster 2 is greater than the connection ratio threshold, the average distance between target cluster 1 and target cluster 3 is greater than the average distance threshold, and the connection ratio between target cluster 1 and target cluster 3 is greater than the connection ratio threshold. By summing up target cluster 1, target cluster 2, and target cluster 3, candidate cluster 1 is obtained.

[0116] Step 201: Obtain the updated initial training sample set based on at least one candidate class cluster.

[0117] Specifically, during step 201, the processing device performs the following operations. (See also...) Figure 9 As shown, this is a schematic diagram of the process for obtaining the updated initial training sample set in an embodiment of this application. The following is a detailed explanation in conjunction with the attached diagram. Figure 9 The specific operations to be performed will be explained in detail:

[0118] Step 2010: For at least one candidate cluster, perform the following operations respectively: Divide a candidate cluster into at least one sub-cluster, and perform feature extraction processing on the facial features of each sample contained in each sub-cluster to obtain the target cluster features corresponding to each of the at least one sub-cluster.

[0119] In this embodiment of the application, after obtaining at least one candidate cluster, the following operations are performed for each candidate cluster: dividing a candidate cluster into at least one sub-cluster, calculating the mean value of the sample facial features for each sample facial feature contained in each sub-cluster, and using the mean value of the sample facial features corresponding to each of the at least one sub-cluster as the target cluster feature corresponding to each of the at least one sub-cluster.

[0120] For example, see Figure 10 The diagram shown is a schematic of obtaining each target sample block in an embodiment of this application. Candidate cluster 1 is divided into sub-clusters 1.1, 1.2, and 1.3. The mean value of the sample facial features of each sub-cluster is calculated, and the mean values ​​of the sample facial features corresponding to sub-clusters 1.1, 1.2, and 1.3 are obtained as 55, 60, and 65, respectively. The mean value of the sample facial features obtained as 55 is used as the target cluster feature of sub-cluster 1.1, the mean value of the sample facial features obtained as 60 is used as the target cluster feature of sub-cluster 1.2, and the mean value of the sample facial features obtained as 65 is used as the target cluster feature of sub-cluster 1.3.

[0121] In addition, it should be noted that obtaining the target cluster features corresponding to at least one sub-cluster can also be achieved by selecting some facial sample features as target cluster features through factors such as training sample quality and training sample collection time. This application does not impose any restrictions on this.

[0122] Step 2011: Replace the facial features of each sample in each initial sample block with the target cluster features corresponding to each initial sample block, and use them as target sample blocks.

[0123] In this embodiment of the application, after obtaining the target cluster features corresponding to each initial sample block, the following operations are performed for at least one initial sample block: replacing the facial features of each sample in an initial sample block with the target cluster features of the sub-clusters contained in each of the at least one candidate clusters corresponding to the initial sample block, and using them as target sample blocks.

[0124] For example, such as Figure 10 As shown, the initial sample block A contains candidate clusters 1, 2, 3, and 4. Candidate cluster 1 is divided into sub-clusters 1.1, 1.2, and 1.3; candidate cluster 2 is divided into sub-clusters 2.1 and 2.2; candidate cluster 3 is divided into sub-clusters 3.1, 3.2, and 3.3; and candidate cluster 4 is divided into sub-cluster 4.1. The target cluster feature of sub-cluster 1.1 is 55; the target cluster feature of sub-cluster 1.2 is 60; and the target cluster feature of sub-cluster 1.3 is... The target cluster features of sub-cluster 2.1 are 54, the target cluster features of sub-cluster 2.2 are 56, the target cluster features of sub-cluster 3.1 are 58, the target cluster features of sub-cluster 3.2 are 59, the target cluster features of sub-cluster 3.3 are 60, and the target cluster features of sub-cluster 4.1 are 62. The facial features of each sample in the initial sample block A are replaced with the target cluster features 54, 55, 56, 58, 59, 60, 60, 62, and 65 to obtain the target sample block A.

[0125] Step 2012: Based on the preset data attribute information, summarize each target sample block to obtain each updated sample block, and use each updated sample block as the updated initial training sample set.

[0126] The preset data attribute information can be at least one of time information, location information, and sample quantity threshold, and this application embodiment does not impose any restrictions on this.

[0127] In this embodiment of the application, after obtaining each target sample block, based on the location information and sample number threshold of each target sample block, the target sample blocks adjacent to each other in location information are summarized to obtain each updated sample block. The sample number of each updated sample block does not exceed the sample number threshold, and each updated sample block is used as the updated initial training sample set for the next round of iterative clustering.

[0128] For example, see Figure 11 The diagram illustrates how updated sample blocks are obtained in this embodiment of the application. Adjacent target sample blocks A, B, and C are aggregated to obtain updated sample block A, with a sample count of 90,000, not exceeding the sample count threshold of 100,000. Adjacent target sample blocks D, E, and F are aggregated to obtain updated sample block B, with a sample count of 95,000, not exceeding the sample count threshold of 100,000. Adjacent target sample blocks G and H are aggregated to obtain updated sample block C, with a sample count of 80,000, not exceeding the sample count threshold of 100,000.

[0129] In this embodiment, multiple rounds of iterative clustering are performed on the initial training sample set, which can complete the clustering of massive initial training sample sets and ensure the purity of each candidate cluster.

[0130] Step 21: Treat each suspected data pair as a candidate cluster to be checked, and perform the following operations for each cluster to be checked: when the similarity of the non-facial features associated with the facial features of each sample in a cluster to be checked reaches the non-facial feature threshold, merge the cluster to be checked into the corresponding fusion cluster.

[0131] Specifically, during step 21, the processing device performs the following operations. (See also...) Figure 12 As shown, this is a schematic diagram illustrating the process of obtaining fused clusters and deleting interfering candidate clusters in an embodiment of this application. The following is a detailed explanation in conjunction with the attached diagram. Figure 12 The specific operations to be performed will be explained in detail:

[0132] Step 210: Each suspected data pair belongs to a candidate cluster as a cluster pair to be checked.

[0133] In this embodiment of the application, the following operations are performed for each suspected data pair: the candidate clusters to which the two suspected data in a suspected data pair belong are taken as a cluster pair to be checked.

[0134] For example, see Figure 13 The diagram shown is a schematic diagram of obtaining fusion clusters in an embodiment of this application. The candidate cluster 1 to which facial sample feature a in the suspected data pair belongs and the candidate cluster 3 to which facial sample feature b in the suspected data pair belong are taken as the cluster pair to be checked 1.

[0135] For each pair of class clusters to be checked, perform the following operations:

[0136] Step 211: Determine whether the similarity of the non-facial features associated with the facial features of each sample in a cluster to be checked reaches the non-facial feature threshold. If yes, proceed to step 212; otherwise, proceed to step 213.

[0137] Step 212: Merge a pair of clusters to be checked into the corresponding fused clusters.

[0138] In this embodiment, the non-facial samples corresponding to the facial features of each sample in a pair of clusters to be inspected are input into a trained non-facial recognition model. The non-facial recognition model is used to extract non-facial features from the non-facial samples to obtain the non-facial features associated with each sample's facial features. It is then determined whether the similarity of the non-facial features associated with each sample's facial features in a pair of clusters to be inspected reaches the non-facial feature threshold. If the similarity of the non-facial features associated with each sample's facial features in a pair of clusters to be inspected reaches the non-facial feature threshold, then the pair of clusters to be inspected is merged into the corresponding fusion cluster.

[0139] For example, such as Figure 13 As shown, assuming the average distance threshold for non-facial features is 80, the connection ratio threshold is 70%, the average distance between candidate cluster 1 and candidate cluster 3 for non-facial features is 85, and the connection ratio for non-facial features is 80%, then the similarity of the non-facial features associated with the facial features of each sample in candidate cluster 1 and candidate cluster 3 in the cluster pair to be examined reaches the non-facial feature threshold. Therefore, candidate cluster 1 and candidate cluster 3 in the cluster pair to be examined are merged into fusion cluster 1.

[0140] Non-facial features can include head and shoulder features and other human body features, and this application does not impose any restrictions on them.

[0141] In this embodiment of the application, in order to save resources and improve efficiency, the terminal device collects non-facial samples corresponding to the facial features of each sample during the idle time period at night.

[0142] In this way, based on the supplementation of non-facial features, the clusters to be inspected are merged into corresponding fusion clusters, avoiding the situation where the same object sample is distributed under multiple clusters, improving the sample quality of the target training sample set, and thus improving the recognition accuracy of the face recognition model.

[0143] Step 213: Treat a pair of clusters to be checked as a pair of clusters to be decided.

[0144] In this embodiment, the non-facial samples corresponding to the facial features of each sample in a cluster pair to be checked are input into a trained non-facial recognition model. The non-facial recognition model is used to extract non-facial features from the non-facial samples to obtain the non-facial features associated with each sample's facial features. It is then determined whether the similarity of the non-facial features associated with each sample's facial features in a cluster pair to be checked reaches the non-facial feature threshold. If the similarity of the non-facial features associated with each sample's facial features in a cluster pair to be checked does not reach the non-facial feature threshold, then the cluster pair to be checked is treated as a cluster pair to be judged.

[0145] For example, assuming the average distance threshold for non-facial features is 80 and the connection ratio threshold is 70%, the average distance between non-facial features of candidate cluster 1 and candidate cluster 3 is 75 and the non-facial feature connection ratio is 65%, then the similarity of the non-facial features associated with the facial features of each sample in candidate cluster 1 and candidate cluster 3 in the cluster pair to be checked does not reach the non-facial feature threshold, and candidate cluster 1 and candidate cluster 3 in the cluster pair to be checked are regarded as a cluster pair to be determined.

[0146] Step 214: Based on the number of samples and the sample evaluation results of the two candidate clusters within a pair of clusters to be determined, obtain the interference determination results of the two candidate clusters within a pair of clusters to be determined.

[0147] The sample evaluation results include the quality evaluation values ​​of each training sample in each of the two candidate clusters.

[0148] Specifically, during step 214, the processing device performs the following operations. (See also...) Figure 14 As shown, this is a flowchart illustrating the process of obtaining the interference determination results for each of the two candidate clusters within a pair of clusters to be determined, as described in this embodiment of the application. The following is a detailed explanation in conjunction with the attached diagram. Figure 14 The specific operations to be performed will be explained in detail:

[0149] Step 2140: Determine whether the two candidate clusters within a cluster pair to be determined satisfy at least one of the following conditions. If yes, proceed to step 2141; otherwise, proceed to step 2142.

[0150] Condition 1: The number of samples corresponding to at least one candidate cluster within a pair of clusters to be determined is not greater than the first sample number threshold.

[0151] Condition 2: The maximum quality assessment value among the sample evaluation results corresponding to at least one candidate cluster within a cluster pair to be determined is not greater than the preset first evaluation threshold.

[0152] Condition 3: The average quality assessment value of the sample evaluation results corresponding to at least one candidate cluster within a pair of clusters to be determined is not greater than the preset second evaluation threshold.

[0153] Step 2141: Based on the number of samples corresponding to the two candidate clusters within a pair of clusters to be determined, determine the interference determination result corresponding to the two candidate clusters within a pair of clusters to be determined.

[0154] In this embodiment of the application, it is determined whether the two candidate clusters within a cluster to be determined satisfy at least one of the above conditions. If at least one condition is satisfied, the interference determination result corresponding to each of the two candidate clusters within a cluster to be determined is determined based on the number of samples corresponding to each of the two candidate clusters within a cluster to be determined.

[0155] For example, see Figure 15 The diagram illustrates the candidate clusters representing interference in the interference determination results of this application embodiment. Assuming the first sample number threshold is 12, the first evaluation threshold is 90, and the second evaluation threshold is 70, the candidate clusters 2 and 5 included in the cluster pair to be determined are as follows: Candidate cluster 2 has 13 samples, candidate cluster 5 has 10 samples, the maximum evaluation value among all quality evaluation values ​​included in the sample evaluation results corresponding to candidate cluster 2 is 85, the maximum evaluation value among all quality evaluation values ​​included in the sample evaluation results corresponding to candidate cluster 5 is 80, the average evaluation value among all quality evaluation values ​​included in the sample evaluation results corresponding to candidate cluster 2 is 80, and the average evaluation value among all quality evaluation values ​​included in the sample evaluation results corresponding to candidate cluster 5 is 80. If the average evaluation value is 71, then the number of samples corresponding to candidate cluster 2 is greater than the first sample number threshold of 12, the number of samples corresponding to candidate cluster 5 is not greater than the first sample number threshold of 12, the maximum evaluation value corresponding to candidate cluster 2 is not greater than the first evaluation threshold of 90, the maximum evaluation value corresponding to candidate cluster 5 is not greater than the first evaluation threshold of 90, the average evaluation value corresponding to candidate cluster 2 is greater than the second evaluation threshold of 70, and the average evaluation value corresponding to candidate cluster 5 is greater than the second evaluation threshold of 70. The two candidate clusters within the cluster pair to be determined satisfy conditions 1 and 2. Based on the number of samples corresponding to the two candidate clusters within a cluster pair to be determined, the interference determination result corresponding to the two candidate clusters within a cluster pair to be determined is determined.

[0156] Specifically, when determining the interference determination result for each of the two candidate clusters within a given cluster pair based on the number of samples for each cluster, the processing device performs the following operations. (See also...) Figure 16 As shown, it is a flowchart illustrating the process of determining the interference determination result in an embodiment of this application. The following is a detailed explanation in conjunction with the attached diagram. Figure 16 The specific operations to be performed will be explained in detail:

[0157] Step 2141-1: Compare the number of samples corresponding to one candidate cluster within a pair of clusters to be determined with the number of samples corresponding to another candidate cluster.

[0158] In this embodiment of the application, after determining two candidate clusters within a pair of clusters to be determined and satisfying at least one of the above three conditions, the number of samples corresponding to one candidate cluster within the pair of clusters to be determined is compared with the number of samples corresponding to the other candidate cluster to obtain the comparison result.

[0159] For example, such as Figure 15 As shown, assuming the number of samples corresponding to candidate cluster 2 in the cluster pair to be determined is 13 and the number of samples corresponding to candidate cluster 5 is 10, the number of samples 13 of candidate cluster 2 is compared with the number of samples 10 of candidate cluster 5. The number of samples 13 of candidate cluster 2 is greater than the number of samples 10 of candidate cluster 5.

[0160] Step 2141-2: Record the interference determination results of candidate clusters with small sample sizes as interference.

[0161] In this embodiment of the application, after obtaining the comparison result of the number of samples corresponding to one candidate cluster and the number of samples corresponding to another candidate cluster within a cluster to be determined, the interference determination result of the candidate cluster with the smaller number of samples is recorded as interference.

[0162] For example, such as Figure 15 As shown, assuming that the number of samples corresponding to candidate cluster 2 in the cluster pair to be determined is 13 and the number of samples corresponding to candidate cluster 5 is 10, and the number of samples of candidate cluster 2 (13) is greater than the number of samples of candidate cluster 5 (10), then the interference determination result of candidate cluster 5 is recorded as interference.

[0163] Step 2142: Select the two candidate clusters within the cluster pair to be determined as high-quality, difficult-to-bear examples.

[0164] In this embodiment of the application, it is determined whether the two candidate clusters within a cluster pair to be determined satisfy at least one of the above conditions. If at least one condition is not satisfied, the two candidate clusters within the cluster pair to be determined are regarded as high-quality difficult-to-defeate examples.

[0165] For example, assuming the first sample size threshold is 12, the first evaluation threshold is 90, and the second evaluation threshold is 70, the candidate cluster 6 and candidate cluster 8 are contained within the cluster pair to be determined. The sample size corresponding to candidate cluster 6 is 13, and the sample size corresponding to candidate cluster 8 is 14. The maximum evaluation value among the quality evaluation values ​​included in the evaluation results of the sample corresponding to candidate cluster 6 is 91, the maximum evaluation value among the quality evaluation values ​​included in the evaluation results of the sample corresponding to candidate cluster 8 is 92, the average evaluation value among the quality evaluation values ​​included in the evaluation results of the sample corresponding to candidate cluster 6 is 80, and the average evaluation value among the quality evaluation values ​​included in the evaluation results of the sample corresponding to candidate cluster 8 is 70. If the average evaluation value is 81, then the number of samples corresponding to candidate cluster 6 is greater than the first sample number threshold of 12, the number of samples corresponding to candidate cluster 8 is greater than the first sample number threshold of 12, the maximum evaluation value corresponding to candidate cluster 6 is greater than the first evaluation threshold of 90, the maximum evaluation value corresponding to candidate cluster 8 is greater than the first evaluation threshold of 90, the average evaluation value corresponding to candidate cluster 6 is greater than the second evaluation threshold of 70, and the average evaluation value corresponding to candidate cluster 8 is greater than the second evaluation threshold of 70. Since the two candidate clusters in the cluster pair to be determined do not meet conditions 1, 2, and 3, candidate cluster 6 and candidate cluster 8 in the cluster pair to be determined are regarded as high-quality difficult-to-deliver examples.

[0166] Step 215: Delete the candidate clusters that represent interference in the interference determination results.

[0167] In this embodiment of the application, after the interference determination result of the candidate cluster is recorded as interference, the candidate clusters that represent interference are deleted.

[0168] For example, such as Figure 15 As shown, the interference determination result of candidate cluster 5 is recorded as interference, and candidate cluster 5 is deleted.

[0169] Step 22: From the unmerged candidate clusters and the obtained fused clusters, select the target clusters that meet the preset quality conditions, and set pseudo-labels representing the sample object type for each target cluster to obtain the target training sample set.

[0170] In this embodiment of the application, after deleting the candidate clusters that represent interference in the clusters to be judged and the obtained fused clusters, each target cluster that meets the preset quality conditions is selected from each unmerged candidate cluster and each fused cluster, and pseudo-labels representing the sample object type are set for each target cluster, so as to obtain a target training sample set containing each target cluster and the pseudo-labels corresponding to each target cluster.

[0171] For example, see Figure 17The diagram shown is a schematic diagram of obtaining the target training sample set in an embodiment of this application. The determined target cluster 1 is set with pseudo label 1, and the target cluster 2 is set with pseudo label 2, so as to obtain the target training sample set containing each target cluster and the pseudo label corresponding to each target cluster.

[0172] Specifically, when selecting target clusters that meet preset quality conditions from the unmerged candidate clusters and the obtained fused clusters, the processing equipment performs the following operations. (See also...) Figure 18 As shown, this is a schematic diagram of the process for determining each target cluster in an embodiment of this application. The following is a detailed explanation in conjunction with the attached diagram. Figure 18 The specific operations to be performed will be explained in detail:

[0173] Step 220: Treat all unmerged candidate clusters and all obtained fused clusters as clusters to be screened.

[0174] Among them, the unmerged candidate clusters include unmerged clusters in each cluster pair to be checked, undeleted clusters in each cluster pair to be determined, and candidate clusters in non-cluster pairs to be checked.

[0175] For example, assuming the unmerged candidate clusters are candidate cluster 2, candidate cluster 4, candidate cluster 6, candidate cluster 7, candidate cluster 8, candidate cluster 9, and candidate cluster 10, and the merged clusters are merged cluster 1, merged cluster 2, merged cluster 3, merged cluster 4, and merged cluster 5, then candidate cluster 2, candidate cluster 4, candidate cluster 6, candidate cluster 7, candidate cluster 8, candidate cluster 9, candidate cluster 10, merged cluster 1, merged cluster 2, merged cluster 3, merged cluster 4, and merged cluster 5 are all considered as clusters to be screened.

[0176] For each cluster to be screened, perform the following operations respectively:

[0177] Step 221: Based on the number of samples and the sample evaluation results of a cluster to be screened, obtain the standard determination result of a cluster to be screened.

[0178] The sample evaluation results include: the quality evaluation value of each training sample in the cluster to be screened. The quality evaluation value of a training sample is determined based on the clarity, resolution, angle, and occlusion of the training sample.

[0179] Specifically, during step 221, the processing device performs the following operations. (See also...) Figure 19 As shown, this is a schematic diagram of the first process for determining the compliance judgment result of a cluster to be screened in an embodiment of this application. The following is a detailed explanation in conjunction with the attached diagram. Figure 19 The specific operations to be performed will be explained in detail:

[0180] Step 2210: Determine whether the number of samples in a cluster to be screened is greater than the second sample number threshold. If yes, proceed to step 2211; otherwise, proceed to step 2212.

[0181] Step 2211: Determine the compliance result of a cluster to be screened as compliant.

[0182] In this embodiment of the application, it is determined whether the number of samples of a cluster to be screened is greater than the second sample number threshold. If the number of samples of the cluster to be screened is greater than the second sample number threshold, the standard-reaching result of the cluster to be screened is determined to be compliant.

[0183] For example, such as Figure 17 As shown, assuming the second sample number threshold is 10 and the sample number of cluster 1 to be screened is 12, then the sample number of cluster 1 to be screened is greater than the second sample number threshold of 10, and the standard-reaching judgment result of cluster 1 to be screened is qualified.

[0184] Among them, the second sample number threshold is less than the first sample number threshold.

[0185] Step 2212: Based on the maximum evaluation value among the quality evaluation values ​​included in the sample evaluation results, and the average evaluation value of each quality evaluation value, determine the compliance judgment result of a cluster to be screened.

[0186] In this embodiment of the application, it is determined whether the number of samples of a cluster to be screened is greater than a second sample number threshold. If the number of samples of the cluster to be screened is not greater than the second sample number threshold, the compliance judgment result of the cluster to be screened is determined based on the maximum evaluation value among the quality evaluation values ​​included in the sample evaluation result and the average evaluation value of each quality evaluation value.

[0187] For example, such as Figure 17 As shown, assuming the second sample number threshold is 10 and the sample number of cluster 2 to be screened is 9, the sample number of cluster 2 to be screened is not greater than the second sample number threshold of 10. Based on the maximum evaluation value among the quality evaluation values ​​included in the sample evaluation results of cluster 2 to be screened, and the average evaluation value of each quality evaluation value, the standard-reaching judgment result of cluster 2 to be screened is determined.

[0188] Specifically, during step 2212, the processing device performs the following operations. (See also...) Figure 20 As shown, this is a schematic diagram of the second process for determining the compliance judgment result of a cluster to be screened in an embodiment of this application. The following is a detailed explanation in conjunction with the attached diagram. Figure 20 The specific operations to be performed will be explained in detail:

[0189] Step 2212-1: Determine whether the maximum evaluation value corresponding to a cluster to be screened is greater than the preset third evaluation threshold, and determine whether the average evaluation value corresponding to a cluster to be screened is greater than the preset fourth evaluation threshold. If yes, proceed to step 2212-2; otherwise, proceed to step 2212-3.

[0190] Among them, the preset third evaluation threshold is less than the preset first evaluation threshold, and the preset fourth evaluation threshold is less than the preset second evaluation threshold.

[0191] Step 2212-2: Determine the compliance result of a cluster to be screened as compliant.

[0192] In this embodiment of the application, it is determined whether the maximum evaluation value corresponding to a cluster to be screened is greater than a preset third evaluation threshold, and whether the average evaluation value corresponding to a cluster to be screened is greater than a preset fourth evaluation threshold. If the maximum evaluation value corresponding to a cluster to be screened is greater than the preset third evaluation threshold, and the average evaluation value corresponding to a cluster to be screened is greater than the preset fourth evaluation threshold, then the compliance determination result of the cluster to be screened is determined to be compliant.

[0193] For example, such as Figure 17 As shown, assuming the preset third evaluation threshold is 85, the preset fourth evaluation threshold is 66, the maximum evaluation value corresponding to the cluster to be screened is 90, and the average evaluation value corresponding to the cluster to be screened is 70, then the maximum evaluation value corresponding to the cluster to be screened is greater than the preset third evaluation threshold of 85, and the average evaluation value corresponding to the cluster to be screened is greater than the preset fourth evaluation threshold of 66. Therefore, the standard-reaching judgment result of the cluster to be screened is determined to be compliant.

[0194] Step 2212-3: Determine the compliance result of a cluster to be screened as not meeting the standard.

[0195] In this embodiment of the application, it is determined whether the maximum evaluation value corresponding to a cluster to be screened is greater than a preset third evaluation threshold, and whether the average evaluation value corresponding to a cluster to be screened is greater than a preset fourth evaluation threshold. If the maximum evaluation value corresponding to a cluster to be screened is not greater than the preset third evaluation threshold, or the average evaluation value corresponding to a cluster to be screened is not greater than the preset fourth evaluation threshold, then the compliance determination result of the cluster to be screened is determined to be non-compliant.

[0196] For example, such as Figure 17 As shown, assuming the preset third evaluation threshold is 85, the preset fourth evaluation threshold is 66, the maximum evaluation value corresponding to the cluster to be screened 3 is 86, and the average evaluation value corresponding to the cluster to be screened 3 is 65, then the average evaluation value corresponding to the cluster to be screened 3 is not greater than the preset fourth evaluation threshold of 66, and the standard determination result of the cluster to be screened 3 is determined to be non-compliant.

[0197] Step 222: Use the clusters to be screened that meet the criteria as the target clusters.

[0198] In this embodiment of the application, after obtaining the compliance determination result of the cluster to be screened, the cluster to be screened that meets the standard is taken as the target cluster.

[0199] For example, such as Figure 17 As shown, the compliance determination result of the cluster to be screened 1 is qualified, and the cluster to be screened 1 is taken as the target cluster 1. The compliance determination result of the cluster to be screened 2 is qualified, and the cluster to be screened 2 is taken as the target cluster 2.

[0200] Step 223: Delete the screening clusters whose criteria for meeting the standards have not been met.

[0201] In this embodiment of the application, after obtaining the compliance determination result of the clusters to be screened, the clusters to be screened that do not meet the standard are deleted.

[0202] For example, such as Figure 17 As shown, the compliance determination result of cluster 3 to be screened is not met, and cluster 3 to be screened is deleted.

[0203] Optionally, after obtaining each target cluster, training samples are added to each target cluster. For each target cluster, the following operations are performed: if the number of samples in a target cluster is less than a preset sample threshold, the initial sample block to which each training sample in the target cluster belongs is found, and each training sample of the target cluster and each training sample in the early time period of each initial sample block are clustered to obtain the corresponding updated clusters.

[0204] For example, assuming the sample size threshold is 14, the early time period is the previous week, and the number of samples in target cluster 1 is 13, then the number of samples in target cluster 1 is less than the sample size threshold of 14. The initial sample blocks 1, 3, 5, and 6 to which each training sample in target cluster 1 belongs are clustered together with the training samples in the previous week of initial sample blocks 1, 3, 5, and 6 to obtain the corresponding updated clusters.

[0205] In this way, after clustering, the training samples that are in the same updated cluster are the same sample objects, which enriches the training sample data.

[0206] Optionally, after obtaining each target cluster, hierarchical clustering is performed on each target cluster to split the target cluster into at least one dense group. The similarity within the dense group is high, and the similarity between the dense groups is slightly low. At this time, different dense groups can be regarded as training samples with a certain degree of difficulty.

[0207] Furthermore, after obtaining the target training sample set, the initial face recognition model is fused and trained using the target training sample set to obtain the trained target face recognition model.

[0208] In this embodiment, the initial face recognition model is first trained by classification using a target training sample set. The model is then fine-tuned based on the parameters of the initial face recognition model to obtain an updated face recognition model. The updated face recognition model is then trained by classification and triplet training using the target training sample set to obtain the trained target face recognition model.

[0209] In this method, training samples from at least one dense group are used as training samples of the same class for triplet training, while training samples from high-quality hard negative examples and hard example mining methods are used as training samples of different classes for triplet training.

[0210] In this way, classification training does not differentiate between data difficulties, and since there are mostly simple training samples in reality, using classification training first can stabilize the basic data base with these simple training samples, ensuring the face recognition model performs reliably on basic data. It also improves the general effectiveness of the target domain training samples, ensuring that data covering all objects in the target domain are used for training, resulting in a significant improvement in performance. Then, classification training and triplet training are used simultaneously. Triplet training can narrow the gap with semi-difficult training samples, improving recall, while classification training, due to its large class base, can ensure the discrimination of negative examples. The two training methods are combined, complementing each other's strengths and weaknesses.

[0211] Additionally, it should be noted that, in order to prevent the face recognition model from being over-adjusted or singularized during fine-tuning, the parameters of the initial face recognition model and the target face recognition model are checked. Based on the changes in the parameters of the target face recognition model, the style differences of the training samples are analyzed, which can make up for this shortcoming in subsequent training.

[0212] Based on the same inventive concept, this application also provides a device for obtaining a target training sample set, see below. Figure 21 The diagram shown is a schematic representation of the structure of the device for obtaining the target training sample set in an embodiment of this application, specifically including:

[0213] The first processing module 2101 is used to perform multiple rounds of iterative clustering based on an initial training sample set containing facial features of each sample to obtain a candidate cluster set. In one round of iteration, the following operations are performed: training sample clustering is performed based on the similarity between facial features of each sample currently contained in the initial training sample set to obtain at least one candidate cluster, and two sample facial features whose values ​​belong to a preset suspected interval are marked as suspected data pairs, and an updated initial training sample set is obtained based on at least one candidate cluster.

[0214] The second processing module 2102 is used to treat each suspected data pair as a candidate cluster to be checked as a cluster pair to be checked, and to perform the following operations for each cluster pair to be checked: when the similarity of the non-facial features associated with the facial features of each sample in a cluster pair to be checked reaches the non-facial feature threshold, the cluster pair to be checked is merged into the corresponding fusion cluster.

[0215] The determination module 2103 is used to select target clusters that meet preset quality conditions from the unmerged candidate clusters and the obtained fused clusters, and set pseudo-labels representing the sample object type for each target cluster to obtain the target training sample set.

[0216] Optionally, when clustering training samples based on the similarity between facial features of each sample currently included in the initial training sample set to obtain at least one candidate cluster, and marking two sample facial features whose values ​​belong to a preset suspected interval as suspected data pairs, the first processing module 2101 is further configured to:

[0217] Based on the preset data attribute information, the initial training sample set is divided into various initial sample blocks;

[0218] For each initial sample block, perform the following operations:

[0219] Training samples are clustered based on the similarity between facial features of each sample contained in an initial sample block to obtain at least one candidate cluster corresponding to an initial sample block; wherein, during the clustering process, two sample facial features whose values ​​belong to a preset suspected interval are marked as suspected data pairs.

[0220] Optionally, when clustering training samples based on the similarity between facial features of each sample contained in an initial sample block to obtain at least one candidate cluster corresponding to an initial sample block; wherein, during the clustering process, two sample facial features whose values ​​belong to a preset suspected interval are marked as suspected data pairs, the first processing module 2101 is further used to:

[0221] The first clustering is performed based on the similarity between the facial features of each sample contained in an initial sample block to obtain the initial clusters corresponding to the initial sample block;

[0222] For each sample's facial features, perform the following operations: if the similarity between any two sample facial features is less than the first similarity threshold and greater than the suspected similarity threshold, then mark the two sample facial features as the corresponding suspected data pair;

[0223] For each initial class group, perform the following operations: divide an initial class group into at least one subclass group, perform feature extraction processing on the facial features of each sample contained in each subclass group to obtain the target class group features corresponding to at least one subclass group, and add the obtained at least one target class group features to an initial class group to obtain the corresponding target class group.

[0224] A second clustering is performed based on the similarity between the target clusters to obtain at least one candidate cluster.

[0225] Optionally, when obtaining the updated initial training sample set based on at least one candidate class cluster, the first processing module 2101 is further configured to:

[0226] For at least one candidate cluster, perform the following operations respectively: divide a candidate cluster into at least one sub-cluster, and perform feature extraction processing on the facial features of each sample contained in each sub-cluster to obtain the target cluster features corresponding to at least one sub-cluster.

[0227] Each sample facial feature in each initial sample block is replaced with the target cluster feature corresponding to each initial sample block, and then used as the target sample block.

[0228] Based on the preset data attribute information, each target sample block is summarized to obtain each updated sample block, and each updated sample block is used as the updated initial training sample set.

[0229] Optionally, after treating each suspected data pair and its corresponding candidate cluster as a single cluster pair to be checked, the second processing module 2102 is further configured to:

[0230] For each pair of class clusters to be checked, perform the following operations:

[0231] When the similarity of the suspected data pairs contained in a pair of clusters to be checked to their respective associated non-facial features does not reach the non-facial feature threshold, the pair of clusters to be checked is treated as a pair of clusters to be judged.

[0232] Based on the number of samples and sample evaluation results of the two candidate clusters within a pair of clusters to be determined, the interference determination results of the two candidate clusters within a pair of clusters to be determined are obtained. The sample evaluation results include the quality evaluation values ​​of each training sample in each of the two candidate clusters.

[0233] The interference determination results are used to identify candidate clusters that represent interference.

[0234] Optionally, when obtaining the interference determination results for each of the two candidate clusters within a pair of clusters to be determined, based on the sample count and sample evaluation results of each of the two determination clusters, the second processing module 2102 is further configured to:

[0235] If two candidate clusters within a pair of clusters to be determined satisfy at least one of the following conditions, then based on the number of samples corresponding to each of the two candidate clusters within the pair of clusters to be determined, the interference determination result corresponding to each of the two candidate clusters within the pair of clusters to be determined is determined:

[0236] The number of samples corresponding to at least one candidate cluster within a pair of clusters to be determined is not greater than the first sample number threshold.

[0237] The maximum evaluation value among the quality evaluation values ​​included in the sample evaluation result corresponding to at least one candidate cluster within a cluster pair to be determined is not greater than a preset first evaluation threshold.

[0238] The average quality assessment value of the sample evaluation results corresponding to at least one candidate cluster within a cluster pair to be determined is not greater than a preset second evaluation threshold.

[0239] Optionally, when determining the interference determination result for each of the two candidate clusters within a pair of clusters to be determined, based on the number of samples corresponding to each of the two candidate clusters, the second processing module 2102 is further configured to:

[0240] Compare the number of samples corresponding to one candidate cluster within a cluster to be determined with the number of samples corresponding to another candidate cluster;

[0241] The interference result of the candidate cluster with a small number of samples is recorded as interference.

[0242] Optionally, when selecting target clusters that meet preset quality conditions from the unmerged candidate clusters and the obtained fused clusters, the determining module 2103 is further configured to:

[0243] All unmerged candidate clusters and all obtained fused clusters are treated as clusters to be screened, and the following operations are performed on each cluster to be screened:

[0244] Based on the number of samples and the sample evaluation results of a cluster to be screened, a pass / fail determination result for a cluster to be screened is obtained; wherein, the sample evaluation results include: the quality evaluation value of each training sample in the cluster to be screened;

[0245] The clusters to be screened that meet the criteria are identified by the criteria assessment results and are used as the target clusters.

[0246] Delete the screening clusters whose criteria for compliance have not been met.

[0247] Optionally, when selecting target clusters that meet preset quality conditions from the unmerged candidate clusters and the obtained fused clusters, the determining module 2103 is further configured to:

[0248] All unmerged candidate clusters and all obtained fused clusters are treated as clusters to be screened, and the following operations are performed on each cluster to be screened:

[0249] Based on the number of samples and the sample evaluation results of a cluster to be screened, a pass / fail determination result for a cluster to be screened is obtained; wherein, the sample evaluation result includes: the quality evaluation value of each training sample in the cluster to be screened;

[0250] The clusters to be screened that meet the criteria are identified by the criteria assessment results and are used as the target clusters.

[0251] Delete the screening clusters whose criteria for compliance have not been met.

[0252] Optionally, when determining the compliance judgment result of a cluster to be screened based on the maximum assessment value among the quality assessment values ​​included in the sample assessment results, and the average assessment value of the quality assessment values, the determining module 2103 is also used for:

[0253] If the maximum evaluation value of a cluster to be screened is greater than the preset third evaluation threshold, and the average evaluation value of a cluster to be screened is greater than the preset fourth evaluation threshold, then the standard-reaching result of a cluster to be screened is determined to be compliant.

[0254] If the maximum evaluation value corresponding to a cluster to be screened is not greater than the preset third evaluation threshold, or if the average evaluation value corresponding to a cluster to be screened is not greater than the preset fourth evaluation threshold, then the compliance determination result of a cluster to be screened is determined to be non-compliant.

[0255] Based on the above embodiments, see Figure 22 The diagram shown is a structural schematic of the electronic device in an embodiment of this application.

[0256] This application provides an electronic device that may include a processor 2210 (Center Processing Unit, CPU), a memory 2220, an input device 2230, and an output device 2240. The input device 2230 may include a keyboard, a mouse, a touch screen, etc., and the output device 2240 may include a display device, such as a liquid crystal display (LCD) or a cathode ray tube (CRT).

[0257] The memory 2220 may include read-only memory (ROM) and random access memory (RAM), and provides the processor 2210 with program instructions and data stored in the memory 2220. In this embodiment, the memory 2220 may be used to store the program for any of the target training sample sets obtained in this embodiment.

[0258] The processor 2210 executes any of the target training sample set acquisition methods in the embodiments of this application according to the program instructions stored in the memory 2220 by calling the program instructions.

[0259] Based on the above embodiments, this application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the method for obtaining the target training sample set in any of the above method embodiments.

[0260] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0261] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations 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 processor, 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, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0262] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0263] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0264] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A method for obtaining a target training sample set, characterized in that, include: Based on the initial training sample set containing facial features of each sample, multiple rounds of iterative clustering are performed to obtain a candidate cluster set. In one round of iteration, the following operations are performed: training sample clustering is performed based on the similarity between facial features of each sample currently contained in the initial training sample set to obtain at least one candidate cluster. Two sample facial features whose values ​​belong to a preset suspected interval are marked as suspected data pairs. An updated initial training sample set is obtained based on the at least one candidate cluster. Each suspected data pair is assigned to a candidate cluster as a cluster to be checked. For each cluster to be checked, the following operations are performed: when the similarity of the non-facial features associated with the facial features of each sample in a cluster to be checked reaches the non-facial feature threshold, the cluster to be checked is merged into the corresponding fusion cluster. From the unmerged candidate clusters and the obtained fused clusters, select the target clusters that meet the preset quality conditions, and set pseudo-labels representing the sample object type for each target cluster to obtain the target training sample set.

2. The method as described in claim 1, characterized in that, The training samples are clustered based on the similarity between facial features of each sample currently included in the initial training sample set to obtain at least one candidate cluster. Two sample facial features whose values ​​belong to a preset suspected interval are marked as suspected data pairs, including: Based on preset data attribute information, the initial training sample set is divided into initial sample blocks; For each of the initial sample blocks, perform the following operations: Training samples are clustered based on the similarity between facial features of each sample contained in an initial sample block to obtain at least one candidate cluster corresponding to the initial sample block; wherein, during the clustering process, two sample facial features whose values ​​belong to a preset suspected interval are marked as suspected data pairs.

3. The method as described in claim 2, characterized in that, The training samples are clustered based on the similarity between facial features of each sample contained in an initial sample block to obtain at least one candidate cluster corresponding to the initial sample block; wherein, during the clustering process, two sample facial features whose values ​​belong to a preset suspected interval are marked as suspected data pairs, including: The first clustering is performed based on the similarity between the facial features of each sample contained in an initial sample block to obtain the initial clusters corresponding to the initial sample block; For each sample facial feature, the following operations are performed: if the similarity between any two sample facial features is less than a first similarity threshold and greater than a suspected similarity threshold, then the two sample facial features are marked as a corresponding suspected data pair; For each initial class group, the following operations are performed: an initial class group is divided into at least one subclass group; feature extraction processing is performed on the facial features of each sample contained in each subclass group to obtain the target class group features corresponding to each of the at least one subclass group; and the obtained at least one target class group features are added to the initial class group to obtain the corresponding target class group. A second clustering is performed based on the similarity between the target clusters to obtain at least one candidate cluster.

4. The method according to any one of claims 1-3, characterized in that, The step of obtaining the updated initial training sample set based on the at least one candidate class cluster includes: For the at least one candidate cluster, perform the following operations respectively: divide a candidate cluster into at least one sub-cluster, and perform feature extraction processing on the facial features of each sample contained in each sub-cluster to obtain the target cluster features corresponding to each of the at least one sub-cluster; Each sample facial feature of each initial sample block is replaced with the target cluster feature corresponding to each initial sample block, and then used as the target sample block; Based on the preset data attribute information, each target sample block is summarized to obtain each updated sample block, and each updated sample block is used as the updated initial training sample set.

5. The method according to any one of claims 1-3, characterized in that, After classifying each suspected data pair into its respective candidate cluster as a single cluster pair to be inspected, the process further includes: For each pair of class clusters to be checked, perform the following operations: When the similarity of the suspected data pairs contained in a pair of clusters to be checked to their respective associated non-facial features does not reach the non-facial feature threshold, the pair of clusters to be checked is regarded as a pair of clusters to be judged. Based on the number of samples and sample evaluation results of the two candidate clusters within the one-to-be-determined cluster pair, the interference determination results of the two candidate clusters within the one-to-be-determined cluster pair are obtained, wherein the sample evaluation results include: the quality evaluation value of each training sample in each of the two candidate clusters. The interference determination results are used to identify candidate clusters that represent interference.

6. The method as described in claim 5, characterized in that, The step of obtaining the interference determination results for each of the two candidate clusters within the same pair of clusters to be determined, based on the sample count and sample evaluation results for each of the two clusters, includes: If the two candidate clusters within a given cluster pair satisfy at least one of the following conditions, then based on the number of samples corresponding to each of the two candidate clusters within the given cluster pair, the interference determination result corresponding to each of the two candidate clusters within the given cluster pair is determined: The number of samples corresponding to at least one candidate cluster within a pair of clusters to be determined is not greater than the first sample number threshold. The maximum evaluation value among the quality evaluation values ​​included in the sample evaluation result corresponding to at least one candidate cluster within a cluster pair to be determined is not greater than a preset first evaluation threshold. The average evaluation value of each quality evaluation value included in the sample evaluation result corresponding to at least one candidate cluster within a cluster pair to be determined is not greater than a preset second evaluation threshold.

7. The method as described in claim 6, characterized in that, The step of determining the interference determination result for each of the two candidate clusters within a given cluster pair based on the number of samples corresponding to each of the two candidate clusters includes: The number of samples corresponding to one candidate cluster within the same candidate cluster pair is compared with the number of samples corresponding to the other candidate cluster. The interference result of the candidate cluster with a small number of samples is recorded as interference.

8. The method according to any one of claims 1-3, characterized in that, From the unmerged candidate clusters and the obtained fused clusters, the target clusters that meet the preset quality conditions are selected first, including: All unmerged candidate clusters and all obtained fused clusters are treated as clusters to be screened, and the following operations are performed on each cluster to be screened: Based on the number of samples and the sample evaluation results of a cluster to be screened, a pass / fail determination result for the cluster to be screened is obtained; wherein, the sample evaluation results include: the quality evaluation value of each training sample in the cluster to be screened; The clusters to be screened that meet the criteria are identified by the criteria assessment results and are used as the target clusters. Delete the screening clusters whose criteria for compliance have not been met.

9. The method as described in claim 8, characterized in that, The process of obtaining the compliance determination result for a cluster to be screened based on the number of samples and the sample evaluation results includes: If the number of samples in a cluster to be screened is greater than the second sample number threshold, then the standard-reaching result of the cluster to be screened is determined to be compliant. If the number of samples in a cluster to be screened is not greater than the second sample number threshold, the compliance determination result of the cluster to be screened is determined based on the maximum evaluation value among the quality evaluation values ​​included in the sample evaluation result and the average evaluation value of the quality evaluation values.

10. The method as described in claim 9, characterized in that, The determination of the compliance judgment result of the cluster to be screened, based on the maximum evaluation value among the quality evaluation values ​​included in the sample evaluation results and the average evaluation value of the quality evaluation values, includes: If the maximum evaluation value corresponding to a cluster to be screened is greater than the preset third evaluation threshold, and the average evaluation value corresponding to a cluster to be screened is greater than the preset fourth evaluation threshold, then the standard-reaching result of the cluster to be screened is determined to be compliant. If the maximum evaluation value corresponding to a cluster to be screened is not greater than the preset third evaluation threshold, or if the average evaluation value corresponding to a cluster to be screened is not greater than the preset fourth evaluation threshold, then the compliance determination result of the cluster to be screened is determined to be non-compliant.

11. An apparatus for obtaining a target training sample set, characterized in that, include: The first processing module is used to perform multiple rounds of iterative clustering based on an initial training sample set containing facial features of each sample to obtain a candidate cluster set. In one round of iteration, the following operations are performed: training sample clustering is performed based on the similarity between facial features of each sample currently contained in the initial training sample set to obtain at least one candidate cluster; two sample facial features whose values ​​belong to a preset suspected interval are marked as suspected data pairs; and an updated initial training sample set is obtained based on the at least one candidate cluster. The second processing module is used to treat each suspected data pair as a candidate cluster to be checked as a cluster pair to be checked, and to perform the following operations for each cluster pair to be checked: when the similarity of the non-facial features associated with the facial features of each sample in a cluster pair to be checked reaches the non-facial feature threshold, the cluster pair to be checked is merged into the corresponding fusion cluster. The determination module is used to select target clusters that meet preset quality conditions from the unmerged candidate clusters and the obtained fused clusters, and to set pseudo-labels representing the sample object type for each target cluster to obtain the target training sample set.

12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method according to any one of claims 1-10.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-10.

Citation Information

Patent Citations

  • Domain adaptive pedestrian re-identification method

    CN113158901A

  • Low-cost pedestrian re-identification method based on deep active learning

    CN114187610A