Facial image quality assessment method, device and electronic device
By using the face orientation detection model and confidence to represent image quality, the problem of high labeling costs and poor accuracy in the facial image quality evaluation method in the prior art is solved, and a lower cost and higher accuracy facial image quality evaluation is achieved.
Patent Information
- Application Number
- CN202011037197.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-27
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2040-09-27
AI Technical Summary
In the existing facial image quality evaluation methods, the labeling cost during model training is high, the labeling samples are not comprehensive and objective enough, and the final facial image quality is poor.
The face orientation detection model is used to detect the face orientation of the evaluated facial image. The image quality is represented by detecting the confidence of the model. The training model only needs to mark the face orientation angle information, which is low in labeling and more objective.
The image quality is characterized by the confidence of the face orientation angle information, and a more objective and accurate facial image quality evaluation is achieved, reducing the labeling cost and improving the comprehensiveness and accuracy of the evaluation.
Smart Images

Figure CN112307900B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method, device and electronic equipment for evaluating the quality of facial images. Background Art
[0002] There are currently two methods for evaluating facial image quality. One is to label all occlusion, large angle, blur, non-target face, etc., and let the model directly learn these data and labels. The other is to label the facial image samples with occlusion degree, occlusion area, and facial orientation. The model learns all the information, and finally manually gives the weights corresponding to the above attributes to calculate the final facial image quality.
[0003] Both of the above methods define image quality manually. The quality of these facial images is for the "human eye" rather than for the model. Some images that the human eye considers to be of low quality may be recognizable for the model, and some images that the human eye considers to be recognizable may be of low quality for the model. Therefore, the results obtained by the above methods cannot adapt well to the characteristics of the model itself. In addition, the above two methods require annotation of various types of image quality (including occlusion, blur, large angle, and faces of non-target objects), and the annotation types are wide and the annotation cost is high. In addition, in the above two methods, the annotation data can often only cover some aspects of the image quality attributes, and it is difficult to traverse all the image quality attributes (for example: the quality of the image also includes whether there is noise, whether there is a coding error, etc.), which makes the image quality information learned by the model incomplete, and the accuracy of the final determined facial image quality is poor.
[0004] In summary, in the existing facial image quality assessment methods, the annotation cost during model training is high, the annotated samples are not comprehensive and objective, and the final determined facial image quality has poor accuracy. Summary of the invention
[0005] In view of this, the purpose of the present invention is to provide a facial image quality assessment method, device and electronic device to alleviate the technical problems in the existing facial image quality assessment method, such as high labeling cost during model training, insufficient comprehensiveness and objectivity of labeled samples, and poor accuracy of the final determined facial image quality.
[0006] In a first aspect, an embodiment of the present invention provides a method for evaluating facial image quality, comprising: obtaining a facial image to be evaluated of a target object; performing facial orientation detection on the facial image to be evaluated using a facial orientation detection model to obtain a confidence level of facial orientation angle information of the target object, wherein the confidence level is used to characterize the accuracy of the facial orientation angle information of the target object; and using the confidence level as the image quality of the facial image to be evaluated.
[0007] Furthermore, after obtaining the image quality of the facial image to be evaluated, the method also includes: obtaining a preset confidence threshold; screening the facial image to be evaluated based on the preset confidence threshold and the image quality of the facial image to be evaluated to obtain a high-quality facial image to be evaluated, wherein the image quality of the high-quality facial image to be evaluated is greater than the preset confidence threshold.
[0008] Furthermore, the facial orientation detection model includes: a facial orientation branch and a confidence branch; the facial orientation branch is used to detect facial orientation angle information of a target object in the facial image to be evaluated based on the facial image to be evaluated; and the confidence branch is used to detect the confidence of the facial orientation angle information of the target object in the facial image to be evaluated based on the facial image to be evaluated.
[0009] Furthermore, the method also includes: obtaining multiple training sample images containing the face of the training object and the facial orientation angle information of the training object in each training sample image; training the original model of the facial orientation detection model using the multiple training sample images and the facial orientation angle information of the training object in each training sample image to obtain the facial orientation detection model.
[0010] Furthermore, the original model of the facial orientation detection model includes: a facial orientation branch to be trained and a confidence branch to be trained; training the original model of the facial orientation detection model through the multiple training sample images and the facial orientation angle information of the training object in each training sample image includes: training the facial orientation branch to be trained through the multiple training sample images and the facial orientation angle information of the training object in each training sample image to obtain the facial orientation branch of the facial orientation detection model; training the confidence branch to be trained based on the multiple training sample images, the facial orientation angle information of the training object in each training sample image and the facial orientation branch of the facial orientation detection model to obtain the confidence branch of the facial orientation detection model; and obtaining the facial orientation detection model according to the facial orientation branch of the facial orientation detection model and the confidence branch of the facial orientation detection model.
[0011] Furthermore, the facial orientation branch includes: a first preset number of convolutional layers, and a second preset number of fully connected layers connected to the first preset number of convolutional layers; the confidence branch includes: the first preset number of convolutional layers, and a third preset number of fully connected layers connected to the first preset number of convolutional layers.
[0012] Furthermore, the facial orientation angle information includes: a facial pitch angle of the target object, a facial yaw angle of the target object, and a facial roll angle of the target object.
[0013] Furthermore, the target object includes any one of the following: human, animal.
[0014] In a second aspect, an embodiment of the present invention further provides a facial image quality evaluation device, comprising: an acquisition unit, for acquiring a facial image to be evaluated of a target object; a detection unit, for performing facial orientation detection on the facial image to be evaluated using a facial orientation detection model, and obtaining a confidence level of the facial orientation angle information of the target object, wherein the confidence level is used to characterize the accuracy of the facial orientation angle information of the target object; and a setting unit, for using the confidence level as the image quality of the facial image to be evaluated.
[0015] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the methods described in the first aspect when executing the computer program.
[0016] In a fourth aspect, an embodiment of the present invention further provides a computer-readable medium having a non-volatile program code executable by a processor, wherein the program code enables the processor to execute the steps of the method described in any one of the first aspects above.
[0017] In an embodiment of the present invention, first, a facial image to be evaluated of a target object is obtained; a facial orientation detection model is used to perform facial orientation detection on the facial image to be evaluated, and the confidence of the facial orientation angle information of the target object is obtained, wherein the confidence is used to characterize the accuracy of the facial orientation angle information of the target object; and the confidence is used as the image quality of the facial image to be evaluated. It can be seen from the above description that in an embodiment of the present invention, a facial orientation detection model is used to evaluate the image quality of the facial image to be evaluated, and the training of the facial orientation detection model is simple, and only the facial orientation angle of the training object in the training sample image needs to be annotated, and the annotation cost is low. In addition, the parameter of the facial orientation angle is more objective and global. The more accurate the facial orientation angle information output by the model is (i.e., the higher the confidence), the more effective information the model obtains from the facial image to be evaluated, that is, the better the quality of the facial image to be evaluated is, that is, the more objective the image quality of the facial image to be evaluated is characterized by the confidence of the facial orientation angle information, the better the accuracy is, and the reference value is high, which alleviates the technical problems in the existing facial image quality evaluation method, such as the high annotation cost during model training, the insufficient comprehensiveness and objectivity of the annotation samples, and the poor accuracy of the facial image quality finally determined. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 A schematic diagram of an electronic device provided by an embodiment of the present invention;
[0020] Figure 2 A flowchart of a facial image quality assessment method provided by an embodiment of the present invention;
[0021] Figure 3 A flow chart of a method for training a facial orientation detection model provided by an embodiment of the present invention;
[0022] Figure 4 A schematic diagram of a facial image quality assessment method provided by an embodiment of the present invention;
[0023] Figure 5 A schematic diagram of a facial image quality assessment device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0024] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] Embodiment 1:
[0026] First, refer to Figure 1 1 and 2 to describe an electronic device 100 for implementing an embodiment of the present invention. The electronic device can be used to execute the facial image quality assessment method of each embodiment of the present invention.
[0027] like Figure 1 As shown, the electronic device 100 includes one or more processors 102, one or more memories 104, an input device 106, an output device 108, and a camera 110, and these components are interconnected via a bus system 112 and / or other forms of connection mechanisms (not shown). It should be noted that Figure 1 The components and structures of the electronic device 100 shown are merely exemplary and non-limiting. The electronic device may also have other components and structures as required.
[0028] The processor 102 can be implemented in at least one hardware form of a digital signal processor (DSP), a field programmable gate array (FPGA), a programmable logic array (PLA) and an ASIC (Application Specific Integrated Circuit). The processor 102 can be a central processing unit (CPU) or other forms of processing units with data processing capabilities and / or instruction execution capabilities, and can control other components in the electronic device 100 to perform desired functions.
[0029] The memory 104 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 102 may run the program instructions to implement the client functions (implemented by the processor) and / or other desired functions in the embodiments of the present invention described below. Various applications and various data, such as various data used and / or generated by the application, may also be stored in the computer-readable storage medium.
[0030] The input device 106 may be a device used by a user to input instructions, and may include one or more of a keyboard, a mouse, a microphone, a touch screen, and the like.
[0031] The output device 108 may output various information (eg, images or sounds) to the outside (eg, a user), and may include one or more of a display, a speaker, and the like.
[0032] The camera 110 is used to capture facial images to be evaluated, wherein the facial images to be evaluated captured by the camera are processed by the facial image quality evaluation method to obtain the image quality of the facial images to be evaluated. For example, the camera can shoot facial images to be evaluated (such as photos, videos, etc.) desired by the user, and then the facial images to be evaluated are processed by the facial image quality evaluation method to obtain the image quality of the facial images to be evaluated. The camera can also store the captured facial images to be evaluated in the memory 104 for use by other components.
[0033] Exemplarily, the electronic device for implementing the facial image quality assessment method according to the embodiment of the present invention may be implemented as an intelligent mobile terminal such as a smart phone, a tablet computer, or the like.
[0034] Embodiment 2:
[0035] According to an embodiment of the present invention, an embodiment of a method for evaluating facial image quality is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0036] Figure 2 is a flow chart of a facial image quality assessment method according to an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:
[0037] Step S202, obtaining a facial image to be evaluated of the target object;
[0038] In the embodiment of the present invention, the target object may be a person, an animal, or other physical object with facial orientation information. When the target object is a person, the facial image to be evaluated is the human face image to be evaluated; when the target object is an animal, the facial image to be evaluated is the animal face image to be evaluated.
[0039] When the above-mentioned target object is a person, the facial image to be evaluated of the target object can be multiple facial images to be evaluated of the same person, or multiple facial images to be evaluated of different people (each facial image to be evaluated contains the face of one person), or one facial image to be evaluated containing multiple different faces, or one facial image to be evaluated containing only one face.
[0040] Step S204, using a facial orientation detection model to perform facial orientation detection on the facial image to be evaluated, and obtaining the confidence level of the facial orientation angle information of the target object, wherein the confidence level is used to characterize the accuracy of the facial orientation angle information of the target object;
[0041] The above-mentioned facial orientation detection model is obtained by training the original model of the facial orientation detection model in advance using training sample images annotated with facial orientation angle information of the training object. In the training sample images, the manually annotated facial orientation angle information of the training object is more objective, global, and more adapted to the characteristics of the model itself than the manually annotated information such as the degree of occlusion and the occlusion area. The inventors consider that: when the facial orientation angle information output by the facial orientation detection model is more accurate (that is, the higher the confidence level), it means that the model obtains more effective information from the facial image to be evaluated, that is, the quality of the facial image to be evaluated is better, so the confidence level of the facial orientation angle information can objectively and accurately characterize the image quality of the facial image to be evaluated.
[0042] In an embodiment of the present invention, the above-mentioned facial orientation angle information includes: the target object's facial pitch angle (equivalent to the angle at which the target object's face nods up and down), the target object's facial yaw angle (equivalent to the angle at which the target object's face shakes its head left and right) and the target object's facial roll angle (equivalent to the angle at which the target object's face tilts its head left and right).
[0043] Step S206: taking the confidence level as the image quality of the facial image to be evaluated.
[0044] In an embodiment of the present invention, first, a facial image to be evaluated of a target object is obtained; a facial orientation detection model is used to perform facial orientation detection on the facial image to be evaluated, and the confidence of the facial orientation angle information of the target object is obtained, wherein the confidence is used to characterize the accuracy of the facial orientation angle information of the target object; and the confidence is used as the image quality of the facial image to be evaluated. It can be seen from the above description that in an embodiment of the present invention, a facial orientation detection model is used to evaluate the image quality of the facial image to be evaluated, and the training of the facial orientation detection model is simple, and only the facial orientation angle of the training object in the training sample image needs to be annotated, and the annotation cost is low. In addition, the parameter of the facial orientation angle is more objective and global. The more accurate the facial orientation angle information output by the model is (i.e., the higher the confidence), the more effective information the model obtains from the facial image to be evaluated, that is, the better the quality of the facial image to be evaluated is, that is, the more objective the image quality of the facial image to be evaluated is characterized by the confidence of the facial orientation angle information, the better the accuracy is, and the reference value is high, which alleviates the technical problems in the existing facial image quality evaluation method, such as the high annotation cost during model training, the insufficient comprehensiveness and objectivity of the annotation samples, and the poor accuracy of the facial image quality finally determined.
[0045] The above content briefly introduces the facial image quality evaluation method of the present invention, and its specific application is introduced below.
[0046] In an optional embodiment of the present invention, after obtaining the image quality of the facial image to be evaluated, the method further includes the following steps (1) and (2):
[0047] (1) Obtaining a preset confidence threshold;
[0048] (2) The facial images to be evaluated are screened based on a preset confidence threshold and the image quality of the facial images to be evaluated to obtain high-quality facial images to be evaluated, wherein the image quality of the high-quality facial images to be evaluated is greater than the preset confidence threshold.
[0049] In an embodiment of the present invention, a facial orientation detection model includes: a facial orientation branch and a confidence branch; the facial orientation branch is used to detect facial orientation angle information of a target object in a facial image to be evaluated based on a facial image to be evaluated; and the confidence branch is used to detect the confidence of the facial orientation angle information of the target object in the facial image to be evaluated based on the facial image to be evaluated.
[0050] The following is a detailed introduction to the training process of the face orientation detection model.
[0051] In an alternative embodiment of the present invention, reference Figure 3 ,The training process of the face orientation detection model includes the following steps:
[0052] Step S301, obtaining a plurality of training sample images containing the face of the training object and the facial orientation angle information of the training object in each training sample image;
[0053] Specifically, the facial orientation angle information of the training objects in the training sample images is annotated by manual labeling, and then the annotated facial orientation angle information (including pitch - facial pitch angle, yaw - facial yaw angle, roll - facial roll angle) is used as a supervision signal to train a regression model of face orientation.
[0054] Step S302, training the original model of the face orientation detection model by using a plurality of training sample images and the face orientation angle information of the training object in each training sample image to obtain the face orientation detection model.
[0055] In an embodiment of the present invention, the original model of the face orientation detection model includes: a face orientation branch to be trained and a confidence branch to be trained, wherein the face orientation branch to be trained includes: a first preset number of convolutional layers, a second preset number of fully connected layers connected to the first preset number of convolutional layers; the confidence branch to be trained includes: a first preset number of convolutional layers, a third preset number of fully connected layers connected to the first preset number of convolutional layers. That is, the face orientation branch to be trained and the confidence branch to be trained share a basic convolutional network structure, and the basic convolutional network structure includes the first preset number of convolutional layers.
[0056] Correspondingly, the facial orientation branch includes: a first preset number of convolutional layers, and a second preset number of fully connected layers connected to the first preset number of convolutional layers; the confidence branch includes: a first preset number of convolutional layers, and a third preset number of fully connected layers connected to the first preset number of convolutional layers.
[0057] The first preset number may be 5 layers, the second preset number may be 2 layers, and the third preset number may be 1 layer. The embodiment of the present invention does not specifically limit the above numbers.
[0058] Specifically, training the original model of the face orientation detection model by using a plurality of training sample images and the face orientation angle information of the training object in each training sample image includes:
[0059] 1) training a face orientation branch to be trained by using a plurality of training sample images and the face orientation angle information of the training object in each training sample image, thereby obtaining a face orientation branch of a face orientation detection model;
[0060] During implementation, multiple training sample images and the facial orientation angle information (i.e., pitch, yaw, and roll) of the training object in each training sample image are input into the network of the facial orientation branch to be trained, and the predicted facial orientation angle information is output. The predicted facial orientation angle information is subtracted from the labeled facial orientation angle information to obtain three facial orientation angle losses (i.e., pitch_loss, yaw_loss, and roll_loss). The three facial orientation angle losses are then added together as the loss function of the facial orientation branch network, and this loss function is back-propagated and iterated for multiple rounds until the network converges, so as to train the facial orientation branch of the facial orientation detection model.
[0061] 2) Based on multiple training sample images, the facial orientation angle information of the training object in each training sample image and the facial orientation branch of the facial orientation detection model, the confidence branch to be trained is trained to obtain the confidence branch of the facial orientation detection model, and the facial orientation detection model is obtained according to the facial orientation branch of the facial orientation detection model and the confidence branch of the facial orientation detection model.
[0062] After training the facial orientation branch, continue training the confidence branch. After multiple training sample images and the facial orientation angle information of the training object in each training sample image are input into a first preset number of convolutional layers, a third preset number of fully connected layers connected thereto output pitch uncertainty, yaw uncertainty, and roll uncertainty. The output pitch uncertainty, yaw uncertainty, and roll uncertainty are weighted with the pitch_loss, yaw_loss, and roll_loss output by the facial orientation branch, respectively. The network adaptively adjusts the sizes of the three uncertainties according to the image difficulty, thereby learning the uncertainty of the facial orientation angle. The learned uncertainties of the three facial orientation angles are added together to obtain the uncertainty degree of the facial orientation angle information output by the model. The confidence of the facial orientation angle information is obtained by subtracting the sum of the uncertainties of the three facial orientation angles from 1.
[0063] Training the face orientation branch first and then training the confidence branch can make the performance of the trained face orientation detection model better.
[0064] Next, pass Figure 4 The facial image quality evaluation method of the present invention is generally introduced.
[0065] refer to Figure 4 First, obtain the original image, annotate the facial orientation angle of the original image, obtain the facial orientation angle label, and train the facial orientation branch through the facial orientation angle label and the original image. After the training is completed, continue to input the original image, facial orientation angle label and facial orientation angle loss output by the facial orientation branch into the confidence branch to train the confidence branch, thereby obtaining the facial orientation detection model.
[0066] When applied, the facial image to be evaluated of the target object is input into the facial orientation detection model, and then the facial image to be evaluated is screened based on a preset confidence threshold to obtain high-quality facial images to be evaluated and low-quality facial images to be evaluated.
[0067] The facial orientation detection model of the present invention only requires facial orientation angle labels when training, and no additional labels (such as blur, occlusion, non-face, etc.) are required; the image quality output by the model is no longer the artificially defined image quality, but the image quality considered by the model. When screening pictures for downstream models to recognize, pictures that are more conducive to model recognition can be screened out, thereby improving the overall recognition accuracy of the downstream models.
[0068] Embodiment 3:
[0069] An embodiment of the present invention also provides a facial image quality assessment device, which is mainly used to execute the facial image quality assessment method provided in the above content of the embodiment of the present invention. The facial image quality assessment device provided in the embodiment of the present invention is specifically introduced below.
[0070] Figure 5 is a schematic diagram of a facial image quality assessment device according to an embodiment of the present invention, Figure 5 As shown, the facial image quality assessment device mainly includes: an acquisition unit 10, a detection unit 20 and a setting unit 30, wherein:
[0071] An acquisition unit, used for acquiring a facial image to be evaluated of a target object;
[0072] A detection unit, configured to perform facial orientation detection on the facial image to be evaluated using a facial orientation detection model, and obtain a confidence level of facial orientation angle information of the target object, wherein the confidence level is used to characterize the accuracy of the facial orientation angle information of the target object;
[0073] The setting unit is used to use the confidence as the image quality of the facial image to be evaluated.
[0074] In an embodiment of the present invention, first, a facial image to be evaluated of a target object is obtained; a facial orientation detection model is used to perform facial orientation detection on the facial image to be evaluated, and the confidence of the facial orientation angle information of the target object is obtained, wherein the confidence is used to characterize the accuracy of the facial orientation angle information of the target object; and the confidence is used as the image quality of the facial image to be evaluated. It can be seen from the above description that in an embodiment of the present invention, a facial orientation detection model is used to evaluate the image quality of the facial image to be evaluated, and the training of the facial orientation detection model is simple, and only the facial orientation angle of the training object in the training sample image needs to be annotated, and the annotation cost is low. In addition, the parameter of the facial orientation angle is more objective and global. The more accurate the facial orientation angle information output by the model is (i.e., the higher the confidence), the more effective information the model obtains from the facial image to be evaluated, that is, the better the quality of the facial image to be evaluated is, that is, the more objective the image quality of the facial image to be evaluated is characterized by the confidence of the facial orientation angle information, the better the accuracy is, and the reference value is high, which alleviates the technical problems in the existing facial image quality evaluation method, such as the high annotation cost during model training, the insufficient comprehensiveness and objectivity of the annotation samples, and the poor accuracy of the facial image quality finally determined.
[0075] Optionally, the device is also used to: obtain a preset confidence threshold; screen the facial images to be evaluated based on the preset confidence threshold and the image quality of the facial images to be evaluated to obtain high-quality facial images to be evaluated, wherein the image quality of the high-quality facial images to be evaluated is greater than the preset confidence threshold.
[0076] Optionally, the facial orientation detection model includes: a facial orientation branch and a confidence branch; the facial orientation branch is used to detect facial orientation angle information of a target object in the facial image to be evaluated based on the facial image to be evaluated; and the confidence branch is used to detect the confidence of the facial orientation angle information of the target object in the facial image to be evaluated based on the facial image to be evaluated.
[0077] Optionally, the device is also used to: obtain multiple training sample images containing the face of the training object and the facial orientation angle information of the training object in each training sample image; train the original model of the facial orientation detection model using the multiple training sample images and the facial orientation angle information of the training object in each training sample image to obtain the facial orientation detection model.
[0078] Optionally, the original model of the facial orientation detection model includes: a facial orientation branch to be trained and a confidence branch to be trained; the device is also used to: train the facial orientation branch to be trained using multiple training sample images and facial orientation angle information of the training object in each training sample image to obtain a facial orientation branch of the facial orientation detection model; train the confidence branch to be trained based on multiple training sample images, facial orientation angle information of the training object in each training sample image and the facial orientation branch of the facial orientation detection model to obtain a confidence branch of the facial orientation detection model; and obtain the facial orientation detection model based on the facial orientation branch of the facial orientation detection model and the confidence branch of the facial orientation detection model.
[0079] Optionally, the facial orientation branch includes: a first preset number of convolutional layers, and a second preset number of fully connected layers connected to the first preset number of convolutional layers; the confidence branch includes: a first preset number of convolutional layers, and a third preset number of fully connected layers connected to the first preset number of convolutional layers.
[0080] Optionally, the facial orientation angle information includes: a facial pitch angle of the target object, a facial yaw angle of the target object, and a facial roll angle of the target object.
[0081] Optionally, the target object includes any one of the following: human, animal.
[0082] The device provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.
[0083] In another embodiment of the present invention, a computer storage medium is provided, on which a computer program is stored. When a computer runs the computer program, the steps of the method in the above method embodiment are executed.
[0084] In another embodiment of the present invention, a computer program is also provided, which can be stored in a cloud or local storage medium. When the computer program is run by a computer or a processor, it is used to execute the corresponding steps of the method of the embodiment of the present invention, and to implement the corresponding modules in the camera distribution management device according to the embodiment of the present invention.
[0085] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0086] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0087] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0088] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0089] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0090] In addition, each functional unit in each embodiment of the present invention may be integrated into one analysis unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0091] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that can be executed by an analyzer. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.
[0092] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A method for evaluating facial image quality, characterized in that: include: Obtain a facial image of a target object to be evaluated; Using a facial orientation detection model to perform facial orientation detection on the facial image to be evaluated, and obtaining a confidence level of the facial orientation angle information of the target object, wherein the confidence level is used to characterize the accuracy of the facial orientation angle information of the target object; Taking the confidence as the image quality of the facial image to be evaluated; The method further comprises: Acquire multiple training sample images containing the face of the training object and the facial orientation angle information of the training object in each training sample image; The original model of the facial orientation detection model is trained by using the plurality of training sample images and the facial orientation angle information of the training object in each training sample image to obtain the facial orientation detection model; Wherein, the original model of the face orientation detection model includes: a face orientation branch to be trained and a confidence branch to be trained; Training the original model of the facial orientation detection model using the plurality of training sample images and the facial orientation angle information of the training object in each training sample image comprises: The facial orientation branch to be trained is trained by using the plurality of training sample images and facial orientation angle information of the training object in each training sample image to obtain a facial orientation branch of the facial orientation detection model; The confidence branch to be trained is trained based on the multiple training sample images, the facial orientation angle information of the training object in each training sample image and the facial orientation branch of the facial orientation detection model to obtain the confidence branch of the facial orientation detection model, and the facial orientation detection model is obtained according to the facial orientation branch of the facial orientation detection model and the confidence branch of the facial orientation detection model.
2. The method according to claim 1, characterized in that: After obtaining the image quality of the facial image to be evaluated, the method further includes: Get the preset confidence threshold; The facial images to be evaluated are screened based on the preset confidence threshold and the image quality of the facial images to be evaluated to obtain high-quality facial images to be evaluated, wherein the image quality of the high-quality facial images to be evaluated is greater than the preset confidence threshold.
3. The method according to claim 1, characterized in that: The facial orientation detection model comprises: a facial orientation branch and a confidence branch; The facial orientation branch is used to detect facial orientation angle information of a target object in the facial image to be evaluated according to the facial image to be evaluated; The confidence branch is used to detect the confidence of the facial orientation angle information of the target object in the facial image to be evaluated according to the facial image to be evaluated.
4. The method according to claim 3, characterized in that The facial orientation branch includes: a first preset number of convolutional layers, and a second preset number of fully connected layers connected to the first preset number of convolutional layers; the confidence branch includes: the first preset number of convolutional layers, and a third preset number of fully connected layers connected to the first preset number of convolutional layers.
5. The method according to any one of claims 1 to 4, characterized in that: The facial orientation angle information includes: a facial pitch angle of the target object, a facial yaw angle of the target object, and a facial roll angle of the target object.
6. The method according to any one of claims 1 to 4, characterized in that: The target object includes any one of the following: human, animal.
7. A facial image quality assessment device, characterized in that: include: An acquisition unit, used for acquiring a facial image to be evaluated of a target object; a detection unit, configured to perform facial orientation detection on the facial image to be evaluated using a facial orientation detection model, and obtain a confidence level of the facial orientation angle information of the target object, wherein the confidence level is used to characterize the accuracy of the facial orientation angle information of the target object; A setting unit, configured to use the confidence level as the image quality of the facial image to be evaluated; The device is also used to: obtain a plurality of training sample images containing the face of the training object and the facial orientation angle information of the training object in each training sample image; train the original model of the facial orientation detection model by using the plurality of training sample images and the facial orientation angle information of the training object in each training sample image to obtain the facial orientation detection model; Among them, the original model of the facial orientation detection model includes: a facial orientation branch to be trained and a confidence branch to be trained; the device is also used to: train the facial orientation branch to be trained through the multiple training sample images and the facial orientation angle information of the training object in each training sample image to obtain the facial orientation branch of the facial orientation detection model; train the confidence branch to be trained based on the multiple training sample images, the facial orientation angle information of the training object in each training sample image and the facial orientation branch of the facial orientation detection model to obtain the confidence branch of the facial orientation detection model; and obtain the facial orientation detection model according to the facial orientation branch of the facial orientation detection model and the confidence branch of the facial orientation detection model.
8. 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 computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable medium having a non-volatile program code executable by a processor, characterized in that: The program code enables the processor to execute the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Front face image detection method and device
CN109635693A