Face beauty prediction method and device, electronic device, and storage medium

By generating face pseudo-images and optimizing the generation of adversarial network, the problems of insufficient supervision information and model overfitting in face beauty prediction are solved, and higher prediction accuracy is achieved.

CN114973377BActive Publication Date: 2025-06-06WUYI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210646405.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-09
Publication Date
2025-06-06
Estimated Expiration
2042-06-09

AI Technical Summary

Technical Problem

In the research on facial beauty prediction, due to the lack of large-scale facial databases, the problem of insufficient supervision information and the model being easily overfitted.

Method used

By acquiring the original image and Gaussian noise, a face pseudo-image is generated, and a judgment is made between it and the original image to obtain the probability value. When the probability difference is greater than the preset threshold, the adversarial network is optimized to generate a training set, and input it into the face beauty prediction task network for training.

Benefits of technology

By optimizing the generation adversarial network, highly realistic face images are generated, and training sets are constructed, the problems of insufficient supervision information and model overfitting are solved, and the accuracy of face beauty prediction is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114973377B_ABST
    Figure CN114973377B_ABST
Patent Text Reader

Abstract

The present application provides a method and device for predicting the beauty of a face, an electronic device, and a storage medium, and belongs to the field of neural network technology. It includes: obtaining an original image and Gaussian noise; generating a pseudo face image based on the Gaussian noise; judging the pseudo face image and the original image to obtain a first probability and a second probability; when the difference between the first probability and the second probability is greater than a preset threshold, optimizing the generative adversarial network; generating a training set through the optimized generative adversarial network; inputting the training set into the face beauty prediction task network and training the face beauty prediction task network to obtain a trained first task network. By optimizing the generative adversarial network, the adversarial generative network can generate realistic face images and construct a training set to train the neural network, thereby solving the problem of insufficient supervision information and easy overfitting of the model in the face beauty prediction research due to the lack of a large-scale face beauty database for supervised training of the neural network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of neural network technology, in particular to a method, system and storage medium for predicting facial beauty based on a generative adversarial network. Background Art

[0002] Facial beauty prediction is a cutting-edge topic in the field of machine learning and computer vision. It mainly studies how to enable computers to have the ability to judge facial beauty similar to humans. However, due to the lack of large-scale face databases for supervised training of neural networks, there is currently a problem of insufficient supervised information and the model is prone to overfitting. Summary of the invention

[0003] The main purpose of the embodiments of the present disclosure is to propose a method and device for predicting facial beauty, an electronic device, and a computer-readable storage medium, which can effectively solve the problems of insufficient supervision information and easy overfitting of the model in facial beauty prediction research.

[0004] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present disclosure provides a method for predicting beauty of a face, the method comprising:

[0005] Get the original image and Gaussian noise;

[0006] Generate a pseudo face image according to the Gaussian noise;

[0007] The pseudo face image and the original image are judged to obtain a first probability and a second probability; wherein the first probability represents the probability that the pseudo face image is judged to be a real image, and the second probability represents the probability that the original image is judged to be a real image;

[0008] When the difference between the first probability and the second probability is greater than a preset threshold, optimizing the generative adversarial network;

[0009] Generate a training set through an optimized generative adversarial network; wherein the training set includes a plurality of training samples, and the training samples include labels reflecting the beauty levels of the faces of the training samples;

[0010] The training set is input into a face beauty prediction task network and the face beauty prediction task network is trained to obtain a trained first task network.

[0011] In some embodiments, the generative adversarial network includes a generation module and a decision module, and optimizing the generative adversarial network includes:

[0012] reducing the static gradient of the generation module to update the generation module;

[0013] Improving the static gradient of the decision module to update the decision module;

[0014] Wherein, the generation module is based on the expression: To update, the decision module is based on the expression: Update, wherein D represents the decision module, G represents the generation module, represents the static gradient of the generation module, represents the static gradient of the decision module, x (i) represents the i-th sample in the original image, z (i) represents the i-th sample in the pseudo face image.

[0015] In some embodiments, inputting the training set into a face beauty prediction task network and training the face beauty task network includes:

[0016] Decompose the face beauty prediction task into multiple binary classification subtasks, and generate multiple first subtask networks corresponding to each binary classification subtask;

[0017] Generate a multidimensional label according to the face beauty level label of the training sample; wherein each dimension of the multidimensional label is used to supervise each of the first subtask networks corresponding thereto, and the total number of dimensions of the multidimensional label is equal to the total number of the first subtask networks;

[0018] The plurality of first subtask networks are supervisedly learned by using the multi-dimensional labels to obtain a plurality of trained second subtask networks.

[0019] In some embodiments, the performing supervised learning on the plurality of first subtask networks by using the multi-dimensional labels includes:

[0020] Determine whether the output result of the first subtask network is equal to the corresponding one dimension in the multidimensional label.

[0021] In some embodiments, after the supervised learning of the plurality of first subtask networks is performed by the multi-dimensional labels to obtain the plurality of trained second subtask networks, the method further includes:

[0022] Integrate the first output results of the plurality of trained second subtask networks into a first multidimensional vector;

[0023] comparing the first multidimensional vector with the second multidimensional vector to determine whether the first multidimensional vector is wrong;

[0024] If the first multidimensional vector corresponds to the second multidimensional vector, then the first multidimensional vector is correct;

[0025] If the first multidimensional vector does not correspond to the second multidimensional vector, the first multidimensional vector is corrected according to the first output results.

[0026] In some embodiments, the step of modifying the first multidimensional vector according to the plurality of the first output results comprises:

[0027] Modifying the first output result according to a preset rule to correct the first multi-dimensional vector;

[0028] The preset rule is: modifying the first output result based on the criteria that only the least number of first output results need to be modified and the confidence level of the modified first output result is the lowest.

[0029] In some embodiments, inputting the training set into a face beauty prediction task network and training the face beauty task network includes:

[0030] The back-propagation algorithm is used to cyclically optimize the parameters of the first subtask network.

[0031] A second aspect of the disclosed embodiments provides a facial beauty prediction device, the device comprising:

[0032] An acquisition module, used to acquire the original image and Gaussian noise;

[0033] A generation module, used for generating a pseudo face image based on Gaussian noise;

[0034] A judgment module, used for judging the pseudo face image and the original image to obtain a first probability and a second probability;

[0035] A generative adversarial network optimization module, configured to optimize the generative adversarial network when the difference between the first probability and the second probability is greater than a preset threshold;

[0036] A training set generation module, used to generate a training set through an optimized generative adversarial network;

[0037] A training module, used for inputting a training set into a face beauty prediction task network and training the face beauty prediction task network to obtain a trained first task network;

[0038] A third aspect of the embodiments of the present disclosure proposes an electronic device, comprising a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein the program, when executed by the processor, realizes a face beauty prediction method as described in any one of the embodiments of the first aspect of the present application.

[0039] The fourth aspect of the embodiments of the present disclosure proposes a computer-readable storage medium for computer-readable storage, characterized in that the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement a facial beauty prediction method as described in any one of the embodiments of the first aspect above.

[0040] The face beauty prediction method and device, electronic device, and computer-readable storage medium proposed in the embodiments of the present disclosure obtain an original image and Gaussian noise; generate a pseudo face image based on the Gaussian noise; judge the pseudo face image and the original image to obtain a first probability and a second probability; when the difference between the first probability and the second probability is greater than a preset threshold, optimize the generative adversarial network; generate a training set through the optimized generative adversarial network; input the training set into the face beauty prediction task network and train the face beauty prediction task network to obtain a trained first task network. By continuously optimizing the generative adversarial network, the generative adversarial network can output a pseudo face image that is highly similar to a real face image, and the output pseudo face image is constructed as a training set, and the face beauty prediction task network is trained through the training set, thereby solving the problem of insufficient supervision information and easy overfitting of the model in the face beauty prediction research. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 is a flowchart of a method for predicting facial beauty provided by an embodiment of the present disclosure;

[0042] Figure 2 yes Figure 1 Flow chart of step S400 in FIG.

[0043] Figure 3 yes Figure 1 Flow chart of step S300 in FIG.

[0044] Figure 4 yes Figure 1 Flow chart of step S330 in FIG.

[0045] Figure 5 is a module structure diagram of a face beauty prediction device provided by an embodiment of the present disclosure;

[0046] Figure 6 It is a schematic diagram of the hardware structure of the electronic device provided by the embodiment of the present disclosure. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0048] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0050] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring the various aspects of the present disclosure.

[0051] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0052] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor do they necessarily have to be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual order of operation may change according to actual conditions.

[0053] The disclosed embodiments can be used in numerous general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote storage media including storage devices.

[0054] Reference Figure 1 According to the first aspect of the embodiments of the present disclosure, the method for predicting beauty of a face includes but is not limited to steps S100 to S600.

[0055] Step S100, obtaining an original image and Gaussian noise;

[0056] In step S100 of some embodiments, an original image and Gaussian noise are obtained, where the Gaussian noise and the original image may be pre-stored in the system or input externally, wherein the original image refers to a real face image obtained by photographic equipment or other means.

[0057] Step S200, generating a pseudo face image according to Gaussian noise;

[0058] In step S200 of some embodiments, a pseudo face image is generated based on Gaussian noise, and after receiving the Gaussian noise, the generator of the generative adversarial network generates the pseudo face image based on the Gaussian noise.

[0059] Step S300, judging the pseudo face image and the original image to obtain a first probability and a second probability;

[0060] In step S300 of some embodiments, a pseudo face image and an original image are judged to obtain a first probability and a second probability; wherein the first probability indicates the probability that the pseudo face image is judged as a real image, and the second probability indicates the probability that the original image is judged as a real image; the pseudo face image generated by the generator of the generative adversarial network and the original image are transmitted to the judger together, and after receiving the image, the judger will judge the source of the image to obtain the probability that the image is a fake image generated by the generator or a real face image obtained by shooting or other means. For example, when the image generated by the generator does not have basic facial features, the judger will obtain that the probability that the image is a real face image is close to 0, or, when the image generated by the generator is very realistic and no different from a real photo, the judger will not be able to distinguish its source and can only guess blindly, and the probability that the pseudo face image generated by the generator is judged as a real face image will be close to 50%.

[0061] Step S400, when the difference between the first probability and the second probability is greater than a preset threshold, optimizing the generative adversarial network;

[0062] In step S400 of some embodiments, when the difference between the first probability and the second probability is greater than a preset threshold, the generative adversarial network is optimized; the preset threshold is a very small value (such as 0.1%), when the difference between the first probability and the second probability output by the judge is greater than the preset threshold, that is, at this time, the judge can well distinguish that the pseudo face image generated by the generator is not a real face image, which means that the image generated by the generator is not realistic enough and cannot deceive the judge. Therefore, the generator should be optimized to improve the quality of the pseudo face image generated by the generator. At the same time, as the quality of the pseudo face images generated by the generator is improved, the discriminator also needs to be optimized so that the discriminator can better distinguish whether the image is a pseudo face image generated by the generator or a real face image, until the probability that the discriminator judges the pseudo face image generated by the generator as a real face image is very close to or even equal to the probability that the original image is judged as a real face image. At this time, it means that the discriminator can no longer distinguish whether the pseudo face image generated by the generator is a real face image, that is, the pseudo face image generated by the generator is already very realistic and can be mistaken for the real thing. At this time, a well-trained generator is obtained, and a large number of realistic face images can be generated by the generator as face data to form a database.

[0063] Step S500, generating a training set through an optimized generative adversarial network;

[0064] In step S500 of some embodiments, a training set is generated by an optimized generative adversarial network. In the above steps, an optimized generator that can generate images that are very close to real faces has been obtained through the continuous game between the generator and the judge in the generative adversarial network. At this time, a series of face images can be generated by the generative adversarial network, and these face images are organized into a set, namely, a training set, wherein the training set includes multiple training samples, and the training samples include labels reflecting the beauty level of the training sample faces.

[0065] Step S600: input the training set into the face beauty prediction task network and train the face beauty prediction task network to obtain a trained first task network.

[0066] In step S600 of some embodiments, the training set is input into the face beauty prediction task network and the face beauty prediction task network is trained to obtain a trained first task network. The face beauty prediction task network may be a CNN neural network, and the training set including a large number of face images and face beauty level labels corresponding to the images generated in the above step S500 is used as input to supervise the CNN neural network to obtain a trained neural network for completing the face beauty prediction task.

[0067] In some embodiments, the generative adversarial network includes a generation module and a decision module, such as Figure 2 As shown, step S400 includes but is not limited to steps S210 to S220.

[0068] Step S210, reducing the static gradient of the generation module to update the generation module;

[0069] In step S210 of some embodiments, the static gradient of the generation module is reduced to update the generation module, specifically, according to the expression: Update the generation module, where D represents the decision module, G represents the generation module, represents the static gradient of the generation module, z (i) represents the i-th sample in the pseudo face image.

[0070] Step S220, improving the static gradient of the decision module to update the decision module;

[0071] In step S220 of some embodiments, the static gradient of the decision module is increased to update the decision module, specifically, according to the expression: Update the decision module, where D represents the decision module and G represents the generation module. represents the static gradient of the decision module, x (i) represents the i-th sample in the original image, z (i)represents the i-th sample in the pseudo face image.

[0072] In some embodiments, Figure 3 As shown, step S600 includes but is not limited to steps S310 to S330.

[0073] Step S310, decomposing the face beauty prediction task into multiple binary classification subtasks, and generating multiple first subtask networks corresponding to each binary classification subtask respectively;

[0074] In step S310 of some embodiments, the face beauty prediction task is decomposed into multiple binary classification subtasks, and multiple first subtask networks are generated corresponding to each binary classification subtask, so that single-task data can be used for multi-task prediction learning.

[0075] Step S320, generating a multi-dimensional label according to the face beauty level label of the training sample;

[0076] In step S320 of some embodiments, a multidimensional label is generated according to the face beauty level label of the training sample, wherein each dimension of the multidimensional label corresponds to a first subtask network one by one, each dimension of the multidimensional label is used to supervise each first subtask network, and the total number of dimensions of the multidimensional label is equal to the total number of the first subtask networks;

[0077] Step S330: supervised learning is performed on the multiple first subtask networks through multi-dimensional labels to obtain multiple trained second subtask networks.

[0078] In step S330 of some embodiments, supervised learning is performed on multiple first subtask networks through multidimensional labels to obtain multiple trained second subtask networks, and each dimension of the multidimensional label is used to supervise each subtask network separately. Specifically, it is determined whether the output result of the first subtask network is equal to the corresponding one dimension in the multidimensional label, and the back propagation algorithm is used to cyclically optimize the parameters of the first subtask network.

[0079] In some embodiments, Figure 4 As shown, step S330 includes but is not limited to steps S410 to S440.

[0080] Step S410, integrating the first output results of the trained plurality of second subtask networks into a first multi-dimensional vector;

[0081] In step S410 of some embodiments, the first output results of multiple trained second subtask networks are integrated into a first multidimensional vector. In the above steps, after the face beauty prediction task is decomposed into multiple binary classification subtasks, each subtask can output a result, and then after the output results of multiple subtask networks are integrated, a multidimensional vector can be obtained. For example, the number of subtask networks is 3, and their output results are 1, 1, and 0 respectively, then a multidimensional vector [1, 1, 0] can be obtained.

[0082] Step S420, comparing the first multidimensional vector with the second multidimensional vector to determine whether the first multidimensional vector is wrong;

[0083] In step S420 of some embodiments, the first multidimensional vector is compared with the second multidimensional vector to determine whether the first multidimensional vector is wrong. In the above step S410, the first multidimensional vector is obtained by integrating the output results of the subtask network, and the first multidimensional vector is compared with the second multidimensional vector, wherein the second multidimensional vector includes situations corresponding to multiple different facial beauty levels, for example, it may include [0, 1, 0], [1, 0, 0], [1, 1, 0] corresponding to facial beauty levels 1, 2 and 3 respectively.

[0084] Step S430, if the first multidimensional vector corresponds to the second multidimensional vector, then the first multidimensional vector is correct;

[0085] Step S440: if the first multidimensional vector does not correspond to the second multidimensional vector, the first multidimensional vector is corrected according to the plurality of first output results.

[0086] In step S440 of some embodiments, if the first multidimensional vector does not correspond to the second multidimensional vector, the first multidimensional vector is corrected according to the multiple first output results. By comparing the first multidimensional vector with the second multidimensional vector, if the first multidimensional vector does not belong to any of the second multidimensional vectors, for example, the first multidimensional vector is [0, 0, 0], and does not match any of the second multidimensional vectors, it means that the first multidimensional vector is wrong. At this time, the first output result is modified according to the preset rule to correct the first multidimensional vector. The preset rule is: the first output result is modified based on the standard that only the least number of first output results need to be modified and the confidence of the modified first output result is the lowest. Since the first output results are all Boolean elements, 0 can be corrected to 1, and 1 can be corrected to 0. After comparing the first multidimensional vector [0, 0, 0] with the second multidimensional vector, it can be obtained that at this time, only one item of the first or second item in the first multidimensional vector needs to be modified to match the second multidimensional vector. At this time, the confidence of the output results of the subtask networks corresponding to the first item and the second item should be compared, and the output result with lower confidence should be corrected.

[0087] The face beauty prediction method proposed in the embodiment of the present disclosure obtains an original image and Gaussian noise; generates a face pseudo image according to the Gaussian noise; judges the face pseudo image and the original image to obtain a first probability and a second probability; wherein the first probability represents the probability that the face pseudo image is judged as a real image, and the second probability represents the probability that the original image is judged as a real image; when the difference between the first probability and the second probability is greater than a preset threshold, optimizes the generative adversarial network; generates a training set through the optimized generative adversarial network; wherein the training set includes multiple training samples, and the training samples include labels reflecting the beauty level of the training sample faces; inputs the training set into the face beauty prediction task network and trains the face beauty prediction task network to obtain a trained first task network. By optimizing the generative adversarial network, the generative adversarial network can generate highly realistic face images, and generates training through the generative adversarial network, and transmits the training set to the face beauty prediction task network to train the face beauty prediction task network, thereby solving the problem of lack of large-scale face database for supervised training of neural networks in face beauty prediction research, resulting in insufficient supervision information and easy overfitting of the model.

[0088] The disclosed embodiment also provides a face beauty prediction device, such as Figure 5 As shown, the above-mentioned face beauty prediction method can be implemented, and the face beauty prediction device includes: an acquisition module 510, used to acquire an original image and Gaussian noise; a generation module 520, used to generate a face pseudo image according to Gaussian noise; a judgment module 530, used to judge the face pseudo image and the original image to obtain a first probability and a second probability; a generative adversarial network optimization module 540, used to optimize the generative adversarial network when the difference between the first probability and the second probability is greater than a preset threshold; a training set generation module 550, used to generate a training set through an optimized generative adversarial network; a training module 560, used to input the training set into the face beauty prediction task network and train the face beauty prediction task network to obtain a trained first task network.

[0089] The face beauty prediction device of the disclosed embodiment is used to execute the face beauty prediction method in the above embodiment. Its specific processing process is the same as the face beauty prediction method in the above embodiment, and will not be repeated here.

[0090] The present disclosure also provides an electronic device 600, including:

[0091] at least one processor, and

[0092] a memory communicatively connected to at least one processor; wherein,

[0093] The memory stores instructions, and the instructions are executed by at least one processor so that when the at least one processor executes the instructions, a method as described in any one of the embodiments of the first aspect of the present application is implemented.

[0094] Combine the following Figure 6 The hardware structure of the electronic device 600 is described in detail. The computer device includes: a processor 610 , a memory 620 , an input / output interface 630 , a communication interface 640 and a bus 650 .

[0095] The processor 610 may be implemented by a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present disclosure;

[0096] The memory 620 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 620 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 620, and the processor 610 calls and executes the face beauty prediction method of the embodiment of the present disclosure;

[0097] Input / output interface 630, used to implement information input and output;

[0098] Communication interface 640, used to realize communication interaction between the device and other devices, which can be realized by wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.); and

[0099] bus 650 , which transmits information between the various components of the device (e.g., processor 610 , memory 620 , input / output interface 630 , and communication interface 640 );

[0100] The processor 610 , the memory 620 , the input / output interface 630 , and the communication interface 640 are connected to each other in communication within the device via a bus 650 .

[0101] The embodiments described in the embodiments of the present disclosure are intended to more clearly illustrate the technical solutions of the embodiments of the present disclosure and do not constitute a limitation on the technical solutions provided by the embodiments of the present disclosure. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present disclosure are also applicable to similar technical problems.

[0102] It can be understood by those skilled in the art that Figures 1 to 6 The technical solutions shown in the figure do not constitute a limitation on the embodiments of the present disclosure, and may include more or fewer steps than those shown in the figure, or a combination of certain steps, or different steps.

[0103] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0104] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0105] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application 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 interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0106] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0107] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not run. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0108] 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.

[0109] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0110] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a computer-readable storage medium, including multiple instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to run all or part of the steps of the method described in each embodiment of the present application. The aforementioned computer-readable storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0111] The preferred embodiments of the present disclosure are described above with reference to the accompanying drawings, but the scope of the rights of the present disclosure is not limited thereto. Any modification, equivalent substitution and improvement made by those skilled in the art without departing from the scope and essence of the present disclosure should be within the scope of the rights of the present disclosure.

Claims

1. A facial beauty prediction method based on generative adversarial network, It is characterized in that The method comprises: Get the original image and Gaussian noise; Generate a pseudo face image according to the Gaussian noise; The pseudo face image and the original image are judged to obtain a first probability and a second probability; wherein the first probability represents the probability that the pseudo face image is judged to be a real image, and the second probability represents the probability that the original image is judged to be a real image; When the difference between the first probability and the second probability is greater than a preset threshold, optimizing a generative adversarial network, wherein the generative adversarial network includes a generation module and a decision module, and optimizing the generative adversarial network includes: reducing the static gradient of the generation module to update the generation module; Improving the static gradient of the decision module to update the decision module; Wherein, the generation module is based on the expression: To update, the decision module is based on the expression: Update, wherein D represents the decision module, G represents the generation module, represents the static gradient of the generation module, represents the static gradient of the decision module, x (i) represents the i-th sample in the original image, z (i) represents the i-th sample in the pseudo face image; Generate a training set by using the optimized generative adversarial network; wherein the training set includes a plurality of training samples, and the training samples include labels reflecting the beauty levels of the faces of the training samples; Inputting the training set into a face beauty prediction task network and training the face beauty prediction task network to obtain a trained first task network; The step of inputting the training set into a face beauty prediction task network and training the face beauty prediction task network comprises: Decomposing the face beauty prediction task into multiple binary classification subtasks, and generating multiple first subtask networks corresponding to each of the binary classification subtasks; Generate a multidimensional label according to the face beauty level label of the training sample; wherein each dimension of the multidimensional label is used to supervise each of the first subtask networks corresponding thereto, and the total number of dimensions of the multidimensional label is equal to the total number of the first subtask networks; The plurality of first subtask networks are supervisedly learned by using the multi-dimensional labels to obtain a plurality of trained second subtask networks.

2. The method for predicting facial beauty according to claim 1, It is characterized in that The performing supervised learning on the plurality of the first subtask networks by using the multi-dimensional labels includes: Determine whether an output result of the first subtask network is equal to a corresponding one dimension in the multidimensional label.

3. The method for predicting facial beauty according to claim 1, It is characterized in that After the supervised learning of the plurality of first subtask networks is performed through the multi-dimensional labels to obtain the plurality of trained second subtask networks, the method further includes: Integrate the first output results of the plurality of trained second subtask networks into a first multi-dimensional vector; comparing the first multidimensional vector with the second multidimensional vector to determine whether the first multidimensional vector is wrong; If the first multidimensional vector corresponds to the second multidimensional vector, then the first multidimensional vector is correct; If the first multidimensional vector does not correspond to the second multidimensional vector, the first multidimensional vector is corrected according to the first output results.

4. The method for predicting facial beauty according to claim 3, It is characterized in that The step of correcting the first multidimensional vector according to the plurality of the first output results comprises: Modifying the first output result according to a preset rule to correct the first multi-dimensional vector; The preset rule is: modifying the first output result based on the criteria that only a minimum number of the first output results need to be modified and the confidence level of the modified first output results is the lowest.

5. The method for predicting facial beauty according to any one of claims 1 to 4, It is characterized in that The step of inputting the training set into a face beauty prediction task network and training the face beauty task network comprises: The back-propagation algorithm is used to cyclically optimize the parameters of the first subtask network.

6. A facial beauty prediction device, It is characterized in that The device comprises: An acquisition module, used to acquire the original image and Gaussian noise; A generating module, used for generating a pseudo face image according to the Gaussian noise; A judgment module, used to judge the fake face image and the original image to obtain a first probability and a second probability; wherein the first probability represents the probability that the fake face image is judged to be a real image, and the second probability represents the probability that the original image is judged to be a real image; A generative adversarial network optimization module, configured to optimize the generative adversarial network when the difference between the first probability and the second probability is greater than a preset threshold, wherein the generative adversarial network includes a generation module and a judgment module, and the optimization of the generative adversarial network includes: reducing the static gradient of the generation module to update the generation module; Improving the static gradient of the decision module to update the decision module; Wherein, the generation module is based on the expression: To update, the decision module is based on the expression: Update, wherein D represents the decision module, G represents the generation module, represents the static gradient of the generation module, represents the static gradient of the decision module, x (i) represents the i-th sample in the original image, z (i) represents the i-th sample in the pseudo face image; A training set generation module, used to generate a training set through an optimized generative adversarial network; wherein the training set includes a plurality of training samples, and the training samples include labels reflecting the beauty level of the faces of the training samples A training module, used for inputting the training set into a face beauty prediction task network and training the face beauty prediction task network to obtain a trained first task network; The step of inputting the training set into a face beauty prediction task network and training the face beauty prediction task network to obtain a trained first task network includes: Decomposing the face beauty prediction task into multiple binary classification subtasks, and generating multiple first subtask networks corresponding to each of the binary classification subtasks; Generate a multidimensional label according to the face beauty level label of the training sample; wherein each dimension of the multidimensional label is used to supervise each of the first subtask networks corresponding thereto, and the total number of dimensions of the multidimensional label is equal to the total number of the first subtask networks; The plurality of first subtask networks are supervisedly learned by using the multi-dimensional labels to obtain a plurality of trained second subtask networks, so as to obtain a trained first task network.

7. An electronic device, It is characterized in that The electronic device includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory. When the program is executed by the processor, the method for predicting facial beauty as described in any one of claims 1 to 5 is realized.

8. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the face beauty prediction method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Face beauty prediction method and device based on adversarial transfer learning

    CN110705406A

  • Multi-dimensional task face beauty prediction method and system and storage medium

    CN111695602A