Method, device, equipment and storage medium for evaluating face image quality
The face part is extracted and relevant index parameters are obtained through the face detection algorithm, which solves the problem of low accuracy in the evaluation of face image quality in the prior art, and realizes accurate evaluation of face image quality.
Patent Information
- Application Number
- CN202110723122.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-28
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2041-06-28
AI Technical Summary
In the prior art, the accuracy of face image quality evaluation is low, and especially the posture of the face cannot be evaluated, which leads to the face recognition system being unable to accurately evaluate the quality of face images.
The face part is extracted from the image to be evaluated through a face detection algorithm, and the posture index parameters, brightness index parameters and clarity index parameters are obtained, and the comprehensive score of the face image is calculated based on these parameters.
It realizes accurate quality evaluation through an image to be evaluated without using the reference image, which improves the accuracy of facial image quality evaluation.
Smart Images

Figure CN113409287B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and in particular to a method, device, equipment and storage medium for evaluating the quality of facial images. Background Art
[0002] At present, with the rapid development of computer technology and biometric technology, face recognition has become a common method of collecting identity information. For face recognition technology, the quality of face images is usually evaluated by factors such as the brightness, clarity and posture of the face image. However, as the requirements for face image quality in various fields become higher and higher, poor quality of face images will lead to the face recognition system being unable to accurately identify the results, thereby affecting the performance of the entire face recognition system.
[0003] In the prior art, in order to reduce the performance degradation of the face recognition system due to the low quality of the face image, the quality of the face image is mainly evaluated by the full reference image quality evaluation method. This method is mainly divided into three methods: an evaluation method based on image pixel statistics, an evaluation method based on information entropy in information theory, and an evaluation method based on structural information. The quality of the image to be evaluated is judged by calculating the global size of the pixel error between the image to be evaluated and the reference image, or the structural similarity between the image to be evaluated and the reference image. However, this image quality evaluation method not only requires the provision of a reference image, but also cannot evaluate the posture of the face, resulting in the face recognition system being unable to accurately evaluate the quality of the face image.
[0004] In summary, the image quality evaluation schemes in the current prior art have low accuracy in evaluating the quality of face images. Summary of the invention
[0005] The embodiments of the present invention provide a method, device, equipment and storage medium for evaluating the quality of facial images, which are used to solve the problem that the accuracy of evaluating the quality of facial images in the prior art is relatively low.
[0006] In a first aspect, an embodiment of the present invention provides a method for evaluating the quality of a face image, comprising:
[0007] Extracting a face part from a pre-acquired first image to be evaluated by using a face detection algorithm to obtain a second image to be evaluated;
[0008] Detecting a second image to be evaluated, and obtaining a posture index parameter, a brightness index parameter, and a clarity index parameter of the second image to be evaluated;
[0009] The quality of the first image to be evaluated is evaluated based on the posture index parameter, the brightness index parameter and the clarity index parameter.
[0010] In a specific implementation, obtaining the posture index parameter of the second image to be evaluated includes:
[0011] Performing image alignment processing on the second image to be evaluated to obtain image detection frame data and image key point information;
[0012] A first parameter is determined based on the image detection frame data, and a second parameter is determined based on the image key point information, wherein the posture indicator parameter includes the first parameter and the second parameter.
[0013] In a specific implementation, obtaining the brightness index parameter of the second image to be evaluated includes:
[0014] Performing grayscale conversion processing on the second image to be evaluated to obtain a grayscale image;
[0015] Obtaining a first brightness mean value of all pixels of the grayscale image;
[0016] Determine, based on the first brightness mean, a second brightness mean and an average deviation value of each pixel point of the second image to be evaluated that deviates from the first brightness mean;
[0017] Obtaining a quotient between the second brightness mean value and the average deviation value;
[0018] The quotient is determined as the brightness index parameter.
[0019] In a specific implementation, obtaining the clarity index parameter of the second image to be evaluated includes:
[0020] Acquire a target variation value based on a second image to be evaluated;
[0021] The target variation value is determined as the clarity index parameter.
[0022] In a specific implementation, evaluating the quality of the first image to be evaluated based on the posture index parameter, the brightness index parameter, and the clarity index parameter includes:
[0023] The posture index parameters are input into the posture evaluation model for processing to obtain a posture score value, wherein the posture evaluation model is obtained by training the posture index parameters and the posture score value;
[0024] The brightness index parameter is input into the brightness evaluation model for processing to obtain a brightness score value, wherein the brightness evaluation model is obtained by training the brightness index parameter and the brightness score value;
[0025] Inputting the clarity index parameter into the clarity evaluation model for processing to obtain a clarity score value, wherein the clarity evaluation model is obtained by training the clarity index parameter and the clarity score value;
[0026] The quality of the first image to be evaluated is evaluated based on the posture score value, the brightness score value and the clarity score value.
[0027] In a specific implementation, the posture index parameters are input into the posture evaluation model for processing to obtain a posture score value, including:
[0028] Presetting an angle threshold, and determining a target angle value based on the image key point information, wherein the second parameter includes the target angle value, and the target angle value is used to characterize the angle between the image key point and the horizontal edge of the image detection frame;
[0029] When the target angle value is greater than the angle threshold, the posture score value is determined to be 0;
[0030] When the target angle value is not greater than the angle threshold, the first parameter is input into the posture evaluation model for processing to obtain a posture score value.
[0031] In a second aspect, an embodiment of the present invention provides a device for evaluating the quality of a face image, comprising:
[0032] An extraction module is used to extract a face part from a first image to be evaluated acquired in advance by using a face detection algorithm to obtain a second image to be evaluated;
[0033] A detection module, used to detect the second image to be evaluated, and obtain a posture index parameter, a brightness index parameter, and a clarity index parameter of the second image to be evaluated;
[0034] An evaluation module is used to evaluate the quality of the first image to be evaluated based on a posture index parameter, a brightness index parameter and a clarity index parameter.
[0035] In a third aspect, an embodiment of the present invention provides an electronic device, including:
[0036] Processor, memory, and interactive interface;
[0037] The memory is used to store executable instructions of the processor;
[0038] Wherein, the processor is configured to execute the facial image quality assessment method described in the first aspect by executing the executable instructions.
[0039] In a fourth aspect, an embodiment of the present invention provides a readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method for evaluating the quality of facial images described in the first aspect.
[0040] In a fifth aspect, an embodiment of the present invention provides a computer program product, including a computer program, which, when executed by a processor, is used to implement the method for evaluating the quality of facial images described in the first aspect.
[0041] The face image quality assessment method, device, equipment and storage medium provided by the embodiments of the present invention extract the face part from the first image to be assessed in advance through a face detection algorithm to obtain a second image to be assessed; detect the second image to be assessed and obtain the posture index parameter, brightness index parameter and clarity index parameter of the second image to be assessed; assess the quality of the first image to be assessed based on the posture index parameter, brightness index parameter and clarity index parameter, thereby achieving the purpose of improving the accuracy of assessing the quality of the face image. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0043] Figure 1 A schematic diagram of an application scenario of the method for evaluating the quality of facial images provided by an embodiment of the present invention;
[0044] Figure 2 A flowchart of a method for evaluating the quality of a facial image provided by an embodiment of the present invention;
[0045] Figure 3 A schematic diagram of the structure of a facial image quality assessment device provided by an embodiment of the present invention;
[0046] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all the embodiments. Based on the embodiment of the present invention, all other embodiments made by ordinary technicians in this field under the enlightenment of this embodiment belong to the scope of protection of the present invention.
[0048] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0049] In the prior art provided in the background technology, there are at least the following technical problems in the scheme for evaluating the quality of face images:
[0050] 1) The distortion of facial images is serious, resulting in the inability of the face recognition system to accurately identify the results.
[0051] 2) The quality evaluation method based on the full reference image quality is used to evaluate the quality of facial images. It not only requires the provision of reference images, but also cannot evaluate the posture of the face, resulting in the face recognition system being unable to accurately evaluate the quality of facial images.
[0052] In view of the above problems, the present invention proposes a method for evaluating the quality of facial images, which can accurately evaluate the image to be evaluated only by one image to be evaluated without other reference images, and the method comprehensively evaluates the posture, clarity and brightness of the facial image to obtain corresponding index factors, thereby determining the score values of the facial image in posture, clarity and brightness according to the obtained index factors, and combining these three score values to calculate the comprehensive score of the facial image quality. First, the terms involved in the present invention are explained below.
[0053] Image Quality Assessment (IQA) is one of the basic techniques in image processing. It mainly analyzes the characteristics of images and then evaluates the quality of images, that is, the degree of image distortion.
[0054] The core idea of the face image quality assessment method provided by the present invention is to use a face detection algorithm to extract the face part in the image to be assessed, then assess the posture, clarity and brightness of the face part, respectively obtain the posture score value, clarity score value and brightness score value of the face part, then calculate the comprehensive score value of the face image according to the posture score value, clarity score value and brightness score value, and judge the quality of the face image by the obtained comprehensive score value, so that the quality of the face image can be accurately assessed by only one image to be assessed without using a reference image, thereby overcoming the above-mentioned problems that are easy to occur when performing image quality assessment.
[0055] Figure 1 A schematic diagram of an application scenario of the method for evaluating the quality of a face image provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, in this scenario, taking the camera at an airport or a station as an example, the image acquisition module in the camera acquires pedestrian images and stores the pedestrian images. The pedestrian images can be video images or picture images. After the image acquisition module in the camera acquires the pedestrian images, the image sending module selects one frame or one image from several pedestrian images as the image to be evaluated, and sends it to the computer device, and the face recognition system in the computer device performs image quality evaluation processing.
[0056] based on Figure 1 In the scenario shown, in this solution, after receiving the image to be evaluated sent by the image sending module of the camera, the computer device uses the face recognition system to preprocess the image to be evaluated using the face detection algorithm. After the face part is detected, the posture score, clarity score and brightness score of the face part are calculated, and then the inclination, clarity and brightness of the face part in the image to be evaluated are determined. Finally, these three scores are combined to evaluate the quality of the image to be evaluated according to the comprehensive score. The higher the comprehensive score, the better the quality of the image to be evaluated.
[0057] The method for evaluating the quality of facial images is described in detail below through several specific implementations.
[0058] Figure 2 A flowchart of a method for evaluating the quality of a facial image provided by an embodiment of the present invention is shown in FIG. Figure 2 As shown, the method for evaluating the quality of a face image includes the following steps:
[0059] S201: extracting a face part from a pre-acquired first image to be evaluated by using a face detection algorithm to obtain a second image to be evaluated.
[0060] In this step, the first image to be evaluated can be pre-acquired by an image acquisition device. Since the first image to be evaluated is the most original image obtained, the image may contain various backgrounds and other parts that are irrelevant to the face image. Therefore, a face detection algorithm can be used to extract the face part in the first image to be evaluated, so that the quality of the face part can be directly evaluated later.
[0061] As an optional implementation, in addition to using a face detection algorithm, traditional image processing methods can be used to extract the face part from the first image to be evaluated. For example, scale-invariant feature transform (SIFT) and histogram of oriented gradient (HOG) can be used to extract features of the face image, thereby realizing the detection of the face in the image.
[0062] S202: Detect a second image to be evaluated, and obtain a posture index parameter, a brightness index parameter, and a clarity index parameter of the second image to be evaluated.
[0063] In this step, after extracting the second image to be evaluated of the face part from the first image to be evaluated, the posture index parameter, brightness index parameter and clarity index parameter of the second image to be evaluated can be obtained by processing the second image to be evaluated.
[0064] In a specific implementation, the second image to be evaluated is processed to obtain posture index parameters of the second image to be evaluated, including: performing image alignment processing on the second image to be evaluated to obtain image detection frame data and image key point information; determining a first parameter based on the image detection frame data, and determining a second parameter based on the image key point information, wherein the posture index parameters include the first parameter and the second parameter.
[0065] In this scheme, the second image to be evaluated is subjected to alignment processing such as affine transformation, so as to obtain a face image of a specific size and the position information of the key facial points in the face image. The face image of the specific size is determined by an image detection frame, which is also a face image detection frame. When posture detection is subsequently performed on the second image to be evaluated, the face part in the image detection frame is detected. The position information of the key facial points in the face image can be determined by the face part in the image detection frame, for example, the positions of the facial features on the face.
[0066] In the above solution, the image detection frame data includes size information of the image detection frame, such as the width and height of the face image detection frame. The first parameter can be determined by the width and height of the face image detection frame. The calculation formula of the first parameter can be as follows:
[0067]
[0068] Among them, λ is used to represent the first parameter, h box Used to represent the height of the face image detection frame, w box Used to indicate the width of the face image detection box.
[0069] In the above scheme, the key point information of the facial image includes the position information of the facial features, etc. The second parameter can be determined through the position information of the facial features. The second parameter can be an angle value, which can be the angle θ between the facial features and the horizontal edge of the image detection frame, for example, the angle between the line segment between the two mouth corners and the lower horizontal edge of the image detection frame, or the angle between the line segment between the two eyeballs and the upper horizontal edge, etc.
[0070] In a specific implementation, the second image to be evaluated is processed to obtain a brightness index parameter of the second image to be evaluated, including: performing grayscale conversion processing on the second image to be evaluated to obtain a grayscale image; obtaining a first brightness mean of all pixels of the grayscale image; determining a second brightness mean and an average deviation value of each pixel of the second image to be evaluated that deviates from the first brightness mean based on the first brightness mean; obtaining a quotient between the second brightness mean and the average deviation value; and determining the quotient as a brightness index parameter.
[0071] In this solution, the first brightness mean is preset, and its setting value is 128. The calculation formula of the second brightness mean is as follows:
[0072]
[0073] N = width * height
[0074] Where D is used to represent the second brightness mean, which is a positive value, N is used to represent the number of all pixels, and x i It is used to represent the brightness value of each pixel in the grayscale image, width is used to represent the width of the grayscale image, and height is used to represent the height of the grayscale image.
[0075] The calculation formula of the average deviation value is as follows:
[0076]
[0077] Among them, M is used to represent the mean deviation value, and Hist is used to represent the histogram of the grayscale image.
[0078] The calculation formula of brightness index parameter is as follows:
[0079]
[0080] Among them, k is used to represent the brightness index parameter.
[0081] In a specific implementation, processing the second image to be evaluated to obtain a clarity index parameter of the second image to be evaluated includes: acquiring a target variation value based on the second image to be evaluated; and determining the target variation value as the clarity index parameter.
[0082] In this solution, the target variation value can be directly calculated through the second image to be evaluated. The target variation value can be a Laplacian variation value, and the calculated Laplacian variation value is directly defined as the clarity index parameter d.
[0083] As an optional implementation, when evaluating the quality of facial images, in addition to using the above-mentioned posture index parameters, brightness index parameters and clarity index parameters for evaluation, you can also use objective image quality evaluation methods, such as full reference image quality evaluation methods, partial reference image quality evaluation methods, no reference image quality evaluation methods, etc. to evaluate the quality of facial images, or use the above-mentioned three index parameters in combination with traditional image quality objective evaluation methods to ultimately evaluate the quality of facial images.
[0084] As an optional implementation, in addition to using the image area of the face image within the image detection frame to evaluate the face image posture, brightness and clarity, the above solution can also select the entire image containing the face for evaluation.
[0085] S203: Evaluate the quality of the first image to be evaluated based on the posture index parameter, the brightness index parameter, and the clarity index parameter.
[0086] In this step, after obtaining the posture index parameters, brightness index parameters and clarity index parameters, the posture score value, brightness score value and clarity score value can be calculated respectively, and these three score values can be comprehensively calculated to obtain a comprehensive score value, so as to evaluate the quality of the image to be evaluated based on the score of the comprehensive score value.
[0087] In a specific implementation, calculating a posture score value based on posture index parameters includes: inputting the posture index parameters into a posture evaluation model for processing to obtain a posture score value.
[0088] In this scheme, the posture evaluation model is obtained by training the posture index parameters and the posture score value. When obtaining the posture score value, an angle threshold θ0 can be set in advance, and the target angle value can be determined based on the image key point information, wherein the second parameter includes the target angle value θ, which is used to characterize the angle between the image key point and the horizontal edge of the image detection frame.
[0089] In the above scheme, if θ>θ0, it means that the face part is tilted relative to the horizontal side of the image detection frame, and the tilt is too large. At this time, the posture score is 0; if θ≤θ0, it means that the tilt of the face part relative to the horizontal side of the image detection frame is acceptable. At this time, the posture score can be determined only by the first parameter λ, that is, the first parameter is input into the posture evaluation model for processing to obtain the posture score. The posture evaluation model can be expressed by the function as follows:
[0090]
[0091] Among them, score1 is used to represent the posture score value.
[0092] In a specific implementation, calculating the posture score value based on the brightness index parameter includes: inputting the brightness index parameter into a brightness evaluation model for processing to obtain a brightness score value.
[0093] In this scheme, the brightness evaluation model is obtained by training the brightness index parameter k and the brightness score value. The brightness evaluation model can be expressed by the function as follows:
[0094]
[0095] Among them, score2 is used to represent the brightness score value.
[0096] In a specific implementation, calculating the clarity score value based on the clarity index parameter includes: inputting the clarity index parameter into a clarity evaluation model for processing to obtain the clarity score value.
[0097] In this scheme, the clarity evaluation model is obtained by training the clarity index parameter d and the clarity score value. The clarity evaluation model can be expressed by the function as follows:
[0098]
[0099] Among them, score3 is used to represent the clarity score value.
[0100] In a specific implementation, after the posture score value, the brightness score value, and the clarity score value are obtained, the quality of the first image to be evaluated may be evaluated based on the posture score value, the brightness score value, and the clarity score value.
[0101] In this scheme, since the posture index, clarity index, and brightness index of the face image have different effects on improving the accuracy and recall rate of the face recognition system, different weight coefficients can be assigned to the posture score, clarity score, and brightness score, respectively, so as to finally calculate the comprehensive score of the face image quality according to the posture score, clarity score, and brightness score of the face image. The calculation formula of the comprehensive score is as follows:
[0102] score=ω1*score1+ω2*score2+ω3*score3
[0103] Among them, score is used to represent the comprehensive score of the face image quality, ω1 is used to represent the weight coefficient assigned to the posture score value, and the value of ω1 can be set to 0.5, ω2 is used to represent the weight coefficient assigned to the brightness score value, and ω3 is used to represent the weight coefficient assigned to the clarity score value. The values of ω2 and ω3 can be set to 0.25 respectively.
[0104] As an optional implementation, in the above scheme, for specific situations, the above weight selection method can be adjusted according to actual conditions, and the present invention does not limit it.
[0105] The facial image quality assessment method, apparatus, device and storage medium provided in the present embodiment extracts the facial part from a first image to be assessed that is acquired in advance through a face detection algorithm to obtain a second image to be assessed; detects the second image to be assessed and obtains posture index parameters, brightness index parameters and clarity index parameters of the second image to be assessed; and assesses the quality of the first image to be assessed based on the posture index parameters, brightness index parameters and clarity index parameters, thereby achieving the purpose of improving the accuracy of assessing the quality of facial images.
[0106] Generally speaking, the technical solution provided by the present invention is based on a characterization method for measuring relevant indicators of facial image quality (posture index, clarity index, brightness index), and a mathematical model is established based on this, so as to achieve quantitative evaluation of facial image quality. It is a technical method for ensuring the accuracy of evaluating the quality of facial images.
[0107] Figure 3 A schematic diagram of the structure of a facial image quality assessment device provided by an embodiment of the present invention, such as Figure 3 As shown, the facial image quality assessment device 30 includes:
[0108] An extraction module 31 is used to extract a face part from a first image to be evaluated acquired in advance by using a face detection algorithm to obtain a second image to be evaluated;
[0109] A detection module 32, used to detect the second image to be evaluated, and obtain a posture index parameter, a brightness index parameter, and a clarity index parameter of the second image to be evaluated;
[0110] The evaluation module 33 is used to evaluate the quality of the first image to be evaluated based on the posture index parameter, the brightness index parameter and the clarity index parameter.
[0111] Optionally, the detection module 32 is also used to perform image alignment processing on the second image to be evaluated to obtain image detection frame data and image key point information; determine the first parameter based on the image detection frame data, and determine the second parameter based on the image key point information, wherein the posture indicator parameter includes the first parameter and the second parameter.
[0112] Optionally, the detection module 32 is also used to perform grayscale conversion processing on the second image to be evaluated to obtain a grayscale image; obtain a first brightness mean of all pixels of the grayscale image; determine a second brightness mean and an average deviation value of each pixel of the second image to be evaluated that deviates from the first brightness mean based on the first brightness mean; obtain a quotient between the second brightness mean and the average deviation value; and determine the quotient as a brightness index parameter.
[0113] Optionally, the detection module 32 is further configured to obtain a target variation value based on the second image to be evaluated; and determine the target variation value as a clarity index parameter.
[0114] Optionally, the evaluation module 33 is also used to input the posture index parameters into the posture evaluation model for processing to obtain the posture score value, wherein the posture evaluation model is obtained by training the posture index parameters and the posture score value; input the brightness index parameters into the brightness evaluation model for processing to obtain the brightness score value, wherein the brightness evaluation model is obtained by training the brightness index parameters and the brightness score value; input the clarity index parameters into the clarity evaluation model for processing to obtain the clarity score value, wherein the clarity evaluation model is obtained by training the clarity index parameters and the clarity score value; and evaluate the quality of the first image to be evaluated based on the posture score value, the brightness score value and the clarity score value.
[0115] Optionally, the evaluation module 33 is also used to pre-set an angle threshold and determine a target angle value based on the image key point information, wherein the second parameter includes a target angle value, and the target angle value is used to characterize the angle between the image key point and the horizontal edge of the image detection frame; when the target angle value is greater than the angle threshold, the posture score value is determined to be 0; when the target angle value is not greater than the angle threshold, the first parameter is input into the posture evaluation model for processing to obtain the posture score value.
[0116] The facial image quality assessment device provided in this embodiment is used to execute the technical solution in the aforementioned method embodiment. Its implementation principle and technical effect are similar and will not be described in detail here.
[0117] Figure 4 FIG. 1 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 4 As shown, the electronic device 400 includes:
[0118] Processor 411, memory 412, and interactive interface 413;
[0119] The memory 412 is used to store executable instructions of the processor 411;
[0120] The processor 411 is configured to execute the technical solution in the aforementioned image quality assessment method by executing executable instructions.
[0121] Optionally, the memory 412 may be independent or integrated with the processor 411 .
[0122] Optionally, when the memory 412 is a device independent of the processor 411, the electronic device 400 may further include:
[0123] A bus is used to connect the above devices.
[0124] The electronic device is used to execute the technical solution provided by the aforementioned method embodiment. Its implementation principle and technical effect are similar to those in the aforementioned method embodiment and will not be repeated here.
[0125] An embodiment of the present invention further provides a readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for evaluating the quality of facial images provided in the aforementioned embodiment is implemented.
[0126] An embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, is used to implement the method for evaluating the quality of facial images provided by the aforementioned method embodiment.
[0127] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0128] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for evaluating the quality of a face image, characterized in that: include: Extracting a face part from a pre-acquired first image to be evaluated by using a face detection algorithm to obtain a second image to be evaluated; Detecting the second image to be evaluated, and obtaining a posture index parameter, a brightness index parameter, and a clarity index parameter of the second image to be evaluated; Evaluate the quality of the first image to be evaluated based on the posture index parameter, the brightness index parameter and the clarity index parameter; Acquiring the posture index parameters of the second image to be evaluated includes: Performing image alignment processing on the second image to be evaluated to obtain image detection frame data and image key point information; the image detection frame data includes the width and height of the image detection frame; the image key point information includes the position information of the facial features; The ratio of the height to the width of the image detection frame is determined as a first parameter, and a first horizontal edge is determined based on the position information of the facial features, and an angle θ between the first horizontal edge and the horizontal edge of the image detection frame is determined as a second parameter, wherein the posture indicator parameter includes the first parameter and the second parameter; the first horizontal edge is an edge where a line segment between two mouth corners is located or an edge where a line segment between two eyeballs is located; Acquiring a brightness index parameter of the second image to be evaluated includes: Performing grayscale conversion processing on the second image to be evaluated to obtain a grayscale image; Obtaining a preset first brightness mean value of all pixels of the grayscale image; Determine, based on the first brightness mean, a second brightness mean and an average deviation value of each pixel point of the second image to be evaluated that deviates from the first brightness mean; Obtaining a quotient between the second brightness mean and the average deviation value; The quotient is determined as the brightness index parameter.
2. The method according to claim 1, characterized in that Obtaining a definition index parameter of the second image to be evaluated includes: Acquire a target variation value based on the second image to be evaluated; The target variation value is determined as the clarity index parameter.
3. The method according to any one of claims 1 to 2, characterized in that: The method of evaluating the quality of the first image to be evaluated based on the posture index parameter, the brightness index parameter, and the clarity index parameter includes: Inputting the posture index parameters into a posture evaluation model for processing to obtain a posture score value, wherein the posture evaluation model is obtained by training the posture index parameters and the posture score value; Inputting the brightness index parameter into a brightness evaluation model for processing to obtain a brightness score value, wherein the brightness evaluation model is obtained by training the brightness index parameter and the brightness score value; Inputting the clarity index parameter into a clarity evaluation model for processing to obtain a clarity score value, wherein the clarity evaluation model is obtained by training the clarity index parameter and the clarity score value; The quality of the first image to be evaluated is evaluated based on the posture score value, the brightness score value, and the clarity score value.
4. The method according to claim 3, characterized in that The posture index parameters are input into the posture evaluation model for processing to obtain a posture score value, including: Presetting an angle threshold, and determining a target angle value based on the image key point information, wherein the second parameter includes the target angle value, and the target angle value is used to characterize the angle between the image key point and the horizontal side of the image detection frame; When the target angle value is greater than the angle threshold, determining that the posture score value is 0; When the target angle value is not greater than the angle threshold, the first parameter is input into a posture evaluation model for processing to obtain the posture score value.
5. A device for evaluating the quality of a face image, characterized in that: include: An extraction module, used for extracting a face part from a pre-acquired first image to be evaluated by using a face detection algorithm, to obtain a second image to be evaluated; A detection module, used to detect the second image to be evaluated, and obtain a posture index parameter, a brightness index parameter, and a clarity index parameter of the second image to be evaluated; An evaluation module, used for evaluating the quality of the first image to be evaluated based on the posture index parameter, the brightness index parameter and the clarity index parameter; The detection module, when used to obtain the posture index parameters of the second image to be evaluated, is specifically used to perform image alignment processing on the second image to be evaluated to obtain image detection frame data and image key point information; the image detection frame data includes the width and height of the image detection frame; the image key point information includes the position information of the facial features; The ratio of the height to the width of the image detection frame is determined as a first parameter, and a first horizontal edge is determined based on the position information of the facial features, and an angle θ between the first horizontal edge and the horizontal edge of the image detection frame is determined as a second parameter, wherein the posture indicator parameter includes the first parameter and the second parameter; the first horizontal edge is an edge where a line segment between two mouth corners is located or an edge where a line segment between two eyeballs is located; The detection module, when used to obtain the brightness index parameter of the second image to be evaluated, is specifically used to perform grayscale conversion processing on the second image to be evaluated to obtain a grayscale image; Obtaining a preset first brightness mean value of all pixels of the grayscale image; Determine, based on the first brightness mean, a second brightness mean and an average deviation value of each pixel point of the second image to be evaluated that deviates from the first brightness mean; Obtaining a quotient between the second brightness mean and the average deviation value; The quotient is determined as the brightness index parameter.
6. An electronic device, characterized in that: include: Processor, memory, and interactive interface; The memory is used to store executable instructions of the processor; Wherein, the processor is configured to execute the facial image quality assessment method described in any one of claims 1 to 4 by executing the executable instructions.
7. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for evaluating the quality of a facial image according to any one of claims 1 to 4 is implemented.
8. A computer program product, characterized in that It comprises a computer program, which, when executed by a processor, is used to implement the method for evaluating the quality of a facial image as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Face photo quality evaluation method, system and device and storage medium
CN111160284A
Face recognition image extraction method and processing equipment
CN111199197A