Intelligent quantitative analysis method and analysis system for facial skin makeup retention
By collecting facial images and constructing an image comparison model, and using image pixel, information theory and structural similarity for quality evaluation, the problem of accurately identifying makeup touch-up areas is solved, and the integrity of makeup is detected.
Patent Information
- Application Number
- CN202110836603.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-23
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2041-07-23
AI Technical Summary
In existing technologies, it is difficult for people to accurately locate the areas that need touch-ups when touching up their makeup, resulting in incomplete makeup.
By collecting facial images and performing facial recognition, an image comparison model is constructed. Quality evaluation is performed using methods such as image pixel, information theory, and structural similarity. The makeup effect is identified and detected, and ROI regions are divided for precise detection.
It achieves precise detection of facial makeup retention, enabling timely identification of areas requiring touch-ups and ensuring the integrity of the makeup look.
Smart Images

Figure CN113554622B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of makeup-lasting detection, and specifically relates to an intelligent quantitative analysis method and analysis system for makeup-lasting on human facial skin. Background Art
[0002] Nowadays, people put on makeup to make their faces more beautiful, but as time goes by, the makeup cannot be kept intact and needs to be touched up. When touching up the makeup, people often use their eyes to observe and select the areas that need to be touched up, but the observation ability of the human eye is limited, and it is difficult to find all the areas that need to be touched up in a timely and accurate manner.
[0003] Therefore, based on the above technical problems, it is necessary to design a new intelligent quantitative analysis method and analysis system for facial skin makeup persistence. Summary of the invention
[0004] The purpose of the present invention is to provide an intelligent quantitative analysis method and analysis system for facial skin makeup retention.
[0005] In order to solve the above technical problems, the present invention provides a method for intelligent quantitative analysis of facial skin makeup retention, comprising:
[0006] Collect facial images and perform facial recognition;
[0007] Building an image contrast model; and
[0008] The makeup lasting effect is detected through face images based on the image comparison model.
[0009] Furthermore, the method for collecting facial images and performing facial recognition includes:
[0010] Collect standard images of people’s faces after makeup;
[0011] The real-time image of the face after makeup is collected, that is, the real-time image of the face after makeup is collected at preset intervals.
[0012] Furthermore, the method for collecting facial images and performing facial recognition also includes:
[0013] The collected images are evaluated and screened, that is,
[0014] The quality of each image is evaluated based on image pixels, the quality of each image is evaluated based on information theory, and the quality of each image is evaluated based on structural similarity.
[0015] Furthermore, the method for evaluating the quality of each image according to image pixels includes:
[0016] The quality of each image is evaluated based on the peak signal-to-noise ratio and mean square error, that is,
[0017] The image to be evaluated is y, the reference image is x, and the size is M*N. The calculation method for characterizing the image quality based on the peak signal-to-noise ratio is:
[0018]
[0019] The calculation method for characterizing image quality based on mean square error is:
[0020]
[0021] The larger the PSNR value, the smaller the distortion between the image to be evaluated and the reference image, and the better the image quality;
[0022] The smaller the MSE value is, the better the quality of the image to be evaluated is.
[0023] Furthermore, the method for evaluating the quality of each image according to information theory includes:
[0024] According to the information fidelity criterion and the visual information fidelity algorithm, the mutual information between the image to be evaluated and the reference image is calculated to measure the quality of the image to be evaluated.
[0025] Furthermore, the method for evaluating the quality of each image according to the structural similarity includes:
[0026] Determine a reference image and an image to be evaluated;
[0027] The size of the reference image x and the image to be evaluated y is M*N, where the mean, standard deviation, variance and covariance of the reference image x and the image to be evaluated y are: x 、u y , σ x , σ y , σ x 2 , σ y 2 、u xy ;
[0028] The comparison functions of brightness, contrast, and structure are:
[0029]
[0030]
[0031]
[0032] Among them, c1, c2, c3 are positive constants;
[0033] The structural similarity index is:
[0034] SSIM(x,y)=[l(x,y)] α[c(x,y)] β [s(x,y)] γ ;
[0035] The larger the structural similarity index is, the better the quality of the corresponding image to be evaluated is;
[0036] The collected images are evaluated and screened after the quality of each image is evaluated according to image pixels, the quality of each image is evaluated according to information theory, and the quality of each image is evaluated according to structural similarity.
[0037] Furthermore, the method for collecting facial images also includes:
[0038] Recognize the faces in each image, that is
[0039] The facial features of the filtered images are located and the 88 points that make up the facial contour are calculated;
[0040] Perform full-range feature recognition on the standard images of the screened face after makeup, locate 50,000 feature points, grid the face structure, add position labels, and build a 3D face model;
[0041] Divide a preset number of ROI areas in the 3D face model;
[0042] Perform spatial calibration to establish the correspondence between the pixels and physical dimensions of each filtered image based on the 3D face model;
[0043] After setting the calibration parameters, measuring the actual physical size of the target on the screened image; and / or
[0044] The image is marked according to the position of each preset ROI area, and training is performed to automatically identify each ROI area on the screened image.
[0045] Furthermore, the method for constructing an image contrast model includes:
[0046] The image contrast model is constructed according to the CIEL*a*b color space, that is
[0047] Comparing the color differences of all ROI regions in the desired contrast image to compare the desired contrast image;
[0048]
[0049] Among them, ΔL * Δa is the brightness difference of the same ROI area in the required comparison image; * Δb is the red-green difference of the same ROI area in the image to be compared; * ΔE is the yellow-blue difference of the same ROI area in the required comparison image; *The color difference of the same ROI area in the image to be compared; and / or
[0050] Construct an image contrast model based on grayscale, that is
[0051] Compare the grayscale differences of all ROI regions in the desired contrast image to compare the desired contrast image;
[0052] Gray 参i =R 参i *0.3+G 参i *0.59+B 参i *0.11;
[0053] Gray 待i =R 待i *0.3+G 待i *0.59+B 待i *0.11;
[0054] ΔGray i =|Gray 参i -Gray 待i |;
[0055] Among them, Gray 参i is the grayscale of the i-th ROI area of the filtered reference image; R 参i is the R value of the i-th ROI area of the reference image after screening; G 参i is the G value of the i-th ROI area of the reference image after screening; B 参i is the B value of the i-th ROI area of the filtered reference image; Gray 待i is the grayscale of the i-th ROI area of the screened image to be evaluated; R 待i is the R value of the i-th ROI area of the screened image to be evaluated; G 待i is the G value of the i-th ROI area of the screened image to be evaluated; B 待i is the B value of the i-th ROI area of the screened image to be evaluated; ΔGray i is the grayscale difference between the filtered reference image and the filtered image to be evaluated in the i-th ROI area.
[0056] Furthermore, the method for detecting the makeup lasting effect through a face image according to the image contrast model includes:
[0057] According to the standard image of the screened face after makeup and the real-time image of the screened face after makeup, the color difference of all ROI areas is compared through the image comparison model to judge the makeup lasting effect of each ROI area. The smaller the color difference of the same ROI area, the better the makeup lasting effect of the ROI area;
[0058] According to the screened reference image and the screened image to be evaluated, the grayscale differences of all ROI areas are compared through the image comparison model to judge the makeup lasting effect of each ROI area. The smaller the grayscale difference of the same ROI area, the better the makeup lasting effect of the ROI area.
[0059] The classification level of color difference or grayscale difference is set in advance. After the corresponding image contrast model color difference or grayscale difference is obtained according to the image contrast model, the classification level to which the color difference or grayscale difference belongs is determined, and the makeup lasting effect is determined according to the classification level.
[0060] On the other hand, the present invention also provides a facial skin makeup retention intelligent quantitative analysis system, comprising:
[0061] A collection module collects face images and performs face recognition;
[0062] A model building module, building an image comparison model; and
[0063] The contrast detection module detects the makeup lasting effect through face images based on the image contrast model.
[0064] The beneficial effect of the present invention is that the present invention achieves accurate detection of facial makeup lasting effect by collecting facial images and performing facial recognition; constructing an image comparison model; and detecting the makeup lasting effect through facial images according to the image comparison model, and can timely and completely discover the areas on the face that need makeup touch-up, so that people can touch up their makeup in time and ensure the effect of the makeup.
[0065] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description and the drawings.
[0066] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0068] Figure 1 It is a flow chart of the intelligent quantitative analysis method for facial skin makeup retention involved in the present invention;
[0069] Figure 2This is a grayscale comparison chart of the foundation light source;
[0070] Figure 3 This is a grayscale comparison chart of the blush light source;
[0071] Figure 4 This is a comparison chart of the L values of five light sources;
[0072] Figure 5 This is a comparison chart of the a values of five light sources;
[0073] Figure 6 This is a comparison chart of the b values of five light sources;
[0074] Figure 7 This is a comparison chart of the gray value of the UV foundation and L, a, and b;
[0075] Figure 8 This is a comparison chart of the gray value of UV blush and L, a, and b;
[0076] Fig. 9 This is a △E comparison chart of five light sources;
[0077] Fig.10 It is a comparison chart of grayscale and △E of ultraviolet light;
[0078] Fig.11 It is a flow chart of facial contour point positioning involved in the present invention;
[0079] Fig.12 It is a schematic diagram of facial contour points involved in the present invention;
[0080] Fig.13 Schematic diagram of warm and cold colors for long-lasting makeup effects according to the present invention;
[0081] Fig.14 It is a principle block diagram of the intelligent quantitative analysis system for facial skin makeup retention involved in the present invention. DETAILED DESCRIPTION
[0082] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0083] Example 1
[0084] Figure 1 It is a flow chart of the intelligent quantitative analysis method of facial skin makeup retention involved in the present invention.
[0085] like Figure 1As shown, this embodiment provides an intelligent quantitative analysis method for facial skin makeup lasting, including: collecting facial images and performing facial recognition; constructing an image comparison model; and detecting the makeup lasting effect through facial images according to the image comparison model, thereby achieving accurate detection of facial makeup lasting effect, and being able to timely and completely discover facial areas that require makeup touch-up, so that people can touch up their makeup in time and ensure the makeup effect.
[0086] Figure 2 This is a grayscale comparison chart of the foundation light source;
[0087] Figure 3 This is a grayscale comparison chart of the blush light source;
[0088] Figure 4 This is a comparison chart of the L values of five light sources;
[0089] Figure 5 This is a comparison chart of the a values of five light sources;
[0090] Figure 6 This is a comparison chart of the b values of five light sources;
[0091] Figure 7 This is a comparison chart of the gray value of the UV foundation and L, a, and b;
[0092] Figure 8 This is a comparison chart of the gray value of UV blush and L, a, and b;
[0093] Fig. 9 This is a △E comparison chart of five light sources;
[0094] Fig.10 This is a comparison chart of the grayscale of ultraviolet light and △E.
[0095] In this embodiment, the method for collecting facial images and performing facial recognition includes: collecting a standard image of a face after makeup; collecting a real-time image of a face after makeup, that is, collecting a real-time image of a face after makeup at a preset interval (for example, one hour); acquiring images under different light sources (each light source can be: white light, standard diffuse reflection, cross-polarized light, ultraviolet light, parallel polarized light); selecting the most suitable light source and parameters according to the comparison between the parameters of different cosmetics under different light sources; Figure 2 and Figure 3 As shown in Figure 2, the grayscale value difference of ultraviolet light is the most obvious among the five light sources; Figure 4 , Figure 5 and Figure 6 As shown in Figure 2, the b value difference of ultraviolet light is the most obvious among the five light sources; Figure 7 and Figure 8 As shown in the figure, the difference in grayscale value under ultraviolet light is more obvious than that in L, a, and b values; Fig. 9 As shown in , the normalized △E law of ultraviolet light is the most obvious; Fig.10As shown, there is little difference between the grayscale of ultraviolet light and △E; therefore, the grayscale value of ultraviolet light or the normalized △E of ultraviolet light can be selected as the best method for quantitative analysis.
[0096] In this embodiment, the method of collecting facial images and performing facial recognition also includes: evaluating and screening the collected images, that is, evaluating the quality of each image according to image pixels, evaluating the quality of each image according to information theory, and evaluating the quality of each image according to structural similarity; the research needs to simulate the visual perception characteristics of the human eye through machine learning methods, help set shooting parameters, and shoot skin images that are meaningful for makeup detection. The quality evaluation system helps users to determine the type of distortion in the captured image, including brightness and color distortion, blur distortion, and contrast distortion. The research is based on the basic characteristics of the human visual system, including multi-channel perception, resolvable blur perception, and contrast sensitivity function response. A three-dimensional feature vector is generated for each image. Combined with professional subjective evaluation, support vector machines (SVM) and binary decision trees (DT) are used to perform pattern recognition on the image to distinguish between images that can be used for makeup detection and images that are not conducive to makeup detection.
[0097] In this embodiment, the method of evaluating the quality of each image according to image pixels (based on image pixel statistics) includes: evaluating the quality of each image according to the peak signal-to-noise ratio and the mean square error, that is, based on the image pixel statistics, the peak signal-to-noise ratio (PSNR) and the mean square error (MSE) are two common quality evaluation methods. They measure the quality of the image to be evaluated from a statistical perspective by calculating the difference between the grayscale values of the corresponding pixels of the image to be evaluated and the reference image;
[0098] The image to be evaluated is y, the reference image is x, and the size is M*N. Then the calculation method of characterizing the image quality according to the peak signal-to-noise ratio is as follows: the image to be evaluated is all the collected standard images of the face after makeup and the real-time images of the face after makeup;
[0099]
[0100] The calculation method for characterizing image quality based on mean square error is:
[0101]
[0102] Both PSNR and MSE measure image quality by calculating the global size of the pixel error between the image to be evaluated and the reference image. The larger the PSNR value, the smaller the distortion between the image to be evaluated and the reference image, and the better the image quality. The smaller the MSE value, the better the quality of the image to be evaluated. However, this type of algorithm starts from the global statistics of the image pixel values and does not consider the local visual factors of the human eye, so it is impossible to grasp the local quality of the image.
[0103] In this embodiment, the method for evaluating the quality of each image according to information theory includes: calculating the mutual information between the image to be evaluated and the reference image according to the two algorithms of information fidelity criterion and visual information fidelity to measure the quality of the image to be evaluated. Based on the information entropy basis in information theory, mutual information is widely used to evaluate image quality. Through the two algorithms of Information Fidelity Criterion (IFC) and Visual Information Fidelity (VIF), they measure the quality of the image to be evaluated by calculating the mutual information between the image to be evaluated and the reference image. These two methods have theoretical support and expand the connection between the image and the human eye in terms of information fidelity, but such methods do not respond to the structural information of the image.
[0104] In this embodiment, the method for evaluating the quality of each image according to the structural similarity includes: the main function of human vision is to extract structural information from the background, and the human visual system can achieve this goal in a highly adaptive manner, so the measurement of the structural distortion of the image should be the best approximation of the perceived quality of the image. On this basis, an objective image quality evaluation standard that conforms to the characteristics of the human visual system is given - Structure Similarity (SSIM). SSIM constructs structural similarity based on the correlation between image pixels.
[0105] Determine the reference image and the image to be evaluated; the reference image x and the image to be evaluated y of size M*N, where the mean, standard deviation, variance and covariance of the reference image x and the image to be evaluated y are: x 、u y , σ x , σ y , σ x 2 , σ y 2 、u xy ;
[0106] The comparison functions of brightness, contrast, and structure are:
[0107]
[0108]
[0109]
[0110] Among them, c1, c2, and c3 are positive constants, which are used to adjust the instability when the denominator is close to zero;
[0111] The structural similarity index is:
[0112] SSIM(x,y)=[l(x,y)] α [c(x,y)] β [s(x,y)] γ ;
[0113] Among them, α, β, and γ are all parameters and can all be 1;
[0114] The larger the structural similarity index is, the better the quality of the corresponding image to be evaluated is;
[0115] After performing quality evaluation on each image according to image pixels, performing quality evaluation on each image according to information theory, and performing quality evaluation on each image according to structural similarity, the acquired images are evaluated and screened to select images that are convenient for makeup detection from all acquired images; in this embodiment, all reference images may be pre-selected images (for example, pre-set standard images of human faces after makeup, etc.).
[0116] Fig.11 It is a flow chart of facial contour point positioning involved in the present invention;
[0117] Fig.12 It is a schematic diagram of facial contour points involved in the present invention.
[0118] In this embodiment, the method for collecting facial images further includes:
[0119] The faces in each image are identified, that is, the face area is located and registered, and the face is divided into several grid areas (small image patches), and the evaluation range is refined for statistics. In addition, registration, feature extraction and cleaning quality evaluation model construction are performed in multiple dimensional spaces based on image pixel statistics, information theory, and structural information. In different feature spaces, including first-order characteristics, shape features, and texture features (GLCM, GLSZM, GLRLM, GLDM, NGTDM), corresponding feature parameter extraction can be provided according to practical application problems. We will try various feature space values in the following five aspects: (1) boundary feature method; (2) Fourier shape descriptor method; (3) geometric parameter method; (4) shape invariant moment method; (5) other methods. Work on shape representation and matching also includes finite element method (FiniteElementMethod or FEM), rotation function (Turning) and wavelet descriptor (WaveletDeor).
[0120] The information of specific parts of the face has an important influence on facial expression recognition. The selection of facial feature points should include the facial feature points we need to extract. At the same time, these feature points should be able to well describe the change process of each expression. The number of feature points should reach a certain density around the calibrated facial features to fully describe the changes of the facial features when the expression changes.
[0121] In addition to the characteristics of specific parts, the overall characteristics of the face will also affect the individual's recognition of facial expressions. The influence of overall characteristics can be manifested in many aspects, including facial structure, face shape and gender. Facial structure refers to the spatial relationship and layout information between various parts of the face.
[0122] The representation of facial features can be roughly divided into three categories: the first is to represent facial features with points, that is, some feature points defined according to our understanding of facial features. For example, in ASM and AAM, facial features are defined by points, which we call landmarks. There are three types of landmarks: (a) extreme points. Generally, this kind of landmark has only a unique definition in a local range, such as the pupil of the eye, the tip of the nose and the nostril. (b) boundary points. This kind of landmark can be considered as a landmark on the boundary of a local area, but considering the position and distance between adjacent landmarks, it is generally uniformly extracted on the entire edge, such as the contour point of the face, the contour point of the eyebrow, the contour point of the lip, etc. (c) interpolation points. This kind of landmark does not have obvious texture features in the local area, and is obtained by interpolation of other landmarks, such as the center of the mouth, the center of the eyebrows, and those points that are blocked or invisible. The second is to define facial features with lines or boundaries. For example, in a deformable template, the contour of the face is defined as a parabola, and the boundary of the eyeball is defined as a circle, etc. The third method is to define facial features by region. For example, in some methods that segment by color or grayscale value, the area with lip color pixels is segmented as the mouth through the statistics of lip color; eyes, eyebrows, etc. are also segmented by the difference in corresponding color and brightness from other areas of the face, and then the area composed of pixels that meet the conditions is used as the corresponding target area.
[0123] like Fig.11 and Fig.12 As shown in the figure, the facial features of the screened images are located, and 88 points that constitute the facial contour are calculated, including eyebrows (8 points on each side), eyes (8 points on each side), nose (13 points), mouth (22 points), and facial contour (21 points); full-range feature recognition is performed on the standard image of the screened face after makeup, 50,000 feature points are located, the facial structure is gridded, and the position Label is marked to build a 3D face model (PRNET, which can reconstruct about 50,000 3D key points of the face based on a frame of face image); a preset number of ROI areas are divided in the 3D face model; spatial calibration is performed, and the pixels and physical The corresponding relationship of size (the real-time image of the screened face after makeup is matched with the 3D face model, so that the ROI area on the 3D face model matches the ROI area in the real-time image of the screened face after makeup); after setting the calibration parameters, the actual physical size of the target is measured on the screened image; and / or the position of each ROI area is marked on the image according to the preset position (the feature points are marked in each ROI area), and training is performed to automatically identify each ROI area on the screened image; the position of each ROI area can be considered to be marked in the face area on the image, and training is performed through the unet method to automatically identify each ROI area on the screened image.
[0124] In this embodiment, the method for constructing an image contrast model includes: constructing an image contrast model according to the CIEL*a*b color space, that is,
[0125] The three basic coordinates represent the lightness of the color (L*, L*=0 generates black and L*=100 indicates white), its position between red / magenta and green (a* negative values indicate green and positive values indicate magenta) and its position between yellow and blue (b* negative values indicate blue and positive values indicate yellow); L* is lightness, ranging from 0 to 100, indicating colors from dark (black) to light (white); a* represents red and green, and the value changes from positive to negative, indicating colors from red (positive) to green (negative); b* represents yellow and blue, and the value changes from positive to negative, indicating colors from yellow (positive) to blue (negative);
[0126] Comparing the color differences of all ROI regions in the desired contrast image to compare the desired contrast image;
[0127]
[0128] Among them, ΔL * Δa is the brightness difference of the same ROI area in the required comparison image; * Δb is the red-green difference of the same ROI area in the image to be compared; * ΔE is the yellow-blue difference of the same ROI area in the required comparison image; * The color difference of the same ROI area in the image to be compared; and / or
[0129] Construct an image contrast model based on grayscale, that is
[0130] Compare the grayscale differences of all ROI regions in the desired contrast image to compare the desired contrast image;
[0131] Gray 参i =R 参i *0.3+G 参i *0.59+B 参i *0.11;
[0132] Gray 待i =R 待i *0.3+G 待i *0.59+B 待i *0.11;
[0133] ΔGray i =|Gray 参i -Gray 待i |;
[0134] Among them, Gray 参iis the grayscale of the i-th ROI area of the filtered reference image; R 参i is the R value of the i-th ROI area of the reference image after screening; G 参i is the G value of the i-th ROI area of the reference image after screening; B 参i is the B value of the i-th ROI area of the filtered reference image; Gray 待i is the grayscale of the i-th ROI area of the screened image to be evaluated; R 待i is the R value of the i-th ROI area of the screened image to be evaluated; G 待i is the G value of the i-th ROI area of the screened image to be evaluated; B 待i is the B value of the i-th ROI area of the screened image to be evaluated; ΔGray i is the grayscale difference between the filtered reference image and the filtered image to be evaluated in the i-th ROI area.
[0135] Fig.13 It is a schematic diagram of warm and cold colors of the long-lasting makeup effect involved in the present invention.
[0136] In this embodiment, the method for detecting the makeup lasting effect through a face image according to an image contrast model includes:
[0137] The screened standard image of the face after makeup and the real-time image of the face after makeup are divided into several grid patch images (each grid patch image) according to the ROI area, and the color difference of the same ROI area (the corresponding grid patch image L*, a*, b* is the mean value of the grid patch image) is compared through the image comparison model to determine the makeup lasting effect of the ROI area;
[0138] According to the standard image of the screened face after makeup and the real-time image of the screened face after makeup, the color difference of all ROI areas is compared through the image comparison model to judge the makeup lasting effect of each ROI area. The smaller the color difference of the same ROI area, the better the makeup lasting effect of the ROI area;
[0139] According to the color difference of each ROI area, the makeup lasting effect percentage of the ROI area can be obtained (the lower the color difference, the higher the percentage, which means the better the makeup lasting effect), and the percentage is marked in the corresponding ROI area, so as to know the makeup lasting effect of the ROI area. Fig.13 As shown, the cold and warm colors of the corresponding ROI area can also be set according to the color difference of each ROI area and displayed in the corresponding ROI area (cold colors indicate poor makeup lasting effect, and warm colors indicate good makeup lasting effect);
[0140] According to the screened reference image and the screened image to be evaluated, the grayscale differences of all ROI areas are compared through the image comparison model to judge the makeup lasting effect of each ROI area. The smaller the grayscale difference of the same ROI area, the better the makeup lasting effect of the ROI area.
[0141] The classification level of color difference or grayscale difference is preset. After the color difference or grayscale difference of the corresponding image contrast model is obtained according to the image contrast model, the classification level to which the color difference or grayscale difference belongs is determined, and the makeup lasting effect is determined according to the classification level. In order to avoid the grayscale value difference between the groups being smaller and indistinguishable, pure digital quantization is not used, but a hierarchical quantization method is adopted. The quantification is divided into six levels: 0, 1, 2, 3, 4, and 5. The specific classification can be as follows: level 0 - 0-1% (no makeup, that is, the worst makeup lasting effect), level 1 - 1-15, level 2 - 15-25%, level 3 - 25-35%, level 4 - 35-45%, level 5 - 45-100%; Example 2
[0142] Fig.14 This is a principle block diagram of the intelligent quantitative analysis system for facial skin makeup retention involved in the present invention.
[0143] like Fig.14 As shown, based on Example 1, this Example 2 also provides an intelligent quantitative analysis system for facial skin makeup lasting, including: an acquisition module, which acquires facial images and performs facial recognition; a model building module, which builds an image comparison model; and a comparison detection module, which detects the makeup lasting effect through facial images according to the image comparison model.
[0144] In this embodiment, the facial skin makeup lasting intelligent quantitative analysis system may further include a display module, which may display a 3D model of the face, divide the 3D model into ROI areas, and display warm and cool colors corresponding to the makeup lasting effect in each ROI area.
[0145] In this embodiment, the intelligent quantitative analysis system for makeup lasting on facial skin is suitable for adopting the intelligent quantitative analysis method for makeup lasting on facial skin involved in Example 1 to detect the makeup lasting effect.
[0146] In summary, the present invention achieves accurate detection of facial makeup lasting effect by collecting facial images and performing facial recognition; constructing an image comparison model; and detecting the makeup lasting effect through facial images according to the image comparison model. It can timely and completely discover the areas on the face that need makeup touch-up, so that people can touch up their makeup in time and ensure the makeup effect.
[0147] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0148] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
[0149] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.
[0150] Based on the above ideal embodiments of the present invention, the relevant staff can make various changes and modifications without departing from the technical concept of the present invention through the above description. The technical scope of the present invention is not limited to the contents of the specification, and its technical scope must be determined according to the scope of the claims.
Claims
1. A method for intelligent quantitative analysis of facial skin makeup retention, characterized in that: include: Collect facial images and perform facial recognition; Build an image comparison model; as well as The makeup lasting effect is detected through the face image according to the image comparison model; The process of collecting facial images and performing face recognition also includes: Acquire each image under different light sources, and select the most suitable light source and parameters according to the comparison between the parameters of different cosmetics under different light sources; wherein each light source includes: white light, standard diffuse reflection, cross polarized light, ultraviolet light, parallel polarized light; Recognize the faces in each image, that is The facial features of the filtered images are located and the 88 points that make up the facial contour are calculated; Perform full-range feature recognition on the standard images of the screened face after makeup, locate 50,000 feature points, grid the face structure, add position labels, and build a 3D face model; Divide a preset number of ROI areas in the 3D face model; Perform spatial calibration to establish the correspondence between the pixels and physical dimensions of each filtered image based on the 3D face model; After setting the calibration parameters, measuring the actual physical size of the target on the screened image; and / or Marking the positions of the preset ROI regions on the image and performing training to automatically identify the ROI regions on the screened image; The method for constructing an image contrast model comprises: The image contrast model is constructed according to the CIEL*a*b color space, that is Comparing the color differences of all ROI regions in the desired contrast image to compare the desired contrast image; Where, ΔL * Δa is the brightness difference of the same ROI area in the required comparison image; * Δb is the red-green difference of the same ROI area in the image to be compared; * ΔE is the yellow-blue difference of the same ROI area in the required comparison image; * is the color difference of the same ROI area in the image to be compared; and / or Construct an image contrast model based on grayscale, that is Compare the grayscale differences of all ROI regions in the desired contrast image to compare the desired contrast image; Gray 参i =R 参i *0.3+G 参i *0.59+B 参i *0.11; Gray 待i =R 待i *0.3+G 待i *0.59+B 待i *0.11; ΔGray i =|Gray 参i -Gray 待i |; Among them, Gray 参i is the grayscale of the i-th ROI area of the filtered reference image; R 参i is the R value of the i-th ROI area of the reference image after screening; G 参i is the G value of the i-th ROI area of the reference image after screening; B 参i is the B value of the i-th ROI area of the filtered reference image; Gray 待i is the grayscale of the i-th ROI area of the screened image to be evaluated; R 待i is the R value of the i-th ROI area of the screened image to be evaluated; G 待i is the G value of the i-th ROI area of the screened image to be evaluated; B 待i is the B value of the i-th ROI area of the screened image to be evaluated; ΔGray i is the grayscale difference between the filtered reference image and the filtered image to be evaluated in the i-th ROI area; The method for detecting the makeup lasting effect through a face image according to an image comparison model comprises: According to the standard image of the screened face after makeup and the real-time image of the screened face after makeup, the color difference of all ROI areas is compared through the image comparison model to judge the makeup lasting effect of each ROI area. The smaller the color difference of the same ROI area, the better the makeup lasting effect of the ROI area; According to the screened reference image and the screened image to be evaluated, the grayscale differences of all ROI areas are compared through the image comparison model to judge the makeup lasting effect of each ROI area. The smaller the grayscale difference of the same ROI area, the better the makeup lasting effect of the ROI area. The classification level of the color difference or grayscale difference is preset, and after the corresponding image contrast model color difference or grayscale difference is obtained according to the image contrast model, the classification level to which the color difference or grayscale difference belongs is determined, and the makeup lasting effect is determined according to the classification level; The method for collecting face images and performing face recognition includes: Collect standard images of people’s faces after makeup; Collecting real-time images of the face after makeup, that is, collecting real-time images of the face after makeup at preset intervals; The method for collecting facial images and performing facial recognition also includes: The collected images are evaluated and screened, that is, Evaluate the quality of each image based on image pixels, evaluate the quality of each image based on information theory, and evaluate the quality of each image based on structural similarity; The method for evaluating the quality of each image according to image pixels comprises: The quality of each image is evaluated based on the peak signal-to-noise ratio and mean square error, that is, The image to be evaluated is y, the reference image is x, and the size is M*N. The calculation method for characterizing the image quality based on the peak signal-to-noise ratio is: The calculation method for characterizing image quality based on mean square error is: The larger the PSNR value, the smaller the distortion between the image to be evaluated and the reference image, and the better the image quality; The smaller the MSE value, the better the quality of the image to be evaluated; The method for evaluating the quality of each image according to information theory comprises: According to the information fidelity criterion and the visual information fidelity algorithm, the mutual information between the image to be evaluated and the reference image is calculated to measure the quality of the image to be evaluated. The method for evaluating the quality of each image according to the structural similarity comprises: Determine a reference image and an image to be evaluated; The size of the reference image x and the image to be evaluated y is M*N, where the mean, standard deviation, variance and covariance of the reference image x and the image to be evaluated y are: x 、u y , σ x , σ y , σ x 2 , σ y 2 , σ xy ; The comparison functions of brightness, contrast, and structure are: Among them, c1, c2, c3 are positive constants; The structural similarity index is: SSIM(x,y)=[l(x,y)] α [c(x,y)] β [s(x,y)] γ ; The larger the structural similarity index is, the better the quality of the corresponding image to be evaluated is; The collected images are evaluated and screened after the quality of each image is evaluated according to image pixels, the quality of each image is evaluated according to information theory, and the quality of each image is evaluated according to structural similarity.
2. A facial skin makeup lasting intelligent quantitative analysis system according to the facial skin makeup lasting intelligent quantitative analysis method as claimed in claim 1, characterized in that: include: A collection module collects face images and performs face recognition; Model building module, building image comparison model; as well as The contrast detection module detects the makeup lasting effect through face images based on the image contrast model.
Citation Information
Patent Citations
A method and apparatus for outputting information
CN109376661A
Vehicle beauty maintenance intelligent service platform based on big data machine vision
CN111915652A