WO2023284185A1 - Updating method for similarity threshold in face recognition and electronic device - Google Patents

Updating method for similarity threshold in face recognition and electronic device Download PDF

Info

Publication number
WO2023284185A1
WO2023284185A1 PCT/CN2021/128816 CN2021128816W WO2023284185A1 WO 2023284185 A1 WO2023284185 A1 WO 2023284185A1 CN 2021128816 W CN2021128816 W CN 2021128816W WO 2023284185 A1 WO2023284185 A1 WO 2023284185A1
Authority
WO
WIPO (PCT)
Prior art keywords
attribute
face image
similarity
face
error report
Prior art date
Application number
PCT/CN2021/128816
Other languages
French (fr)
Inventor
Xingming Zhang
Jun Yin
Zhubei GE
Original Assignee
Zhejiang Dahua 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 Zhejiang Dahua Technology Co., Ltd. filed Critical Zhejiang Dahua Technology Co., Ltd.
Publication of WO2023284185A1 publication Critical patent/WO2023284185A1/en

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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • 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
    • 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/178Human faces, e.g. facial parts, sketches or expressions estimating age from face image; using age information for improving recognition

Definitions

  • the present disclosure generally relates to the technical fieldof image processing, and in particular to an updating method for similarity threshold in face recognition, a face recognition method, and an electronic device.
  • a similarity threshold is usually set, and the face images with similarity values higher than the similarity threshold are grouped into the same category. This facilitates the management of human images.
  • the similarity threshold is usually set to a single initial threshold and then not updated any more.
  • experimental test data shows that the required similarity thresholds are not the same for adults, children, and people with different skin colors at the same false alarm rate.
  • the initial threshold can be applicable toa false alarm ratefor adults in the controlling or clustering, but when there appearsa child in the monitoring area, the number of false alarms will multiply exponentially, resulting in a higher false alarm rate.
  • a similarity between faces with a mask and faces without a mask under the same false alarm rate is often lower than that between faces with a mask, and if the similarity threshold is set for faces without a mask, the recognition rate of people who wears masks and the success rate of clustering will be reduced.
  • how to update the similarity threshold becomes an urgent problem to be solved, so as to reduce the false alarm rate of easily-misidentified faces and improve the correct rate of difficultly-identified faces.
  • anupdating method for a similarity threshold in face recognition includes receiving a first face image and obtaining at least one attribute of the first face image by performing attribute analysis on the first face image, the at least one attribute of the first face image comprising at least one of an attribute of masked-degree, an attribute of age, an attribute of sex, and an attribute of skin-color; obtaining a plurality of similarity values by performing feature comparison on the first face image and each of a plurality of second face images in a database; adding the plurality of similarity values into at least one attribute error report based on the at least one attribute of the first face image, each of the at least one attribute error report defining a single-type attribute or a combination of a plurality of attributesof different types; obtaining a candidate similarity value from any one of the at least one attribute error report, in response to the any one of the at least one attribute error report having the number of similarity values which is greater than or equal to a first threshold; and updating
  • a method for face recognition includes receiving a first face image and obtaining a plurality of similarity values by performing feature comparison on the first face image and each of a plurality of second face images in a database; obtaining a current similarity threshold through the updating method in the above aspect; and controlling and/or clustering the first face image and the plurality of second face images based on the current similarity threshold and the plurality of similarity values, and obtaining a first controlling result and/or a first clustering result.
  • an electronic device includes a processor and a memory connected to the processor and storing program data, when executed, causing the processor to performa methodin the above aspects.
  • a non-transitory computer-readable storage medium stores program data, when executed, causing a processor to perform a method in the above aspects.
  • an electronic device includes a processor and a memory connected to the processor and storing program data, when executed, causing the processor to perform a method obtaining a respective candidate similarity value from each of the at least one attribute error report, such that a plurality of candidate similarity values are obtained, the each of the at least one attribute error report defining a single attribute or a combination of a plurality of attributes of different types and having the number of similarity values which is greater than or equal to a preset value, and each similarity value of the similarity values corresponding to the single-type attribute or the combination of a plurality of attributes of different types and indicating a feature similarity between a first face image and a respective second face image; and updating a similarity threshold in face recognition of the first face image based on the candidate similarity values.
  • FIG. 1 is a flow chart of anupdating method fora similarity threshold according to some embodiments of the present disclosure
  • FIG. 2 is a flow chart of an updating method for a similarity threshold according to another some embodiments of the present disclosure
  • FIG. 3 is a flow chart of a face recognition method according to some embodiments of the present disclosure.
  • FIG. 4 is a schematic diagram of an electronic device according to some embodiments of the present disclosure.
  • FIG. 5 is a schematic diagram of a computer-readable storage medium according to some embodiments of the present disclosure.
  • a and/or B which can indicate: the existence of A alone, the existence of both A and B, and the existence of B alone.
  • the character “/” in this document generally indicates that two associated objects exist simultaneously.
  • a plurality of in this paper means two or more than two.
  • FIG. 1 is a flow chart of an updating method for a similarity threshold according to some embodiments of the present disclosure. As shown in FIG. 1, the method includes actions/operations in the following.
  • the method receives a first face image and obtains at least one attribute of the first face image by performing attribute analysis on the first face image.
  • the at least one attribute of the first face image includes at least one of an attribute ofmasked-degree, an attribute of age, an attribute of sex, and an attribute of skin-color.
  • the attribute analysis is performed on the first face image to detect and extract at least one attribute of the first face image.
  • at least one attribute includesat least one of an attribute of masked-degree, an attribute of age, an attribute of gender, andan attribute of skin-color.
  • the first face image is received, the first face image is detected througha face detection model, and at least onehigher-order attribute corresponding to a facial feature of the first face image is obtained based on the facial feature of the first face image.
  • the first face image is received, and an attribute extraction is performed on the first face image through a pre-trained attribute analysis model.
  • the attribute analysis model outputsa corresponding attribute of the first face image.
  • the attributes of the first face image include face with a mask, face without a mask, child, youth, elderly, male, female, yellow skin, white skin, and dark skin.
  • Other types of attributes may be included in other application scenarios and are not specifically limited herein.
  • the database has a plurality of second face images, and each second face image has feature information correspondingly.
  • Feature information of the first face image is extracted and compared with that of each second face image in the database, and thus, a similarity value between the first face image and each second face image is obtained. That is, the similarity value indicates a feature similarity between the first face image and the second face image.
  • the method adds the plurality of similarity values to at least one attribute error report based on the at least one attribute of the first face image, each attribute error reportdefines a single-type attribute or a combination of multiple attributes of different types.
  • the attribute error report defines a single-type attribute, ora combination of multiple attributes of different types.
  • an attribute error report defines asingle-type attribute, which is an attribute of a single face image, for example, an error report of “face with a mask” , an error report of “face without a mask” , or an error report of “child” .
  • An attribute error report defines a combination of attributes of different types, which are attributes of a single face image, for example, an error report of “face with a mask” and “child” , an error report of “child” and “yellow-skin” , or an error report of “face with a mask” , “yellow-skin” , and “child” .
  • the method comparesattributes of the first face image with a single-type attributeor a combination of attributes of different types in an attribute error report, and adds a similarity value of the first face image with respect to the second face image into the corresponding attribute error report when at least some of all the attributes of the first face image are matched with the single-type attribute or the combination of attributes corresponding to the attribute error report.
  • an attribute error report defines a single-type attribute, which is an attribute of each of two face images, for example, an error report of “face with a mask” / “face with a mask” , an error report of “face with a mask” / “face without a mask” , or an error report of “child” / “child” .
  • An attribute error report defines a combination of attributes of different types, which is multiple attributes of each of two face images, for example, an error report of “face with a mask and child” (a combination of two attributes of a face image) / “face with a mask and child” (a combination of two attributes of another face image) , an error report of “child and yellow-skin” / “child and yellow-skin” , or an error report of “face with a mask, child, and yellow-skin” / “face with a mask, child, and yellow-skin” .
  • attributes of a second face image are stored in the database.
  • the method combines the attributes of the first face image and the attributes of the second face image, compares with corresponding attributes or combinations of attributes in anattribute error report, and adds the similarity value between the first face image and the second face image intoan attribute error reportin which the combined attributes are successfully matched with the corresponding attributes or combinations of attributes.
  • the method obtains a candidate similarity value from any of the at least one attribute error report, in response to the any of the at least one attribute error report having the number of similarity values which is greater than or equal to the first threshold.
  • the similarity values in this attribute error report are sorted and a candidate similarity value is selected therefrom.
  • the first threshold is the reciprocal of a false alarm rate that is currently set, and similarity values added to any one attribute error report are arranged in a descending order.
  • the average of the first n similarity values is used as the candidate similarity value, and n is an integer.
  • the first threshold is the reciprocal of a false alarm rate that is currently set, and similarity values added to any one attribute error report are arranged in a descending order.
  • the median of the first n similarity values is used as the candidate similarity value, and n is an integer.
  • the method updates a current similarity threshold through the candidate similarity value.
  • the candidate similarity value corresponding to this attribute error report is used to update the current similarity threshold.
  • a candidate similarity value in an attribute error report which has the most similarity values is used to update the current similarity threshold. This thus, ensures reliability when judging a group with the largest number of samples.
  • the latest candidate similarity value is used to update the similarity threshold, and this ensure that the similarity threshold can be changed according to different attribute error reports to respond to different application scenarios.
  • the candidate similarity value used for updating the similarity threshold also tend to be closer to the theoretically preferred values.
  • attribute analysis is performed on the first face image to obtain at least one attribute of the first face image, and the first face image is compared with the second face image already stored in the database to obtain multiple similarity values therebetween, and the similarity values are added to at least one attribute error report based on at least one attribute of the first face image, which defines a single-type of attribute or a combination of attributes of different types, and the similarity values are analysed.
  • the candidate similarity value is extracted from the corresponding attribute error report, and the candidate similarity value is used to update the current similarity threshold.
  • the similarity threshold corresponding to any attribute or combination of attributes can be automatically updated, which can reduce false alarm rate of face recognition and improve correct rate of a face that is difficult to recognize when a face image corresponding to an attribute or a combination of attributes appears in the monitoring area.
  • FIG. 2 is a schematic flow chart of anupdating method for a similarity threshold according to another some embodiments of the present disclosure. As shown in FIG. 2, the method includes actions/operations in the following.
  • the method receives a first face image and obtains different types of attributes of the first face image by performing attribute analysis on the first face image through an attribute algorithm.
  • the attribute analysis is performed on the first face image using the attribute algorithm to obtain an attribute analysis result, and different types of attributes of the first face image are extracted from the attribute analysis result.
  • the obtained first face image is fed into an attribute analysis model, and the attributes of the first face image are extracted from the first face image through the attribute algorithm corresponding to the attribute analysis model.
  • the attributes include at least one of an attribute of masked-degree, an attribute of age, an attribute of sex, and an attribute of skin-color.
  • the method stores the different types of attributes in a preset order.
  • the different types of attributes are sorted according to a user’s predetermined attribute, which standardizes the storage of the attributes and facilitates the subsequent matching of the attributes.
  • the different typesof attributes are stored in a preset orderand in a binary manner, such that an attribute identifier of the first face image is obtained.
  • 0 and 1 are used to indicate a status of an attribute to obtain the attribute identifier of the first face image. This enables fast matching based on the attribute identifier and improves processing efficiency when subsequent attribute matching is performed.
  • Table 1 shows attribute identifiers of first face images.
  • the attributes include “face with a mask” , “child” , “youth” , “old” , “gender” , “yellow skin” , “white skin” , and “black skin” , and the different types of attributes mentioned above are arranged in a preset order and stored in a binary manner. For example, for the attribute of gender, 0 indicates “female” and 1 indicates “male” , and for the attribute of face with a mask, 0 means “face with a mask” and 1 means “face without a mask” . Other types of attributes are not described here.
  • the binary manner for storage can facilitate clear and accurate storage of different types of attributes to generate attribute identifiers for subsequent attribute matching.
  • Table 1 shows attribute identifiers of first face images.
  • the method obtainsacapturing time and a capturing locationof the first face image.
  • the capturing time and the capturing location corresponding to the first face image are obtained when the first face image is received, and the capturing time and the capturing location are used as spatio-temporal information of the first face image.
  • the capturing time and the capturing locationof the first face image are obtained from a device that captures the first face image when the first face image is received, wherein the capturing location is expressed in latitude and longitude.
  • the method obtains face images outside of a preset spatio-temporal range as second face images based on the capturing time and the capturing location.
  • the preset spatio-temporal range is obtained, and a face image outside the preset spatio-temporal range is obtained as the second face image with the capturing time and the capturing location corresponding to the first face image as the origin.
  • the preset spatio-temporal range includes a preset duration and a preset distance. Face images are extracted for the second face image, which are located outside the preset distance relative to the capturing location and captured within the preset duration before the capturing time corresponding to the first face image. Thus, the second face image is extracted, which theoretically does not originate from the same person with the first face image, and then a similarity value obtained when the first face image and the second face image are subsequently compared is a false alarm result.
  • the preset time range includes a preset duration of 10 minutes, and then the same person will not theoretically travel more than 20 km in 10 minutesaccording to the highway speed limit of 120 km/h.
  • the preset distance corresponding to the preset duration is set to be 25 km over the theoretical value. Face images that are within 10 minutes before the capturing time and 25 km away relative to the capturing locationare used for the second face images.
  • the preset duration can also be 20 minutes or 30 minutes, etc., and the preset distance corresponding to the preset duration is set to ensure that the second face images do not originate from the same person with the first face image.
  • the method obtains a plurality of similarity values by performing feature comparison on the first face image and each of the second face images in a database.
  • feature information of the first face image and feature information of the second face images stored in the database are extracted so as to perform feature comparison between the first face image and the plurality of second face images to obtain the plurality of similarity values.
  • feature extraction is performed on the first face image to obtain the feature information of the first face image
  • the feature information of the first face image is stored in the database, such that it can be recalled subsequently when the newly obtained face image is used for feature comparison, and face images are supplemented in the database to provide continuity to the feature comparison.
  • the feature information of the second face images is stored in the database.
  • the feature comparison is performed for the feature information of the first face image and the feature information of the second face image, and multiple similarity values are obtained for filling an attribute error report.
  • the method adds the plurality of similarity values to at least one attribute error report based on at least one attribute of the first face image.
  • At least one attribute of the first face image is compared with a single-type attribute or a combination of a plurality of attributes of different types in an attribute error report based on an attribute identifier of the first face image to obtain an attribute matching result, and the plurality of similarity values are added to corresponding attribute error reports based on the attribute matching result.
  • an attribute inan attribute error report is an attribute of a single face image
  • the at least one attribute of the first face image is represented by an attribute identifier
  • the attribute error report defines a single-type attribute or a combination of multiple attributes of different types.
  • a similarity value is added to the attribute error report when an attribute identifier of the first face image is matched with an attribute or a combination of attributes in an attribute error report.
  • a target captured by a device is a black-skinned male child wearing a mask, and then the attribute identifier of the first face image corresponding to the target is 11001001, and asimilarity value is added to a corresponding attribute error report based on the attribute identifier of the first face image.
  • the attribute error report includes anerror report of “face with a mask” , an error report of “face without a mask” , an error report of “child” , an error report of “child and face with a mask” , and an error report of “child and yellow-skin”
  • the similarity value of the first face image with respect toa second face image may be added into the error report of “face with a mask” , the error report of “child” , and the error report of “child and face with a mask” , and not added into the error report of “face without a mask” and the error report of “child and yellow-skin” .
  • an attribute error report defines a combination of attributes corresponding to two face images, and the at least one attribute of the first face image is represented by an attribute identifier.
  • the attribute identifier and the first face image can be stored together in the database after the attribute identifier of the first face image is obtained, and each second face image in the database has a corresponding attribute identifier that has already be stored. Then, the attribute identifiers of the first face image and second face imagesare compared with the combination of attributes in the attribute error report, and a similarity value between the first face image and a second face image is added to the corresponding attribute error report when the attribute identifiers are matched with the combination of attributes in the attribute error report.
  • the attribute error report is filled.
  • a target captured by the device is a black-skinned male child wearing a mask, and then the attribute identifier of the first face image corresponding to the target is 11001001.
  • the attribute identifier of the first face image and attribute identifiers of second face images are compared with the combination of attributes in the attribute error report.
  • the attribute error report includes an error report of “face with a mask” / “face with a mask” , an error report of “face with a mask and child” /“face with a mask and child” , and an error report of “face with a mask” / “face without a mask”
  • the method obtains a candidate similarity value from any of the at least one attribute error report, in response to the any of the at least one attribute error report having the number of similarity values which is greater than or equal to a first threshold.
  • the similarity values in the attribute error report are arranged in a descending order, and the first threshold is the reciprocal of the false alarm rate.
  • the number of similarity values in any one attribute error report reaches the first threshold, a candidate similarity value is obtained from this attribute error report and used for updating the current similarity threshold.
  • the n th similarity value in this attribute error report is used as the candidate similarity value, where n is an integer and f indicates the first threshold.
  • similarity values in an attribute error report are arranged in a descending order, and it is determined whether the number of similarity values in the attribute error report reaches the reciprocal of the false alarm rate.
  • the maximum similarity value in the attribute error report is used as the candidate similarity value, and whenever the number of similarity values in the attribute error report reaches an integer multipleof the first threshold, i.e. n*f, the n th similarity value in the attribute error report is used as the candidate similarity value.
  • the false alarm rate is set to be equal to 1e-10, and then the number of similarity values in the attribute error report needs to be greater than or equal to 1e10 at least, such that the candidate similarity value is obtained. Assuming that the number of similarity values in the attribute error report is equal to 1e11, thenthe 10 th similarity value in the attribute error report is selected as a new candidate similarity value.
  • the method updates a current similarity threshold through the candidate similarity value.
  • the number of attribute error reports can be set to one, and the current similarity threshold is updated using the candidate similarity value corresponding to this unique attribute error report.
  • the number of attribute error reports can be set to be more than one, and when the number of similarity values in multiple attribute error reports exceeds the first threshold, each candidate similarity value is obtained from a respective attribute error report such that multiple candidate similarity values are obtained, and the current similarity threshold is updated using the maximum value among the candidate similarity values.
  • the number of similarity values in multiple attribute error reports reach the first threshold, this indicates that a sample occurs enough and is common in the monitoring area, which has a face image with a specific attribute or combination of attributes.
  • similarity values in a respective attribute error report are arranged in a descending order, and similarity values at the positionof integer multiples are selected as candidate similarity values.
  • the maximum value among the multiple candidate similarity values is used as the similarity threshold.
  • the attributes of the first face image are extracted and the attribute identifier of the first face image is generated.
  • the attribute identifier is quickly matchedwith a single-type attribute or a combination of multiple attributes of different types in an attribute error report, and then multiple similarity values of the first face image with respect tomultiple second face image are added to the attribute error report which meets the matching.
  • the number of similarity values in the attribute error report reaches an integer multiple of the first threshold, i.e. n*first threshold, and the similarity values in the attribute error report are arranged in a descending order
  • the n th similarity value is used as the candidate similarity value to update the similarity threshold.
  • the similarity threshold is continuously optimized in the process of iterative updating to reduce the false alarm rate of face recognition.
  • FIG. 3 is a schematic flow chart of a face recognition method according to some embodiments of the present embodiments. As shown in FIG. 3, the method includes actions/operations in the following.
  • the method receives a first face image and obtains a plurality of similarity values by performing feature comparison on the first face image and each of a plurality of second face images in a database.
  • the method obtains a current similarity threshold.
  • the current similarity threshold is obtained according to the method in any of the above embodiments, the details of which can be found in any of the above embodiments and will not be repeated herein.
  • the method controls and/or clusters the first face image and the plurality of second face images based on the current similarity threshold and the plurality of similarity values, and obtainsa first controlling result and/or a first clustering result.
  • first face image and the respective second face image are categorized as the same target for controllingalarm and/or being placed into a file corresponding to the same target if the similarity value exceeds.
  • the first face image and the second face image are determined not to belong to the same target, no processing is done when it is used for controlling, and building a separate file for the unique first face image or the respective second face image when it is used for clustering, such that all face images corresponding to one target are clustered into the same file and the first clustering result is obtained.
  • the first face image and a second face image in the database are alerted and/or clustered in the file through the controlling and/or clustering algorithm. For example, these two face images of which the similarity valueexceeds the similarity thresholdare alerted. Alternatively, these two face images of which the similarity value exceeds the similarity threshold are placed into the same file. Alternatively, these two face images of which the similarity value exceeds the similarity threshold are alerted and placed into the same file.
  • the second face image is a face image in the database within a preset spatio-temporal range.
  • the similarity value in the attribute error report required for any of the above embodiments is false alarmresult, i.e., the two face images corresponding to the similarity value in the attribute error report must not originate from the same person.
  • the clusteringprocess is to obtain face images belonging to the same person.
  • a face image within the preset spatio-temporal range can be extracted as the second face image, and compared with the first face image to obtain the similarity value therebetween.
  • the clustering algorithm is used for clustering, where the clustering algorithm may be the hierarchical clustering algorithm, or may be the density clustering algorithm in other application scenarios, which is not limited herein.
  • the second face images are extracted from a blacklist database, and the first face image is compared with all the second face images in the blacklist database to obtain similarity valuestherebetween.
  • a control alarm record is generated to prompt the presence of a face image in the blacklist database.
  • the similarity threshold is obtained based on the method in the above embodiments, so that there does not occur a situation where the similarity threshold will not alter after it is set to be an initial value, and the similarity threshold can be updated based on an attribute error report.
  • the similarity threshold can be appliable for groups having different attributes or combinations of attributes, reduce the false alarm rate of easily misidentified faces, and improve correct rate of difficultly-identified faces.
  • the method further corrects the first controlling result and/or the first clustering result based on the updated similarity threshold and the attributes of face images in the first clustering result, in response to the updated similarity threshold being obtained.
  • the similarity threshold when the similarity threshold is updated, if the attributes corresponding to the alarm record in the first arming result arematched with the attributes or combinations of attributes of an attribute error report corresponding to the current similarity threshold, the current similarity threshold and the similarity value between two face images corresponding to the alarm recordare reconfirmed again. If the similarity value is still greater than the similarity threshold, the alarm record is remained, and if the similarity value is not greater than the similarity threshold, the corresponding alarm record is deleted. Thus, this reduces the probability of false alarms.
  • any attribute of a file in the first clustering result is matched with the attribute or combination of attributes in an attribute error report corresponding to the current similarity threshold, the current similarity threshold and the similarity value between any two face images in a file are reconfirmed again. If the similarity value is still greater than the similarity threshold, the face images are remained, and if the similarity value is not greater than the similarity threshold, a face image of which similarity values with other face images in the file are less than the current similarity threshold are deleted. Thus, this optimizes the first clustering result before the user retrieves the file and reduces the false alarm rate.
  • FIG. 4 is a schematic diagram of an electronic device according to some embodiments of the present disclosure.
  • the electronic device 40 includes a processor 401 and a memory 402 connected to the processor 401.
  • the memory 402 stores program data.
  • the program data when executed, causes the processor 401 to perform the method according to any embodiment or any non-conflicting combination of the above method of the present disclosure of which detailed description is referred above and will not be repeated here.
  • FIG. 5 is a schematic diagram of a computer-readable storage medium according to some embodiments of the present disclosure.
  • the computer-readable storage medium 50 stores program data, which when executed, the method according to any embodiment or any non-conflicting combination of the above method of the present disclosure is performed. Detailed description is referred above and will not be repeated here.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units. That is, they may be located at one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of this embodiment.
  • the functional units in the various embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • an integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the software product is stored in a storage medium, which includes several instructions to make a computing device (which may be a personal computer, a server, or a network device, etc. ) or a processor execute all or part of actions/operations of the methods described in the various embodiments of the present disclosure.
  • the afore-mentioned storage medium includes U disk, mobile hard disk, read-only memory (ROM) , random access memory (RAM) , magnetic disks or optical disks, or other media.

Landscapes

  • Engineering & Computer Science (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Health & Medical Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)

Abstract

An updating method for a similarity threshold in face recognition is disclosed. The updating method includes receiving a first face image and obtaining at least one attribute of the first face image by performing attribute analysis on the first face image; obtaining a plurality of similarity values by performing feature comparison on the first face image and each of a plurality of second face images in a database; adding the plurality of similarity values into at least one attribute error report based on the at least one attribute of the first face image; obtaining a candidate similarity value from any one of the at least one attribute error report, in response to the any one of the at least one attribute error report having the number of similarity values which is greater than or equal to a first threshold; and updating a current similarity threshold through the candidate similarity value.

Description

UPDATING METHOD FOR SIMILARITY THRESHOLD IN FACE RECOGNITION AND ELECTRONIC DEVICE
CROSS-REFERENCE TO RELATED APPLICATIONS
This application claims a priority to Chinese Patent Application No. 202110802852.2, filed on July15, 2021, the content of which isherein incorporated by reference inits entirety.
TECHNICAL FIELD
The present disclosuregenerally relates to the technical fieldof image processing, and in particular to an updating method for similarity threshold in face recognition, a face recognition method, and an electronic device.
BACKGROUND
As people flows more frequently, it is necessary to control or cluster collected face images when the face images are managed. During the controlling or clustering, a similarity threshold is usually set, and the face images with similarity values higher than the similarity threshold are grouped into the same category. This facilitates the management of human images.
The similarity threshold is usually set to a single initial threshold and then not updated any more. However, experimental test data shows that the required similarity thresholds are not the same for adults, children, and people with different skin colors at the same false alarm rate. For example, the initial threshold can be applicable toa false alarm ratefor adults in the controlling or clustering, but when there appearsa child in the monitoring area, the number of false alarms will multiply exponentially, resulting in a higher false alarm rate. For another example, a similarity between faces with a mask and faces without a mask under the same false alarm rate is often lower than that between faces with a mask, and if the similarity threshold is set for faces without a mask, the recognition rate of people who wears masks and the success rate of clustering will be reduced. Thus, how to update the similarity threshold becomes an urgent problem to be solved, so as to reduce the false alarm rate of easily-misidentified faces and improve the correct rate of difficultly-identified faces.
SUMMARY OF THE DISCLOSURE
According to one aspect of the present disclosure, anupdating method for a similarity threshold in face recognition is provided. Theupdating includes receiving a first face image and obtaining at least one attribute of the first face image by performing attribute analysis on the first face image, the at least one attribute of the first face image comprising at least one of an attribute of masked-degree, an attribute of age, an attribute of sex, and an attribute of skin-color; obtaining a plurality of similarity values by performing feature comparison on the first face image and each of a plurality of second face images in a database; adding the plurality of similarity values into at least one attribute error report based on the at least one attribute of the first face image, each of the at least one attribute error report defining a single-type attribute or a combination of a plurality of attributesof different types; obtaining a candidate similarity value from any one of the at least one attribute error report, in response to the any one of the at least one attribute error report having the number of similarity values which is greater than or equal to a first threshold; and updating a current similarity threshold through the candidate similarity value.
According to another aspect of the present disclosure, a method for face recognition is provided. The method includes receiving a first face image and obtaining a plurality of similarity values by performing feature comparison on the first face image and each of a plurality of second face images in a database; obtaining a current similarity threshold through the updating method in the above aspect; and controlling and/or clustering the first face image and the plurality of second face images based on the current similarity threshold and the plurality of similarity values, and obtaining a first controlling result and/or a first clustering result.
According to yet another aspect of the present disclosure, an electronic device is provided. The electronic device includes a processor and a memory connected to the processor and storing program data, when executed, causing the processor to performa methodin the above aspects.
According to yet another aspect of the present disclosure, A non-transitory computer-readable storage medium is provided. The non-transitory computer-readable storage  medium stores program data, when executed, causing a processor to perform a method in the above aspects.
According to yet another aspect of the present disclosure, an electronic device is provided. The electronic device includes a processor and a memory connected to the processor and storing program data, when executed, causing the processor to perform a method obtaining a respective candidate similarity value from each of the at least one attribute error report, such that a plurality of candidate similarity values are obtained, the each of the at least one attribute error report defining a single attribute or a combination of a plurality of attributes of different types and having the number of similarity values which is greater than or equal to a preset value, and each similarity value of the similarity values corresponding to the single-type attribute or the combination of a plurality of attributes of different types and indicating a feature similarity between a first face image and a respective second face image; and updating a similarity threshold in face recognition of the first face image based on the candidate similarity values.
BRIEF DESCRIPTION OF THE DRAWINGS
In order to make the technical solution described in the embodiments of the present disclosure more clearly, the drawings used for the description of the embodimentswill be briefly described. Apparently, the drawings described below are onlyfor illustration but not for limitation. It should be understood that, one skilled in the art may acquire other drawings based on these drawings, without making any inventive work.
FIG. 1 is a flow chart of anupdating method fora similarity threshold according to some embodiments of the present disclosure;
FIG. 2 is a flow chart of an updating method for a similarity threshold according to another some embodiments of the present disclosure;
FIG. 3 is a flow chart of a face recognition method according to some embodiments of the present disclosure;
FIG. 4 is a schematic diagram of an electronic device according to some embodiments of the present disclosure; and
FIG. 5 is a schematic diagram of a computer-readable storage medium according to some embodiments of the present disclosure.
DETAILED DESCRIPTION
The technical solutions in embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in embodiments of the present disclosure. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present disclosure.
The term “and/or” herein is just a description of the association relationship of the associated objects, indicating that three relationships can exist. For example, A and/or B, which can indicate: the existence of A alone, the existence of both A and B, and the existence of B alone. In addition, the character “/” in this document generally indicates that two associated objects exist simultaneously. In addition, “a plurality of” in this paper means two or more than two.
FIG. 1 is a flow chart of an updating method for a similarity threshold according to some embodiments of the present disclosure. As shown in FIG. 1, the method includes actions/operations in the following.
At block S101, the method receives a first face image and obtains at least one attribute of the first face image by performing attribute analysis on the first face image. The at least one attribute of the first face image includes at least one of an attribute ofmasked-degree, an attribute of age, an attribute of sex, and an attribute of skin-color.
Specifically, when the first face image is obtained, the attribute analysis is performed on the first face image to detect and extract at least one attribute of the first face image. With different ways for the attribute analysis, at least one attribute includesat least one of an attribute of masked-degree, an attribute of age, an attribute of gender, andan attribute of skin-color.
In some embodiments, the first face image is received, the first face image is detected througha face detection model, and at least onehigher-order attribute corresponding to a facial feature of the first face image is obtained based on the facial feature of the first face image.
In another some embodiments, the first face image is received, and an attribute extraction is performed on the first face image through a pre-trained attribute analysis model. Thus, the attribute analysis model outputsa corresponding attribute of the first face image.
In a specific application scenario, the attributes of the first face image include face with a mask, face without a mask, child, youth, elderly, male, female, yellow skin, white skin, and dark skin. Other types of attributes may be included in other application scenarios and are not specifically limited herein.
At block S102, the methodobtains a plurality of similarity values by performing feature comparison on the first face image and each of a plurality of second face images in a database.
Specifically, the database has a plurality of second face images, and each second face image has feature information correspondingly. Feature information of the first face image is extracted and compared with that of each second face image in the database, and thus, a similarity value between the first face image and each second face image is obtained. That is, the similarity value indicates a feature similarity between the first face image and the second face image.
At block S103, the method adds the plurality of similarity values to at least one attribute error report based on the at least one attribute of the first face image, each attribute error reportdefines a single-type attribute or a combination of multiple attributes of different types.
Specifically, a pre-generated attribute error report is extracted. The attribute error report defines a single-type attribute, ora combination of multiple attributes of different types.
In some embodiments, an attribute error report defines asingle-type attribute, which is an attribute of a single face image, for example, an error report of “face with a mask” , an error report of “face without a mask” , or an error report of “child” . An attribute error report defines a combination of attributes of different types, which are attributes of a single face image, for example, an error report of “face with a mask” and “child” , an error report of “child” and “yellow-skin” , or an error report of “face with a mask” , “yellow-skin” , and “child” .
Further, the method comparesattributes of the first face image with a single-type attributeor a combination of attributes of different types in an attribute error report, and adds a similarity value of the first face image with respect to the second face image into the corresponding attribute error report when at least some of all the attributes of the first face image are matched with the single-type attribute or the combination of attributes corresponding to the attribute error report.
In another some embodiments, an attribute error report defines a single-type attribute,  which is an attribute of each of two face images, for example, an error report of “face with a mask” / “face with a mask” , an error report of “face with a mask” / “face without a mask” , or an error report of “child” / “child” . An attribute error report defines a combination of attributes of different types, which is multiple attributes of each of two face images, for example, an error report of “face with a mask and child” (a combination of two attributes of a face image) / “face with a mask and child” (a combination of two attributes of another face image) , an error report of “child and yellow-skin” / “child and yellow-skin” , or an error report of “face with a mask, child, and yellow-skin” / “face with a mask, child, and yellow-skin” .
Further, attributes of a second face image are stored in the database. The method combines the attributes of the first face image and the attributes of the second face image, compares with corresponding attributes or combinations of attributes in anattribute error report, and adds the similarity value between the first face image and the second face image intoan attribute error reportin which the combined attributes are successfully matched with the corresponding attributes or combinations of attributes.
At block S104, the method obtains a candidate similarity value from any of the at least one attribute error report, in response to the any of the at least one attribute error report having the number of similarity values which is greater than or equal to the first threshold.
Specifically, when the number of similarity values in any of at least one attribute error report reaches the first threshold, the similarity values in this attribute error report are sorted and a candidate similarity value is selected therefrom.
In some embodiments, the first threshold is the reciprocal of a false alarm rate that is currently set, and similarity values added to any one attribute error report are arranged in a descending order. When the number ofthe similarity values in the attribute error report reaches the first threshold, the average of the first n similarity values is used as the candidate similarity value, and n is an integer.
In another some embodiments, the first threshold is the reciprocal of a false alarm rate that is currently set, and similarity values added to any one attribute error report are arranged in a descending order. When the number of the similarity value in the attribute error report reaches the first threshold, the median of the first n similarity values is used as the candidate similarity value, and n is an integer.
At block S105, the method updates a current similarity threshold through the candidate similarity value.
Specifically, when there is one attribute error report, the candidate similarity value corresponding to this attribute error report is used to update the current similarity threshold.
Alternatively, when there is more than one attribute error report, a candidate similarity value in an attribute error report which has the most similarity values is used to update the current similarity threshold. This thus, ensures reliability when judging a group with the largest number of samples. Alternatively, the latest candidate similarity value is used to update the similarity threshold, and this ensure that the similarity threshold can be changed according to different attribute error reports to respond to different application scenarios.
Further, when the similarity values in the attribute error reports are accumulated and the first n similarity values in any one attribute error reportare continuously updated, the candidate similarity value used for updating the similarity threshold also tend to be closer to the theoretically preferred values. The longer the length of an error report is, the more stable the similarity threshold is, and then the more accurate the false alarm rate is, which is responded when whether face images with the attribute or combination of attributes in the attribute error report are same is determined at the similarity threshold of the attribute error report. This can suppress false alarm discrimination for face images such as a face image with “child” or “face with a mask” , or face image with a combination of “child and face with a mask” , and improve recognition rate of groups that are difficult to recognize.
In the above scheme, after the first face image is obtained, attribute analysis is performed on the first face image to obtain at least one attribute of the first face image, and the first face image is compared with the second face image already stored in the database to obtain multiple similarity values therebetween, and the similarity values are added to at least one attribute error report based on at least one attribute of the first face image, which defines a single-type of attribute or a combination of attributes of different types, and the similarity values are analysed. When the number of similarity values in any one attribute error reportexceeds the first threshold, the candidate similarity value is extracted from the corresponding attribute error report, and the candidate similarity value is used to update the current similarity threshold. Thus, the similarity threshold corresponding to any attribute or combination of attributes can be  automatically updated, which can reduce false alarm rate of face recognition and improve correct rate of a face that is difficult to recognize when a face image corresponding to an attribute or a combination of attributes appears in the monitoring area.
FIG. 2 is a schematic flow chart of anupdating method for a similarity threshold according to another some embodiments of the present disclosure. As shown in FIG. 2, the method includes actions/operations in the following.
At block S201, the method receives a first face image and obtains different types of attributes of the first face image by performing attribute analysis on the first face image through an attribute algorithm.
Specifically, when the first face image is obtained, the attribute analysis is performed on the first face image using the attribute algorithm to obtain an attribute analysis result, and different types of attributes of the first face image are extracted from the attribute analysis result.
In some embodiments, the obtained first face image is fed into an attribute analysis model, and the attributes of the first face image are extracted from the first face image through the attribute algorithm corresponding to the attribute analysis model. The attributes include at least one of an attribute of masked-degree, an attribute of age, an attribute of sex, and an attribute of skin-color.
At block S202, the method stores the different types of attributes in a preset order.
Specifically, the different types of attributes are sorted according to a user’s predetermined attribute, which standardizes the storage of the attributes and facilitates the subsequent matching of the attributes.
In some embodiments, the different typesof attributes are stored in a preset orderand in a binary manner, such that an attribute identifier of the first face image is obtained.
Specifically, after the order of the different types of attributes is fixed, 0 and 1 are used to indicate a status of an attribute to obtain the attribute identifier of the first face image. This enables fast matching based on the attribute identifier and improves processing efficiency when subsequent attribute matching is performed.
In an application scenario, Table 1 shows attribute identifiers of first face images. As shown in Table 1, the attributes include “face with a mask” , “child” , “youth” , “old” , “gender” , “yellow skin” , “white skin” , and “black skin” , and the different types of attributes mentioned  above are arranged in a preset order and stored in a binary manner. For example, for the attribute of gender, 0 indicates “female” and 1 indicates “male” , and for the attribute of face with a mask, 0 means “face with a mask” and 1 means “face without a mask” . Other types of attributes are not described here. The binary manner for storage can facilitate clear and accurate storage of different types of attributes to generate attribute identifiers for subsequent attribute matching.
Table 1 shows attribute identifiers of first face images.
Figure PCTCN2021128816-appb-000001
At block S203, the method obtainsacapturing time and a capturing locationof the first face image.
Specifically, the capturing time and the capturing location corresponding to the first face image are obtained when the first face image is received, and the capturing time and the capturing location are used as spatio-temporal information of the first face image.
In some embodiments, the capturing time and the capturing locationof the first face image are obtained from a device that captures the first face image when the first face image is received, wherein the capturing location is expressed in latitude and longitude.
At block S204, the method obtains face images outside of a preset spatio-temporal range as second face images based on the capturing time and the capturing location.
Specifically, the preset spatio-temporal range is obtained, and a face image outside the preset spatio-temporal range is obtained as the second face image with the capturing time and the capturing location corresponding to the first face image as the origin. Thus, this filters face images within the preset spatio-temporal range to ensure that the second face imagesand the first face image don’toriginate from the same person.
In some embodiments, the preset spatio-temporal range includes a preset duration and a preset distance. Face images are extracted for the second face image, which are located outside  the preset distance relative to the capturing location and captured within the preset duration before the capturing time corresponding to the first face image. Thus, the second face image is extracted, which theoretically does not originate from the same person with the first face image, and then a similarity value obtained when the first face image and the second face image are subsequently compared is a false alarm result.
In a specific application scenario, the preset time range includes a preset duration of 10 minutes, and then the same person will not theoretically travel more than 20 km in 10 minutesaccording to the highway speed limit of 120 km/h. The preset distance corresponding to the preset durationis set to be 25 km over the theoretical value. Face images that are within 10 minutes before the capturing time and 25 km away relative to the capturing locationare used for the second face images. In other application scenarios, the preset duration can also be 20 minutes or 30 minutes, etc., and the preset distance corresponding to the preset duration is set to ensure that the second face images do not originate from the same person with the first face image.
At block S205, the method obtains a plurality of similarity values by performing feature comparison on the first face image and each of the second face images in a database.
Specifically, feature information of the first face image and feature information of the second face images stored in the database are extracted so as to perform feature comparison between the first face image and the plurality of second face images to obtain the plurality of similarity values.
In some embodiments, feature extraction is performed on the first face image to obtain the feature information of the first face image, and the feature information of the first face image is stored in the database, such that it can be recalled subsequently when the newly obtained face image is used for feature comparison, and face images are supplemented in the database to provide continuity to the feature comparison. The feature information of the second face images is stored in the database. The feature comparison is performed for the feature information of the first face image and the feature information of the second face image, and multiple similarity values are obtained for filling an attribute error report.
At block S206, the method adds the plurality of similarity values to at least one attribute error report based on at least one attribute of the first face image.
Specifically, at least one attribute of the first face image is compared with a single-type  attribute or a combination of a plurality of attributes of different types in an attribute error report based on an attribute identifier of the first face image to obtain an attribute matching result, and the plurality of similarity values are added to corresponding attribute error reports based on the attribute matching result.
In some embodiments, an attribute inan attribute error report is an attribute of a single face image, the at least one attribute of the first face image is represented by an attribute identifier, and the attribute error report definesa single-type attribute or a combination of multiple attributes of different types. A similarity value is added to the attribute error report when an attribute identifier of the first face image is matched with an attribute or a combination of attributes in an attribute error report. Thus, fast matching with the attribute error report is achieved based on the attribute identifier, and the attribute error report is filled.
In a specific application scenario, as shown in Table 1 again, a target captured by a device is a black-skinned male child wearing a mask, and then the attribute identifier of the first face image corresponding to the target is 11001001, and asimilarity value is added to a corresponding attribute error report based on the attribute identifier of the first face image. For example, when the attribute error report includes anerror report of “face with a mask” , an error report of “face without a mask” , an error report of “child” , an error report of “child and face with a mask” , and an error report of “child and yellow-skin” , based on the attribute identifier of the first face image, the similarity value of the first face image with respect toa second face image may be added into the error report of “face with a mask” , the error report of “child” , and the error report of “child and face with a mask” , and not added into the error report of “face without a mask” and the error report of “child and yellow-skin” .
In another some embodiments, an attribute error report defines a combination of attributes corresponding to two face images, and the at least one attribute of the first face image is represented by an attribute identifier. The attribute identifier and the first face image can be stored together in the database after the attribute identifier of the first face image is obtained, and each second face image in the database has a corresponding attribute identifier that has already be stored. Then, the attribute identifiers of the first face image and second face imagesare compared with the combination of attributes in the attribute error report, and a similarity value between the first face image and a second face image is added to the corresponding attribute  error report when the attribute identifiers are matched with the combination of attributes in the attribute error report. Thus, fast matching with the attribute error report is achieved based on the attribute identifier, the attribute error report is filled.
In a specific application scenario, as shown in Table 1 again, a target captured by the device is a black-skinned male child wearing a mask, and then the attribute identifier of the first face image corresponding to the target is 11001001. The attribute identifier of the first face image and attribute identifiers of second face images are compared with the combination of attributes in the attribute error report. In a case where the attribute error report includes an error report of “face with a mask” / “face with a mask” , an error report of “face with a mask and child” /“face with a mask and child” , and an error report of “face with a mask” / “face without a mask” , similarity values between the first face image and all second face images of which attribute identifiers meet 1*******are extracted from results of feature matching and added into the error report of “face with a mask” / “face with a mask” , similarity values between the first face image and all second face images of which attribute identifiers meet 11******are extracted from results of feature matching and added into the error report of “face with a mask and child” / “face with a mask and child” , and similarity values between the first face image and all second face images of which attribute identifiers meet 0*******are extracted from results of feature matching and added into the error report of “face with a mask” / “face without a mask” .
At block S207, the method obtains a candidate similarity value from any of the at least one attribute error report, in response to the any of the at least one attribute error report having the number of similarity values which is greater than or equal to a first threshold.
Specifically, the similarity values in the attribute error report are arranged in a descending order, and the first threshold is the reciprocal of the false alarm rate. When the number of similarity values in any one attribute error report reaches the first threshold, a candidate similarity value is obtained from this attribute error report and used for updating the current similarity threshold.
In some embodiments, in response to the number of similarity values in any one attribute error report reaching n*f, the n thsimilarity value in this attribute error report is used as the candidate similarity value, where n is an integer and f indicates the first threshold.
Specifically, similarity values in an attribute error report are arranged in a descending  order, and it is determined whether the number of similarity values in the attribute error report reaches the reciprocal of the false alarm rate. When the number of similarity values in any one attribute error report reaches the first threshold for the first time, the maximum similarity value in the attribute error report is used as the candidate similarity value, and whenever the number of similarity values in the attribute error report reaches an integer multipleof the first threshold, i.e. n*f, the n thsimilarity value in the attribute error report is used as the candidate similarity value. The longer the length of an error report is, the more stable the similarity threshold is, and then the more accurate thefalse alarm rate is, which is responded when whether face images with a attribute or combination of attributes in the attribute error report are the same is determined at the similarity threshold of the attribute error report. This can suppress false alarm discrimination for face images, and improve recognition rate of groups that are difficult to recognize.
In an application scenario, the false alarm rate is set to be equal to 1e-10, and then the number of similarity values in the attribute error report needs to be greater than or equal to 1e10 at least, such that the candidate similarity value is obtained. Assuming that the number of similarity values in the attribute error report is equal to 1e11, thenthe 10 th similarity value in the attribute error report is selected as a new candidate similarity value.
At block S208, the method updates a current similarity threshold through the candidate similarity value.
Specifically, the number of attribute error reports can be set to one, and the current similarity threshold is updated using the candidate similarity value corresponding to this unique attribute error report. Alternatively, the number of attribute error reports can be set to be more than one, and when the number of similarity values in multiple attribute error reports exceeds the first threshold, each candidate similarity value is obtained from a respective attribute error report such that multiple candidate similarity values are obtained, and the current similarity threshold is updated using the maximum value among the candidate similarity values.
Further, the more complex the combination of attributes of a face image is, the lower the probability the samples of the face image occur, and the higher a corresponding similarity threshold is. When the number of similarity values in multiple attribute error reports reach the first threshold, this indicates that a sample occurs enough and is common in the monitoring area,  which has a face image with a specific attribute or combination of attributes. Thus, in order to reduce a false alarm ratein which a group is easily misidentified, when the number of similarity values in multiple attribute error reports reach the first threshold, similarity values in a respective attribute error report are arranged in a descending order, and similarity values at the positionof integer multiples are selected as candidate similarity values. The maximum value among the multiple candidate similarity values is used as the similarity threshold.
In a specific application scenario, when there is a sandstorm or a medical emergency in the monitoring area, the number of people wearing masks in the monitoring area will increase, and similarity values in an error report of “face with a mask” / “face with a mask” will be rapidly accumulated until the number of the similarity values reaches the first threshold. When a first candidate similarity value previously extracted from an error report of “yellow skin” / “yellow skin” is less than a second candidate similarity value currently extracted from an error report of “face with a mask” / “face with a mask” , the second candidate similarity value is set to be the similarity threshold in order to cope with the current situation that the number of difficult-to-identify groups in the monitoring area increases.
Alternatively, since the higher the similarity threshold is, the lower the false alarm rate will be, but the corresponding recognition rate will also be reduced, when the increased number of similarity values in any one attribute error reportis less than a preset value within a preset period, candidate similarity values extracted from attribute error reports whose the increased number of similarity values is less than the preset value are removed. This can cope with the current scenario of a sharp decrease in the number of difficultly-recognized face images with a specific attribute or combination of attributes in the current monitoring area and improve the recognition rate of face images corresponding to other attributes or combinations of attributes.
In these embodiments, the attributes of the first face image are extracted and the attribute identifier of the first face image is generated. The attribute identifier is quickly matchedwith a single-type attribute or a combination of multiple attributes of different types in an attribute error report, and then multiple similarity values of the first face image with respect tomultiple second face image are added to the attribute error report which meets the matching. When the number of similarity values in the attribute error report reaches an integer multiple of the first threshold, i.e. n*first threshold, and the similarity values in the attribute error report are  arranged in a descending order, the n th similarity value is used as the candidate similarity value to update the similarity threshold. Thus, the similarity threshold is continuously optimized in the process of iterative updating to reduce the false alarm rate of face recognition.
FIG. 3 is a schematic flow chart of a face recognition method according to some embodiments of the present embodiments. As shown in FIG. 3, the method includes actions/operations in the following.
At block S301, the method receives a first face image and obtains a plurality of similarity values by performing feature comparison on the first face image and each of a plurality of second face images in a database.
Specifically, after the first face image is obtained, feature information of the first face image is extracted and compared with that of each second face image in the database, and thus, multiple similarity valuesare obtained.
At block S302, the method obtains a current similarity threshold.
Specifically, the current similarity threshold is obtained according to the method in any of the above embodiments, the details of which can be found in any of the above embodiments and will not be repeated herein.
At block S303, the method controls and/or clusters the first face image and the plurality of second face images based on the current similarity threshold and the plurality of similarity values, and obtainsa first controlling result and/or a first clustering result.
Specifically, whether the similarity value between the first face image and the respective second face image exceeds the similarity threshold is determined. The first face image and the respective second face image are categorized as the same target for controllingalarm and/or being placed into a file corresponding to the same target if the similarity value exceeds. The first face image and the second face image are determined not to belong to the same target, no processing is done when it is used for controlling, and building a separate file for the unique first face image or the respective second face image when it is used for clustering, such that all face images corresponding to one target are clustered into the same file and the first clustering result is obtained.
In some embodiments, after the current similarity threshold is obtained, the first face image and a second face image in the database are alerted and/or clustered in the file through the  controlling and/or clustering algorithm. For example, these two face images of which the similarity valueexceeds the similarity thresholdare alerted. Alternatively, these two face images of which the similarity value exceeds the similarity threshold are placed into the same file. Alternatively, these two face images of which the similarity value exceeds the similarity threshold are alerted and placed into the same file.
In a specific application scenario, the second face image is a face image in the database within a preset spatio-temporal range. Different from the process of obtaining the similarity threshold, the similarity value in the attribute error report required for any of the above embodiments is false alarmresult, i.e., the two face images corresponding to the similarity value in the attribute error report must not originate from the same person. However, the clusteringprocessis to obtain face images belonging to the same person. In order to improve the comparison efficiency, a face image within the preset spatio-temporal range can be extracted as the second face image, and compared with the first face image to obtain the similarity value therebetween. Then the clustering algorithm is used for clustering, where the clustering algorithm may be the hierarchical clustering algorithm, or may be the density clustering algorithm in other application scenarios, which is not limited herein.
In a specific application scenario, the second face imagesare extracted from a blacklist database, and the first face image is compared with all the second face images in the blacklist database to obtain similarity valuestherebetween. When one similarity value is greater than the current similarity threshold, a control alarm record is generated to prompt the presence of a face image in the blacklist database.
In these embodiments, the similarity threshold is obtained based on the method in the above embodiments, so that there does not occur a situation where the similarity threshold will not alter after it is set to be an initial value, and the similarity threshold can be updated based on an attribute error report. Thus, the similarity threshold can be appliable for groups having different attributes or combinations of attributes, reduce the false alarm rate of easily misidentified faces, and improve correct rate of difficultly-identified faces.
Further, after the method controls and/or clusters the first face image and the plurality of second face images based on the current similarity threshold and the plurality of similarity values and obtains a first controlling result and/or a first clustering result, the method further corrects  the first controlling result and/or the first clustering result based on the updated similarity threshold and the attributes of face images in the first clustering result, in response to the updated similarity threshold being obtained.
Specifically, when the similarity threshold is updated, if the attributes corresponding to the alarm record in the first arming result arematched with the attributes or combinations of attributes of an attribute error report corresponding to the current similarity threshold, the current similarity threshold and the similarity value between two face images corresponding to the alarm recordare reconfirmed again. If the similarity value is still greater than the similarity threshold, the alarm record is remained, and if the similarity value is not greater than the similarity threshold, the corresponding alarm record is deleted. Thus, this reduces the probability of false alarms.
Further, if any attribute of a file in the first clustering result is matched with the attribute or combination of attributes in an attribute error report corresponding to the current similarity threshold, the current similarity threshold and the similarity value between any two face images in a file are reconfirmed again. If the similarity value is still greater than the similarity threshold, the face images are remained, and if the similarity value is not greater than the similarity threshold, a face image of which similarity values with other face images in the file are less than the current similarity threshold are deleted. Thus, this optimizes the first clustering result before the user retrieves the file and reduces the false alarm rate.
FIG. 4 is a schematic diagram of an electronic device according to some embodiments of the present disclosure. As shown in FIG. 4, the electronic device 40 includes a processor 401 and a memory 402 connected to the processor 401. The memory 402 stores program data. The program data, when executed, causes the processor 401 to perform the method according to any embodiment or any non-conflicting combination of the above method of the present disclosure of which detailed description is referred above and will not be repeated here.
FIG. 5 is a schematic diagram of a computer-readable storage medium according to some embodiments of the present disclosure. The computer-readable storage medium 50 stores program data, which when executed, the method according to any embodiment or any non-conflicting combination of the above method of the present disclosure is performed. Detailed description is referred above and will not be repeated here.
It should be noted that, the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units. That is, they may be located at one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of this embodiment.
In addition, the functional units in the various embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
If an integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solution of this application essentially can be embodied in the form of a software product, or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product. The software product is stored in a storage medium, which includes several instructions to make a computing device (which may be a personal computer, a server, or a network device, etc. ) or a processor execute all or part of actions/operations of the methods described in the various embodiments of the present disclosure. The afore-mentioned storage medium includes U disk, mobile hard disk, read-only memory (ROM) , random access memory (RAM) , magnetic disks or optical disks, or other media.
The above are only implementations of the present disclosure, and do not limit the scope of the present disclosure. Any equivalent structure or equivalent process transformation made by using the description and drawings of the present disclosure, or directly or indirectly applied to other related technical fields, are included in the scope of the present disclosure similarly.

Claims (15)

  1. A updating method for a similarity threshold in face recognition, comprising:
    receiving a first face image and obtaining at least one attribute of the first face image by performing attribute analysis on the first face image, the at least one attribute of the first face image comprising at least one of an attribute of masked-degree, an attribute of age, an attribute of sex, and an attribute of skin-color;
    obtaining a plurality of similarity values by performing feature comparison on the first face image and each of a plurality of second face images in a database;
    adding the plurality of similarity values into at least one attribute error report based on the at least one attribute of the first face image, each of the at least one attribute error report defining a single-type attribute or a combination of a plurality of attributes of different types;
    obtaining a candidate similarity value from any one of the at least one attribute error report, in response to the any one of the at least one attribute error report having the number of similarity values which is greater than or equal to a first threshold; and
    updating a current similarity threshold through the candidate similarity value.
  2. The updating method of claim 1, wherein the obtaining at least one attribute of the first face image by performing attribute analysis on the first face image, comprises:
    performing the attribute analysis on the first face image through an attribute algorithm, and extracting different types of attributes of the first face image; and
    storing the different types of attributes in a preset order.
  3. The updating method of claim 2, wherein the storing the different types of attributes in a preset order comprises:
    storing the different types of attributes in a preset order and in a binary manner, and obtaining an attribute identifier of the first face image.
  4. The updating method of claim 3, wherein the adding the plurality of similarity values into at least one attribute error report based on the at least one attribute of the first face image comprises:
    matching the attribute identifier of the first face image with the single-type attribute or the combination of the attributes of different types in the each of the at least one attribute error report, and obtaining an attribute matching result; and
    adding the plurality of similarity values into the at least one attribute error report based on the attribute matching result.
  5. The updating method of claim 1, wherein the similarity values in the any one of the at least one attribute error report are arranged in a descending order, and the first threshold is the reciprocal of a false alarm rate; and
    the obtaining a candidate similarity value from any one of the at least one attribute error report comprises:
    in response to the number of similarity values in the any one of the at least one attribute error report being greater than or equal to n*f, obtaining the n th similarity value of the similarity values in the any one of the at least one attribute error report as the candidate similarity value, n being an integer and f indicates the first threshold.
  6. The updating method of claim 5, wherein the at least one attribute error report comprises a plurality of attribute error reports; and
    the updating a current similarity threshold through the candidate similarity value comprises:
    obtaining a respective candidate similarity value from each of the plurality of attribute error reports, such that a plurality of candidate similarity values are obtained, and updating the current similarity threshold as the maximum of the candidate similarity values.
  7. The updating method of claim 1, before the obtaining a plurality of similarity values by performing feature comparison on the first face image and each of a plurality of second face images in a database, further comprising:
    obtaining a capturing time and capturing location of the first face image; and
    obtaining face images outside of a preset spatio-temporal range as the second face images based on the capturing time and the capturing location.
  8. The updating method of claim 7, wherein the obtaining a plurality of similarity values by performing feature comparison on the first face image and each of a plurality of second face images in a database, comprises:
    performing feature extraction on the first face image, and obtaining and storing feature information of the first face image; and
    comparing the feature information of the first face image with feature information of the second face images, respectively, and obtaining a respective similarity value between the first face image and each of the second face images, such that the plurality of similarity values are obtained.
  9. A method for face recognition, comprising:
    receiving a first face image and obtaining a plurality of similarity values by performing feature comparison on the first face image and each of a plurality of second face images in a database;
    obtaining a current similarity threshold through the updating method of any one of claims 1-8; and
    controlling and/or clustering the first face image and the plurality of second face images based on the current similarity threshold and the plurality of similarity values, and obtaining a first controlling result and/or a first clustering result.
  10. The method of claim 9, further comprising:
    correcting the first controlling result and/or the first clustering result based on an updated similarity threshold and attributes corresponding to face images in the first clustering result, in response to the updated similarity threshold being obtained.
  11. An electronic device, comprising a processor and a memory connected to the processor and storing program data, when executed, causing the processor to perform a method of any one of claims 1-8 or any one of claims 9-10.
  12. A non-transitory computer-readable storage medium storing program data, when executed, causing a processor to perform a method of any one of claims 1-8 or any one of claims 9-10.
  13. An electronic device, comprising a processor and a memory connected to the processor and storing program data, when executed, causing the processor to perform:
    obtaining a respective candidate similarity value from each of at least one attribute error report, such that a plurality of candidate similarity values are obtained, the each of the at least one attribute error report defining a single attribute or a combination of a plurality of attributes of different types and having the number of similarity values which is greater than or equal to a preset value, and each similarity value of the similarity values corresponding to the single-type attribute or the combination of the plurality of attributes of different types and indicating a feature similarity between a first face image and a respective second face image; and
    updating a similarity threshold in face recognition of the first face image based on the candidate similarity values.
  14. The electronic device of claim 13, wherein the similarity threshold is the maximum of the candidate similarity values.
  15. The electronic device of claim 13, wherein the similarity values in the each of the at least one attribute error report are arranged in a descending order, and the respective candidate similarity value is an average or a median of the first n similarity values in the similarity values, n is an integer.
PCT/CN2021/128816 2021-07-15 2021-11-04 Updating method for similarity threshold in face recognition and electronic device WO2023284185A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110802852.2 2021-07-15
CN202110802852.2A CN113255631B (en) 2021-07-15 2021-07-15 Similarity threshold updating method, face recognition method and related device

Publications (1)

Publication Number Publication Date
WO2023284185A1 true WO2023284185A1 (en) 2023-01-19

Family

ID=77180479

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/128816 WO2023284185A1 (en) 2021-07-15 2021-11-04 Updating method for similarity threshold in face recognition and electronic device

Country Status (2)

Country Link
CN (1) CN113255631B (en)
WO (1) WO2023284185A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113255631B (en) * 2021-07-15 2021-10-15 浙江大华技术股份有限公司 Similarity threshold updating method, face recognition method and related device
CN114139007B (en) * 2022-01-26 2022-06-21 荣耀终端有限公司 Image searching method, electronic device, and medium thereof

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140079299A1 (en) * 2012-09-20 2014-03-20 Kabushiki Kaisha Toshiba Person recognition apparatus and method thereof
CN111626229A (en) * 2020-05-29 2020-09-04 广州云从博衍智能科技有限公司 Object management method, device, machine readable medium and equipment
CN111666976A (en) * 2020-05-08 2020-09-15 深圳力维智联技术有限公司 Feature fusion method and device based on attribute information and storage medium
CN111898495A (en) * 2020-07-16 2020-11-06 云从科技集团股份有限公司 Dynamic threshold management method, system, device and medium
CN112836661A (en) * 2021-02-07 2021-05-25 Oppo广东移动通信有限公司 Face recognition method and device, electronic equipment and storage medium
CN113255631A (en) * 2021-07-15 2021-08-13 浙江大华技术股份有限公司 Similarity threshold updating method, face recognition method and related device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105574500B (en) * 2015-12-15 2019-09-27 北京眼神智能科技有限公司 The method and apparatus for improving recognition of face percent of pass
CN111199029B (en) * 2018-11-16 2023-07-18 株式会社理光 Face recognition device and face recognition method
CN111091080A (en) * 2019-12-06 2020-05-01 贵州电网有限责任公司 Face recognition method and system
CN111814570B (en) * 2020-06-12 2024-04-30 深圳禾思众成科技有限公司 Face recognition method, system and storage medium based on dynamic threshold
CN111814990B (en) * 2020-06-23 2023-10-10 汇纳科技股份有限公司 Threshold determining method, system, storage medium and terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140079299A1 (en) * 2012-09-20 2014-03-20 Kabushiki Kaisha Toshiba Person recognition apparatus and method thereof
CN111666976A (en) * 2020-05-08 2020-09-15 深圳力维智联技术有限公司 Feature fusion method and device based on attribute information and storage medium
CN111626229A (en) * 2020-05-29 2020-09-04 广州云从博衍智能科技有限公司 Object management method, device, machine readable medium and equipment
CN111898495A (en) * 2020-07-16 2020-11-06 云从科技集团股份有限公司 Dynamic threshold management method, system, device and medium
CN112836661A (en) * 2021-02-07 2021-05-25 Oppo广东移动通信有限公司 Face recognition method and device, electronic equipment and storage medium
CN113255631A (en) * 2021-07-15 2021-08-13 浙江大华技术股份有限公司 Similarity threshold updating method, face recognition method and related device

Also Published As

Publication number Publication date
CN113255631A (en) 2021-08-13
CN113255631B (en) 2021-10-15

Similar Documents

Publication Publication Date Title
US11410001B2 (en) Method and apparatus for object authentication using images, electronic device, and storage medium
WO2023284185A1 (en) Updating method for similarity threshold in face recognition and electronic device
CN108229297B (en) Face recognition method and device, electronic equipment and computer storage medium
US20170300744A1 (en) Method and apparatus for determining identity identifier of face in face image, and terminal
CN111539443B (en) Image recognition model training method and device and storage medium
WO2022174699A1 (en) Image updating method and apparatus, and electronic device and computer-readable medium
CN108171138B (en) Biological characteristic information acquisition method and device
EP3644232B1 (en) Method and device for classifying samples to be assessed
CN111859451B (en) Multi-source multi-mode data processing system and method for applying same
CN110889314B (en) Image processing method, device, electronic equipment, server and system
US20210319226A1 (en) Face clustering in video streams
US10997609B1 (en) Biometric based user identity verification
CN111753642B (en) Method and device for determining key frame
CN110969642B (en) Video filtering method and device, electronic equipment and storage medium
Zhou et al. Recognizing fall actions from videos using reconstruction error of variational autoencoder
US11841902B2 (en) Information processing apparatus, information processing method, and storage medium
CN109886239B (en) Portrait clustering method, device and system
CN113947209A (en) Integrated learning method, system and storage medium based on cloud edge cooperation
CN114519879A (en) Human body data archiving method, device, equipment and storage medium
CN110795971A (en) User behavior identification method, device, equipment and computer storage medium
CN111738059A (en) Non-sensory scene-oriented face recognition method
CN111401291B (en) Stranger identification method and device
CN114639143A (en) Portrait filing method, equipment and storage medium based on artificial intelligence
CN113642519A (en) Face recognition system and face recognition method
CN113591620A (en) Early warning method, device and system based on integrated mobile acquisition equipment

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE