Virtual face makeup removal, fast face detection, and landmark tracking
The system addresses inconsistencies in virtual makeup systems by decomposing facial images and using deep learning for personalized recommendations, achieving realistic and stable virtual makeup trials.
Patent Information
- Application Number
- JP2024098425
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2017-07-13
- Filing Date
- 2024-06-19
- Publication Date
- 2024-09-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing virtual makeup systems struggle with inconsistency and unrealistic results due to pre-applied makeup, and face landmark detection faces challenges with shaking and delay issues, occlusions, and inaccurate color representation.
The system employs methods for virtual makeup removal by decomposing facial images into reflectance and shading channels, using histogram matching under different lighting conditions, and incorporates deep learning for personalized makeup recommendations and landmark tracking to enhance accuracy and realism.
The system effectively removes pre-applied makeup, stabilizes landmark detection, and provides realistic virtual makeup trials with improved color consistency and reduced delays, enhancing user interaction and virtual makeup simulation.
Smart Images

Figure 2024120013000001
Abstract
Description
[Technical field]
[0001] Virtual facial makeup removal and simulation, fast face detection and landmark tracking
[0002] (CROSS REFERENCE TO RELATED APPLICATIONS) This non-provisional patent application claims the benefit under 35 U.S.C. §119(e) from U.S. Provisional Patent Application No. 62 / 531,929, filed July 13, 2017, the entire disclosure of which is incorporated herein by reference.
[0003] (Technical field) The present disclosure relates to systems and methods for virtual facial makeup simulation, including methods for virtual removal of makeup and application of makeup and makeup effects to a user image. The present disclosure further relates to systems and methods for virtual facial makeup simulation using neural networks. The present disclosure also relates to various methods and systems for improving virtual facial makeup simulation, including virtual makeup tutorials, makeup recommendations, automatic brightness adjustment and color calibration using color maps and standards, a framework for fast facial landmark detection and tracking, and methods for solving latency issues associated with fast facial movements and landmark shaking issues associated with users staying further in the video. [Background technology]
[0004] Facial makeup is widespread in our daily lives and social networking. Due to the rapid growth of e-commerce, smartphones and augmented reality technology, there are now virtual makeup try-on applications on the market that allow customers to view certain makeup products with the expectation that those products will be applied once to the customer, without the need to actually apply the makeup. However, existing virtual systems suffer from inconsistency issues due to the effects of existing makeup that may already be applied to the user in certain cases. If the user has already applied makeup to their face, the virtual system can only overlay the virtual makeup application on the face as is, which may lead to incorrect, inconsistent or unrealistic results if makeup is already applied to the user.
[0005] Virtual mirror systems are known for use in modifying the appearance of objects or consumer goods, such as clothing, online. These systems focus on the shape of the object and replacing color or clothing overlays. An example of such technology is described in U.S. Patent No. 7,948,481.
[0006] Similar overlay methods have been developed for cosmetics as well as for "virtual try-on" of various cosmetics on a user's face. Such methods incorporate facial recognition software from a main server to identify facial features on a digital image from the user's server. The detected facial features such as eyes, lips, etc. can then be overlaid with pixelated images from a particular cosmetic product. See, for example, U.S. Patent No. 8,498,456.
[0007] Such systems are improving over time to achieve greater accuracy. For example, an image can be captured and augmented for virtual try-on by using a database of captured image data from the user and augmented facial image data that is mathematically overlaid and matched to the captured image to create an augmented image, such as that described in U.S. Patent Application Publication No. 2016 / 0196665.
[0008] Feature matching and digital enhancement using facial recognition software to create an augmented appearance, such as a "virtual facelift," is also known, as described in US Pat. No. 8,265,351.
[0009] Further improvements have been made in the virtual try-on area to obtain further accuracy and better final results. For example, a virtual system having a method and system for detecting and removing makeup from a user's face is described in US Patent Application Publication No. 2017 / 0076474. The system detects the type of makeup and removes it from the user based on a database of users with and without makeup.
[0010] While such techniques continue to improve, there is a need in the art for more consistent and realistic coloring of the end result by eliminating the effect of the potential presence of existing makeup, and for enhancements in techniques for removing and applying makeup in virtual settings. The more accurate and realistic the end results achieved by such systems are, the more useful they are as a viable alternative for consumers. Furthermore, while facial landmark detection presents many potential attractive applications in augmented reality, virtual reality, human-computer interaction, and the like, there are currently applications that have people wear virtual makeup and recognize their faces using specific end points as facial landmarks, and there are still problems with such development techniques in terms of accuracy. For example, when using these techniques, there are always two major problems that severely affect the performance of such applications in videos: the jitter problem and the latency problem.
[0011] Other problems that may arise are that landmarks that are not desired to appear in the image may be hidden or may make traditional landmark techniques difficult to apply, for example, a crooked smile or a pursed-lip kissing expression is difficult to detect and modify on a face. Other occlusions over the lip area, such as fingertips, teeth, tongue or other objects covering the lips, make such standard face recognition or detection techniques difficult to use.
[0012] Thus, there is a need in the art for consistent and realistic colors by eliminating existing or potential cosmetic effects in the try-on, as well as a need for smooth video, true color and brightness by finding techniques to avoid problems associated with lag and shaking and problems in videos for better detection and recognition using more accurate facial landmarks, as well as eliminating problems associated with hidden areas when using landmarks and other issues. There is also a need in the art to provide a more convenient and streamlined way for users to interact with the virtual try-on system, showing more realistic effects than can be achieved by simple color overlays. Summary of the Invention
[0013] In one embodiment herein, the present invention includes a method for virtually removing facial makeup, the method including: providing a facial image of a user having makeup applied; searching for facial landmarks from the user's facial image, the facial landmarks including at least a first region and a second region different from the first region; decomposing the first region of the facial image into a first channel; providing the first channel of the first region to histogram matching to obtain a first image with makeup removed in the first region; converting the second region of the facial image into a color channel; providing the color channel under different lighting conditions to histogram matching to obtain a second image with makeup removed in the second region; and combining the first image and the second image to form a resultant facial image with makeup removed from the first region and the second region.
[0014] In such a method, the first channel may include a reflectance channel and a shading channel. The reflectance channel may include material-dependent properties of the facial image, and the shading channel may include light-dependent properties of the facial image. The reflectance channel preferably includes only one color, and the shading channel preferably preserves shape information of the first region.
[0015] The first region of the method preferably includes an eye region and the second region preferably includes a lip region. The makeup type of the first region before providing the first channel of the first region to the histogram mapping is preferably different from the makeup type of the second region of the face image before converting the second region of the face image to a color channel. The color channel may include a hue channel, a saturation channel, and a color value channel.
[0016] In a further embodiment, providing the color channels to the histogram matching includes providing a dataset of face images without makeup in a corresponding second region of each face image under different lighting conditions, and matching one or more histograms of the color channels under the different lighting conditions with corresponding ones of the predefined histograms to obtain the second image. In one embodiment, the color channels are value and / or saturation channels.
[0017] The present invention also includes a method for virtually removing facial makeup, the method including providing a facial image of a user having makeup applied, searching for facial landmarks within a region of the user's facial image, decomposing the region of the facial image into separate channels, and feeding the separate channels of the region to histogram matching to obtain a resultant image in which makeup has been removed in the region.
[0018] In this embodiment, the region of the user's facial image preferably includes an eye region. The makeup of the user's facial image before decomposing the image may include eye makeup. The separate channels may include a reflectance channel and a shading channel. The reflectance channel may include material-dependent properties of the facial image, and the shading channel may include light-dependent properties of the facial image. The reflectance channel preferably includes only one color, and the shading channel preferably preserves shape information of the first region.
[0019] The present invention further includes a method for virtually removing facial makeup, the method including providing a facial image of a user having makeup applied, searching for facial landmarks in a region of the user's facial image, converting the region of the facial image into color channels, and feeding the color channels under different lighting conditions to histogram matching to obtain a resultant image in which makeup has been removed in the region.
[0020] In an embodiment of the method, the region of the user's face image preferably includes a lip region. The makeup of the face image before converting the region of the face image to a color channel is also preferably lipstick or lip gloss. The color channels may include a hue channel, a saturation channel, and a color value channel. The step of providing the color channels to the histogram matching may include providing a dataset of a face image without makeup, the dataset including predefined histograms, and matching the histograms of the color channels under different lighting conditions with corresponding ones of the predefined histograms to obtain a second image. In an embodiment of the present invention, the color channels are color value channels and / or saturation channels.
[0021] In this embodiment, the method further comprises collecting skin color datasets under different lighting conditions having corresponding lip color shifts for such different lighting conditions compared to a standard lip color. extracting an input skin color from the image of the user, detecting a corresponding lip color shift in the input skin color under particular lighting conditions, and providing a final modified lip color for use as a removed lip color from the first region of the user's facial image, wherein the final modified lip color may have the detected color shift.
[0022] Also within the scope of the present invention is a system for detecting and removing makeup from an input image, the system receiving an input image with applied makeup from a user interface, searching for facial landmarks from a face image of a user in at least a first region and / or a second region different from the first region, where the first region contains makeup and / or the second region contains makeup, and if the first region is found, decomposing the first region of the face image into first channels and providing the first channels of the first region to histogram matching using reference histograms from a dataset of histograms of faces without makeup, respectively; The method is configured to obtain a first image with makeup removed in the first region, and / or if a second region is searched, convert the second region of the face image into color channels and provide the color channels for histogram matching under different lighting conditions to obtain a second image with makeup removed in the second region using reference histograms from a dataset of face histograms under different lighting conditions, each without makeup, and if both the first region and the second region are searched, combine the first image and the second image to form a resultant face image with makeup removed from the first region and the second region.
[0023] In one embodiment of the system herein, the system may comprise a controller having a system memory and a system processor, the controller configured to receive an input image and receive and / or store in memory a dataset of histograms of a face without makeup and a dataset of histograms of a face under different lighting conditions, the system processor may execute programming instructions capable of detecting the face image and searching for facial landmarks. The processor may preferably execute programming instructions for decomposing a first region of the input image into a first channel and histogram matching of the first channel of the first region, and the processor may execute programming instructions for converting a second region of the face image into a color channel and histogram matching of the color channel under different lighting conditions.
[0024] Also, in this embodiment, the user interface may be a smartphone digital camera, a digital camera, a digital video camera, a webcam, or a smartphone digital video camera.
[0025] The present invention also preferably includes a method for generating output effects on an input image having a face, the method including: (a) providing a facial image of a user having facial landmarks; (b) searching for facial landmarks from the facial image of the user, the facial landmarks including a first region, and the landmarks associated with the first region are associated with lips in the facial image having a lip color, the first region including the lip region; (c) converting the lip region of the image into at least one color channel and detecting and analyzing a light distribution in the lip region; (d) generating at least one output effect by feeding the at least one color channel to a histogram matching over the varying light distribution and identifying a histogram having a predefined light distribution that varies from the light distribution in the lip region; and (e) combining the output effect with the first image to provide a resultant image having a lip color and at least one output effect applied to the lips.
[0026] In this embodiment, the at least one color channel may include a saturation channel and / or a color value channel. In this embodiment, prior to the conversion step (c), The method may further include removing makeup from a lip region of the user's facial image. In other embodiments, the facial landmark may include a second, and the second region may include an eye region. In such embodiments, the method may further include (f) decomposing the eye region of the image into at least one first channel and detecting and analyzing a light distribution in the eye region; (g) providing the at least one first channel to a histogram matching across the varying light distributions and generating at least one second output effect for the eyes by identifying a histogram having a predefined light distribution different from the light distribution of the eye region; and (h) combining the first result image with the second image and the at least one second output effect to provide a second result image having a predefined lip color and at least one first output effect for the lips and at least one second output effect for the eyes.
[0027] In this embodiment, the at least one first channel may include one of shading or reflectance. The light distribution of the histogram with the predefined light distribution may add transparency and smoothness, and the at least one output effect may include a gloss effect. The gloss effect preferably varies with the level of transparency. The light distribution of the histogram with the predefined light distribution may add random reflectance, and the at least one output effect may include a natural effect. The light distribution of the histogram with the predefined light distribution may add transparency and gloss, and the at least one output effect may include a gloss effect. The light distribution of the histogram with the predefined light distribution may add sparkle, and the at least one output effect may be a sparkle effect.
[0028] In this embodiment, steps (d) and (e) can be repeated to produce at least one different output effect for the first image, and each resulting image having one of the at least one different output effect for the first image is combined with the first resulting image to provide a final resulting image having the at least one first output effect and each of the at least one different output effect for the first image.
[0029] The method may further include, after step (b), calculating an area of the lip region, expanding the area of the lip region by a predetermined ratio to provide a target expansion landmark to generate a bulging output effect in addition to the at least one first output effect, and combining and distorting the bulging output effect with the at least one first output effect and the first image to provide a first resultant image having a lip color applied to the lips, the bulging output effect and the at least one first output effect. In such an embodiment, the light distribution of the histogram having the predefined light distribution may further add transparency and gloss, and the at least one first output effect preferably includes a gloss effect, and the resultant image includes a bulging and glossy appearance.
[0030] The present invention herein further includes a method for generating an output effect for an input image having a face, the method including: (a) providing a facial image of a user having facial landmarks; (b) searching for facial landmarks from the facial image of the user, the facial landmarks including a second region, and the landmarks associated with the second region are associated with the eyes of the facial image, the second region including the eye region; (c) decomposing the eye region of the image into at least one first channel and detecting and analyzing a light distribution of the eye region; (d) feeding the at least one first channel to a histogram matching across varying light distributions to generate at least one second output effect for the eyes by identifying a histogram having a predefined light distribution different from the light distribution of the eye region; and (e) combining the first result image with a second image and the at least one second output effect to provide a second result image having a predefined lip color and at least one first output effect and at least one second output effect.
[0031] The present invention further comprises a makeup recommendation system, comprising at least one trained neural network model for providing varying makeup styles, a cosmetics database, and a makeup annotation system, the makeup recommendation system being capable of generating personalized step-by-step makeup instructions to a user based on data in the at least one trained neural network annotated by the annotation system and / or recommendations from the cosmetics database, and being capable of displaying a virtual makeup application to a user step-by-step based on an input image of the user. The at least one trained model is preferably derived from a deep learning framework. The deep learning framework preferably receives one or more data inputs of a face image to which a selected makeup style has been applied, and output ground truth data from the makeup annotation system.
[0032] The annotation system preferably annotates the facial image with the selected makeup style applied, and the annotated facial image provides training data for the neural network. The makeup style can be manually selected and annotated. The input image can be a frame from a video of the user. The recommendation system may further comprise at least one virtual makeup tutorial. In one embodiment, the step-by-step instructions can include (a) displaying a first selected color for a first type of makeup, and (b) virtually applying the selected color type of makeup to a corresponding area of the input image of the user's face. In such an embodiment, steps (a) and (b) can be repeated for at least one further selected color and at least one second type of makeup to create a desired makeup look for the input image of the user based on the data in the recommendation system.
[0033] The recommendation system can be modified to further include a system for adjusting the brightness of the input image, where the system for adjusting the brightness is configured to estimate a normalized skin color of a face in the input image of the user using a skin color estimator, detect facial landmarks, assign different weighting factors to the face region, the image center region and the border region, calculate an average brightness of the input image, compare the average brightness with the estimated normalized skin color to generate a correction factor, and apply a curve transformation to the input image using a polynomial transformation in accordance with the correction factor.
[0034] The invention herein further includes a system for adjusting brightness of an input image useful in a virtual makeup try-on or removal method, the system having software configured to perform the following steps: estimate a normalized skin color of a face in an input image of a user using a skin color estimator, detect facial landmarks, assign weighting factors to the face region, image center region and border region, calculate an average brightness of the input image, compare the average brightness with the estimated normalized skin color of the face to generate a correction factor, and apply a curvilinear transformation to the input image using a polynomial transform in accordance with the correction factor.
[0035] Also within the scope of the present invention is a system for providing calibration colors, configured to perform the following steps: automatically detect a color reference chart having color patches according to a user's input image received from a device having a digital camera, read pixel values of each of the color patches, compare the detected information from the color reference chart with pixel values of a stored color reference chart captured based on a golden standard system, and send camera calibration parameters to a control system so that the input image is modified to match the golden standard system to maintain color consistency.
[0036] In such embodiments, the colors calibrated by the system providing the calibration colors can be used to determine the color of an object, to determine the color of a product, to determine the color of a cosmetic product applied to a user, and to evaluate color changes.
[0037] The present invention further includes a method of providing a virtual makeup tutorial, comprising: selecting keyframes from one or more existing makeup videos and / or detecting product names in the existing makeup videos by detecting product name characters in the selected keyframes, using character recognition to search for product names, or identifying the product with a classifier derived from a trained product classifier that evaluates products in a product database; summarizing makeup information from the selected keyframes and / or the detected product names in a makeup tutorial summary; and generating a virtual makeup tutorial based on the makeup tutorial summary.
[0038] In the tutorial method, keyframes may be selected by dividing video data from one or more existing makeup videos into segments, generating a set of candidate keyframes based on frame differences, color histograms and / or camera motion, and selecting a final keyframe based on a set of criteria and whether it is a different type of makeup relative to the previous or next frame.
[0039] The present invention also includes a method for fast face detection and landmark tracking, comprising: capturing an input image using a two-dimensional (2D) camera; creating an image pyramid using images at different scales; applying a Histogram of Gradients (HOG) feature using a sliding window and a Support Vector Machine (SVM) to find a bounding box of a face on the image of the image pyramid; and using one or more facial landmark detectors based on a Global Learning Descent Regularization (GLDR) model to detect a face in the bounding box if a face is present. The method may further include extracting patches, applying landmark mean shift fitting to the image to smooth the landmark data and normalize the landmark positions across the image pyramid, and applying a three-layer neural network model as an accuracy validation model to filter misshapes and associate and select the final landmarks. The three layers of the neural network are preferably a convolution layer, an upsample layer, and a mapping layer. The method may also include reducing delays associated with fast movement and reducing shaking associated with under-movement, which may include filtering noise from the ground truth dataset using a point distribution model (PDM) to make the landmark video more stable.
[0040] Also provided herein is a method for extracting lip regions from a face image, the method comprising: (a) searching for a face region using face landmarks on an input face image; (b) obtaining the face region using the landmarks and removing non-facial background; and (c) extracting a region corresponding to each pixel in the L * a * b * L with color values in the space * a * b *Also included is a method including: applying a Gaussian mixture model based on facial color using the space to the bottom of the input facial image to calculate a probability of each pixel in the portion of the input facial image to determine whether it is greater than or equal to a reference threshold, and generating a probability map of skin areas in the portion of the facial image in which a facial area is detected; (d) generating an initial facial area binary image from the probability face map; (e) adjusting the reference threshold using an iterative method and determining an improved binary image; and (f) evaluating the improved binary image at each iteration based on a predetermined criterion and detecting a facial area using the improved binary image.
[0041] In one embodiment of such a method, the Gaussian mixture model may have three or more components. The threshold may be adjusted by offset using the array to iteratively refine the criterion threshold. The pre-determined criteria may include one or more of a ratio of a width to a height of an outer rectangle around the face region, a ratio of an area of the face region to an area of the outer rectangle, and a ratio of an area of the face region to an area of a portion of the face image. The face region in one embodiment is a lip region and the portion of the face image is a bottom portion of the face image. The method further includes: L of pixels of the initial face region and non-face region in the refined Gaussian mixture model. * a * b * Using color space color and initial face area The method may include computing a probability map for the facial and non-facial regions and creating an overall probability map using a Gaussian mixture model for use in detecting facial regions. Various embodiments of the method may further include smoothing the overall probability map using edge detection and contouring.
[0042] The present invention also includes a method for virtually providing an eye makeup add-on effect to a face image, the method comprising: (a) creating a template of at least one eye makeup feature of the eyes, manually annotating landmark points on the template associated with the eye makeup feature, and saving the locations of the landmark points as a text file; (b) extracting landmarks in an eye region of the face image using a landmark detector in the image frame; (c) cropping the eye region of the image to create an image frame based on the landmarks associated with the eye makeup feature in the template; (d) generating points by linear interpolation around the eye region from the detected extracted landmarks on the eye region of the image frame; (e) generating points around the template based on the annotated landmarks in the template; (f) applying the template to the image frame by forward distortion and creating an eye region image frame with the eye makeup feature from the applied template; and (g) cropping the eye region image frame back to the original face image to create a face image with the eye makeup feature. In such a method, the eye makeup feature can be selected from an eye shadow feature, a middle eye shadow feature, an eye shadow tail feature, an eye shadow corner feature, and an eyelash feature. Step (a) of the method may include creating templates for each of an eyeshadow feature, a middle eyeshadow feature, an eyeshadow tail feature, an eyeshadow corner feature, and an eyelash feature, and the method may further include repeating steps (b) through (g) on the facial image for two or more of the eye features in the templates, and combining the two or more features in the facial image to create a composite eye makeup look.
[0043] A method for virtually providing a lipstick texture to a face image, comprising: providing a texture simulator having a training module with a deep convolutional neural network structure; and processing an input lip region in a pre-processing module to obtain a desired lipstick color L. * a * b *Modifying the input lip region to have a desired lipstick color and luminance enhancement using the luminance channel of the color space and the weighted coverage factor to create an L channel image with luminance distribution and simulated dynamic texture; * Channel and b * Convert the input image from RGB to L for each channel. * a * b * and feeding the L channel image from the pre-processing module to a mono-channel style transfer module trained on the image dataset using a training module to create a composite L channel image having a composite color and texture based on a reference style image in the dataset; and feeding the composite L channel image having a dynamic texture simulation and a * Channel images and b * and further processing the channel images in a post-processing module for RGB conversion.
[0044] Also within the scope of the present invention is an embodiment of a system for virtual makeup removal and virtual makeup application using an input image, the system receiving an input image with makeup applied from a user interface, searching for facial landmarks from a face image of a user in at least a first region and / or a second region different from the first region, where the first region contains makeup and / or the second region contains makeup, and if the first region is searched, decomposing the first region of the face image into a first channel and feeding the first channel of the first region to a histogram matching using a reference histogram from a dataset of histograms of faces without makeup, respectively, to obtain a first image with makeup removed in the first region, and / or if the second region is searched, converting the second region of the face image into a color channel and feeding the color channel to the histogram matching under different lighting conditions. and providing a channel to the facial histogram dataset to obtain a second image with makeup removed in the second region using a reference histogram from a dataset of face histograms under different lighting conditions, each without makeup; and if both the first region and the second region are searched, combining the first and second images to form a resultant face image with makeup removed from the first and second regions, virtually applying a predetermined type of makeup to the first region of the resultant face image with makeup removed, and / or applying a second type of makeup to the second region of the resultant face image with makeup removed.
[0045] In a related embodiment, the invention includes a method for virtual makeup removal and virtual makeup application using an input image, the method including: receiving an input image with makeup applied from a user interface; searching for facial landmarks from a face image of a user in at least a first region and / or a second region different from the first region, where the first region contains makeup and / or the second region contains makeup; if the first region is searched, decomposing the first region of the face image into a first channel and feeding the first channel of the first region to a histogram matching using a reference histogram from a dataset of histograms of faces without makeup, respectively, to obtain a first image with makeup removed in the first region; and and / or if a second region is searched, converting the second region of the face image into a color channel and feeding the color channel to histogram matching under different lighting conditions to obtain a second image in which makeup has been removed in the second region using a reference histogram from a dataset of face histograms under different lighting conditions, respectively, without makeup; if both the first region and the second region are searched, combining the first image and the second image to form a resultant face image in which makeup has been removed from the first region and the second region; and virtually applying a predetermined type of makeup to the first region of the resultant face image in which makeup has been removed and / or applying a second type of makeup to the second region of the resultant face image in which makeup has been removed.
[0046] In the above embodiment of the system and method, the first type of makeup can be a virtual makeup add-on and the second type of makeup can be a virtual lipstick. The system and method can preferably further provide an output end effect for the first type of makeup and / or the second type of makeup, and / or provide a simulated texture for the second type of makeup. [Brief description of the drawings]
[0047] The foregoing summary, as well as the following detailed description of preferred embodiments of the invention, will be better understood when read in conjunction with the appended drawings. For the purpose of illustrating the invention, there are shown in the drawings embodiments which are presently preferred. It should be understood, however, that the invention is not limited to the precise instrumentalities shown. In the drawings:
[0048] [Figure 1] FIG. 2 is a graphical diagram of an example HSV color space showing hue, saturation, and color value.
[0049] [Diagram 2] FIG. 1 is a graphical diagram of a tilted RGB cube projected onto the chromaticity plane.
[0050] [Diagram 3] FIG. 1 is a flow diagram of a method for virtually removing makeup, according to an embodiment of the present disclosure.
[0051] [Figure 4] 4A and 4B show a resolved reflectance image and a shading image, respectively, according to an embodiment of the present disclosure.
[0052] [Diagram 5] 5A shows a reflectance image with makeup removed and FIG 5B shows a shading image according to an embodiment of the present disclosure.
[0053] FIG. 5C shows the result of multiplying the makeup-removed reflectance and shading images shown in FIGS. 5A and 5B, respectively.
[0054] [Figure 6] 6A and 6B show examples of makeup removal in the eye area according to embodiments of the present disclosure.
[0055] [Figure 7] FIG. 2 is a block flow diagram of a lipstick texture generator according to an embodiment of the present disclosure.
[0056] [Figure 8] 1 illustrates the blended output of each generator's output effect and a real lip image according to an embodiment of the present disclosure.
[0057] [Figure 9] 1 illustrates a block flow diagram of a deep learning model training unit according to an embodiment of the present disclosure.
[0058] [Figure 10] FIG 10A shows a more detailed example output of a makeup annotation system according to an embodiment of the present disclosure. FIG 10B shows a more detailed example output of a makeup annotation system according to an embodiment of the present disclosure. FIG 10C shows a more detailed example output of a makeup annotation system according to an embodiment of the present disclosure. FIG 10D shows a more detailed example output of a makeup annotation system according to an embodiment of the present disclosure.
[0059] [Figure 11] FIG. 1 is a block flow diagram of a makeup recommendation system according to an embodiment of the present disclosure.
[0060] [Figure 12] FIG. 2 is a block flow diagram of a virtual facial makeup simulation / recommendation system according to an embodiment of the present disclosure.
[0061] [Figure 13] 1 illustrates a process of skin color estimation according to an embodiment of the present disclosure.
[0062] [Figure 14] FIG. 1 is a flow diagram illustrating a method for adjusting image brightness using a curve transform according to an embodiment of the present disclosure. [Figure 15] FIG. 1 is a flow diagram illustrating a method for adjusting image brightness using a curve transform according to an embodiment of the present disclosure.
[0063] [Figure 16] FIG. 2 is a flow diagram of a method for detecting a color reference chart in an image and calibrating camera hardware using the detected color reference chart in accordance with an embodiment of the present disclosure.
[0064] [Figure 17] FIG. 1 is a block flow diagram illustrating a color measurement system according to an embodiment of the present disclosure.
[0065] [Figure 18] 1 illustrates an input image and its primary colors extracted using a color measurement system according to an embodiment of the present disclosure.
[0066] [Figure 19] FIG. 1 is a flow diagram illustrating a system for a facial landmark framework according to a preferred embodiment of the present disclosure.
[0067] [Figure 20] FIG. 13 is a diagram of a representative pixel Q as a pixel 4 neighborhood of pixel P for use in the shading prior distribution.
[0068] [Figure 21] FIG. 1 is a representation of a facial image landmark protocol for use in embodiments of the invention herein that employs the use of landmark locations for feature detection, including in a method for enhancing feature extraction using Gaussian Mixture Method (GMM).
[0069] [Figure 22] A face mask representation showing a portion of a face image having areas within a face region of interest that contain facial features, where the facial features are detected by landmarks and where non-facial background is removed.
[0070] [Figure 23] FIG. 23 is an example of a probability map generated using GMM on the face region of interest of FIG. 22.
[0071] [Figure 24] Included are examples of binary images created by using different thresholds on the probability map created as in FIG. 23.
[0072] [Diagram 25] Figure 25A shows rejectable binary images using different iteration thresholds when evaluated against developed criteria for evaluating binary images that include convex hull formation. Figure 25B shows acceptable binary images using different iteration thresholds when evaluated against developed criteria for evaluating binary images that include convex hull formation.
[0073] [Figure 26] FIG. 1 is an example of an overall probability map used to refine a probability map of a facial region of interest using a GMM-based method by using an improved GMM-based method for detecting facial features, where a GMM is created for foreground and background (non-facial feature) regions having facial features, and the probabilities of the two GMMs are used to determine the overall probability.
[0074] [Figure 26A] 27 is a flow chart showing preferred steps for use in an embodiment of the improved GMM-based method associated with FIG. 26.
[0075] [Figure 27] FIG. 27A is an image of a face with no makeup applied for use in an eye makeup add-on method according to embodiments herein.
[0076] FIG. 27B is an image of an eye shadow layer add-on applied to the image of FIG. 27A using an eye makeup add-on method according to embodiments herein.
[0077] FIG. 27C is an image of eyeshadow middle eye add-on applied to the image of FIG. 27A using an eye makeup add-on method according to embodiments herein.
[0078] FIG. 27D is an image of an eye corner makeup add-on applied to the image of FIG. 27A using an eye makeup add-on method according to an embodiment of the present disclosure.
[0079] FIG. 27E is an image of eye makeup add-on applied to the image of FIG. 27A using an eye makeup add-on method according to an embodiment of the present disclosure.
[0080] FIG. 27F is an image of eyelash makeup add-on applied to the image of FIG. 27A using an eye makeup add-on method according to embodiments herein.
[0081] [Figure 28] FIG. 28A is a representation of an eyeshadow template for use in an embodiment of the eye makeup add-on method herein.
[0082] FIG. 28B is a representation of an eyeshadow middle template for use in an embodiment of the eye makeup add-on method herein.
[0083] FIG. 28C is a representation of an eyeshadow corner template for use in an embodiment of the eye makeup add-on method herein.
[0084] FIG. 28D is a representation of an eye shadow tail template for use in an embodiment of the eye makeup add-on method herein.
[0085] FIG. 28E is a representation of an eyelash template for use in an embodiment of the eye makeup add-on method herein.
[0086] [Figure 29] 1 is an example of manual labeling of an eyeshadow cosmetic add-on template according to an embodiment of the method herein using points on the template according to a landmark protocol.
[0087] [Diagram 30] 1 is a flow chart illustrating steps in an eyeshadow add-on method according to an embodiment of the eye makeup add-on method of the present specification.
[0088] [Diagram 31] 31 is a visual pictorial representation of the steps of the flowchart of FIG. 30.
[0089] [Diagram 32] 1 is a flow chart illustrating steps in a middle eye shadow add-on method according to an embodiment of the eye makeup add-on method of the present specification.
[0090] [Diagram 33] 1 is a flow chart illustrating steps in a corner eyeshadow add-on method according to an embodiment of the eye makeup add-on method of the present specification.
[0091] [Diagram 34] 1 is a flow chart showing steps in a tail eye shadow add-on method according to an embodiment of the eye makeup add-on method of the present specification.
[0092] [Diagram 35] 1 is a flow chart illustrating steps in an eyelash add-on method according to an embodiment of the eye makeup add-on method of the present specification.
[0093] [Diagram 36]1 is a pictorial flow chart representation of components of a texture simulator that can learn and apply a virtual lipstick texture for use in applying an output effect to an image having lips with lipstick applied.
[0094] [Figure 37] A flowchart showing the use of a method for landmark detection, a method for makeup removal, a method for makeup trial, and a makeup effect, including texture simulation for an input image according to embodiments shown in other figures and embodiments of this specification.
[0095] [Figure 38] 1 is a schematic representation of a system for use in makeup removal and / or trial as described in various embodiments herein. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0096] The detailed description below includes preferred embodiments for implementing the method of makeup removal, and a system for doing so from a user's input image, such that the makeup try-on program provides consistent and better coloring for realistic try-on looks. In addition to the virtual removal method, a virtual add-on of makeup, and a system and method for personalized recommendation of cosmetics based on at least one trained neural network model, a makeup database, and a makeup annotation system are also provided. The recommendation system is based on the products and Based on the input image from the user and the virtual makeup tutorial, a personalized step-by-step makeup instruction for the user can be generated. Also included are methods for providing a virtual makeup tutorial and a method for providing a virtual output effect to an input image having a user's face. Such techniques can be used independently or in conjunction, as shown in the drawings herein and summarized in FIG. 37. Also described are methods for brightness adjustment and color calibration for use in a virtual makeup try-on or virtual removal method, a method for reducing delays and mitigating motion blur associated with fast movement in an input image video, and a method for fast face detection and landmark tracking, which may also include an annotation system for use by such methods.
[0097] As used herein, "makeup" encompasses a single type or multiple types of makeup at a single location of a facial image or a single type or multiple types of makeup at multiple locations, unless specified to refer to only one type or one location. Also, as used herein, references to "facial images" of users or people in the learning or training data include within their scope both photographs and videos of facial images, which may be isolated images (such as a single photograph or a single video frame) or multiple images (such as repeated photographs, an entire video or a portion of a video having multiple frames), and should not be construed as being limited to only photographs, only videos, or only single images, unless otherwise specified. The photographs and videos herein are preferably digital. Such photographs or videos may be used as "input images" (II, II') to the methods and systems herein, and may be communicated for use in the methods and systems herein via a user interface, which may be a smartphone digital camera, a digital camera, a digital video camera, a webcam, or a smartphone digital video camera or similar device capable of providing an input image.
[0098] Virtual face makeup simulation for enhanced personalized tutorials
[0099] The virtual facial makeup simulation in this disclosure uses the following techniques: HSV color space or eigendecomposition with histogram matching, respectively. The HSV color space is a well-known alternative model for evaluating color apart from the RGB color model. The RGB model is displayed as a Cartesian (cube) representation. The HSV color model is represented as either a conic or cylindrical coordinate representation that rearranges the geometry of the RGB model and is typically more intuitive and perceptually relevant by better displaying color in a manner closer to how humans perceive it. "HSV" stands for Hue, Saturation, and Value, sometimes referred to as HSB ("B" stands for Brightness).
[0100] Figure 1 illustrates the HSV color space. In each HSV representative cylinder in Figure 1, "Hue" is measured by the angle around the central vertical axis, as shown in Figure 1 by the rotating arrow labeled "Hue". The lateral distance from the axis A-A' of the cylinder in Figure 1, indicated by the arrow labeled "Chroma", corresponds to "Saturation". The distance measured along the axis A-A' corresponds to "Color Value", also known as "Brightness" or "Lightness".
[0101] Referring to Figure 1, which shows the HSV color space and the definitions of hue, saturation, and color value, hue represents the type of color that can be described with reference to its angular range as part of the full circumference range from 0 to 360 degrees. Saturation indicates how different a color is from grayscale; i.e., the lower the saturation, the more washed out or gray it appears. Color value represents the level of brightness of the color, with a value of 0 being completely dark and a value of 255 being completely bright.
[0102] The HSV model can be derived by a geometric strategy. The HSV model can be derived from an RGB cube, with the red, green and blue components in the R,G,B color specification tilted at its corners, with "white" directly above it along the vertical axis and "black" located at the origin. If one takes the tilted RGB cube and projects it onto a "chromaticity plane" perpendicular to the neutral axis, the projection takes the shape of a hexagon, with the colors red, yellow, green, cyan, blue and magenta at its corners. Figure 2 shows an RGB tilted cube C projected onto the chromaticity plane P.
[0103] Hue is roughly measured as the angle of a vector to a given point in the projection, while saturation is roughly the distance of the point from the origin. And color value is defined as the maximum component of the color. Thus, saturation is defined as saturation relative to lightness. Mathematically, the transformation equations to convert from RGB to a color space of hue, saturation, and color value are described below, for example in equation (1a).
number
[0104] In addition to using the HSV color space, the present invention uses histogram matching. In image processing, histogram matching or histogram specification refers to transforming one image so that its histogram matches a specified or reference histogram. The well-known histogram equalization method is a special case where the specified or reference histogram is uniformly distributed. Mathematically, given two images (i.e., an input image and a reference image) in grayscale and their respective histograms, the cumulative distribution of each histogram can be calculated: F1() for the input image histogram and F2() for the reference image histogram. For each gray level G1 ∈ [0,255], one can find a gray level G2 such that F1(G1) = F2(G2). This is the result of the following histogram matching function: M(G1) = G2. Finally, the function M() can be applied to each pixel of the input image.
[0105] Also, as mentioned above, in addition to HSV color space and histogram matching, the present invention uses eigendecomposition. The task of recovering eigenimages is to decompose a given input image into separate components of its material-dependent properties, typically reflectance and light-dependent properties such as illumination and shading. Taking an eye region image as an example, we can consider that the entire face skin, not including eyebrows and eyelashes, has approximately the same material and color. Ideally, the reflectance component should contain only one color for a bare face while containing all the makeup color information after applying cosmetics. In contrast, the shading component or channel is a component that allows the face to retain its basic shape within the same image. Therefore, it preserves face and eye shape information and changes very little with or without makeup. Eigendecomposition is the ability to separate these components such that the initial image can be reconstructed based on the separated components.
[0106] Before introducing the energy function in detail, we first specify the notation here. For a given image I, we need to identify two components, the reflectance R and the shading s, such that I = s × R. I i , R i and s i respectively represent the pixel value at position i of each of the above three components. Here, I i and R i is a three-dimensional vector of dimension 3, and s i is a vector of dimension 1. Relation I i =s i ×R i must be maintained for all color channels (R, G, B), so R i The direction of is already known. That is, R i teeth,
number
number
[0107] The energy function in this specification is based on two terms (prior distributions) described below (i.e., shading prior distribution (E s ) and a global sparse reflectance prior (E cl )) and their prior distributions, i.e., the two components, are described in detail below. As mentioned above,
number
[0108] In the following formula, each α i α(α1,α2,α3,...α N ) represents the cluster membership number of pixel i, and α iranges from 1 to C. For example, if you set the cluster number to 5, then each pixel is represented by a cluster membership number from 1 to 5.
[0109] The energy function is the shading prior (E s ) and global sparse reflectance Prior distribution (E cl ) is preferably expressed as a function of
number
[0110] A. Shading prior distribution (E s ): The shading of an image is here expected to vary smoothly over the image and is encoded in the following pairwise factors:
number
[0111] B. Global sparse reflectance prior (E cl ): This term is included and acts as a global potential for the reflectances, further facilitating the decomposition into several reflectance clusters, each of which is
number
number
number
[0112] Here, both continuous r and discrete α variables are mixed. This represents a global potential since the cluster mean depends on the assignment of all pixels in the image. For fixed α, this term is convex in r, and for fixed r, the optimal value of α is a simple assignment problem. Reflectance clusters
number
number
[0113] In one embodiment, the present disclosure uses the above techniques to provide a histogram matching-based framework for inherent image decomposition or HSV color channel transformation and virtual makeup removal from eye and mouth regions, respectively. Usually, when customers shop at a cosmetics store, they put makeup on their face in most situations. With the system of the present disclosure, customers do not need to remove makeup to try new makeup. Instead, customers can use computer-enhanced synthetic image technology to virtually remove makeup and virtually try new makeup.
[0114] FIG. 3 illustrates a flow diagram of a method for virtually removing makeup according to an embodiment of the present disclosure, generally referred to as embodiment 1000. Referring to FIG. 3, in step 1010, an input is acquired by a user. The user input can be any facial image, as that term is defined herein, including a single image, repeated photos, a single video frame, or a video having multiple frames, captured by a user using a mobile device or uploaded to the system of the present disclosure. Once acquired, the facial image is detected or identified from the user input. Although the removal method preferably involves only one image being input and a face being detected once the image is uploaded, the present invention is not limited to only one image input.
[0115] Once a face in the image is detected, the input image is used to search for facial landmarks in step 1020. Landmarks can be pre-defined and selected, such as the top of the chin, the outer edge of each eye, the inner edge of each eyebrow, etc. Such landmarks are common to all faces and are therefore detected and evaluated using precise identification of reference points (e.g., the tip of the nose, the corners of the mouth and the eyes) in the face foreground color image.
[0116] In step 1030, for example, a landmark detection algorithm may be utilized to locate landmark reference points and therethrough extract the mouth region and eye region images. Suitable landmark detection software and associated training sets useful herein for this purpose may be found in OpenCV (i.e., opencv.org). Additional software and techniques may be used, such as dlib landmark detection (see http: / / dlib.net / face_landmark_detection.py.html) and Giaran, Inc. landmark detection. and face recognition processes can also be used. There are many suitable commercial and open source software, such as Python, dlib and HOG for face detection, and V. Kazemi et al., “One Millisecond Face Alignment with an Ensemble of Regression Trees,” KTH, Royal Institute of Technology, Computer Vision and Active Perception Lab, Stockholm, Sweden (2014) for landmark detection and identification of reference points. Preferred for use herein is Giaran, Inc. software.
[0117] Although various regions and reference points can be used in the methods and systems herein, for the purpose of illustrating a preferred embodiment showing the first and / or second regions to be extracted and one of such regions being uniquely decomposed, the following example shows such steps using eye and mouth regions as follows: For the eye region 1040A, for example, a unique image decomposition technique is utilized in step 1045 to recover the shading and reflectance channels of the eye region. Then, in step 1050A, the shading and reflectance channels are separately fed to histogram matching to obtain an image with makeup removed in the eye region. For the lip / mouth region 1040B, for example, the image is first transferred, i.e., converted, to HSV color channels, and different histogram matching procedures are applied separately to the H, S, and V channels for different lighting conditions. To remove lip color, a specific reference histogram of "saturation" and "color value" was learned from a collected dataset of face images without makeup on the lips. Using those predefined lip histograms, the input lip makeup could be removed by matching the detected lip histogram with the corresponding histogram without makeup. For the lip channel, there is no need to represent it using a histogram, but rather the "hue" channel is used as the lip region, which usually has only one value, so that the "hue" channel procedure sets the "hue" channel of each pixel compared to a pre-trained color value.
[0118] In step 1050B, the different H, S and V channels are fed to histogram matching or pixel matching as required. The channels are fed separately to obtain an image with makeup removed in the lip / mouth region.
[0119] In step 1060, the images resulting from steps 1050A and 1050B are combined by overlaying one on top of the other to form an image in which any facial makeup has been removed from the lip and eye regions. If more regions have been analyzed using these techniques, they can also be overlaid on these regions.
[0120] For the eye region 1040A, two priors are combined to form an energy function. By solving the energy function, an optimized decomposition of the reflectance and shading images can be found. The two priors provide smoothing constraints for the shading and reflectance channels. The shading of the image is allowed to vary smoothly over the image, and a 4-connected pixel graph is used to encode the neighborhood relationships. The latter global sparse reflectance prior limits the number of color clusters present in the reflectance image. It allows the mixing of different material reflectances, thereby preserving the diversity of possible cosmetic colors, and mathematically clusters.
[0121] In the disclosed system and method, the lip region image is converted to HSV color space according to the same embodiment. From experiments, the inventors herein have observed the following: The "hue" channel usually changes when lighting conditions change or when a bright lipstick is applied, the "saturation" channel changes when red lipstick is applied, and the "color value" or "brightness" changes when a purple or dark color is applied. Based on these observations, the corresponding channels can be edited by different color lipsticks when detected. To remove lip color, specific reference histograms of "saturation" and "color value" can be learned from the collected non-makeup lip dataset. Using these predefined lip histograms, the input lip makeup can be removed by matching the detected lip histogram with the corresponding non-makeup histogram. It is noted that for the "hue" channel, the lip region usually has only one value and does not need to be represented by a histogram.
[0122] It should be noted that lips look different under different lighting conditions. Therefore, the disclosed system takes the lighting conditions into account to provide a more realistic removal color prediction. To use this method, a skin color dataset is collected under different lighting conditions with corresponding lip color shifts compared to standard lip color. With this dataset, the disclosed system first extracts the input skin color and finds the corresponding lip color shift under this specific lighting condition. Then, a final corrected removed lip color is provided along with the detected color shift. The skin color dataset is not necessary for other removal regions, but is collected for guidance in lip makeup removal. In the absence of a dataset, a predefined color can also be used to detect lips.
[0123] When removing makeup in the eye region, the situation is much more complicated than that in the lip region, which usually has only one unified color. Therefore, for the eye region, a unique image decomposition technique is introduced to first separate the unique color information and shading information caused by the shape and illumination. After the reflectance image and the shading image are obtained, a histogram matching technique is applied to remove the makeup. The reference histogram for the eye region is generated in a different way than that for the lip region. For the eye region, the reference histogram is obtained by filtering the extracted histogram based on a certain criterion. The makeup color of the eye makeup (eye shadow, eye liner, mascara) should be different from the skin color and is considered to be a minority part compared to the skin color in the eye region. Therefore, a threshold is set for each color and its proportion. The threshold is a scale used to judge the potential makeup color because the assumption is that the makeup color is a minority color compared to the skin color, so the threshold is applied to find the color with a small amount of color.
[0124] In one embodiment, the system of the present disclosure can be summarized according to the pseudocode shown in Appendix A, which is incorporated herein as suitable code for operating this aspect of the present invention. Each appendix in this specification is part of the specification, but is separated from the main text to make the text easier to read and understand.
[0125] 4A and 4B show examples of a decomposed reflectance image (FIG. 4A) and a decomposed shading image (FIG. 4B). The reflectance image in FIG. 4A is a three-channel RGB image containing color information of the cosmetics, and the shading image is a gray image. Then, histogram matching is applied to both of the two decomposed images to obtain a removed image. FIG. 5A and 5B show examples of a makeup-removed reflectance image (FIG. 5A) and a makeup-removed shading image (FIG. 5B). Then, the two images in FIG. 5A and FIG. 5B are multiplied (overlaid) to generate a removed eye region image, as shown in FIG. 5C. FIG. 6A and FIG. 6B show an example of makeup removal in the eye region. The overlay involves multiplication of the color values of the two layers at each pixel.
[0126] In other embodiments herein, landmarks are used for facial feature extraction, and the landmark detection technique, which is preferred for use in lip region extraction in particular, is enhanced to consider situations where the input image may include situations where it is difficult to detect face regions, especially those with lip gestures (pursed lips kissing face or wide distorted smile) or lips with occlusions (fingertips, teeth, tongue or any object covering the lips) within the lip region. In such situations, the use of landmarks alone does not usually provide an accurate face region, such as an accurate lip region. The present embodiment utilizes color information to further improve the landmark detection results and obtain and detect optimal face regions, such as a preferred optimal lip region. It should be understood that the following method is described with respect to the lip region, but can be used for other face regions by analogy.
[0127] In general, the color difference between the lip area and the facial skin background varies greatly, and may even vary slightly for different people with different colorings. Therefore, it is necessary to propose a lip segmentation method to adapt to various color differences.
[0128] Therefore, the present invention uses the Gaussian Mixture Model (GMM) technique. A mixture model is a probability model that represents a subpopulation of a normal distribution within a population of . In general, a mixture model does not require knowing which subpopulation a data point belongs to, so the model can learn the subpopulations automatically.
[0129] A GMM is parameterized by the mixture component weights and two other values: component means and variances / covariances. For a GMM with K components, the kth component is μ k Mean and σ k The mixture component weights are the components C k In the case of φ k and the sum probability distribution is normalized to 1, Σ k (i=1) Φ k =1.
[0130] In the present invention, a method for extracting lip regions from face images based on a GMM color model is provided. The method can be used in makeup removal methods to replace colored lips with plain lips, or in makeup add-on methods to remove existing lip regions and replace them with other colored lip regions. In many cases, landmark detection may not provide the true lip region, especially based on distortion or occlusion, so the goal of the method is to refine the lip region based on the landmark analysis result.
[0131] The method first uses face landmark detection as described herein to detect face regions and face landmarks from the input image. This is shown in FIG. 21. As shown, numbers are assigned to mark all face landmarks in the landmark protocol 2. From this, the face region of interest 4 (lip region in this example) is obtained as shown in FIG. 22, and the non-face background 6 is removed to build the GMM model. See face mask M in FIG. 22. The accuracy of removing the non-face background has little impact on obtaining the final lip segmentation result. Here, for the persistence with human perception, L * a * b * A color space is selected. The number of components of the GMM model is set to 3 based on the inventor's empirical studies, but other values such as 4, 5, 6, etc. can be used without significantly changing the effectiveness so that the invention should not be considered limited to GMMs with 3 components.
[0132] Complexion GMM is * a * b * For each pixel i in the lower part of the face, a given color value x i =(L i ,a i ,b i ), and the three-dimensional L * a * b * Given a color value, its complexion probability generated from the complexion mixture model is calculated as follows:
number
[0133] In conventional lip detection methods, a fixed threshold is usually used to estimate which pixels belong to the lip region or are outside the lip region. However, the color difference between the lips and the background of the facial skin around the lips can vary greatly from person to person. Moreover, in some cases, the difference between the lips and the surrounding skin area can be slight. This problem is addressed in the present paper. This is addressed by a detection method: first, find a baseline threshold using a threshold method such as Otsu's method, and then adjust the baseline threshold based on the baseline threshold using an array of offsets, where: offset={0, 0.05, 0.10, 0.15, 0.18, 0.2, 0.22, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 0.30, 0.31, 0.32, 0.33, 0.34, 0.35, 0.36, 0.37, 0.38, 0.39, 0.4, 0.5}. The threshold applied is the difference between the reference threshold minus the offset.
[0134] Each pixel greater than the threshold is set to 0, otherwise 255. Thus, the higher the threshold, the fewer pixels are preserved and the other pixels are 0. By applying different thresholding techniques, different binary images 10, 12 are obtained for the face region 4 as shown in the two images in Figure 24 obtained from a probability map such as Figure 23.
[0135] For each iteration, the generated binary image was used to detect the lip region based on some prior knowledge about lips, which was used to develop the following standard. 1. The ratio of the width and height of the outer rectangle of the lip area has a specific range. The outer rectangle is based on the smallest rectangle that can contain all of the white areas after the binarization described above. The ratio of the width and height is set between about 0.7 and about 10. 2. The ratio of the area of the lip region to its outer rectangle has a certain range. The area of the lip region is the white area after the binarization procedure above. For example, in FIG. 24, the white area of each image defines the area of the detected lip region. The outer rectangle is the smallest rectangle that can contain all of the white area. The ratio of the area of the lip region / area of the rectangle is set from about 0.3 to about 0.9. 3. The ratio of the area of the lip region to the area of the lower face has a certain range. As shown in the landmarks shown in FIG. 21, when the face landmarks are detected, the lower face region can be defined as continuing from the lower point (point 7, point 10) to point 34, and continuing from point 4 to point 14. For example, when evaluating the binary image of FIG. 24, the relevant image region is the lower face region determined by the landmarks. The ratio of the area of the lip region to the area of the lower face region is about 0.1 to about 0.5.
[0136] When evaluating the above parameters, the location of the center of the lip region must be within a specific area of the lower face, the border of the lip region must not reach the border of the lower face, and the area of the lip region 4 must be approximately the convex hull as described with reference to Figures 25a and 25b. When evaluating Figure 25a, an image 14 of the lip region 4 is shown, where the grey regions 16 do not form a convex hull with the white regions, and such an image is rejected as not convex. Figure 25b provides an image 18 with grey regions 20 that are accepted as forming a convex hull from the white regions.
[0137] An iterative method is used to detect the lip region using the complexion probability map of the lower part of the face. In each iteration, an offset is added to the criterion threshold until the binary image contains a contour region that meets the above criteria and the white region has a convex hull configuration. If such criteria are met, the detected region is considered as the initial lip region.
[0138] Usually, the initial lip region is not an optimal image. The lips may contain some skin pixels, and may erroneously remove lip pixels from the initial lips. To further solve the problem and refine the lips, an optimization method is used. Specifically, L * a * b * In color space, the colors of pixels in the initial lip region and non-lip region are used to construct the improved GMMs, respectively. The number of components in each GMM is set to 3. The two GMMs are used to calculate the background probability map and the foreground probability map. The overall probability map of the lip region is
number
[0139] After obtaining the global lip region probability map, Canny edge detection and contour smoothing are used to obtain the final lip region mask. This technique is known and described in J. Canny, “A computational approach to edge detection,” Readings in Computer Vision, (1987), pp. 184-203, which is incorporated herein in relevant part.
[0140] After Canny edge detection, there are many edge candidates. As a result, the prior knowledge of the lip region is used to filter the final edge line. Specifically, first, find the left and right corners of the mouth by selecting the leftmost and rightmost points of the white region. Then, between the left and right corners and for each column of pixels, the image region is scanned from top to bottom and the two pixels with the maximum gradient are selected as the final edge pixels of the upper lip line and the lower lip line, respectively. When scanning the column of pixels, a priori constraint is applied that each adjacent point should be within a small vertical range (e.g., within about -5 pixels to about +5 pixels) so that the final edge is smooth. The algorithm of this method is the color-based lip mask extraction described above and is represented in pseudocode in Appendix B.
[0141] The method is shown in the flow chart of FIG. 26a herein as embodiment 300. In the method, an image of a user is acquired in step 310. In step 320, facial landmarks are detected as described herein. Then, in step 330, a skin color based GMM is trained using data from non-lip regions, and an initial probability map of lips in the lower part of the face is created in step 340 as described above. In step 350, the threshold of the image binarization is adjusted until the contour meets the lip region standard criterion described above. If a lip region is detected, the GMM is trained in step 370 on the initial lip region and non-lip regions. If a lip region is not detected, the threshold continues to be adjusted to meet the criterion. After step 370, in step 380, an improved probability map is created based on the two learned GMMs. Then, in step 390, the lip contour is smoothed using an edge detection algorithm and prior knowledge of the lip shape. Finally, in step 395, the optimal lip region is extracted as output.
[0142] Texture generation for lip products and output effects
[0143] In one embodiment, the present disclosure provides a method for providing various output effects to a facial image. The method provides output effects in the form of dynamic texture generation that is directed to a texture add-on methodology that is applicable to various types of products, including lipstick products such as lip gloss, lip plumper, and lipstick. For example, four different effect generators and output effects are possible and included herein, including gloss, shimmer, random lighting, and plumpness. Many other output effects in the form of texture variations can be generated by adjusting parameters and combining them.
[0144] Cosmetics companies offer lipstick products in a variety of colors and textures. Some of these companies offer virtual try-on solutions on their websites to help customers check the color of the product. For example, Sephora's Virtual Artist, one of the largest virtual try-on services, allows people to try on hundreds of lipsticks with the click of a mouse, and users can also simply click shop to add their selections to their shopping cart.
[0145] Existing virtual try-on systems generally only provide color results, even if the cosmetic product has different textures, such as glossy, moisturizing, matte, etc. Although there are some approaches to generate glossy effects on lips, such approaches usually only apply predefined masks that cannot adapt to changes in light.
[0146] The texture generation technique of the present disclosure includes four methods for generating different textures. First, the present method generates a gloss effect. It detects the light distribution of the lips and applies smoothness and transparency. In addition, it creates random reflections so that this effect looks more natural. Also, different parameters can be used to generate gloss effects for products with moisturizing, shimmer, or satin textures. Specifically, when applying a less glossy effect, a lower transparency is used while maintaining the original texture of the user's lips. Because this method uses the light distribution from the input image, the change in the generated texture is light-dependent, which is a differentiator from existing methods.
[0147] FIG. 7 shows a block diagram of a lipstick texture generator according to an embodiment of the present disclosure. An input image, which may include a face to be processed, is mixed with the output from three different texture generators. FIG. 8 shows the output effect of each generator and the mixed output of a real lip image. It should be noted that this illustrated example is not limiting of the texture generators, as many other texture variations can be generated by adjusting the parameters and combinations of the four different effect generators. The detailed algorithmic pseudocode for adding transparency and gloss effects is provided in Appendix C.
[0148] In FIG. 7, an example of a method 2000 for generating an output effect on an input image having a face is shown. The input image can be an image of a face with or without makeup. In step 2010, this input image is provided to a system as described elsewhere herein. If the image has makeup on the face, particularly on the lip area, the makeup removal method described above can be used to remove the makeup if necessary and apply the true color of the desired lipstick shade to the user's face. The facial image can also be used as is. The facial image has facial landmarks such as the landmarks described above, and the system used consists in having suitable software as described above that searches for at least one or all facial landmarks from the user's facial image. The landmarks are associated with at least one facial region. Since such an output effect is shown here for lips in a first exemplary embodiment, the facial image needs to detect the landmarks associated with the lips of the facial image, and the first facial region includes the lip area.
[0149] The face image in the region of the landmarks may be transformed as described herein, and the face region, including the searched lip region, is transformed into at least one color channel to detect and analyze the light distribution (i.e., illuminance) of the lip region. To do so, the channels evaluated are preferably saturation and color value channels, although other properties such as hue, reflectance, shading, illuminance, transparency or other light reflectance properties may be further evaluated. Preferably, at least saturation and color value are evaluated over a range of brightnesses and detected and analyzed in the first color channel, although other channels as mentioned above may also be detected and analyzed as shown in step 2020 of FIG. 7.
[0150] The color channels are histogrammed using the techniques described herein across a range of light distributions. A histogram within the dataset of various light distribution histograms having various predefined light distributions including values that differ from the light distribution in the lip area to a desired degree are identified which are fed into the ram matching, thereby producing a desired output effect. In step 2025a, illuminance / brightness parameters spanning a range may be used to provide various degrees of transparency, smoothness and / or shine for various gloss or shine effects, similar to step 2025b.
[0151] In step 2030a, a predefined histogram having a desired degree of sparkle from the light distribution can be identified to create a sparkle effect as in step 2030b to provide different levels of sparkle.
[0152] In step 2040a, a predefined histogram can be specified to add random light distribution to create a more natural effect as in step 2040b.
[0153] In each example, after such histogram matching for the first effect, e.g., gloss or sheen level, in steps 2025a and 2025b, the method provides a first image with an output effect. If multiple output effects are required, step 2020 and further one of other parallel steps 2030a and 2030b can be repeated to provide one or more additional images, each with an associated output effect as needed, to provide a shimmer and / or natural effect or combinations thereof in 2040a and 2040b (or additional effects as desired as would be understood by those skilled in the art on which this disclosure is based). The first image with the first output effect and / or the additional images with their respective output effects are combined and blended with the user's original facial image in step 2040 to create a resultant image in which each output effect is combined with the user's facial image in step 2050.
[0154] If a bulge effect is required (2050a), after the facial landmarks in the lip region are detected, either alone or using other output effects, they are expanded in the lip region by a predetermined ratio. Once this is completed, a glossy (suggesting wetness) output effect is preferably applied to the expanded lip region, using the techniques described above as needed, to create an expanded image with the expanded (puffed) lip region and any other applied output effects, such as gloss applied. Other effects can also be combined with the bulge. The modified image with the puffed lip region and any other applied output effects is then overlaid and distorted on the original mouth region of the initial user image. When processing the landmarks initially, a magnification ratio is calculated based on the initial region of the lip region of the initial user photo, and the image in the landmarks in the initial lip region is distorted towards the target expanded landmark. The final result image 2050 is then generated using an overlay of all images with output effects and / or bulge effects selected in the method 2000 by combining the images and output effects.
[0155] As described above, before converting the image, the makeup removal method and system of the present specification can be used to complete the makeup from the lip area of the user's face image. Thus, in addition to generating the output effect described above, the lip area of the face image without makeup can be converted to a color channel as described above, and then the color channel can also be fed into histogram matching under various lighting conditions to identify histograms with predefined makeup colors corresponding to commercial or other color lipsticks in the dataset, and obtain further additional images with lip colors applied to the lips in the lip area, so that the image with the color can be combined with the user's original face image and any image of the user generated by the end effect to provide a result image with the predefined lip color and the desired output effect.
[0156] For output effects, a histogram can be provided with a predefined light distribution that creates an output effect that incorporates varying degrees of transparency and smoothness based on transparency to provide varying degrees of gloss. The predefined histogram light distribution can also add varying degrees of random reflectance to provide an output effect that is a more natural effect. For output effects that are gloss effects, further varying degrees of transparency and gloss can be used. A predefined light distribution effect for providing sparkle can also be used to create a sparkle or shimmer effect.
[0157] FIG. 8 shows the input image II and the detected light distribution in the form of a graphical illuminance profile B generated from image II. The data is then mapped to the predefined output effects mentioned above, including gloss levels CE from transparency and gloss variations, random lighting effects DE and sparkle effects EE, which are subsequently mixed with the original face image II to create a result image with lip region LR as shown. If a bulging effect is required as shown, the landmarks used for the other effects shown in FIG. 8 are enlarged by a predefined ratio in the lip region before applying gloss CE, random lighting effects DE or sparkle effects EE, such that the lip region LP modified (enlarged) by the output effects is overlaid and applied to create one output image with bulging lips.
[0158] Learning-based real-time lipstick texture simulation
[0159] In a further embodiment, a texture generator is provided herein that utilizes a deep convolutional style transfer network to simulate three lipstick textures, namely, matte, moist and glossy. The texture style transfer operates on luminance levels that change the input light distribution of the original lip region to the desired distribution of different lipstick textures while remaining faithful to the pre-processed lipstick color. The style-transformed lip region is then processed by a dynamic texture generation technique for final modification.
[0160] Existing virtual trial techniques rely heavily on the original light distribution of the input lip region, which is inherently challenging to simulate textures that have large deviations in their luminance distribution compared to the input image. Therefore, to generate more realistic textures, the original lip luminance pattern needs to be mapped to a reference pattern via a mapping function. Such a mapping function must be highly nonlinear and complex to model explicitly by hand. For this reason, we herein use a deep learning model that is known to have the ability to model highly nonlinear functions to solve the style transfer problem. Research on style transfer has increased in recent years, especially in the deep learning domain. For example, several publications have demonstrated the capability of deep networks to mimic input textures and art styles in real time. See, for example, Johnson, Justin et al. “Perceptual Losses for Real-Time Style Transfer and Super-Resolution,” ECCV (2016), Zhang, Hang and Kristin J. Dana, “Multi-style Generative Network for Real-time Transfer,” CoRR abs / 1703.06953 (2017), and Li, Chuan and Michael Wand, “Precomputed Real-Time Texture Synthesis with Markovian Generative Adversarial Networks.” ECCV (2016).
[0161] The present texture simulator 100 is capable of learning any lipstick texture given a single reference image of such texture, and is shown in the representative component flow chart of Figure 36. The simulation pipeline consists of four modules: a training module 52, a pre-processing module 50, a mono-channel style transfer (MST) module 54, and a post-processing module 56 (see Figure 36). Given a desired deep convolutional neural network structure, the training module is responsible for learning all hidden weights and biases via gradient descent guided by an arbitrary self-defined loss function. The style transfer model can be trained on any image dataset 58 under a Creative Commons Attribution License or self-prepared by an in-house dataset. After the training module, the style transfer model is ready to be used with the remaining modules.
[0162] The pre-processing module 50 modifies the input lip region LI' by changing the lip color 60 to a desired lipstick color 62 and enhances the luminance using the dynamic texture generation method described herein. If the lip colors match, the lip region I Lip , and lip color image I Color is the luminance (L channel, I L ) for all color channels (a * Channel and b * Channel I a and I b ) first, so that it can be separated from CIELAB L * a * b * is transformed into space.
[0163] 0≦{M ij Given a lip region mask M with}≦1, lip color match is defined as the following relationship: I Lip L’ =α(I Lip L -μ Lip L )+μ Color L, where 0≦α≦1 I Lip L =M*I Lip L’ +(1-M)*I Lip L I Lip a =M*I Color a +(1-M)*I Lip a I Lip b =M*I Color b +(1-M)*I Lip b Operation 1 is the average pixel value μ Lip L , the lip color image μ Color L , which is the same as the CIELAB space L value of the desired lipstick RGB value. The coefficient α controls how solid the add-on lip color is visible to the naked eye. Zero α completely covers all lip patterns below, and unit α preserves all lip patterns. Operations 2 through 4 update all channels in CIELAB space by weighted sums between the color image and the lip image channels.
[0164] The mono-channel style transfer (MST) module 54 takes the L channel image from the pre-processing module 50 and performs a single inference through a style transfer deep network 64.
[0165] The style transfer network follows the general autoencoder structure described in Johnson, Justin et al. “Perceptual Losses for Real-Time Style Transfer and Super-Resolution,” ECCV (2016), which has an equal amount of convolutional and deconvolutional units. We acknowledge that each convolution or deconvolution unit is defined as a sequential operation that includes one convolution or deconvolution function, one normalization function, and one nonlinear activation function. The exact number of hidden layers (convolution or deconvolution units) in the network is treated as a parameter to be optimized for real-time lip texture simulation. Since style transfer synthesizes both texture and color according to a reference style image, the synthesized image is transformed into CIELAB space and only L channel 66, i.e., Gatys, Leon A. et al., “Preserving Color in Neural Artistic Style Transfer,” CoRRabs / 1606.05897 (2016) is used for post-processing.
[0166] The post-processing module 54 takes the composite L channel image from the MST module for dynamic texture simulation, and the a and b channel images 68, 70 from the pre-processing module for RGB conversion. The dynamic texture simulation module adjusts the luminance distribution of the L channel according to each texture described in the dynamic texture simulation section above for output effects. The final image 72 is created with the new desired color 62 and dynamic texture effects 74 from the post-processing after passing the image through the MST module 54 in the system.
[0167] Layered Eyes Addon Method
[0168] In addition to applying effects to the facial features described above, such as the lip area, the invention herein includes an optional method 400 for building eye makeup effects built from various eye area add-on layers, using techniques similar to those described above for adding effects to the lip area.
[0169] Using sample image photo II''', various sections of eye makeup and / or eye features can be layered onto the eyes 424 of photo II''', as shown in Figures 27a-27f. Figure 27a shows input image II''' of a face 426 with no makeup applied. Figure 27b includes an eye shadow layer add-on 428 applied to the face 426 of image II'''. Figure 27c includes a middle eye shadow add-on 430 applied to image II'''. Figure 27d includes an eye corner add-on 432 applied to image II'''. Figure 27e shows an eye tail add-on 434 applied to image II''', and Figure 27f includes an eyelash add-on 436 also applied to image II'''.
[0170] These effects are produced using the following method: Eye templates are created as shown in Figures 28a-28e, each template being eye shadow template 438 (Figure 28a), eye middle template 440 (Figure 28b), eye corner template 442 (Figure 28c), eye tail template 444 (Figure 28d) and eyelash template 446 (Figure 28e), respectively. Each such template is created by manually labeling landmarks using points on the template according to the landmark protocol. An example is shown in Figure 29, where a point identified as point 448 is applied to eye shadow template 438. The landmark locations of points 448 are saved as a text file.
[0171] To create the eyeshadow add-on, eye region landmarks are extracted from the landmark detector of the frame. The eye region is cropped by landmarks of interest from 37 to 42 and 43 to 48. 100 points are generated by linear interpolation around the eye region from the detected annotated landmarks (landmarks can be annotated using the annotation system described herein). From this, 100 points are generated around the eyeshadow template based on the manually annotated landmarks. The template is applied to the frame by forward warping the 100 points from the frame to the template. There are many distortion algorithms available, such as forward distortion, inverse distortion, similarity transformation, and affine transformation. In the preferred embodiment, forward distortion with affine transformation was employed. Following this, the eye region image is cropped back to the original frame.
[0172] This eye shadow application is illustrated as a flow chart 10000 shown in FIG. 30. In step 10010, landmarks are detected from the current frame, and in step 10020, the eye region is cropped from the landmarks. Concurrently or prior, an eye shadow template is loaded and pre-annotated with landmarks in a landmark location file in step 10030. Such annotated file and template are stored in a learning database. In step 10040, 100 points are generated around the eye region by linear interpolation based on the annotated landmarks of step 10030. In step 10050, 100 points are generated around the eye region of the current image frame by linear interpolation based on the detected landmarks from step 10010. The 100 points from the template in step 10040 are forward warped to the 100 points of the eye region in the image from step 10050. This creates an eye image with the template applied in step 10060 and the template is cropped onto the image to display the image frame with the eyeshadow applied in step 10070.
[0173] FIG. 31 shows a flowchart illustrating steps 10010a through 10070a that are similar to steps 10010 through 10070 described above, but using the graphical illustrations of the steps described above in flowchart 10000a.
[0174] To create the middle eyeshadow add-on, eye region landmarks are extracted. The eye region is cropped by landmarks of interest at 38 to 39, 41 to 42, 44 to 45, and 47 to 48. Then, 50 points are generated by linear interpolation around the eye region from the detected landmarks. Further, 50 points are generated around the eyeshadow template based on the manually annotated landmarks. The template is then applied to the frame by forward warping the 50 points from the frame to the template. The eye region image is cropped back to the original frame to create a frame with the eyeshadow makeup applied as the middle eyeshadow add-on.
[0175] This middle eye template add-on is shown in the flow chart of FIG. 32 as embodiment 20000. In step 20010, landmarks are detected from the current frame (image) and the eye region is cropped from the landmarks in step 20020. At the same time or before, in step 20030, the middle eye shadow template is loaded and pre-annotated with the landmark location file. Then, in step 20040, 50 points are generated around the middle eye region by linear interpolation based on the landmarks annotated in step 20030. In step 20050, 50 points are also generated around the middle eye region in the image frame by linear interpolation based on the landmarks from step 20020. Then, the template is forward warped on the image frame to create an eye image with the template applied in step 20060, and the eye image with the eye shadow applied is cropped back to the image frame in step 20070.
[0176] The eye corner add-on is performed by extracting eye region landmarks from the landmark detector of the frame using the eye corner template. The eye region is cropped by landmarks of interest from 39 to 41 and 44 to 45 to 48. Then, 50 points are generated by linear interpolation around the eye corner region from the detected landmarks. Furthermore, 50 points are generated around the eye corner shadow template based on the manually annotated landmarks. The template is applied to the frame by forward warping the 50 points from the frame to the template. The eye region image is cropped back to the original frame to create a frame with the eye corner makeup applied.
[0177] This eye corner shadow application is shown in FIG. 33 for embodiment 30000. In step 30010, landmarks are detected from the image frame, and in step 30020, eye regions are cropped from the landmarks. At the same time, or prior to that step, in step 30030, a template is loaded and its landmarks are pre-annotated using a landmark location file. In step 30040, 50 points are generated around the corner eye region by linear interpolation based on the annotated landmarks. Furthermore, in step 30050, 50 points are generated around the corner eye region of the image region cropped from the image frame using linear interpolation based on the landmarks. The template points are forward warped onto the frame image points, and a corner template applied eye image is created in step 30060. The corner eye shadow applied frame is cropped back to the image frame, and a corner eye shadow applied face is created in step 30070.
[0178] The eye tail region is created by extracting landmarks for the eye region using a landmark detector on the frame. The eye region is cropped by landmarks of interest from 39 to 41 and 44 to 45 to 48. 50 points are then generated by linear interpolation around the eye tail region from the detected landmarks. Also, 50 points are generated around the eye tail shadow template based on manually annotated landmarks in the saved file. The template is applied to the frame by forward warping the 50 points from the frame to the template. The eye region image is cropped back to the original frame to create an image frame with the eye tail makeup applied.
[0179] This is shown in the flow chart of FIG. 34 in embodiment 40000. In step 40010, landmarks are detected in the current image frame, and eye regions are cropped from the landmarks in step 40020. At the same time, or prior to that, in step 40030, a tail eye add-on template with pre-annotated landmarks is loaded from a landmark location file. In step 40040, 50 points are generated around the eye tail region by linear interpolation based on the annotated landmarks on the template. In step 40050, another 50 points are generated around the eye tail region of the cropped image frame using linear interpolation based on the landmarks. In step 40060, the template is forward warped into the image frame to create an eye image with the template applied, and finally the image frame is cropped back into the image frame to provide a face with an applied eye tail shadow region in step 40070.
[0180] An eyelash add-on is created using eye region and extract landmarks from landmark detector in image frame. Eye region is cropped by landmarks of interest from 37 to 42 and 43 to 48. 100 points are generated by linear interpolation around eye region from landmarks detected in original cropped image frame. Using eyelash template, 100 points are generated around eyelash template based on manually annotated landmarks. Template is applied to frame by forward warping 100 points from frame to template. Eye region image is then applied to original frame to create frame with eyelash makeup applied.
[0181] This eyelash add-on is shown in the flow chart of FIG. 35 in embodiment 50000. In step 50010, landmarks are detected from the current image frame. In step 50020, the eye area is cropped from the landmarks. At the same time or before, in step 50030, an eyelash template is loaded, the template having pre-annotated landmarks from the landmark location file. In step 50040, 100 points are generated around the eye area by linear interpolation based on the annotated landmarks. In step 50050, 100 points are also generated around the eye area by linear interpolation based on the landmarks of the original cropped image frame. The template is forward warped to the original image using the landmarks to create a template applied eye image in step 50060. This image is then cropped back to the original image frame with the face image with eyelashes in step 50070.
[0182] In the template add-on above, the landmark protocols for these templates are shown in FIG. 21. For the full eye region, 100 points are generated for the left eye from landmarks 37 through 42, and 100 points are generated for the right eye from landmarks 42 through 48. For the middle eye region, 50 points are generated for the left eye from landmarks 38 through 40, 41, and 42, and 50 points are generated for the right eye from landmarks 44 through 45, 47, and 48. For the eye corner region, 50 points are generated for the left eye from landmarks 39 through 41, and 50 points are generated for the right eye from landmarks 44 through 45, 47, and 48. 30 points are generated for the right eye from landmarks 30 to 41. The linear interpolation follows the formula:
[0183] Given two points (x0,f(x0)) and (x1,f(x1)), the line that interpolates between the two points can be expressed as follows:
[0184]
number
[0185] For forward distortion, the source image is the image used as a reference. The geometry of this image is not changed and is denoted as S. The target image is obtained by transforming the reference image and is denoted as T. The following parameters are used: (x,y): coordinates of the point in the reference image (u,v): The coordinates of the point in the target image. f, g or F, G: the x and y components of the transformation function y min , y max :y min and max x min , x max : The minimum and maximum value of x y=y min From y max in the case of x=x min From x max in the case of u = f(x,y), and v = g(x,y) The pixels of the source S(x,y) are copied into T(u,v).
[0186] As described above, the methods of makeup removal and application, as well as the applied end effect and texture simulation, can be used independently or in the overall method and system, and can be supplemented by various enhanced techniques as described below. FIG. 37 shows a general flow chart of some combinations 500 of the embodiments of the methods and systems herein. An input image II, II' (defined herein) can be provided by a user via a user interface (UI). The user interface can preferably convey a digital input image as defined herein. The input image II, II' is processed as described in this disclosure (200, 8000) to calibrate the device and color, and landmarks are detected and / or identified and annotated using various landmark detection and annotation methods described herein 300, 3000. When providing the input image II, II', the user can choose to use the virtual makeup removal methods and systems described herein, including, for example, the method 1000 for virtually removing makeup from an input image when the user needs to remove the makeup first. If the input image is sent without makeup so that removal is not required, or if the makeup has been removed using the methods herein, or if the user needs to use the add-on program without removing the makeup in one or more locations, the input image may be sent to a makeup service (MS) as needed to perform either a makeup try-on, an output end effect, or texture simulation as described in the systems and methods herein. For example, a virtual try-on may be used to apply a single or multiple types of and layered eye makeup virtual application of eye makeup add-ons, including one or more of the specific sub-methods 10000, 20000, 30000, 40000, and 50000, as described in embodiment 400. Alternatively, the lip makeup color and / or output end effect (see method 2000) described herein, including any plumping effect and / or lip texture simulation (as in method 100), may be used by the makeup service.
[0187] Such methods and systems may be used alone or in conjunction with other methods, including those described herein. It may be used in conjunction with a method or technique to create a virtual output of a resultant image RI to which one or more of such virtual makeup simulations and / or output end effects have been applied (including providing a resultant image in which makeup has been removed and in which no further makeup has been applied).
[0188] When using various methods, such methods can be performed using a system 600 as shown in FIG. 38 that allows for the storage of data in a system memory SM, a makeup service MS having a controller C capable of receiving input images II, II' as described herein transmitted from a user interface UI by a user of the system, and executing programmable instructions for performing virtual removal and / or makeup try-on or output effects thereto.
[0189] Deep Learning-Based Personalized Makeup Recommendation
[0190] Deep learning-based personalized makeup recommendation can provide users with highly detailed step-by-step makeup instructions. To achieve this, the makeup annotation system records step-by-step makeup information from input images that include people wearing professional makeup. Furthermore, the above-mentioned virtual face makeup wash-off (makeup removal method and system) is adapted to generate an input database for deep learning, which is one of the most difficult aspects of collecting enough before and after makeup photos to train a deep learning model.
[0191] With so many different types of cosmetics and so many different brands of such types of cosmetics available, and more constantly being launched, it is difficult to recommend a suitable product for an individual, but it is a very important selling point for cosmetics manufacturers and sellers. Customers want to know more about product combinations, create a finished look, and get information on the inevitable effects of a single product (e.g. Beauty Youtubers, Sephora's Beauty We want to evaluate not only the quality of the cosmetics (e.g., cosmetics on a skincare board) but also how such cosmetics look when applied. Existing approaches to personalized makeup recommendations are mostly geared towards seeking advice from makeup experts.
[0192] The makeup recommendation system of the present disclosure is based on deep learning due to the success of deep learning models in different recommendation systems. Moreover, for detailed recommendations, the disclosed methodology generates cosmetics at each step and also explains how to apply it to the user. In particular, the makeup recommendation system of the present disclosure generates RGB color values as output, and the products are displayed to the user by selecting the closest output on the database, which is a significant advancement compared to traditional methods that generate only a small set of predefined results. The input data in the present disclosure is also different from those used in other methodologies. The present invention provides a method and system that uses only professionally applied professional model faces and makeup looks as inputs for the deep learning model so that the best features can be extracted during learning.
[0193] FIG. 9 shows a block diagram of a deep learning model training system 4000 according to an embodiment of the present disclosure. The makeup applied face image database 4010 provides a relatively broad and representative image where professional makeup is used and the makeup annotation system 5000 of the present disclosure is used to annotate the step-by-step makeup data, as described further below. The makeup applied database 4010 also serves as further input data for deep learning training after processing the virtual face makeup wash-off (makeup removal method and system), as described above, which is one of the most important principles that make the algorithm work. In one embodiment, the system 4000 generates face images with makeup virtually removed, such as no-makeup face images 4020a, or 4020b, so that these images can serve as input data for deep learning training. The unique use of makeup wash-off or removal to generate no-makeup face images makes the system This makes it more robust, but also represents a solution to the most difficult part of solving the deep learning training problem: to collect enough before and after makeup images to train the deep learning model (DLM) 4040 that results from the training. Thus, a variety of images with makeup can be collected, and instead of using a significant number of images without makeup, a makeup removal method can be used to generate a large number of images without makeup applied that are used as input data for training in step 4030.
[0194] Model training uses deep learning frameworks 4035 such as Caffe®, Caffe2®, or Pytorch® to support various types of deep learning architectures for image classification and image segmentation. Such frameworks support various neural network patterns and fully connected neural network designs. For example, training with the Caffe® framework also requires inputting training prototypes that define the neural network. Neural networks originally designed for face recognition can be adapted for makeup recommendation, as each is related to a person's appearance.
[0195] 10A-10D show more detailed example outputs of the makeup annotation system 5000 according to an embodiment of the present disclosure. Through the makeup annotation system 5000, digitized makeup information can be generated, which can be used as input data for deep learning training in step 4045. Pseudocode for the makeup annotation system is provided in Appendix D. Those skilled in the art will understand that based on the present disclosure, other types of neural networks can be developed for this purpose based on various types of source software that can generate neural networks. In FIG. 10A, an image of a face with makeup applied is marked (annotated), and the regions identified by numbers 1-5 are identified and used as templates to vary the shade and color and texture output effects (output effects) for eyeshadow template (1), tail shadow (2), middle eyeshadow (3), corner eyeshadow (4) and eyelash effect (5) as described elsewhere herein. Methods for forming and annotating templates are further described below. In Fig. 10B, an image with makeup (annotated as above) is also used as a template for lip color annotation, and Fig. 10C shows the associated lip texture annotation (output effect) with the colors labeled as shown and the output effect or texture identified by the corresponding discrete value. Such effects and colors can be applied using the methods herein, but for training data, such annotated images are used in the data reference set. Fig. 10D provides images classified by overall style (natural and smoky styles shown).
[0196] In FIG. 11, the makeup recommender system generates personalized step-by-step makeup instructions using actual products in the database. Trained models of different makeup styles 4040 can be obtained from the deep learning system 4000 and annotation system 5000 and input into the makeup recommender system 6000 to provide personalized makeup recommendations 7050, and can also provide virtual makeup tutorials if desired, as described below. The makeup recommendations 7050 can be derived from the makeup recommender 7020 of a trained system and model such as the trained model 4040, although other trained models can also be created solely for use by the recommender system. The product matching 7030 can also be used using a cosmetics database that can be the same or different from the makeup database 7045 (the same database, as shown in FIG. 11). The makeup recommender and / or product matching can result in personalized makeup recommendations 7050. The virtual tutorials can also be generated using segmented video paths or can obtain information from searching and identifying products using a trained product classifier of a beauty product database, as described below.
[0197] Virtual Makeup Tutorial
[0198] In one embodiment, the present disclosure provides a virtual makeup tutorial system 7000 that can automatically summarize a video into key steps, extract all products used, find purchase links, and provide a virtual try-on tutorial without the need to order the product online or test the product at a retail store. Figure 12 is a flow chart illustrating a virtual makeup tutorial system according to an embodiment of the present disclosure.
[0199] Following makeup artists on video and / or photo sharing websites (e.g., YouTube® and Instagram®) is an integral part of many modern social media platforms. Video tutorials are a great way for consumers to get makeup tips and discover beauty products, but finding and using such videos is time-consuming and difficult for the viewer user to recreate the look. To follow up and find links for all used products, the consumer must pause the video multiple times, find each product featured in the video, note down the product name, and find online purchase links. In the present disclosure, for an input makeup tutorial video 7010, the virtual makeup tutorial system can automatically summarize the tutorial video by splitting it into key steps 7020 and identify and / or extract all products used or introduced in the tutorial video 7030, each of which can be used to find purchase links to provide a makeup tutorial summary 7040, where the summary is commonly used, for a virtual makeup try-on tutorial 7050, without the need to order the product online or test the product at a retail store.
[0200] In one embodiment, in step 7020, after splitting the video into segments (7020a), key frames are selected (7020b) and makeup is detected using filtering and specified makeup-related criteria to generate a step-by-step overview of the makeup tutorial video 7040. The selection of key frames in step 7020 is based on quantifiable measurements such as, for example, movements and behavioral amounts such as hand movements or hand-covered face that are probably only present during the execution of a makeup application, and each key frame of the step is usually displayed by a clear and unoccluded face. The method for selecting key frames from video data includes the following steps: Split the video data into segments (7020a), generate a set of candidate key frames (7020b) using general video key frame detection methods based on frame difference, color histogram, and / or camera motion, and select the final key frame based on certain makeup-related criteria such as, for example, frontal face, facial occlusion, hand movements, and / or facial expression (usually with a smile), and whether different makeup is present between the previous key frame and the next key frame.
[0201] Product detection
[0202] For the product detection step 7030, in some cases, the makeup artist may display the name of the product on the screen when each product is first introduced or may list all the products in the video as part of the description. Thus, the system of the present disclosure may detect characters around the key frames detected in the previous step and perform optical character recognition techniques to recognize one or more names and associated products as in 7030b. In other cases, if the video does not have a product name added, the system of the present disclosure may first identify the product 7030a (e.g., via its bottle, tube, or box), which is typically present near the face in the video image and / or held in the hand by a similar gesture. Then, the product's The images can be fed to a trained classifier 7035 that classified data from a beauty product database 7045 to recognize the product in step 7030c. In a worst case scenario, if the product is not recognizable, the system may return frames containing the unknown product as keyframes in the video synopsis.
[0203] Each of the product detection 7030 and / or video segmentation 7020 can be used in the virtual makeup tutorial system to generate a makeup tutorial synopsis 7040 and generate a virtual makeup tutorial 7050. With the above obtained video synopsis, the system can automatically generate a series of virtual try-on options via the virtual makeup tutorial 7050, which allows the user to recreate the look step by step without having to order the product online or test it at a retail store.
[0204] Color matching for digital cosmetics
[0205] Robust Brightness Control
[0206] In one embodiment, the present disclosure provides a system, generally referred to herein as system 8000, that automatically detects a face captured by a camera and robustly adjusts the brightness of the face according to the detected facial skin color. The system targets real-time applications of server video to prevent flicker and make the adjustment process smooth.
[0207] In general, the automatic brightness control of the camera hardware is usually unable to adjust the brightness of the user's face. Therefore, such hardware including automatic brightness control may not be suitable for virtual makeup applications. In order to maintain the proper brightness of a person's face captured by a digital camera, a brightness control algorithm is necessary. One common way to achieve the proper brightness is to use an additional light source such as an LED. However, the hardware light source may have limitations. In this embodiment, the brightness control of the user's face is mainly performed at the software level.
[0208] Referring to FIG. 14, in this embodiment, when an input in the form of a video frame having a face 8010 is input to the face detection and brightness adjustment system 8000, in step 8020, a facial landmark detection algorithm is used to detect the face region and facial landmarks from the input image to obtain the face position and shape in the image. The system then estimates the normalized skin color of the face using a skin color estimator 8030 based on the landmark information from the image. In the other path 8040 where the facial landmarks are detected, the system assigns different weighting factors to the face region, the image center region, and the border region and calculates the average brightness of the image 8045. The average brightness is then compared with the estimated skin color 8055 and outputs a correction factor. A curve transformation 8050 using a polynomial transformation is applied to the image according to the correction factor calculated in the above procedure. The resultant image is then ready to be used in post-processing 8060, such as a virtual makeup add-on.
[0209] The curve transformation 8050 can also be generated with reference to FIG. 15. When targeting video real-time digital cosmetics applications, the brightness level needs to be kept as constant as possible to avoid flickering and sudden changes. Therefore, a response curve 8050a is created and added to the brightness control system 8000. This smooths the correction coefficients 8050b in the time domain and provides a stable brightness control video 8050c as output.
[0210] A mathematical transformation is required to process the image and adjust the brightness. can use the following curve transformation filters: P o =(1-α)P i +αP i 2 (6a)
[0211] In the above method system and method 8000 for automatically detecting a user's face captured by a camera and robustly adjusting the brightness of the face according to the detected skin color, a robust skin color estimator is used in step 8030. FIG. 13 shows a process for skin color estimation according to an embodiment of the present disclosure that can be used as an embodiment of the skin color estimator 8030. In this embodiment, an algorithm for skin color estimation is provided in Appendix E. In this embodiment, according to the algorithm, the method receives an input image II' and uses landmark detection (LD) using the techniques described above, as well as component removal (MR), which can be performed as needed in the makeup removal method and system described above. Then, a histogram analysis HA is performed using both RGD and grayscale analysis. Techniques useful for this purpose are described above in connection with the makeup removal process and system. A voting (rating) scheme is used to generate faithful skin color pixels SCP (see Appendix F).
[0212] 14 and 15 are flow diagrams illustrating a method for adjusting image brightness using a curve transform, according to one embodiment of the present disclosure described above with reference to system 8000. In one embodiment, algorithms for brightness control are provided in the context of Appendices E and F.
[0213] Color Consistency
[0214] In one embodiment, the present disclosure provides a system, generally referred to as system 9000 for maintaining color consistency to perform color matching to accurately detect scene colors. The system 9000 automatically detects a color reference chart and uses the detected information to adjust the camera hardware settings. The system then performs additional advanced software calibration to meet the golden standard system herein to maintain color consistency. The system of this embodiment can then perform color matching to accurately detect scene colors.
[0215] The problem of computer vision is to estimate the underlying world that results in an observed image. One subset of this problem is color consistency: estimating the color of the scene's light source and the color of the objects in the scene viewed under white light. The consistency aims to recover the true world behind the image. The color consistency problem has always been a challenge for both the human eye and computer applications.
[0216] FIG. 16 shows a flow diagram of a color consistency method and associated algorithms of the system 9000 according to one embodiment of the present disclosure. The color consistency algorithm used in the present disclosure can estimate the illumination cast on a scene by ambient light. The algorithm can also recover the real color (reflectance) of an object that is invariant under different environmental conditions. The method can be used to calibrate camera artifacts, compensate for colors resulting from light sources, and identify ground truth colors of real-world products.
[0217] Hardware Color Calibration Algorithm
[0218] In one embodiment of the system 9000, a system of color calibration is built to achieve color consistency. Because the target is a real-time video application with access to a camera, the entire system can be built on a real-time framework. A user uses as input 9010 a camera with digital video capabilities, or other device with a camera configured to provide real-time digital video. As noted, the video frame 9015 can be a separate input. When a user initiates a color calibration request using any suitable input technique. In response, the system requests the user to display a color reference chart at a specific location in step 9020. The calibration system automatically detects the color reference chart 9020 and reads the pixel values of each color patch in step 9025. The system then compares the observed color chart with the reference values 9030 captured under the golden reference system 9030a stored in a database. Using the comparison results, the calibration system sends control signals to a video capture device such as a webcam using an SDK built into the operating system. The system adjusts all camera parameters accordingly in step 9040, such as ISO speed, white balance, shutter speed, hue, brightness, contrast, and gain, to meet the reference values of the golden system. This calibration works as a continuous feedback process, with the calibration system continuously sending calibration control signals to the camera according to new frames captured. Finally, all the control parameters achieve a dynamic balance, and the pixel values of the color reference chart in the captured frame are very close to the reference values.
[0219] Software Color Calibration Algorithm
[0220] Then, the calibration system calculates the curve transformations in RGB channels separately and applies them to the frame, which serves as the final detailed calibration in steps 9050 and 9060. Finally, the captured frame achieves color consistency and is already prepared for color matching in step 9070. To modify the image and calibrate the color, a third-order polynomial can be used to simulate the transformation process in three channels. Using a third-order polynomial allows the transformation to be modified differently for different ranges of pixel values, which increases flexibility. Experiments have observed that the mutual channel terms, such as RG, RB, and GB, do not have much impact on the output. Therefore, these terms can be omitted to make the polynomial channels independent. Taking the red channel as an example, the transformation equation can be written as follows: R o =Cr0+Cr1R i +Cr2R i 2 +Cr3R i 3 (1) Here, R o is the output red channel pixel value, R i where Cr is the input red channel pixel value and Cr is the polynomial coefficient (which may be a constant). The above function can be written in matrix form as follows: Ax+b=0 (2) There are 24 observations, which is much larger than the number of unknown constants C, so there is an overdetermined system to solve. The problem is converted into a regression problem that can be solved using least squares. The objective function can be written as:
number
[0221] After solving for the C coefficients for the R, G and B channels, there is a complete set of coefficients that can be used to process the image after hardware calibration to minimize color consistency errors. Finally, after hardware and software calibration, the video frame is ready for further color-based applications, such as color match algorithms.
[0222] Compared to other color consistency algorithms, our method uses a reference color chart as a ground truth standard, so the output from the resulting color consistency algorithm is much more accurate than software-based methods that are based on many assumptions and statistical conclusions without any ground truth data. Furthermore, our algorithm can be calibrated once and applied to videos in real time.
[0223] Color Matching
[0224] After the above color calibration, all colors are calibrated according to the golden system as a reference. The output frames can then be used to perform color matching, which can recognize the exact color in the scene. For example, the system can be used to recognize lipstick colors.
[0225] In order to match the color with its reference value, a quantified color difference formula is very important. Quantifying color difference is generally a challenge because colors are displayed very differently from how they are perceived by the human eye. Most of the colors people see in electronic devices are based on the sRGB color space. Therefore, the most common solution for color difference is to calculate the distance in color space. For example, the Euclidean distance in the RGB color space can be expressed as follows:
number
[0226] In addition to RGB Euclidean distance, many color distance formulas can use other color spaces, such as HSV, and calculate the spatial distance accordingly. However, all color distance formulas are essentially simple modifications of the above formula using simple Euclidean distance, without departing from the spirit and scope of the basic calculation. None of the color distance formulas tend to account for the non-uniform behavior of human color perception. Thus, the equations may give different results than the human eye would for the same color measurements.
[0227] The International Commission on Illumination (CIE) has created many color difference formulas, such as CIE76, CIE94, and CIE2000, aiming to quantify color differences closer to the human eye. The CIE94 definition does not adequately solve the problem of uniformity of perception, so in CIEDE2000, CIE refined its definition and added five modifications. CIEDE2000 is based on the LCH (Lightness, Chroma, and Hue) color space, whose values are calculated from the CIELab color space. CIEDE2000 color differences are a source of non-uniformity and are closer to human perception.
[0228] Color measurement with highlight removal
[0229] In one embodiment, the present disclosure provides a color measurement algorithm for calculating the dominant color of an input image by removing reflected light on objects shown in the image. The locality of the object is taken into account so that more focus can be given to the center.
[0230] Even if color consistency is guaranteed, there are still problems to be solved. For example, light reflections are visible in real-world photos. To get the exact color desired, it is necessary to eliminate the reflected light and measure the primary color of the object.
[0231] 17 is a block diagram illustrating a color measurement system according to one embodiment of the present disclosure. As shown in FIG. 17, an input image II″ is converted to HSV color space in step 210, which is the most common cylindrical coordinate representation of points in the RGB color space described above.
[0232] As mentioned before, hue, saturation, and color value can be defined in the HSV color space as shown in Figure 1. Hue represents the type of color and can be represented as an angular range from 0 to 360 degrees. Saturation indicates the degree to which a color differs from gray, the lower the saturation, the more washed out it appears. Color value represents the brightness of the color, with 0 being completely dark and 255 being completely bright.
[0233] After obtaining an image in HSV color space, a histogram of the image can be calculated in step 220. A histogram is a graphical representation of the distribution of numerical data. It is an estimate of the probability distribution of a continuous variable (quantitative variable) and was first introduced by Karl Pearson. It is a kind of bar graph. To create a histogram, the first step is to "bin" the range of values, i.e., divide the entire range of values into a set of intervals and count the number of values that fall in each interval. The bins are usually specified as contiguous, non-overlapping intervals of the variable. The bins (intervals) should be adjacent and often (but do not have to be) of the same size.
[0234] After obtaining the histogram of the input image, 3D convolution can be used to calculate the weighted average of each bin and return the top two values. The convolution is an integral that represents the amount of overlap of one function g as it is shifted onto another function f, as shown in equation (5) below. Since the HSV color space is three-dimensional, equation (6) is used for the 3D convolution. Furthermore, since the hue values in the HSV color space have a cylindrical representation, a circular convolution is used to take into account all the values in the neighboring bins. Equation (7) expresses the convolution matrix g, which is an explicit periodic sum of the hue values. τ This shows that.
number
[0235] Locality is also determined in step 230 by weighted two-dimensional (2D) convolution. The top two values are calculated as the locality of the input image and the top two values are compared to further focus on the object in the center of the input image to determine the final return value in step 240. Figure 18 shows input images F, G, H and their primary colors F', G', H' extracted using a color measurement system according to an embodiment of the present disclosure. Pseudocode for the color measurement system is provided in Appendix G.
[0236] Automated, fast face detection and landmark tracking
[0237] In this part of the disclosure, an embodiment presents a novel framework for face landmarking using a new algorithm based on Global Learning Descent Regularization (GLDR) model to solve the problems of landmark shaking and lag. This embodiment also has a patch coefficient calculation to verify the accuracy of the landmarks.
[0238] In one embodiment, the present disclosure relates to a framework for high speed facial landmark detection and tracking. The present disclosure further relates to a method for solving the problems of latency in fast facial movements and the shaking of landmarks when a person is stationary in a video.
[0239] In one embodiment, the present invention provides a framework for face landmark detection. In particular, the present invention relates to a method to solve the latency problem with a multi-scale global detector and a method to use fast linear regression using different scale images and patch correlation match as local landmarks to the current bounding box as the initial shape of the current frame to further speed up the framework and reduce the landmark drift problem.
[0240] In a first embodiment of the method, images are captured by a two-dimensional (2d) camera. Then, an image pyramid is created with different scale images. The face bounding box is calculated using a sliding window on the image pyramid and a histogram of gradient features by SVM.
[0241] In a further embodiment, several global facial landmark detectors (GLDR model) are used on different scale images to detect facial landmarks inside the bounding box if there is a face inside the box. The global detector uses histogram of gradients as features since the features are already present when detecting the face. Then, the landmark positions are normalized across the image pyramid to remove the effect of noise on the landmark detection.
[0242] In a further embodiment of the present disclosure, the accuracy of the landmarks is verified by a trained neural network model, and then patches centered on the landmarks are extracted in the current frame. The landmarks are used as the initial shapes for the next frame. After being detected by the global face landmark detector, the patches are fitted using landmark mean shift fitting. The correlation coefficients are computed for each patch, and bad landmarks disappear. Then the process returns to the initial first embodiment.
[0243] Figure 19 is a flow diagram outlining an overall process for optimizing facial landmark detection. The method is described with reference to method 3000 in Figure 19, where first an image is captured using a 2D camera in step 3010.
[0244] Referring to 3020, the first frame is identified as an image frame. This can be done using image pyramids generated at different scales. If there are previous landmarks in the current frame, a face is detected at 3040 and a slide window is created. The image is scanned (3050) to detect facial landmarks using a multi-scale global detector with a 3D window, and for each region of interest, a histogram of gradients is computed (3050) and used as input to a support vector machine model 3060 to determine which regions are of interest for patch extraction and fitting. and B. Triggs, “Histograms of oriented gradients for human detection,” CVPR, pp. 886-893 (2005), and C. Cortes and V. Vapnik, “Support-vector networks,” Machine Learning, pp. 273-297 (1995). Next, in 3070, the window is downsampled to make the region more accurate. If no face is detected, a constrained mean shift 3030 is used on the image pyramid to detect the frame, and if previous landmarks exist, they can be used as the initial shape of the global detector in 3050. If there are previous landmarks in the current frame, in 3035, the previous landmarks are used to align to the current bounding box as the initial landmarks for the supervised descent method (SDM).
[0245] As mentioned above, the GLDR model 3050 is used to detect face landmarks, regression trees (see V. Kazemi and J. Sullivan, “One millisecond face alignment with an ensemble of regression tress,” CVPR (2014)), local binary features, and S. Ren, et al., “Face Alignment at 3000 FPS via Regressing Local Binary There are many methods that can be used as global detectors, such as supervised descent (see X. Xiong et al., “Supervised descent method and its applications to face alignment,” CVPR (2013)), and global detection (see X. Xiong et al., “Supervised descent method and its applications to face alignment,” CVPR (2014)). In this invention, the preferred GLDR method is HOG as the global detection method for detecting face landmarks, and it is also preferred to use a Point Distribution Model as the second feature of SDM to make the detection more accurate (see T. Baltrusaitis, et al., “Constrained local neural fields for robust facial landmark detection in the wild,” ICCV Workshops (2013)). The new formula is created as follows:
number
number
number
number
number
number
number
[0246] Since x can be described in terms of p, the final equation can be:
number
[0247] And the new object function looks like this:
number
[0248] The Gauss-Newton method can be used in the same way as SDM to optimize a new objective function.
[0249] Thus, in one embodiment, the training algorithm for this step may be as follows: [Table 1]
[0250] After the detected landmarks and parameters are obtained, patches are extracted and the already available parameters are used to perform landmark mean-shift fitting 3060. The landmarks are preferably smooth so that local patches are used as features to calculate new parameters p. The updated parameters are obtained based on the regularized landmark mean-shift method (see J. Saragih et al., “Deformable Model Fitting by Regularized Landmark Mean-Shift,” IJCV (2011)).
number
number
[0251] The landmark positions are normalized across the image pyramid (3065).
[0252] After the landmarks are generated, a three-layer neural network model is used as an accuracy verification model 3070 to filter out erroneous shapes. The neural network layers are preferably a convolution layer, an upsample layer, and a mapping layer.
[0253] Then, we calculate the correlation coefficient between the previous patch and the current patch by are matched. Then, the best region of interest in the current patch is selected and its center is created as the final landmark (3090). Furthermore, the correlation coefficient can be used to classify which landmarks are occluded. The calculation function is preferably as follows:
number
[0254] comparison
[0255] Therefore, a new algorithm is developed to incorporate SDM along with the point distribution model as the preferred method for GLDR as in 3050. However, both the preferred framework and GLDR model herein are different from previous models. SDM is used to optimize equation (15), but the variables of the object function are parameters calculated by the point distribution model, which filters noise from the ground truth to make the landmarks in the video more stable. Furthermore, noise is reduced by using SDM with different scaled images. The initial landmarks in SDM are aligned to the landmarks from the previous frame to the current bounding box. Furthermore, the framework uses the point distribution described in Baltrusaitis et al. above to filter noise from the ground truth to make the landmarks in the video more stable. The GLDR model uses a global detector, rather than a local detector like the traditional GLDR. Therefore, performance using the current method does not suffer from latency issues when the face rotates very fast. The new framework is even smarter as it has a patch coefficient matching module that detects which landmarks are occluded.
[0256] For the various systems and methods herein, a general system structure as shown in Figure 38 may be used, and the methods may be combined in various ways (such as Figure 37) or with other techniques and improvements described above. As shown in Figure 38, memory capabilities (cloud or hardware server based) may be used to store, preferably in a secure location, all the various data and data sets described herein, including eye templates, ground truth data, product data, style and makeup appearance information, user information, any kind of training and learning information, and other information the system requires to operate. The data must be accessible to programmable system software based on the algorithms and pseudocodes above, and executable by the processor of the controller herein.
[0257] Various types of suitable hardware or software may be used in implementing such a system. The system may run on any system architecture capable of running an operating system (OS), such as the Microsoft Windows® OS, Apple OS X®, Apple iOS® platform, Google Android® platform, Linux® operating system, and other variants of UNIX® operating systems.
[0258] Some or all of the described functionality may be implemented in software and / or hardware on a user device. The user device must include an appropriate user interface and, as noted above, may be a mobile phone (smartphone) with digital camera and / or digital video capabilities. Additionally, the user device may preferably include a smart / digital device having a camera, wireless device, information appliance, workstation, minicomputer, mainframe computer, or other computing device, operating as a general purpose computer or special purpose hardware device capable of performing the functions described herein. The devices may be used in a variety of applications, including mobile phones, smart watches, smart mirrors, smart glasses, tablet computers, portable computers, televisions, gaming devices, music players, virtual reality goggles, laptops, palmtops, smart or dumb terminals, networked computers, personal digital assistants, and home assistants (such as Alexa® or Google® Home®).
[0259] The software may be implemented on a general-purpose computing device in the form of a computer including a processing unit, a system memory, and a system bus coupling various system components including the system memory to the processing unit. Additionally or alternatively, some or all of the functionality may be performed remotely, in the cloud, or via software-as-a-service (e.g., makeup services, etc.). For example, the virtual removal and makeup virtual simulation and add-on functionality and related functionality may be performed on one or more remote servers or other devices as described above that communicate with the user's device and its user interface. The remote functionality may be performed on a server-class computer with sufficient memory, data storage, processing power, and running a server-class operating system (e.g., Oracle® Solaris®, GNU / Linux®, and Microsoft® Windows® OS families, etc.).
[0260] The system may include a number of software processing modules stored in memory and executed by a processor. By way of example, the program modules may be in the form of one or more suitable programming languages that are converted into machine code or object code to enable one or more processors to execute the instructions. The software may be in the form of a stand-alone application implemented in a suitable programming language or framework based on the algorithms and pseudocodes provided herein.
[0261] The method steps of the techniques described herein may be performed by one or more programmable processors executing one or more computer programs to perform functions by manipulating input images and other related data to generate output. The method steps may also be performed by, and an apparatus may be implemented as, special purpose logic circuitry, such as, for example, an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit). A module may refer to a portion of a computer program and / or a processor / special purpose circuitry that implements that function.
[0262] Processors suitable for executing computer programs include, by way of example, both general-purpose and special-purpose microprocessors. Typically, a processor receives instructions and data from a read-only memory or a random-access memory, or both. The essential elements of a computer are a processor for executing instructions and one or more memory devices for storing instructions and data. Information carriers suitable for embodying computer program instructions and data include, by way of example, semiconductor memory devices such as EPROM, EEPROM, and flash memory devices, magnetic disks such as internal hard disks or removable disks, magneto-optical disks, and all forms of non-volatile memory including, by way of example, CD-ROM and DVD-ROM disks. The one or more memories can store media assets (such as audio, video, graphics, interface elements, and / or other media files), configuration files, and / or instructions that, when executed by the processor, form modules, engines, and other components described herein to perform the functions associated with the components. The processor and memory can be supplemented with, or incorporated into, special purpose logic circuitry. Such a processor can be implemented as a programmable memory (e.g., a programmable memory), a programmable logic circuit, or a programmable logic device. The processor may also be capable of running the executable learning tools and systems described herein.
[0263] In various implementations, the user device preferably includes some access or communication to a device with access to a web browser, native applications, or both that facilitate the execution of the functions described herein. A web browser allows a device to request (e.g., from a server) web pages or other downloadable programs, applets, or documents via a web page request. An example of a web page is a data file that contains computer-executable or interpretable information, graphics, sound, text, and / or video that can be displayed, executed, played, processed, streamed, and / or stored, and may contain links or pointers to other web pages. In one implementation, a user of the device manually requests a web page from a server. Alternatively, the device makes the request automatically with a web browser. Examples of commercially available web browser software include Google® Chrome®, Microsoft® Internet Explorer®, Mozilla® Firefox®, and Apple® Safari®.
[0264] In some implementations, the user device may include client software, such as an application operating in a makeup service. The client software may provide the device with functionality to implement and execute the functionality described herein, including brightness adjustment and color calibration, as well as allowing for storage of templates and other user data. The client software may be implemented in a variety of forms, for example, as a native application downloaded to the device and executed in conjunction with a web browser, a web page, a widget, and / or a Java, JavaScript, .Net, Silverlight, Flash, and / or other applet or plug-in. The client software and the web browser may be part of a single client / server interface, for example, the client software may be implemented as a plug-in to a web browser or other framework or operating system. Other suitable client software architectures, including, but not limited to, widget frameworks and applet technologies, may also be used by the client software.
[0265] The communication network can connect devices to one or more servers and to each other. Communication can occur over the medium of, for example, standard telephone lines, LAN or WAN links (e.g., T1, T3, 56kb, X.25), broadband connections (ISDN, Frame Relay, ATM), wireless links (802.11 (Wi-Fi), Bluetooth, GSM, CDMA, etc.). Other communication media are possible. The network can carry TCP / IP protocol communication, as well as HTTP / HTTPS requests made by a web browser, and connections between clients and servers can communicate over such a TCP / IP network. Other communication protocols are possible.
[0266] The system may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices. Depending on the capacity of the devices and the amount of data processing power required, other types of system hardware and software than those described herein may also be used. ... It may also be implemented as one or more virtual machines running a virtualized operating system running on one or more computers having hardware as described.
[0267] In some cases, a relational database or other structured database may provide functionality such as a database management system for storing data for processing. Examples of databases include the MySQL® Database Server or the ORACLE Database Server offered by ORACLE® Corp. of Redwood Shores, Calif., the PostgreSQL Database Server offered by the PostgreSQL Global Development Group of Berkeley, Calif., or the DB2 Database Server offered by IBM.
[0268] It should also be noted that implementations of the systems and methods can be provided as one or more computer-readable programs embedded on or in one or more articles of manufacture. The program instructions can be encoded on an artificially generated propagated signal, e.g., a machine-generated electrical, optical, or electromagnetic signal generated to encode information for transmission to an appropriate receiving device for execution by a data processing device. The computer storage medium can be or can be included in a computer-readable storage device, a computer-readable storage substrate, a random or serial access memory array or device, or one or more combinations thereof. Furthermore, the computer storage medium is not a propagated signal, but the computer storage medium can be the source or destination of computer program instructions encoded in the artificially generated propagated signal. The computer storage medium can also be or can be included in one or more separate physical components or media (e.g., multiple CDs, disks, or other storage devices).
[0269] Those skilled in the art will appreciate that changes could be made to the embodiments described above without departing from the broad inventive concept thereof. It is understood, therefore, that the invention is not limited to the particular embodiments disclosed, but that it is intended to cover modifications within the spirit and scope of the invention as defined by the appended claims. Appendix A: [Table 2] [Table 3] Appendix B [Table 4] [Table 5] Appendix C: [Table 6] Appendix D: [Table 7] Appendix E: [Table 8] Appendix F: [Table 9] [Table 10] Appendix G: [Table 11]
Claims
1. 1. A method for virtually removing makeup from a face, comprising: providing a facial image of a user having makeup applied; searching for a face landmark including at least a first region and a second region different from the first region from a face image of the user; decomposing the first region of the facial image into a first channel; providing the first channel of the first region to histogram matching to obtain a first image in which makeup has been removed in the first region; converting the second region of the facial image into a color channel; subjecting the color channels to the histogram matching under different lighting conditions to obtain a second image in which makeup is removed in the second region; combining the first image and the second image to form a resultant face image with makeup removed from the first region and the second region.
2. The method of claim 1 , wherein the first channel comprises a reflectance channel and a shading channel.
3. The method of claim 2 , wherein the reflectance channel comprises material-dependent characteristics of the facial image and the shading channel comprises light-dependent characteristics of the facial image.
4. The method of claim 3 , wherein the reflectance channel contains only one color and the shading channel stores shape information of the first region.
5. The method of claim 1 , wherein the first area comprises an eye area and the second area comprises a lip area.
6. 2. The method of claim 1, wherein a type of makeup of the first region before providing the first channel of the first region to the histogram mapping is different from a type of makeup of the second region of the facial image before converting the second region to a color channel.
7. The method of claim 1 , wherein the color channels include a hue channel, a saturation channel, and a color value channel.
8. providing the color channels to histogram matching; providing a dataset of facial images, each of which is free of makeup in a corresponding second region of each facial image under different lighting conditions, the dataset including a predefined histogram; and matching histograms of one or more of the color channels under different lighting conditions with corresponding ones of the predefined histograms to obtain the second image.
9. The method of claim 8 , wherein the color channel is a color value channel and / or a saturation channel.
10. 1. A method for virtually removing makeup from a face, comprising: providing a facial image of a user having makeup applied; Locating facial landmarks within a region of the user's facial image; decomposing the regions of the face image into separate channels; and subjecting the separate channels of the region to histogram matching to obtain a resultant image in which makeup has been removed in the region.
11. The method of claim 10 , wherein the region of the user's facial image includes an eye region.
12. The method of claim 11 , wherein makeup of the user's facial image prior to decomposing the image includes eye makeup.
13. The method of claim 10 , wherein the separate channels include a reflectance channel and a shading channel.
14. The method of claim 10 , wherein the reflectance channel comprises material-dependent characteristics of the facial image and the shading channel comprises light-dependent characteristics of the facial image.
15. The method of claim 10 , wherein the reflectance channel contains only one color and the shading channel stores shape information of the first region.
16. 1. A method for virtually removing makeup from a face, comprising: providing a facial image of a user having makeup applied; Locating facial landmarks within a region of the user's facial image; Transforming the regions of the facial image into color channels; and subjecting the color channels to histogram matching under different lighting conditions to obtain a resultant image in which makeup has been removed in the area.
17. The method of claim 16 , wherein the region of the user's facial image includes a lip region.
18. The method of claim 17 , wherein the makeup on the facial image before converting the region of the facial image to a color channel is lipstick or lip gloss.
19. The method of claim 16 , wherein the color channels include a hue channel, a saturation channel, and a color value channel.
20. providing the color channels to histogram matching; Providing a dataset of makeup-free face images including a predefined histogram; and matching histograms of one or more of the color channels under different lighting conditions with corresponding ones of the predefined histograms to obtain a second image.
21. The method of claim 20, wherein the color channel is a color value channel and / or a saturation channel.
22. moreover, collecting a skin color dataset, where skin color data under different lighting conditions having corresponding lip color shifts for such different lighting conditions compared to a standard lip color is collected; extracting an input skin color from an image of the user; using the skin color dataset to detect a corresponding lip color shift of the input skin color under a particular lighting condition for the input skin color; and providing a final modified lip color for use as a subtracted lip color from the first region of the user's facial image, the final modified lip color having the detected color shift.
23. 1. A system for detecting and removing makeup from an input image, comprising: receiving an input image having makeup applied thereto from a user interface; searching for facial landmarks from a facial image of a user in at least a first region and / or a second region different from the first region, the first region including makeup and / or the second region including makeup; if the first region is located, decomposing the first region of the face image into a first channel and feeding the first channel of the first region to a histogram matching using a reference histogram from a dataset of histograms of faces without makeup, respectively, to obtain a first image in which makeup is removed in the first region; and / or if the second region is located, converting the second region of the face image into a color channel and feeding the color channel to a histogram matching under different lighting conditions to obtain a second image in which makeup is removed in the second region, using a reference histogram from a dataset of histograms of faces without makeup and under different lighting conditions, respectively. and if both the first region and the second region are searched, combining the first image and the second image to form a resultant face image in which makeup has been removed from the first region and the second region.
24. 24. The system of claim 23, wherein the system comprises a controller having a system memory and a system processor, the controller configured to receive the input image and receive and / or store in the memory a dataset of histograms of the face without makeup and a dataset of histograms of the face under different lighting conditions, and the system processor capable of executing programming instructions capable of detecting facial images and searching for facial landmarks.
25. The processor may execute programming instructions for decomposing the first region of the input image into the first channel and histogram matching of the first channel of the first region; 25. The system of claim 24, wherein the processor is capable of executing programming instructions for converting the second region of the facial image into color channels and histogram matching of the color channels under different lighting conditions.
26. 24. The system of claim 23, wherein the user interface is a smartphone digital camera, a digital camera, a digital video camera, a webcam, or a smartphone digital video camera.
27. 1. A method for generating an output effect on an input image having a face, comprising: (a) providing a facial image of a user having facial landmarks; (b) searching for the facial landmarks from a facial image of the user, the facial landmarks including a first region, a landmark associated with the first region being associated with lips in the facial image having a lip color, the first region including a lip region; and (c) converting the lip region of the image into at least one color channel and detecting and analyzing a light distribution in the lip region; (d) generating at least one first output effect by subjecting the at least one color channel to a histogram matching over a varying light distribution to identify a histogram having a predefined light distribution that varies from the light distribution of the lip area; (e) combining the output effect with the first image to provide a first resulting image having the lip color and the at least one first output effect applied to lips. Law.
28. The method of claim 27 , wherein the at least one color channel includes a saturation channel and / or a color value channel.
29. 30. The method of claim 27, wherein prior to said converting step (c), said method further comprises the step of removing makeup from said lip region of said user's facial image.
30. the facial landmarks include a second region, the landmarks in the second region are associated with eyes of the facial image, the second region includes an eye region, and the method further comprises: (f) decomposing the eye region of the image into at least one first channel and detecting and analyzing a light distribution in the eye region; (g) providing the at least one first channel to a histogram matching across a varying light distribution to generate at least one second output effect on the eye by identifying a histogram having a predefined light distribution different from the light distribution in the eye region; 28. The method of claim 27, comprising: (h) combining the first resulting image with the second image and the at least one second output effect to provide a second resulting image having the predefined lip color and the at least one first output effect for the lips and the at least one second output effect for the eyes.
31. The method of claim 30 , wherein the at least one first channel comprises one of shading or reflectance.
32. 28. The method of claim 27, wherein the light distribution of the histogram having the predefined light distribution adds transparency and smoothness, and the at least one first output effect includes a gloss effect.
33. The method of claim 32, wherein the gloss effect varies with the level of transparency.
34. 28. The method of claim 27, wherein the light distribution of the histogram having the predefined light distribution adds random reflectance and the at least one output effect includes a natural effect.
35. 28. The method of claim 27, wherein the light distribution of the histogram having the predefined light distribution adds transparency and gloss, and the at least one first output effect includes a gloss effect.
36. 28. The method of claim 27, wherein the light distribution of the histogram having the predefined light distribution adds sparkle, and the at least one output effect includes a sparkle effect.
37. 28. The method of claim 27, wherein steps (d) and (e) are repeated to produce at least one different output effect for the first image, and each resulting image having one of the at least one different output effect on the first image is combined with the first resulting image to provide a final resulting image having the at least one first output effect and each of the at least one different output effect on the first image.
38. The method may further include, after step (b), calculating an area of the lip region, expanding the area of the lip region by a predetermined ratio to provide a target expansion landmark, generating a bulging output effect in addition to the at least one first output effect, and combining and distorting the bulging output effect with the at least one first output effect and the first image and applying the bulging output effect to the lips. and providing the first resultant image having an adjusted lip color, the plump output effect, and the at least one first output effect.
39. 39. The method of claim 38, wherein the light distribution of the histogram having the predefined light distribution adds transparency and gloss, and the at least one first output effect includes a gloss effect, and the resulting image includes a puffy and glossy appearance.
40. 1. A method for generating an output effect for an input image having a face, comprising: (a) providing a facial image of a user having facial landmarks; (b) searching for the facial landmarks from a facial image of the user, the facial landmarks including a second region, a landmark associated with the second region being associated with an eye of the facial image, the second region including an eye region; and (c) decomposing the eye region of the image into at least one first channel and detecting and analyzing a light distribution in the eye region; (d) providing the at least one first channel to a histogram matching across a varying light distribution to generate at least one second output effect for the eye by identifying a histogram having a predefined light distribution different from the light distribution of the eye region; (e) combining the first resulting image with the second image and the at least one second output effect to provide a second resulting image having at least one first output effect and the at least one second output effect for predefined lip color and eyes.
41. A makeup recommendation system, comprising: At least one trained neural network model for providing changing makeup styles; Cosmetics database, a cosmetic annotation system; A makeup recommendation system, wherein the makeup recommendation system can generate personalized step-by-step makeup instructions for a user based on data in the at least one trained neural network annotated by the annotation system and / or recommendations from the cosmetics database, and can display a virtual makeup application to the user step-by-step based on an input image of the user.
42. 41. The system of claim 40, wherein the at least one trained model is derived from a deep learning framework.
43. The deep learning framework, A face image with the selected makeup style applied, and Output ground truth data from the cosmetic annotation system 42. The system of claim 41, receiving a data input comprising:
44. 41. The system of claim 40, wherein the annotation system annotates facial images with a selected cosmetic style applied, the annotated facial images providing training data for the neural network.
45. 45. The system of claim 44, wherein the makeup styles are manually selected and annotated.
46. 41. The system of claim 40, wherein the input image is a frame from a video of the user.
47. 41. The system of claim 40, further comprising at least one virtual makeup tutorial.
48. The step-by-step instructions include: (a) displaying a first selected color for a first type of makeup; 41. The system of claim 40, further comprising: (b) virtually applying the selected color makeup type to a corresponding area of an input image of the user's face.
49. 49. The system of claim 48, wherein steps (a) and (b) are repeated for at least one further selected color and at least one second type of makeup to produce a desired makeup look for the user's input image based on data in the recommendation system.
50. 41. The system of claim 40, further comprising a system for adjusting brightness of the input image, the system for adjusting brightness configured to estimate a normalized skin color of a face in an input image of the user using a skin color estimator, detect facial landmarks, assign different weighting factors to face regions, image center regions and border regions, calculate an average brightness of the input image, compare the average brightness to the estimated normalized skin color to generate correction factors, and apply a curve transformation to the input image using a polynomial transformation in accordance with the correction factors.
51. 1. A system for adjusting brightness of an input image useful in a virtual makeup trial or removal method, comprising: estimating a normalized skin color of a face in an input image of a user using a skin color estimator; Detecting face landmarks and assigning weighting factors to face regions, image core regions and border regions; calculating the average brightness of the input image; comparing the average brightness with the estimated normalized skin color of the face to generate a correction factor; and applying a curvilinear transformation to the input image using a polynomial transformation in accordance with the correction coefficients.
52. 1. A system for providing calibration colors, comprising: automatically detecting a color reference chart having color patches according to a user's input image received from a device having a digital camera; reading pixel values of each of the color patches; comparing the detected information from the color reference chart with pixel values of a stored color reference chart captured according to a golden standard system; and sending the camera calibration parameters to a control system such that the input image is altered to match the golden standard system to maintain color consistency.
53. 53. The system of claim 52, wherein the colors calibrated by the calibration color providing system can be used to determine the color of an object, determine the color of a product, determine the color of a cosmetic product applied to a user, and evaluate color changes.
54. 1. A method for providing a virtual makeup tutorial, comprising: Selecting keyframes from one or more existing makeup videos; and / or Detecting product name characters in selected keyframes, character recognition to search for product names Detecting product names in existing makeup videos by searching for products using a classifier derived from a trained product classifier that evaluates products in a product database; Summarizing the makeup information from the selected key frames and the product names detected in the makeup tutorial summary; and generating a virtual makeup tutorial based on the makeup tutorial outline.
55. The key frame is Segmenting video data from the one or more existing makeup videos into segments; generating a set of candidate keyframes based on frame disparity, color histograms and / or camera motion; Selecting a final keyframe based on a set of criteria and whether there is a different type of makeup on the previous or subsequent frames 55. The method of claim 54, wherein the
56. A method for fast face detection and landmark tracking, comprising: Capturing an input image using a two-dimensional camera; Creating an image pyramid using images at different scales; applying a histogram of gradients feature using a sliding window and a support vector machine to find a face bounding box on the images of the image pyramid; and detecting a face within the bounding box, if a face is present, using one or more facial landmark detectors based on a global learning descent regularization model.
57. 57. The method of claim 56, further comprising extracting patches and applying landmark mean shift fitting to the images to smooth landmark data and normalize landmark positions across the image pyramid, and applying a three-layer neural network model as an accuracy validation model to filter erroneous shapes and associate and select final landmarks.
58. 58. The method of claim 57, wherein the three layers of the neural network are a convolution layer, an upsample layer, and a mapping layer.
59. 57. The method of claim 56, further comprising: filtering noise from a ground truth dataset using a point distribution model to make the landmark video more stable, reducing delays associated with fast movement and reducing shaking associated with lack of movement.
60. 1. A method for extracting a lip region from a face image, comprising: (a) searching for a face region using facial landmarks on an input face image; (b) obtaining the face region using the landmarks and removing non-facial background; (c) Each pixel is L * a * b * L having color values in the space * a * b * applying a Gaussian mixture model based on complexion using the space to the bottom of the input face image to calculate the probability of each pixel in the portion of the input face image to determine whether it is equal to or exceeds a reference threshold, and generating a probability map of skin regions in the portion of the face image where the face region is detected; (d) generating an initial face region binary image from the probabilistic face map; and (e) adjusting the reference threshold using an iterative method to determine an improved binary image; (f) evaluating the refined binary image at each iteration based on a predetermined criterion and detecting the face region using the refined binary image.
61. 61. The method of claim 60, wherein the Gaussian mixture model has three components.
62. 61. The method of claim 60, wherein the threshold is adjusted by an offset using an array to iteratively refine the baseline threshold.
63. 61. The method of claim 60, wherein the pre-determined criteria include one or more of the ratio of a width to a height of an outer rectangle around the face region, a ratio of an area of the face region to an area of the outer rectangle, and a ratio of an area of the face region to an area of a portion of the face image.
64. 61. The method of claim 60, wherein the facial region is a lip region and the portion of the facial image is a lower portion of the facial image.
65. Furthermore, the L of the pixels of the initial face region and the non-face region in the improved Gaussian mixture model is * a * b *61. The method of claim 60, comprising using a color space color, calculating a probability map of the initial face region and the non-face region, and creating an overall probability map using the Gaussian mixture model for use in detecting the face region.
66. 66. The method of claim 65, further comprising smoothing the global probability map using edge detection and contouring.
67. 1. A method for virtually providing eye makeup add-on effects to a facial image, comprising: (a) creating a template of at least one eye cosmetic feature of an eye, manually annotating landmark points on the template that are associated with the eye cosmetic feature, and saving locations of the landmark points as a text file; (b) extracting landmarks in eye regions of the face image using a landmark detector in the image frame; (c) cropping the eye region of the image to create an image frame based on the landmarks associated with the eye cosmetic features of the template; (d) generating points from the detected extracted landmarks on the eye region of the image frame by linear interpolation around the eye region; (e) generating points around the template based on the annotated landmarks of the template; and (f) applying the template to the image frame by forward distortion to create an eye region image frame having the eye cosmetic features from the applied template; and (g) cropping the eye region image frame back to the original face image to create a face image having the eye cosmetic features.
68. 68. The method of claim 67, wherein the eye cosmetic features are selected from eyeshadow features, middle eyeshadow features, eyeshadow tail features, eyeshadow corner features, and eyelash features.
69. 69. The method of claim 68, wherein step (a) comprises creating templates for each of an eyeshadow feature, a middle eyeshadow feature, an eyeshadow tail feature, an eyeshadow corner feature, and an eyelash feature, the method further comprising repeating steps (b) through (g) on a facial image for two or more of the eye features in the templates, and combining two or more features in the facial image to create a synthetic eye makeup look.
70. 1. A method for virtually providing a lipstick texture to a face image, comprising: To provide a texture simulator comprising a training module having a deep convolutional neural network structure; A pre-processing module processes the input lip region and calculates the desired lipstick color L * a * b * modifying the input lip region to have the desired lipstick color and luminance enhancement using a luminance channel of a color space and a weighted coverage factor to create an L channel image having a luminance distribution and a simulated dynamic texture; * Channel and b * For the channel, the input image is converted from RGB to L * a * b * Processing into spatial color, feeding the L channel image from the pre-processing module to a mono-channel style transfer module trained on an image dataset using a training module to create a composite L channel image having a composite color and texture based on a reference style image in the dataset; The composite L channel image with dynamic texture simulation and the a from the pre-processing module for RGB conversion * Channel images and b * and further processing the channel images in a post-processing module for RGB conversion.
71. 1. A system for virtual makeup removal and virtual makeup application using an input image, comprising: receiving an input image having makeup applied thereto from a user interface; searching for facial landmarks from a facial image of a user in at least a first region and / or a second region different from the first region, the first region including makeup and / or the second region including makeup; if the first region is located, decomposing the first region of the face image into a first channel and feeding the first channel of the first region to a histogram matching using a reference histogram from a dataset of histograms of faces without makeup, respectively, to obtain a first image in which makeup is removed in the first region; and / or if the second region is located, converting the second region of the face image into a color channel and feeding the color channel to a histogram matching under different lighting conditions to obtain a second image in which makeup is removed in the second region, using a reference histogram from a dataset of histograms of faces without makeup and under different lighting conditions, respectively. if both the first region and the second region are located, combining the first image and the second image to form a resultant face image in which makeup has been removed from the first region and the second region; The system is configured to virtually apply a predetermined type of makeup to the first region of the resulting facial image from which the makeup has been removed, and / or apply a second type of makeup to the second region of the resulting facial image from which the makeup has been removed.
72. 72. The system of claim 71, wherein the first type of makeup is a virtual makeup add-on and the second type of makeup is a virtual lipstick.
73. 73. The system of claim 72, wherein the system is further capable of providing an output end effect for the first type of makeup and / or the second type of makeup.
74. 74. The system of claim 73, wherein the system is further capable of providing a simulated texture to the second type of makeup.
75. 1. A method for virtual makeup removal and virtual makeup application using an input image, comprising: Receiving an input image having makeup applied thereto from a user interface; searching for facial landmarks from a facial image of a user in at least a first region and / or a second region different from the first region, the first region including makeup and / or the second region including makeup; If the first region is found, decomposing the first region of the face image into first channels and respectively obtaining reference histograms from a dataset of histograms of faces without makeup. and providing the first channel of the first region to a histogram matching using a reference histogram from a dataset of face histograms under different lighting conditions to obtain a first image with makeup removed in the first region, and / or if the second region is located, converting the second region of the face image into a color channel and providing the color channel to a histogram matching under different lighting conditions to obtain a second image with makeup removed in the second region using a reference histogram from a dataset of face histograms under different lighting conditions without makeup, respectively. if both the first region and the second region are located, combining the first image and the second image to form a resultant face image in which makeup has been removed from the first region and the second region; and virtually applying a predetermined type of makeup to the first area of the resulting facial image from which the makeup has been removed, and / or applying a second type of makeup to the second area of the resulting facial image from which the makeup has been removed.
76. 76. The method of claim 75, wherein the first type of makeup is a virtual makeup add-on and the second type of makeup is a virtual lipstick.
77. 76. The method of claim 75, wherein the system is further capable of providing an output end effect for the first type of makeup and / or the second type of makeup.
78. 80. The system of claim 77, wherein the system is further capable of providing a simulated texture to the second type of makeup.
Citation Information
Cited By
Systems and methods for virtual facial makeup removal and simulation, fast facial detection and landmark tracking, reduction in input video lag and shaking, and method for recommending makeup
US12751537B2
Method, electronic device, program, and storage medium for modifying image content
WO2026197717A1
