Standard face photo recognition method and device based on video
By automatically identifying and filtering standard face photos in videos, it solves the problems of selecting multiple face photos and evaluating video frame quality in the financial field, achieving efficient and accurate business review.
Patent Information
- Application Number
- CN202410844496.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2024-09-06
AI Technical Summary
Existing technology cannot effectively handle the selection of multiple face photos and the quality assessment of face photos in dynamic video frames in business review in the financial field, resulting in manual screening that is time-consuming and may affect review efficiency and accuracy.
Provide a video-based standard face photo recognition method. By intercepting multiple face photos during the video recording process, extract standard face photos according to preset standards, perform face detection and feature extraction, and calculate face integrity, The quality scores of angle and size are used to filter out photos that meet the requirements using cosine distance and tabu distance.
It significantly reduces the workload of manual screening, improves the accuracy and efficiency of business review, and ensures that the quality of the selected photos meets the standards.
Smart Images

Figure CN118609191A
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing and may also be applicable to the financial field, and specifically to a video-based standard face recognition method and device. Background Art
[0002] Existing face detection and recognition technologies mainly rely on the convolutional neural network (CNN) algorithm. This algorithm can accurately locate the position and boundaries of the face in the image and identify the feature points of the face. Specifically, the CNN algorithm gradually extracts feature information from the image through a combination of multiple layers of convolution, pooling, and fully connected layers, thereby achieving face detection and recognition. These technologies have been widely used in various applications, including security monitoring, identity authentication, and face unlocking of smart devices.
[0003] However, in some specific fields, such as the financial field, where the quality of face photos is extremely high, simple face detection and recognition cannot meet the actual needs. Business review usually requires capturing multiple face photos from the video and selecting the standard frontal face photos that meet the requirements for review. The existing technical solutions have obvious shortcomings in dealing with this demand.
[0004] Specifically, existing technologies usually only focus on face detection and recognition in a single photo, and lack a selection mechanism for multiple photos. In addition, dozens or even hundreds of face photos may be generated during video recording, and the faces in these photos may vary due to factors such as angle, lighting, and expression. Without an effective selection mechanism, manually screening out standard frontal photos is not only time-consuming and labor-intensive, but may also result in poor quality of selected photos due to human factors, affecting review efficiency and accuracy.
[0005] Secondly, the existing technology lacks a targeted method to evaluate and compare the quality of face photos in different frames when processing dynamic video frames. Business audits in the financial field have high requirements for photo quality. It is necessary to ensure that the facial features in the selected photos are clear and visible and meet certain standards, such as frontal face angle, uniform lighting, and feature integrity. The current CNN detection algorithm cannot provide enough information to meet these requirements. Summary of the invention
[0006] In response to the problems in the prior art, the present application provides a video-based standard face photo recognition method and device, which can automatically select a standard frontal face photo from multiple face photos captured in the video, which can not only significantly reduce the workload of manual screening, but also improve the accuracy of business review.
[0007] In order to solve at least one of the above problems, the present application provides the following technical solutions:
[0008] According to a first aspect of an embodiment of the present application, the present application provides a video-based standard face photo recognition method, comprising:
[0009] During the video recording process, a plurality of face photos are captured, and according to the closeness of the plurality of face photos to the preset standard face photos, a set of photos at the standard face photo stage is extracted from the plurality of face photos, wherein the standard face photos represent face photos whose face integrity, face angle, eye size and face size are all within a preset range;
[0010] Performing face detection on each photo in the photo set at the standard face photo stage to extract facial features corresponding to each photo;
[0011] For each of the photos, determining a quality score of each attribute value of the face photo according to the facial features, the attribute values including face completeness, face angle, eye size, and face size;
[0012] The standard face photo is determined according to the distance between the quality score vector of each attribute value of each photo and the quality score vector of each attribute value of a preset standard face.
[0013] According to any embodiment of the present application, extracting a set of photos in the standard face photo stage from the multiple face photos according to the proximity between the multiple face photos and the standard face photo, includes:
[0014] Dividing the plurality of face photos into a plurality of photo sets on an even basis based on video recording time or the number of photos;
[0015] For each photo set, a face photo is randomly selected, and the photo set containing the face photo closest to the standard face photo is determined as the photo set in the standard face photo stage.
[0016] According to any implementation manner of the present application, performing face detection on each photo in the photo set in the standard face photo stage to extract facial features corresponding to each photo respectively includes:
[0017] Based on the facial feature estimation, the coordinate points corresponding to the eyes, nose, mouth and face frame in each photo are extracted respectively.
[0018] According to any implementation manner of the present application, determining the quality score of the face integrity according to the face features includes:
[0019] Determining the detectability of the eyes, nose, and mouth in the face photo, respectively, according to the coordinate points of the eyes, nose, and mouth in each photo;
[0020] The face integrity is scored according to the detectability to obtain a corresponding quality score, wherein the detectability is positively correlated with the scoring score.
[0021] According to any implementation manner of the present application, determining the quality score of the facial angle according to the facial features includes:
[0022] Calculate the tilt and rotation angle of the face photo based on the PnP algorithm according to the coordinate points of the eyes, nose and mouth in each photo;
[0023] The face angle is scored according to the tilt and rotation angles to obtain a corresponding quality score, wherein the tilt and rotation angles are negatively correlated with the scored scores.
[0024] According to any implementation manner of the present application, the determining the quality score of the eye size according to the facial features includes:
[0025] Determining the distance between the upper and lower eyelids in the face photo according to the coordinate points of the eyes in each photo;
[0026] When the absolute value of the distance between the upper and lower eyelids is not zero, the size of the two eyes is scored to obtain a corresponding quality score.
[0027] According to any implementation manner of the present application, determining the quality score of the face size according to the face features includes:
[0028] Determining the proportion of the area of the face frame in the face photo according to the coordinate points of the face frame in each photo;
[0029] The ratio is compared with a preset standard ratio to assign a score to the face size to obtain a corresponding quality score, wherein the degree of closeness between the ratio and the preset standard ratio is positively correlated with the assigned score.
[0030] According to any embodiment of the present application, before determining the standard face photo according to the distance between the quality score vector of each attribute value of each photo and the quality score vector of each attribute value of the preset standard face, it also includes:
[0031] The vector value of the quality score vector of each attribute value of the standard face is used as the standard point, and the vector domain that meets the business requirements is determined according to the taboo distance;
[0032] The photo set at the standard face photo stage is screened based on the vector domain and the quality score vector of each attribute value of each photo.
[0033] According to any embodiment of the present application, determining the standard face photo according to the distance between the quality score vector of each attribute value of each photo and the quality score vector of each attribute value of a preset standard face includes:
[0034] Determine the cosine distance between the quality score vector of each attribute value of each photo and the quality score vector of each attribute value of a standard face, and determine the face photo with the shortest cosine distance as the standard face photo;
[0035] In response to the existence of at least two face photos with the same cosine distance, based on a preset attribute value priority, a face photo with a higher attribute priority is determined as the standard face photo.
[0036] According to a second aspect of the embodiments of the present application, the present application provides a video-based standard face photo recognition device, comprising:
[0037] The photo set acquisition module is used to: capture multiple face photos during video recording, and extract a photo set at the standard face photo stage from the multiple face photos according to the proximity between the multiple face photos and the preset standard face photos, wherein the standard face photos represent face photos whose face integrity, face angle, eye size and face size are all within a preset range;
[0038] The feature extraction module is used to: perform face detection on each photo in the photo set at the standard face photo stage, so as to extract the face features corresponding to each photo;
[0039] A score determination module, used to: for each of the photos, determine the quality score of each attribute value of the face photo according to the facial features, the attribute values including face completeness, face angle, eye size and face size;
[0040] The standard determination module is used to determine the standard face photo according to the distance between the quality score vector of each attribute value of each photo and the quality score vector of each attribute value of a preset standard face.
[0041] According to any implementation manner of the present application, the photo collection acquisition module is specifically used to:
[0042] Dividing the plurality of face photos into a plurality of photo sets on an even basis based on video recording time or the number of photos;
[0043] For each photo set, a face photo is randomly selected, and the photo set containing the face photo closest to the standard face photo is determined as the photo set in the standard face photo stage.
[0044] According to any implementation of the present application, the feature extraction module is specifically used for:
[0045] Based on the facial feature estimation, the coordinate points corresponding to the eyes, nose, mouth and face frame in each photo are extracted respectively.
[0046] According to any implementation manner of the present application, the score determination module determines the quality score of the face integrity according to the face features, specifically for:
[0047] Determining the detectability of the eyes, nose, and mouth in the face photo, respectively, according to the coordinate points of the eyes, nose, and mouth in each photo;
[0048] The face integrity is scored according to the detectability to obtain a corresponding quality score, wherein the detectability is positively correlated with the scoring score.
[0049] According to any implementation manner of the present application, the score determination module determines the quality score of the face angle according to the face feature, specifically for:
[0050] Calculate the tilt and rotation angle of the face photo based on the PnP algorithm according to the coordinate points of the eyes, nose and mouth in each photo;
[0051] The face angle is scored according to the tilt and rotation angles to obtain a corresponding quality score, wherein the tilt and rotation angles are negatively correlated with the scored scores.
[0052] According to any implementation manner of the present application, the score determination module determines the quality score of the eye size according to the facial features, specifically for:
[0053] Determining the distance between the upper and lower eyelids in the face photo according to the coordinate points of the eyes in each photo;
[0054] When the absolute value of the distance between the upper and lower eyelids is not zero, the size of the two eyes is scored to obtain a corresponding quality score.
[0055] According to any implementation manner of the present application, the score determination module determines the quality score of the face size according to the face features, specifically for:
[0056] Determining the proportion of the area of the face frame in the face photo according to the coordinate points of the face frame in each photo;
[0057] The ratio is compared with a preset standard ratio to assign a score to the face size to obtain a corresponding quality score, wherein the degree of closeness between the ratio and the preset standard ratio is positively correlated with the assigned score.
[0058] According to any embodiment of the present application, a screening module is also included, which is specifically used for:
[0059] The vector value of the quality score vector of each attribute value of the standard face is used as the standard point, and the vector domain that meets the business requirements is determined according to the taboo distance;
[0060] The photo set at the standard face photo stage is screened based on the vector domain and the quality score vector of each attribute value of each photo.
[0061] According to any implementation of the present application, the standard determination module is specifically used for:
[0062] Determine the cosine distance between the quality score vector of each attribute value of each photo and the quality score vector of each attribute value of a standard face, and determine the face photo with the shortest cosine distance as the standard face photo;
[0063] In response to the existence of at least two face photos with the same cosine distance, based on a preset attribute value priority, a face photo with a higher attribute priority is determined as the standard face photo.
[0064] According to the third aspect of the embodiments of the present application, the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the video-based standard face recognition method are implemented.
[0065] According to a fourth aspect of an embodiment of the present application, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the video-based standard face recognition method.
[0066] According to a fifth aspect of the embodiments of the present application, the present application provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the video-based standard face recognition method.
[0067] It can be seen from the above technical scheme that the present application provides a video-based standard face photo recognition method and device, which captures multiple face photos during video recording, and extracts a photo set at the standard face photo stage from the multiple face photos according to the degree of proximity between the multiple face photos and the preset standard face photos, wherein the standard face photos represent face photos whose face integrity, face angle, eye size and face size are all within a preset range; performs face detection on each photo in the photo set at the standard face photo stage to extract the face features corresponding to each photo respectively; for each photo, determines the quality score of each attribute value of the face photo according to the face features, and the attribute values include face integrity, face angle, eye size and face size; determines the standard face photo according to the distance between the quality score vector of each attribute value of each photo and the quality score vector of each attribute value of the preset standard face; can automatically select a standard frontal face photo from the multiple face photos captured in the video, which can not only significantly reduce the workload of manual screening, but also improve the accuracy of business review. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0069] Figure 1 This is one of the flow charts of the standard face recognition method based on video in the embodiment of the present application;
[0070] Figure 2 This is a second flow chart of a standard face recognition method based on video in an embodiment of the present application;
[0071] Figure 3 The third flowchart of the standard face recognition method based on video in the embodiment of the present application;
[0072] Figure 4 This is a fourth flow chart of a standard face recognition method based on video in an embodiment of the present application;
[0073] Figure 5 FIG5 is a flowchart of a standard face recognition method based on video in an embodiment of the present application;
[0074] Figure 6 This is a sixth flow chart of a standard face recognition method based on video in an embodiment of the present application;
[0075] Figure 7FIG7 is a flowchart of a standard face recognition method based on video in an embodiment of the present application;
[0076] Figure 8 FIG8 is a flowchart of a standard face recognition method based on video in an embodiment of the present application;
[0077] Fig. 9 FIG9 is a flowchart of a standard face recognition method based on video in an embodiment of the present application;
[0078] Fig.10 FIG10 is a flowchart of a standard face recognition method based on video in an embodiment of the present application;
[0079] Fig.11 is a structural diagram of a video-based standard face photo recognition device in an embodiment of the present application;
[0080] Fig.12 It is a schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0081] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0082] The acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.
[0083] The information collected in the technical solution of this application is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data comply with the relevant laws, regulations and standards of relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0084] In addition, this application provides users with corresponding operation entrances for them to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered.
[0085] Taking into account the current lack of processing for the use scenario of selecting a standard face photo from multiple frontal face photos, the present application provides a video-based standard face photo recognition method and device, which captures multiple frontal face photos based on video recording, and automatically selects a standard frontal face photo from the multiple face photos captured from the video through an automatic facial attribute decision algorithm. This can not only significantly reduce the workload of manual screening, but also improve the accuracy of business review.
[0086] In order to automatically select a standard frontal face photo from multiple face photos captured in a video, not only can the workload of manual screening be significantly reduced, but also the accuracy of business review can be improved, the present application provides an embodiment of a standard face photo recognition method based on video, see Figure 1 The video-based standard face recognition method specifically includes the following contents:
[0087] Step S101: During the video recording process, a plurality of face photos are captured, and according to the degree of proximity between the plurality of face photos and preset standard face photos, a set of photos at the standard face photo stage is extracted from the plurality of face photos, wherein the standard face photos represent face photos whose face completeness, face angle, eye size and face size are all within a preset range.
[0088] Among them, multiple face photos can be automatically captured during video recording. These photos may contain facial images of different angles, lighting and expressions. By calculating the degree of proximity between each photo and a preset standard face photo, it can be determined which stage (before, during, and after recording) of the photo is more likely to contain a standard face photo. Based on these calculation results, a set of photos containing potential standard face photos is extracted as a candidate set for further processing. Exemplarily, the preset range is used to measure whether the photo meets the standard. For example, the completeness of the face requires that both eyes, nose, and mouth are clearly visible; the angle of the face requires that the tilt and rotation angles are close to 0 degrees; the size of both eyes is required to appear normal and clear; the size of the face is required to occupy about 2 / 3 of the photo.
[0089] Step S102: performing face detection on each photo in the photo set at the standard face photo stage to extract facial features corresponding to each photo.
[0090] In the determined photo set, each photo is subjected to detailed face detection. This step uses advanced algorithms (such as face landmark estimation) to identify and extract key feature points of the face, including eyes, nose, mouth, and face outline. These feature points will be used for subsequent quality assessment to ensure that the facial features in each photo are accurately identified and recorded.
[0091] Step S103: for each of the photos, determine the quality score of each attribute value of the face photo according to the facial features, the attribute values including face completeness, face angle, eye size and face size.
[0092] By analyzing the extracted facial feature points, the quality score of each photo is calculated. The specific attribute values include: face completeness (whether the eyes, nose and mouth can be clearly identified), face angle (angle of head tilt and rotation), eye size (distance between upper and lower eyelids) and face size (proportion of the face in the photo). Each attribute value is assigned a quality score to quantify the performance of the attribute in the photo.
[0093] Step S104: determining a standard face photo according to the distance between the quality score vector of each attribute value of each photo and the quality score vector of each attribute value of a preset standard face.
[0094] The quality scores of each attribute value of each photo are combined into a vector and compared with the attribute value quality score vector of the standard face. By calculating the distance between these vectors, it is determined which photo's features are closest to the standard face photo. The smaller the distance, the higher the quality of the photo. Finally, the photo with the smallest distance is selected as the standard face photo for business review or other application scenarios.
[0095] From the above description, it can be seen that the video-based standard face photo recognition method provided in the embodiment of the present application can capture multiple frontal face photos based on video recording, and automatically select standard frontal face photos from the multiple face photos captured from the video through an automatic facial attribute decision algorithm. This can not only significantly reduce the workload of manual screening, but also improve the accuracy of business review.
[0096] In one embodiment of the video-based standard face recognition method of the present application, see Figure 2 , extracting a set of photos at the standard face photo stage from the plurality of face photos according to the proximity between the plurality of face photos and the standard face photo, comprises:
[0097] Step S101A: Divide the plurality of face photos into a plurality of photo sets on an even basis based on the video recording time or the number of photos;
[0098] Step S101B: For each photo set, a face photo is randomly selected, and the photo set containing the face photo closest to the standard face photo is determined as the photo set in the standard face photo stage.
[0099] Exemplarily, first, the entire time period of video recording can be divided into three stages: the front, middle and back. The division of these three stages can be performed in two ways: one is to divide it into three equal parts according to the recording time to ensure that the time length of each stage is equal. For example, if the total video recording time is 30 minutes, then each stage is the first 10 minutes, the middle 10 minutes and the last 10 minutes respectively; the other is to divide it into three equal parts according to the order of the number of collected photos to ensure that each stage contains a similar number of photos. For example, if a total of 300 photos are collected during the entire video recording process, then each stage contains the first 100 photos, the middle 100 photos and the last 100 photos respectively.
[0100] After the division was completed, one photo was randomly selected from each stage for further analysis. This random selection method helped to avoid selection bias that might be caused by fixed intervals or other preferences, thereby ensuring that the selected photos were representative.
[0101] In order to determine the stage where the standard face photo is located, it is necessary to compare the distance between the randomly selected photos in the first, middle and last stages and the standard face photo. The smaller the distance, the closer the photo quality is to the standard face photo. Therefore, the stage where the photo closest to the standard face photo is located is considered to have a standard face photo in this stage.
[0102] The above steps can effectively identify the stage of standard face photos during the recording process, which not only improves the representativeness of photo selection, but also ensures the high quality of the selected photos through standardized quality calculation, providing a reliable basis for subsequent calculations.
[0103] In one embodiment of the video-based standard face photo recognition method of the present application, performing face detection on each photo in the photo set at the standard face photo stage to extract facial features corresponding to each photo respectively includes:
[0104] Based on the facial feature estimation, the coordinate points corresponding to the eyes, nose, mouth and face frame in each photo are extracted respectively.
[0105] When a certain stage contains standard face photos, detailed face detection is performed on each photo in the photo set of that stage to obtain its facial features. These feature points include the corresponding coordinate points of the eyes, nose, mouth and face frame. The key points of the face are accurately identified through the face landmark estimation algorithm.
[0106] Specifically, the algorithm is able to detect and identify 68 facial feature points, see Figure 3 :
[0107] Chin line: There are 17 points, numbered from 1 to 17, arranged along the outline of the chin to outline the outer contour of the face.
[0108] Left eyebrow: There are 5 points in total, numbered from 18 to 22, marking the position of the left eyebrow.
[0109] Right eyebrow: There are 5 points in total, numbered from 23 to 27, marking the position of the right eyebrow.
[0110] Nose bridge: There are 4 points, numbered from 28 to 31, arranged along the bridge of the nose.
[0111] Nose: There are 5 points, numbered from 32 to 36, which indicate the shape of the nose.
[0112] Left eye: 6 points, numbered from 37 to 42, arranged around the left eye contour.
[0113] Right eye: 6 points, numbered from 43 to 48, arranged around the right eye contour.
[0114] Outer lips: There are 12 points, numbered 49 to 60, that outline the outer lips.
[0115] Inner lips: There are 8 points, numbered from 61 to 68, which outline the inner lips.
[0116] By detecting these feature points, we can evaluate the completeness, angle, size and other attributes of the facial features in each photo, and then calculate the facial photo quality score for each photo, ensuring that the final selected facial photos are of high quality and meet the strict requirements of business audits.
[0117] In one embodiment of the video-based standard face recognition method of the present application, see Figure 4 , the determining of the quality score of the face integrity according to the face features includes:
[0118] Step S103A: determining the detectability of the eyes, nose and mouth in the face photo according to the coordinate points of the eyes, nose and mouth in each photo;
[0119] Step S103B: Assigning a score to the face integrity according to the detectability to obtain a corresponding quality score, wherein the detectability is positively correlated with the assigned score.
[0120] Face integrity is one of the important attributes for evaluating the quality of face photos. The calculation of face integrity is based on the relevant coordinate points of the eyes, nose and mouth. The detection of these coordinate points is used to evaluate the integrity of the face, thereby obtaining the quality score Q1 of the face photo.
[0121] For example, if the three main features of the face in the photo can be clearly detected, namely, eyes, nose and mouth, then the completeness of the photo is considered standard, and the corresponding standard value is Q S1 Specifically, when both eyes, nose and mouth are successfully detected, the quality score Q1 of the photo reaches the highest value. On the contrary, if these key features are missing to a greater extent, the quality score Q1 of the photo will decrease accordingly.
[0122] Optional, left eye, right eye, nose, mouth: the full score of each feature is 1 point. When all features are successfully detected, the standard standard value of face completeness is Q S1 A score of 4 means that the face in the photo is complete and all key feature points are clearly visible.
[0123] If a feature (such as left eye, right eye, nose, or mouth) is not detected, the score for that feature is 0.
[0124] If a feature is only partially displayed, a score is given based on the proportion of the feature displayed. For example, if a feature (such as a mouth) is only half displayed, the score for that feature is 0.5 points.
[0125] This scoring method can quantitatively evaluate the face integrity of each photo based on the detection of the eyes, nose and mouth. Ultimately, the face integrity quality score Q1 reflects the completeness of the facial features in the photo. The higher the score, the more complete the facial features in the photo and the better the quality.
[0126] In one embodiment of the video-based standard face recognition method of the present application, see Figure 5 , the determining the quality score of the face angle according to the face feature comprises:
[0127] Step S103C: Calculating the tilt and rotation angles of the face photo based on the PnP algorithm according to the coordinate points of the eyes, nose, and mouth in each photo;
[0128] Step S103D: Assigning a score to the facial angle according to the tilt and rotation angle to obtain a corresponding quality score, wherein the tilt and rotation angle are negatively correlated with the assigned score.
[0129] Face angle is another important attribute for evaluating the quality of face photos. The calculation of face angle is based on the relevant coordinate points of the eyes, nose and mouth, and the perspective-n-point (PnP) algorithm is used to calculate the tilt angle and rotation angle of the face in the photo, thereby obtaining the quality score Q2 of the face photo.
[0130] For example, the standard face angle means that the tilt angle (looking up or looking down) and rotation angle (front left rotation or right rotation) of the face are both 0 degrees. In this case, the face is in the front direction, which meets the standard value Q S2 The larger the tilt and rotation angles, the lower the photo quality score Q2 will be, as it will affect the recognizability of the face and the overall quality of the photo.
[0131] The tilt angle range is from 0 to 90 degrees, indicating the range from the face facing the camera completely to the maximum tilt or tilt; the rotation angle range is from 0 to 90 degrees, indicating the range from the face facing the camera completely to the maximum left or right rotation.
[0132] Optional, each degree of angle corresponds to 1 point. When the tilt angle or rotation angle is 0 degrees, the photo score is 90 points, indicating that the face is completely facing forward and the quality is the best.
[0133] For every 1 degree increase, the score decreases by 1 point. For example, when the tilt angle or rotation angle is 1 degree, the score is 89 points; when the angle reaches 90 degrees, the score is 0 points, indicating that the face is seriously deviated from the front and the quality is the lowest.
[0134] The face angle quality score Q2 is the percentage of the sum of the tilt angle score and the rotation angle score. The formula is Q2 = (tilt angle score + rotation angle score) / 100.
[0135] Standard value Q S2 It is 1.8, corresponding to the case of a tilt angle of 0 degrees and a rotation angle of 0 degrees, indicating that the face in the photo is facing completely forward.
[0136] This calculation method can accurately evaluate the angle of the face in each photo and quantify its impact on the quality of the photo. The closer the angle is to 0 degrees, the straighter the face is, and the higher the quality of the photo, the higher the score, ensuring that photos with the best face angle can be quickly identified from a large number of photos.
[0137] In one embodiment of the video-based standard face recognition method of the present application, see Figure 6 , the determining the quality score of the eye size according to the facial features includes:
[0138] Step S103E: determining the distance between the upper and lower eyelids in the face photo according to the coordinate points of the eyes in each photo;
[0139] Step S103F: When the absolute value of the distance between the upper and lower eyelids is not zero, scoring the size of the eyes is performed to obtain a corresponding quality score.
[0140] Eye size is another important attribute for evaluating the quality of face photos. The eye size is calculated based on the coordinate points of the eyes, and the quality score Q3 of the face photo is obtained by analyzing the distance between the upper and lower eyelids of the eyes. This evaluation method can help determine whether the eyes of the face in the photo are clearly visible and displayed normally.
[0141] Standard binocular size standard value Q S3 It means that the absolute value of the distance between the upper and lower eyelids of both eyes is not 0, which means that both eyes are clear, complete and displayed normally in the photo.
[0142] First, the feature points of both eyes in the photo are detected and identified, and the positions of the upper eyelid and the lower eyelid are located respectively.
[0143] The distance between the upper and lower eyelids of each eye is calculated by the detected coordinate points. If the absolute value of the distance between the upper and lower eyelids is not 0, it means that the eyes are displayed normally in the photo.
[0144] Optionally, if the calculated absolute value of the upper and lower eyelid distance is not 0, the eye gets 1 point, indicating that the eye is clearly visible in the photo; if the calculated absolute value of the upper and lower eyelid distance is 0, the eye gets 0 point, indicating that the eye is not visible in the photo or is not fully displayed.
[0145] The sum of the scores for the right eye is the binocular quality score Q3. S3 A score of 2 means that both the left eye and the right eye get 1 point, indicating that both eyes are clearly visible in the photo and appear normal.
[0146] When both the left eye and the right eye meet the conditions, Q3=2, indicating the standard size of both eyes in the photo.
[0147] If only one eye meets the condition, Q3=1; if neither eye meets the condition, Q3=0.
[0148] This calculation method can accurately evaluate the size of the eyes and their display in each photo, and then quantify their impact on the photo quality. The higher the eye size quality score Q3, the clearer the eyes in the photo are and the better the quality is, ensuring that photos with the best eye size can be quickly identified from a large number of photos.
[0149] In one embodiment of the video-based standard face recognition method of the present application, see Figure 7 , the determining the quality score of the face size according to the face features includes:
[0150] Step S103G: determining the proportion of the area of the face frame in the face photo according to the coordinate points of the face frame in each photo;
[0151] Step S103H: Compare the ratio with a preset standard ratio to assign a score to the face size and obtain a corresponding quality score, wherein the degree of closeness between the ratio and the preset standard ratio is positively correlated with the assigned score.
[0152] Face size is one of the important attributes for evaluating the quality of face photos. The face size is calculated based on the coordinate points related to the face frame, and the quality score Q4 of the face photo is obtained by analyzing the proportion of the face in the entire photo. This evaluation method can help determine whether the size of the face in the photo is appropriate, that is, whether the face occupies an appropriate proportion in the photo, neither too big nor too small.
[0153] For example, the standard face size standard value Q S4 It refers to the ratio of the face to the photo. This means that the face takes up most of the photo space, making the facial features clearly visible while minimizing background interference.
[0154] First, the face frame in the photo is detected and identified, the coordinate points of the face frame are obtained, and the area ratio of the face in the photo is calculated through the coordinate points of the face frame.
[0155] Optional, standard value Q S4 The ratio is 2 / 3, that is, the face occupies 2 / 3 of the photo. This ratio is considered to be the best ratio, which can ensure that the facial features are clear while avoiding the face being too big or too small.
[0156] The greater the absolute value of the distance between the actual proportion of the face in the photo and the standard value of the picture proportion, the lower the face photo quality score Q4. In other words, the closer the actual proportion is to 2 / 3, the higher the score; the greater the distance, the lower the score.
[0157] The quality score Q4 is determined based on the calculated face ratio. The smaller the distance between the actual ratio and 2 / 3, the higher the quality score, and vice versa. For example, assuming that the actual face ratio is 0.6 (i.e. 60%) and the distance from the standard value of 2 / 3 (i.e. 66.67%) is 0.0667, the face size quality score Q4 of the photo is high.
[0158] The calculation formula is: Q4 = 1-|actual proportion-2 / 3|. When the actual proportion is 2 / 3, Q4 = 1, indicating standard quality; when the actual proportion deviates from 2 / 3, Q4 gradually decreases.
[0159] This calculation method can accurately evaluate the size of the face in each photo and its proportion in the photo, and then quantify its impact on the photo quality. The higher the face size quality score Q4, the more appropriate the face proportion in the photo and the better the quality, ensuring that photos with the best face size can be quickly identified from a large number of photos.
[0160] In one embodiment of the video-based standard face recognition method of the present application, see Figure 8 , before determining the standard face photo according to the distance between the quality score vector of each attribute value of each photo and the quality score vector of each attribute value of the preset standard face, it also includes:
[0161] Step S105: using the vector value of the quality score vector of each attribute value of the standard face as the standard point, and determining the vector domain that meets the business requirements according to the taboo distance;
[0162] Step S106: Based on the vector domain and the quality score vector of each attribute value of each photo, the photo set in the standard face photo stage is screened.
[0163] After calculating the facial attributes of each photo (face completeness Q1, face angle Q2, eye size Q3 and face size Q4), these quality scores are combined into a vector S i , that is, S i (Q1,Q2,Q3,Q4), i∈[1,N], where i represents the number of the photo.
[0164] The standard face is a high-quality reference photo, and the quality scores of its attribute values have been accurately measured and defined. The quality score vector of the standard face is S(Q S1 ,Q S2 ,Q S3 ,Q S4 ), where Q S1 , Q S2 , Q S3 and Q S4 They represent the standard values of face completeness, face angle, eye size and face size respectively.
[0165] In order to filter out photos that meet the business review requirements, a taboo distance can be used to measure the quality score Q of each attribute value of each photo. j With the standard value Q sj The difference between.
[0166] For each photo, calculate the quality score Q of each attribute value one by one j With the standard value Q sj The absolute difference between |Q j -Q sj |. If the difference is within the forbidden distance Td j range, i.e. |Q j -Q sj |<=Td j (j∈[1,4]), then continue to calculate the quality score of the next attribute value; otherwise, eliminate the photo. Tdj It is a preset threshold, indicating that the photo attribute quality score is within the forbidden distance that meets the business review.
[0167] After the above-mentioned taboo distance screening, the remaining photos are all photos that meet the business review requirements.
[0168] In one embodiment of the video-based standard face recognition method of the present application, see Fig. 9 The step of determining the standard face photo according to the distance between the quality score vector of each attribute value of each photo and the quality score vector of each attribute value of a preset standard face includes:
[0169] Step S104A: determining the cosine distance between the quality score vector of each attribute value of each photo and the quality score vector of each attribute value of a standard face, and determining the face photo with the shortest cosine distance as the standard face photo;
[0170] Step S104B: In response to the existence of at least two face photos with the same cosine distance, based on a preset attribute value priority, determine the face photo with a higher attribute priority as the standard face photo.
[0171] In order to determine the standard face photo, the attribute value quality score vector S of each photo can be calculated i The cosine distance between the standard vector S. The cosine distance is an indicator to measure the similarity between two vectors. The closer the distance, the closer the attribute values of the photo are to the standard face photo, and thus the higher the quality.
[0172] When the cosine distances of multiple photos are the same, the system will further filter them according to the preset attribute priority. Specifically, the attribute values with higher quality scores are given priority, and the photos with the best performance in key attributes are selected as standard face photos. This ensures that the final selected photos meet the best standards in terms of overall quality and key features.
[0173] Exemplarily, when the distances are the same, the standard photo can be selected according to the preset attribute priority. For example, assuming that the attribute priority is face completeness (Q1) > face angle (Q2) > eye size (Q3) > face size (Q4), if the cosine distances of photos A and B are the same, their Q1 scores are compared first, and the photo with a higher Q1 is selected as the standard photo. If the Q1 scores are also the same, Q2 is compared, and so on, until the photo with the best performance in the key attribute is selected as the standard photo.
[0174] For further explanation of this scheme, see Fig.10The present application also provides a specific application example of using the above-mentioned video-based standard face photo recognition device to implement a video-based standard face photo recognition method, which specifically includes the following contents:
[0175] Step S01, video recording to capture multiple face photos:
[0176] During the video recording process, the system will capture multiple face photos, the number of which is N photos N>1. These photos will be used for subsequent quality assessment and screening to ensure that the final selected photos have the best quality.
[0177] Step S02, stage division and random selection of photos:
[0178] The video recording time period is divided into three stages: the beginning, the middle, and the end. The stages can be divided in two ways. One is to divide it into three equal parts according to the recording time to ensure that the time length of each stage is equal; the other is to divide it into three equal parts according to the order of the number of collected photos to ensure that each stage contains a similar number of photos. In each stage, the system randomly selects one photo for quality calculation. This method can more objectively reflect the quality of the face photos in each stage.
[0179] Step S03, facial feature detection:
[0180] In the photo set that is considered to have a standard face photo stage, face detection is performed on each photo in the set, and facial features are obtained. Based on the facial feature point estimation algorithm, 68 feature points such as eyes, nose, mouth, etc. are identified.
[0181] Step S04, calculation of face attribute values:
[0182] Calculate the quality scores of various facial attribute values, including face completeness Q1, face angle Q2, eye size Q3, and face size Q4.
[0183] Step S05-Step S08, filter the photos one by one:
[0184] Calculate the attribute value quality score for each photo, compare the obtained score with the standard value, and determine whether it meets the business review requirements.
[0185] Step S05, attribute value quality score calculation:
[0186] Calculate the facial features of each photo and obtain the quality score of each attribute value.
[0187] Step S06: Whether the attribute value quality score meets the requirements:
[0188] Calculate the quality score Q of each attribute of each photo j With the standard value Q sjThe absolute difference between |Q j -Q sj |, determine whether it is within the taboo distance Td j In the range j∈[1,4]. If the difference is within the range, continue to calculate the quality score of the next attribute value; otherwise, eliminate the photo.
[0189] Step S07, determine the number of attribute values:
[0190] If all attribute values meet the requirements, keep the photo, otherwise continue to screen the next photo.
[0191] Step S08: Whether all photos have been screened:
[0192] Screen all photos and keep those that meet the requirements.
[0193] Step S09, select a standard photo:
[0194] The photos that meet the requirements will be further screened and the photos with the best quality will be selected as standard face photos.
[0195] Calculate the attribute value quality score vector S for each photo i The cosine distance from the standard vector S. The closer the distance, the higher the photo quality.
[0196] When the cosine distances are the same, the photo with the best performance in key attributes is selected as the standard face photo according to the preset attribute priority.
[0197] Through the above steps, it is possible to accurately identify photos that meet business review requirements from a large number of photos and select photos with the best quality.
[0198] It should be noted that the video-based standard facial photo recognition method provided in the embodiment of the present invention can be used in the financial field, and can also be used in any technical field other than the financial field. The embodiment of the present invention does not limit the application field of the video-based standard facial photo recognition method.
[0199] In order to automatically select a standard frontal face photo from multiple face photos captured in a video, not only can the workload of manual screening be significantly reduced, but also the accuracy of business review can be improved. The present application provides an embodiment of a video-based standard face photo recognition device for implementing all or part of the content of the video-based standard face photo recognition method, see Fig.11 The video-based standard face recognition device specifically includes the following contents:
[0200] The photo set acquisition module 1101 is used to: capture multiple face photos during video recording, and extract a photo set at the standard face photo stage from the multiple face photos according to the proximity between the multiple face photos and the preset standard face photos, wherein the standard face photos represent face photos whose face integrity, face angle, eye size and face size are all within a preset range;
[0201] The feature extraction module 1102 is used to: perform face detection on each photo in the photo set at the standard face photo stage to extract the face features corresponding to each photo;
[0202] The score determination module 1103 is used to: for each of the photos, determine the quality score of each attribute value of the face photo according to the facial features, the attribute values including face completeness, face angle, eye size and face size;
[0203] The standard determination module 1104 is used to determine the standard face photo according to the distance between the quality score vector of each attribute value of each photo and the quality score vector of each attribute value of a preset standard face.
[0204] According to any implementation manner of the present application, the photo collection acquisition module is specifically used to:
[0205] Dividing the plurality of face photos into a plurality of photo sets on an even basis based on video recording time or the number of photos;
[0206] For each photo set, a face photo is randomly selected, and the photo set containing the face photo closest to the standard face photo is determined as the photo set in the standard face photo stage.
[0207] According to any implementation of the present application, the feature extraction module is specifically used for:
[0208] Based on the facial feature estimation, the coordinate points corresponding to the eyes, nose, mouth and face frame in each photo are extracted respectively.
[0209] According to any implementation manner of the present application, the score determination module determines the quality score of the face integrity according to the face features, specifically for:
[0210] Determining the detectability of the eyes, nose, and mouth in the face photo, respectively, according to the coordinate points of the eyes, nose, and mouth in each photo;
[0211] The face integrity is scored according to the detectability to obtain a corresponding quality score, wherein the detectability is positively correlated with the scoring score.
[0212] According to any implementation manner of the present application, the score determination module determines the quality score of the face angle according to the face feature, specifically for:
[0213] Calculate the tilt and rotation angle of the face photo based on the PnP algorithm according to the coordinate points of the eyes, nose and mouth in each photo;
[0214] The face angle is scored according to the tilt and rotation angles to obtain a corresponding quality score, wherein the tilt and rotation angles are negatively correlated with the scored scores.
[0215] According to any implementation manner of the present application, the score determination module determines the quality score of the eye size according to the facial features, specifically for:
[0216] Determining the distance between the upper and lower eyelids in the face photo according to the coordinate points of the eyes in each photo;
[0217] When the absolute value of the distance between the upper and lower eyelids is not zero, the size of the two eyes is scored to obtain a corresponding quality score.
[0218] According to any implementation manner of the present application, the score determination module determines the quality score of the face size according to the face features, specifically for:
[0219] Determining the proportion of the area of the face frame in the face photo according to the coordinate points of the face frame in each photo;
[0220] The ratio is compared with a preset standard ratio to assign a score to the face size to obtain a corresponding quality score, wherein the degree of closeness between the ratio and the preset standard ratio is positively correlated with the assigned score.
[0221] According to any embodiment of the present application, a screening module is also included, which is specifically used for:
[0222] The vector value of the quality score vector of each attribute value of the standard face is used as the standard point, and the vector domain that meets the business requirements is determined according to the taboo distance;
[0223] The photo set at the standard face photo stage is screened based on the vector domain and the quality score vector of each attribute value of each photo.
[0224] According to any implementation of the present application, the standard determination module is specifically used for:
[0225] Determine the cosine distance between the quality score vector of each attribute value of each photo and the quality score vector of each attribute value of a standard face, and determine the face photo with the shortest cosine distance as the standard face photo;
[0226] In response to the existence of at least two face photos with the same cosine distance, based on a preset attribute value priority, a face photo with a higher attribute priority is determined as the standard face photo.
[0227] From the above description, it can be seen that the video-based standard face photo recognition device provided in the embodiment of the present application can capture multiple frontal face photos based on video recording, and automatically select standard frontal face photos from the multiple face photos captured from the video through an automatic facial attribute decision algorithm. This can not only significantly reduce the workload of manual screening, but also improve the accuracy of business review.
[0228] From the hardware level, in order to automatically select a standard frontal face photo from multiple face photos captured in a video, not only can the workload of manual screening be significantly reduced, but also the accuracy of business review can be improved. The present application provides an embodiment of an electronic device for implementing all or part of the content of the video-based standard face photo recognition method, and the electronic device specifically includes the following content:
[0229] Processor, memory, communication interface and bus; wherein the processor, memory and communication interface communicate with each other through the bus; the communication interface is used to realize information transmission between the video-based standard face photo recognition device and the core business system, user terminal and related database and other related equipment; the logic controller can be a desktop computer, a tablet computer and a mobile terminal, etc., but the present embodiment is not limited thereto. In the present embodiment, the logic controller can be implemented with reference to the embodiment of the video-based standard face photo recognition method and the embodiment of the video-based standard face photo recognition device in the embodiment, and the contents thereof are incorporated herein and the repeated parts are not repeated.
[0230] It is understandable that the user terminal may include a smart phone, a tablet electronic device, a network set-top box, a portable computer, a desktop computer, a personal digital assistant (PDA), a vehicle-mounted device, a smart wearable device, etc. Among them, the smart wearable device may include smart glasses, a smart watch, a smart bracelet, etc.
[0231] In practical applications, part of the video-based standard face recognition method can be performed on the electronic device side as described above, or all operations can be completed in the client device. The specific selection can be based on the processing capability of the client device and the limitations of the user's usage scenario. This application does not limit this. If all operations are completed in the client device, the client device may also include a processor.
[0232] The client device may have a communication module (i.e., a communication unit) that can communicate with a remote server to achieve data transmission with the server. The server may include a server on the task scheduling center side, and other implementation scenarios may also include a server on an intermediate platform, such as a server on a third-party server platform that has a communication link with the task scheduling center server. The server may include a single computer device, or a server cluster consisting of multiple servers, or a server structure of a distributed device.
[0233] Fig.12 FIG. 9 is a schematic block diagram of the system structure of the electronic device 9600 according to an embodiment of the present application. Fig.12 As shown, the electronic device 9600 may include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. It is worth noting that Fig.12 is exemplary; other types of structures may also be used to supplement or replace this structure to implement telecommunication functions or other functions.
[0234] In one embodiment, the function of the standard face recognition method based on video can be integrated into the central processing unit 9100. The central processing unit 9100 can be configured to perform the following control:
[0235] Step S101: capturing a plurality of face photos during video recording, and extracting a set of photos at the standard face photo stage from the plurality of face photos according to the proximity between the plurality of face photos and a preset standard face photo, wherein the standard face photo represents a face photo whose face integrity, face angle, eye size, and face size are all within a preset range;
[0236] Step S102: performing face detection on each photo in the photo set at the standard face photo stage to extract facial features corresponding to each photo;
[0237] Step S103: for each of the photos, determining the quality score of each attribute value of the face photo according to the facial features, the attribute values including face completeness, face angle, eye size and face size;
[0238] Step S104: determining a standard face photo according to the distance between the quality score vector of each attribute value of each photo and the quality score vector of each attribute value of a preset standard face.
[0239] From the above description, it can be seen that the electronic device provided in the embodiment of the present application captures multiple frontal face photos based on video recording, and automatically selects a standard frontal face photo from the multiple face photos captured from the video through an automatic facial attribute decision algorithm, which can not only significantly reduce the workload of manual screening, but also improve the accuracy of business review.
[0240] In another embodiment, the video-based standard facial photo recognition device can be configured separately from the central processing unit 9100. For example, the video-based standard facial photo recognition device can be configured as a chip connected to the central processing unit 9100, and the function of the video-based standard facial photo recognition method can be implemented through the control of the central processing unit.
[0241] like Fig.12 As shown, the electronic device 9600 may also include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is worth noting that the electronic device 9600 does not necessarily have to include Fig.12 In addition, the electronic device 9600 may also include Fig.12 For components not shown, reference may be made to the prior art.
[0242] like Fig.12 As shown, the central processing unit 9100 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor device and / or logic device. The central processing unit 9100 receives input and controls the operation of various components of the electronic device 9600.
[0243] The memory 9140 may be, for example, one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The above-mentioned information related to the failure may be stored, and a program for executing the relevant information may also be stored. The CPU 9100 may execute the program stored in the memory 9140 to implement information storage or processing, etc.
[0244] The input unit 9120 provides input to the central processing unit 9100. The input unit 9120 is, for example, a key or a touch input device. The power supply 9170 is used to provide power to the electronic device 9600. The display 9160 is used to display display objects such as images and texts. The display may be, for example, an LCD display, but is not limited thereto.
[0245] The memory 9140 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), SIM card, etc. It can also be a memory that saves information even when the power is off, can be selectively erased and is provided with more data, and examples of such memories are sometimes called EPROMs, etc. The memory 9140 can also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes called a buffer). The memory 9140 may include an application / function storage unit 9142, which is used to store application programs and function programs or processes for executing the operation of the electronic device 9600 through the central processor 9100.
[0246] The memory 9140 may also include a data storage unit 9143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 9144 of the memory 9140 may include various drivers for communication functions of the electronic device and / or for executing other functions of the electronic device (such as messaging applications, address book applications, etc.).
[0247] The communication module 9110 is a transmitter / receiver 9110 that sends and receives signals via an antenna 9111. The communication module (transmitter / receiver) 9110 is coupled to the central processor 9100 to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal.
[0248] Based on different communication technologies, multiple communication modules 9110 may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless LAN module, etc. The communication module (transmitter / receiver) 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide an audio output via the speaker 9131 and receive an audio input from the microphone 9132, thereby realizing a common telecommunication function. The audio processor 9130 may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor 9130 is also coupled to the central processor 9100, so that recording can be performed on the local machine through the microphone 9132, and the sound stored on the local machine can be played through the speaker 9131.
[0249] The embodiments of the present application also provide a computer-readable storage medium capable of implementing all the steps of the standard face recognition method based on video in the above-mentioned embodiments, where the execution subject is a server or a client. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, all the steps of the standard face recognition method based on video in the above-mentioned embodiments are implemented. For example, when the processor executes the computer program, the following steps are implemented:
[0250] Step S101: capturing a plurality of face photos during video recording, and extracting a set of photos at the standard face photo stage from the plurality of face photos according to the proximity between the plurality of face photos and a preset standard face photo, wherein the standard face photo represents a face photo whose face integrity, face angle, eye size, and face size are all within a preset range;
[0251] Step S102: performing face detection on each photo in the photo set at the standard face photo stage to extract facial features corresponding to each photo;
[0252] Step S103: for each of the photos, determining the quality score of each attribute value of the face photo according to the facial features, the attribute values including face completeness, face angle, eye size and face size;
[0253] Step S104: determining a standard face photo according to the distance between the quality score vector of each attribute value of each photo and the quality score vector of each attribute value of a preset standard face.
[0254] From the above description, it can be seen that the computer-readable storage medium provided in the embodiment of the present application captures multiple frontal face photos based on video recording, and automatically selects a standard frontal face photo from the multiple face photos captured from the video through an automatic facial attribute decision algorithm, which can not only significantly reduce the workload of manual screening, but also improve the accuracy of business review.
[0255] The embodiments of the present application also provide a computer program product capable of implementing all the steps of the video-based standard face recognition method in the above embodiments, where the execution subject is a server or a client. When the computer program / instruction is executed by a processor, the steps of the video-based standard face recognition method are implemented. For example, the computer program / instruction implements the following steps:
[0256] Step S101: capturing a plurality of face photos during video recording, and extracting a set of photos at the standard face photo stage from the plurality of face photos according to the proximity between the plurality of face photos and a preset standard face photo, wherein the standard face photo represents a face photo whose face integrity, face angle, eye size, and face size are all within a preset range;
[0257] Step S102: performing face detection on each photo in the photo set at the standard face photo stage to extract facial features corresponding to each photo;
[0258] Step S103: for each of the photos, determining the quality score of each attribute value of the face photo according to the facial features, the attribute values including face completeness, face angle, eye size and face size;
[0259] Step S104: determining a standard face photo according to the distance between the quality score vector of each attribute value of each photo and the quality score vector of each attribute value of a preset standard face.
[0260] From the above description, it can be seen that the computer program product provided in the embodiment of the present application captures multiple frontal face photos based on video recording, and automatically selects standard frontal face photos from the multiple face photos captured from the video through an automatic facial attribute decision algorithm, which can not only significantly reduce the workload of manual screening, but also improve the accuracy of business review.
[0261] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0262] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (apparatus), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0263] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0264] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1The steps for the functions specified in one or more boxes.
[0265] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A video-based standard face recognition method, characterized in that: The method comprises: During the video recording process, a plurality of face photos are captured, and according to the closeness of the plurality of face photos to the preset standard face photos, a set of photos at the standard face photo stage is extracted from the plurality of face photos, wherein the standard face photos represent face photos whose face integrity, face angle, eye size and face size are all within a preset range; Performing face detection on each photo in the photo set at the standard face photo stage to extract facial features corresponding to each photo; For each of the photos, determining a quality score of each attribute value of the face photo according to the facial features, the attribute values including face completeness, face angle, eye size, and face size; The standard face photo is determined according to the distance between the quality score vector of each attribute value of each photo and the quality score vector of each attribute value of a preset standard face.
2. The video-based standard face recognition method according to claim 1, characterized in that: The step of extracting a set of photos in the standard face photo stage from the plurality of face photos according to the proximity between the plurality of face photos and the standard face photo comprises: Dividing the plurality of face photos into a plurality of photo sets on an even basis based on video recording time or the number of photos; For each photo set, a face photo is randomly selected, and the photo set containing the face photo closest to the standard face photo is determined as the photo set in the standard face photo stage.
3. The video-based standard face recognition method according to claim 1, characterized in that: The performing face detection on each photo in the photo set at the standard face photo stage to extract the face features corresponding to each photo respectively includes: Based on the facial feature estimation, the coordinate points corresponding to the eyes, nose, mouth and face frame in each photo are extracted respectively.
4. The video-based standard face recognition method according to claim 3, characterized in that: The determining of the quality score of the face integrity according to the face features includes: Determining the detectability of the eyes, nose, and mouth in the face photo, respectively, according to the coordinate points of the eyes, nose, and mouth in each photo; The face integrity is scored according to the detectability to obtain a corresponding quality score, wherein the detectability is positively correlated with the scoring score.
5. The video-based standard face recognition method according to claim 3, characterized in that: The determining the quality score of the face angle according to the face feature includes: Calculate the tilt and rotation angle of the face photo based on the PnP algorithm according to the coordinate points of the eyes, nose and mouth in each photo; The face angle is scored according to the tilt and rotation angles to obtain a corresponding quality score, wherein the tilt and rotation angles are negatively correlated with the scored scores.
6. The video-based standard face recognition method according to claim 3, characterized in that: The determining the quality score of the size of both eyes according to the facial features includes: Determining the distance between the upper and lower eyelids in the face photo according to the coordinate points of the eyes in each photo; When the absolute value of the distance between the upper and lower eyelids is not zero, the size of the two eyes is scored to obtain a corresponding quality score.
7. The video-based standard face recognition method according to claim 3, characterized in that: The determining the quality score of the face size according to the face features includes: Determining the proportion of the area of the face frame in the face photo according to the coordinate points of the face frame in each photo; The ratio is compared with a preset standard ratio to assign a score to the face size to obtain a corresponding quality score, wherein the degree of closeness between the ratio and the preset standard ratio is positively correlated with the assigned score.
8. The video-based standard face recognition method according to claim 1, characterized in that: Before determining the standard face photo according to the distance between the quality score vector of each attribute value of each photo and the quality score vector of each attribute value of a preset standard face, the method further includes: The vector value of the quality score vector of each attribute value of the standard face is used as the standard point, and the vector domain that meets the business requirements is determined according to the taboo distance; The photo set at the standard face photo stage is screened based on the vector domain and the quality score vector of each attribute value of each photo.
9. The video-based standard face recognition method according to claim 1, characterized in that: Determining the standard face photo according to the distance between the quality score vector of each attribute value of each photo and the quality score vector of each attribute value of a preset standard face includes: Determine the cosine distance between the quality score vector of each attribute value of each photo and the quality score vector of each attribute value of a standard face, and determine the face photo with the shortest cosine distance as the standard face photo; In response to the existence of at least two face photos with the same cosine distance, based on a preset attribute value priority, a face photo with a higher attribute priority is determined as the standard face photo.
10. A video-based standard face recognition device, characterized in that: The device comprises: The photo set acquisition module is used to: capture multiple face photos during video recording, and extract a photo set at the standard face photo stage from the multiple face photos according to the proximity between the multiple face photos and the preset standard face photos, wherein the standard face photos represent face photos whose face integrity, face angle, eye size and face size are all within a preset range; The feature extraction module is used to: perform face detection on each photo in the photo set at the standard face photo stage, so as to extract the face features corresponding to each photo; A score determination module, used to: for each of the photos, determine the quality score of each attribute value of the face photo according to the facial features, the attribute values including face completeness, face angle, eye size and face size; The standard determination module is used to determine the standard face photo according to the distance between the quality score vector of each attribute value of each photo and the quality score vector of each attribute value of a preset standard face.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the video-based standard face photo recognition method described in any one of claims 1 to 9 are implemented.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the video-based standard face recognition method described in any one of claims 1 to 9 are implemented.
13. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the video-based standard face recognition method described in any one of claims 1 to 9 are implemented.
