Method and device for determining face attributes, storage medium and electronic device

Through the multi-frame face attribute scoring and cache queue mechanism, the face attributes are finally determined based on attribute credibility filtering, which solves the problem of inaccurate facial attribute recognition in the existing technology, and improves the recognition accuracy and system stability.

CN114419714BActive Publication Date: 2025-03-28GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210085990.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-25
Publication Date
2025-03-28
Estimated Expiration
2042-01-25

AI Technical Summary

Technical Problem

In the prior art, the facial attribute recognition results are inaccurate, resulting in misrecognition, affecting subsequent algorithm processing and user experience.

Method used

By obtaining the face attribute scores for multiple frames, using the cache queue mechanism, filtering based on the attribute credibility, and finally determining the final result of the face attribute through statistical values.

Benefits of technology

The accuracy of facial attribute recognition is improved, the problem of misrecognition of single frame recognition is avoided, and the effects of high stability, fast recognition speed and low power consumption are achieved through a limited cache queue.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114419714B_ABST
    Figure CN114419714B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method for determining facial attributes, a facial attribute determination device, a computer-readable storage medium, and an electronic device, and relates to the field of image processing technology. The facial attribute determination method comprises: obtaining a facial attribute score of a current frame; if the current frame is an image frame after a preset number of frames, obtaining a second cache queue using the facial attribute score of the current frame and a first cache queue; when the second cache queue includes the facial attribute score of the current frame, based on the facial attribute score in the second cache queue, calculating a first statistical value of the attribute category of the face, and determining the attribute determination result of the face of the current frame according to the first statistical value; determining a second statistical value of the attribute category of the face in the second cache queue, and when the second statistical value meets the attribute output condition, outputting the attribute determination result of the face of the current frame as the final attribute determination result of the face. The present disclosure can improve the accuracy of facial attribute recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing technology, and in particular to a method for determining face attributes, a device for determining face attributes, a computer-readable storage medium, and an electronic device. Background Art

[0002] With the development of image processing technology, the scheme of using face images to determine facial attributes has attracted more and more attention. The determined facial attributes can be widely used in human-computer interaction, image analysis, user modeling and other fields.

[0003] Currently, there are some solutions that use single frames to identify facial attributes. However, these solutions may have misrecognition problems, and the identified facial attributes are wrong, affecting subsequent algorithm processing and user experience. Summary of the invention

[0004] The present disclosure provides a facial attribute determination method, a facial attribute determination device, a computer-readable storage medium, and an electronic device, thereby overcoming the problem of inaccurate facial attribute recognition results at least to a certain extent.

[0005] According to a first aspect of the present disclosure, a method for determining facial attributes is provided, comprising: obtaining a facial attribute score of a current frame; if the current frame is an image frame after a preset number of frames, obtaining a second cache queue using the facial attribute score of the current frame and a first cache queue; wherein the first cache queue and the second cache queue both store a preset number of personal facial attribute scores, and the preset number of personal facial attribute scores in the first cache queue are determined based on the attribute credibility corresponding to the facial attribute scores of each image frame before the current frame; when the second cache queue includes the facial attribute score of the current frame, based on the facial attribute scores in the second cache queue, a first statistical value of the attribute category of the face is calculated, and an attribute determination result of the face of the current frame is determined based on the first statistical value; a second statistical value of the attribute category of the face in the second cache queue is determined, and when the second statistical value meets the attribute output condition, the attribute determination result of the face of the current frame is output as the final attribute determination result of the face.

[0006] According to a second aspect of the present disclosure, a face attribute determination device is provided, comprising: a score acquisition module, for acquiring a face attribute score of a current frame; a queue processing module, for obtaining a second cache queue using the face attribute score of the current frame and a first cache queue if the current frame is an image frame after a preset number of frames; wherein the first cache queue and the second cache queue both store a preset number of face attribute scores, and the preset number of face attribute scores in the first cache queue are determined according to the attribute credibility corresponding to the face attribute scores of each image frame before the current frame; a current result determination module, for calculating a first statistical value of a face attribute category based on the face attribute scores in the second cache queue when the face attribute score of the current frame is included in the second cache queue, and determining a face attribute determination result of the current frame according to the first statistical value; a result output module, for determining a second statistical value of the face attribute category in the second cache queue, and outputting the face attribute determination result of the current frame as the final face attribute determination result when the second statistical value meets the attribute output condition.

[0007] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned method for determining facial attributes is implemented.

[0008] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising a processor; and a memory for storing one or more programs, wherein when the one or more programs are executed by the processor, the processor implements the above-mentioned method for determining facial attributes.

[0009] In the technical solutions provided by some embodiments of the present disclosure, if the current frame is an image frame after a preset number of frames, the second cache queue is obtained using the facial attribute score of the current frame and the first cache queue, the first cache queue includes a preset number of facial attribute scores determined based on the attribute credibility corresponding to the facial attribute scores of each image frame previously obtained, and based on the facial attribute scores in the second cache queue, a first statistical value of the facial attribute category is calculated, and the facial attribute determination result of the current frame is determined according to the first statistical value, and when the second statistical value of the facial attribute category meets the attribute output condition, the facial attribute determination result of the current frame is output as the final facial attribute determination result. On the one hand, the present invention combines the facial attribute scores of multiple frames to determine the final facial attribute results. Compared with some technologies that only use a single frame, it can avoid misidentification and improve the accuracy of facial attribute recognition. On the other hand, the facial attributes finally output by the present invention do not depend on the judgment results of a single frame, nor do they depend on the judgment results of all frames. The number of facial attribute scores included in the first cache queue and the second cache queue of the present invention are both preset numbers. Therefore, effective filtering is achieved based on attribute credibility. In other words, the present invention uses a limited cache queue to determine the final facial attributes, which has high stability, fast recognition speed and low power consumption.

[0010] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0012] Figure 1 A schematic diagram showing an exemplary system architecture of a solution for determining face attributes according to an embodiment of the present disclosure;

[0013] Figure 2 A schematic diagram showing a method of determining facial attributes using multiple frames of images according to an embodiment of the present disclosure is shown;

[0014] Figure 3 A flowchart of a method for determining face attributes according to an exemplary embodiment of the present disclosure is schematically shown;

[0015] Figure 4 A flowchart of a process for determining a second cache queue according to an embodiment of the present disclosure is schematically shown;

[0016] Figure 5A schematic diagram showing updating a first cache queue to obtain a second cache queue according to an embodiment of the present disclosure is shown;

[0017] Figure 6 A flowchart of determining the attribute determination result of the face of the current frame according to an embodiment of the present disclosure is schematically shown;

[0018] Figure 7 A flowchart schematically shows a processing procedure for a case where the current frame is a preset number of frames before the present embodiment of the present disclosure;

[0019] Figure 8 A flowchart of the face attribute determination process of the present disclosure is schematically shown, taking gender determination as an example;

[0020] Fig. 9 A block diagram schematically shows a face attribute determination device according to an exemplary embodiment of the present disclosure;

[0021] Fig.10 A schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0022] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0023] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0024] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the steps. For example, some steps may be decomposed, while some steps may be combined or partially combined, so the actual execution order may change according to the actual situation. In addition, all the terms "first", "second", "third", etc. below are only for the purpose of distinction and should not be used as limitations of the present disclosure.

[0025] Figure 1 A schematic diagram showing an exemplary system architecture of a solution for determining facial attributes according to an embodiment of the present disclosure.

[0026] like Figure 1 As shown, the system architecture may include a terminal device 11 and a server 12. The terminal device 11 may interact with the server 12 via a network, and the network may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0027] The terminal device 11 may include but is not limited to a smart phone, a tablet computer, a smart wearable device, a personal computer, etc. The present disclosure does not limit the type of the terminal device 11. The server 12 may be a single server or a server cluster composed of multiple servers.

[0028] The face attribute determination scheme of the embodiment of the present disclosure may be executed by the terminal device 11 or by the server 12 .

[0029] In an example in which the face attribute determination scheme of the embodiment of the present disclosure is executed by the terminal device 11, the terminal device 11 can determine the attribute determination result of the face in the face image frame based on the face image sequence 10. Each image frame in the face image sequence 10 can be taken by a camera module equipped by the terminal device 11.

[0030] In an example in which the face attribute determination scheme of the embodiment of the present disclosure is executed by the server 12, the terminal device 11 can send the face image sequence 10 taken by the camera module equipped therewith to the server 12, and the server 12 determines the attribute determination result of the face in the face image frame based on the face image sequence 10. In addition, the server 12 can also feed back the determined result to the terminal device 11.

[0031] Reference below Figure 2 The process of determining facial attributes using multiple frames of images in an embodiment of the present disclosure is schematically described.

[0032] The facial image sequence may include multiple frames of images from the 1st frame to the nth frame, and each frame of the image corresponds to a facial attribute score. The facial attribute score may be a score characterizing the facial attribute obtained based on a machine learning algorithm. In addition, the score may be a score obtained after normalization. The present disclosure does not limit the machine learning algorithm. For example, in an instance where the facial attribute is gender, the machine learning model may be configured as a binary classification model based on the male or female classification result.

[0033] Take the method for determining facial attributes implemented by a terminal device as an example.

[0034] The terminal device can obtain the current frame and determine which frame of the facial image sequence the current frame is. It is understandable that in some embodiments, before implementing the facial attribute determination method disclosed in the present invention, the facial image sequence has been captured and generated, and the terminal device can obtain the image frame by frame. In other embodiments, the terminal device processes the captured image in real time, that is, the current frame obtained by the terminal device is the latest frame in the facial image sequence.

[0035] If it is determined that the current frame is the first frame in the facial image sequence, the terminal device stores the facial attribute score of the current frame in the initial cache queue, and uses the attribute determination result corresponding to the facial processing scene as the attribute determination result of the face of the current frame. For example, in the example of judging male or female, if applied to the facial processing scene of applying makeup, male can be used as the attribute determination result of the face of the current frame. It should be understood that the attribute determination result corresponding to the facial processing scene can be pre-defined.

[0036] If it is determined that the current frame is the first N frames in the face image sequence but not the first frame, the terminal device can store the face attribute score of the current frame in the initial cache queue, perform statistical analysis on the attribute categories of the faces stored in the initial cache queue, and determine the face attribute determination result according to the result of the statistical analysis. The present disclosure does not limit the value of N, for example, it can be 5, 8, 10, etc.

[0037] If it is determined that the current frame is an image frame after the first N frames in the face image sequence, that is, it is determined that the current frame is not the Nth frame image, the terminal device can use the face attribute score of the current frame and the first cache queue to obtain the second cache queue. Among them, the first cache queue and the second cache queue both store N face attribute scores, and the N face attribute scores in the first cache queue are determined based on the attribute credibility corresponding to the face attribute scores of each image frame before the current frame in the face image sequence. Specifically, the N face attribute scores in the first cache queue are the highest N face attribute scores in the attribute credibility corresponding to the previously determined face attribute scores.

[0038] When the second cache queue includes the facial attribute score of the current frame, the terminal device can calculate the first statistical value of the facial attribute category based on the facial attribute score in the second cache queue, and determine the attribute determination result of the face of the current frame based on the first statistical value.

[0039] In addition, the terminal device can determine a second statistical value of the attribute category of the face in the second cache queue, and when the second statistical value meets the attribute output condition, output the attribute determination result of the face in the current frame as the final attribute determination result of the face.

[0040] Figure 2 This is only an exemplary description. It can be seen that when the current frame is the i-th frame and the final attribute determination result of the face has been output, the face attribute determination scheme disclosed in the present invention can be terminated without performing the operation of obtaining the face attribute score and analysis after the i-th frame.

[0041] The following will take a terminal device executing the face attribute determination method of the embodiment of the present disclosure as an example for explanation. In this case, the face attribute determination device described below can be configured in the terminal device.

[0042] Figure 3 The flowchart of the method for determining face attributes according to an exemplary embodiment of the present disclosure is schematically shown. Figure 3 , the method for determining face attributes may include the following steps:

[0043] S32. Obtain the facial attribute score of the current frame.

[0044] The face attributes described in the embodiments of the present disclosure include but are not limited to gender, whether a mask is worn, whether glasses are worn, face skin color, nose bridge height, hair length, etc., and the present disclosure does not limit this. In addition, the face attribute determination method of the present disclosure can be applied to two-category scenarios or more classification scenarios.

[0045] The facial attribute score represents the score of the facial attribute category. The facial attribute score used in the embodiment of the present disclosure may be a score after normalization (softmax calculation), and its value range (or score interval) may be [0,1]. Taking gender as an example, the closer the score is to 1, the greater the probability of male; the closer the score is to 0, the greater the probability of female. Alternatively, the closer the score is to 1, the greater the probability of female; the closer the score is to 0, the greater the probability of male.

[0046] The present disclosure does not limit the process of obtaining the facial attribute score. For example, a machine learning model can be used to obtain the facial attribute score. Specifically, the current frame image can be input into a convolutional neural network. After the feature extraction of each dimension in the convolutional neural network, a score representing the facial attribute can be obtained. After being processed by the softmax layer, a normalized facial attribute score can be obtained.

[0047] The current frame can be any frame image in the face image sequence.

[0048] It should be noted that the current frame may be an original image acquired by the terminal device, or may be an image block containing a face generated by cropping the image acquired by the terminal device. In the case where the current frame is an image block generated by cropping, the remaining images in the face image sequence may be cropped from the corresponding original images according to the face tracking algorithm.

[0049] Before obtaining the facial attribute score of the current frame, the terminal device may determine whether the final attribute determination result of the face is obtained, that is, whether the final attribute determination result of the face has been determined. If it is determined that the final attribute determination result of the face has not been obtained, the terminal device performs an operation of obtaining the facial attribute score of the current frame. If it is determined that the final attribute of the face has been determined, no operation may be performed.

[0050] In addition, before determining whether the final attribute determination result of the face is obtained, the terminal device can also determine whether the face of the current frame is a face in the face library. In other words, it can be determined whether the face is a new face. Specifically, the features of the face of the current frame can be extracted, and the features can be compared with the features of the faces contained in the face library for similarity to determine whether the face of the current frame is a face in the face library.

[0051] When it is determined that the face in the current frame is a face in the face database, it may be further determined whether a final attribute determination result of the face is obtained.

[0052] When it is determined that the face of the current frame is not in the face database, the terminal device can determine the attribute determination result corresponding to the face processing scene, and use the attribute determination result corresponding to the face processing scene as the attribute determination result of the face of the current frame. For example, in the example of determining whether a male or female is male, if the face processing scene of applying makeup is used, male can be used as the attribute determination result of the face of the current frame. It should be understood that the attribute determination result corresponding to the face processing scene can be pre-defined.

[0053] S34. If the current frame is an image frame after a preset number of frames, the second cache queue is obtained using the facial attribute score of the current frame and the first cache queue; wherein the first cache queue and the second cache queue both store a preset number of personal facial attribute scores, and the preset number of personal facial attribute scores in the first cache queue are determined based on the attribute credibility corresponding to the facial attribute scores of each image frame before the current frame.

[0054] The first cache queue described in the present disclosure is a cache queue used to determine the attribute determination result of the previous frame of the current frame. The first cache queue contains a preset number of personal face attribute scores, and the present disclosure does not limit the specific preset number, for example, the preset number is 5, 8, 10, etc.

[0055] The facial attribute scores included in the first cache queue are the facial attribute scores of the image frames before the current frame, which are the highest preset number of facial attribute scores in the attribute credibility corresponding to the facial attribute scores. Taking the preset number of 5 as an example, if the current frame is the 10th frame, the facial attribute scores included in the first cache queue are the 5 facial attribute scores with the highest attribute credibility corresponding to the facial attribute scores in the previous 9 frames.

[0056] The attribute credibility corresponding to the face attribute score represents the credibility of the attribute category represented by the face attribute score. Taking the gender described above as an example, if a face attribute score is closer to 0 or closer to 1, the attribute credibility of the face attribute score is greater. Conversely, if a face attribute score is closer to 0.5, the attribute credibility of the face attribute score is smaller.

[0057] The following will refer to Figure 4 The process of determining the second cache queue is described.

[0058] In step S402, the attribute credibility corresponding to the face attribute score of the current frame is calculated.

[0059] The terminal device can calculate the absolute value of the difference between the facial attribute score of the current frame and the median of the score interval as the attribute credibility corresponding to the facial attribute score of the current frame.

[0060] Taking the score interval [0,1] as an example, the absolute value of the difference between the face attribute score of the current frame and 0.5 can be calculated as the attribute credibility corresponding to the face attribute score of the current frame. For example, if the face attribute score is 0.1, the corresponding attribute credibility is 0.4.

[0061] It should be noted that, except for the current frame, the attribute credibility corresponding to the facial attribute scores of other image frames can be determined based on this method.

[0062] In step S404, the attribute credibility corresponding to the face attribute score of the current frame is compared with the minimum attribute credibility corresponding to the face attribute score in the first cache queue.

[0063] In some embodiments of the present disclosure, the facial attribute scores in the first cache queue are a queue obtained by sorting based on attribute credibility. After obtaining the facial attribute scores of the current frame, the attribute credibility corresponding to the facial attribute scores of the current frame can be directly compared with the attribute credibility corresponding to the facial attribute score at the end of the queue.

[0064] In some other embodiments of the present disclosure, the face attribute score with the smallest corresponding attribute credibility in the first cache queue can be pre-locked without sorting the face attribute scores in the first cache queue. After obtaining the face attribute score of the current frame, the attribute credibility corresponding to the face attribute score of the current frame can be directly compared with the attribute credibility corresponding to the locked face attribute score.

[0065] The terminal device may obtain a second cache queue based on the comparison result.

[0066] It can be understood that the comparison mentioned here refers to the comparison of the credibility values.

[0067] In step S406, it is determined whether the attribute credibility corresponding to the face attribute score of the current frame is larger, that is, it is determined whether the attribute credibility corresponding to the face attribute score of the current frame is greater than the minimum attribute credibility corresponding to the face attribute score in the first cache queue.

[0068] In step S408, when the attribute credibility corresponding to the facial attribute score of the current frame is greater than the minimum attribute credibility corresponding to the facial attribute score in the first cache queue, the terminal device can add the facial attribute score of the current frame to the first cache queue, and remove the facial attribute score corresponding to the minimum attribute credibility from the first cache queue to obtain a second cache queue.

[0069] Figure 5 A schematic diagram showing this situation is shown in Figure 2. Figure 5 , the face attribute score of the current frame can be added to the first cache queue, and the face attribute score corresponding to the smallest attribute credibility can be removed from the first cache queue to obtain the second cache queue. Since one is removed and one is added, Figure 5 As shown, the second cache queue contains the same number of facial attribute scores as the first cache queue, which is the above-mentioned preset number.

[0070] In step S410, when the attribute credibility corresponding to the face attribute score of the current frame is less than or equal to the minimum attribute credibility corresponding to the face attribute score in the first cache queue, the terminal device can use the first cache queue as the second cache queue. In other words, the first cache queue is maintained unchanged and is recorded as the second cache queue for the convenience of description.

[0071] When the first cache queue is used as the second cache queue, the terminal device can use the attribute determination result of the face of the previous frame of the current frame as the attribute determination result of the face of the current frame.

[0072] S36. When the second cache queue includes the facial attribute scores of the current frame, a first statistical value of the facial attribute category is calculated based on the facial attribute scores in the second cache queue, and a result of determining the facial attributes of the current frame is determined according to the first statistical value.

[0073] refer to Figure 6 The processing procedure of step S36 is described.

[0074] In step S602, the terminal device may calculate a first statistical value of a first attribute category of the face based on the face attribute scores in the second cache queue.

[0075] The attribute category mentioned in the present disclosure may be a classification result of a face attribute. Taking gender as an example, the attribute category may be male or female. For example, the first attribute category may refer to male in the embodiment of gender, and the second attribute category may refer to female in the embodiment of gender.

[0076] The first statistical value of the first attribute category may be the number or proportion of the first attribute category. Still taking the gender scenario as an example, the calculated first statistical value of the first attribute category may refer to the number of males in the second cache queue, or the proportion of males.

[0077] Specifically, the attribute category corresponding to the face attribute score can be determined based on the comparison result between the face attribute score and the threshold. For example, if the face attribute score is greater than 0.8, the attribute category corresponding to the face attribute score is determined to be the first attribute category (such as male); if the face attribute score is less than 0.2, the attribute category corresponding to the face attribute score is determined to be the second attribute category (such as female).

[0078] In step S604, it is determined whether the first statistical value of the first attribute category is greater than a first threshold. The first threshold varies according to the statistical method (quantity or proportion) of the statistical value. The present disclosure does not limit the specific value of the first threshold. Taking the proportion as an example, the first threshold can be 75%.

[0079] In step S606, if it is determined that the first statistical value of the first attribute category is greater than the first threshold, the terminal device determines the first attribute category as the attribute determination result of the face of the current frame. For example, the attribute determination result of the face of the current frame is male.

[0080] In step S608, if it is determined that the first statistical value of the first attribute category is less than or equal to the first threshold, the terminal device continues to determine whether the first statistical value of the first attribute category is less than a second threshold. The second threshold is less than the first threshold. Specifically, in an embodiment using a percentage as a statistical method, the sum of the second threshold and the first threshold is 1.

[0081] In step S610, if it is determined that the first statistical value of the first attribute category is less than the second threshold, the terminal device may determine the second attribute category as the attribute determination result of the face of the current frame.

[0082] In step S612, if it is determined that the first statistical value of the first attribute category is less than or equal to the first threshold and greater than or equal to the second threshold, the attribute determination result of the face of the previous frame of the current frame is used as the attribute determination result of the face of the current frame.

[0083] S38. Determine a second statistical value of the attribute category of the face in the second cache queue, and when the second statistical value meets the attribute output condition, output the attribute determination result of the face in the current frame as the final attribute determination result of the face.

[0084] According to some embodiments of the present disclosure, the first statistical value of the attribute category of the face calculated in step S36 can be used as the second statistical value of the attribute category of the face in step S38. In this case, the terminal device can reuse the first statistical value calculated in step S36.

[0085] According to some other embodiments of the present disclosure, the terminal device may calculate a second statistical value of the attribute category of the face based on the face attribute score in the second cache queue, and the second statistical value and the first statistical value are statistical values ​​calculated based on different statistical methods. For example, the first statistical value is the number of attribute categories, and the second statistical value is the proportion of attribute categories. For another example, the first statistical value is the proportion of attribute categories, and the second statistical value is the number of attribute categories.

[0086] The attribute output conditions may be predefined, and the present disclosure does not impose any limitation on this.

[0087] In some embodiments of the present disclosure, when a second statistical value of an attribute category of a human face is obtained, the second statistical value can be compared with a third threshold value. When the second statistical value of the attribute category of the human face is greater than or equal to the third threshold value, it is determined that the second statistical value meets the attribute output condition.

[0088] Taking the second statistical value representing the proportion of the attribute category as an example, when the proportion of an attribute category is greater than or equal to the proportion threshold, it is determined that the second statistical value meets the attribute output condition. Optionally, the attribute output condition may be that the proportion of an attribute category is greater than 90%.

[0089] Taking the second statistical value representing the number of attribute categories as an example, when the number of an attribute category is greater than or equal to the quantity threshold, it is determined that the second statistical value meets the attribute output condition. Optionally, the attribute output condition can be that the number of an attribute category is the total number of face attribute scores contained in the second cache queue. Taking gender as an example, when all face attribute scores in the second cache queue correspond to males or all correspond to females, it is determined that the attribute output condition is met.

[0090] When the second statistical value satisfies the attribute output condition, the terminal device may output the attribute determination result of the face of the current frame determined in step S36 as the final attribute determination result of the face.

[0091] The output of the final attribute determination result indicates that the facial attribute recognition process is no longer required and the attributes of the face have been determined.

[0092] The following will refer to Figure 7 , the case where the current frame of the embodiment of the present disclosure is a preset number of frames is described.

[0093] In step S702, if it is determined that the current frame is a previous preset data frame, the facial attribute score of the current frame is added to the initial cache queue. It can be understood that the initial cache queue is different from the first cache queue and the second cache queue. It is an initially established cache queue, and the number of facial attribute scores contained in it is less than or equal to the preset number, and there is no removal operation of facial attribute scores in the cache queue.

[0094] In step S704, when the current frame is the first frame of a face, the terminal device can determine the attribute determination result corresponding to the face processing scene, and use the attribute determination result corresponding to the face processing scene as the attribute determination result of the face of the current frame. For example, in the example of judging male or female, if applied to the face processing scene of applying makeup, male can be used as the attribute determination result of the face of the current frame. It should be understood that the attribute determination result corresponding to the face processing scene can be pre-defined.

[0095] In step S706, when the current frame is the remaining image frame except the first frame in the previous preset number of frames, the terminal device can calculate the first statistical value of the attribute category of the face based on the face attribute score contained in the initial cache queue, and determine the attribute determination result of the face of the current frame according to the first statistical value. The specific processing process is similar to the above steps S602 to S612, and will not be repeated.

[0096] The following will refer to Figure 8 Taking the determination of the gender of a face and its application in a makeup scene as an example, the process of determining the face attributes of an embodiment of the present disclosure is explained.

[0097] In step S802, the terminal device obtains the gender score of the face in the current frame.

[0098] In step S804, the terminal device determines whether the face in the current frame is a new face. If it is a new face, step S806 is executed; if it is not a new face, step S808 is executed.

[0099] In step S806, the terminal device initializes the gender to male, that is, determines the gender of the face in the current frame to be male.

[0100] In step S808, the terminal device determines whether the gender needs to be updated.

[0101] In step S810, when the gender needs to be updated, the terminal device determines whether the current frame is the first N frames of the face image sequence, and N can be 5. When the current frame is the first N frames, step S812 is executed; when the current frame is not the first N frames, step S830 is executed.

[0102] In step S812, the terminal device stores the gender score of the face in the current frame into a cache queue.

[0103] In step S814, the terminal device determines whether the current frame is the first frame. If the current frame is the first frame, the face attribute (gender) of the current frame is determined to be male in step S816; if the current frame is not the first frame, step S818 is executed.

[0104] In step S818, the terminal device counts the proportion of males in the cache queue, that is, calculates the ratio of the number of people in the cache queue whose gender scores are greater than the male limit to the total number of people with gender scores.

[0105] In step S820, the terminal device determines whether the statistical male ratio is greater than a first threshold. If so, in step S822, it is determined that the face attribute result of the current frame is male; if not, step S824 is executed.

[0106] In step S824, the terminal device continues to determine whether the proportion of males is less than the second threshold. If it is less than the second threshold, the facial attribute result of the current frame is determined to be female in step S826; if it is not less than the second threshold, the result of the previous frame is kept unchanged in step S828, that is, the facial gender judgment result of the current frame is the same as the facial gender judgment result of the previous frame.

[0107] In step S830, the terminal device calculates the attribute credibility of the gender score corresponding to the current frame.

[0108] In step S832, if it is determined that the attribute credibility of the gender score corresponding to the current frame is greater than the corresponding minimum value in the cache queue, the cache queue is updated using the gender score corresponding to the current frame. In other words, the gender score corresponding to the current frame is added to the cache queue, and the gender score corresponding to the minimum attribute credibility in the original cache queue is removed.

[0109] After step S832, the processing from step S818 to step S828 may be performed to determine the face attribute result of the current frame.

[0110] In step S834, the terminal device may count the number of males and / or females in the cache queue.

[0111] In step S836, when the attribute output condition is satisfied based on the number of males and / or females, the terminal device outputs the final gender determination result of the face and stops updating the gender.

[0112] To summarize, based on the facial attribute determination method of the embodiment of the present disclosure, on the one hand, the present disclosure combines the facial attribute scores of multiple frames to determine the final facial attribute result. Compared with some technologies that only use a single frame, it can avoid misidentification and improve the accuracy of facial attribute recognition; on the other hand, the facial attributes finally output by the scheme of the present disclosure do not depend on the judgment results of a single frame, nor do they depend on the judgment results of all frames. The number of facial attribute scores contained in the first cache queue and the second cache queue of the present disclosure are both preset numbers. Therefore, effective filtering is achieved based on attribute credibility. That is to say, the present disclosure uses a limited cache queue to determine the final facial attributes, which has high stability, fast recognition speed and low power consumption.

[0113] It should be noted that although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0114] Furthermore, this example implementation also provides a device for determining facial attributes.

[0115] Fig. 9 FIG. 1 schematically shows a block diagram of a face attribute determination apparatus according to an exemplary embodiment of the present disclosure. Fig. 9 According to an exemplary embodiment of the present disclosure, the face attribute determination device 9 may include a score acquisition module 91, a queue processing module 93, a current result determination module 95 and a result output module 97.

[0116] Specifically, the score acquisition module 91 can be used to obtain the facial attribute score of the current frame; the queue processing module 93 can be used to, if the current frame is an image frame after a preset number of frames, use the facial attribute score of the current frame and the first cache queue to obtain the second cache queue; wherein, the first cache queue and the second cache queue both store a preset number of personal facial attribute scores, and the preset number of personal facial attribute scores in the first cache queue are determined based on the attribute credibility corresponding to the facial attribute scores of each image frame before the current frame; the current result determination module 95 can be used to, when the second cache queue includes the facial attribute score of the current frame, calculate the first statistical value of the attribute category of the face based on the facial attribute score in the second cache queue, and determine the attribute determination result of the face of the current frame according to the first statistical value; the result output module 97 can be used to determine the second statistical value of the attribute category of the face in the second cache queue, and when the second statistical value meets the attribute output condition, output the attribute determination result of the face of the current frame as the final attribute determination result of the face.

[0117] According to an exemplary embodiment of the present disclosure, the queue processing module 93 can be configured to perform: calculating the attribute credibility corresponding to the facial attribute score of the current frame; comparing the attribute credibility corresponding to the facial attribute score of the current frame with the minimum attribute credibility corresponding to the facial attribute score in the first cache queue; and obtaining a second cache queue based on the comparison result.

[0118] According to an exemplary embodiment of the present disclosure, the process of the queue processing module 93 obtaining the second cache queue based on the comparison result can be configured to execute: if the attribute credibility corresponding to the facial attribute score of the current frame is greater than the minimum attribute credibility corresponding to the facial attribute score in the first cache queue, the facial attribute score of the current frame is added to the first cache queue and the facial attribute score corresponding to the minimum attribute credibility is removed from the first cache queue to obtain the second cache queue; if the attribute credibility corresponding to the facial attribute score of the current frame is less than or equal to the minimum attribute credibility corresponding to the facial attribute score in the first cache queue, the first cache queue is used as the second cache queue.

[0119] According to an exemplary embodiment of the present disclosure, the process of the queue processing module 93 calculating the attribute credibility corresponding to the facial attribute score of the current frame can be configured to execute: calculating the absolute value of the difference between the facial attribute score of the current frame and the median of the score interval as the attribute credibility corresponding to the facial attribute score of the current frame.

[0120] According to an exemplary embodiment of the present disclosure, the current result determination module 95 can be configured to perform: calculating the first statistical value of the first attribute category of the face based on the face attribute score in the second cache queue; comparing the first statistical value of the first attribute category of the face with a first threshold; if the first statistical value of the first attribute category of the face is greater than the first threshold, determining the first attribute category as the attribute determination result of the face of the current frame.

[0121] According to an exemplary embodiment of the present disclosure, the attribute determination result includes a first attribute category and a second attribute category. The current result determination module 95 can also be configured to execute: if the first statistical value of the first attribute category of the face is less than or equal to the first threshold, the first statistical value of the first attribute category is compared with the second threshold, and the second threshold is less than the first threshold; if the first statistical value of the first attribute category is less than the second threshold, the second attribute category is determined as the attribute determination result of the face of the current frame; if the first statistical value of the first attribute category is less than or equal to the first threshold and greater than or equal to the second threshold, the attribute determination result of the face of the previous frame of the current frame is used as the attribute determination result of the face of the current frame.

[0122] According to an exemplary embodiment of the present disclosure, the process of the result output module 97 determining the second statistical value of the attribute category of the face in the second cache queue can be configured to execute: using the first statistical value of the attribute category of the face as the second statistical value of the attribute category of the face; or calculating the second statistical value of the attribute category of the face based on the attribute scores of the faces in the second cache queue, the second statistical value and the first statistical value are statistical values ​​calculated based on different statistical methods.

[0123] According to an exemplary embodiment of the present disclosure, the result output module 97 can also be configured to execute: comparing the second statistical value of the attribute category of the face with a third threshold; when the second statistical value of the attribute category of the face is greater than or equal to the third threshold, determining that the second statistical value meets the attribute output condition.

[0124] According to an exemplary embodiment of the present disclosure, the current result determination module 95 can also be configured to execute: when the first cache queue is used as the second cache queue, the attribute determination result of the face of the previous frame of the current frame is used as the attribute determination result of the face of the current frame.

[0125] According to an exemplary embodiment of the present disclosure, the score acquisition module 91 can be configured to perform: before obtaining the facial attribute score of the current frame, determine whether the final attribute determination result of the face is obtained; wherein, if it is determined that the final attribute determination result of the face is not obtained, obtain the facial attribute score of the current frame.

[0126] According to an exemplary embodiment of the present disclosure, the scoring acquisition module 91 can also be configured to execute: before determining whether the final attribute determination result of the face is obtained, determine whether the face of the current frame is a face in the face library; wherein, in the case where it is determined that the face of the current frame is a face in the face library, determine whether the final attribute determination result of the face is obtained; and in the case where it is determined that the face of the current frame is not a face in the face library, determine the attribute determination result corresponding to the face processing scenario, and use the attribute determination result corresponding to the face processing scenario as the attribute determination result of the face of the current frame.

[0127] According to an exemplary embodiment of the present disclosure, the current result determination module 95 can also be configured to execute: if the current frame is a previous preset data frame, add the face attribute score of the current frame to the initial cache queue; in the case where the current frame is the first frame of a face, determine the attribute determination result corresponding to the face processing scene, and use the attribute determination result corresponding to the face processing scene as the attribute determination result of the face of the current frame; in the case where the current frame is an image frame other than the first frame in the previous preset number of frames, calculate the first statistical value of the attribute category of the face based on the face attribute score in the initial cache queue, and determine the attribute determination result of the face of the current frame according to the first statistical value.

[0128] Since the functional modules of the face attribute determination device in the embodiment of the present disclosure are the same as those in the above-mentioned method embodiment, they will not be described in detail here.

[0129] Fig.10 Schematic diagram of an electronic device suitable for implementing the exemplary embodiment of the present disclosure is shown. The terminal device of the exemplary embodiment of the present disclosure may be configured as follows Fig.10 It should be noted that Fig.10 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0130] The electronic device of the present disclosure includes at least a processor and a memory, and the memory is used to store one or more programs. When the one or more programs are executed by the processor, the processor can implement the face attribute determination method of the exemplary embodiment of the present disclosure.

[0131] Specifically, Fig.10As shown, the electronic device 100 may include: a processor 1010, an internal memory 1021, an external memory interface 1022, a Universal Serial Bus (USB) interface 1030, a charging management module 1040, a power management module 1041, a battery 1042, an antenna 1, an antenna 2, a mobile communication module 1050, a wireless communication module 1060, an audio module 1070, a sensor module 1080, a display screen 1090, a camera module 1091, an indicator 1092, a motor 1093, a button 1094, and a Subscriber Identification Module (SIM) card interface 1095, etc. The sensor module 1080 may include a depth sensor, a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, and a bone conduction sensor, etc.

[0132] It is to be understood that the structure illustrated in the embodiment of the present disclosure does not constitute a specific limitation on the electronic device 100. In other embodiments of the present disclosure, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0133] The processor 1010 may include one or more processing units, for example, the processor 1010 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor and / or a neural network processor (NPU). Different processing units may be independent devices or integrated into one or more processors. In addition, a memory may be provided in the processor 1010 for storing instructions and data.

[0134] The electronic device 100 can realize the shooting function through the ISP, the camera module 1091, the video codec, the GPU, the display screen 1090 and the application processor. In some embodiments, the electronic device 100 may include 1 or N camera modules 1091, N is a positive integer greater than 1, and if the electronic device 100 includes N cameras, one of the N cameras is a main camera. The image frames including the current frame described in the embodiments of the present disclosure can be obtained by shooting the camera module 1091.

[0135] The internal memory 1021 can be used to store computer executable program codes, which include instructions. The internal memory 1021 can include a program storage area and a data storage area. The external memory interface 1022 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100.

[0136] The present disclosure also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or may exist independently without being assembled into the electronic device.

[0137] The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0138] Computer-readable storage media can send, propagate or transmit programs for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0139] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by an electronic device, the electronic device implements the method described in the embodiments of the present disclosure.

[0140] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0141] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, and the units described may also be arranged in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.

[0142] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0143] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0144] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0145] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing what is disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and embodiments are to be considered merely as exemplary, and the true scope and spirit of the present disclosure are indicated by the claims.

[0146] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for determining face attributes, characterized in that: include: Get the facial attribute score of the current frame; If the current frame is an image frame after a preset number of frames, a second cache queue is obtained by using the facial attribute score of the current frame and the first cache queue; wherein the first cache queue and the second cache queue both store the preset number of personal facial attribute scores, and the preset number of personal facial attribute scores in the first cache queue are determined according to the attribute credibility corresponding to the facial attribute scores of each image frame before the current frame; In a case where the second cache queue includes the face attribute scores of the current frame, calculating a first statistical value of the attribute category of the face based on the face attribute scores in the second cache queue, and determining an attribute determination result of the face of the current frame according to the first statistical value; Determine a second statistical value of the attribute category of the face in the second cache queue, and when the second statistical value meets the attribute output condition, output the attribute determination result of the face in the current frame as the final attribute determination result of the face.

2. The method for determining facial attributes according to claim 1, characterized in that: Obtaining a second cache queue using the face attribute score of the current frame and the first cache queue, including: Calculating the attribute credibility corresponding to the face attribute score of the current frame; Compare the attribute credibility corresponding to the face attribute score of the current frame with the minimum attribute credibility corresponding to the face attribute score in the first cache queue; Based on the comparison result, the second cache queue is obtained.

3. The method for determining facial attributes according to claim 2, characterized in that: Based on the comparison result, the second cache queue is obtained, including: If the attribute credibility corresponding to the facial attribute score of the current frame is greater than the minimum attribute credibility corresponding to the facial attribute score in the first cache queue, then adding the facial attribute score of the current frame to the first cache queue and removing the facial attribute score corresponding to the minimum attribute credibility from the first cache queue to obtain the second cache queue; If the attribute credibility corresponding to the facial attribute score of the current frame is less than or equal to the minimum attribute credibility corresponding to the facial attribute score in the first cache queue, the first cache queue is used as the second cache queue.

4. The method for determining facial attributes according to claim 2, characterized in that: Calculating the attribute credibility corresponding to the face attribute score of the current frame includes: The absolute value of the difference between the facial attribute score of the current frame and the median of the score interval is calculated as the attribute credibility corresponding to the facial attribute score of the current frame.

5. The method for determining facial attributes according to claim 1, characterized in that: Calculating a first statistical value of the attribute category of the face based on the face attribute scores in the second cache queue, and determining an attribute determination result of the face of the current frame according to the first statistical value, including: Calculating a first statistical value of a first attribute category of the face based on the face attribute scores in the second cache queue; Comparing a first statistical value of a first attribute category of the human face with a first threshold; If the first statistical value of the first attribute category of the human face is greater than the first threshold, the first attribute category is determined as the attribute determination result of the human face in the current frame.

6. The method for determining facial attributes according to claim 5, characterized in that: The attribute determination result includes the first attribute category and the second attribute category; wherein, based on the face attribute scores in the second cache queue, a first statistical value of the attribute category of the face is calculated, and the attribute determination result of the face of the current frame is determined according to the first statistical value, and further includes: If the first statistical value of the first attribute category of the face is less than or equal to the first threshold, comparing the first statistical value of the first attribute category with a second threshold, the second threshold being less than the first threshold; If the first statistical value of the first attribute category is less than the second threshold, determining the second attribute category as the attribute determination result of the human face in the current frame; If the first statistical value of the first attribute category is less than or equal to the first threshold and greater than or equal to the second threshold, the attribute determination result of the face in the previous frame of the current frame is used as the attribute determination result of the face in the current frame.

7. The method for determining facial attributes according to claim 1, characterized in that: Determining a second statistical value of the attribute category of the face in the second cache queue includes: using the first statistical value of the attribute category of the human face as the second statistical value of the attribute category of the human face; or Based on the facial attribute scores in the second cache queue, a second statistical value of the attribute category of the face is calculated, and the second statistical value and the first statistical value are statistical values ​​calculated based on different statistical methods.

8. The method for determining facial attributes according to claim 7, characterized in that: The method for determining face attributes further comprises: Comparing the second statistical value of the attribute category of the face with a third threshold; When the second statistical value of the attribute category of the face is greater than or equal to the third threshold, it is determined that the second statistical value meets the attribute output condition.

9. The method for determining facial attributes according to claim 3, characterized in that: The method for determining face attributes further comprises: When the first cache queue is used as the second cache queue, the attribute determination result of the human face in the previous frame of the current frame is used as the attribute determination result of the human face in the current frame.

10. The method for determining facial attributes according to claim 1, characterized in that: Before obtaining the facial attribute score of the current frame, the facial attribute determination method further includes: Determining whether a final attribute determination result of the face is obtained; Wherein, when it is determined that the final attribute determination result of the face is not obtained, the face attribute score of the current frame is obtained.

11. The method for determining facial attributes according to claim 10, characterized in that: Before determining whether a final attribute determination result of the face is obtained, the face attribute determination method further includes: Determine whether the face in the current frame is a face in a face database; Wherein, when it is determined that the face in the current frame is a face in the face database, it is determined whether a final attribute determination result of the face is obtained; and When it is determined that the face in the current frame is not a face in the face library, an attribute determination result corresponding to a face processing scene is determined, and the attribute determination result corresponding to the face processing scene is used as the attribute determination result of the face in the current frame.

12. The method for determining facial attributes according to any one of claims 1 to 11, characterized in that: The method for determining face attributes further comprises: If the current frame is a previously preset data frame, adding the facial attribute score of the current frame to the initial cache queue; In the case where the current frame is the first frame of the face, determining an attribute determination result corresponding to a face processing scene, and using the attribute determination result corresponding to the face processing scene as an attribute determination result of the face of the current frame; In the case that the current frame is the remaining image frames among the previous preset number of frames except the first frame, a first statistical value of the attribute category of the face is calculated based on the face attribute score in the initial cache queue, and the attribute determination result of the face of the current frame is determined according to the first statistical value.

13. A facial attribute determination device, characterized in that: include: A score acquisition module is used to obtain the facial attribute score of the current frame; A queue processing module, configured to obtain a second cache queue using the facial attribute score of the current frame and the first cache queue if the current frame is an image frame after a preset number of frames; wherein the first cache queue and the second cache queue both store the preset number of facial attribute scores of individuals, and the preset number of facial attribute scores of individuals in the first cache queue are determined according to the attribute credibility corresponding to the facial attribute scores of each image frame before the current frame; a current result determination module, configured to calculate a first statistical value of a face attribute category based on the face attribute scores in the second cache queue when the second cache queue includes the face attribute scores of the current frame, and determine a face attribute determination result of the current frame according to the first statistical value; A result output module is used to determine a second statistical value of the attribute category of the face in the second cache queue, and when the second statistical value meets the attribute output condition, output the attribute determination result of the face in the current frame as the final attribute determination result of the face.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for determining facial attributes as described in any one of claims 1 to 12 is implemented.

15. An electronic device, characterized in that: include: processor; A memory for storing one or more programs, which, when executed by the processor, enables the processor to implement the method for determining facial attributes as described in any one of claims 1 to 12.

Citation Information

Patent Citations

  • Gender identification method and device based on facial images

    CN104463142A

  • Image processing method, apparatus, storage medium, and electronic device

    CN109086680A