Method, device and equipment for evaluating quality of face image and storage medium
1. A method for evaluating the quality of a face image is characterized by comprising the following steps:
extracting a face part from a first image to be evaluated acquired in advance through a face detection algorithm to obtain a second image to be evaluated;
detecting the second image to be evaluated, and acquiring a posture index parameter, a brightness index parameter and a definition index parameter of the second image to be evaluated;
and evaluating the quality of the first image to be evaluated based on the attitude index parameter, the brightness index parameter and the definition index parameter.
2. The method according to claim 1, wherein obtaining the pose index parameter of the second image to be evaluated comprises:
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 keypoint information, wherein the pose index parameter comprises the first parameter and the second parameter.
3. The method according to claim 1, wherein obtaining the brightness index parameter of the second image to be evaluated comprises:
performing gray scale conversion processing on the second image to be evaluated to obtain a gray scale image;
acquiring a first brightness mean value of all pixel points of the gray level image;
determining a second brightness mean value and an average deviation value of each pixel point of the second image to be evaluated deviating from the first brightness mean value based on the first brightness mean value;
obtaining a quotient between the second brightness mean value and the average deviation value;
determining the quotient as the brightness indicator parameter.
4. The method according to claim 1, wherein obtaining a sharpness index parameter of the second image to be evaluated comprises:
acquiring a target variation value based on the second image to be evaluated;
determining the target variance value as the sharpness indicator parameter.
5. The method according to any one of claims 2 to 4, wherein evaluating the quality of the first image to be evaluated based on the pose index parameter, the brightness index parameter and the sharpness index parameter comprises:
inputting the attitude index parameters into an attitude evaluation model for processing to obtain attitude score values, wherein the attitude evaluation model is obtained by training the attitude index parameters and the attitude score values;
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 definition index parameters into a definition evaluation model for processing to obtain a definition score value, wherein the definition evaluation model is obtained by training the definition index parameters and the definition score value;
and evaluating the quality of the first image to be evaluated based on the posture score value, the brightness score value and the definition score value.
6. The method of claim 5, wherein inputting the pose index parameters into a pose evaluation model for processing to obtain a pose score value comprises:
presetting an angle threshold value, and determining a target angle value based on the image key point information, wherein the second parameter comprises the target angle value, and the target angle value is used for representing an included angle between the image key point and a horizontal edge of the image detection frame;
determining that the pose score value is 0 if the target angle value is greater than the angle threshold value;
and under the condition that the target angle value is not larger than the angle threshold value, inputting the first parameter into a posture evaluation model for processing to obtain the posture score value.
7. An apparatus for evaluating the quality of a face image, comprising:
the extraction module is used for extracting a face part from a first image to be evaluated acquired in advance through a face detection algorithm to obtain a second image to be evaluated;
the detection module is used for detecting the second image to be evaluated and acquiring a posture index parameter, a brightness index parameter and a definition index parameter of the second image to be evaluated;
and the evaluation module is used for evaluating the quality of the first image to be evaluated based on the posture index parameter, the brightness index parameter and the definition index parameter.
8. An electronic device, comprising:
a processor, a memory, an interactive interface;
the memory is used for storing executable instructions of the processor;
wherein the processor is configured to execute the evaluation method of facial image quality of any one of claims 1 to 6 via execution of the executable instructions.
9. A readable storage medium on which a computer program is stored, the computer program, when being executed by a processor, implementing the method of evaluating the quality of a face image according to any one of claims 1 to 6.
10. A computer program product comprising a computer program which, when executed by a processor, is adapted to implement the method of assessing the quality of a facial image of any one of claims 1 to 6.
Background
At present, with the rapid development of computer technology and biometric technology, face recognition has become a common method for collecting identity information. For the face recognition technology, the quality of a face image is usually evaluated through factors such as the brightness and the definition of the face image and the posture of a face, but with the increasing requirements of various fields on the quality of the face image, the poor quality of the face image causes that a face recognition system cannot accurately recognize results, and further the performance of the whole face recognition system is influenced.
In the prior art, in order to reduce the performance reduction of a face recognition system caused by the low quality of a face image, the quality of the face image is evaluated mainly by a full reference image quality evaluation method, the method is mainly divided into an evaluation method based on image pixel statistics, an evaluation method based on information entropy in an information theory and an evaluation method based on structural information, and the quality of the image to be evaluated is judged by calculating the global size of pixel errors between the image to be evaluated and a reference image or the structural similarity between the image to be evaluated and the reference image. However, the image quality evaluation method not only needs to provide a reference image, but also cannot evaluate the pose of the human face, so that the human face recognition system cannot accurately evaluate the quality of the human face image.
In summary, in the image quality evaluation scheme in the prior art, the accuracy of evaluating the quality of the face image is low.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a storage medium for evaluating the quality of a face image, which are used for solving the problem that the precision of evaluating the quality of the face image is low in the evaluation scheme of the quality of the face image in the prior art.
In a first aspect, an embodiment of the present invention provides a method for evaluating quality of a face image, including:
extracting a face part from a first image to be evaluated acquired in advance through a face detection algorithm to obtain a second image to be evaluated;
detecting a second image to be evaluated, and acquiring a posture index parameter, a brightness index parameter and a definition index parameter of the second image to be evaluated;
and evaluating the quality of the first image to be evaluated based on the attitude index parameter, the brightness index parameter and the definition index parameter.
In a specific embodiment, obtaining a pose index parameter of a second image to be evaluated includes:
carrying out image alignment processing on the second image to be evaluated to obtain image detection frame data and image key point information;
and determining a first parameter based on the image detection frame data and a second parameter based on the image key point information, wherein the posture index parameter comprises the first parameter and the second parameter.
In a specific embodiment, the acquiring a brightness index parameter of a second image to be evaluated includes:
carrying out gray level conversion processing on the second image to be evaluated to obtain a gray level image;
acquiring a first brightness mean value of all pixel points of a gray level image;
determining a second brightness mean value and an average deviation value of each pixel point of a second image to be evaluated deviating from the first brightness mean value based on the first brightness mean value;
obtaining a quotient between the second brightness average value and the average deviation value;
the quotient is determined as a brightness index parameter.
In a specific embodiment, the obtaining of the sharpness 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 a definition index parameter.
In one embodiment, the evaluating the quality of the first image to be evaluated based on the pose index parameter, the brightness index parameter, and the sharpness index parameter includes:
inputting the attitude index parameters into an attitude evaluation model for processing to obtain attitude score values, wherein the attitude evaluation model is obtained by training the attitude index parameters and the attitude score values;
inputting the brightness index parameters into a brightness evaluation model for processing to obtain brightness score values, wherein the brightness evaluation model is obtained by training the brightness index parameters and the brightness score values;
inputting the definition index parameters into a definition evaluation model for processing to obtain definition score values, wherein the definition evaluation model is obtained by training the definition index parameters and the definition score values;
and evaluating the quality of the first image to be evaluated based on the posture score value, the brightness score value and the definition score value.
In a specific embodiment, inputting the posture index parameter into the posture evaluation model for processing to obtain a posture score value, including:
presetting an angle threshold value, and determining a target angle value based on the image key point information, wherein the second parameter comprises the target angle value which is used for representing an included angle between the image key point and a horizontal edge of the image detection frame;
determining the attitude score value to be 0 under the condition that the target angle value is greater than the angle threshold value;
and under the condition that the target angle value is not larger than the angle threshold value, inputting the first parameter into the attitude evaluation model for processing to obtain an attitude score value.
In a second aspect, an embodiment of the present invention provides an apparatus for evaluating a quality of a face image, including:
the extraction module is used for extracting a face part from a first image to be evaluated acquired in advance through a face detection algorithm to obtain a second image to be evaluated;
the detection module is used for detecting a second image to be evaluated and acquiring a posture index parameter, a brightness index parameter and a definition index parameter of the second image to be evaluated;
and the evaluation module is used for evaluating the quality of the first image to be evaluated based on the posture index parameter, the brightness index parameter and the definition index parameter.
In a third aspect, an embodiment of the present invention provides an electronic device, including:
a processor, a memory, an interactive interface;
the memory is used for storing executable instructions of the processor;
wherein the processor is configured to execute the method for evaluating the quality of a facial image according to the first aspect via executing the executable instructions.
In a fourth aspect, an embodiment of the present invention provides a readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for evaluating the quality of a facial image according to the first aspect.
In a fifth aspect, an embodiment of the present invention provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the computer program is used to implement the method for evaluating the quality of a face image according to the first aspect.
According to the method, the device and the equipment for evaluating the quality of the face image and the storage medium, the face part is extracted from a first image to be evaluated which is obtained in advance through a face detection algorithm, and a second image to be evaluated is obtained; detecting a second image to be evaluated, and acquiring a posture index parameter, a brightness index parameter and a definition index parameter of the second image to be evaluated; the quality of the first image to be evaluated is evaluated based on the posture index parameter, the brightness index parameter and the definition index parameter, and the purpose of improving the accuracy of evaluating the quality of the face image is achieved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of a method for evaluating quality of a face image according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for evaluating the quality of a face image according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an apparatus for evaluating quality of a face image according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments based on the embodiments in the present invention, which can be made by those skilled in the art in light of the present disclosure, are within the scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the prior art provided in the background art, the scheme for evaluating the quality of a face image at least has the following technical problems:
1) the distortion of the face image is serious, so that the face recognition system cannot accurately recognize the result.
2) The evaluation method based on the quality of the full reference image evaluates the quality of the face image, not only needs to provide the reference image, but also cannot evaluate the posture condition of the face, so that the face recognition system cannot accurately evaluate the quality of the face image.
Aiming at the problems, the invention provides a method for evaluating the quality of a face image, which can realize accurate evaluation of the face image only through one image to be evaluated without other reference images, and respectively obtains corresponding index factors by comprehensively evaluating the posture, the definition and the brightness of the face image, thereby determining the scores of the face image in the aspects of the posture, the definition and the brightness respectively according to the obtained index factors, and obtaining the comprehensive score of the quality of the face image by synthesizing the three scores. The terms referred to in the present invention will be explained first.
Image Quality Assessment (Image Quality Assessment, abbreviated as IQA): one of the basic techniques in image processing is to perform characteristic analysis and research on an image and then evaluate the quality of the image, i.e., the degree of image distortion.
The core idea of the method for evaluating the quality of the face image provided by the invention is to extract a face part in an image to be evaluated by adopting a face detection algorithm, evaluate the posture, the definition and the brightness of the face part to respectively obtain the posture score value, the definition score value and the brightness score value of the face part, calculate the comprehensive score value of the face image according to the posture score value, the definition score value and the brightness score value, and judge the quality of the face image through the obtained comprehensive score value, so that the accurate quality evaluation can be carried out on the face image by only one image to be evaluated on the basis of not using a reference image, thereby overcoming the problem which is easy to occur in the image quality evaluation.
Fig. 1 is a schematic view of an application scene of a method for evaluating human face image quality according to an embodiment of the present invention, as shown in fig. 1, in the scene, for example, a camera at an airport or a station is taken as an example, an image acquisition module in the camera acquires a pedestrian image, and stores the pedestrian image, where the pedestrian image may be a video image or a picture image, and an image transmission module in the camera selects one frame or one picture of the pedestrian images as an image to be evaluated after the image acquisition module acquires the pedestrian image, and transmits the image to a computer device, and a human face recognition system in the computer device evaluates image quality.
Based on the scene shown in fig. 1, in the present scheme, after receiving an image to be evaluated sent by an image sending module of a camera, a computer device performs preprocessing on the image to be evaluated by using a face detection algorithm through a face recognition system, calculates a posture score, a definition score and a brightness score on the face part after detecting the face part, then determines a tilt condition, a definition condition and a brightness condition of the face part in the image to be evaluated, and finally integrates the three scores, evaluates the quality of the image to be evaluated according to the condition of the integrated score, wherein the higher the integrated score is, the better the quality of the image to be evaluated is.
The following describes the method for evaluating the quality of a face image in detail through several embodiments.
Fig. 2 is a flowchart of a method for evaluating the quality of a face image according to an embodiment of the present invention, and as shown in fig. 2, the method for evaluating the quality of a face image includes the following steps:
s201: and extracting a face part from the pre-acquired first image to be evaluated through a face detection algorithm to obtain a second image to be evaluated.
In this step, the first image to be evaluated may be obtained in advance through the image acquisition device, and since the first image to be evaluated is the most original image obtained, and the image may include various backgrounds and other portions unrelated to the face image, the face portion in the first image to be evaluated may be extracted by using a face detection algorithm, so as to directly perform quality evaluation on the face portion in the following step.
As an optional implementation, in addition to the face detection algorithm, the face part may be extracted from the first image to be evaluated, and a conventional image processing method may be adopted, for example, a Scale-invariant feature transform (SIFT for short) and a Histogram of Gradient directions (HOG) are used to extract features of the face image, so as to implement detection of the face in the image.
S202: and detecting a second image to be evaluated, and acquiring a posture index parameter, a brightness index parameter and a definition index parameter of the second image to be evaluated.
In this step, after a second image to be evaluated of the face part is extracted from the first image to be evaluated, the posture index parameter, the brightness index parameter and the definition index parameter of the second image to be evaluated can be obtained by processing the second image to be evaluated.
In a specific implementation, processing the second image to be evaluated to obtain the posture index parameter of the second image to be evaluated includes: carrying out image alignment processing on the second image to be evaluated to obtain image detection frame data and image key point information; and determining a first parameter based on the image detection frame data and a second parameter based on the image key point information, wherein the posture index parameter comprises the first parameter and the second parameter.
In the scheme, the second image to be evaluated is subjected to the alignment processing such as affine transformation, so that a face image with a specific size and the position information of key points of the face in the face image can be obtained, the face image with the specific size is determined through an image detection frame, the image detection frame is also a face image detection frame, when the posture of the second image to be evaluated is detected subsequently, the face part in the image detection frame is detected, and the position information of the key points of the face in the face image can be determined through the face part in the image detection frame, for example, the position of five sense organs on the face.
In the above solution, the image detection frame data includes size information of the image detection frame, for example, a width and a height of the face image detection frame, and a first parameter may be determined according to the width and the height of the face image detection frame, and a calculation formula of the first parameter may be as follows:
where λ is used to denote a first parameter, hboxFor indicating the height, w, of the detection frame of the face imageboxFor indicating the width of the face image detection box.
In the above scheme, the key point information of the face image includes position information of the facial features, etc., and a second parameter may be determined according to the position information of the facial features, where the second parameter may be an angle value, and the angle value may be an angle θ between the facial features and a horizontal side of the image detection frame, for example, an angle between a line segment between two mouth corners and a lower horizontal side of the image detection frame, or an angle between a line segment between two eyeballs and an upper horizontal side, etc.
In a specific implementation, processing the second image to be evaluated to obtain a brightness index parameter of the second image to be evaluated includes: carrying out gray level conversion processing on the second image to be evaluated to obtain a gray level image; acquiring a first brightness mean value of all pixel points of a gray level image; determining a second brightness mean value and an average deviation value of each pixel point of a second image to be evaluated deviating from the first brightness mean value based on the first brightness mean value; obtaining a quotient between the second brightness average value and the average deviation value; the quotient is determined as a brightness index parameter.
In this embodiment, the first luminance average value is preset, and the setting value is 128, and the calculation formula of the second luminance average value is as follows:
N=width*height
wherein D is used for representing the second brightness mean value which is a positive value, N is used for representing the number of all pixel points, and xiThe method is used for expressing the brightness value of each pixel point of the gray level image, the width is used for expressing the width of the gray level image, and the height is used for expressing the height of the gray level image.
The average deviation value is calculated as follows:
where M is used to represent the average deviation value and Hist is used to represent the histogram of the gray scale image.
The calculation formula of the brightness index parameter is as follows:
where k is used to represent a luminance index parameter.
In a specific implementation, processing the second image to be evaluated to obtain a sharpness 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 a definition index parameter.
In this scheme, a target variance value may be directly calculated from the second image to be evaluated, where the target variance value may be a Laplacian variance value (variance of Laplacian), and the calculated Laplacian variance value is directly defined as the sharpness index parameter d.
As an optional implementation manner, when evaluating the quality of the face image, besides the above-mentioned attitude index parameter, luminance index parameter and sharpness index parameter, a method for objectively evaluating the image quality may be adopted, for example, a method for evaluating the quality of a full-reference image, a method for evaluating the quality of a partial-reference image, a method for evaluating the quality of a no-reference image, and the like, or a method for objectively evaluating the quality of a face image is finally realized by adopting the above-mentioned three index parameters and combining with a conventional method for objectively evaluating the image quality.
As an optional implementation manner, in the above scheme, besides the evaluation of the pose, brightness and sharpness of the face image by using the image area of the face image in the image detection frame, the whole image including the face may be selected for evaluation.
S203: and evaluating the quality of the first image to be evaluated based on the attitude index parameter, the brightness index parameter and the definition index parameter.
In this step, after the posture index parameter, the brightness index parameter and the definition index parameter are obtained, the posture score value, the brightness score value and the definition score value can be obtained through calculation respectively, and the three score values are comprehensively calculated to obtain the comprehensive score value, so that the quality of the image to be evaluated is evaluated based on the score condition of the comprehensive score value.
In one particular implementation, calculating a pose score value based on a pose index parameter includes: and inputting the attitude index parameters into an attitude evaluation model for processing to obtain an attitude score value.
In the scheme, the posture evaluation model is obtained by training the posture index parameters and the posture score values, and an angle threshold value theta can be preset when the posture score values are obtained0And determining a target angle value based on the image key point information, wherein the second parameter comprises a target angle value theta, and the target angle value is used for representing an included angle between the image key point and a horizontal edge of the image detection frame.
In the above scheme, if θ > θ0If the horizontal edge of the image detection frame is not inclined, the horizontal edge of the image detection frame is inclined, and the inclination degree is too large, at this moment, the gesture score value is 0; if theta is less than or equal to theta0Then, it means that the inclination degree of the face part with respect to the horizontal side of the image detection frame is acceptable, and at this time, the pose score value can be determined only by the first parameter λ, that is, the first parameter is input into the pose evaluation model for processing,the pose score value can be obtained, and the pose evaluation model can be represented by the following function:
wherein, score1For representing the pose score value.
In one particular implementation, calculating a pose score value based on a luminance index parameter includes: and inputting the brightness index parameters into a brightness evaluation model for processing to obtain a brightness score value.
In this scheme, the luminance evaluation model is obtained by training the luminance index parameter k and the luminance score value, and may be represented as follows by a function:
wherein, score2For representing the luminance score value.
In one particular implementation, calculating a sharpness score value based on a sharpness index parameter includes: and inputting the definition index parameters into a definition evaluation model for processing to obtain a definition score value.
In the scheme, the definition evaluation model is obtained by training a definition index parameter d and a definition score value, and can be represented as follows through a function:
wherein, score3For representing the sharpness score value.
In one particular implementation, after obtaining the pose score value, the brightness score value, and the sharpness score value, the quality of the first image to be evaluated may be evaluated based on the pose score value, the brightness score value, and the sharpness score value.
In the scheme, because the posture index, the definition index and the brightness index of the face image have different effects of improving the accuracy and the recall rate of the face recognition system, different weight coefficients can be respectively given to the posture score value, the definition score value and the brightness score value so as to finally calculate the comprehensive score of the face image quality according to the posture score value, the definition score value and the brightness score value of the face image, and the calculation formula of the comprehensive score is as follows:
score=ω1*score1+ω2*score2+ω3*score3
wherein score is used for representing the comprehensive score of the quality of the face image, omega1For expressing the weight coefficient, ω, given to the attitude score value1May be set to a value of 0.5, ω2For expressing the weight coefficient, ω, given to the luminance score value3For representing a weight coefficient, ω, assigned to a sharpness score value2And ω3May be set to 0.25, respectively.
As an optional implementation manner, in the above scheme, for a specific situation, the weight selection manner may be adjusted according to an actual situation, and the present invention is not limited.
According to the method, the device, the equipment and the storage medium for evaluating the quality of the face image, a face part is extracted from a first image to be evaluated which is obtained in advance through a face detection algorithm, and a second image to be evaluated is obtained; detecting a second image to be evaluated, and acquiring a posture index parameter, a brightness index parameter and a definition index parameter of the second image to be evaluated; the quality of the first image to be evaluated is evaluated based on the posture index parameter, the brightness index parameter and the definition index parameter, and the purpose of improving the accuracy of evaluating the quality of the face image is achieved.
In general, the technical scheme provided by the invention is based on a characterization method of related indexes (posture index, definition index and brightness index) for measuring the quality of the face image and a mathematical model is established based on the characterization method, so that the quantitative evaluation of the quality of the face image is realized, and the method is a realization technical method for ensuring the accuracy of the evaluation of the quality of the face image.
Fig. 3 is a schematic structural diagram of an evaluation apparatus for facial image quality according to an embodiment of the present invention, and as shown in fig. 3, the evaluation apparatus 30 for facial image quality includes:
the extracting module 31 is configured to extract a face part from a first image to be evaluated, which is obtained in advance, through a face detection algorithm to obtain a second image to be evaluated;
the detection module 32 is configured to detect a second image to be evaluated, and acquire a posture index parameter, a brightness index parameter, and a definition index parameter of the second image to be evaluated;
and the evaluation module 33 is configured to evaluate the quality of the first image to be evaluated based on the posture index parameter, the brightness index parameter, and the sharpness index parameter.
Optionally, the detection module 32 is further configured to perform image alignment processing on the second image to be evaluated to obtain image detection frame data and image key point information; and determining a first parameter based on the image detection frame data and a second parameter based on the image key point information, wherein the posture index parameter comprises the first parameter and the second parameter.
Optionally, the detection module 32 is further configured to perform gray scale conversion processing on the second image to be evaluated to obtain a gray scale image; acquiring a first brightness mean value of all pixel points of a gray level image; determining a second brightness mean value and an average deviation value of each pixel point of a second image to be evaluated deviating from the first brightness mean value based on the first brightness mean value; obtaining a quotient between the second brightness average value and the average deviation value; the quotient is determined as a brightness index parameter.
Optionally, the detection module 32 is further configured to obtain a target variance value based on the second image to be evaluated; and determining the target variation value as a definition index parameter.
Optionally, the evaluation module 33 is further configured to input the posture index parameter into a posture evaluation model for processing, so as to obtain a posture score value, where the posture evaluation model is obtained by training the posture index parameter and the posture score value; inputting the brightness index parameters into a brightness evaluation model for processing to obtain brightness score values, wherein the brightness evaluation model is obtained by training the brightness index parameters and the brightness score values; inputting the definition index parameters into a definition evaluation model for processing to obtain definition score values, wherein the definition evaluation model is obtained by training the definition index parameters and the definition score values; and evaluating the quality of the first image to be evaluated based on the posture score value, the brightness score value and the definition score value.
Optionally, the evaluation module 33 is further configured to preset an angle threshold, and determine a target angle value based on the image key point information, where the second parameter includes the target angle value, and the target angle value is used to represent an included angle between the image key point and a horizontal edge of the image detection frame; determining the attitude score value to be 0 under the condition that the target angle value is greater than the angle threshold value; and under the condition that the target angle value is not larger than the angle threshold value, inputting the first parameter into the attitude evaluation model for processing to obtain an attitude score value.
The device for evaluating the quality of a face image provided by this embodiment is used to implement the technical solutions in the foregoing method embodiments, and the implementation principle and technical effect are similar, which are not described herein again.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. As shown in fig. 4, the electronic device 400 includes:
a processor 411, a memory 412, and an interaction interface 413;
the memory 412 is used for storing executable instructions of the processor 411;
wherein, the processor 411 is configured to execute the technical solution in the aforementioned evaluation method of image quality via executing the executable instructions.
Alternatively, the memory 412 may be separate or integrated with the processor 411.
Optionally, when the memory 412 is a device separate from the processor 411, the electronic device 400 may further include:
and the bus is used for connecting the devices.
The electronic device is configured to execute the technical solution provided by the foregoing method embodiment, and the implementation principle and technical effect of the electronic device are similar to those in the foregoing method embodiment, and are not described herein again.
The embodiment of the invention also provides a readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the method for evaluating the quality of the face image provided by the foregoing embodiment.
The embodiment of the present invention further provides a computer program product, which includes a computer program, and the computer program is used for implementing the method for evaluating the quality of a face image provided by the foregoing method embodiment when being executed by a processor.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.