CN115273191A - Face document gathering method, face recognition method, device, equipment and medium - Google Patents

Face document gathering method, face recognition method, device, equipment and medium Download PDF

Info

Publication number
CN115273191A
CN115273191A CN202210887767.5A CN202210887767A CN115273191A CN 115273191 A CN115273191 A CN 115273191A CN 202210887767 A CN202210887767 A CN 202210887767A CN 115273191 A CN115273191 A CN 115273191A
Authority
CN
China
Prior art keywords
category
clustering
face
image
clustering result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210887767.5A
Other languages
Chinese (zh)
Inventor
简春菲
李林森
李彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN202210887767.5A priority Critical patent/CN115273191A/en
Publication of CN115273191A publication Critical patent/CN115273191A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/80Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level
    • G06V10/806Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level of extracted features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a face document gathering method, a face recognition method, a face document gathering device, face recognition equipment and a face document gathering medium, and relates to the technical field of image processing. The face document gathering method comprises the following steps: acquiring a plurality of images of a face to be subjected to face accumulation; performing first clustering processing on the multiple images to obtain a first clustering result; performing second clustering processing on each image group respectively to obtain a second clustering result; and correcting the first clustering result by using the second clustering result to obtain a face clustering result under the first time granularity. The accuracy of the face gathering can be improved through the scheme.

Description

Face document gathering method, face recognition method, device, equipment and medium
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a face clustering method, a face recognition apparatus, a face clustering device, and a face recognition medium.
Background
The face clustering refers to classifying a plurality of images containing faces belonging to the same target into a target file, so as to obtain a plurality of files of a plurality of targets.
In the related art, when face binning is performed on a plurality of images, binning is performed on all the images within a certain time range in the same manner.
However, a large number of low quality images may be present in these images, and the usability and distinguishability of the low quality images is low, thus resulting in a low accuracy of face binning, for example: and a large number of false clustering or splitting of face images.
Therefore, how to improve the accuracy of face clustering is an urgent problem to be solved.
Disclosure of Invention
The embodiment of the invention aims to provide a face document gathering method, a face recognition device, face recognition equipment and a face document gathering medium, so as to improve the accuracy of face document gathering. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a face document gathering method, where the method includes:
acquiring a plurality of images of a to-be-human face to be gathered; the images are acquired within a time length belonging to a first time granularity, the images are provided with a plurality of image groups, the image groups are obtained by dividing the images into groups according to a second time granularity, and the second time granularity is smaller than the first time granularity;
performing first clustering processing on the multiple images to obtain a first clustering result; the first clustering processing is processing of clustering by using human face features;
performing second clustering processing on each image group respectively to obtain a second clustering result; the second clustering processing is processing of clustering by using the face features and specified auxiliary features, and the specified auxiliary features are features influenced by different time periods belonging to the second time granularity;
and correcting the first clustering result by using the second clustering result to obtain a face clustering result under the first time granularity.
Optionally, the specified assistant feature comprises at least one of the following features: the human body characteristics are characteristics used for representing human body information in the image, and the space-time characteristics are characteristics used for representing time and space of image acquisition.
Optionally, the modifying the first clustering result by using the second clustering result to obtain a face document-gathering result under a first time granularity includes:
performing one or more of category correction processing, category merging processing and image recall processing on the first clustering result by using the second clustering result to obtain a face clustering result under a first time granularity;
wherein the category correction processing is to: carrying out class correction on the images under the first class contained in the first clustering result;
the category merging process is to: carrying out category merging on a first category contained in the first clustering result;
the image recall processing to: adding a specified image to the first category contained in the first clustering result, and/or adding a new first category to the first clustering result; the specified image is an image that does not belong to any of the first categories.
Optionally, the manner of performing category correction processing on the first clustering result by using the second clustering result includes:
determining a category to which the image under the first category to be corrected belongs in a second category included in the second clustering result as a category to be analyzed;
if the images under the category to be analyzed belong to a plurality of first categories, counting the occupation ratio of the images belonging to each first category in the images under the category to be analyzed, and determining the first category to which the image with the largest occupation ratio belongs as a first category to be matched;
if the first category to be matched is not the first category to be corrected, adjusting the image belonging to the category to be analyzed under the first category to be corrected to the first category to be matched.
Optionally, the manner of performing category merging processing on the first clustering result by using the second clustering result includes:
determining the category of the image under the second category to be analyzed in each first category contained in the first clustering result aiming at the second category to be analyzed contained in the second clustering result to obtain at least one category to be processed;
counting the occupation ratio of the images belonging to each second category in the images under each category to be processed, and determining the second category to which the image with the maximum occupation ratio belongs as a second category to be matched;
if the second category to be matched is the second category to be analyzed, determining the category to be processed as a category to be merged corresponding to the second category to be analyzed;
and if the number of the categories to be merged corresponding to the second category to be analyzed is multiple, merging the categories of the images under the categories to be merged corresponding to the second category to be analyzed.
Optionally, the manner of performing image recall processing on the first clustering result by using the second clustering result includes:
if an intersection exists between an image under a first category contained in the first clustering result and an image under a second category contained in the second clustering result, and the ratio of the number of the intersected images to the number of the images under the second category is higher than a preset threshold value, determining the image under the second category which does not belong to each first category as the image under the first category;
and/or the presence of a gas in the gas,
and if no intersection exists between a second category contained in the second clustering result and each first category in the first clustering result, adding the second category as one category to the first clustering result.
Optionally, the performing second clustering processing on each image group respectively to obtain a second clustering result includes:
respectively extracting the face features and the specified auxiliary features of each image in each image group aiming at each image group, performing feature fusion on the face features and the specified auxiliary features of each image to obtain the fusion features of each image, and clustering the images in the image group according to the fusion 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 a second clustering result.
Optionally, the magnitude relationship of the weights utilized by the feature fusion includes:
the weight of the facial feature of each image is greater than the weight of the specified assistant feature.
In a second aspect, an embodiment of the present invention provides a face recognition method, where the method includes:
acquiring a face recognition request; the face recognition request carries a target image to be subjected to face recognition;
based on the face clustering result, carrying out face recognition on the target image to obtain a face recognition result;
wherein the face polygraph result is generated by using the face polygraph method according to the first aspect of the present invention.
In a third aspect, an embodiment of the present invention provides a face document gathering device, where the face document gathering device includes:
the first acquisition module is used for acquiring a plurality of images of the face to be subjected to document gathering; the images are acquired within a time length belonging to a first time granularity, the images are provided with a plurality of image groups, the image groups are obtained by dividing the images into groups according to a second time granularity, and the second time granularity is smaller than the first time granularity;
the first clustering module is used for carrying out first clustering processing on the plurality of images to obtain a first clustering result; the first clustering processing is processing of clustering by using human face features;
the second clustering module is used for performing second clustering processing on each image group respectively to obtain a second clustering result; the second clustering processing is processing of clustering by using the face features and specified auxiliary features, and the specified auxiliary features are features influenced by different time periods belonging to the second time granularity;
and the correction module is used for correcting the first clustering result by using the second clustering result to obtain a face clustering result under the first time granularity.
Optionally, the specified assistant feature comprises at least one of the following features: the human body characteristics are characteristics used for representing human body information in the image, and the space-time characteristics are characteristics used for representing time and space of image acquisition.
Optionally, the modification module is specifically configured to:
performing one or more of category correction processing, category merging processing and image recall processing on the first clustering result by using the second clustering result to obtain a face clustering result under a first time granularity;
wherein the category correction processing is to: carrying out class correction on the images under the first class contained in the first clustering result;
the category merging process is to: carrying out category merging on a first category contained in the first clustering result;
the image recall processing to: adding a specified image to the first category contained in the first clustering result, and/or adding a new first category to the first clustering result; the specified image is an image that does not belong to any of the first categories.
Optionally, the manner of performing category correction processing on the first clustering result by using the second clustering result includes:
determining a category to which the image under the first category to be corrected belongs in a second category included in the second clustering result as a category to be analyzed;
if the images under the category to be analyzed belong to a plurality of first categories, counting the occupation ratio of the images belonging to each first category in the images under the category to be analyzed, and determining the first category to which the image with the largest occupation ratio belongs as a first category to be matched;
if the first category to be matched is not the first category to be corrected, adjusting the image belonging to the category to be analyzed under the first category to be corrected to the first category to be matched.
Optionally, the manner of performing category merging processing on the first clustering result by using the second clustering result includes:
determining the category of the image under the second category to be analyzed in each first category contained in the first clustering result aiming at the second category to be analyzed contained in the second clustering result to obtain at least one category to be processed;
counting the occupation ratio of the images belonging to each second category in the images under each category to be processed, and determining the second category to which the image with the maximum occupation ratio belongs as a second category to be matched;
if the second category to be matched is the second category to be analyzed, determining the category to be processed as a category to be merged corresponding to the second category to be analyzed;
and if the number of the classes to be merged corresponding to the second class to be analyzed is multiple, merging the classes of the images under the classes to be merged corresponding to the second class to be analyzed.
Optionally, the manner of performing image recall processing on the first clustering result by using the second clustering result includes:
if an intersection exists between an image under a first category contained in the first clustering result and an image under a second category contained in the second clustering result, and the ratio of the number of the intersected images to the number of the images under the second category is higher than a preset threshold value, determining the image under the second category which does not belong to each first category as the image under the first category;
and/or the presence of a gas in the gas,
and if no intersection exists between a second category contained in the second clustering result and each first category in the first clustering result, adding the second category as one category to the first clustering result.
Optionally, the second classification module is specifically configured to:
respectively extracting the face features and the specified auxiliary features of each image in each image group aiming at each image group, performing feature fusion on the face features and the specified auxiliary features of each image to obtain fusion features of each image, and clustering the images in the image group according to the fusion features of each image to obtain a clustering result of the image group;
and determining the clustering result corresponding to each image group to obtain a second clustering result.
Optionally, the magnitude relationship of the weights utilized by the feature fusion includes:
the weight of the facial feature of each image is greater than the weight of the specified assistant feature.
In a fourth aspect, an embodiment of the present invention provides a face recognition apparatus, where the apparatus includes:
the second acquisition module is used for acquiring a face recognition request; the face recognition request carries a target image to be subjected to face recognition;
the recognition module is used for carrying out face recognition on the target image based on the face clustering result to obtain a face recognition result;
wherein the face polygraph result is generated by using the face polygraph method according to the first aspect of the present invention.
In a fifth aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing any one of the face document collecting method and/or the face recognition method when executing the program stored in the memory.
In a sixth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and the computer program, when executed by a processor, implements any one of the face profiling methods and/or the face recognition methods.
Embodiments of the present invention further provide a computer program product containing instructions, which when run on a computer, cause the computer to perform any one of the above-mentioned face clustering methods and/or face recognition methods.
The embodiment of the invention has the following beneficial effects:
the face document gathering method provided by the embodiment of the invention is set as two types of images under different granularities aiming at a plurality of images to be clustered: the plurality of images at a first time granularity and a plurality of image groups at a second time granularity; therefore, different clustering modes are adopted for the images under different time granularities to obtain clustering results of different time granularities; in addition, in consideration of the fact that the clustering basis used by the second clustering mode is richer, the second clustering result is more accurate, and the first clustering result is possibly insufficient in clustering accuracy due to low-quality images, therefore, the first clustering result can be corrected by using the second clustering result, and the face clustering result under the first time granularity is obtained. Therefore, compared with the related technology, when the document aggregation is performed on each image belonging to the duration under the first time granularity, the accuracy of the face document aggregation can be improved through the scheme. In addition, the face recognition method provided by the embodiment of the invention utilizes the more accurate face gathering result obtained by the face gathering method, so that the face recognition method provided by the embodiment of the invention can improve the accuracy of face recognition.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by referring to these drawings.
Fig. 1 is a schematic flow chart of a face document gathering method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating a schematic diagram of a face polygraph method according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of a face recognition method according to an embodiment of the present invention;
fig. 4 is a schematic view of a face document gathering device according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a face recognition apparatus according to an embodiment of the present invention;
fig. 6 is a schematic diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived from the embodiments given herein by one of ordinary skill in the art, are within the scope of the invention.
The face clustering is to obtain a plurality of files of a plurality of targets, so that when an image containing a face needs to be detected, the target to which the image belongs is matched quickly.
Most of the current face-gathered images are face-included images captured in cities, and the captured images are large in data size and low in image quality. In the related art, the result obtained by performing the clustering on all the images within a certain time range in the same way is not ideal, a large amount of image loss or facial file splitting is generated, and a good facial clustering effect is difficult to obtain in practical application. So-called binning is performed in the same way, for example: and clustering according to the human face features to perform document clustering.
Based on the above, in order to improve the accuracy of face clustering, the invention provides a face clustering method, a face recognition device, face recognition equipment and a medium.
First, the method for gathering the human face provided by the invention is introduced below.
The face document gathering method provided by the embodiment of the invention can be applied to electronic equipment, the electronic equipment can be terminal equipment or a server, and the terminal equipment can comprise: a mobile phone, a tablet computer, and the like, the present invention does not limit the specific form of the electronic device. The embodiment of the invention provides a face document gathering method which can be applied to any scene with face document gathering requirements, such as: attendance scenes, video monitoring scenes, and the like; in addition, the embodiment of the present invention does not limit the acquisition duration range of the image to be subjected to face gathering, for example: and carrying out face accumulation on a plurality of images in the same day, carrying out face accumulation on a plurality of images in multiple days, and the like.
In addition, an execution subject of the face document gathering method provided by the embodiment of the invention can be a face document gathering device. For example, the face document gathering device may be functional software running on the terminal device, such as: functional software for face gathering, wherein the face gathering device can gather face of a plurality of input images; of course, the face document gathering device may also be a plug-in an existing client, for example: a plug-in the client for managing images containing human faces; in addition, the face document gathering device can also be a functional module running in a server program corresponding to the face document gathering client, and at the moment, the face document gathering client can upload a plurality of images to be subjected to face document gathering to the face document gathering device.
The face document gathering method provided by the embodiment of the invention can comprise the following steps:
acquiring a plurality of images of a face to be subjected to face accumulation; the images are acquired within a time length belonging to a first time granularity, the images are provided with a plurality of image groups, the image groups are obtained by dividing the images into groups according to a second time granularity, and the second time granularity is smaller than the first time granularity;
performing first clustering processing on the multiple images to obtain a first clustering result; the first clustering processing is processing of clustering by using human face features;
performing second clustering processing on each image group respectively to obtain a second clustering result; the second clustering processing is processing of clustering by using the face features and specified auxiliary features, and the specified auxiliary features are features influenced by different time periods belonging to the second time granularity;
and correcting the first clustering result by using the second clustering result to obtain a face clustering result under the first time granularity.
The face document gathering method provided by the embodiment of the invention is characterized in that two types of images with different granularities are set for a plurality of images to be clustered: the plurality of images at a first time granularity, and a plurality of image groups at a second time granularity; therefore, different clustering modes are adopted for the images under different time granularities to obtain clustering results of different time granularities; in addition, in consideration of the fact that the clustering basis used by the second clustering mode is richer, the second clustering result is more accurate, and the first clustering result is possibly insufficient in clustering accuracy due to low-quality images, therefore, the first clustering result can be corrected by using the second clustering result, and the face clustering result under the first time granularity is obtained. Therefore, compared with the related technology, when the document aggregation is performed on each image belonging to the duration under the first time granularity, the accuracy of the face document aggregation can be improved through the scheme.
The following describes an exemplary face document gathering method according to an embodiment of the present invention with reference to the accompanying drawings.
As shown in fig. 1, the method for gathering a human face provided by the present invention may include the following steps:
s101: acquiring a plurality of images of a to-be-human face to be gathered;
the images are acquired within a time length belonging to a first time granularity, the images are provided with a plurality of image groups, the image groups are obtained by dividing the images into groups according to a second time granularity, and the second time granularity is smaller than the first time granularity;
when the face is gathered, images including faces need to be clustered, so that a plurality of images to be subjected to face gathering are obtained first. Besides, the image to be subjected to face clustering may include other information besides the face, for example: human body and clothing information, space or time information and the like. Moreover, the manner of acquiring a plurality of images of the to-be-human face document may include: acquiring a plurality of images of the face to be gathered from other devices communicating with the electronic device applying the face gathering method, for example: acquiring a plurality of images of a to-be-face document from a camera communicated with the electronic equipment; or, a plurality of images of the to-be-detected face document are acquired from the locally stored image, and the like, which is not limited in the embodiment of the present invention.
In order to solve the problems of the prior art, the scheme provided by the invention adopts different clustering modes to perform gear aggregation according to different time granularities; thus, images acquired within a first time-granularity duration may be determined and may be separated into a plurality of image groups at a smaller time-granularity, a second time-granularity. For example: the first time granularity is one week, the multiple images are images containing human faces collected in one week, the second time granularity is one day, the multiple image groups can be seven image groups, and the seven image groups are respectively: and an image group consisting of images including human faces contained in the time range of each of the seven days in the week.
In the technical scheme of the invention, the operations of acquisition, storage, use, processing, transmission, provision, disclosure and the like of the related images containing the human faces all conform to the regulations of related laws and regulations and do not violate the good customs of the public order. For example, the above operations are all performed under the condition of obtaining authorization.
S102: carrying out first clustering processing on a plurality of images to obtain a first clustering result;
the first clustering processing is processing of clustering by using human face features;
after a plurality of images of the to-be-face document gathering are obtained, the face document gathering can be carried out in different modes according to different time granularities.
For a plurality of images, a first clustering process may be performed on the images to obtain a first clustering result, where the first clustering result may include at least one first category and at least one image next to each category. For example, in one implementation, the first type of processing performed on the plurality of images includes: respectively extracting the human face characteristics of the plurality of images; the human face features are used for representing the classification of the human face; and clustering the plurality of images by using the human face characteristics of the plurality of images to obtain a first clustering result. When the human face features are used for clustering a plurality of images, the similarity between the feature vector of the human face features of each image and the feature vector of the preset human face category can be calculated, so that classification is carried out, and a first clustering result is obtained; or, similarity is calculated pairwise according to each face feature vector, and the similarity meeting the condition is classified as belonging to one class, so that a first clustering result is obtained.
The above description of performing the first clustering process on a plurality of images to obtain the first clustering result is only an example, and should not be construed as a limitation to the present invention.
Note that the first clustering process may be referred to as long-term hierarchical clustering, and this clustering method is a clustering method that focuses on long-term hierarchies, for example: clustering the images containing the human faces across the day; it is reasonable that a plurality of images utilized by the long-term hierarchical cluster can be high-quality face images or low-quality face images containing other information. Of course, it is more convenient to distinguish between categories when using high quality face images.
S103: performing second clustering processing on each image group respectively to obtain a second clustering result;
the second clustering processing is processing of clustering by using the face features and specified auxiliary features, and the specified auxiliary features are features influenced by different time periods belonging to the second time granularity;
for the image group with smaller time granularity, i.e. the second time granularity, the second clustering result can be obtained by adopting the second clustering processing mode. Specifically, when clustering is performed for the second time granularity, the face features and the specified auxiliary features other than the face features may be considered for clustering, so as to obtain a more accurate second clustering result, where the second clustering result may include at least one second category. In this way, the second clustering result can be used to modify the first clustering result.
It should be noted that, since the images in the plurality of image groups together constitute a plurality of images of the to-be-face-gathered document, after the first clustering process and the second clustering process are performed, for each image in the plurality of images of the to-be-face-gathered document, the image may belong to a first category in the first clustering result and belong to a second category in the second clustering result.
Wherein, what is called being influenced by different time periods belonging to the second time granularity specifically means: the features may change at different times belonging to the second time granularity, and the features may change less likely to change at the same time belonging to the second time granularity. That is, the specified assist features of the same target may change at different times belonging to the second temporal granularity, and the specified assist features of the same target may change less likely to change at the same time belonging to the second temporal granularity.
Optionally, in an implementation, the specified auxiliary feature includes at least one of the following features: the human body feature is a feature for representing human body information in the image, and the spatio-temporal feature is a feature for representing time and space of image acquisition. The human body features in the image can be obtained by extracting the features of the whole image, and the human body features can be influenced by different clothes of the target in the image.
It is appreciated that at different times belonging to the second time granularity, the target apparel typically changes, for example: in two different days of the same week, the target clothes can be changed, and in the same day, the target clothes can not be changed generally; the clothing is a main factor influencing human body characteristics, that is, the human body characteristics of the same target can be different under different clothing. Thus, the human features of the same target may be used as features that are affected by different periods belonging to the second temporal granularity, thereby being used as the specified assist features.
Similarly, the spatiotemporal information of the target generally does not change or changes very little over the same time of day, for example: work at the station of the object. And aiming at the time range of the same day, the space-time characteristics can be used as specified auxiliary characteristics, so that the method is applied to the face clustering process.
In addition, for example, the performing the second clustering process on each image group to obtain the second clustering result includes: respectively extracting the face features and the specified auxiliary features of each image in each image group aiming at each image group, performing feature fusion on the face features and the specified auxiliary features of each image to obtain the fusion features of each image, and clustering the images in the image group according to the fusion 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 a second clustering result.
Since the second clustering process is performed according to a plurality of features, the features of each image group can be extracted first, then the features of each image in each image group are fused to obtain a fused feature of each image, which represents the image classification information, and the second clustering result is obtained by clustering the images based on the fused feature. Based on the fusion features, the clustering method in the first clustering process may be adopted when clustering the images in each image group, which is not described herein again.
The second clustering method may be referred to as short-time hierarchical clustering, and is a clustering method that focuses on a short-time hierarchy, such as: clustering the face images in the same day; the plurality of image groups utilized by the short-time hierarchical cluster may include high-quality face images and low-quality face images. Moreover, because the human body features and the time-space features are basically unchanged or slightly changed within the same time range, the human face images on the same day can be clustered better by using a clustering mode of weighting and fusing the human face features, the human body features, the time-space features and the like during short-time hierarchical clustering, and the defect that only the human face features are used is made up. Therefore, after the first clustering result and the second clustering result are obtained, the first clustering result can be corrected by using the second clustering result, and the face document clustering result corresponding to a plurality of pictures is obtained.
It should be noted that, when the face features and the specified auxiliary features are fused, according to a preset weight proportion, for example, in an implementation manner, a magnitude relationship of the weight used by the feature fusion includes: the weight of the facial feature of each image is greater than the weight of the specified assistant feature.
Taking the example that the specified assistant features include human body features and space-time features, the set fusion weight may be:
face features: human body characteristics: spatio-temporal characteristics = 6.
The above description of performing the second clustering process on each image group to obtain the second clustering result is only for example and should not be construed as a limitation to the present invention.
S104: correcting the first clustering result by using the second clustering result to obtain a face clustering result under the first time granularity;
because the plurality of images belong to a first larger time granularity and are clustered only by the face features to obtain a first clustering result, and the plurality of image groups belong to a second smaller time granularity and are clustered by the face features and the designated auxiliary features to obtain a second clustering result, the second clustering result obtained by clustering by the multi-features under the smaller time granularity is more accurate. Then, after the first clustering result and the second clustering result are obtained, because the first clustering result and the second clustering result are both for a plurality of images to be subjected to document clustering, and the clustering result of the short-time granularity is more accurate than the clustering result of the long-time granularity, the first clustering result can be corrected by using the second clustering result, so that the face document clustering result under the first time granularity is obtained.
The modifying the first clustering result by using the second clustering result to obtain the face document clustering result under the first time granularity includes:
performing one or more of category correction processing, category merging processing and image recall processing on the first clustering result by using the second clustering result to obtain a face clustering result under a first time granularity;
wherein the category correction processing is to: carrying out class correction on the images under the first class contained in the first clustering result;
the category merging process is to: carrying out category merging on a first category contained in the first clustering result;
the image recall processing is to: adding a specified image to a first category contained in the first clustering result, and/or adding a new first category to the first clustering result; the specified image is an image that does not belong to any of the first categories.
The second clustering result can be used for correcting the wrong category to which the image belongs in the first clustering result, combining a plurality of categories to which the image belongs in the first clustering result, and performing image recall and other processing on the second clustering result, so that the accuracy of the first clustering result is improved, and the face clustering results corresponding to a plurality of images are obtained.
The following description will be made with reference to other embodiments with regard to specific implementations of the category correction processing, the category merging processing, and the image recall processing.
The face document gathering method provided by the embodiment of the invention is characterized in that two types of images with different granularities are set for a plurality of images to be clustered: the plurality of images at a first time granularity, and a plurality of image groups at a second time granularity; therefore, different clustering modes are adopted for the images under different time granularities to obtain clustering results of different time granularities; in addition, in consideration of the fact that the clustering basis used by the second clustering mode is richer, the second clustering result is more accurate, and the first clustering result is possibly insufficient in clustering accuracy due to low-quality images, therefore, the first clustering result can be corrected by using the second clustering result, and the face clustering result under the first time granularity is obtained. Therefore, compared with the related technology, when the document aggregation is performed on each image belonging to the duration under the first time granularity, the accuracy of the face document aggregation can be improved through the scheme.
Optionally, in another embodiment of the present invention, the performing the category correction processing on the first clustering result by using the second clustering result includes:
determining a category to which the image under the first category to be corrected belongs in a second category included in the second clustering result as a category to be analyzed;
if the images under the category to be analyzed belong to a plurality of first categories, counting the occupation ratio of the images belonging to each first category in the images under the category to be analyzed, and determining the first category to which the image with the largest occupation ratio belongs as a first category to be matched;
if the first category to be matched is not the first category to be corrected, adjusting the image belonging to the category to be analyzed under the first category to be corrected to the first category to be matched.
Since the time granularity for the first clustering result is a larger time granularity, the clustering result obtained by clustering the face images may be inaccurate, for example: a certain image is actually an image belonging to class a, but in the first clustering result, the class to which the image belongs is class B, so that the first clustering result needs to be corrected, thereby improving the accuracy of the face clustering result.
Each first category included in the first clustering result can be used as a first category to be corrected, so that category correction processing can be performed on images in each first category. Also, the number of categories to be analyzed may be one or more, and the processing for each category to be analyzed is the same.
Illustratively, the first category included in the first clustering result includes category a, category B and category C, and the second category included in the second clustering result includes category a, category B and category C, where at least one image exists under each category, that is, the at least one image belongs to the category;
when the category a is taken as the first category to be corrected, the categories to which the images under the category a belong under a plurality of second categories may be determined as a and b, and at this time, the categories to be analyzed include: a and b; for the category a to be analyzed, if the images under the category a belong to a plurality of first categories: and the category A and the category B count the proportion of the images belonging to the category A in the images under the category a: 30%, and the proportion of images belonging to category B: 70%, at this time, the category B is as the first category to be matched; since the first category to be matched is not the category a, that is, is not the first category to be corrected, the image belonging to the category a under the category a is adjusted to the category B; similarly, for the category b to be analyzed, the processing may also be performed in the above-described analysis manner, so as to continue performing category correction on the images in the category a.
By using the mode of correcting the first clustering result by using the second clustering result, the classes of the icons which are clustered in error in the first clustering result can be corrected, and the accuracy of face clustering is improved.
Optionally, in another embodiment of the present invention, the manner of performing category merging processing on the first clustering result by using the second clustering result includes:
determining the category of the image under the second category to be analyzed in each first category contained in the first clustering result aiming at the second category to be analyzed contained in the second clustering result to obtain at least one category to be processed;
counting the occupation ratio of the images belonging to each second category in the images under each category to be processed, and determining the second category to which the image with the maximum occupation ratio belongs as a second category to be matched;
if the second category to be matched is the second category to be analyzed, determining the category to be processed as a category to be merged corresponding to the second category to be analyzed;
and if the number of the categories to be merged corresponding to the second category to be analyzed is multiple, merging the categories of the images under the categories to be merged corresponding to the second category to be analyzed.
Since the time granularity targeted by the first clustering result is a larger time granularity, and the features utilized by the first clustering method only include facial features, the obtained first clustering result is likely to generate a cracked file, for example: the first clustering result contains a category C and a category B, but actually, images in the category C and the category B are face images belonging to the same target X, that is, a split file is generated, so that the category C and the category B need to be merged to reduce the face split file.
Illustratively, the second category included in the second clustering result includes category a, category B and category C, and the first category included in the first clustering result includes category B and category C; wherein at least one image exists under each category, i.e. the at least one image belongs to the category;
taking the category B as a second category to be analyzed, determining that the categories to which the images of the category B belong under the plurality of first categories are B and C, wherein the categories to be processed comprise B and C; for the class B to be processed, if the images in the class B belong to a plurality of second classes: and the category a and the category B are counted, the proportion of the images belonging to the category a in the images under the category B is counted: 10%, and the image belonging to category b is in proportion to: 90 percent; for the class C to be processed, if the images in the class C belong to a plurality of second classes: and B, counting the proportion of the images belonging to the class B in the images under the class B: 80%, and the image belonging to category c is compared to: 20%,; at this time, the category b is a second category to be matched, and at this time, the second category to be matched is a second category to be analyzed: b, the category B and the category C may be taken as categories to be merged corresponding to a second category to be analyzed, at this time, B and C are two categories, and the images under the category B and the category C may be merged in categories, that is, the images of the category B and the images of the category C are merged to belong to a first category: and (4) X. Similarly, for the second category a or c to be analyzed, the processing may also be performed in the analysis manner described above, so as to merge the categories to be processed corresponding to the category a or the category c.
By utilizing the second clustering result and carrying out the type merging processing on the first clustering result, the merging processing can be carried out corresponding to a plurality of types in the first clustering result belonging to one type, the cracking of the face document-gathering result is reduced, and the accuracy of the face document-gathering is improved.
Optionally, in another embodiment of the present invention, the manner of performing image recall processing on the first clustering result by using the second clustering result includes:
if an intersection exists between an image under a first category contained in the first clustering result and an image under a second category contained in the second clustering result, and the ratio of the number of the intersected images to the number of the images under the second category is higher than a preset threshold value, determining the image under the second category which does not belong to each first category as the image under the first category;
and/or the presence of a gas in the gas,
and if no intersection exists between a second category contained in the second clustering result and each first category in the first clustering result, adding the second category as one category to the first clustering result.
Since the time granularity targeted by the first clustering result is a larger time granularity, the time granularity targeted by the second clustering result is a smaller time granularity, and the features targeted by the second clustering method include the face features and the specified auxiliary features, the categories included in the second clustering result may be more than those of the first clustering result, and therefore, for the first clustering result, an image recall may be performed from the second clustering result, that is, a category not included in the first clustering result, or an image not included in the first clustering result may be recalled from the second clustering result.
For example, if an image in a first category a in the first clustering result intersects with an image in a second category a in the second clustering result, and the ratio of the intersection of a and a to the image in a is higher than a predetermined threshold, the image in category a which is not intersected with a is determined as the image in a. For example: a = { x, y, z }, a = { x, y, z, m }, and when m is determined to be an image under a, i.e., a = { x, y, z, m }.
For example, if there is no intersection between a second category a in the second clustering result and each first category in the first clustering result, the second category a is added to the first clustering result as a category. For example: the first clustering result X = { a, B, C }, the second clustering result Y = { a }, and there is no intersection between X and Y, and then the category a is classified as belonging to the category in the first clustering result, i.e., X = { a, B, C, a }.
By utilizing the second clustering result and carrying out image recall processing on the first clustering result, the images can be accurately classified, the categories can be judged, and the accuracy of face document clustering is improved.
The following describes a human face document gathering method provided by the present invention in detail with reference to a specific embodiment.
As shown in fig. 2, when clustering images containing faces for multiple days, two different clustering methods can be used: long-term hierarchical clustering and short-term hierarchical clustering, i.e., clustering of a first time granularity and clustering of a second time granularity.
After acquiring the data of multiple days, clustering the data of multiple days according to different time levels after corresponding to the multiple images to be face clustered. And the long-term hierarchical clustering is a clustering mode aiming at the face features, corresponds to the first clustering processing, can obtain a cluster A through the face features, and obtains a long-term clustering result based on the cluster A, and corresponds to the first clustering result. In short-time hierarchical clustering, corresponding to the second clustering process, the images including the human face in multiple days can be divided into data of multiple single days, then face features, human body features and space-time features are utilized to correspond to the face features and the designated auxiliary features to obtain a cluster B, and a short-time clustering result is obtained based on the cluster B and corresponds to the second clustering result.
After two clustering results of different time levels are obtained, the short-time clustering result can be used for carrying out correction, merging or recall processing on the long-time clustering result to obtain a face filing result, and the first clustering result is modified correspondingly to the second clustering result to obtain the face filing results corresponding to the multiple images.
Wherein correcting, i.e. correcting, faces of erroneous clusters: traversing each long-term category uni, counting short-term categories corresponding to the images under the category, counting the occupation ratios of the images in each short-term category key belonging to the long-term categories, and changing the categories of the images in the short-term categories uni into max _ class when the images under the long-term categories uni are not the maximum category max _ class in the short-term categories key. Corresponding to the correction step in step S104 described above.
Merging a plurality of categories which are about to belong to the same category, and reducing face cracking: traversing each short-time category uni, counting long-time categories corresponding to the images under the category, then counting the proportion that the image in each long-time category key belongs to the short-time category, when the short-time category uni is the maximum category to which the image in the long-time category key belongs, putting the key into a dictionary corresponding to the uni, and when the dictionary element of the uni is more than 1, the corresponding long-time categories need to be combined to belong to one category. Corresponding to the merging step in step S104 described above.
And recalling the non-clustered face, and adding the face images which are not intersected with the long-term category in the short-term category into the corresponding long-term category when the two clustering results, namely the long-term clustering result and the short-term clustering result, have intersection and the results are relatively concentrated (the contact ratio is higher and is higher than a preset threshold value). And when the two clustering results, namely one category of the short-time clustering result and each category of the long-time clustering result, do not have intersection, directly taking the short-time category as one category, and adding the category into the category of the long-time face. Corresponding to the recall step in step S104.
The two clustering results are fused, and the short-term clustering result is mainly utilized to modify on the basis of the long-term clustering result; finally, through the processing modes of correction, combination and recall, a more accurate long-term face filing result can be obtained.
The face document clustering method provided by the invention is used for focusing on the consistency and high availability of high-quality face images in a plurality of dates when clustering is carried out in a long time level, and reducing face document cracking in a long time span. When clustering is carried out in a short time level, the consistency of characteristics such as human faces, human bodies, space-time images and the like is absorbed, high-quality images and low-quality images of the same target are better clustered together, and the problem of file splitting of low-quality images can be better solved by using the characteristics of human bodies, space-time images and the like except the human faces. And when clustering is carried out at different time levels, aiming at each image in a plurality of images of the to-be-face clustering file, the to-be-face clustering file belongs to a long-time category in the long-time clustering result and a short-time category in the short-time clustering result, and based on the long-time category and the short-time category, the short-time clustering result is utilized to carry out deep fusion steps such as correction, combination, recall and the like on the long-time clustering result, so that the accuracy of the obtained face clustering file is remarkably improved.
Based on the face document gathering method, the embodiment of the invention also provides a face recognition method.
The face recognition method provided by the embodiment of the invention can be applied to electronic equipment, the electronic equipment can be terminal equipment or a server, and the terminal equipment can comprise: the invention is not limited to the specific form of the electronic device, such as a mobile phone and a tablet computer. The face recognition method provided by the embodiment of the invention can be applied to any scene with face recognition requirements, such as: an attendance scene through face recognition, an entrance guard scene through face recognition and the like.
The execution main body of the face recognition method provided by the embodiment of the invention can be a face recognition device. Illustratively, the face recognition device may be functional software running on the terminal device, such as: the functional software used for face recognition, at this moment, the face recognition device can carry on the face recognition to the picture to be carried on face recognition that is input; of course, the face recognition device may also be a plug-in for an existing client, for example: a plug-in the client for managing images containing human faces; in addition, the face recognition device can also be a functional module in a server program running in the server and corresponding to the face recognition client, and at the moment, the face recognition client can upload an image to be subjected to face recognition to the face recognition device.
As shown in fig. 3, the face recognition method provided by the present invention includes the following steps:
s301: acquiring a face recognition request;
the face recognition request carries a target image to be subjected to face recognition;
face Recognition (Face Recognition) is a biological Recognition technology for performing identity Recognition based on facial feature information of a person, that is, the identity information of the Face needs to be recognized through an image containing the facial feature information of the person, so that a target image to be subjected to Face Recognition carried in a Face Recognition request needs to be obtained first, and therefore, the Face Recognition of the target image is realized through subsequent steps.
It is to be understood that there may be various manners of obtaining the face recognition request, and the manner of obtaining the face recognition request is not limited in the present invention. Illustratively, in one implementation manner, the manner of obtaining the face recognition request includes: a face recognition request containing a target image to be subjected to face recognition is acquired from other devices communicating with an electronic device to which the face recognition method is applied, for example: and acquiring a face recognition request containing a target image to be face-recognized from a camera communicated with the electronic equipment.
S302: carrying out face recognition on the target image based on the face document gathering result to obtain a face recognition result;
the face document gathering result is generated by the face document gathering method.
After the face recognition request is obtained, face recognition can be performed on a target image to be subjected to face recognition in the face request based on a face clustering result generated by using the face clustering method, so that a face recognition result of the target image is obtained.
It should be noted that the way of performing face recognition on the target image may be similar to the way of gathering multiple images when gathering the face, for example: and extracting the face features of the target image, and calculating the similarity between the face features of the target image and various face features of the face filing result, so that the face recognition result of the target image is determined according to the similarity result. For example, a class with the highest similarity to the face features of the target image in the face clustering result may be selected as the face recognition result of the target image, or multiple classes with the similarity to the face features of the target image exceeding a specified threshold (e.g., 80%) in the face clustering result may be selected as the face recognition result of the target image. The face recognition result of the target image is not limited herein.
According to the face recognition method provided by the invention, the face clustering result generated by the face clustering method is utilized, the long-time-level clustering result is corrected by the face clustering result through the short-time-level clustering result, and the accuracy of face clustering is improved when clustering is carried out on each image belonging to the duration under the first time granularity. Therefore, the wrong gathering and splitting in the face gathering result are reduced, and the accuracy of face recognition can be improved when the face gathering result is used for face recognition.
Based on the above human face document gathering method, an embodiment of the present invention further provides a human face document gathering device, as shown in fig. 4, the device includes:
the first obtaining module 410 is configured to obtain multiple images of a to-be-processed face document; the images are acquired within a time length belonging to a first time granularity, the images are provided with a plurality of image groups, the image groups are obtained by dividing the images into groups according to a second time granularity, and the second time granularity is smaller than the first time granularity;
the first clustering module 420 is configured to perform first clustering on the multiple images to obtain a first clustering result; the first clustering processing is processing of clustering by using human face features;
the second clustering module 430 is configured to perform second clustering on each image group respectively to obtain a second clustering result; the second clustering process is a process of clustering by using the face features and specified assistant features, wherein the specified assistant features are features influenced by different time periods belonging to the second time granularity;
and the correcting module 440 is configured to correct the first clustering result by using the second clustering result, so as to obtain a face document clustering result at a first time granularity.
The face document gathering method provided by the embodiment of the invention is characterized in that two types of images with different granularities are set for a plurality of images to be clustered: the plurality of images at a first time granularity and a plurality of image groups at a second time granularity; therefore, different clustering modes are adopted for the images under different time granularities to obtain clustering results of different time granularities; in addition, in consideration of the fact that the clustering basis used by the second clustering mode is richer, the second clustering result is more accurate, and the first clustering result is possibly insufficient in clustering accuracy due to low-quality images, therefore, the first clustering result can be corrected by using the second clustering result, and the face clustering result under the first time granularity is obtained. Therefore, compared with the related technology, when the document aggregation is performed on each image belonging to the duration under the first time granularity, the accuracy of the face document aggregation can be improved through the scheme.
Optionally, the specified assistant feature comprises at least one of the following features: the human body characteristics are characteristics used for representing human body information in the image, and the space-time characteristics are characteristics used for representing time and space of image acquisition.
Optionally, the modification module is specifically configured to:
performing one or more of category correction processing, category merging processing and image recall processing on the first clustering result by using the second clustering result to obtain a face clustering result under a first time granularity;
wherein the category correction processing is to: carrying out class correction on the images under the first class contained in the first clustering result;
the category merging process is to: carrying out category merging on a first category contained in the first clustering result;
the image recall processing to: adding a specified image to the first category contained in the first clustering result, and/or adding a new first category to the first clustering result; the specified image is an image that does not belong to any of the first categories.
Optionally, the manner of performing category correction processing on the first clustering result by using the second clustering result includes:
determining a category to which the image under the first category to be corrected belongs in a second category included in the second clustering result as a category to be analyzed;
if the images under the category to be analyzed belong to a plurality of first categories, counting the occupation ratio of the images belonging to each first category in the images under the category to be analyzed, and determining the first category to which the image with the largest occupation ratio belongs as a first category to be matched;
if the first category to be matched is not the first category to be corrected, adjusting the image belonging to the category to be analyzed under the first category to be corrected to the first category to be matched.
Optionally, the manner of performing category merging processing on the first clustering result by using the second clustering result includes:
determining the category of the image under the second category to be analyzed in each first category contained in the first clustering result aiming at the second category to be analyzed contained in the second clustering result to obtain at least one category to be processed;
counting the occupation ratio of the images belonging to each second category in the images under each category to be processed, and determining the second category to which the image with the maximum occupation ratio belongs as a second category to be matched;
if the second category to be matched is the second category to be analyzed, determining the category to be processed as a category to be merged corresponding to the second category to be analyzed;
and if the number of the categories to be merged corresponding to the second category to be analyzed is multiple, merging the categories of the images under the categories to be merged corresponding to the second category to be analyzed.
Optionally, the manner of performing image recall processing on the first clustering result by using the second clustering result includes:
if an intersection exists between an image under a first category contained in the first clustering result and an image under a second category contained in the second clustering result, and the ratio of the number of the intersected images to the number of the images under the second category is higher than a preset threshold value, determining the image under the second category which does not belong to each first category as the image under the first category;
and/or the presence of a gas in the atmosphere,
and if no intersection exists between a second category contained in the second clustering result and each first category in the first clustering result, adding the second category as one category to the first clustering result.
Optionally, the second clustering module is specifically configured to:
respectively extracting the face features and the specified auxiliary features of each image in each image group aiming at each image group, performing feature fusion on the face features and the specified auxiliary features of each image to obtain the fusion features of each image, and clustering the images in the image group according to the fusion 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 a second clustering result.
Optionally, the magnitude relationship of the weights utilized by the feature fusion includes:
the weight of the facial feature of each image is greater than the weight of the specified assistant feature.
Based on the above face recognition method, an embodiment of the present invention further provides a face recognition apparatus, as shown in fig. 5, the apparatus includes:
a second obtaining module 510, configured to obtain a face recognition request; the face recognition request carries a target image to be subjected to face recognition;
the recognition module 520 is configured to perform face recognition on the target image based on the face clustering result to obtain a face recognition result;
and the face document gathering result is generated by using the face document gathering method.
According to the face recognition method, the face clustering result generated by the face clustering method is utilized, the face clustering result corrects the long-time-level clustering result through the short-time-level clustering result, and the accuracy of face clustering is improved when each image belonging to the duration under the first time granularity is clustered. Therefore, the wrong gathering and splitting in the face gathering result are reduced, and the accuracy of face recognition can be improved when the face gathering result is used for face recognition.
An embodiment of the present invention further provides an electronic device, as shown in fig. 6, including a processor 601, a communication interface 602, a memory 603, and a communication bus 604, where the processor 601, the communication interface 602, and the memory 603 complete mutual communication through the communication bus 604,
a memory 603 for storing a computer program;
the processor 601 is configured to implement any one of the face clustering method and the face recognition method when executing the program stored in the memory 603.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also 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, discrete hardware components.
In another embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements any of the above-mentioned face profiling methods and/or face recognition methods.
In yet another embodiment, a computer program product containing instructions is provided, which when run on a computer causes the computer to perform any of the face clustering methods and/or face recognition methods of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, 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.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more available media. The usable medium may 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)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (13)

1. A face archiving method, characterized in that the method comprises:
acquiring a plurality of images of a face to be subjected to face accumulation; the images are acquired within a time length belonging to a first time granularity, the images are provided with a plurality of image groups, the image groups are obtained by dividing the images into groups according to a second time granularity, and the second time granularity is smaller than the first time granularity;
performing first clustering processing on the multiple images to obtain a first clustering result; the first clustering processing is processing of clustering by using human face features;
performing second clustering processing on each image group respectively to obtain a second clustering result; the second clustering processing is processing of clustering by using the face features and specified auxiliary features, and the specified auxiliary features are features influenced by different time periods belonging to the second time granularity;
and correcting the first clustering result by using the second clustering result to obtain a face clustering result under the first time granularity.
2. The method of claim 1, wherein the specified assist features comprise at least one of: the human body characteristics are characteristics used for representing human body information in the image, and the space-time characteristics are characteristics used for representing time and space of image acquisition.
3. The method according to claim 1 or 2, wherein the modifying the first clustering result by using the second clustering result to obtain the face clustering result at the first time granularity comprises:
performing one or more of category correction processing, category merging processing and image recall processing on the first clustering result by using the second clustering result to obtain a face clustering result under a first time granularity;
wherein the category correction processing is to: carrying out class correction on the images under the first class contained in the first clustering result;
the category merging process is to: carrying out category merging on a first category contained in the first clustering result;
the image recall processing to: adding a specified image to the first category contained in the first clustering result, and/or adding a new first category to the first clustering result; the specified image is an image that does not belong to any of the first categories.
4. The method according to claim 3, wherein the manner of performing the class correction processing on the first clustering result by using the second clustering result comprises:
determining a category to which the image under the first category to be corrected belongs in a second category included in the second clustering result as a category to be analyzed;
if the images under the category to be analyzed belong to a plurality of first categories, counting the occupation ratio of the images belonging to each first category in the images under the category to be analyzed, and determining the first category to which the image with the largest occupation ratio belongs as a first category to be matched;
if the first category to be matched is not the first category to be corrected, adjusting the image belonging to the category to be analyzed under the first category to be corrected to the first category to be matched.
5. The method according to claim 3, wherein the manner of performing the category merging process on the first clustering result by using the second clustering result comprises:
determining the category of the image under the second category to be analyzed in each first category contained in the first clustering result aiming at the second category to be analyzed contained in the second clustering result to obtain at least one category to be processed;
counting the occupation ratio of the images belonging to each second category in the images under each category to be processed, and determining the second category to which the image with the maximum occupation ratio belongs as a second category to be matched;
if the second category to be matched is the second category to be analyzed, determining the category to be processed as a category to be merged corresponding to the second category to be analyzed;
and if the number of the categories to be merged corresponding to the second category to be analyzed is multiple, merging the categories of the images under the categories to be merged corresponding to the second category to be analyzed.
6. The method of claim 3, wherein the using the second clustering result to perform image recall processing on the first clustering result comprises:
if an intersection exists between an image under a first category contained in the first clustering result and an image under a second category contained in the second clustering result, and the ratio of the number of the intersected images to the number of the images under the second category is higher than a preset threshold value, determining the image under the second category which does not belong to each first category as the image under the first category;
and/or the presence of a gas in the gas,
and if no intersection exists between a second category contained in the second clustering result and each first category in the first clustering result, adding the second category as one category to the first clustering result.
7. The method according to claim 1 or 2, wherein the performing the second clustering process on each image group to obtain the second clustering result comprises:
respectively extracting the face features and the specified auxiliary features of each image in each image group aiming at each image group, performing feature fusion on the face features and the specified auxiliary features of each image to obtain fusion features of each image, and clustering the images in the image group according to the fusion features of each image to obtain a clustering result of the image group;
and determining the clustering result corresponding to each image group to obtain a second clustering result.
8. The method of claim 7, wherein the magnitude relationship of the weights utilized for feature fusion comprises:
the weight of the facial feature of each image is greater than the weight of the specified assistant feature.
9. A method for face recognition, the method comprising:
acquiring a face recognition request; the face recognition request carries a target image to be subjected to face recognition;
based on the face clustering result, carrying out face recognition on the target image to obtain a face recognition result;
wherein the face polygraph result is generated using the method of any of claims 1-8.
10. A face archiving device, the device comprising:
the first acquisition module is used for acquiring a plurality of images of the face to be subjected to document gathering; the images are acquired within a time length belonging to a first time granularity, the images are provided with a plurality of image groups, the image groups are obtained by dividing the images into groups according to a second time granularity, and the second time granularity is smaller than the first time granularity;
the first clustering module is used for carrying out first clustering processing on the multiple images to obtain a first clustering result; the first clustering processing is processing of clustering by using human face features;
the second clustering module is used for performing second clustering processing on each image group respectively to obtain a second clustering result; the second clustering processing is processing of clustering by using the face features and specified auxiliary features, and the specified auxiliary features are features influenced by different time periods belonging to the second time granularity;
and the correction module is used for correcting the first clustering result by using the second clustering result to obtain a face clustering result under the first time granularity.
11. A face recognition apparatus, the apparatus comprising:
the second acquisition module is used for acquiring a face recognition request; the face recognition request carries a target image to be subjected to face recognition;
the recognition module is used for carrying out face recognition on the target image based on the face gathering result to obtain a face recognition result;
wherein the face polygraph result is generated using the method of any of claims 1-8.
12. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing the communication between the processor and the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 9 when executing a program stored in a memory.
13. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 1-9.
CN202210887767.5A 2022-07-26 2022-07-26 Face document gathering method, face recognition method, device, equipment and medium Pending CN115273191A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210887767.5A CN115273191A (en) 2022-07-26 2022-07-26 Face document gathering method, face recognition method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210887767.5A CN115273191A (en) 2022-07-26 2022-07-26 Face document gathering method, face recognition method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN115273191A true CN115273191A (en) 2022-11-01

Family

ID=83768650

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210887767.5A Pending CN115273191A (en) 2022-07-26 2022-07-26 Face document gathering method, face recognition method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN115273191A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115953650A (en) * 2023-03-01 2023-04-11 杭州海康威视数字技术股份有限公司 Training method and device of feature fusion model
WO2023174304A1 (en) * 2022-03-18 2023-09-21 Zhejiang Dahua Technology Co., Ltd. Systems, methods, and storage devices for data clustering

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023174304A1 (en) * 2022-03-18 2023-09-21 Zhejiang Dahua Technology Co., Ltd. Systems, methods, and storage devices for data clustering
CN115953650A (en) * 2023-03-01 2023-04-11 杭州海康威视数字技术股份有限公司 Training method and device of feature fusion model

Similar Documents

Publication Publication Date Title
CN110941594B (en) Splitting method and device of video file, electronic equipment and storage medium
CN115273191A (en) Face document gathering method, face recognition method, device, equipment and medium
CN110442712B (en) Risk determination method, risk determination device, server and text examination system
CN113342905B (en) Method and device for determining stop point
CN109685144B (en) Method and device for evaluating video model and electronic equipment
US20180341700A1 (en) Artificial intelligence based method and apparatus for determining regional information
CN110941978B (en) Face clustering method and device for unidentified personnel and storage medium
CN112770265B (en) Pedestrian identity information acquisition method, system, server and storage medium
US20220138893A9 (en) Distributed image analysis method and system, and storage medium
CN113255685A (en) Image processing method and device, computer equipment and storage medium
CN114281648A (en) Data acquisition method and device, electronic equipment and storage medium
CN111814759B (en) Method and device for acquiring face quality label value, server and storage medium
CN111488464B (en) Entity attribute processing method, device, equipment and medium
CN113342170A (en) Gesture control method, device, terminal and storage medium
CN112783779A (en) Test case generation method and device, electronic equipment and storage medium
CN113590605B (en) Data processing method, device, electronic equipment and storage medium
CN115670397A (en) PPG artifact identification method and device, storage medium and electronic equipment
CN114638304A (en) Training method of image recognition model, image recognition method and device
CN113190411A (en) Data processing method and device, electronic equipment and storage medium
CN111143626A (en) Group partner identification method, device, equipment and computer readable storage medium
CN114143571A (en) User processing method, device, equipment and storage medium
KR20210006429A (en) Object detection method, apparatus, equipment and computer-readable storage medium
US20240127406A1 (en) Image quality adjustment method and apparatus, device, and medium
CN115361231B (en) Host abnormal flow detection method, system and equipment based on access baseline
CN114299369A (en) Training method of target recognition model, target recognition method and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination