Skin evaluation method and device based on convolutional neural network and Kmeans clustering algorithm, equipment and medium
The skin assessment method through the convolutional neural network and Kmeans clustering algorithm solves the one-sided and subjective problems of skin assessment results in the existing technology, achieves a comprehensive assessment of multi-dimensional skin characteristics, and improves the accuracy and scientificity of the assessment. Ensure consistency and reliability of assessment results.
Patent Information
- Application Number
- CN202410892961.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-04
- Publication Date
- 2024-10-29
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing skin feature assessment methods mainly focus on the analysis of a single feature, resulting in one-sided assessment results that lack accuracy and reliability. Especially when the acne growth cycles and conditions of different individuals vary greatly, there is a lack of detailed assessment standards. And there is a high degree of subjectivity.
A skin assessment method based on convolutional neural network and Kmeans clustering algorithm is adopted to obtain skin sample data, perform feature extraction, dimensionality reduction and normalization processing, and combine it with KMeans clustering algorithm to conduct multi-dimensional data analysis and optimize the assessment model to improve the assessment results. accuracy and scientificity.
Through multi-dimensional data analysis and comprehensive evaluation, we ensure the accuracy and scientificity of skin assessment results, reduce subjectivity, improve the consistency and reliability of assessment results, optimize data processing efficiency, and achieve real-time skin feature assessment.
Smart Images

Figure CN118866352A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of skin feature assessment, and in particular to a skin assessment method, device, equipment and medium based on a convolutional neural network and a Kmeans clustering algorithm. Background Art
[0002] As personal health has attracted more and more attention, the assessment and management of skin has become increasingly important. As the largest organ, the skin presents various metabolites and changes under internal and external stimuli. At present, machine learning is gradually being used to provide auxiliary information for the assessment of skin characteristics.
[0003] Existing skin feature assessment methods mainly focus on the analysis of a single feature and are unable to comprehensively assess the overall condition of the skin, which easily leads to one-sided assessment results. For different individuals with large differences in acne growth cycles and conditions, there is a lack of detailed assessment criteria and they usually rely on manual screening, which is highly subjective. The consistency between different assessors is poor, resulting in the lack of accuracy and reliability of the assessment results. Therefore, there is an urgent need for a method that can comprehensively evaluate multidimensional skin features to improve the accuracy and scientificity of skin assessment. Summary of the invention
[0004] The present invention provides a skin assessment method based on a convolutional neural network and a Kmeans clustering algorithm to solve the problem that skin assessment results in the prior art lack accuracy and reliability.
[0005] In a first aspect, an embodiment of the present invention provides a skin assessment method based on a convolutional neural network and a Kmeans clustering algorithm, comprising:
[0006] Obtain skin sample data of several persons to be evaluated;
[0007] Inputting the skin sample data into a pre-trained skin evaluation model and outputting a skin score value;
[0008] The skin score values are clustered and analyzed using the KMeans clustering algorithm to obtain the skin evaluation results of the person to be evaluated.
[0009] Furthermore, the step of inputting the skin sample data into a pre-trained skin evaluation model and outputting a skin score value comprises:
[0010] Inputting the skin sample data into a pre-trained skin evaluation model, and performing normalization processing on the skin sample data;
[0011] Based on a convolutional neural network, extracting features from the skin image data in the skin sample data to obtain a feature vector;
[0012] The eigenvector is subjected to dimensionality reduction by using a principal component analysis method to obtain a eigenvector after dimensionality reduction;
[0013] Calculate the skin score value of the feature vector after dimension reduction.
[0014] Furthermore, the skin sample data includes information of the person to be evaluated, skin characteristic data, skin images and skin test data.
[0015] Furthermore, the normalizing the skin sample data includes:
[0016] Calculate the mean and standard deviation of the skin sample data;
[0017] Each data point in the skin sample data is normalized according to the mean value and the standard deviation.
[0018] Furthermore, the dimensionality reduction of the feature vector by using principal component analysis to obtain the reduced-dimensional feature vector includes:
[0019] Based on the feature vector, a feature mean vector is calculated;
[0020] Calculating a covariance matrix according to the characteristic mean vector;
[0021] Performing eigenvalue decomposition on the covariance matrix to obtain an eigenvector matrix;
[0022] Based on the eigenvector, the eigenmean vector and the eigenvector matrix, a eigenvector after dimension reduction is obtained.
[0023] Furthermore, the step of calculating the skin score value of the feature vector after dimension reduction includes:
[0024] Standardizing the eigenvector after dimension reduction, and assigning a weight to each standardized eigenvalue;
[0025] A skin score value is calculated based on the standardized feature value and the weight.
[0026] Furthermore, the method also includes optimizing the skin assessment model;
[0027] The optimizing the skin assessment model comprises:
[0028] Obtain multiple base models, train each of the base models and perform feature selection;
[0029] Performing hyperparameter optimization on each of the base models through cross validation;
[0030] Performing model integration on all the base models to obtain an optimized model;
[0031] An evaluation index of the optimized model is calculated, and the optimized model is evaluated based on the evaluation index to obtain an evaluation result.
[0032] In a second aspect, an embodiment of the present invention provides a skin assessment device based on a convolutional neural network and a Kmeans clustering algorithm, comprising:
[0033] A data acquisition module, used to acquire skin sample data of several persons to be evaluated;
[0034] A skin evaluation module, used to input the skin sample data into a pre-trained skin evaluation model and output a skin score value;
[0035] The cluster analysis module is used to perform cluster analysis on the skin score value by using the KMeans clustering algorithm to obtain the skin evaluation result of the person to be evaluated.
[0036] In a third aspect, an embodiment of the present invention provides an electronic device, including:
[0037] Memory for storing computer programs;
[0038] A processor, configured to execute the computer program;
[0039] Wherein, when the processor executes the computer program, it implements the skin assessment method based on convolutional neural network and Kmeans clustering algorithm as described in any one of the first aspects above.
[0040] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed, the skin assessment method based on a convolutional neural network and a Kmeans clustering algorithm as described in any one of the first aspects above is implemented.
[0041] Compared with the prior art, the skin assessment method based on a convolutional neural network and a Kmeans clustering algorithm provided in an embodiment of the present invention has the beneficial effect of obtaining skin sample data of several persons to be assessed, inputting the skin sample data into a pre-trained skin assessment model, outputting a skin score value, and performing cluster analysis on the skin score value using the KMeans clustering algorithm to obtain a skin assessment result of the person to be assessed, and ensuring the accuracy and scientificity of the skin assessment result through multidimensional data analysis and comprehensive evaluation. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical features of the embodiments of the present invention, the drawings required for use in the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0043] Figure 1 It is a flowchart of an embodiment of a skin assessment method based on a convolutional neural network and a Kmeans clustering algorithm provided by the present invention;
[0044] Figure 2 It is a structural schematic diagram of an embodiment of a skin assessment device based on a convolutional neural network and a Kmeans clustering algorithm provided by the present invention;
[0045] Figure 3 It is a structural schematic diagram of an embodiment of an electronic device provided by the present invention. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.
[0047] In a first aspect, an embodiment of the present invention provides a skin assessment method based on a convolutional neural network and a Kmeans clustering algorithm, see Figure 1 , is a flow chart of an embodiment of a skin assessment method based on a convolutional neural network and a Kmeans clustering algorithm provided by the present invention.
[0048] like Figure 1 As shown, the method comprises the following steps:
[0049] S1: Obtain skin sample data of several persons to be evaluated;
[0050] S2: inputting the skin sample data into a pre-trained skin evaluation model and outputting a skin score value;
[0051] S3: Perform cluster analysis on the skin score values using a KMeans clustering algorithm to obtain a skin assessment result of the person to be assessed.
[0052] In the specific implementation, the skin sample data of the person to be evaluated is first collected. The skin sample data includes the information of the person to be evaluated, skin feature data, skin images and skin test data, etc., which are used as the input of the skin evaluation model. The pre-trained skin evaluation model will perform data normalization, feature extraction and other operations, and finally obtain the skin score value. The KMeans algorithm is used to perform cluster analysis on the skin score value. The results of the cluster analysis will divide the skin score values of the person to be evaluated into several different clusters, each cluster representing a skin state or type.
[0053] For example, the number of clusters k is first determined, and then the cluster centers μ are initialized. i , iteratively assign data points to the cluster corresponding to the cluster center closest to it. For each cluster, recalculate the new cluster center and repeat the iteration until the cluster center converges. The new cluster center is the mean of all data points in the cluster. The formula is as follows:
[0054]
[0055] Among them, C i represents the i-th cluster, μ i represents the center of the ith cluster.
[0056] Finally, the clustered people to be evaluated are grouped randomly or based on certain specific rules for subsequent human efficacy testing of the acne removal project, and the grouping is displayed using visualization tools, such as Matplotlib and Seaborn.
[0057] In summary, the present application obtains skin sample data of several persons to be evaluated, inputs the skin sample data into a pre-trained skin evaluation model, outputs a skin score value, and uses the KMeans clustering algorithm to perform cluster analysis on the skin score value to obtain the skin evaluation result of the person to be evaluated. Through standardized processing and comprehensive multidimensional data analysis, the consistency and comprehensiveness of the collected skin feature data are ensured, and the impact of data quality on the evaluation results is reduced. Through multidimensional data analysis and comprehensive evaluation, the accuracy and scientificity of the skin evaluation results can be ensured. By optimizing algorithms and models, the efficiency of data processing and analysis can be improved, the consumption of computing resources can be reduced, and it can be ensured that the system can perform skin feature evaluation in real time.
[0058] In an optional implementation, the step S2 includes:
[0059] S21: inputting the skin sample data into a pre-trained skin evaluation model, and performing normalization processing on the skin sample data;
[0060] S22: Based on a convolutional neural network, extract features from the skin image data in the skin sample data to obtain a feature vector;
[0061] S23: reducing the dimension of the feature vector by using a principal component analysis method to obtain a feature vector after dimension reduction;
[0062] S24: Calculate the skin score value of the feature vector after dimension reduction.
[0063] Specifically, the skin sample data is input into a pre-trained skin evaluation model. The skin evaluation model first normalizes the skin sample data to adjust the data to the same scale for the calculation and analysis of the subsequent model. Then, a convolutional neural network is used to extract features from the image part of the skin sample data. For example, a pre-trained ResNet-50 convolutional neural network can be used. The skin image is input into the ResNet-50 model. The model automatically extracts image features and outputs a feature vector. The feature vector contains detailed information about the skin image. Please refer to the following:
[0064] f = ResNet50(I);
[0065] Among them, I is the input skin image, and f is the feature vector extracted by ResNet-50.
[0066] Since the dimensionality of the original feature vector is very high, directly using it for evaluation may lead to problems such as high computational complexity and poor model generalization ability. Therefore, the principal component analysis (PCA) method is used to reduce the dimensionality of the feature vector to obtain the reduced dimensionality feature vector. The reduced dimensionality feature vector is combined with the scoring algorithm in the skin evaluation model to calculate the skin score value of the skin sample. The skin score value can reflect the overall condition of the skin, such as skin texture, skin color, wrinkles, acne, etc., and provide a reference for subsequent skin care recommendations or treatments.
[0067] In an optional embodiment, the skin sample data includes information of the person to be evaluated, skin characteristic data, skin images and skin test data.
[0068] Specifically, the skin sample data includes information of the person to be evaluated, skin characteristic data, skin images and skin test data, wherein the information of the person to be evaluated may include age, gender, place of residence, eating habits, etc., the skin characteristic data may be collected through a questionnaire, including skin type, allergy history, acne history, etc., the skin image is a high-quality skin image taken by an electronic device, the skin test data is obtained through a skin detection instrument or other equipment, and may include skin moisture content, skin oil content, skin elasticity, etc., the skin sample data may be selected according to actual needs and is not specifically limited here.
[0069] In an optional implementation, the normalizing the skin sample data includes:
[0070] Calculate the mean and standard deviation of the skin sample data;
[0071] Each data point in the skin sample data is normalized according to the mean value and the standard deviation.
[0072] Specifically, the skin test data in the skin sample data represents various properties of the skin. In order to conduct effective analysis and comparison, the skin test data needs to be normalized, that is, the skin test data needs to be converted to a uniform scale or range. First, the average value of the skin test data needs to be calculated. The specific formula is as follows:
[0073]
[0074] Where μ1 represents the mean value, N represents the number of data points in the skin test data, and x i represents the i-th data point in the skin test data.
[0075] Next, calculate the standard deviation σ of the skin sample data. The standard deviation is a measure of the difference between a data point and its mean, indicating the degree of dispersion of the data. The specific formula is as follows:
[0076]
[0077] According to the calculated mean value and standard deviation, the following formula is used for normalization:
[0078]
[0079] Among them, x' represents the normalized value.
[0080] In an optional implementation, the step S23 includes:
[0081] Based on the feature vector, a feature mean vector is calculated;
[0082] Calculating a covariance matrix according to the characteristic mean vector;
[0083] Performing eigenvalue decomposition on the covariance matrix to obtain an eigenvector matrix;
[0084] Based on the eigenvector, the eigenmean vector and the eigenvector matrix, a eigenvector after dimension reduction is obtained.
[0085] Specifically, the principal component analysis method is used to project the input eigenvector into the principal component space to obtain the eigenvector after dimensionality reduction. First, the feature mean vector is calculated based on the eigenvector. The feature mean vector is a vector with the same dimension as the eigenvector, in which each element is the average value of the corresponding feature. After obtaining the feature mean vector, the covariance matrix needs to be calculated. The covariance matrix describes the correlation between each feature. The calculation process of the covariance matrix is as follows:
[0086]
[0087] Where C represents the covariance matrix, K represents the number of eigenvectors, μ2 represents the eigenmean vector, and y i represents the i-th eigenvector.
[0088] The covariance matrix C is subjected to eigenvalue decomposition to obtain an eigenvector matrix. Based on the eigenvector, the eigenmean vector and the eigenvector matrix, the eigenvector after dimensionality reduction is obtained. The specific formula is as follows:
[0089] z=W T (x-μ2);
[0090] Among them, z represents the eigenvector after dimensionality reduction, W represents the eigenvector matrix, x represents the input eigenvector, and μ2 represents the eigenmean vector.
[0091] In an optional implementation, the step S24 includes:
[0092] Standardizing the eigenvector after dimension reduction, and assigning a weight to each standardized eigenvalue;
[0093] A skin score value is calculated based on the standardized feature value and the weight.
[0094] Specifically, the eigenvector after dimensionality reduction needs to be standardized for the next step of processing. Standardization can scale the data so that it falls into a small specific interval. A weight is assigned to each standardized eigenvalue according to the actual application and needs. Based on the standardized eigenvalue and weight, the skin score value is calculated using the following formula:
[0095]
[0096] Among them, S represents the skin score value, z i represents the standardized eigenvalue, w i represents the weight corresponding to each eigenvalue, and n represents the number of eigenvalues.
[0097] In an optional embodiment, the method further comprises optimizing the skin assessment model;
[0098] The optimizing the skin assessment model comprises:
[0099] Obtain multiple base models, train each of the base models and perform feature selection;
[0100] Performing hyperparameter optimization on each of the base models through cross validation;
[0101] Performing model integration on all the base models to obtain an optimized model;
[0102] An evaluation index of the optimized model is calculated, and the optimized model is evaluated based on the evaluation index to obtain an evaluation result.
[0103] Specifically, firstly, multiple different types of base models are selected, and these base models have different learning mechanisms and assumptions, so that they can complement each other's advantages when integrated. For example, the base models may include decision trees, random forests, support vector machines, and neural networks. Then, the base models are trained, and feature selection is performed using methods such as recursive feature elimination (RFE). The importance of each feature is calculated, and the least important feature is deleted and the model is retrained. The above operation is repeated until the predetermined number of features is reached, so that the most important features can be selected to reduce the complexity of the model. For example, assuming that the predetermined number of features is 5, there are 10 features initially. After the RFE process, the 5 most important features are finally selected. These 5 features will be used for training and prediction of the final model.
[0104] It can be understood that hyperparameters are parameters that need to be set before the model is trained. These parameters have an important impact on the performance of the model. Cross-validation is a method for evaluating model performance. The data set is divided into multiple parts, and the model is trained on each part and its performance is tested. Grid search is a method for finding the best hyperparameters by searching every possible combination in the hyperparameter space. It evaluates all parameter combinations through a predetermined grid and finds the combination that performs best on the validation set. Through cross-validation and grid search, the performance of the model on different data subsets can be evaluated and the best hyperparameter combination can be selected. Exemplarily, for K-fold cross-validation, the data set is divided into k subsets, one subset is selected as the validation set, and the remaining ones are used as the training set. K-fold cross-validation is performed, the model is trained and tested on the validation set, and the average of all test results is calculated as the final performance of the model. The model parameters are adjusted and cross-validation is repeated until the optimal parameter combination is found. When using grid search, the search space for hyperparameters is first defined, and different hyperparameters are combined one by one. Exemplarily, for a support vector machine (SVM) model, its hyperparameter search space is defined as follows:
[0105] Penalty parameter (C): {0.1, 1, 10, 100};
[0106] Kernel function parameters (γ): {0.01, 0.1, 1, 10};
[0107] Use the grid search method to combine different C and γ one by one, train the model and evaluate the performance, and select the combination with the best performance. In the specific implementation, other methods such as random search can also be used.
[0108] Model ensemble is a method that combines the prediction results of multiple base models to generate a final prediction, which can improve the prediction accuracy and stability of the model. The average value of the prediction results of all base models is calculated. The formula is as follows:
[0109]
[0110] Among them, represents the prediction result of the mth base model, and M represents the number of base models.
[0111] For example, suppose there are three models (M1, M2, M3), and the prediction results given by the three models are The final prediction result is:
[0112]
[0113] Calculate the evaluation index of the optimized model, evaluate the optimized model based on the evaluation index, and obtain the evaluation result. Exemplarily, the evaluation index can be set to accuracy, precision, recall and F1 score. The calculation formula of accuracy is as follows:
[0114]
[0115] Among them, TP (True Positive) represents the number of samples correctly predicted as positive, TN (True Negative) represents the number of samples correctly predicted as negative, FP (False Positive) represents the number of samples incorrectly predicted as positive, and FN (False Negative) represents the number of samples incorrectly predicted as negative.
[0116] The calculation formula of precision is as follows:
[0117]
[0118] The calculation formula for recall is as follows:
[0119]
[0120] The calculation formula of F1 score is as follows:
[0121]
[0122] After calculating the value of each evaluation indicator, the indicator results are analyzed to evaluate the performance of the model.
[0123] In a second aspect, an embodiment of the present invention provides a skin assessment device based on a convolutional neural network and a Kmeans clustering algorithm, see Figure 2 , is a structural schematic diagram of an embodiment of a skin assessment device based on a convolutional neural network and a Kmeans clustering algorithm provided by the present invention.
[0124] like Figure 2 As shown, the device comprises:
[0125] A data acquisition module 21 is used to acquire skin sample data of several persons to be evaluated;
[0126] A skin evaluation module 22, used for inputting the skin sample data into a pre-trained skin evaluation model and outputting a skin score value;
[0127] The cluster analysis module 23 is used to perform cluster analysis on the skin score values using a KMeans clustering algorithm to obtain the skin evaluation result of the person to be evaluated.
[0128] In an optional embodiment, the skin assessment module is used to:
[0129] Inputting the skin sample data into a pre-trained skin evaluation model, and performing normalization processing on the skin sample data;
[0130] Based on a convolutional neural network, extracting features from the skin image data in the skin sample data to obtain a feature vector;
[0131] The eigenvector is subjected to dimensionality reduction by using a principal component analysis method to obtain a eigenvector after dimensionality reduction;
[0132] Calculate the skin score value of the feature vector after dimension reduction.
[0133] In an optional embodiment, the skin sample data includes information of the person to be evaluated, skin characteristic data, skin images and skin test data.
[0134] In an optional embodiment, the skin assessment module is further used for:
[0135] Calculate the mean and standard deviation of the skin sample data;
[0136] Each data point in the skin sample data is normalized according to the mean value and the standard deviation.
[0137] In an optional embodiment, the skin assessment module is further used for:
[0138] Based on the feature vector, a feature mean vector is calculated;
[0139] Calculating a covariance matrix according to the characteristic mean vector;
[0140] Performing eigenvalue decomposition on the covariance matrix to obtain an eigenvector matrix;
[0141] Based on the eigenvector, the eigenmean vector and the eigenvector matrix, a eigenvector after dimension reduction is obtained.
[0142] In an optional embodiment, the skin assessment module is further used for:
[0143] Standardizing the eigenvector after dimension reduction, and assigning a weight to each standardized eigenvalue;
[0144] A skin score value is calculated based on the standardized feature value and the weight.
[0145] In an optional embodiment, the device further includes a model optimization module;
[0146] The model optimization module is used to:
[0147] Obtain multiple base models, train each of the base models and perform feature selection;
[0148] Performing hyperparameter optimization on each of the base models through cross validation;
[0149] Performing model integration on all the base models to obtain an optimized model;
[0150] An evaluation index of the optimized model is calculated, and the optimized model is evaluated based on the evaluation index to obtain an evaluation result.
[0151] In a third aspect, an embodiment of the present invention provides an electronic device, see Figure 3 , which is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention.
[0152] like Figure 3 As shown, the device includes:
[0153] A memory 31, used for storing computer programs;
[0154] A processor 32, configured to execute the computer program;
[0155] Wherein, when the processor 32 executes the computer program, the skin assessment method based on convolutional neural network and Kmeans clustering algorithm as described in any of the above embodiments is implemented.
[0156] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory 31 and executed by the processor 32 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the electronic device.
[0157] The processor 32 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0158] The memory 31 can be used to store the computer program and / or module, and the processor 32 realizes various functions of the electronic device by running or executing the computer program and / or module stored in the memory 31, and calling the data stored in the memory 31. The memory 31 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 31 can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0159] It should be noted that the above electronic device includes, but is not limited to, a processor and a memory. Those skilled in the art can understand that Figure 3The structural diagram is merely an example of the electronic device described above and does not constitute a limitation on the electronic device, and may include more components than shown in the figure, or a combination of certain components, or different components.
[0160] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed, the skin assessment method based on convolutional neural network and Kmeans clustering algorithm described in any of the above embodiments is implemented.
[0161] It should be understood that the present invention implements all or part of the processes in the above-mentioned skin assessment method based on convolutional neural network and Kmeans clustering algorithm, and can also be completed by instructing related hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the skin assessment method based on convolutional neural network and Kmeans clustering algorithm can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signal and telecommunication signal.
[0162] The above description is only a preferred embodiment of the present invention, but the protection scope of the present invention is not limited thereto. It should be pointed out that for those skilled in the art, several equivalent obvious variations and / or equivalent substitutions can be made without departing from the technical principles of the present invention. These obvious variations and / or equivalent substitutions should also be regarded as the protection scope of the present invention.
Claims
1. A skin assessment method based on convolutional neural network and Kmeans clustering algorithm, characterized in that: include: Obtain skin sample data of several persons to be evaluated; Inputting the skin sample data into a pre-trained skin evaluation model and outputting a skin score value; The skin score values are clustered and analyzed using the KMeans clustering algorithm to obtain the skin evaluation results of the person to be evaluated.
2. The skin assessment method based on convolutional neural network and Kmeans clustering algorithm according to claim 1, characterized in that: The step of inputting the skin sample data into a pre-trained skin evaluation model and outputting a skin score value comprises: Inputting the skin sample data into a pre-trained skin evaluation model, and performing normalization processing on the skin sample data; Based on a convolutional neural network, extracting features from the skin image data in the skin sample data to obtain a feature vector; The eigenvector is subjected to dimensionality reduction by using a principal component analysis method to obtain a eigenvector after dimensionality reduction; Calculate the skin score value of the feature vector after dimension reduction.
3. The skin assessment method based on convolutional neural network and Kmeans clustering algorithm according to claim 1, characterized in that: The skin sample data includes information of the person to be evaluated, skin feature data, skin images and skin test data.
4. The skin assessment method based on convolutional neural network and Kmeans clustering algorithm as claimed in claim 2, characterized in that: The normalizing process of the skin sample data comprises: Calculate the mean and standard deviation of the skin sample data; Each data point in the skin sample data is normalized according to the mean value and the standard deviation.
5. The skin assessment method based on convolutional neural network and Kmeans clustering algorithm as claimed in claim 2, characterized in that: The step of reducing the dimension of the feature vector by using the principal component analysis method to obtain the feature vector after the dimension reduction includes: Based on the feature vector, a feature mean vector is calculated; Calculating a covariance matrix according to the characteristic mean vector; Performing eigenvalue decomposition on the covariance matrix to obtain an eigenvector matrix; Based on the eigenvector, the eigenmean vector and the eigenvector matrix, a eigenvector after dimension reduction is obtained.
6. The skin assessment method based on convolutional neural network and Kmeans clustering algorithm as claimed in claim 2, characterized in that: The step of calculating the skin score value of the feature vector after dimension reduction includes: Standardizing the eigenvector after dimension reduction, and assigning a weight to each standardized eigenvalue; A skin score value is calculated based on the standardized feature value and the weight.
7. The skin assessment method based on convolutional neural network and Kmeans clustering algorithm according to claim 1, characterized in that: The method further comprises optimizing the skin assessment model; The optimizing the skin assessment model comprises: Obtain multiple base models, train each of the base models and perform feature selection; Performing hyperparameter optimization on each of the base models through cross validation; Performing model integration on all the base models to obtain an optimized model; An evaluation index of the optimized model is calculated, and the optimized model is evaluated based on the evaluation index to obtain an evaluation result.
8. A skin assessment device based on convolutional neural network and Kmeans clustering algorithm, characterized in that: include: A data acquisition module, used to acquire skin sample data of several persons to be evaluated; A skin evaluation module, used to input the skin sample data into a pre-trained skin evaluation model and output a skin score value; The cluster analysis module is used to perform cluster analysis on the skin score value by using the KMeans clustering algorithm to obtain the skin evaluation result of the person to be evaluated.
9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program; Wherein, when the processor executes the computer program, the skin assessment method based on convolutional neural network and Kmeans clustering algorithm as described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed, the skin assessment method based on a convolutional neural network and a Kmeans clustering algorithm is implemented as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Face detection method, method and device for training parameters of convolutional neural network and medium
CN108038474A
Health assessment method and device based on living body face recognition and storage medium thereof
CN111048209A
Skin improvement method
CN112837809A
Pigment skin disease classification detection method, device and equipment and storage medium
CN116894820A
