Makeup evaluation method based on face image
By dividing facial images into regions and extracting factors, and combining this with a decision tree model, the subjectivity problem in makeup evaluation is solved, and objective and accurate makeup scores are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI CHINA-NORM MANAGEMENT CONSULTING CO LTD
- Filing Date
- 2023-06-12
- Publication Date
- 2026-05-08
AI Technical Summary
Current makeup evaluation methods are subjective and lack objective evaluation methods.
By dividing the face image into regions, extracting color factors, uniformity factors, and blemish factors, and using a decision tree model for scoring, the final makeup score is obtained.
It enables objective and accurate evaluation of makeup, reduces human subjectivity, and improves the accuracy of evaluation.
Smart Images

Figure CN116777854B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a method for evaluating makeup based on human face images. Background Technology
[0002] With improved living standards and changing attitudes, people are paying more and more attention to their appearance. Ways to enhance one's appearance include improving clothing and makeup.
[0003] Currently, most evaluations of makeup color and fading effects are based on on-site assessments by laboratory evaluators. Although there are unified standards for the assessment, different evaluators still have a certain degree of subjectivity. Therefore, there is an urgent need for a completely objective evaluation method to analyze the makeup situation of different subjects. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a makeup evaluation method based on facial images, which can objectively and accurately analyze the makeup of different subjects.
[0005] The technical solution adopted by this invention to solve its technical problem is: to provide a makeup evaluation method based on facial images, comprising the following steps:
[0006] A human face image is acquired, and the human face image is divided into regions to obtain several region images;
[0007] The skin portion within each region of the image is processed to obtain color factor, uniformity factor, and blemish factor;
[0008] The color factor, uniformity factor, and blemish factor of each region image are input into the decision model to obtain the makeup score of each region image.
[0009] Weights are assigned to each region, and the makeup score is obtained by weighted summation based on the makeup score of each region image.
[0010] When dividing the facial image into regions, the facial image is divided into a forehead region image, a cheek region image, and an under-eye region image.
[0011] When evaluating the applied makeup, the color factors include hue factor, saturation factor, brightness factor, and ITA factor; the uniformity factor includes contrast value and grayscale value standard deviation; and the blemish factors include blemish area.
[0012] The skin portion within each image region is processed to obtain color factors, uniformity factors, and blemish factors, as detailed below:
[0013] The region image is converted to the HSV color space, the quartiles of each space image value are taken, and then Q3-Q1 are used as the hue factor, saturation factor and brightness factor.
[0014] The region image is converted to the HSV color space, and the ITA factor is obtained by calculating ITA°={arctan(L*-50)b*}π, where L and b are the parameters of the Lab color space, respectively.
[0015] The region image is converted to a grayscale image, and the grayscale image is subjected to a Laplacian transform using the Laplacian operator. The variance of the transformed image is used as the contrast value.
[0016] Convert the region image to a grayscale image, take the pixels on the diagonal of the grayscale image, and calculate the standard deviation of the pixel values of the selected pixels as the standard deviation of the grayscale values.
[0017] The region image is converted to a grayscale image, the grayscale image is Gaussian blurred, the grayscale image is subtracted from the Gaussian blurred image, and then 127 is added to obtain the defect distribution image. The pixel area of the defect distribution image is obtained as the defect area.
[0018] When evaluating makeup that has worn off, the color factor includes the standard deviation of hue; the uniformity factor includes the texture area and the standard deviation of gray value; and the blemish factor includes the area of reddened skin, the area of pores, the area of acne marks, and the area of pigmentation.
[0019] The skin portion within each image region is processed to obtain color factors, uniformity factors, and blemish factors, as detailed below:
[0020] The region image is converted to the HSV color space, and the standard deviation of the H space image values in the HSV color space is used as the hue standard deviation.
[0021] The region image is converted to a grayscale image, the grayscale image is Gaussian blurred, the grayscale image is subtracted from the Gaussian blurred image, and then 127 is added to obtain the defect distribution image. The defect distribution image is then processed by threshold segmentation to obtain the texture image, and the pixel area of the texture image is obtained as the texture area.
[0022] Convert the region image to a grayscale image, take the pixels on the diagonal of the grayscale image, and calculate the standard deviation of the pixel values of the selected pixels as the standard deviation of the grayscale values.
[0023] A two-dimensional color lookup table is used to correct the color of the converted region image. The color-corrected image is then subjected to a non-linear transformation. A threshold is set to extract the red part of the image, and the area of the pixels occupied by the red part is taken as the reddish skin area.
[0024] Convert the region image to grayscale, use OpenCV's blobdetector to identify black closed regions in the image, and sum the pixels of the black closed regions to obtain the pore area.
[0025] The region image is converted to the Lab color space, the image of the a channel is processed for high contrast, and binarization is performed by thresholding to obtain an image that highlights acne scars. The area of acne scars is calculated by the Canny operator.
[0026] The region image is divided into RGB channels, and the result image is obtained by using the formula |RB|+|RG|. Then, the Canny operator is used to calculate and find color spots, and the summation is used to obtain the area of the color spots.
[0027] The decision-making model is a decision tree model.
[0028] Beneficial effects
[0029] By adopting the above-mentioned technical solution, this invention has the following advantages and positive effects compared with the prior art: This invention divides the face image into multiple regions, processes and identifies the skin in each region, and extracts three major categories of factors. The obtained three major categories of factors are input into a decision tree model for scoring to obtain a score for each region. Then, the scores of each region are weighted and summed by assigning weights to obtain the final makeup score. The entire process of this invention is conducted without human intervention, and can objectively and accurately analyze the makeup of different subjects, thereby making accurate scores. Compared with the existing on-site evaluation method by evaluators, the method of this invention is more objective and accurate. Attached Figure Description
[0030] Figure 1 This is a flowchart of a makeup evaluation method based on facial images according to an embodiment of the present invention. Detailed Implementation
[0031] The present invention will be further illustrated below with reference to specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. Furthermore, it should be understood that after reading the teachings of this invention, those skilled in the art can make various alterations or modifications to the invention, and these equivalent forms also fall within the scope defined by the appended claims.
[0032] Embodiments of the present invention relate to a makeup evaluation method based on facial images, such as... Figure 1 As shown, it includes the following steps:
[0033] Step 1: Acquire a facial image and divide the facial image into regions to obtain several region images. In this step, the facial image is divided into a forehead region, a cheek region, and an under-eye region, thus obtaining forehead region images, cheek region images, and under-eye region images.
[0034] Step 2: Process the skin portion within each region of the image to obtain color factor, uniformity factor, and blemish factor.
[0035] This implementation method can be used to evaluate makeup both after application and after makeup has faded.
[0036] When evaluating makeup application, it's necessary to process the skin portion of each image area to extract factors such as hue, saturation, brightness, ITA, contrast, grayscale standard deviation, and blemish area. Hue, saturation, brightness, and ITA are color-related factors; contrast and grayscale standard deviation are uniformity factors; and blemish area is a blemish factor. The specific processing method is as follows:
[0037] The region image is converted to the HSV color space, the quartiles of each space image value are taken, and then Q3-Q1 are used as the hue factor, saturation factor and brightness factor.
[0038] The region image is converted to the HSV color space, and the ITA factor is obtained by calculating ITA°={arctan(L*-50)b*}π, where L and b are the parameters of the Lab color space, respectively.
[0039] The region image is converted to a grayscale image, and the grayscale image is subjected to a Laplacian transform using the Laplacian operator. The variance of the transformed image is used as the contrast value.
[0040] Convert the region image to a grayscale image, take the pixels on the diagonal of the grayscale image, and calculate the standard deviation of the pixel values of the selected pixels as the standard deviation of the grayscale values.
[0041] The region image is converted to a grayscale image, the grayscale image is Gaussian blurred, the grayscale image is subtracted from the Gaussian blurred image, and then 127 is added to obtain the defect distribution image. The pixel area of the defect distribution image is obtained as the defect area.
[0042] When evaluating makeup that has faded, it's necessary to process the skin portion of each image area to extract factors such as hue standard deviation, texture area, grayscale standard deviation, redness area, pore area, acne scar area, and pigmentation area. Hue standard deviation and color difference are color-related factors; texture area and grayscale standard deviation are uniformity factors; and redness area, pore area, acne scar area, and pigmentation area are blemish factors. The specific processing method is as follows:
[0043] The region image is converted to the HSV color space, and the standard deviation of the H space image values in the HSV color space is used as the hue standard deviation.
[0044] The region image is converted to a grayscale image, the grayscale image is Gaussian blurred, the grayscale image is subtracted from the Gaussian blurred image, and then 127 is added to obtain the defect distribution image. The defect distribution image is then processed by threshold segmentation to obtain the texture image, and the pixel area of the texture image is obtained as the texture area.
[0045] Convert the region image to a grayscale image, take the pixels on the diagonal of the grayscale image, and calculate the standard deviation of the pixel values of the selected pixels as the standard deviation of the grayscale values.
[0046] A two-dimensional color lookup table is used to correct the color of the converted region image. The color-corrected image is then subjected to a non-linear transformation. A threshold is set to extract the red part of the image, and the area of the pixels occupied by the red part is taken as the reddish skin area.
[0047] Convert the region image to grayscale, use OpenCV's blobdetector to identify black closed regions in the image, and sum the pixels of the black closed regions to obtain the pore area.
[0048] The region image is converted to the Lab color space, and the image of the a channel is subjected to high contrast processing. Binarization segmentation is performed by thresholding to obtain an image that highlights acne scars. The area of acne scars is calculated by the Canny operator. The high contrast processing refers to subtracting the original a channel image from the Gaussian blur image of the a channel and adding a preset value.
[0049] The region image is divided into RGB channels, and the result image is obtained by using the formula |RB|+|RG|. Then, the Canny operator is used to calculate and find color spots, and the summation is used to obtain the area of the color spots.
[0050] Step 3: Input the color factor, uniformity factor, and blemish factor of each region image into the decision model to obtain the makeup score for each region image. Specifically, after extracting the color factor, uniformity factor, and blemish factor of each region image, input these factors into the decision model, which can be a decision tree model. The decision tree model can score the makeup of the region image, thus obtaining the makeup score for that region image. The decision tree model in this step can obtain the makeup scores for the forehead region image, cheek region image, and under-eye region image.
[0051] Step 4: Assign weights to each region. The final makeup score is obtained by weighted summation based on the makeup scores of each region's image. In this step, weights can be assigned based on empirical parameters. After assignment, calculate the product of the makeup score of the forehead region image with its assigned weight, the product of the makeup score of the cheek region image with its assigned weight, and the product of the makeup score of the under-eye region image with its assigned weight. Sum these three products to obtain the final makeup score. A high or low makeup score allows for an accurate evaluation of the makeup.
[0052] It is easy to see that this invention divides a facial image into multiple regions, processes and identifies the skin within each region, and extracts three major categories of factors. These factors are then input into a decision tree model for scoring, resulting in a score for each region. Finally, the scores of each region are weighted and summed to obtain the final makeup score. The entire process of this invention is conducted without human intervention, enabling objective and accurate analysis of the makeup conditions of different subjects, thus providing accurate scoring. Compared to existing on-site evaluation methods by evaluators, the method of this invention is more objective and accurate.
Claims
1. A makeup evaluation method based on facial images, characterized in that, Includes the following steps: A human face image is acquired, and the human face image is divided into regions to obtain several region images; The skin portion within each image region is processed to obtain color factors, uniformity factors, and blemish factors. The color factors include hue factor, saturation factor, brightness factor, and ITA factor. The uniformity factors include contrast value and grayscale standard deviation. The blemish factors include blemish area. Specifically, the processing of the skin portion within each image region to obtain color factors, uniformity factors, and blemish factors includes: The region image is converted to the HSV color space, the quartiles of each space image value are taken, and then Q3-Q1 are used as the hue factor, saturation factor and brightness factor. The region image is converted to the Lab color space, and the ITA factor is obtained by calculating ITA° = {arctan (L*-50)b*}π, where L and b are the parameters of the Lab color space. The region image is converted to a grayscale image, and the grayscale image is subjected to a Laplacian transform using the Laplacian operator. The variance of the transformed image is used as the contrast value. Convert the region image to a grayscale image, take the pixels on the diagonal of the grayscale image, and calculate the standard deviation of the pixel values of the selected pixels as the standard deviation of the grayscale values. The region image is converted to a grayscale image, the grayscale image is Gaussian blurred, the grayscale image is subtracted from the Gaussian blurred image, and then 127 is added to obtain the defect distribution image. The pixel area of the defect distribution image is obtained as the defect area. The color factor, uniformity factor, and blemish factor of each region image are input into the decision model to obtain the makeup score of each region image. Weights are assigned to each region, and the makeup score is obtained by weighted summation based on the makeup score of each region image.
2. The makeup evaluation method based on facial images according to claim 1, characterized in that, When dividing the facial image into regions, the facial image is divided into a forehead region image, a cheek region image, and an under-eye region image.
3. The makeup evaluation method based on facial images according to claim 1, characterized in that, When evaluating makeup that has worn off, the color factor includes the standard deviation of hue; the uniformity factor includes the texture area and the standard deviation of gray value; and the blemish factor includes the area of reddened skin, the area of pores, the area of acne marks, and the area of pigmentation.
4. The makeup evaluation method based on facial images according to claim 3, characterized in that, The skin portion within each region of the image is processed to obtain color factors, uniformity factors, and blemish factors, as detailed below: The region image is converted to the HSV color space, and the standard deviation of the H space image values in the HSV color space is used as the hue standard deviation. The region image is converted to a grayscale image, the grayscale image is Gaussian blurred, the grayscale image is subtracted from the Gaussian blurred image, and then 127 is added to obtain the defect distribution image. The defect distribution image is then processed by threshold segmentation to obtain the texture image, and the pixel area of the texture image is obtained as the texture area. Convert the region image to a grayscale image, take the pixels on the diagonal of the grayscale image, and calculate the standard deviation of the pixel values of the selected pixels as the standard deviation of the grayscale values. A two-dimensional color lookup table is used to correct the color of the converted region image. The color-corrected image is then subjected to a non-linear transformation. A threshold is set to extract the red part of the image, and the area of the pixels occupied by the red part is taken as the reddish skin area. Convert the region image to grayscale, use OpenCV's BlobDetector to identify black enclosed regions in the image, and sum the pixels of the black enclosed regions to obtain the pore area. The region image is converted to the Lab color space, the image of the a channel is processed for high contrast, and binarization is performed by thresholding to obtain an image that highlights acne scars. The area of acne scars is calculated by the Canny operator. The region image is divided into RGB channels, and the result image is obtained by using the formula |RB|+|RG|. Then, the Canny operator is used to calculate and find color spots, and the summation is used to obtain the area of the color spots.
5. The makeup evaluation method based on facial images according to claim 1, characterized in that, The decision-making model is a decision tree model.
Citation Information
Patent Citations
Facial skin analysis method and system based on image recognition
CN112396573A