CN104573642A - Face recognition method and device - Google Patents

Face recognition method and device Download PDF

Info

Publication number
CN104573642A
CN104573642A CN201410830163.2A CN201410830163A CN104573642A CN 104573642 A CN104573642 A CN 104573642A CN 201410830163 A CN201410830163 A CN 201410830163A CN 104573642 A CN104573642 A CN 104573642A
Authority
CN
China
Prior art keywords
face
distance threshold
photo
distance
face distance
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.)
Granted
Application number
CN201410830163.2A
Other languages
Chinese (zh)
Other versions
CN104573642B (en
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.)
Beijing Xiaomi Technology Co Ltd
Xiaomi Inc
Original Assignee
Xiaomi Inc
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 Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201410830163.2A priority Critical patent/CN104573642B/en
Publication of CN104573642A publication Critical patent/CN104573642A/en
Application granted granted Critical
Publication of CN104573642B publication Critical patent/CN104573642B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

An embodiment of the invention discloses a face recognition method and device. When photos are clustered with the method, a face distance threshold is determined according to a first face distance between any two faces in the same photo, and then whether two faces on different photos are the same person is judged according to the face distance threshold. According to the method, the face distance threshold is determined by using priori knowledge that the two faces on the same photos cannot be the same person. Therefore, when the photos are clustered with a clustering algorithm, the face distance threshold can be adjusted according to the minimum distance between different persons on the photo, so that the face recognition accuracy rate and recall rate are increased.

Description

Face identification method and device
Technical field
The disclosure relates to technical field of face recognition, particularly relates to a kind of face identification method and device.
Background technology
Utilize face recognition technology, the personage in photo can be identified, and according to the personage in photo, the photo belonging to same person is referred in one bunch.
In the process of recognition of face, hierarchical clustering algorithm can be adopted to judge, and whether two faces belong to same person.Utilize in the process of hierarchical clustering, calculate the distance between face feature vector corresponding to two facial images, judge the size between described distance and distance threshold again, if the distance between face is not more than described distance threshold, then think that two facial images belong to same person; If the distance between face is greater than described distance threshold, then think that two facial images do not belong to same person.
But, distance threshold in hierarchical clustering algorithm in correlation technique is all changeless usually, the size of distance threshold is very large on the impact of cluster result, such as, because the conditions such as human face posture or illumination expression are different, when causing the distance between face to be greater than distance threshold, can think that two faces are not same persons.Therefore, the accuracy of recognition of face is lower.
Summary of the invention
For overcoming Problems existing in correlation technique, the disclosure provides a kind of face identification method and device, and technical scheme is as follows:
According to the first aspect of disclosure embodiment, a kind of face identification method is provided, comprises:
For the photo at least comprising two faces in photo to be identified, obtain the first face distance between any two faces in same photo;
According to described first face distance, determine face distance threshold;
According to described face distance threshold, judge whether two faces on different photo belong to same person.
In conjunction with first aspect, in the first possible implementation of first aspect, according to described first face distance, determine face distance threshold, comprising:
According to described first face distance, determine the first minimum face distance;
Determine the magnitude relationship between minimum first face distance and the first distance threshold and second distance threshold value respectively, wherein, gauged distance threshold value when described second distance threshold value is recognition of face, and described second distance threshold value is greater than described first distance threshold;
When the first minimum face distance is not more than the first distance threshold, using described first distance threshold as described face distance threshold;
When the first minimum face distance is greater than described first distance threshold, and when being less than second distance threshold value, using the first minimum face distance as described face distance threshold;
When the first minimum face distance is not less than described second distance threshold value, using described second distance threshold value as described face distance threshold.
In conjunction with the first possible implementation of first aspect, in the implementation that the second of first aspect is possible, if described face distance threshold is the first minimum face distance, then described according to described face distance threshold, judge whether two faces on different photo belong to same person, comprising:
Utilize described face distance threshold, judge whether the face on other photo and the face corresponding to described face distance threshold belong to same person, other photo described is the photo except the photo at face place corresponding except described face distance threshold in described photo to be identified.
In conjunction with the first possible implementation of first aspect, in the third possible implementation of first aspect, for the photo at least comprising two faces in photo to be identified, obtain the first face distance between any two faces in same photo, comprising:
For whole photo to be identified, carry out cluster according to the time, obtain at least one photo bunch;
For the photo at least comprising two faces in same photo bunch, calculate the first face distance between any two faces on same photo.
In conjunction with the third possible implementation of first aspect, in the 4th kind of possible implementation of first aspect, according to described first face distance, determine face distance threshold, comprising:
According to the first face distance between any two faces in same photo in described photo bunch, obtain described photo bunch corresponding the first minimum face distance;
If two photos to be identified belong to same photo bunch, then when the first minimum face distance is not more than the first distance threshold, using described first distance threshold as described face distance threshold; When the first minimum face distance is greater than described first distance threshold, and when being less than second distance threshold value, using the first minimum face distance as described face distance threshold; When the first minimum face distance is not less than described second distance threshold value, using described second distance threshold value as described face distance threshold, wherein, described second distance threshold value is greater than described first distance threshold, and described second distance threshold value is gauged distance threshold value;
If two photos to be identified belong to different photos bunch respectively, be then described face distance threshold by described second distance threshold value.
According to the second aspect of disclosure embodiment, a kind of face identification device is provided, comprises:
Acquisition module, for for the photo at least comprising two faces in photo to be identified, obtains the first face distance between any two faces in same photo;
Determination module, for according to described first face distance, determines face distance threshold;
Identification module, for according to described face distance threshold, judges whether two faces on different photo belong to same person.
In conjunction with second aspect, in the first possible implementation of second aspect, described determination module, comprising:
First determines submodule, for according to described first face distance, determines the first minimum face distance;
First comparison sub-module, for determining the magnitude relationship between minimum first face distance and the first distance threshold and second distance threshold value respectively, wherein, gauged distance threshold value when described second distance threshold value is recognition of face, and described second distance threshold value is greater than described first distance threshold;
Second determines submodule, for when the first minimum face distance is not more than the first distance threshold, using described first distance threshold as described face distance threshold;
3rd determines submodule, for being greater than described first distance threshold when the first minimum face distance, and when being less than second distance threshold value, using the first minimum face distance as described face distance threshold;
4th determines submodule, for when the first minimum face distance is not less than described second distance threshold value, using described second distance threshold value as described face distance threshold.
In conjunction with the first possible implementation of second aspect, in the implementation that the second of second aspect is possible, when described face distance threshold is the first minimum face distance, described identification module, comprising:
First judges submodule, for according to described face distance threshold, judge whether the face on other photo and the face corresponding to described face distance threshold belong to same person, other photo described is the photo except the photo at face place corresponding except described face distance threshold in described photo to be identified.
In conjunction with the first possible implementation of second aspect, in the third possible implementation of second aspect, described acquisition module, comprising:
Clustering processing submodule, for for whole photo to be identified, carries out cluster according to the time, obtains at least one photo bunch;
Calculating sub module, for for the photo at least comprising two faces in same photo bunch, calculates the first face distance between any two faces on same photo.
In conjunction with the third possible implementation of second aspect, in the 4th kind of possible implementation of second aspect, it is characterized in that, described determination module, comprising:
5th determines submodule, for according to the first face distance between any two faces in same photo in described photo bunch, obtains described photo bunch corresponding the first minimum face distance;
Second judges submodule, for judging whether two photos belong to same photo bunch;
6th determines submodule, for when two photos to be identified belong to different photos bunch respectively, is described face distance threshold by described second distance threshold value;
Second comparison sub-module, for when two photos to be identified belong to same photo bunch, determine the magnitude relationship between minimum first face distance and the first distance threshold and second distance threshold value respectively, wherein, gauged distance threshold value when described second distance threshold value is recognition of face, and described second distance threshold value is greater than described first distance threshold;
7th determines submodule, for when the first minimum face distance is not more than the first distance threshold, using described first distance threshold as described face distance threshold;
8th determines submodule, for being greater than described first distance threshold when the first minimum face distance, and when being less than second distance threshold value, using the first minimum face distance as described face distance threshold;
9th determines submodule, for when the first minimum face distance is not less than described second distance threshold value, using described second distance threshold value as described face distance threshold.
According to the third aspect of disclosure embodiment, a kind of terminal device is provided, comprises: processor; For the storer of storage of processor executable instruction; Wherein, described processor is configured to:
For the photo at least comprising two faces in photo to be identified, obtain the first face distance between any two faces in same photo;
According to described first face distance, determine face distance threshold;
According to described face distance threshold, judge whether two faces on different photo belong to same person.
The technical scheme that embodiment of the present disclosure provides can comprise following beneficial effect: when comparison film carries out cluster, face distance threshold is determined according to the first face distance between two faces any in same photo, then, whether two faces judged on different photo according to this face distance threshold are same persons.The method utilizes on same photo two faces can not be the priori of same person, determines face distance threshold.Like this, when utilizing clustering algorithm comparison film to carry out cluster, according to the size of the minor increment adjustment face distance threshold between people different on photo, thus accuracy rate and the recall rate of recognition of face can be improved.
Should be understood that, it is only exemplary that above general description and details hereinafter describe, and can not limit the disclosure.
Accompanying drawing explanation
Accompanying drawing to be herein merged in instructions and to form the part of this instructions, shows embodiment according to the invention, and is used from instructions one and explains principle of the present invention.
Fig. 1 is the process flow diagram of a kind of face identification method according to an exemplary embodiment;
Fig. 2 is the process flow diagram of a kind of step S120 according to an exemplary embodiment;
Fig. 3 is the process flow diagram of the another kind of face identification method according to an exemplary embodiment;
Fig. 4 is the block diagram of a kind of face identification device according to an exemplary embodiment;
Fig. 5 is the block diagram of the described determination module according to an exemplary embodiment;
Fig. 6 is the block diagram of the another kind of face identification device according to an exemplary embodiment;
Fig. 7 is the block diagram of another face identification device according to an exemplary embodiment;
Fig. 8 is the block diagram of a kind of device 800 for realizing face identification method according to an exemplary embodiment;
Fig. 9 is the block diagram of a kind of device 1900 for realizing face identification method according to an exemplary embodiment.
By above-mentioned accompanying drawing, illustrate the embodiment that the disclosure is clear and definite more detailed description will be had hereinafter.These accompanying drawings be not in order to limited by any mode the disclosure design scope, but by reference to specific embodiment for those skilled in the art illustrate concept of the present disclosure.
Embodiment
The face identification method that disclosure embodiment provides, according to the feature of faces different on same untreated photo certainly not same person, the distance threshold between self-adaptative adjustment face, thus the accuracy rate improving recognition of face.
Above-mentioned is core concept of the present disclosure, and will be described exemplary embodiment in detail below, its sample table shows in the accompanying drawings.When description below relates to accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawing represents same or analogous key element.Embodiment described in following exemplary embodiment does not represent all embodiments consistent with the disclosure.On the contrary, they only with as in appended claims describe in detail, the example of apparatus and method that aspects more of the present disclosure are consistent.
Fig. 1 is the process flow diagram of a kind of face identification method according to an exemplary embodiment, and as shown in Figure 1, the method is used for, in mobile terminal (such as, smart mobile phone, panel computer etc.) or server, comprising the following steps:
In step s 110, for the photo at least comprising two faces in photo to be identified, obtain the first face distance between any two faces in same photo.
In a kind of application scenarios, utilize the method the photo in the picture library of mobile terminal can be carried out clustering processing according to the personage on photo, namely the photo comprising same person is polymerized to one bunch, under this kind of application scenarios, the photo in picture library and photo to be identified.
In another kind of application scenarios, utilize the method the picture in server can be carried out clustering processing, the photo comprising same people is polymerized to one bunch, under this kind of application scenarios, the picture in server is exactly photo to be identified.
The photo at least comprising two faces is found out from photo to be identified, extract the face characteristic in photo, such as, gabor feature, LBP (Local binary patterns, local binary patterns) feature, then, calculate the distance between any two faces on same photo according to face characteristic, obtain the first face distance d 1ij, d 1ijrepresent the distance belonged between the face i of same photo and face j.
In the present embodiment, the distance between face can use Euclidean distance, or the distance between the vector such as 1-cosine similarity characterizes, and the distance between two faces is less, and two faces are more similar; Otherwise the distance between two faces is larger, two face differences are larger.Certainly, in other embodiments, also can utilize the distance between similarity characterization face, in such cases, the similarity of two faces is larger, then two faces are more similar; Otherwise the similarity between two faces is less, two face differences are larger.
In the step s 120, face distance threshold is determined according to described first face distance.
Photo to be identified in disclosure embodiment is all that nature takes the photo obtained, there is no treated photo, two faces that untreated photo occurs can not be same persons, according to this priori, and can face distance threshold corresponding to the different face of dynamic conditioning.
In step s 130, which, according to described face distance threshold, judge whether two faces on different photo are same persons.
For any two faces on different photo, according to the distance between face distance threshold and two faces, identify whether two faces are same persons.If the distance between two faces is less than described face distance threshold, then determine that two faces belong to same person; If the distance between two faces is not less than face distance threshold, then determine that two faces are not same persons.
In the disclosure one exemplary embodiment, utilize the face distance threshold that a certain face is corresponding, and the spacing of face in this face and other photo, identify whether two faces are same persons.
Be described for an illustrative examples below: suppose face distance threshold d th1be the first face distance between face A on certain photo and face B, face i is any face on other photo except face A and face B place photo.When judging whether face i and face A or face B is same, utilize the first face distance between face A and face B.Namely obtain the second face distance between face i and face A, then, compare the second face distance and d th1between size, judge whether face i and face A is same person.In like manner, obtain the second face distance between face i and face B, and compare this second face distance and d th1between size, judge whether face i and face A is same person.
Certainly, in other exemplary embodiment of the present disclosure, when face distance threshold is the first minimum face distance, this face distance threshold also can be utilized to judge, and whether any two faces are same persons.
The face identification method that the present embodiment provides, when comparison film carries out cluster, whether determine face distance threshold according to the first face distance between two faces any in same photo, then, are same persons according to two faces that this face distance threshold judges on different photo.The method utilizes on same photo two faces can not be the priori of same person, determines face distance threshold.Like this, when utilizing clustering algorithm comparison film to carry out cluster, according to the size of the minor increment adjustment face distance threshold between people different on photo, thus accuracy rate and the recall rate of recognition of face can be improved.
In the disclosure one exemplary embodiment, if face distance threshold is too high, two similar different faces can be identified as same person, thus reduce the accuracy rate identified, in order to ensure the requirement of accuracy rate; If face distance threshold is too low, the photo so under the different attitude of same person also can be identified as different people, thus recall rate is reduced.In order to meet the requirement of recall rate, can make the face threshold value finally determined in specific scope.As shown in Figure 2, step S120 can comprise step S121 ~ S125:
In step S121, according to described first face distance, determine the first minimum face distance.
Belong to arbitrarily between two between face the first face distance of same photo from whole, determine the face distance that distance that certain face on photo is corresponding is minimum, as the first minimum face distance.
In step S122, determine the relation between minimum first face distance and the first distance threshold and second distance threshold value respectively.
Wherein, described second distance threshold value D 2gauged distance threshold value when being recognition of face, and described second distance threshold value D 2be greater than described first distance threshold D 1.Described first distance threshold D 1also rule of thumb can set or obtain according to limited number of time test, such as, 0.5,0.4 etc. can be set as.
By the first minimum face distance d corresponding for certain face determined minrespectively with the first distance threshold D 1and second distance threshold value D 2relatively, according to comparative result determination face distance threshold d th.
Described gauged distance threshold value can obtain by carrying out training to a large amount of facial images, and also can rule of thumb determine, such as, gauged distance threshold value can be set as 0.7.In traditional clustering algorithm, if the distance between two faces is less than or equal to gauged distance threshold value, then think that two faces belong to same person; If the distance between two faces is greater than 0.7, then think that two faces do not belong to same person.
According to comparative result determination face distance threshold, three kinds of situations as shown in Equation 1 can be comprised:
d th = D 1 , d min ≤ D 1 d min , D 1 ≤ d min ≤ D 2 D 2 , d min ≥ D 2 (formula 1)
When the first minimum face distance is not more than the first distance threshold, in step S123, using described first distance threshold as described face distance threshold.
As the first minimum face distance d minbe not more than the first distance threshold D 1time, by the first distance threshold D 1as described face distance threshold d th.
When the first minimum face distance is greater than described first distance threshold, and when being less than second distance threshold value, in step S124, using the first minimum face distance as described face distance threshold.
As the first minimum face distance d minbe greater than the first distance threshold D 1, and be less than second distance threshold value D 2time, by the first minimum face distance d minas described face distance threshold d th.
When the first minimum face distance is not less than described second distance threshold value, in step s 125, using described second distance threshold value as described face distance threshold.
As the first minimum face distance d minbe not less than described second distance threshold value D 2time, by described second distance threshold value D 2as described face distance threshold d th.
In the disclosure one exemplary embodiment, cluster can be carried out by hierarchical clustering algorithm comparison film, first judge by human face detection tech the photo at least comprising two faces in photo to be identified, and the first face distance between any two faces calculating same photo, then, successively merge photo according to facial image, being gathered by the photo belonging to same person is a class.
With an illustrative examples, the face recognition process that disclosure above-described embodiment provides is described below: suppose that the photo to be identified at least comprising two faces has three, photo 1, photo 2 and photo 3 respectively, wherein, face A and face B is comprised in photo 1, comprise face C and face D in photo 2, in photo 3, comprise face E and face F.
Suppose, the first face distance between face A and B is d aB, the first face distance between face C and D is d cD, the first face distance between face E and F is d eF.Namely the first minimum face distance that face A and face B is corresponding is d aB; The first minimum face distance that face C and face D is corresponding is d cD; The first minimum face distance that face E and face F is corresponding is d eF.
Distance relatively in each photo arbitrarily between two between face and the size between corresponding face distance threshold, wherein, when two faces on same photo compare, adopt gauged distance threshold value D2; When face on different photo compares, adopt face distance that in two of current comparison the first faces distances corresponding to face, numerical value is minimum as face distance threshold.
Such as, the face distance threshold adopted when face A and face B compares is gauged distance threshold value D2; When face A and face C, D, E, F compare, adopt face distance that the numerical value corresponding to two faces compared is less as face distance threshold.When supposing that face A and C compares, the first minimum face distance that face A is corresponding is less than the first face distance corresponding to face C, then with the face distance threshold that the first minimum face distance that face A is corresponding compares for A and C; And for example, when face A and F compares, suppose that the first minimum face distance that face F is corresponding is less than the first minimum face distance corresponding to face A, then with the face distance threshold that the first minimum face distance that face F is corresponding compares for A and F.
When face compares between two, face distance between face being less than face distance threshold merges into a class, then, the first face distance selecting numerical value minimum from the face that such comprises is as the first minimum face distance of such corresponding personage.
After obtaining each class, judge whether can merge between each class.Such as, on completeer photo arbitrarily between two after face, obtain two classes, be respectively whether the face that the face that comprises in class I and class II comprise is same person.Between class distance between compute classes I and class II, the minimum value of comparing class spacing and the face distance threshold corresponding to class I and class II compares, and judges whether the face that class I comprises and the face that class II comprises are same persons, until meet end condition.Wherein, between class distance can be the minor increment between the object that comprises of the object that comprises of class I and class II, or, the mean distance between the object that class I comprises and the object that class II comprises.
The face identification method that the present embodiment provides by successively dynamically updating face distance threshold, thus have updated cluster result, improves accuracy rate and the recall rate of recognition of face.Such as, face A is front face image, and face C is left surface facial image, and face F is right flank facial image, determine that face A and face C is same person, and face A and face F is same person.Although the comparative result of face C and face F for being not same person, according to the comparative result of A and C and the comparative result of A and F, determines that face A, C and F belong to same person, and A, C, F to be gathered be a class.
Fig. 3 is the process flow diagram of the another kind of face identification method according to an exemplary embodiment, and the method is applied in mobile terminal or server.The number of the face on the general photo taken in very short certain time and the personage of correspondence relatively stable, such as, use the photo that burst mode obtains.Therefore, first can carry out cluster according to the time by comparison film, then, then carry out recognition of face.
As shown in Figure 3, the method can comprise the following steps:
In step S210, for whole photo to be identified, carry out cluster according to the time, obtain at least one photo bunch.
Such as, the photo in preset duration can be gathered is a photo bunch, and described preset duration can set according to actual needs, such as, and one week, one day, 1 hour or 1min etc.Preset duration is shorter, and in the photo that obtains bunch, to belong to the probability of same person larger for photo,
In step S220, calculate the first face distance in same photo between any two faces in described photo bunch.
Each in same photo bunch is at least comprised to the photo of two faces, calculate the distance between any two faces in same photo, as the first face distance that two faces are corresponding.
In step S230, according to the first face distance in photo bunch, determine the first minimum face distance that in described photo bunch, each face is corresponding.
For the photo in same photo bunch, according to the first face distance that previous step calculates, determine the first minimum face distance that in photo, any one face is corresponding, i.e. the corresponding minimum first face distance of each face.
In step S240, the minimum first face distance corresponding according to each face in each photo bunch, determines the face distance threshold that described face is corresponding.
The minimum first face distance corresponding according to this face determines the face distance threshold that this face is corresponding.Then, corresponding according to this face face distance threshold.
First cluster is carried out to the photo in same photo bunch, then, cluster is carried out to the photo of different photo bunch.
When carrying out cluster to the photo in same photo bunch, face distance threshold comprises following three kinds of situations, shown in formula 1 described above:
If the first minimum face distance corresponding to current face is less than the first distance threshold, then face distance threshold is described first distance threshold;
If the first minimum face distance corresponding to current face is not less than the first distance threshold and is less than second distance threshold value, then face distance threshold is the first minimum face distance; Gauged distance threshold value when second distance threshold value is face cluster.
If the first minimum face distance corresponding to current face is not less than second distance threshold value, then face distance threshold is second distance threshold value.
When carrying out cluster to the photo in different photo bunch, face distance threshold is second distance threshold value.
In step s 250, the face distance threshold corresponding according to described face, judges whether the face on described face and other photo is same person.
The face distance threshold corresponding according to a certain face, determines whether the face on this face and other photo is same person.
The face identification method that the present embodiment provides, first comparison film carries out cluster according to the time and obtains photo bunch.Then, the first face distance between the different faces calculating same photo in photo bunch, determines face distance threshold according to the first face distance.Whether be same person according to two faces that this face distance threshold judges on different photo.The method utilizes on same photo two faces can not be the priori of same person, determines face distance threshold.Like this, when utilizing clustering algorithm comparison film to carry out cluster, according to the size of the minor increment adjustment face distance threshold between people different on photo, thus accuracy rate and the recall rate of recognition of face can be improved.
Fig. 4 is the block diagram of a kind of face identification device according to an exemplary embodiment.As shown in Figure 4, this device comprises: acquisition module 110, determination module 120 and identification module 130.
Acquisition module 110 is configured to, and for the photo at least comprising two faces in photo to be identified, obtains the first face distance between any two faces in same photo.
Determination module 120 is configured to, and according to described first face distance, determines face distance threshold.
Identification module 130 is configured to, and according to described face distance threshold, judges whether two faces on different photo belong to same person.
The face identification device that the present embodiment provides, when comparison film carries out cluster, whether determine face distance threshold according to the first face distance between two faces any in same photo, then, are same persons according to two faces that this face distance threshold judges on different photo.The method utilizes on same photo two faces can not be the priori of same person, determines face distance threshold.Like this, when utilizing clustering algorithm comparison film to carry out cluster, according to the size of the minor increment adjustment face distance threshold between people different on photo, thus accuracy rate and the recall rate of recognition of face can be improved.
Fig. 5 is the block diagram of the described determination module according to an exemplary embodiment, as shown in Figure 5, this determination module can comprise: first determines that submodule 210, first comparison sub-module 220, second determines that submodule 230, the 3rd determines that submodule 240 and the 4th determines submodule 250.
First determines that submodule 210 is configured to, and according to described first face distance, determines the first minimum face distance.
First comparison sub-module 220 is configured to, determine the magnitude relationship between minimum first face distance and the first distance threshold and second distance threshold value respectively, wherein, gauged distance threshold value when described second distance threshold value is recognition of face, and described second distance threshold value is greater than described first distance threshold.
Second determines that submodule 230 is configured to, when the first minimum face distance is not more than the first distance threshold, using described first distance threshold as described face distance threshold.
3rd determines that submodule 240 is configured to, when the first minimum face distance is greater than described first distance threshold, and when being less than second distance threshold value, using the first minimum face distance as described face distance threshold.
4th determines that submodule 250 is configured to, when the first minimum face distance is not less than described second distance threshold value, using described second distance threshold value as described face distance threshold.
The determined face distance threshold of mode of the present embodiment determination face distance threshold, can control in specific scope, such as, and [D 1, D 2], like this, can ensure that face distance threshold can not be too low, also can not be too high, thus improve the accuracy rate of recognition of face and the requirement of recall rate.
Fig. 6 is the block diagram of the another kind of face identification device according to an exemplary embodiment, and as shown in Figure 6, the identification module in embodiment illustrated in fig. 4 comprises the first judgement submodule 310.First to judge that submodule 310 is applied to face distance threshold be in the scene of the first minimum face distance that face is corresponding for this.
First judges that submodule 310 is configured to, according to described face distance threshold, judge whether the face on other photo and the face corresponding to described face distance threshold belong to same person, other photo described is the photo except the photo at face place corresponding except described face distance threshold in described photo to be identified.
When the face distance threshold determined is minimum first face distance corresponding to face, whether the face on first minimum this face of face Distance Judgment utilizing this face corresponding and other photo is same person.
Fig. 7 is the block diagram of another face identification device according to an exemplary embodiment, as shown in Figure 7, this device comprises: clustering processing submodule 410, calculating sub module 420, the 5th determine that submodule 430, second judges that submodule 440, the 6th determines that submodule 450, second comparison sub-module 460, the 7th determines that submodule 470, the 8th determines that submodule 480, the 9th determines submodule 490 and identification module 4100.
Clustering processing submodule 410 is configured to, and for whole photo to be identified, carries out cluster according to the time, obtains at least one photo bunch.
Calculating sub module 420 is configured to, and for the photo at least comprising two faces in same photo bunch, calculates the first face distance between any two faces on same photo.
5th determines that submodule 430 is configured to, and according to the first face distance between any two faces in same photo in described photo bunch, obtains described photo bunch corresponding the first minimum face distance;
Second judges that submodule 440 is configured to, and judges whether two photos belong to same photo bunch;
6th determines that submodule 450 is configured to, and when two photos to be identified belong to different photos bunch respectively, is described face distance threshold by described second distance threshold value;
Second comparison sub-module 460 is configured to, when two photos to be identified belong to same photo bunch, determine the magnitude relationship between minimum first face distance and the first distance threshold and second distance threshold value respectively, wherein, gauged distance threshold value when described second distance threshold value is recognition of face, and described second distance threshold value is greater than described first distance threshold;
7th determines that submodule 470 is configured to, when the first minimum face distance is not more than the first distance threshold, using described first distance threshold as described face distance threshold;
8th determines that submodule 480 is configured to, when the first minimum face distance is greater than described first distance threshold, and when being less than second distance threshold value, using the first minimum face distance as described face distance threshold;
9th determines that submodule 490 is configured to, when the first minimum face distance is not less than described second distance threshold value, using described second distance threshold value as described face distance threshold.
Identification module 4100 is configured to, and according to described face distance threshold, judges whether two faces on different photo belong to same person.
The face identification device that the present embodiment provides, first comparison film carries out cluster according to the time and obtains photo bunch.Then, the first face distance between the different faces calculating same photo in photo bunch, determines face distance threshold according to the first face distance.Whether be same person according to two faces that this face distance threshold judges on different photo.This device utilizes on same photo two faces can not be the priori of same person, determines face distance threshold.Like this, when utilizing clustering algorithm comparison film to carry out cluster, according to the size of the minor increment adjustment face distance threshold between faces different on photo, thus accuracy rate and the recall rate of recognition of face can be improved.
About the device in above-described embodiment, wherein the concrete mode of modules executable operations has been described in detail in about the embodiment of the method, will not elaborate explanation herein.
Fig. 8 is the block diagram of a kind of device 800 for realizing face identification method according to an exemplary embodiment.Such as, device 800 can be mobile phone, computing machine, digital broadcast terminal, messaging devices, game console, tablet device, Medical Devices, body-building equipment, personal digital assistant etc.
As shown in Figure 8, device 800 can comprise following one or more assembly: processing components 802, storer 804, power supply module 806, multimedia groupware 808, audio-frequency assembly 810, the interface 812 of I/O (I/O), sensor module 814, and communications component 816.
The integrated operation of the usual control device 800 of processing components 802, such as with display, call, data communication, camera operation and record operate the operation be associated.Processing components 802 can comprise one or more processor 820 to perform instruction, to complete all or part of step of above-mentioned method.In addition, processing components 802 can comprise one or more module, and what be convenient between processing components 802 and other assemblies is mutual.Such as, processing components 802 can comprise multi-media module, mutual with what facilitate between multimedia groupware 808 and processing components 802.
Storer 804 is configured to store various types of data to be supported in the operation of device 800.The example of these data comprises for any application program of operation on device 800 or the instruction of method, contact data, telephone book data, message, picture, video etc.Storer 804 can be realized by the volatibility of any type or non-volatile memory device or their combination, as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory EPROM (EPROM), programmable read only memory (PROM), ROM (read-only memory) (ROM), magnetic store, flash memory, disk or CD.
The various assemblies that power supply module 806 is device 800 provide electric power.Power supply module 806 can comprise power-supply management system, one or more power supply, and other and the assembly generating, manage and distribute electric power for device 800 and be associated.
Multimedia groupware 808 is included in the screen providing an output interface between described device 800 and user.In certain embodiments, screen can comprise liquid crystal display (LCD) and touch panel (TP).If screen comprises touch panel, screen may be implemented as touch-screen, to receive the input signal from user.Touch panel comprises one or more touch sensor with the gesture on sensing touch, slip and touch panel.Described touch sensor can the border of not only sensing touch or sliding action, but also detects the duration relevant to described touch or slide and pressure.In certain embodiments, multimedia groupware 808 comprises a front-facing camera and/or post-positioned pick-up head.When device 800 is in operator scheme, during as screening-mode or video mode, front-facing camera and/or post-positioned pick-up head can receive outside multi-medium data.Each front-facing camera and post-positioned pick-up head can be fixing optical lens systems or have focal length and optical zoom ability.
Audio-frequency assembly 810 is configured to export and/or input audio signal.Such as, audio-frequency assembly 810 comprises a microphone (MIC), and when device 800 is in operator scheme, during as call model, logging mode and speech recognition mode, microphone is configured to receive external audio signal.The sound signal received can be stored in storer 804 further or be sent via communications component 816.In certain embodiments, audio-frequency assembly 810 also comprises a loudspeaker, for output audio signal.
I/O interface 812 is for providing interface between processing components 802 and peripheral interface module, and above-mentioned peripheral interface module can be keyboard, some striking wheel, button etc.These buttons can include but not limited to: home button, volume button, start button and locking press button.
Sensor module 814 comprises one or more sensor, for providing the state estimation of various aspects for device 800.Such as, sensor module 814 can detect the opening/closing state of device 800, the relative positioning of assembly, such as described assembly is display and the keypad of device 800, the position of all right pick-up unit 800 of sensor module 814 or device 800 1 assemblies changes, the presence or absence that user contacts with device 800, the temperature variation of device 800 orientation or acceleration/deceleration and device 800.Sensor module 814 can comprise proximity transducer, be configured to without any physical contact time detect near the existence of object.Sensor module 814 can also comprise optical sensor, as CMOS or ccd image sensor, for using in imaging applications.In certain embodiments, this sensor module 814 can also comprise acceleration transducer, gyro sensor, Magnetic Sensor, pressure transducer or temperature sensor.
Communications component 816 is configured to the communication being convenient to wired or wireless mode between device 800 and other equipment.Device 800 can access the wireless network based on communication standard, as WiFi, 2G or 3G, or their combination.In one exemplary embodiment, communications component 816 receives from the broadcast singal of external broadcasting management system or broadcast related information via broadcast channel.In one exemplary embodiment, described communications component 816 also comprises near-field communication (NFC) module, to promote junction service.Such as, can based on radio-frequency (RF) identification (RFID) technology in NFC module, Infrared Data Association (IrDA) technology, ultra broadband (UWB) technology, bluetooth (BT) technology and other technologies realize.
In the exemplary embodiment, device 800 can be realized, for performing said method by one or more application specific integrated circuit (ASIC), digital signal processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD) (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components.
In the exemplary embodiment, additionally provide a kind of non-transitory computer-readable recording medium comprising instruction, such as, comprise the storer 804 of instruction, above-mentioned instruction can perform said method by the processor 820 of device 800.Such as, described non-transitory computer-readable recording medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and optical data storage devices etc.
A kind of non-transitory computer-readable recording medium, when the instruction in described storage medium is performed by the processor of mobile terminal, make terminal device can perform a kind of face identification method, described method comprises:
For the photo at least comprising two faces in photo to be identified, obtain the first face distance between any two faces in same photo;
According to described first face distance, determine face distance threshold;
According to described face distance threshold, judge whether two faces on different photo belong to same person.
Fig. 9 is the block diagram of a kind of device 1900 for recognition of face according to an exemplary embodiment.Such as, device 1900 may be provided in a server.As shown in Figure 9, device 1900 comprises processing components 1922, and it comprises one or more processor further, and the memory resource representated by storer 1932, can such as, by the instruction of the execution of processing components 1922, application program for storing.The application program stored in storer 1932 can comprise each module corresponding to one group of instruction one or more.In addition, processing components 1922 is configured to perform instruction, to perform the embodiment of the method shown in above-mentioned Fig. 1 ~ Fig. 3.
Device 1900 can also comprise the power management that a power supply module 1926 is configured to actuating unit 1900, and a wired or wireless network interface 1950 is configured to device 1900 to be connected to network, and input and output (I/O) interface 1958.Device 1900 can operate the operating system based on being stored in storer 1932, such as WindowsServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or similar.
Those skilled in the art, at consideration instructions and after putting into practice invention disclosed herein, will easily expect other embodiment of the present invention.The application is intended to contain any modification of the present invention, purposes or adaptations, and these modification, purposes or adaptations are followed general principle of the present invention and comprised the undocumented common practise in the art of the disclosure or conventional techniques means.Instructions and embodiment are only regarded as exemplary, and true scope of the present invention and spirit are pointed out by claim below.
Should be understood that, the present invention is not limited to precision architecture described above and illustrated in the accompanying drawings, and can carry out various amendment and change not departing from its scope.Scope of the present invention is only limited by appended claim.

Claims (11)

1. a face identification method, is characterized in that, comprising:
For the photo at least comprising two faces in photo to be identified, obtain the first face distance between any two faces in same photo;
According to described first face distance, determine face distance threshold;
According to described face distance threshold, judge whether two faces on different photo belong to same person.
2. method according to claim 1, is characterized in that, according to described first face distance, determines face distance threshold, comprising:
According to described first face distance, determine the first minimum face distance;
Determine the magnitude relationship between minimum first face distance and the first distance threshold and second distance threshold value respectively, wherein, gauged distance threshold value when described second distance threshold value is recognition of face, and described second distance threshold value is greater than described first distance threshold;
When the first minimum face distance is not more than the first distance threshold, using described first distance threshold as described face distance threshold;
When the first minimum face distance is greater than described first distance threshold, and when being less than second distance threshold value, using the first minimum face distance as described face distance threshold;
When the first minimum face distance is not less than described second distance threshold value, using described second distance threshold value as described face distance threshold.
3. method according to claim 2, is characterized in that, if described face distance threshold is the first minimum face distance, then described according to described face distance threshold, judges whether two faces on different photo belong to same person, comprising:
Utilize described face distance threshold, judge whether the face on other photo and the face corresponding to described face distance threshold belong to same person, other photo described is the photo except the photo at face place corresponding except described face distance threshold in described photo to be identified.
4. method according to claim 2, is characterized in that, for the photo at least comprising two faces in photo to be identified, obtains the first face distance between any two faces in same photo, comprising:
For whole photo to be identified, carry out cluster according to the time, obtain at least one photo bunch;
For the photo at least comprising two faces in same photo bunch, calculate the first face distance between any two faces on same photo.
5. method according to claim 4, is characterized in that, according to described first face distance, determines face distance threshold, comprising:
According to the first face distance between any two faces in same photo in described photo bunch, obtain described photo bunch corresponding the first minimum face distance;
If two photos to be identified belong to same photo bunch, then when the first minimum face distance is not more than the first distance threshold, using described first distance threshold as described face distance threshold; When the first minimum face distance is greater than described first distance threshold, and when being less than second distance threshold value, using the first minimum face distance as described face distance threshold; When the first minimum face distance is not less than described second distance threshold value, using described second distance threshold value as described face distance threshold, wherein, described second distance threshold value is greater than described first distance threshold, and described second distance threshold value is gauged distance threshold value;
If two photos to be identified belong to different photos bunch respectively, be then described face distance threshold by described second distance threshold value.
6. a face identification device, is characterized in that, comprising:
Acquisition module, for for the photo at least comprising two faces in photo to be identified, obtains the first face distance between any two faces in same photo;
Determination module, for according to described first face distance, determines face distance threshold;
Identification module, for according to described face distance threshold, judges whether two faces on different photo belong to same person.
7. device according to claim 6, is characterized in that, described determination module, comprising:
First determines submodule, for according to described first face distance, determines the first minimum face distance;
First comparison sub-module, for determining the magnitude relationship between minimum first face distance and the first distance threshold and second distance threshold value respectively, wherein, gauged distance threshold value when described second distance threshold value is recognition of face, and described second distance threshold value is greater than described first distance threshold;
Second determines submodule, for when the first minimum face distance is not more than the first distance threshold, using described first distance threshold as described face distance threshold;
3rd determines submodule, for being greater than described first distance threshold when the first minimum face distance, and when being less than second distance threshold value, using the first minimum face distance as described face distance threshold;
4th determines submodule, for when the first minimum face distance is not less than described second distance threshold value, using described second distance threshold value as described face distance threshold.
8. device according to claim 7, is characterized in that, when described face distance threshold is the first minimum face distance, described identification module, comprising:
First judges submodule, for according to described face distance threshold, judge whether the face on other photo and the face corresponding to described face distance threshold belong to same person, other photo described is the photo except the photo at face place corresponding except described face distance threshold in described photo to be identified.
9. device according to claim 7, is characterized in that, described acquisition module, comprising:
Clustering processing submodule, for for whole photo to be identified, carries out cluster according to the time, obtains at least one photo bunch;
Calculating sub module, for for the photo at least comprising two faces in same photo bunch, calculates the first face distance between any two faces on same photo.
10. device according to claim 9, is characterized in that, described determination module, comprising:
5th determines submodule, for according to the first face distance between any two faces in same photo in described photo bunch, obtains described photo bunch corresponding the first minimum face distance;
Second judges submodule, for judging whether two photos belong to same photo bunch;
6th determines submodule, for when two photos to be identified belong to different photos bunch respectively, is described face distance threshold by described second distance threshold value;
Second comparison sub-module, for when two photos to be identified belong to same photo bunch, determine the magnitude relationship between minimum first face distance and the first distance threshold and second distance threshold value respectively, wherein, gauged distance threshold value when described second distance threshold value is recognition of face, and described second distance threshold value is greater than described first distance threshold;
7th determines submodule, for when the first minimum face distance is not more than the first distance threshold, using described first distance threshold as described face distance threshold;
8th determines submodule, for being greater than described first distance threshold when the first minimum face distance, and when being less than second distance threshold value, using the first minimum face distance as described face distance threshold;
9th determines submodule, for when the first minimum face distance is not less than described second distance threshold value, using described second distance threshold value as described face distance threshold.
11. 1 kinds of terminal devices, is characterized in that, comprising:
Processor;
For the storer of storage of processor executable instruction;
Wherein, described processor is configured to:
For the photo at least comprising two faces in photo to be identified, obtain the first face distance between any two faces in same photo;
According to described first face distance, determine face distance threshold;
According to described face distance threshold, judge whether two faces on different photo belong to same person.
CN201410830163.2A 2014-12-26 2014-12-26 Face identification method and device Active CN104573642B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410830163.2A CN104573642B (en) 2014-12-26 2014-12-26 Face identification method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410830163.2A CN104573642B (en) 2014-12-26 2014-12-26 Face identification method and device

Publications (2)

Publication Number Publication Date
CN104573642A true CN104573642A (en) 2015-04-29
CN104573642B CN104573642B (en) 2018-09-04

Family

ID=53089664

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410830163.2A Active CN104573642B (en) 2014-12-26 2014-12-26 Face identification method and device

Country Status (1)

Country Link
CN (1) CN104573642B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105608430A (en) * 2015-12-22 2016-05-25 小米科技有限责任公司 Face clustering method and device
CN109034178A (en) * 2018-05-28 2018-12-18 北京文香信息技术有限公司 A kind of demographic method based on face characteristic array
CN110299100A (en) * 2019-07-01 2019-10-01 努比亚技术有限公司 Display direction method of adjustment, wearable device and computer readable storage medium
CN112001207A (en) * 2019-05-27 2020-11-27 北京君正集成电路股份有限公司 Optimization method of face recognition sample library
CN113965772A (en) * 2021-10-29 2022-01-21 北京百度网讯科技有限公司 Live video processing method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030210808A1 (en) * 2002-05-10 2003-11-13 Eastman Kodak Company Method and apparatus for organizing and retrieving images containing human faces
CN102365645A (en) * 2009-01-05 2012-02-29 苹果公司 Organizing digital images by correlating faces
CN103745235A (en) * 2013-12-18 2014-04-23 小米科技有限责任公司 Human face identification method, device and terminal device
CN103902689A (en) * 2014-03-26 2014-07-02 小米科技有限责任公司 Clustering method, incremental clustering method and related device
CN103902961A (en) * 2012-12-28 2014-07-02 汉王科技股份有限公司 Face recognition method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030210808A1 (en) * 2002-05-10 2003-11-13 Eastman Kodak Company Method and apparatus for organizing and retrieving images containing human faces
CN102365645A (en) * 2009-01-05 2012-02-29 苹果公司 Organizing digital images by correlating faces
CN103902961A (en) * 2012-12-28 2014-07-02 汉王科技股份有限公司 Face recognition method and device
CN103745235A (en) * 2013-12-18 2014-04-23 小米科技有限责任公司 Human face identification method, device and terminal device
CN103902689A (en) * 2014-03-26 2014-07-02 小米科技有限责任公司 Clustering method, incremental clustering method and related device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105608430A (en) * 2015-12-22 2016-05-25 小米科技有限责任公司 Face clustering method and device
CN105608430B (en) * 2015-12-22 2019-04-26 小米科技有限责任公司 Face cluster method and device
CN109034178A (en) * 2018-05-28 2018-12-18 北京文香信息技术有限公司 A kind of demographic method based on face characteristic array
CN112001207A (en) * 2019-05-27 2020-11-27 北京君正集成电路股份有限公司 Optimization method of face recognition sample library
CN112001207B (en) * 2019-05-27 2024-05-28 北京君正集成电路股份有限公司 Optimization method of face recognition sample library
CN110299100A (en) * 2019-07-01 2019-10-01 努比亚技术有限公司 Display direction method of adjustment, wearable device and computer readable storage medium
CN110299100B (en) * 2019-07-01 2024-03-22 努比亚技术有限公司 Display direction adjustment method, wearable device and computer readable storage medium
CN113965772A (en) * 2021-10-29 2022-01-21 北京百度网讯科技有限公司 Live video processing method and device, electronic equipment and storage medium
CN113965772B (en) * 2021-10-29 2024-05-10 北京百度网讯科技有限公司 Live video processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN104573642B (en) 2018-09-04

Similar Documents

Publication Publication Date Title
CN109446994B (en) Gesture key point detection method and device, electronic equipment and storage medium
CN103885588B (en) Automatic switching method and device
CN105430262A (en) Photographing control method and photographing control device
CN105160320B (en) Fingerprint identification method, device and mobile terminal
CN104156947A (en) Image segmentation method, mechanism and device
CN104850828A (en) Person identification method and person identification device
CN105224924A (en) Living body faces recognition methods and device
CN105260732A (en) Image processing method and device
CN104408402A (en) Face identification method and apparatus
CN104298547A (en) Terminal setting method and device
CN105512685A (en) Object identification method and apparatus
CN105224349A (en) The deletion reminding method of application program and device
CN105426878B (en) Face cluster method and device
CN104238912A (en) Application control method and application control device
CN104700353A (en) Image filter generating method and device
CN104899610A (en) Picture classification method and device
CN104408404A (en) Face identification method and apparatus
CN105046231A (en) Face detection method and device
CN104537380A (en) Clustering method and device
CN105354560A (en) Fingerprint identification method and device
CN104636453A (en) Illegal user data identification method and device
CN104460185A (en) Automatic focusing method and device
CN104573642A (en) Face recognition method and device
CN104867112B (en) Photo processing method and device
CN104077563A (en) Human face recognition method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant