A face clustering method, a face recognition method, a device, equipment and a medium
By employing clustering methods at different time granularities in face clustering, combining face and auxiliary features for clustering, and using the second clustering result to correct the first clustering result, the problem of inaccurate clustering caused by low-quality images is solved, and the accuracy of face clustering and recognition is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
- Filing Date
- 2022-07-26
- Publication Date
- 2026-07-03
Smart Images

Figure CN115273191B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a face aggregation method, face recognition method, device, equipment, and medium. Background Technology
[0002] Face clustering refers to grouping multiple images containing faces belonging to the same target into a single target file, thereby obtaining multiple files for multiple targets.
[0003] In related technologies, when performing face aggregation on multiple images, all images within a certain time range are aggregated in the same way.
[0004] However, a large number of these images are of low quality. The usability and distinguishability of low-quality images are very low, which will lead to low accuracy in face clustering, such as a large number of incorrect or fragmented face images.
[0005] Therefore, improving the accuracy of facial recognition is an urgent problem to be solved. Summary of the Invention
[0006] The purpose of this invention is to provide a face aggregation method, face recognition method, device, equipment, and medium to improve the accuracy of face aggregation. The specific technical solution is as follows:
[0007] In a first aspect, embodiments of the present invention provide a face aggregation method, the method comprising:
[0008] Acquire multiple images of faces to be aggregated; wherein, the multiple images are images collected within a time period belonging to a first time granularity, and the multiple images correspond to multiple image groups, the multiple image groups are obtained by dividing the multiple images into groups according to a second time granularity, the second time granularity being smaller than the first time granularity;
[0009] The multiple images are subjected to a first clustering process to obtain a first clustering result; wherein, the first clustering process is a clustering process using facial features;
[0010] Each image group is subjected to a second clustering process to obtain a second clustering result; wherein, the second clustering process is a clustering process using the facial features and specified auxiliary features, and the specified auxiliary features are features that are affected by different time periods belonging to the second time granularity;
[0011] Using the second clustering result, the first clustering result is corrected to obtain the face clustering result at the first time granularity.
[0012] Optionally, the specified auxiliary features include at least one of the following features: human body features and spatiotemporal features, wherein the human body features are features used to characterize human body information in the image, and the spatiotemporal features are features used to characterize the time and space of image acquisition.
[0013] Optionally, the step of using the second clustering result to correct the first clustering result to obtain the face clustering result at the first time granularity includes:
[0014] Using the second clustering result, the first clustering result is subjected to one or more of the following processing methods: category correction processing, category merging processing, and image recall processing, to obtain the face clustering result at the first time granularity.
[0015] The category correction process is used to: perform category correction on the images under the first category contained in the first clustering result;
[0016] The category merging process is used to: merge the first categories contained in the first clustering result;
[0017] The image recall process is used to: add a specified image to a first category included in the first clustering result, and / or add a new first category to the first clustering result; the specified image is an image that does not belong to any first category.
[0018] Optionally, the method of using the second clustering result to perform category correction processing on the first clustering result includes:
[0019] For the first category to be corrected contained in the first clustering result, determine the category to which the image under the first category to be corrected belongs in the second category contained in the second clustering result, and take it as the category to be analyzed;
[0020] If the images under the category to be analyzed belong to multiple first categories, then the proportion of images belonging to each first category in the images under the category to be analyzed is counted, and the first category to which the image with the largest proportion belongs is determined as the first category to be matched;
[0021] If the first category to be matched is not the first category to be corrected, then the images belonging to the category to be analyzed under the first category to be corrected are adjusted to the first category to be matched.
[0022] Optionally, the method of using the second clustering result to perform category merging processing on the first clustering result includes:
[0023] For the second category to be analyzed contained in the second clustering result, determine the category to which the image under the second category to be analyzed belongs in each of the first categories contained in the first clustering result, and obtain at least one category to be processed;
[0024] For each category to be processed, the proportion of images belonging to each second category in the images under that category is counted, and the second category to which the image with the largest proportion belongs is determined as the second category to be matched;
[0025] If the second category to be matched is the second category to be analyzed, then the category to be processed is determined as the category to be merged corresponding to the second category to be analyzed;
[0026] If there are multiple categories to be merged corresponding to the second category to be analyzed, the images under the categories to be merged corresponding to the second category to be analyzed will be merged.
[0027] Optionally, the method of using the second clustering result to perform image recall processing on the first clustering result includes:
[0028] If there is an intersection between the images in a first category included in the first clustering result and the images in a second category included in the second clustering result, and the proportion of the number of images in the intersection to the number of images in the second category is higher than a predetermined threshold, then the images in the second category that do not belong to any of the first categories are determined to be images in the first category.
[0029] And / or,
[0030] If a second category contained in the second clustering result has no intersection with any of the first categories in the first clustering result, then the second category is added as a category to the first clustering result.
[0031] Optionally, the second clustering process performed on each image group to obtain the second clustering result includes:
[0032] For each image group, the facial features and the specified auxiliary features of each image in the image group are extracted respectively. The facial features and the specified auxiliary features of each image are fused to obtain the fused features of each image. The images in the image group are clustered according to the fused features of each image to obtain the clustering result of the image group.
[0033] The clustering results corresponding to each image group are determined to obtain the second clustering result.
[0034] Optionally, the weights used in the feature fusion process have the following relationships:
[0035] The weight of the facial features in each image is greater than the weight of the specified auxiliary features.
[0036] Secondly, embodiments of the present invention provide a face recognition method, the method comprising:
[0037] Obtain a face recognition request; wherein the face recognition request carries a target image to be recognized;
[0038] Based on the face aggregation results, face recognition is performed on the target image to obtain the face recognition result;
[0039] The face aggregation result is generated using the face aggregation method described in the first aspect of the present invention.
[0040] Thirdly, embodiments of the present invention provide a face recognition device, the device comprising:
[0041] The first acquisition module is used to acquire multiple images of the face to be aggregated; wherein, the multiple images are images collected within a time period belonging to a first time granularity, and the multiple images correspond to multiple image groups, the multiple image groups are obtained by dividing the multiple images into groups according to a second time granularity, the second time granularity being smaller than the first time granularity;
[0042] The first clustering module is used to perform a first clustering process on the multiple images to obtain a first clustering result; wherein, the first clustering process is a clustering process using facial features;
[0043] The second clustering module is used to perform a second clustering process on each image group to obtain a second clustering result; wherein, the second clustering process is to perform clustering using the facial features and specified auxiliary features, and the specified auxiliary features are features that are affected by different time periods belonging to the second time granularity.
[0044] The correction module is used to correct the first clustering result using the second clustering result to obtain the face clustering result at the first time granularity.
[0045] Optionally, the specified auxiliary features include at least one of the following features: human body features and spatiotemporal features, wherein the human body features are features used to characterize human body information in the image, and the spatiotemporal features are features used to characterize the time and space of image acquisition.
[0046] Optionally, the correction module is specifically used for:
[0047] Using the second clustering result, the first clustering result is subjected to one or more of the following processing methods: category correction processing, category merging processing, and image recall processing, to obtain the face clustering result at the first time granularity.
[0048] The category correction process is used to: perform category correction on the images under the first category contained in the first clustering result;
[0049] The category merging process is used to: merge the first categories contained in the first clustering result;
[0050] The image recall process is used to: add a specified image to a first category included in the first clustering result, and / or add a new first category to the first clustering result; the specified image is an image that does not belong to any first category.
[0051] Optionally, the method of using the second clustering result to perform category correction processing on the first clustering result includes:
[0052] For the first category to be corrected contained in the first clustering result, determine the category to which the image under the first category to be corrected belongs in the second category contained in the second clustering result, and take it as the category to be analyzed;
[0053] If the images under the category to be analyzed belong to multiple first categories, then the proportion of images belonging to each first category in the images under the category to be analyzed is counted, and the first category to which the image with the largest proportion belongs is determined as the first category to be matched;
[0054] If the first category to be matched is not the first category to be corrected, then the images belonging to the category to be analyzed under the first category to be corrected are adjusted to the first category to be matched.
[0055] Optionally, the method of using the second clustering result to perform category merging processing on the first clustering result includes:
[0056] For the second category to be analyzed contained in the second clustering result, determine the category to which the image under the second category to be analyzed belongs in each of the first categories contained in the first clustering result, and obtain at least one category to be processed;
[0057] For each category to be processed, the proportion of images belonging to each second category in the images under that category is counted, and the second category to which the image with the largest proportion belongs is determined as the second category to be matched;
[0058] If the second category to be matched is the second category to be analyzed, then the category to be processed is determined as the category to be merged corresponding to the second category to be analyzed;
[0059] If there are multiple categories to be merged corresponding to the second category to be analyzed, the images under the categories to be merged corresponding to the second category to be analyzed will be merged.
[0060] Optionally, the method of using the second clustering result to perform image recall processing on the first clustering result includes:
[0061] If there is an intersection between the images in a first category included in the first clustering result and the images in a second category included in the second clustering result, and the proportion of the number of images in the intersection to the number of images in the second category is higher than a predetermined threshold, then the images in the second category that do not belong to any of the first categories are determined to be images in the first category.
[0062] And / or,
[0063] If a second category contained in the second clustering result has no intersection with any of the first categories in the first clustering result, then the second category is added as a category to the first clustering result.
[0064] Optionally, the second clustering module is specifically used for:
[0065] For each image group, the facial features and the specified auxiliary features of each image in the image group are extracted respectively. The facial features and the specified auxiliary features of each image are fused to obtain the fused features of each image. The images in the image group are clustered according to the fused features of each image to obtain the clustering result of the image group.
[0066] The clustering results corresponding to each image group are determined to obtain the second clustering result.
[0067] Optionally, the weights used in the feature fusion process have the following relationships:
[0068] The weight of the facial features in each image is greater than the weight of the specified auxiliary features.
[0069] Fourthly, embodiments of the present invention provide a face recognition device, the device comprising:
[0070] The second acquisition module is used to acquire a face recognition request; wherein the face recognition request carries a target image to be recognized.
[0071] The recognition module is used to perform face recognition on the target image based on the face aggregation results, and obtain the face recognition result;
[0072] The face aggregation result is generated using the face aggregation method described in the first aspect of the present invention.
[0073] Fifthly, embodiments of the present invention provide an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0074] Memory, used to store computer programs;
[0075] The processor, when executing a program stored in memory, implements any of the aforementioned face aggregation methods and / or face recognition methods.
[0076] Sixthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the aforementioned face aggregation method and / or face recognition method.
[0077] This invention also provides a computer program product containing instructions that, when run on a computer, cause the computer to execute any of the face aggregation methods and / or face recognition methods described above.
[0078] Beneficial effects of the embodiments of the present invention:
[0079] The face clustering method provided in this embodiment of the invention sets up two types of images at different granularities for multiple images to be clustered: multiple images at a first time granularity and multiple image groups at a second time granularity. Thus, different clustering methods are applied to the images at different time granularities to obtain clustering results at different time granularities. Furthermore, considering that the second clustering method utilizes richer clustering criteria, resulting in a more accurate second clustering result, while the first clustering result may have insufficient accuracy due to low-quality images, the second clustering result can be used to correct the first clustering result, thereby obtaining the face clustering result at the first time granularity. It is evident that, compared to related technologies, this solution can improve the accuracy of face clustering when clustering images belonging to different time periods at the first time granularity. In addition, since the face recognition method provided in this embodiment of the invention utilizes the more accurate face clustering result obtained by the above-mentioned face clustering method, the face recognition method provided in this embodiment of the invention can improve the accuracy of face recognition.
[0080] Of course, implementing any product or method of the present invention does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description
[0081] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained based on these drawings.
[0082] Figure 1 A flowchart illustrating a face aggregation method provided in an embodiment of the present invention;
[0083] Figure 2 This is a schematic diagram illustrating the principle of a face aggregation method provided in an embodiment of the present invention.
[0084] Figure 3 This is a flowchart illustrating a face recognition method provided in an embodiment of the present invention;
[0085] Figure 4 This is a schematic diagram of a face recognition device provided in an embodiment of the present invention;
[0086] Figure 5 This is a schematic diagram of a face recognition device provided in an embodiment of the present invention;
[0087] Figure 6 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0088] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of the present invention.
[0089] Face clustering is used to obtain multiple profiles of multiple targets, so that when an image containing a face needs to be detected, the target to which the image belongs can be quickly matched.
[0090] Currently, most face clustering images are captured in urban areas, containing faces. These captured images are not only large in data volume but also of low quality. Related technologies that cluster all images within a certain time range using the same method yield unsatisfactory results, leading to significant image loss or fragmented face files, making it difficult to achieve good face clustering results in practical applications. Clustering using the same method, for example, clustering based on facial features, is problematic.
[0091] Based on this, in order to improve the accuracy of face aggregation, the present invention provides a face aggregation method, a face recognition method, a device, an equipment, and a medium.
[0092] The following section first introduces a face aggregation method provided by the present invention.
[0093] The face aggregation method provided in this embodiment of the invention can be applied to electronic devices, which can be terminal devices or servers. Terminal devices can include mobile phones and tablets, etc., and this invention does not limit the specific form of the electronic device. This face aggregation method can be applied to any scenario with face aggregation requirements, such as attendance scenarios, video surveillance scenarios, etc. Furthermore, this invention does not limit the acquisition duration of the images to be aggregated; for example, it can aggregate multiple images from the same day, or aggregate multiple images from multiple days, etc.
[0094] Furthermore, the execution entity of the face aggregation method provided in this embodiment of the invention can be a face aggregation device. For example, the face aggregation device can be functional software running on a terminal device, such as software for face aggregation. In this case, the face aggregation device can perform face aggregation on multiple input images. Alternatively, the face aggregation device can be a plugin in an existing client, such as a plugin in a client for managing images containing faces. Additionally, the face aggregation device can also be a functional module in the server-side program corresponding to the face aggregation client, running on a server. In this case, the face aggregation client can upload multiple images to be aggregated to the face aggregation device.
[0095] The face aggregation method provided in this embodiment of the invention may include the following steps:
[0096] Acquire multiple images of faces to be aggregated; wherein, the multiple images are images collected within a time period belonging to a first time granularity, and the multiple images correspond to multiple image groups, the multiple image groups are obtained by dividing the multiple images into groups according to a second time granularity, the second time granularity being smaller than the first time granularity;
[0097] The multiple images are subjected to a first clustering process to obtain a first clustering result; wherein, the first clustering process is a clustering process using facial features;
[0098] Each image group is subjected to a second clustering process to obtain a second clustering result; wherein, the second clustering process is a clustering process using the facial features and specified auxiliary features, and the specified auxiliary features are features that are affected by different time periods belonging to the second time granularity;
[0099] Using the second clustering result, the first clustering result is corrected to obtain the face clustering result at the first time granularity.
[0100] The face clustering method provided in this invention sets up two types of images at different granularities for multiple images to be clustered: multiple images at a first time granularity and multiple image groups at a second time granularity. Thus, different clustering methods are applied to the images at different time granularities to obtain clustering results at different time granularities. Furthermore, considering that the second clustering method utilizes richer clustering criteria, resulting in more accurate results, while the first clustering result may lack accuracy due to low-quality images, the second clustering result can be used to correct the first clustering result, thereby obtaining the face clustering result at the first time granularity. Therefore, compared to related technologies, this solution can improve the accuracy of face clustering when clustering images belonging to the first time granularity.
[0101] The following description, in conjunction with the accompanying drawings, provides an exemplary method for face aggregation according to an embodiment of the present invention.
[0102] like Figure 1 As shown, the face aggregation method provided by the present invention may include the following steps:
[0103] S101: Obtain multiple images of the face to be aggregated;
[0104] The multiple images are images collected within a time period belonging to the first time granularity, and the multiple images correspond to multiple image groups. The multiple image groups are obtained by dividing the multiple images into groups according to the second time granularity, where the second time granularity is smaller than the first time granularity.
[0105] When performing face clustering, it is necessary to cluster images containing faces. Therefore, multiple images of the faces to be clustered must first be acquired. Furthermore, in addition to faces, the images to be clustered may contain other information, such as clothing information, spatial or temporal information. The methods for acquiring these multiple images can include: acquiring them from other devices communicating with the electronic device using the face clustering method, for example, acquiring them from a camera communicating with the aforementioned electronic device; or acquiring them from locally stored images, etc. This embodiment of the invention does not limit the specific methods used.
[0106] To address the problems of existing technologies, the solution provided by this invention is to cluster images using different clustering methods based on different time granularities. Therefore, images acquired within a first time granularity can be determined, and these images can be divided into multiple image groups according to a smaller time granularity, a second time granularity. For example, if the first time granularity is one week, the multiple images are images containing faces acquired within that week; if the second time granularity is one day, the multiple image groups can be seven image groups, each consisting of images containing faces within the time range of each of the seven days within that week.
[0107] The technical solutions of this invention involve operations such as acquiring, storing, using, processing, transmitting, providing, and disclosing images containing human faces, all of which comply with relevant laws and regulations and do not violate public order and good morals. For example, all of the above operations are performed under authorized conditions.
[0108] S102: Perform the first clustering process on multiple images to obtain the first clustering result;
[0109] The first clustering process is a clustering process using facial features;
[0110] After obtaining multiple images of faces to be aggregated, different methods can be used to aggregate faces at different time granularities.
[0111] For multiple images, a first clustering process can be performed to obtain a first clustering result. This first clustering result may contain at least one first category, with at least one image within each category. For example, in one implementation, the first clustering process for multiple images includes: extracting facial features from each of the multiple images; wherein the facial features are features used to characterize the category to which a face belongs; and using the facial features of the multiple images to cluster the images to obtain a first clustering result. The facial features can be feature vectors. When clustering multiple images using facial features, the similarity between the feature vectors of the facial features of each image and the feature vectors of a pre-defined face category can be calculated to classify the images and obtain the first clustering result; alternatively, the similarity between each pair of facial feature vectors can be calculated, and those that meet the similarity criteria are grouped into one category to obtain the first clustering result.
[0112] The above description of performing a first clustering process on multiple images to obtain the first clustering result is merely an example and should not be construed as limiting the present invention.
[0113] It should be noted that this first clustering method can be called long-term hierarchical clustering. This type of clustering focuses on long-term hierarchical clustering, such as clustering images containing faces across multiple days. The multiple images used in this long-term hierarchical clustering can be high-quality face images or low-quality face images containing other information, which is reasonable. Of course, it is easier to distinguish categories when using high-quality face images.
[0114] S103: Perform a second clustering process on each image group to obtain the second clustering result;
[0115] The second clustering process involves clustering using the facial features and specified auxiliary features, where the specified auxiliary features are features affected by different time periods belonging to the second time granularity.
[0116] For image groups with a smaller temporal granularity, i.e., the second temporal granularity, a second clustering process can be employed to obtain a second clustering result. Specifically, when clustering at the second temporal granularity, facial features and specified auxiliary features other than facial features can be considered for clustering, thereby obtaining a more accurate second clustering result. The second clustering result can contain at least one second category. This second clustering result can then be used to refine the first clustering result.
[0117] It should be noted that since the images in multiple image groups together constitute multiple images to be clustered, after the first clustering process and the second clustering process, each image in the multiple images to be clustered can belong to a first category in the first clustering result and a second category in the second clustering result.
[0118] Specifically, the phrase "affected by different time periods belonging to the second time granularity" means that features may change within different time periods belonging to the second time granularity, but the likelihood of feature changes within the same time period belonging to the second time granularity is relatively low. In other words, the specified auxiliary features of the same target may change within different time periods belonging to the second time granularity, but the likelihood of the specified auxiliary features of the same target changing within the same time period belonging to the second time granularity is relatively low.
[0119] Optionally, in one implementation, the specified auxiliary features include at least one of the following features: human body features and spatiotemporal features, wherein the human body features are features used to characterize human body information in the image, and the spatiotemporal features are features used to characterize the time and space of image acquisition. The features of the human body in the image can be obtained by feature extraction from the entire image, and different clothing worn by the target in the image can affect the human body features.
[0120] It is understandable that a target's clothing typically changes within different time periods belonging to the second time granularity. For example, a target's clothing may change on two different days within the same week, while it usually remains unchanged on the same day. Clothing is a major factor influencing human characteristics; that is, the same target's human characteristics can differ under different clothing. Therefore, the human characteristics of the same target can be considered as features influenced by different time periods belonging to the second time granularity, thus serving as designated auxiliary features.
[0121] Similarly, within the same time frame, the spatiotemporal information of a target generally does not change or changes very little, for example, working at the target's workstation. For the same time frame, spatiotemporal features can also be used as designated auxiliary features in the face clustering process.
[0122] Additionally, for example, the step of performing a second clustering process on each image group to obtain a second clustering result includes: for each image group, extracting the facial features and the specified auxiliary features of each image in the image group; fusing the facial features and the specified auxiliary features of each image to obtain the fused features of each image; and clustering the images in the image group according to the fused features of each image to obtain the clustering result of the image group; and determining the clustering result corresponding to each image group to obtain the second clustering result.
[0123] Since the second clustering process clusters based on multiple features, we can first extract the features of each image group, then fuse the features of each image in each image group to obtain a fused feature representing the classification information of each image. Based on this fused feature, we can then perform image clustering to obtain the second clustering result. Specifically, when clustering images in each image group based on the fused feature, we can use the clustering method described in the first clustering process, which will not be elaborated upon here.
[0124] It should be noted that this second clustering method can be called short-time hierarchical clustering. This type of clustering focuses on short-term hierarchical clustering, such as clustering face images from the same day. The multiple image groups used in this short-time hierarchical clustering can include both high-quality and low-quality face images. Furthermore, since human features and spatiotemporal features remain largely unchanged or change very little within the same day, short-time hierarchical clustering, which uses weighted fusion of face features, human features, and spatiotemporal features, can better cluster face images from the same day, compensating for the limitations of using only face features. Therefore, after obtaining the first and second clustering results, the second clustering result can be used to correct the first clustering result, yielding the face clustering results for multiple images.
[0125] It should be noted that when fusing facial features and specified auxiliary features, a preset weight ratio can be used. For example, in one implementation, the weight relationship used in the feature fusion includes: the weight of the facial features in each image is greater than the weight of the specified auxiliary features.
[0126] Taking the specified auxiliary features, including human features and spatiotemporal features, as an example, the fusion weights can be set as follows:
[0127] Facial features: Body features: Spatiotemporal features = 6:3:1.
[0128] The above description of performing a second clustering process on each image group to obtain the second clustering results is merely an example and should not be construed as limiting the present invention.
[0129] S104: Using the second clustering result, the first clustering result is corrected to obtain the face clustering result at the first time granularity;
[0130] Since multiple images belong to a larger first time granularity and are clustered using only facial features, resulting in the first clustering result, while multiple image groups belong to a smaller second time granularity and are clustered using facial features and specified auxiliary features, resulting in the second clustering result, the second clustering result obtained using multiple features at the smaller time granularity is more accurate. Therefore, after obtaining the first and second clustering results, since both are based on multiple images to be clustered, and the clustering result at the shorter time granularity is more accurate than the one at the longer time granularity, the second clustering result can be used to correct the first clustering result, thus obtaining the facial clustering result at the first time granularity.
[0131] Specifically, the first clustering result is corrected using the second clustering result to obtain the face clustering result at the first time granularity, including:
[0132] Using the second clustering result, the first clustering result is subjected to one or more of the following processing methods: category correction processing, category merging processing, and image recall processing, to obtain the face clustering result at the first time granularity.
[0133] The category correction process is used to: perform category correction on the images under the first category contained in the first clustering result;
[0134] The category merging process is used to: merge the first categories contained in the first clustering result;
[0135] The image recall process is used to: add a specified image to a first category included in the first clustering result, and / or add a new first category to the first clustering result; the specified image is an image that does not belong to any first category.
[0136] The second clustering result can be used to correct the wrong category to which the image belongs in the first clustering result, merge multiple categories belonging to the same class in the first clustering result, and perform image recall and other processing from the second clustering result, thereby improving the accuracy of the first clustering result and obtaining the face clustering result corresponding to multiple images.
[0137] The specific implementation methods of category correction processing, category merging processing, and image recall processing will be explained in conjunction with other embodiments later.
[0138] The face clustering method provided in this invention sets up two types of images at different granularities for multiple images to be clustered: multiple images at a first time granularity and multiple image groups at a second time granularity. Thus, different clustering methods are applied to the images at different time granularities to obtain clustering results at different time granularities. Furthermore, considering that the second clustering method utilizes richer clustering criteria, resulting in more accurate results, while the first clustering result may lack accuracy due to low-quality images, the second clustering result can be used to correct the first clustering result, thereby obtaining the face clustering result at the first time granularity. Therefore, compared to related technologies, this solution can improve the accuracy of face clustering when clustering images belonging to the first time granularity.
[0139] Optionally, in another embodiment of the present invention, the method of performing category correction processing on the first clustering result using the second clustering result includes:
[0140] For the first category to be corrected contained in the first clustering result, determine the category to which the image under the first category to be corrected belongs in the second category contained in the second clustering result, and take it as the category to be analyzed;
[0141] If the images under the category to be analyzed belong to multiple first categories, then the proportion of images belonging to each first category in the images under the category to be analyzed is counted, and the first category to which the image with the largest proportion belongs is determined as the first category to be matched;
[0142] If the first category to be matched is not the first category to be corrected, then the images belonging to the category to be analyzed under the first category to be corrected are adjusted to the first category to be matched.
[0143] Since the first clustering result targets a relatively large time granularity, the clustering results obtained from clustering face images may be inaccurate. For example, an image may actually belong to class A, but in the first clustering result, the image belongs to class B. Therefore, the first clustering result needs to be corrected to improve the accuracy of the face clustering results.
[0144] In this process, each of the first clustering results can be used as a first category to be corrected, allowing for category correction processing on images within each first category. Furthermore, the number of categories to be analyzed can be one or more, with the processing for each category being identical.
[0145] For example, the first clustering result includes a first category including category A, category B and category C, and the second clustering result includes a second category including category a, category b and category c, wherein there is at least one image under each category, that is, the at least one image belongs to that category;
[0146] When category A is used as the first category to be corrected, the images under category A in multiple second categories can be identified as belonging to categories a and b. In this case, the categories to be analyzed include a and b. For category a, if the images under category a belong to multiple first categories: category A and category B, then the proportion of images belonging to category A in category a is 30%, and the proportion of images belonging to category B is 70%. In this case, category B is used as the first category to be matched. Since the first category to be matched is not category A, i.e., it is not the first category to be corrected, the images under category A that belong to category a are adjusted to category B. Similarly, for category b, the same analysis method can be used to process the images under category A to continue to correct the category.
[0147] By using the second clustering results to correct the first clustering results, the categories of icons that are incorrectly clustered in the first clustering results can be corrected, thereby improving the accuracy of face clustering.
[0148] Optionally, in another embodiment of the present invention, the method of using the second clustering result to perform category merging processing on the first clustering result includes:
[0149] For the second category to be analyzed contained in the second clustering result, determine the category to which the image under the second category to be analyzed belongs in each of the first categories contained in the first clustering result, and obtain at least one category to be processed;
[0150] For each category to be processed, the proportion of images belonging to each second category in the images under that category is counted, and the second category to which the image with the largest proportion belongs is determined as the second category to be matched;
[0151] If the second category to be matched is the second category to be analyzed, then the category to be processed is determined as the category to be merged corresponding to the second category to be analyzed;
[0152] If there are multiple categories to be merged corresponding to the second category to be analyzed, the images under the categories to be merged corresponding to the second category to be analyzed will be merged.
[0153] Since the first clustering result targets a relatively large time granularity, and the features used in the first clustering method only include facial features, the resulting first clustering result may produce gaps. For example, the first clustering result may contain category C and category B, but in fact, the images in category C and category B are facial images belonging to the same target X, which means that gaps have been produced. Therefore, it is necessary to merge category C and category B to reduce facial gaps.
[0154] For example, the second clustering result includes a second category, a category, a category, and a category, and the first clustering result includes a first category, a category, and a category, a category; wherein, there is at least one image under each category, that is, the at least one image belongs to that category;
[0155] Using category b as the second category to be analyzed, the images of category b under multiple first categories can be identified as belonging to categories B and C. In this case, the categories to be processed include B and C. For category B, if the images under category B belong to multiple second categories: category a and category b, then the percentage of images belonging to category a under category B is 10%, and the percentage of images belonging to category b is 90%. For category C, if the images under category C belong to multiple second categories: category b and category c, then the percentage of images belonging to category b under category B is 80%, and the percentage of images belonging to category c is 20%. In this case, category b is the second category to be matched, and the second category to be matched is the second category to be analyzed: b. Categories B and C can be used as the categories to be merged corresponding to the second category to be analyzed. In this case, B and C are two categories, and the images under categories B and C can be merged, that is, the images of category B and category C are merged into one first category: X. Similarly, for the second category a or c to be analyzed, the above analysis method can also be used to process the categories to be processed corresponding to category a or category c.
[0156] By using the second clustering result to perform category merging on the first clustering result, multiple categories in the first clustering result that should belong to one category can be merged, reducing the fragmentation of face clustering results and improving the accuracy of face clustering.
[0157] Optionally, in another embodiment of the present invention, the method of using the second clustering result to perform image recall processing on the first clustering result includes:
[0158] If there is an intersection between the images in a first category included in the first clustering result and the images in a second category included in the second clustering result, and the proportion of the number of images in the intersection to the number of images in the second category is higher than a predetermined threshold, then the images in the second category that do not belong to any of the first categories are determined to be images in the first category.
[0159] And / or,
[0160] If a second category contained in the second clustering result has no intersection with any of the first categories in the first clustering result, then the second category is added as a category to the first clustering result.
[0161] Since the first clustering result targets a larger time granularity, while the second clustering result targets a smaller time granularity, and the features targeted by the second clustering method include facial features and specified auxiliary features, the second clustering result may contain more categories than the first clustering result. Therefore, image retrieval can be performed from the second clustering result based on the first clustering result, that is, to retrieve categories or images not included in the first clustering result from the second clustering result.
[0162] For example, if an image under a first category A in the first clustering result intersects with an image under a second category a in the second clustering result, and the proportion of the intersection of A and a with the images in a is higher than a predetermined threshold, then the image in category a that does not intersect with A is determined as an image under A. For example: A = {x, y, z}, a = {x, y, z, m}, then m is determined as an image under A, i.e., A = {x, y, z, m}.
[0163] For example, if a second category 'a' in the second clustering result has no intersection with any of the first categories in the first clustering result, then the second category 'a' is added as a category to the first clustering result. For instance, if the first clustering result is X = {A, B, C} and the second clustering result is Y = {a}, and X and Y have no intersection, then category 'a' is classified as a category belonging to the first clustering result, i.e., X = {A, B, C, a}.
[0164] By utilizing the second clustering result to perform image recall processing on the first clustering result, images can be accurately classified and their categories determined, thus improving the accuracy of face clustering.
[0165] The following detailed description of a face aggregation method provided by the present invention is based on a specific embodiment.
[0166] like Figure 2 As shown, when clustering images containing faces over multiple days, there are two different clustering methods: long-term hierarchical clustering and short-term hierarchical clustering, namely, clustering at the first time granularity and clustering at the second time granularity.
[0167] After acquiring multi-day data, and corresponding to the multiple images to be clustered for the faces mentioned above, the multi-day data can be clustered according to different time levels. Long-term hierarchical clustering is a method of clustering based on facial features, corresponding to the first clustering process mentioned above. Cluster A can be obtained through facial features, and the long-term clustering result is obtained based on this, corresponding to the first clustering result. Short-term hierarchical clustering, corresponding to the second clustering process mentioned above, can first divide the multi-day images containing faces into multiple single-day data sets. Then, using facial features, body features, and spatiotemporal features, corresponding to the aforementioned facial features and specified auxiliary features, cluster B is obtained, and the short-term clustering result is obtained based on this, corresponding to the second clustering result.
[0168] After obtaining clustering results at two different time levels, the short-term clustering results can be used to correct, merge, or recall the long-term clustering results to obtain face clustering results. Correspondingly, the first clustering result is corrected using the second clustering result to obtain face clustering results corresponding to the multiple images.
[0169] The correction step involves correcting incorrectly clustered faces: Iterating through each long-term category *uni*, calculating the short-term categories corresponding to the images within that category, and then calculating the percentage of images in each short-term category *key* belonging to the long-term category. When an image in the long-term category *uni* is not the largest category *max_class* in the short-term category *key*, the category of the image in that short-term category *key* belonging to the long-term category *uni* is changed to *max_class*. This corresponds to the correction step in step S104 above.
[0170] Merging involves combining multiple categories belonging to the same class to reduce face fragmentation: Iterate through each short-term category *uni*, count the long-term categories corresponding to the images within that category, and then count the percentage of images in each long-term category *key* that belong to the short-term category. When the short-term category *uni* is the largest category to which the images in the long-term category *key* belong, add *key* to the dictionary corresponding to *uni*. When the dictionary element *uni* has more than one element, the corresponding long-term categories need to be merged into one category. This corresponds to the merging step in step S104 above.
[0171] Recall refers to recalling unclustered faces. When two clustering results (long-term and short-term clustering results) overlap and the results are relatively concentrated (high overlap, corresponding to exceeding the predetermined threshold mentioned above), face images in the short-term category that do not intersect with the long-term category are added to the corresponding long-term category. When two clustering results (a category in the short-term clustering result and all categories in the long-term clustering result) do not overlap, the short-term category is directly treated as a category and added to the long-term face category. This corresponds to the recall step in step S104 above.
[0172] The above two clustering results are fused, mainly by using short-term clustering results and modifying them based on long-term clustering results. Finally, through correction, merging and recall processing, more accurate long-term hierarchical face clustering results can be obtained.
[0173] This invention provides a face clustering method that, when performing clustering at a long-term level, focuses on the consistency and high availability of high-quality face images across multiple dates, reducing face fragmentation over long periods. When performing clustering at a short-term level, it focuses on the consistency of features such as face, body, and spatiotemporal characteristics, better clustering high-quality and low-quality images of the same target together. It can utilize features other than faces, such as body and spatiotemporal characteristics, to better address the fragmentation problem of low-quality images. Furthermore, when performing clustering at different time levels, each image among the multiple images to be clustered can belong to a long-term category in the long-term clustering result and a short-term category in the short-term clustering result. Based on this, deep fusion steps such as correction, merging, and recall are performed on the long-term clustering result using the short-term clustering result, significantly improving the accuracy of the resulting face clustering.
[0174] Based on the above-described face aggregation method, this embodiment of the invention also provides a face recognition method.
[0175] The facial recognition method provided in this invention can be applied to electronic devices, which can be terminal devices or servers. Terminal devices may include mobile phones and tablets, etc. This invention does not limit the specific form of the electronic device. The facial recognition method provided in this invention can be applied to any scenario with facial recognition requirements, such as attendance scenarios using facial recognition, access control scenarios using facial recognition, etc.
[0176] The execution entity of the face recognition method provided in this embodiment of the invention can be a face recognition device. For example, the face recognition device can be functional software running on a terminal device, such as face recognition software, in which case the face recognition device can perform face recognition on the input image to be recognized. Alternatively, the face recognition device can be a plugin for an existing client, such as a plugin in a client for managing images containing faces. Furthermore, the face recognition device can also be a functional module in the server-side program corresponding to the face recognition client, running on a server, in which case the face recognition client can upload the image to be recognized to the face recognition device.
[0177] like Figure 3 As shown, the face recognition method provided by the present invention includes the following steps:
[0178] S301: Obtain face recognition request;
[0179] The face recognition request contains a target image for which face recognition is to be performed;
[0180] Face recognition is a biometric technology that identifies individuals based on their facial features. It involves identifying the identity of a person by examining an image containing their facial features. Therefore, it is necessary to first obtain the target image to be recognized, which is carried in the face recognition request, and then perform face recognition on that target image through subsequent steps.
[0181] It is understood that there can be multiple ways to obtain a face recognition request, and this invention does not limit the method of obtaining a face recognition request. For example, in one implementation, obtaining a face recognition request includes: obtaining a face recognition request containing a target image to be recognized from another device communicating with the electronic device applying the face recognition method; for example, obtaining a face recognition request containing a target image to be recognized from a camera communicating with the aforementioned electronic device.
[0182] S302: Based on the face aggregation results, perform face recognition on the target image to obtain the face recognition result;
[0183] The face aggregation result is generated using the face aggregation method described above.
[0184] After obtaining a face recognition request, the face recognition result of the target image to be recognized in the face request can be performed based on the face aggregation result generated by the face aggregation method described above, thereby obtaining the face recognition result of the target image.
[0185] It should be noted that the method for performing face recognition on the target image can be similar to the method of clustering multiple images in face archiving. For example, facial features of the target image can be extracted, and the similarity between the facial features of the target image and various facial features in the face archiving results can be calculated. Based on the similarity results, the face recognition result of the target image can be determined. For instance, the category with the highest similarity to the facial features of the target image in the face archiving results can be selected as the face recognition result of the target image. Alternatively, multiple categories in the face archiving results whose facial feature similarity to the target image exceeds a specified threshold (e.g., 80%) can be selected as the face recognition result of the target image. No limitation is imposed on the face recognition result of the target image here.
[0186] The face recognition method provided by this invention utilizes the face clustering results generated by the aforementioned face clustering method. These results correct long-term clustering results using short-term clustering, thus improving the accuracy of face clustering when clustering images belonging to the first time granularity. Therefore, by reducing erroneous clustering and fragmentation in the face clustering results, the accuracy of face recognition can also be improved when using these results for face recognition.
[0187] Based on the above-described face aggregation method, this invention also provides a face aggregation device, such as... Figure 4 As shown, the device includes:
[0188] The first acquisition module 410 is used to acquire multiple images of the face to be aggregated; wherein, the multiple images are images collected within a time period belonging to a first time granularity, and the multiple images correspond to multiple image groups, the multiple image groups are obtained by dividing the multiple images into groups according to a second time granularity, the second time granularity being smaller than the first time granularity.
[0189] The first clustering module 420 is used to perform a first clustering process on the multiple images to obtain a first clustering result; wherein, the first clustering process is a clustering process using facial features;
[0190] The second clustering module 430 is used to perform a second clustering process on each image group to obtain a second clustering result; wherein, the second clustering process is to perform clustering using the face features and specified auxiliary features, and the specified auxiliary features are features that are affected by different time periods belonging to the second time granularity.
[0191] The correction module 440 is used to correct the first clustering result using the second clustering result to obtain the face clustering result at the first time granularity.
[0192] The face clustering method provided in this invention sets up two types of images at different granularities for multiple images to be clustered: multiple images at a first time granularity and multiple image groups at a second time granularity. Thus, different clustering methods are applied to the images at different time granularities to obtain clustering results at different time granularities. Furthermore, considering that the second clustering method utilizes richer clustering criteria, resulting in more accurate results, while the first clustering result may lack accuracy due to low-quality images, the second clustering result can be used to correct the first clustering result, thereby obtaining the face clustering result at the first time granularity. Therefore, compared to related technologies, this solution can improve the accuracy of face clustering when clustering images belonging to the first time granularity.
[0193] Optionally, the specified auxiliary features include at least one of the following features: human body features and spatiotemporal features, wherein the human body features are features used to characterize human body information in the image, and the spatiotemporal features are features used to characterize the time and space of image acquisition.
[0194] Optionally, the correction module is specifically used for:
[0195] Using the second clustering result, the first clustering result is subjected to one or more of the following processing methods: category correction processing, category merging processing, and image recall processing, to obtain the face clustering result at the first time granularity.
[0196] The category correction process is used to: perform category correction on the images under the first category contained in the first clustering result;
[0197] The category merging process is used to: merge the first categories contained in the first clustering result;
[0198] The image recall process is used to: add a specified image to a first category included in the first clustering result, and / or add a new first category to the first clustering result; the specified image is an image that does not belong to any first category.
[0199] Optionally, the method of using the second clustering result to perform category correction processing on the first clustering result includes:
[0200] For the first category to be corrected contained in the first clustering result, determine the category to which the image under the first category to be corrected belongs in the second category contained in the second clustering result, and take it as the category to be analyzed;
[0201] If the images under the category to be analyzed belong to multiple first categories, then the proportion of images belonging to each first category in the images under the category to be analyzed is counted, and the first category to which the image with the largest proportion belongs is determined as the first category to be matched;
[0202] If the first category to be matched is not the first category to be corrected, then the images belonging to the category to be analyzed under the first category to be corrected are adjusted to the first category to be matched.
[0203] Optionally, the method of using the second clustering result to perform category merging processing on the first clustering result includes:
[0204] For the second category to be analyzed contained in the second clustering result, determine the category to which the image under the second category to be analyzed belongs in each of the first categories contained in the first clustering result, and obtain at least one category to be processed;
[0205] For each category to be processed, the proportion of images belonging to each second category in the images under that category is counted, and the second category to which the image with the largest proportion belongs is determined as the second category to be matched;
[0206] If the second category to be matched is the second category to be analyzed, then the category to be processed is determined as the category to be merged corresponding to the second category to be analyzed;
[0207] If there are multiple categories to be merged corresponding to the second category to be analyzed, the images under the categories to be merged corresponding to the second category to be analyzed will be merged.
[0208] Optionally, the method of using the second clustering result to perform image recall processing on the first clustering result includes:
[0209] If there is an intersection between the images in a first category included in the first clustering result and the images in a second category included in the second clustering result, and the proportion of the number of images in the intersection to the number of images in the second category is higher than a predetermined threshold, then the images in the second category that do not belong to any of the first categories are determined to be images in the first category.
[0210] And / or,
[0211] If a second category contained in the second clustering result has no intersection with any of the first categories in the first clustering result, then the second category is added as a category to the first clustering result.
[0212] Optionally, the second clustering module is specifically used for:
[0213] For each image group, the facial features and the specified auxiliary features of each image in the image group are extracted respectively. The facial features and the specified auxiliary features of each image are fused to obtain the fused features of each image. The images in the image group are clustered according to the fused features of each image to obtain the clustering result of the image group.
[0214] The clustering results corresponding to each image group are determined to obtain the second clustering result.
[0215] Optionally, the weights used in the feature fusion process have the following relationships:
[0216] The weight of the facial features in each image is greater than the weight of the specified auxiliary features.
[0217] Based on the above-described face recognition method, embodiments of the present invention also provide a face recognition device, such as... Figure 5 As shown, the device includes:
[0218] The second acquisition module 510 is used to acquire a face recognition request; wherein the face recognition request carries a target image to be recognized.
[0219] The recognition module 520 is used to perform face recognition on the target image based on the face aggregation result, and obtain the face recognition result;
[0220] The face aggregation result is generated using the face aggregation method.
[0221] The face recognition method provided by this invention utilizes the face clustering results generated by the aforementioned face clustering method. These results correct long-term clustering results using short-term clustering, thus improving the accuracy of face clustering when clustering images belonging to the first time granularity. Therefore, by reducing erroneous clustering and fragmentation in the face clustering results, the accuracy of face recognition can also be improved when using these results for face recognition.
[0222] This invention also provides an electronic device, such as... Figure 6As shown, it includes a processor 601, a communication interface 602, a memory 603, and a communication bus 604, wherein the processor 601, the communication interface 602, and the memory 603 communicate with each other through the communication bus 604.
[0223] Memory 603 is used to store computer programs;
[0224] The processor 601, when executing the program stored in the memory 603, implements any face aggregation method and / or face recognition method.
[0225] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0226] The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0227] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0228] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0229] In another embodiment of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and when the computer program is executed by a processor, it implements any of the above-described face aggregation method and / or face recognition method.
[0230] In another embodiment of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the face aggregation method and / or face recognition method described in the above embodiments.
[0231] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).
[0232] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0233] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the apparatus embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0234] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. A face clustering method, characterized in that, The method includes: Acquire multiple images of faces to be aggregated; wherein, the multiple images are images collected within a time period belonging to a first time granularity, and the multiple images correspond to multiple image groups, the multiple image groups are obtained by dividing the multiple images into groups according to a second time granularity, the second time granularity being smaller than the first time granularity; The multiple images are subjected to a first clustering process to obtain a first clustering result; wherein, the first clustering process is a clustering process using facial features; Each image group is subjected to a second clustering process to determine the clustering result corresponding to each image group, thereby obtaining the second clustering result; wherein, the second clustering process is a clustering process using the facial features and specified auxiliary features, and the specified auxiliary features are features affected by different time periods belonging to the second time granularity; Using the second clustering result, the first clustering result is corrected to obtain the face clustering result at the first time granularity.
2. The method of claim 1, wherein, The specified auxiliary features include at least one of the following features: human body features and spatiotemporal features, wherein the human body features are features used to characterize human body information in the image, and the spatiotemporal features are features used to characterize the time and space of image acquisition.
3. The method according to claim 1 or 2, characterized in that, The step of using the second clustering result to correct the first clustering result to obtain the face clustering result at the first time granularity includes: Using the second clustering result, the first clustering result is subjected to one or more of the following processing methods: category correction processing, category merging processing, and image recall processing, to obtain the face clustering result at the first time granularity. The category correction process is used to: perform category correction on the images under the first category contained in the first clustering result; The category merging process is used to: merge the first categories contained in the first clustering result; The image recall process is used to: add a specified image to a first category included in the first clustering result, and / or add a new first category to the first clustering result; the specified image is an image that does not belong to any first category.
4. The method according to claim 3, characterized in that, The method of using the second clustering result to perform category correction processing on the first clustering result includes: For the first category to be corrected contained in the first clustering result, determine the category to which the image under the first category to be corrected belongs in the second category contained in the second clustering result, and take it as the category to be analyzed; If the images under the category to be analyzed belong to multiple first categories, then the proportion of images belonging to each first category in the images under the category to be analyzed is counted, and the first category to which the image with the largest proportion belongs is determined as the first category to be matched; If the first category to be matched is not the first category to be corrected, then the images belonging to the category to be analyzed under the first category to be corrected are adjusted to the first category to be matched.
5. The method according to claim 3, characterized in that, The method of merging categories of the first clustering result using the second clustering result includes: For the second category to be analyzed contained in the second clustering result, determine the category to which the image under the second category to be analyzed belongs in each of the first categories contained in the first clustering result, and obtain at least one category to be processed; For each category to be processed, the proportion of images belonging to each second category in the images under that category is counted, and the second category to which the image with the largest proportion belongs is determined as the second category to be matched; If the second category to be matched is the second category to be analyzed, then the category to be processed is determined as the category to be merged corresponding to the second category to be analyzed; If there are multiple categories to be merged corresponding to the second category to be analyzed, the images under the categories to be merged corresponding to the second category to be analyzed will be merged.
6. The method according to claim 3, characterized in that, The method of using the second clustering result to perform image recall processing on the first clustering result includes: If there is an intersection between the images in a first category included in the first clustering result and the images in a second category included in the second clustering result, and the proportion of the number of images in the intersection to the number of images in the second category is higher than a predetermined threshold, then the images in the second category that do not belong to any of the first categories are determined to be images in the first category. And / or, If a second category contained in the second clustering result has no intersection with any of the first categories in the first clustering result, then the second category is added as a category to the first clustering result.
7. The method according to claim 1 or 2, characterized in that, The second clustering process is performed on each image group to obtain the second clustering result, including: For each image group, the facial features and the specified auxiliary features of each image in the image group are extracted respectively. The facial features and the specified auxiliary features of each image are fused to obtain the fused features of each image. The images in the image group are clustered according to the fused features of each image to obtain the clustering result of the image group. The clustering results corresponding to each image group are determined to obtain the second clustering result.
8. The method according to claim 7, characterized in that, The weight relationships used in the feature fusion include: The weight of the facial features in each image is greater than the weight of the specified auxiliary features.
9. A face recognition method, characterized in that, The method includes: Obtain a face recognition request; wherein the face recognition request carries a target image to be recognized; Based on the face aggregation results, face recognition is performed on the target image to obtain the face recognition result; The face aggregation result is generated using the method described in any one of claims 1-8.
10. A face recognition device, characterized in that, The device includes: The first acquisition module is used to acquire multiple images of the face to be aggregated; wherein, the multiple images are images collected within a time period belonging to a first time granularity, and the multiple images correspond to multiple image groups, the multiple image groups are obtained by dividing the multiple images into groups according to a second time granularity, the second time granularity being smaller than the first time granularity; The first clustering module is used to perform a first clustering process on the multiple images to obtain a first clustering result; wherein, the first clustering process is a clustering process using facial features; The second clustering module is used to perform a second clustering process on each image group to determine the clustering result corresponding to each image group and obtain the second clustering result; wherein, the second clustering process is to perform clustering using the face features and specified auxiliary features, and the specified auxiliary features are features that are affected by different time periods belonging to the second time granularity. The correction module is used to correct the first clustering result using the second clustering result to obtain the face clustering result at the first time granularity.
11. A face recognition device, characterized in that, The device includes: The second acquisition module is used to acquire a face recognition request; wherein the face recognition request carries a target image to be recognized. The recognition module is used to perform face recognition on the target image based on the face aggregation results, and obtain the face recognition result; The face aggregation result is generated using the method described in any one of claims 1-8.
12. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the steps of the method described in any one of claims 1-9.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method described in any one of claims 1-9.