BEAUTY PREDICTION METHOD AND DEVICE BASED ON MULTITASKING AND WEAK SUPERVISION, AND STORAGE MEDIUM
20220309828 · 2022-09-29
Inventors
- Junying Gan (Jiangmen, CN)
- Zhenfeng BAI (Jiangmen, CN)
- Yikui Zhai (Jiangmen, CN)
- Guohui HE (Jiangmen, CN)
Cpc classification
G06V10/811
PHYSICS
Y02P90/30
GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
G06V40/169
PHYSICS
G06V10/87
PHYSICS
G06V10/22
PHYSICS
International classification
G06V10/22
PHYSICS
Abstract
A beauty prediction method and device based on multitasking and weak supervision, and a storage medium are disclosed. The method includes the steps of pre-processing inputted facial images; allocating the pre-processed images to multiple tasks; extracting shared image features; and obtaining a plurality of classification results via a plurality of classification networks each including a residual network, a standard neural network and a classifier.
Claims
1. A beauty prediction method based on multitasking and weak supervision, comprising the following steps: pre-processing inputted face images to obtain pre-processed images, wherein the pre-processed images comprise true value images marked with true value labels and noise images marked with noise labels; allocating the pre-processed images to multiple tasks, wherein each task comprises a plurality of the true value images and a plurality of the noise images, and the multiple tasks comprise one main task specifically for facial beauty prediction and multiple auxiliary tasks related to the facial beauty prediction; processing the true value images and noise images of the multiple tasks via a feature extraction layer to obtain shared image features; and processing the image features via a plurality of classification networks each comprising a residual network, a standard neural network and a classifier to obtain a plurality of classification results, wherein each of the plurality of classification networks corresponds to a respective one of the multiple tasks, wherein, in each of the classification networks, the residual network processes the image features, learns mapping from the image features to residual values of the true value labels and the noise labels and obtains a first predicted value; the standard neural network learns mapping from the image features to the true value labels and obtains a second predicted value; and each of the classification results is obtained by the classifier according to the first predicted value and the second predicted value.
2. The beauty prediction method based on multitasking and weak supervision of claim 1, wherein the pre-processing inputted facial images to obtain pre-processed images comprises sequentially performing image enhancement, image correction, image cropping, image de-duplication and image normalization on the facial images to obtain the pre-processed images.
3. The beauty prediction method based on multitasking and weak supervision of claim 1, wherein the feature extraction layer is one of VGG16, ResNet50, Google Inception V3 or DenseNet.
4. The beauty prediction method based on multitasking and weak supervision of claim 1, wherein an overall loss function of the multiple tasks is L.sub.total=Σ.sub.1.sup.nω.sub.n*L.sub.n, where L is a loss of a single task, and co, is a weight corresponding to each task.
5. The beauty prediction method based on multitasking and weak supervision of claim 1, wherein a loss function of the residual network is
6. The beauty prediction method based on multitasking and weak supervision of claim 5, wherein a loss function of the standard neural networks is
7. The beauty prediction method based on multitasking and weak supervision of claim 6, wherein an overall goal of the plurality of classification networks is
8. The beauty prediction method based on multitasking and weak supervision of claim 1, wherein the noise images are more than the true value images in each task.
9. A beauty prediction device based on multitasking and weak supervision, comprising: a pre-processing module, configured to pre-process inputted facial images to obtain pre-processed images, wherein the pre-processed images comprise true value images marked with true value labels and noise images marked with noise labels; a multitasking module, configured to allocate the pre-processed images to multiple tasks, wherein each task comprises a plurality of the true value images and a plurality of the noise images, and the multiple tasks comprise one main task specifically for facial beauty prediction and multiple auxiliary tasks related to the facial beauty prediction; a feature extraction module, configured to process the true value images and the noise images of the multiple tasks to obtain shared image features; and a classification module, configured to process the image features to obtain a plurality of classification results and comprises a plurality of classification networks each comprising a residual network, a standard neural network and a classifier, wherein each of the plurality of classification networks corresponds to a respective one of the multiple tasks, wherein, in each of the classification networks, the residual network processes the image features, learns mapping from the image features to residual values of the true value labels and the noise labels and obtains a first predicted value; the standard neural network learns mapping from the image features to the true value labels and obtains a second predicted value; and each of the classification results is obtained by the classifier according to the first predicted value and the second predicted value.
10. A storage medium storing executable instructions which, when executed by a computer, cause the computer to perform a beauty prediction method based on multitasking and weak supervision comprising: pre-processing inputted face images to obtain pre-processed images, wherein the pre-processed images comprise true value images marked with true value labels and noise images marked with noise labels; allocating the pre-processed images to multiple tasks, wherein each task comprises a plurality of the true value images and a plurality of the noise images, and the multiple tasks comprise one main task specifically for facial beauty prediction and multiple auxiliary tasks related to the facial beauty prediction; processing the true value images and noise images of the multiple tasks via a feature extraction layer to obtain shared image features; and processing the image features via a plurality of classification networks each comprising a residual network, a standard neural network and a classifier to obtain a plurality of classification results, wherein each of the plurality of classification networks corresponds to a respective one of the multiple tasks, wherein, in each of the classification networks, the residual network processes the image features, learns mapping from the image features to residual values of the true value labels and the noise labels and obtains a first predicted value; the standard neural network learns mapping from the image features to the true value labels and obtains a second predicted value; and each of the classification results is obtained by the classifier according to the first predicted value and the second predicted value.
11. The storage medium of claim 10, wherein the pre-processing inputted facial images to obtain pre-processed images comprises sequentially performing image enhancement, image correction, image cropping, image de-duplication and image normalization on the facial images to obtain the pre-processed images.
12. The storage medium of claim 10, wherein the feature extraction layer is one of VGG16, ResNet50, Google Inception V3 or DenseNet.
13. The storage medium of claim 10, wherein an overall loss function of the multiple tasks is L.sub.total=Σ.sub.1.sup.nω.sub.n*L.sub.n, where L is a loss of a single task, and ω.sub.n is a weight corresponding to each task.
14. The storage medium of claim 10, wherein a loss function of the residual network is
15. The storage medium of claim 14, wherein a loss function of the standard neural networks is
16. The storage medium of claim 15, wherein an overall goal of the plurality of classification networks is
17. The storage medium of claim 10, wherein the noise images are more than the true value images in each task.
Description
BRIEF DESCRIPTION OF DRAWINGS
[0028] The present disclosure will be further illustrated hereinafter with reference to the accompanying drawings and exemplary embodiments.
[0029]
[0030]
[0031]
DETAILED DESCRIPTION
[0032] Specific embodiments of the present disclosure will be described in detail in this section, the preferred embodiments of the present disclosure are illustrated in the accompanying drawings, and the accompanying drawings serve as a supplement to the literal description of the Specification so that a person can intuitively and vividly understand each technical feature and overall technical solutions of the present disclosure, but shall not be understood as limitations to the scope of the present disclosure.
[0033] In the description of the present disclosure, it should be construed that the orientation descriptions, such as orientations or positional relationships indicated by upper, lower, front, rear, left and right are based on the orientations or positional relationships shown in the accompanying drawings, these terms are just used to facilitate description of the present disclosure and simplify the description, but not to indicate or imply that the devices or elements must have specific orientations or be constructed and operated in specific orientations, and therefore, the terms shall not be construed as a limitation to the present disclosure.
[0034] In the description of the present disclosure, “several” means one or more, and “a plurality of/multiple” means two or more; “more than”, “less than”, “exceed” and the like shall not be construed as including the number itself; and “above”, “below”, “within” and the like shall be construed as including the number itself “First” and “second” described are only for describing the technical features, and shall not be construed as indicating or implying the relative importance or implicitly indicating the quantity of the indicated technical features or implicitly indicating the sequence of the indicated technical features.
[0035] In the description of the present disclosure, unless otherwise specified, the terms such as “provided”, “mounted” and “connected” shall be understood in a broad sense, and the specific meanings of the terms in the present disclosure can be reasonably determined by those having ordinary skill in the art in light of the specific contents of the technical solutions.
[0036] Referring to
[0037] Step S100, pre-processing inputted facial images to obtain pre-processed images, where the pre-processed images include true value images marked with true value labels and noise images marked with noise labels;
[0038] Step S200, allocating the pre-processed images to multiple tasks, where each task includes a plurality of the true value images and a plurality of the noise images, and the multiple tasks include one main task specifically for facial beauty prediction and multiple auxiliary tasks related to the facial beauty prediction;
[0039] Step S300, processing the true value images and noise images of the multiple tasks via a feature extraction layer to obtain shared image features; and
[0040] Step S400, processing the image features via a plurality of classification networks 200 each including a residual network 210, a standard neural network 220 and a classifier 230 to obtain a plurality of classification results, where each of the plurality of classification networks 200 corresponds to a respective one of the multiple tasks.
[0041] In each of the classification networks 200, the residual network 210 processes the image features, learns mapping from the image features to residual values of the true value labels and the noise labels and obtains a first predicted value; the standard neural network 220 learns mapping from the image features to the true value labels and obtains a second predicted value; and each of the classification results is obtained by the classifier 230 according to the first predicted value and the second predicted value.
[0042] In this embodiment, the correlation and differences among the multiple tasks enhance the expression ability of facial beauty prediction of the main task; and the classification networks 200 in a weak supervision mode reduce dependence on the true value labels, reduce the cost of data labeling, reduce the influence of the noise labels on a facial beauty prediction model, and improve the generalization ability of the facial beauty prediction model.
[0043] In addition, in the beauty prediction method based on multitasking and weak supervision, the multiple related tasks are learned at the same time, and the auxiliary tasks improve the accuracy of the main task of facial beauty prediction; the classification networks 200 in the weak supervision mode can effectively use images with true value labels; and the problems of poor model generalization ability, only single-task training, and extra-high data labeling cost are resolved.
[0044] It shall be noted that the inputted face images are fused data from a plurality of databases including an LSFBD facial beauty database, a GENKI-4K smile recognition database, an IMDB-WIKI 500 k+ database, and an SCUT-FBP5500 database.
[0045] Further, the pre-processing inputted face images to obtain pre-processed images specifically includes sequentially performing image enhancement, image correction, image cropping, image de-duplication and image normalization on the facial images to obtain the pre-processed images. The pre-processing can efficiently perform region detection, key point detection, alignment and cropping on the facial images, so that the facial images have a uniform size, which facilitates subsequent operations.
[0046] In fact, the pre-processed images are inputted to the facial beauty prediction model to perform the steps S200, S300, and S400. Referring to
[0047] Further, with regard to the step S200, the quantity of the noise images is greater than that of the true value images in each task. An overall loss function of the multiple tasks is: L.sub.total=*L.sub.n, where L is a loss of a single task, and ω.sub.n is a weight corresponding to each task. It should be noted that the main task is facial beauty prediction; and the auxiliary tasks are tasks related to the facial beauty prediction, such as gender recognition and expression recognition.
[0048] Further, the feature extraction layer is one of VGG16, ResNet50, Google Inception V3 or DenseNet. In this embodiment, the feature extraction layer has a specific structure as follows. The first layer is a convolution layer with a size of 3*3; the second layer is a convolution layer with a size of 3*3; the third layer is a convolution layer with a size of 3*3; the fourth layer is a pooling layer; the fifth layer is a convolution layer with a size of 3*3; the sixth layer is a convolution layer with a size of 3*3; the seventh layer is a pooling layer; the eighth layer is a convolution layer with a size of 3*3; the ninth layer is a convolution layer with a size of 3*3; the tenth layer is a convolution layer with a size of 3*3; the eleventh layer is a pooling layer; the twelfth layer is a convolution layer with a size of 3*3; the thirteenth layer is a convolution layer with a size of 3*3; and the fourteenth layer is a pooling layer. The images of the multiple tasks are extracted via the feature extraction layer to obtain the shared image features, and the multiple related tasks are learned in parallel through the shared image features to mine the relationship among the multiple related tasks, thereby obtaining additional useful information.
[0049] Further, with regard to the step S400, the loss function of the residual network 210 is: L.sub.noise=1/N.sub.nΣ.sub.i∈D.sub.
[0050] Further, a loss function of the standard neural network 220 is:
where v.sub.j is the true value label, g.sub.j is the second predicted value, and L.sub.clean is a loss value of the standard neural network 220. In the standard neural networks 220, the mapping from the image features to the true value labels is learned, and the second predicted value is obtained; and all the image features entering the standard neural networks 220 are supervised by using the true value labels.
[0051] In addition, the first predicted value and the second predicted value enter the classifier 230, and the classification result is calculated according to the following formula: k=W.sub.1a+W.sub.2b, where k is a classification result, a is a first predicted value, b is a second predicted value, W.sub.1 is a weight corresponding to the first predicted value, and W.sub.2 is a weight corresponding to the second predicted value.
[0052] Further, the overall goal of the plurality of classification networks 200 is
where W is a hyper-parameter, and α is a balance parameter between the loss value of the residual network 210 and the loss value of the standard neural network 220.
[0053] Referring to
[0054] a pre-processing module 100, configured to pre-process inputted facial images to obtain pre-processed images, where the pre-processed images include true value images marked with true value labels and noise images marked with noise labels;
[0055] a multitasking module 200, configured to allocate the pre-processed images to multiple tasks, where each task includes a plurality of the true value images and a plurality of the noise images, and the multiple tasks include one main task specifically for facial beauty prediction and multiple auxiliary tasks related to the facial beauty prediction;
[0056] a feature extraction module 300, configured to process the true value images and noise images of the multiple tasks to obtain shared image features; and
[0057] a classification module 400, configured to process the image features to obtain a plurality of classification results and includes a plurality of classification networks 200 each including a residual network 210, a standard neural network 220 and a classifier 230, where each of the plurality of classification networks 200 corresponds to a respective one of the multiple tasks;
[0058] In each of the classification networks 200, the residual network 210 processes the image features, learns mapping from the image features to residual values of the true value labels and the noise labels and obtains a first predicted value; the standard neural network 220 learns mapping from the image features to the true value labels and obtains a second predicted value; and each of the classification results is obtained by the classifier 230 according to the first predicted value and the second predicted value.
[0059] In this device embodiment, the beauty prediction device based on multitasking and weak supervision, which uses the beauty prediction method based on multitasking and weak supervision as described in the method embodiment, can execute all of the steps of the beauty prediction method based on multitasking and weak supervision by means of cooperation of the modules, and has the same technical effects as the beauty prediction method based on multitasking and weak supervision. Details are not described herein again.
[0060] Some embodiments of the present disclosure provide a storage medium storing executable instructions which, when executed by a computer, cause the computer to perform the beauty prediction method based on multitasking and weak supervision as described in the method embodiment of the present disclosure.
[0061] Examples of the storage medium includes, but are not limited to, a phase change random access memory (PRAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), other types of random access memory (RAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory or other memory technologies, a compact disc read-only memory (CD-ROM), a digital versatile disc (DVD) or other optical storage, a magnetic cartridge tape, a tape disk storage or other magnetic storage devices or any other non-transmission media, which can be used for storing information that can be accessed by a computing device.
[0062] The foregoing description provides only preferred embodiments of the present disclosure, and the present disclosure is not limited to the above-mentioned embodiments. Any embodiment achieving the same technical effects by the same means shall fall within the protection scope of the present disclosure.