Cosmetic efficacy automatic evaluation method and system based on facial spectrum perception

By constructing a facial spectral data set and building a cosmetic efficacy evaluation model containing a variety of spectral feature extractors and evaluators, the problems of difficulty in processing spectral data and insufficient robustness of the evaluation model in the existing technology are solved, and high-precision and automated evaluation of cosmetic efficacy are achieved.

CN119863679AActive Publication Date: 2025-04-22SHANDONG INST FOR FOOD & DRUG CONTROL

Patent Information

Application Number
CN202510352675.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-25
Publication Date
2025-04-22
Estimated Expiration
2045-03-25

AI Technical Summary

Technical Problem

The existing cosmetic efficacy evaluation method based on spectral perception faces complex and diverse skin spectral data processing difficulties in practical applications, resulting in the impact of individual differences, ambient lighting and equipment differences, and it is difficult to extract key features from multi-source and multi-dimensional spectral data to build a robust and general evaluation model.

Method used

A cosmetics efficacy automatic evaluation method based on facial spectral perception is proposed. By constructing a data set, data preprocessing is carried out, including affine transformation and feature extraction, the cosmetics efficacy evaluation model is constructed. The model includes a benchmark spectral feature extractor, a negative sample encoder, a negative sample weight calculator, spectral perception attention, change spectrum feature extractor, skin tone, delicateness and gloss evaluator, and iterates the model parameters using the loss function and the Adam optimizer.

Benefits of technology

It realizes high-precision and automated evaluation of cosmetics' efficacy, can accurately predict skin tone, delicateness and gloss scores, enhances the generalization ability and prediction accuracy of the model, reduces the risk of misclassification, and provides important support for personalized skin care and cosmetic research and development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119863679A_ABST
    Figure CN119863679A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of cosmetic artificial intelligence, in particular to an automatic cosmetic effect evaluation method and system based on facial spectrum perception, and the method specifically comprises the following steps: collecting facial spectrums of a subject before and after using a cosmetic, carrying out the real scoring of the two facial spectrums, and constructing a # imgabs0 # data set with a skin negative sample spectrum; performing affine transformation on data in the # imgabs 1 # data set to respectively obtain skin spectrums before and after cosmetics are used, and performing feature extraction on negative sample spectrums in the # imgabs 2 # data set to obtain negative sample spectrum features; constructing a cosmetic efficacy evaluation model, and inputting the skin spectrum and the negative sample spectrum characteristics before and after the use of the cosmetics into the cosmetic efficacy evaluation model to obtain a prediction score of the face spectrum after the use of the cosmetics; and after the model is optimized, inputting the to-be-evaluated facial spectrum into the model for evaluation. The method can meet the requirements of the industry for rapid and accurate evaluation tools, and can also provide important support for personalized skin care and cosmetic research and development.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cosmetic artificial intelligence technology, and in particular to a method and system for automatically evaluating cosmetic efficacy based on facial spectrum perception. Background Art

[0002] In recent years, with the rapid development of the cosmetics industry and the increasing demand of consumers for personalized skin care, how to scientifically and accurately evaluate the efficacy of cosmetics has become an important direction for cosmetics research and development and consumer choice. Traditional methods for evaluating the efficacy of cosmetics mainly rely on laboratory tests and manual subjective evaluation, such as observation by skin experts or consumer feedback. However, these methods are usually time-consuming, costly, and affected by personal subjective factors, resulting in certain uncertainties and limitations in the evaluation results.

[0003] With the continuous advancement of artificial intelligence technology and spectral analysis technology, skin condition analysis based on spectral perception has gradually become a hot research direction in the field of cosmetic efficacy evaluation. Spectral perception technology can capture the optical properties of the skin surface and deep layers, and can non-invasively and quickly obtain multi-dimensional information of the skin, such as moisture content, oil distribution, pigmentation, pore status, etc. These data can provide a more scientific and objective basis for cosmetic efficacy evaluation. At the same time, the addition of artificial intelligence methods makes it possible to process and analyze massive skin spectral data. By building a data-driven evaluation model, the accuracy and efficiency of the evaluation can be greatly improved.

[0004] However, the current cosmetic efficacy evaluation based on spectral perception still faces many challenges in practical applications. For example, facial skin spectral data is complex and diverse, and the skin characteristics of different individuals, ambient lighting conditions, and differences in measurement equipment will affect the evaluation results. In addition, how to extract key features from multi-source and multi-dimensional spectral data and build an evaluation model that is both robust and universal is also an urgent problem to be solved.

[0005] Therefore, the present invention proposes a method and system for automatic evaluation of cosmetic efficacy based on facial spectrum perception to solve the above problems. Summary of the invention

[0006] In view of the deficiencies in the prior art, the present invention develops a method and system for automatically evaluating the efficacy of cosmetics based on facial spectral perception. The present invention can meet the industry's demand for fast and accurate evaluation tools, and can also provide important support for personalized skin care and cosmetics research and development.

[0007] The technical solution to the technical problem solved by the present invention is a method for automatically evaluating the efficacy of cosmetics based on facial spectrum perception, comprising the following steps: S1. Construction Dataset: Collect facial spectra of subjects before and after using cosmetics. The facial spectra include the facial spectra before and after using cosmetics. Then score the two types of facial spectra respectively, and construct a facial spectrum with the facial spectra, the real scores and the typical skin negative sample spectra on the Internet. Dataset; S2, Preprocess the data set: The facial spectrum in the dataset is obtained by performing an affine transformation on its facial feature points to obtain the skin spectrum before using cosmetics. and skin spectrum after using cosmetics ,right The negative sample spectra in the data set are feature extracted to obtain the negative sample spectral features ; S3. Build a cosmetics efficacy evaluation model, which includes a baseline spectral feature extractor, a negative sample encoder, a negative sample weight calculator, spectral awareness attention, a change spectral feature extractor, a skin color evaluator, a fineness evaluator, and a glossiness evaluator. The skin spectrum before applying cosmetics is used. , Skin spectrum after using cosmetics And negative sample spectral features Input into the cosmetic efficacy evaluation model to obtain the predicted score of the facial spectrum after using cosmetics; S4. Calculate the loss of the real score and the predicted score through the loss function, and iterate the parameters in the cosmetics efficacy evaluation model through the Adam optimizer to obtain the trained cosmetics efficacy evaluation model; S5. Input the facial spectrum after using the cosmetics to be evaluated into the trained cosmetics efficacy evaluation model to obtain the final prediction score.

[0008] S1 is as follows: S1.1. The subjects are volunteers of different ages, genders and skin types, including oily, dry, mixed and sensitive skin types, and they have no obvious skin diseases or facial wounds. S1.2. Use high-precision multi-spectral imaging equipment to collect facial spectra. The equipment supports multi-band collection in the range of 400nm-1000nm, with a resolution of 1920×1080 pixels and a spectral band interval of no more than 10nm. S1.3, when collecting facial spectra, use standard D65 light source, set a pure black background, and set the indoor temperature to 22 2℃, relative humidity 50 10%, the subjects washed their faces and waited for 30 minutes to ensure that the facial skin was in a natural state. Spectral data were collected twice, before using cosmetics and after using cosmetics for 30 consecutive days. The cosmetics used were specifically skin care products. S1.4. The facial spectrum is scored for skin color, fineness and glossiness. The score here is the real score of the facial spectrum; The skin color score is based on the L value of the Lab color space, and the pink uniformity and brightness are calculated, with a score range of 1-100. The fineness score is based on the standard deviation of facial features, and the skin roughness parameters are extracted through image processing methods, with a score range of 1-100. The glossiness score is based on the light reflectance of the 500nm-600nm band in the spectrum. The facial glossiness is calculated using a mathematical model, with a score range of 1-100. Different experts score the subjects, and the average value is taken as the actual score after removing the highest and lowest scores. S1.5. Collect multiple skin negative sample data publicly available on the Internet, including severe pigmentation, obviously enlarged pores, dry and dull skin problems, and standardize all skin negative sample spectra.

[0009] S2 is as follows: S2.1. For The facial spectra in the dataset use the 68-point model of the open source Dlib library to extract the key features of the subject's face, covering the corners of the eyes, the tip of the nose, the corners of the mouth, and the facial boundaries. The facial spectra are transformed using affine transformation. Specifically, The affine function completes the affine transformation, outputs the aligned image, and stores its spectral data as vectors and , Indicates the skin spectrum before using cosmetics, Indicates the spectrum of skin after using cosmetics; S2.2, Yes The skin negative sample spectra in the dataset are trained by The autoencoder model extracts features from it and obtains the negative sample spectral features .

[0010] S3 is as follows: The cosmetic efficacy evaluation model includes a baseline spectral feature extractor, a negative sample encoder, a negative sample weight calculator, spectral-aware attention, a variation spectral feature extractor, a skin color evaluator, a fineness evaluator, and a glossiness evaluator; S3.1, the benchmark spectral feature extractor includes a first convolution module, a second convolution module, a third convolution module and an average pooling layer in sequence. The first convolution module includes a convolution layer with a convolution kernel of 3×3 and a step size of 1, a batch normalization layer and a The second convolution module includes a convolution layer with a convolution kernel of 1×1 and a stride of 1; the third convolution module includes a convolution layer with a convolution kernel of 5×5 and a stride of 2, a batch normalization layer and a Activation function layer; Will Input into the benchmark spectral feature extractor, After the first convolution block, the features are obtained ,Will Then input it into the second convolution block to get the features , and then and Input to the third convolution block to get features ,Will and Add the input to the average pooling layer to obtain the baseline spectral features ; S3.2. Negative sample spectral features After normalization, the calculation process is as follows: , in, and Represent the spectral features of negative samples The mean and standard deviation of the dimension, Represents the normalized spectral features of negative samples; S3.3, the negative sample encoder is actually a fully connected neural network, including the first hidden layer, the second hidden layer and the third hidden layer, where the first hidden layer includes a fully connected layer, the output dimension is 128, and the activation function is ; The second hidden layer includes a fully connected layer with an output dimension of 32 and an activation function of ; The third hidden layer includes a fully connected layer with an output dimension of 16 and no activation function; Will Input into the negative sample encoder, pass through the first hidden layer, the second hidden layer and the third hidden layer in turn, and obtain the negative sample encoding feature , , Represents the negative sample encoding feature The dimension of Represents the negative sample encoding feature Middle Dimensional features, ; S3.4. Encoding features of negative samples The features of different dimensions in are input into the negative sample weight calculator to obtain the negative sample weight features , the calculation formula is as follows: , , , in, express Activation function, Represents the negative sample encoding feature Middle Dimensional Features and Dimensional Features The interaction weights, , , , and All for The index of Indicates Dimensional Features The linear weight of Indicates the bias term, set , Representation characteristics and Features The covariance of Representation characteristics and Features The product of the standard deviations, Representation characteristics The variance of Representation characteristics The variance of S3.5. Baseline spectral features and negative sample weight features The spectral perception features are calculated by the spectral perception attention formula , the calculation formula is as follows: , in, represents the first layer weight matrix in the spectral perception attention formula, represents the second-layer weight matrix of the spectral perception attention formula, represents the bias term of the first layer in the spectral-aware attention formula, represents the bias term of the second layer in the spectral-aware attention formula; S3.6, the structure of the variation spectrum feature extractor is the same as the baseline spectrum feature extractor, and the weights of the two are updated independently. Input into the variation spectrum feature extractor to obtain the variation spectrum feature .

[0011] S3.7, the skin color evaluator, the fineness evaluator and the glossiness evaluator have the same structure, all of which include the first fully connected layer, the second fully connected layer and the third fully connected layer. The weights of the three evaluators are updated independently; Among them, the output dimension of the first fully connected layer is 64, using the ReLU activation function; the output dimension of the second fully connected layer is 8, using the ReLU activation function; the output dimension of the third fully connected layer is 1, and no activation function is used; Spectral sensing features and changing spectral characteristics After addition, they are input into the skin color evaluator, fineness evaluator and glossiness evaluator respectively to obtain the predicted skin color scores , prediction fineness score , predict gloss score .

[0012] S4 is as follows: Calculating prediction scores and real rating The loss function , the calculation formula is as follows: , in, , Indicates the total number of samples involved in training, express The index of The learning rate of the Adam optimizer is set to 0.01, the first-order momentum decay coefficient is set to 0.9, and the second-order momentum decay coefficient is set to 0.999.

[0013] The present invention also provides a cosmetics efficacy automatic evaluation system based on facial spectrum perception, and implements a cosmetics efficacy automatic evaluation method based on facial spectrum perception.

[0014] The effects provided in the summary of the invention are only the effects of the embodiments, rather than all the effects of the invention. The above technical solution has the following advantages or beneficial effects: The present invention discloses a method and system for automatically evaluating the efficacy of cosmetics based on facial spectral perception. The method quantitatively evaluates the efficacy of cosmetics through spectral data and deep learning models, thereby achieving accurate prediction of skin color, fineness and glossiness. The method combines spectral feature extraction and attention mechanism to construct an efficient cosmetic efficacy evaluation process. By collecting the facial spectral data of the subjects before and after using cosmetics, as well as the real skin color score, fineness score and glossiness score, a CoSK dataset containing spectral data at different times, real scores and typical skin negative sample spectra is constructed. The CoSK dataset containing spectral data at different times, real scores and typical skin negative samples can provide a rich data source, enhance the generalization ability of the model, and improve the prediction accuracy through real scores. The introduction of negative samples helps to accurately distinguish different skin conditions, and the analysis of the time dimension makes it possible to evaluate the immediate and long-term effects of cosmetics. At the same time, by preprocessing the facial spectra, data consistency is ensured, thereby achieving efficient and automated cosmetic efficacy evaluation; The facial spectral image is subjected to facial feature point alignment and affine transformation to achieve data preprocessing, and the skin spectra before and after the use of cosmetics are obtained. The facial feature point alignment and affine transformation of the facial spectral image can effectively ensure the consistency of the data and reduce the interference caused by facial posture, expression or lighting changes, thereby improving the accuracy of subsequent analysis. This preprocessing method ensures the spatial comparability of the skin spectra before and after the use of cosmetics, so that the model can more accurately capture the real impact of cosmetics on skin condition; By using the existing feature extraction model to extract negative sample spectral features from the skin negative sample spectrum and inputting them into the negative sample encoder, and further extracting negative sample encoding features, the model's ability to understand and identify different skin types can be effectively enhanced by using the existing feature extraction model to extract features from the skin negative sample spectrum and further encode them. This process helps to mine the potential information of skin negative samples, thereby improving the model's ability to distinguish, so that it can more accurately reflect the impact of different skin conditions on the effect when evaluating the efficacy of cosmetics; On this basis, the negative sample weight features are calculated through the negative sample weight calculator to quantify the impact of negative samples on the model. The negative sample weight features can be calculated through the negative sample weight calculator to quantify the impact of negative samples on the model, so that the model can pay more attention to important negative samples during the training process. This mechanism not only improves the model's adaptability to complex skin types, but also effectively reduces the risk of misclassification and enhances its accuracy and reliability in cosmetic efficacy evaluation; In order to enhance the perception of spectral data, the skin spectrum before using cosmetics is input into the baseline spectral feature extractor to extract the baseline spectral features, and combined with the negative sample weight features, the spectral perception features are generated through the spectral perception attention mechanism; at the same time, the skin spectrum after using cosmetics is input into the change spectral feature extractor to extract the change spectral features, and after adding the spectral perception features to the change spectral features, the results are input into the skin color evaluator, fineness evaluator and glossiness evaluator respectively to obtain the corresponding prediction scores. The skin spectrum after using cosmetics is input into the change spectral feature extractor and added with the spectral perception features, which can comprehensively consider the actual changes and perceived effects of cosmetics on skin condition, thereby providing more comprehensive and accurate information for skin color, fineness and glossiness evaluation. This integration method improves the accuracy of the model prediction score, so that it better reflects the true effectiveness of cosmetics.

[0015] The error between the predicted score and the real score of the model is calculated by the designed loss function, and the model parameters are iterated using the Adam optimizer. After training, the model can automatically predict the skin color score, fineness score, and glossiness score based on the facial spectrum data to be tested, thereby achieving an accurate quantitative evaluation of the efficacy of cosmetics. The error between the predicted score and the real score is calculated by the designed loss function, and the Adam optimizer is used for parameter iteration, which can effectively improve the learning efficiency and stability of the model, allowing it to converge quickly and optimize performance during the training process. This process not only ensures that the model can automatically and accurately predict the skin color, fineness, and glossiness scores, but also achieves an accurate quantitative evaluation of the efficacy of cosmetics, providing users with a reliable reference.

[0016] In summary, the present invention has the characteristics of high precision, automation and wide adaptability, and provides a new technical solution for the evaluation of cosmetic efficacy. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.

[0018] Figure 1 It is a schematic diagram of the structure of the cosmetic efficacy evaluation model in the present invention. DETAILED DESCRIPTION

[0019] In order to clearly illustrate the technical features of the present invention, the present invention is described in detail below through specific implementation methods and in conjunction with the accompanying drawings. The following disclosure provides many different embodiments or examples for implementing different structures of the present invention. In order to simplify the disclosure of the present invention, the components and settings of specific examples are described below.

[0020] Example 1 A method for automatically evaluating cosmetic efficacy based on facial spectrum perception comprises the following steps: S1. Construction Dataset: Collect facial spectra of subjects before and after using cosmetics. The facial spectra include the facial spectra before and after using cosmetics. Then score the two types of facial spectra respectively, and construct a facial spectrum with the facial spectra, the real scores and the typical skin negative sample spectra on the Internet. Datasets; S2, yes Preprocess the data set: The facial spectrum in the dataset is obtained by performing an affine transformation on its facial feature points to obtain the skin spectrum before using cosmetics. and skin spectrum after using cosmetics ,right The negative sample spectra in the data set are feature extracted to obtain the negative sample spectral features ; S3. Build a cosmetics efficacy evaluation model, which includes a baseline spectral feature extractor, a negative sample encoder, a negative sample weight calculator, spectral awareness attention, a change spectral feature extractor, a skin color evaluator, a fineness evaluator, and a glossiness evaluator. The skin spectrum before applying cosmetics is used. , Skin spectrum after using cosmetics And negative sample spectral features Input into the cosmetic efficacy evaluation model to obtain the predicted score of the facial spectrum after using cosmetics; S4. Calculate the loss of the real score and the predicted score through the loss function, and iterate the parameters in the cosmetics efficacy evaluation model through the Adam optimizer to obtain the trained cosmetics efficacy evaluation model; S5. Input the facial spectrum after using the cosmetics to be evaluated into the trained cosmetics efficacy evaluation model to obtain the final prediction score.

[0021] S1 is as follows: S1.1. The subjects are volunteers of different ages, genders and skin types, including oily, dry, mixed and sensitive skin types, and they have no obvious skin diseases or facial wounds. S1.2. Use high-precision multi-spectral imaging equipment to collect facial spectra. The equipment supports multi-band collection in the range of 400nm-1000nm, with a resolution of 1920×1080 pixels and a spectral band interval of no more than 10nm. S1.3, when collecting facial spectra, use standard D65 light source, set a pure black background, and set the indoor temperature to 22 2℃, relative humidity 50 10%, the subjects washed their faces and waited for 30 minutes to ensure that the facial skin was in a natural state. Spectral data were collected twice, before using cosmetics and after using cosmetics for 30 consecutive days. The cosmetics used were specifically skin care products. S1.4. The facial spectrum is scored for skin color, fineness and glossiness. The score here is the real score of the facial spectrum; The skin color score is based on the L value of the Lab color space, and the pink uniformity and brightness are calculated, with a score range of 1-100. The fineness score is based on the standard deviation of facial features, and the skin roughness parameters are extracted through image processing methods, with a score range of 1-100. The glossiness score is based on the light reflectance of the 500nm-600nm band in the spectrum. The facial glossiness is calculated using a mathematical model, with a score range of 1-100. Different experts score the subjects, and the average value is taken as the actual score after removing the highest and lowest scores. S1.5. Collect multiple skin negative sample data publicly available on the Internet, including severe pigmentation, obviously enlarged pores, dry and dull skin problems, and standardize all skin negative sample spectra.

[0022] S2 is as follows: S2.1. For The facial spectra in the dataset use the 68-point model of the open source Dlib library to extract the key features of the subject's face, covering the corners of the eyes, the tip of the nose, the corners of the mouth, and the facial boundaries. The facial spectra are transformed using affine transformation. Specifically, The affine function completes the affine transformation, outputs the aligned image, and stores its spectral data as vectors and , Indicates the skin spectrum before using cosmetics, Indicates the spectrum of skin after using cosmetics; S2.2, Yes The skin negative sample spectra in the dataset are trained by The autoencoder model extracts features from it and obtains the negative sample spectral features .

[0023] S3 is as follows: The cosmetic efficacy evaluation model includes a baseline spectral feature extractor, a negative sample encoder, a negative sample weight calculator, spectral-aware attention, a variation spectral feature extractor, a skin color evaluator, a fineness evaluator, and a glossiness evaluator; S3.1, the benchmark spectral feature extractor includes a first convolution module, a second convolution module, a third convolution module and an average pooling layer in sequence. The first convolution module includes a convolution layer with a convolution kernel of 3×3 and a step size of 1, a batch normalization layer and a The second convolution module includes a convolution layer with a convolution kernel of 1×1 and a stride of 1; the third convolution module includes a convolution layer with a convolution kernel of 5×5 and a stride of 2, a batch normalization layer and a Activation function layer; Will Input into the benchmark spectral feature extractor, After the first convolution block, the features are obtained ,Will Then input it into the second convolution block to get the features , and then and Input to the third convolution block to get features ,Will and Add the input to the average pooling layer to obtain the baseline spectral features ; S3.2. Negative sample spectral features After normalization, the calculation process is as follows: , in, and Represent the spectral features of negative samples The mean and standard deviation of the dimension, Represents the normalized spectral features of negative samples; S3.3, the negative sample encoder is actually a fully connected neural network, including the first hidden layer, the second hidden layer and the third hidden layer, where the first hidden layer includes a fully connected layer, the output dimension is 128, and the activation function is ; The second hidden layer includes a fully connected layer with an output dimension of 32 and an activation function of ; The third hidden layer includes a fully connected layer with an output dimension of 16 and no activation function; Will Input into the negative sample encoder, pass through the first hidden layer, the second hidden layer and the third hidden layer in turn, and obtain the negative sample encoding feature , , Represents the negative sample encoding feature The dimension of Represents the negative sample encoding feature Middle Dimensional features, ; S3.4. Encoding features of negative samples The features of different dimensions in are input into the negative sample weight calculator to obtain the negative sample weight features , the calculation formula is as follows: , , , in, express Activation function, Represents the negative sample encoding feature Middle Dimensional Features and Dimensional Features The interaction weights, , , , and All for The index of Indicates Dimensional Features The linear weight of Indicates the bias term, set , Representation characteristics and Features The covariance of Representation characteristics and Features The product of the standard deviations, Representation characteristics The variance of Representation characteristics The variance of S3.5. Baseline spectral features and negative sample weight features The spectral perception features are calculated by the spectral perception attention formula , the calculation formula is as follows: , in, represents the first layer weight matrix in the spectral perception attention formula, represents the second-layer weight matrix of the spectral perception attention formula, represents the bias term of the first layer in the spectral-aware attention formula, represents the bias term of the second layer in the spectral-aware attention formula; S3.6, the structure of the variation spectrum feature extractor is the same as the baseline spectrum feature extractor, and the weights of the two are updated independently. Input into the variation spectrum feature extractor to obtain the variation spectrum feature .

[0024] S3.7, the skin color evaluator, the fineness evaluator and the glossiness evaluator have the same structure, all of which include the first fully connected layer, the second fully connected layer and the third fully connected layer. The weights of the three evaluators are updated independently; Among them, the output dimension of the first fully connected layer is 64, using the ReLU activation function; the output dimension of the second fully connected layer is 8, using the ReLU activation function; the output dimension of the third fully connected layer is 1, and no activation function is used; Spectral sensing features and changing spectral characteristics After addition, they are input into the skin color evaluator, fineness evaluator and glossiness evaluator respectively to obtain the predicted skin color scores , prediction fineness score , predict gloss score .

[0025] S4 is as follows: Calculating prediction scores and real rating The loss function , the calculation formula is as follows: , in, , Indicates the total number of samples involved in training, express The index of The learning rate of the Adam optimizer is set to 0.01, the first-order momentum decay coefficient is set to 0.9, and the second-order momentum decay coefficient is set to 0.999.

[0026] Example 2 A cosmetic efficacy automatic evaluation system based on facial spectrum perception, which implements a cosmetic efficacy automatic evaluation method based on facial spectrum perception, includes the following modules: Data collection module: collects facial spectra, including facial spectra before and after using cosmetics, and constructs a facial spectrum by combining the facial spectra to obtain the true score and typical skin negative sample spectra on the Internet. Datasets; Data preprocessing module: The dataset uses facial spectra before and after makeup application, as well as skin negative sample spectra for preprocessing; Cosmetics efficacy evaluation module: including reference spectral feature extractor, negative sample encoder, negative sample weight calculator, spectral perception attention, change spectral feature extractor, skin color evaluator, fineness evaluator and glossiness evaluator. The output of the data preprocessing module is input into the cosmetics efficacy evaluation module for skin color, fineness and glossiness evaluation. Optimization module: The parameters in the cosmetics efficacy evaluation module are iterated through the loss function and Adam optimizer to optimize the cosmetics efficacy evaluation module.

[0027] Example 3 In order to better demonstrate the technical effect of the present invention, the method of the present invention is used to conduct experiments, as follows: Recruit 120 volunteers, covering different age groups (18-25 years old, 26-35 years old, 36-45 years old, and over 46 years old) and different genders to ensure data diversity. Determine skin type according to the Fitzpatrick skin classification standard to ensure that the subjects cover common types such as oily, dry, mixed and sensitive skin. The screening conditions ensure that the subjects have no obvious skin diseases or facial wounds to avoid affecting the spectral data collection; Use high-precision multispectral imaging equipment that supports multi-band acquisition in the range of 400nm-1000nm. The equipment resolution must reach 1920×1080 pixels, and the spectral band interval must not exceed 10nm. Use a standard D65 light source (6500K, color rendering index>95) to avoid interference from ambient light; set a pure black background to prevent reflection interference; maintain the indoor temperature at 22±2℃, and the relative humidity at 50±10%; wait for 30 minutes after washing the face to ensure that the facial skin is in a natural state, and collect spectral data twice, before using cosmetics and 30 days after using cosmetics; Ask experts in related fields to score the facial spectra. The scores are real scores, which are used to calculate the loss with the predicted scores obtained by the cosmetics efficacy evaluation model to adjust the parameters of the cosmetics efficacy evaluation model and realize the training of the cosmetics efficacy evaluation model. Collect 36 negative skin sample data published on the Internet, including skin with severe pigmentation, obvious enlarged pores, dry and dull skin. The spectral data must fully cover the range of 400nm-1000nm to ensure high reference value. Standardize all negative sample data and unify the spectral reflectance range to 0-1. Based on the above data, The data set will then The dataset is divided into training set and test set in a ratio of 8:2.

[0028] right After the data in the dataset are processed, the data in the training set are input into the cosmetics efficacy evaluation model for training, and then the cosmetics efficacy evaluation model is optimized. Finally, the data in the test set are input into the optimized model to obtain the final evaluation results. The final evaluation results are shown in Table 1. At the same time, the other two methods are used for evaluation and comparison; Table 1 Comparison of evaluation results between the method of the present invention and the existing method Baseline model A is the SGS cosmetics evaluation model, and baseline model B is the 3D melanin epidermis model. In terms of skin color scoring, the performance of the model of the present invention on the test set is significantly better than that of the baseline model, especially when processing complex skin color samples, showing higher accuracy and consistency; the results of the fineness scoring show that the patented model can better identify subtle changes in skin texture, thanks to its effective learning of negative sample features, while the baseline model is weaker in this regard; the improvement in glossiness scoring further verifies the advantage of the patented model in capturing skin gloss, especially in the post-use effect evaluation, which has a clear leading advantage over the baseline model.

[0029] Although the above describes the specific implementation mode of the invention in conjunction with the drawings, it is not intended to limit the scope of protection of the invention. Based on the technical solution of the present invention, various modifications or variations that can be made by those skilled in the art without creative work are still within the scope of protection of the present invention.

Claims

1. A method for automatic evaluation of cosmetic efficacy based on facial spectrum perception, characterized in that: The following steps are involved: S1. Construction Dataset: Collect facial spectra of subjects before and after using cosmetics. The facial spectra include the facial spectra before and after using cosmetics. Then score the two types of facial spectra respectively, and construct a facial spectrum with the facial spectra, the real scores and the typical skin negative sample spectra on the Internet. Datasets; S2, yes Preprocess the data set: The facial spectrum in the dataset is obtained by performing affine transformation on its facial feature points to obtain the skin spectrum before using cosmetics. and skin spectrum after using cosmetics ,right The negative sample spectra in the data set are feature extracted to obtain the negative sample spectral features ; S3. Build a cosmetics efficacy evaluation model, which includes a baseline spectral feature extractor, a negative sample encoder, a negative sample weight calculator, spectral awareness attention, a change spectral feature extractor, a skin color evaluator, a fineness evaluator, and a glossiness evaluator. The skin spectrum before applying cosmetics is used. , Skin spectrum after using cosmetics And negative sample spectral features Input into the cosmetic efficacy evaluation model to obtain the predicted score of the facial spectrum after using cosmetics; S4. Calculate the loss of the real score and the predicted score through the loss function, and iterate the parameters in the cosmetics efficacy evaluation model through the Adam optimizer to obtain the trained cosmetics efficacy evaluation model; S5. Input the facial spectrum after using the cosmetics to be evaluated into the trained cosmetics efficacy evaluation model to obtain the final prediction score.

2. The method for automatic evaluation of cosmetic efficacy based on facial spectrum perception according to claim 1, characterized in that: S1 is as follows: S1.

1. The subjects are volunteers of different ages, genders and skin types, including oily, dry, mixed and sensitive skin types, and they have no obvious skin diseases or facial wounds. S1.

2. Use high-precision multi-spectral imaging equipment to collect facial spectra. The equipment supports multi-band collection in the range of 400nm-1000nm, with a resolution of 1920×1080 pixels and a spectral band interval of no more than 10nm. S1.3, when collecting facial spectra, use standard D65 light source, set a pure black background, and set the indoor temperature to 22 2℃, relative humidity 50 10%, the subjects washed their faces and waited for 30 minutes to ensure that the facial skin was in a natural state. Spectral data were collected twice, before using cosmetics and after using cosmetics for 30 consecutive days. The cosmetics used were specifically skin care products. S1.

4. The facial spectrum is scored for skin color, fineness and glossiness. The score here is the real score of the facial spectrum; The skin color score is based on the L value of the Lab color space, and the pink uniformity and brightness are calculated, with a score range of 1-100. The fineness score is based on the standard deviation of facial features, and the skin roughness parameters are extracted through image processing methods, with a score range of 1-100. The glossiness score is based on the light reflectance of the 500nm-600nm band in the spectrum. The facial glossiness is calculated using a mathematical model, with a score range of 1-100. Different experts score the subjects, and the average value is taken as the actual score after removing the highest and lowest scores. S1.

5. Collect multiple skin negative sample data publicly available on the Internet, including severe pigmentation, obviously enlarged pores, dry and dull skin problems, and standardize all skin negative sample spectra.

3. The method for automatically evaluating the efficacy of cosmetics based on facial spectrum perception according to claim 2, wherein S2 The details are as follows: S2.

1. For The facial spectra in the dataset use the 68-point model of the open source Dlib library to extract the key features of the subject's face, covering the corners of the eyes, the tip of the nose, the corners of the mouth, and the facial boundaries. The facial spectra are transformed using affine transformation. Specifically, The affine function completes the affine transformation, outputs the aligned image, and stores its spectral data as vectors and , Indicates the skin spectrum before using cosmetics, Indicates the spectrum of skin after using cosmetics; S2.2, Yes The skin negative sample spectra in the dataset are trained by The autoencoder model extracts features from it and obtains the negative sample spectral features .

4. The method for automatic evaluation of cosmetic efficacy based on facial spectrum perception according to claim 3, characterized in that: S3 is as follows: The cosmetic efficacy evaluation model includes a baseline spectral feature extractor, a negative sample encoder, a negative sample weight calculator, spectral-aware attention, a variation spectral feature extractor, a skin color evaluator, a fineness evaluator, and a glossiness evaluator; S3.1, the benchmark spectral feature extractor includes a first convolution module, a second convolution module, a third convolution module and an average pooling layer in sequence. The first convolution module includes a convolution layer with a convolution kernel of 3×3 and a step size of 1, a batch normalization layer and a The second convolution module includes a convolution layer with a convolution kernel of 1×1 and a stride of 1; the third convolution module includes a convolution layer with a convolution kernel of 5×5 and a stride of 2, a batch normalization layer and a Activation function layer; Will Input into the benchmark spectral feature extractor, After the first convolution block, the features are obtained ,Will Then input it into the second convolution block to get the features , and then and Input to the third convolution block to get features ,Will and Add the input to the average pooling layer to obtain the baseline spectral features ; S3.

2. Negative sample spectral features After normalization, the calculation process is as follows: , in, and Represent the spectral features of negative samples The mean and standard deviation of the dimension, Represents the normalized spectral features of negative samples; S3.3, the negative sample encoder is actually a fully connected neural network, including the first hidden layer, the second hidden layer and the third hidden layer, where the first hidden layer includes a fully connected layer, the output dimension is 128, and the activation function is ; The second hidden layer includes a fully connected layer with an output dimension of 32 and an activation function of ; The third hidden layer includes a fully connected layer with an output dimension of 16 and no activation function; Will Input into the negative sample encoder, pass through the first hidden layer, the second hidden layer and the third hidden layer in turn, and obtain the negative sample encoding feature , , Represents the negative sample encoding feature The dimension of Represents the negative sample encoding feature Middle Dimensional features, ; S3.

4. Encoding features of negative samples The features of different dimensions in are input into the negative sample weight calculator to obtain the negative sample weight features , the calculation formula is as follows: , , , in, express Activation function, Represents the negative sample encoding feature Middle Dimensional Features and Dimensional Features The interaction weights, , , , and All for The index of Indicates Dimensional Features The linear weight of Indicates the bias term, set , Representation characteristics and Features The covariance of Representation characteristics and Features The product of the standard deviations, Representation characteristics The variance of Representation characteristics The variance of S3.

5. Baseline spectral features and negative sample weight features The spectral perception features are calculated by the spectral perception attention formula , the calculation formula is as follows: , in, represents the first layer weight matrix in the spectral perception attention formula, represents the second-layer weight matrix of the spectral perception attention formula, represents the bias term of the first layer in the spectral-aware attention formula, represents the bias term of the second layer in the spectral-aware attention formula; S3.6, the structure of the variation spectrum feature extractor is the same as the baseline spectrum feature extractor, and the weights of the two are updated independently. Input into the variation spectrum feature extractor to obtain the variation spectrum feature .

5. The method for automatic evaluation of cosmetic efficacy based on facial spectrum perception according to claim 4 is characterized by: S3.7, the skin color evaluator, the fineness evaluator and the glossiness evaluator have the same structure, all of which include the first fully connected layer, the second fully connected layer and the third fully connected layer. The weights of the three evaluators are updated independently; Among them, the output dimension of the first fully connected layer is 64, using the ReLU activation function; the output dimension of the second fully connected layer is 8, using the ReLU activation function; the output dimension of the third fully connected layer is 1, and no activation function is used; Spectral sensing features and changing spectral characteristics After addition, they are input into the skin color evaluator, fineness evaluator and glossiness evaluator respectively to obtain the predicted skin color scores , prediction fineness score , predict gloss score .

6. The method for automatic evaluation of cosmetic efficacy based on facial spectrum perception according to claim 5, characterized in that: S4 is as follows: Calculating prediction scores and real rating The loss function , the calculation formula is as follows: , in, , Indicates the total number of samples involved in training, express The index of The learning rate of the Adam optimizer is set to 0.01, the first-order momentum decay coefficient is set to 0.9, and the second-order momentum decay coefficient is set to 0.

999.

7. An automatic cosmetic efficacy evaluation system based on facial spectrum perception, characterized by: Execute a method for automatically evaluating the efficacy of cosmetics based on facial spectrum perception as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Method for evaluating cosmetic effects of cosmetic product on skin

    CN105324068A

  • Multi-spectral skin auxiliary diagnosis system based on multi-model fusion

    CN118230938A

  • Luster lack state evaluation method for lip and luster lack evaluation model for lip

    JP2017164458A

  • Makeup color simulation apparatus and method

    US20150145884A1

  • Precision skincare system and method

    WO2022132735A1

Cited By

  • Cosmetic effect evaluation method and device based on image analysis

    CN120635062A

  • Cosmetic efficacy evaluation method and device based on image analysis

    CN120635062B