Skin condition evaluation method based on image classification model and visual processing
Through the combination of CoatNet and MLP networks, based on the S0-CCCT architecture, it solves the problem of being unable to comprehensively assess skin conditions in the field of medical beauty, achieving accurate assessment and efficient calculation of various skin problems, and is suitable for mobile devices and daily medical beauty needs. , improving user experience and service efficiency.
Patent Information
- Application Number
- CN202410895623.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2024-10-11
AI Technical Summary
Existing technology cannot comprehensively assess a user's overall skin condition in the field of medical beauty, and image processing and deep learning technology are mainly used for medical-level applications and cannot be widely promoted to daily medical beauty needs. Mobile devices and cloud services have processing capabilities. and network delay limitations, affecting user experience and service efficiency.
Using CoatNet as the backbone network, combined with the MLP network, through image data set enhancement and feature extraction, a visual model based on the S0-CCCT architecture is constructed to achieve a comprehensive assessment of various skin problems, including blackheads, acne, roughness and other indicators. Accurate scoring, suitable for mobile devices and daily medical aesthetic needs.
It achieves a comprehensive assessment of various skin problems, improves the accuracy and calculation efficiency of assessment, is suitable for medical level and daily medical beauty needs, fills the gap in technology application, and improves user experience and service efficiency.
Smart Images

Figure CN118761985A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of skin condition evaluation, and in particular to a skin condition evaluation method based on an image classification model and visual processing. Background Art
[0002] Traditional medical beauty services mainly rely on the experience and naked eye observation of professional doctors to diagnose and treat skin problems; however, this method has the limitations of strong subjectivity and low efficiency. The diagnostic results between different doctors may vary greatly and are difficult to accurately quantify and track.
[0003] With the rapid development of computer vision and deep learning technologies, image processing technology has been widely used in the medical beauty industry. Image processing technology can quickly process and analyze facial images, achieve real-time feedback and efficient services, and greatly improve user experience. Although image processing and deep learning technologies have made significant progress in the medical beauty industry, there are still some shortcomings: (a) The detection scenario application is single, and most existing technologies can only solve the classification of a certain segment of skin problems, such as only being able to distinguish the severity of acne. Although these systems perform well on specific problems, their limitation is that they cannot comprehensively evaluate the user's overall skin condition. This means that users can only obtain diagnosis and suggestions for a specific skin problem, but cannot fully understand their skin health status. Therefore, existing technologies are unable to provide a comprehensive and integrated skin health report, limiting the reference value of users when formulating overall skin care strategies and choosing beauty products. (b) Most existing image processing and deep learning technologies are limited in their application. Deep learning techniques are mainly used in medical scenarios and have not been widely promoted to applications that are closer to daily medical aesthetics needs. In medical applications, these technologies are usually used to detect and diagnose skin diseases, analyze lesions, assist doctors in decision-making, etc., which require highly accurate and reliable technical support. However, these technologies are relatively rarely used in medical aesthetics fields such as beauty salons, personal skin care, and cosmetics recommendations. (c) Mobile devices such as smartphones and tablets, although increasingly powerful, are still limited by processing power and energy efficiency. In terms of cloud services, despite more powerful computing resources and storage capabilities, they also face challenges in network latency and data transmission bandwidth. For image processing tasks that require large amounts of data interaction and real-time response, such as online video streaming or remote facial analysis, these factors may affect user experience and service efficiency. The limitation of existing technologies is that they fail to fully adapt to these needs, and many efficient image processing algorithms and deep learning models have not yet been integrated into user-friendly applications. Summary of the invention
[0004] In order to overcome the defects and shortcomings of the prior art, the present invention provides a skin condition assessment method based on image classification model and visual processing, which adopts CoatNet as the backbone network technical solution, solves the technical problem of accurately extracting user facial image features, and adds a fully connected layer to the output part for regression processing, and ensures that the output vector matches the dimension of the facial skin quality feature category, so as to achieve the technical effect of accurately outputting the score of each skin indicator, thereby improving the accuracy of the evaluation.
[0005] The second object of the present invention is to provide a skin condition assessment system based on image classification model and visual processing;
[0006] A third object of the present invention is to provide a computer readable storage medium;
[0007] A fourth object of the present invention is to provide a computer device.
[0008] In order to achieve the above object, the present invention adopts the following technical solutions:
[0009] The present invention provides a skin condition evaluation method based on an image classification model and visual processing, comprising the following steps:
[0010] Obtain facial images of people with various skin conditions and annotate them, enhance the image dataset, and construct a training dataset;
[0011] A CoatNet network is constructed based on the S0-CCCT architecture. The facial image is input into the CoatNet network to obtain a high-dimensional feature vector. An MLP network is constructed at the output of the high-dimensional feature vector of the CoatNet network, including multiple normalization and fully connected layers with residual connections, to output scores of different feature values of the facial skin.
[0012] Based on the training data set, the parameters of the CoatNet network and the MLP network are trained to learn the mapping relationship between facial image features and skin condition scores, and the visual model is trained;
[0013] Image preprocessing is performed on facial images of people with various skin conditions, and the facial images after image preprocessing are input into a visual model to obtain corresponding score values of various skin features.
[0014] As a preferred technical solution, the facial images of people with various skin conditions are obtained and annotated, and the image data set is enhanced to construct a training data set, which specifically includes:
[0015] Collecting facial image data from multiple sources, including facial image data of people of different ages, genders, and skin types;
[0016] Set skin scoring indicators;
[0017] Annotate facial images;
[0018] Perform image dataset enhancement, including mirror flipping, rotation, color adjustment, and noise introduction;
[0019] The augmented dataset is divided into training set, validation set and test set.
[0020] As a preferred technical solution, the CoatNet network structure is built based on the S0-CCCT architecture, which specifically includes:
[0021] Introducing multiple layers of depth-wise separable convolutional layers on the S0-CCT architecture, using the Mbconv convolutional module, and adding an inverted residual block before the depth-wise separable convolutional layer;
[0022] It also has a Transformer structure, which extracts global and local features based on the self-attention mechanism and maps high-dimensional features to the target category space through a fully connected layer.
[0023] As a preferred technical solution, the facial image is input into the CoatNet network to obtain a high-dimensional feature vector, which specifically includes:
[0024] After the facial image is input into the CoatNet network, low-level features are extracted through the initial convolution layer, and mid-level features are extracted through convolution operations. The Transformer block obtains the relationship between features through the self-attention mechanism. Skip connections are used between the convolution layer and the attention module. High-level features are extracted through stacked convolution layers and attention modules. Global features and long-range dependencies are obtained based on multiple Transformer blocks. All features extracted at each level are integrated, and the high-dimensional feature vector is mapped to the target category space through the fully connected layer.
[0025] As a preferred technical solution, an MLP network is constructed at the high-dimensional feature vector output of the CoatNet network, including multiple normalized and fully connected layers with residual connections, to output scores of different feature values of the face skin, specifically including:
[0026] After the high-dimensional feature vector is input into the MLP network, it is transferred from the input layer to the first hidden layer, the output of the first hidden layer is transferred to the second hidden layer, and the output of the second hidden layer is transferred to the third hidden layer to extract the high-dimensional features. The number of neurons in the output layer is equal to the number of skin feature categories required for regression. ReLU linear activation is used to map the high-dimensional feature vector to the score of the target skin feature category.
[0027] The first hidden layer uses the ReLU activation function and normalizes the data through the Batch Normalization layer.
[0028] The second hidden layer uses the ReLU activation function and adds a residual connection to add the first layer input to the second layer output;
[0029] The third hidden layer uses the ReLU activation function and adds a residual connection to add the first layer input to the third layer output.
[0030] As a preferred technical solution, the parameters of the CoatNet network and the MLP network are trained based on the training data set to learn the mapping relationship between facial image features and skin condition scores, and the visual model is trained, which specifically includes:
[0031] The mean square error is used as the loss function to calculate the difference between the predicted score and the actual score, which is specifically expressed as:
[0032]
[0033] Among them, loss represents the loss function, N is the number of facial skin quality feature categories, M is the number of facial skin image samples contained in a Batch, and y ic is the score of the cth facial skin feature in the ith sample in the sample set, is the predicted value of the skin feature of the cth person’s face in the i-th sample by the prediction network;
[0034] Build the Adam optimizer;
[0035] A batch of samples is randomly selected from the training data set, the loss function is used to calculate the loss between the predicted value and the actual value, the back-propagation algorithm is used to calculate the gradient, and the Adam optimizer is used to update the parameters of the CoatNet network and the MLP network until the preset iteration stop condition is obtained.
[0036] As a preferred technical solution, image preprocessing is performed on facial images of people with various skin conditions, specifically including:
[0037] Based on the MTCNN algorithm, face detection and positioning are performed on the input face image, and the image is cropped and aligned according to the detected face area;
[0038] The facial image after positioning is scaled based on the bilinear interpolation algorithm and uniformly adjusted to the preset input size. The noise in the scaling process is removed based on the adaptive local mean filter and Gaussian filter.
[0039] In order to achieve the above second purpose, the present invention adopts the following technical solutions:
[0040] A skin condition evaluation system based on image classification model and visual processing, used to implement the above-mentioned skin condition evaluation method based on image classification model and visual processing, the system comprising: a training data set construction module, a CoatNet network construction module, an MLP network construction module, a network training module, an image preprocessing module, and a skin feature scoring output module;
[0041] The training data set construction module is used to obtain and annotate facial images of people with various skin conditions, perform image data set enhancement, and construct a training data set;
[0042] The CoatNet network construction module is used to construct a CoatNet network based on the S0-CCCT architecture, and input a human face image into the CoatNet network to obtain a high-dimensional feature vector;
[0043] The MLP network construction module is used to construct an MLP network at the high-dimensional feature vector output of the CoatNet network, including multiple normalization and fully connected layers with residual connections, and output scores of different feature values of the face skin;
[0044] The network training module is used to train the parameters of the CoatNet network and the MLP network based on the training data set, learn the mapping relationship between the facial image features and the skin condition scores, and train to obtain a visual model;
[0045] The skin feature scoring output module is used to perform image preprocessing on human face images containing various skin conditions, and the human face images after image preprocessing are input into the visual model to obtain corresponding scoring values of various skin features.
[0046] In order to achieve the third objective, the present invention adopts the following technical solutions:
[0047] A computer-readable storage medium stores a program, which, when executed by a processor, implements the above-mentioned skin condition assessment method based on image classification model and visual processing.
[0048] In order to achieve the fourth objective, the present invention adopts the following technical solutions:
[0049] A computer device comprises a processor and a memory for storing a program executable by the processor. When the processor executes the program stored in the memory, the skin condition assessment method based on the image classification model and visual processing as described above is implemented.
[0050] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0051] (1) The present invention adopts a multi-dimensional skin assessment technology solution, which solves the limitation that traditional technology can only solve a single skin problem, and achieves a comprehensive assessment of multiple skin problems, including blackheads, acne, roughness, dark circles, pores, dryness and oiliness, fineness, health, uniformity, youthfulness, etc., providing a more comprehensive skin condition analysis.
[0052] (2) The present invention adopts CoatNet as the backbone network to solve the technical problem of accurately extracting the user's facial image features. By adding a fully connected layer to the output part for regression processing and ensuring that the output vector matches the dimension of the facial skin quality feature category, the technical effect of accurately outputting the score of each skin indicator is achieved, thereby improving the accuracy of the evaluation.
[0053] (3) The present invention adopts a technical solution with a better generalization S0-CCCT architecture as the core skeleton of the network, solves the technical problem of enhancing the network in capturing facial image features, and adds a layer of depth-separable convolutional layer to the basic S0-CCT technology, so that the network can more effectively extract features from facial images. This optimized network structure not only improves the feature extraction capability of the model, but also significantly reduces the computational complexity, achieving the technical effect of improving model performance.
[0054] (4) The present invention adopts image processing and deep learning technology to solve the technical problem of insufficient application in the field of medical aesthetics, and achieves a wide range of applications suitable for medical level and daily medical aesthetics needs, filling the gap in the application of technology in this field and promoting the popularization and promotion of technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 It is a flowchart of the skin condition evaluation method based on image classification model and visual processing of the present invention;
[0056] Figure 2 This is a schematic diagram of the deep learning architecture built based on the CoatNet network and the MIP network of the present invention. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0058] Example 1
[0059] like Figure 1 As shown, this embodiment provides a skin condition assessment method based on an image classification model and visual processing, comprising the following steps:
[0060] S1: In order to train a model that can achieve reasonable skin feature inference, it is necessary to collect high-quality facial images and build a dataset suitable for medical beauty testing, and use dataset enhancement technology to preprocess the dataset images. The dataset will include facial images and subjective scientific scoring information of various indicators corresponding to facial images;
[0061] S11: Collect facial image data from multiple sources to ensure coverage of different ages, genders, and skin types to ensure diversity and representativeness of the dataset. Data collection can be carried out through medical beauty clinics, beauty centers, or professional equipment to obtain high-quality images;
[0062] S12: Design scientific scoring criteria, including skin indicators such as blackheads, acne, skin roughness, dark circles, pore size, skin dryness and oiliness, skin fineness, health, evenness and youthfulness. These criteria need to be consistent and objective, and can be independently evaluated by multiple professionals;
[0063] S13: Detailed annotation of each facial image is performed by professionally trained personnel or medical aesthetic experts to ensure the accuracy and reliability of the scoring;
[0064] S14: Use dataset augmentation techniques such as mirror flipping, rotation, color adjustment, and noise introduction to increase the diversity and robustness of the dataset. These techniques help the model better generalize to different shooting conditions and environments during training.
[0065] S15: Divide the entire dataset into training set, validation set, and test set. The data volume ratio of the training set, validation set, and test set is 7:2:1 to ensure that the samples in each dataset are evenly distributed and well representative;
[0066] S2: Figure 2 As shown in the figure, a facial skin quality feature scoring regression network is built based on CoatNet and MLP, using the S0-CCCT architecture with stronger generalization ability and smaller parameters. The specific operations are as follows:
[0067] The CoatNet network structure of the S0-CCCT architecture is built. CoatNet is a lightweight convolutional neural network structure that aims to capture image features through effective convolution and pooling operations. It is designed specifically for mobile devices and resource-limited environments.
[0068] The C in S0-CCCT stands for convolution module. It uses the Mbconv convolution module and introduces the depthwise separable convolution layer. The depthwise separable convolution layer can reduce the amount of calculation and parameters while retaining the perception ability of the model to better capture the detailed features in the face image.
[0069] Inverted residuals are added before the depthwise separable convolutional layer to allow lower layers to access information from the previous layer through skip connections.
[0070] The first step uses 1×1 convolution to expand the input. The subsequent depth convolution greatly reduces the number of parameters. The 1×1 convolution performs compression to match the initial number of channels.
[0071] T stands for the Transformer structure, which processes the complete sequence, learns long-range relationships, captures local features through the self-attention mechanism, and improves the model's generalization ability for the mutual influence pattern of global skin image features;
[0072] The input dataset is a collection of facial images with various skin conditions, covering samples of different ages, genders, and skin types. Each image in the dataset is annotated and contains multiple indicators related to skin health, such as blackheads, acne, skin roughness, dark circles, pore size, skin dryness or oiliness, skin fineness, health, evenness, and youthfulness.
[0073] In the CoatNet network, the input face image first passes through the initial convolutional layer for basic feature extraction, dimensionality reduction, and data preprocessing. Subsequently, in the first stage, low-level features such as edges and textures are extracted through standard convolutional layers. These low-level features provide basic structural information, encoding the basic contours and skin texture of the face;
[0074] Entering the second stage, the network combines convolution and attention mechanisms. The convolution operation continues to extract mid-level features, such as detailed textures and local structures, while the Transformer block captures broader spatial context information through the self-attention mechanism, allowing the network to understand the relationship between local features. In this step, jump connections are used between the convolution layer and the attention module to ensure smooth information flow and effective feature fusion;
[0075] In the third stage, the network is further deepened, stacking more convolutional layers and attention modules to extract high-level features. These high-level features include complex facial expressions, delicate skin texture, and overall facial structure. Cross-stage connections are particularly important in this stage to ensure that the features extracted in the previous stages can be fully utilized and enhanced in deeper network layers;
[0076] The fourth stage mainly consists of a self-attention mechanism, using multiple Transformer blocks to capture global features and long-range dependencies. This enables the network to capture the overall distribution of facial features across the entire image, such as the overall uniformity and health of the skin;
[0077] The fifth stage continues to apply the self-attention mechanism to further enhance the global feature expression and integrate all features extracted at each level. Finally, the high-dimensional features are mapped to the target category space through the fully connected layer;
[0078] This embodiment introduces multiple layers of deep separable convolutional layers on the basic S0-CCT architecture, adjusts and optimizes the network to ensure that the new deep separable convolutional layers improve the feature extraction capability while maintaining the lightweight and high efficiency characteristics of CoatNet;
[0079] This structure improves the ability to abstract complex features while maintaining computational efficiency, and more accurately captures local and global features in facial images, such as facial structure, texture, and subtle expression features.
[0080] An MLP is constructed at the high-dimensional vector output of CoatNet, with a structure of three hidden layers and one output layer. Specifically, it is composed of multiple normalized and fully connected layers with residual connections. The fully connected multi-layer perceptron head with classification output provides the required predictions about different skin indicators. This embodiment captures important feature information in high-dimensional vectors by adding a multi-layer perceptron with residual connections, filters out irrelevant or interfering information, effectively utilizes the feature information extracted from CoatNet, and can also stabilize the training process through a batch normalization layer, thereby improving the performance of the model in medical beauty detection tasks;
[0081] In this embodiment, a multi-layer perceptron (MLP) with three hidden layers and one output layer is used as a regression head to ensure that the output vector dimension matches the required skin feature category, so that the output of the multi-layer perceptron is a score of different feature values of the face skin, specifically including:
[0082] The input is a high-dimensional feature vector extracted from CoatNet, which contains rich information processed by a deep convolutional network;
[0083] After the high-dimensional feature vector is input into the multi-layer perceptron (MLP), it is processed by a series of hidden layers and finally obtains an output vector that matches the required skin feature category. First, the high-dimensional feature vector is passed from the input layer to the first hidden layer, which contains an appropriate number of neurons. The ReLU activation function is used to increase the nonlinear expression ability, and the output data is normalized through the Batch Normalization layer to alleviate the gradient explosion and gradient disappearance problems. Then, the output of the first hidden layer is passed to the second hidden layer, where the number of neurons is equal to that of the first layer. The ReLU activation function is continued to be used, and a residual connection is added. The first layer input is directly added to the second layer output to ensure the propagation of more original information and the stability of the network. Then, the output of the second hidden layer is passed to the third hidden layer, where the number of neurons continues to decrease. The ReLU activation function is still used, and a residual connection is added. The first layer input is directly added to the third layer output. Higher-level features are gradually abstracted through multi-level processing. Finally, the number of neurons in the output layer is equal to the number of skin feature categories required for regression. ReLU linear activation is used to map the high-dimensional feature vector to the score of the target skin feature category. Each element corresponds to the score of a skin feature. This score reflects the performance of each skin feature in the input image, such as the number of blackheads, the severity of acne, skin roughness, etc. In this way, MLP gradually converts the input high-dimensional feature vector into a score vector that matches the skin feature category, thereby evaluating different features of the face skin. Through multi-level processing, the model can gradually abstract higher-level features;
[0084] S3: Train the parameters of the CoatNet network and the MLP network to obtain a visual model that can complete the facial skin image analysis task. The specific steps are as follows:
[0085] S31: The mean squared error is used as the loss function to measure the gap between the predicted score and the actual score, which is specifically expressed as:
[0086]
[0087] Among them, loss represents the loss function, N is the number of facial skin quality feature categories, M is the number of facial skin image samples contained in a Batch, and y ic is the score of the cth facial skin feature in the ith sample in the sample set, is the predicted value of the skin feature of the cth person’s face in the i-th sample by the prediction network;
[0088] S32: Construct the Adam optimizer, whose calculation formula is as follows:
[0089]
[0090] A batch of samples is randomly selected from the training data set, and the loss function is used to calculate the loss between the predicted value and the actual value; the gradient is calculated using the back-propagation algorithm, and the parameters of the CoatNet network and the MLP network are updated using the Adam optimizer; after each iteration, the above training operation is repeated until the preset number of iterations is reached (or the condition for stopping training is reached);
[0091] The training process ends when the preset number of iterations is reached. Optionally, the performance of the model is evaluated using a validation set and adjusted and optimized as needed.
[0092] S33: After data preprocessing, the feature extraction network based on the structure of CoatNet and MLP network is used to extract features from face images. CoatNet uses S0-CCCT architecture for convolution, attention mechanism and pooling operations to capture local and global features of images, adapting to mobile devices and resource-limited environments. At the same time, the MLP network is responsible for mapping high-dimensional feature vectors to corresponding skin feature scores.
[0093] In the training phase, the labeled data set is divided into training set, validation set and test set, and the network parameters are optimized through the back propagation algorithm so that the network can learn the mapping relationship between image features and skin condition scores. In each training cycle, the Adam optimizer is used to gradually adjust the network weights according to the feedback of the defined loss function, gradually improving the accuracy and generalization ability of the model.
[0094] Finally, the trained model can output the corresponding scores of various skin features based on the input face image. These scores reflect the different skin conditions of the face area in the image, such as blackheads, acne, skin roughness and other indicators, thereby achieving accurate evaluation and analysis of various facial skin features.
[0095] S4: Use the constructed network architecture to infer the facial images input by the user. Considering that most of the medical aesthetic applications based on visual algorithms are currently carried out on consumer-grade terminals, the imaging accuracy depends on the camera performance of the user terminal, as well as the shooting conditions and lighting conditions. In most cases, the imaging quality will be relatively low, including image resolution and accuracy. Therefore, before the deep learning algorithm is pushed and calculated, the user input needs to be optimized to a certain extent based on image processing technology. The specific steps are as follows:
[0096] S41: Use the MTCNN (Multi-task Cascaded Convolutional Networks) algorithm to detect and locate faces in the input image, ensure that the detected face area is not blocked, and the main part is located in the center of the image. According to the detected face area, the image is cropped and aligned to ensure that the front part of the face is in the center of the cropped image.
[0097] S42: After completing face detection and region localization, the localization image is scaled based on the bilinear interpolation algorithm, and each image is uniformly adjusted to the standard input size to ensure the consistency and accuracy of subsequent processing steps; the adaptive local mean filtering and Gaussian filtering techniques are used to remove the noise that may be introduced in the image scaling process, while retaining the image details, thereby improving the quality and availability of the dataset;
[0098] S43: outputting the pre-processed image after face detection, cropping, scaling and denoising as input data for a subsequent deep neural network model;
[0099] S44: The neural network performs reasoning based on the processed input image and outputs the scores of each skin feature value of the face image.
[0100] Example 2
[0101] This embodiment provides a skin condition assessment system based on image classification model and visual processing, which is used to implement the skin condition assessment method based on image classification model and visual processing in the above-mentioned embodiment 1, and the system includes: a training data set construction module, a CoatNet network construction module, an MLP network construction module, a network training module, an image preprocessing module, and a skin feature score output module;
[0102] In this embodiment, the training data set construction module is used to obtain and annotate facial images of people with various skin conditions, perform image data set enhancement, and construct a training data set;
[0103] In this embodiment, the CoatNet network construction module is used to construct a CoatNet network based on the S0-CCCT architecture, and input a human face facial image into the CoatNet network to obtain a high-dimensional feature vector;
[0104] In this embodiment, the MLP network construction module is used to construct an MLP network at the high-dimensional feature vector output of the CoatNet network, including multiple normalization and fully connected layers with residual connections, and output scores of different feature values of the face skin;
[0105] In this embodiment, the network training module is used to train the parameters of the CoatNet network and the MLP network based on the training data set, learn the mapping relationship between the facial image features and the skin condition scores, and train to obtain a visual model;
[0106] In this embodiment, the skin feature scoring output module is used to perform image preprocessing on facial images of human faces with various skin conditions, and the facial images after image preprocessing are input into the visual model to obtain corresponding scoring values of various skin features.
[0107] Example 3
[0108] This embodiment provides a storage medium, which may be a ROM, RAM, disk, CD or other storage medium, and the storage medium stores one or more programs. When the program is executed by the processor, the skin condition assessment method based on the image classification model and visual processing of embodiment 1 is implemented.
[0109] Example 4
[0110] The present embodiment provides a computing device, which may be a desktop computer, a laptop computer, a smart phone, a PDA handheld terminal, a tablet computer or other terminal device with a display function. The computing device includes a processor and a memory, and the memory stores one or more programs. When the processor executes the program stored in the memory, the skin condition assessment method based on the image classification model and visual processing of Embodiment 1 is implemented.
[0111] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.
Claims
1. A skin condition assessment method based on image classification model and visual processing, characterized in that: The steps include: Obtain facial images of people with various skin conditions and annotate them, enhance the image dataset, and construct a training dataset; A CoatNet network is constructed based on the S0-CCCT architecture. The facial image is input into the CoatNet network to obtain a high-dimensional feature vector. An MLP network is constructed at the output of the high-dimensional feature vector of the CoatNet network, including multiple normalization and fully connected layers with residual connections, to output scores of different feature values of the facial skin. Based on the training data set, the parameters of the CoatNet network and the MLP network are trained to learn the mapping relationship between facial image features and skin condition scores, and the visual model is trained; Image preprocessing is performed on facial images of people with various skin conditions, and the facial images after image preprocessing are input into a visual model to obtain corresponding score values of various skin features.
2. The skin condition assessment method based on image classification model and visual processing according to claim 1, characterized in that: The method of obtaining and annotating facial images of people with various skin conditions, enhancing the image data set, and constructing a training data set specifically includes: Collecting facial image data from multiple sources, including facial image data of people of different ages, genders, and skin types; Set skin scoring indicators; Annotate facial images; Perform image dataset enhancement, including mirror flipping, rotation, color adjustment, and noise introduction; The augmented dataset is divided into training set, validation set and test set.
3. The skin condition assessment method based on image classification model and visual processing according to claim 1, characterized in that: The CoatNet network structure is built based on the S0-CCCT architecture, including: Introducing multiple layers of depth-wise separable convolutional layers on the S0-CCT architecture, using the Mbconv convolutional module, and adding an inverted residual block before the depth-wise separable convolutional layer; It also has a Transformer structure, which extracts global and local features based on the self-attention mechanism and maps high-dimensional features to the target category space through a fully connected layer.
4. The skin condition assessment method based on image classification model and visual processing according to claim 1, characterized in that: Input the facial image into the CoatNet network to obtain a high-dimensional feature vector, including: After the facial image is input into the CoatNet network, low-level features are extracted through the initial convolution layer, and mid-level features are extracted through convolution operations. The Transformer block obtains the relationship between features through the self-attention mechanism. Skip connections are used between the convolution layer and the attention module. High-level features are extracted through stacked convolution layers and attention modules. Global features and long-range dependencies are obtained based on multiple Transformer blocks. All features extracted at each level are integrated, and the high-dimensional feature vector is mapped to the target category space through the fully connected layer.
5. The skin condition assessment method based on image classification model and visual processing according to claim 1, characterized in that: An MLP network is constructed at the high-dimensional feature vector output of the CoatNet network, including multiple normalization and fully connected layers with residual connections, to output scores of different feature values of the face skin, including: After the high-dimensional feature vector is input into the MLP network, it is transferred from the input layer to the first hidden layer, the output of the first hidden layer is transferred to the second hidden layer, and the output of the second hidden layer is transferred to the third hidden layer to extract the high-dimensional features. The number of neurons in the output layer is equal to the number of skin feature categories required for regression. ReLU linear activation is used to map the high-dimensional feature vector to the score of the target skin feature category. The first hidden layer uses the ReLU activation function and normalizes the data through the Batch Normalization layer. The second hidden layer uses the ReLU activation function and adds a residual connection to add the first layer input to the second layer output; The third hidden layer uses the ReLU activation function and adds a residual connection to add the first layer input to the third layer output.
6. The skin condition assessment method based on image classification model and visual processing according to claim 1, characterized in that: Based on the training data set, the parameters of the CoatNet network and the MLP network are trained to learn the mapping relationship between facial image features and skin condition scores, and the visual model is trained, including: The mean square error is used as the loss function to calculate the difference between the predicted score and the actual score, which is specifically expressed as: Among them, loss represents the loss function, N is the number of facial skin quality feature categories, M is the number of facial skin image samples contained in a Batch, and y ic is the score of the cth facial skin feature in the ith sample in the sample set, is the predicted value of the skin feature of the cth person’s face in the i-th sample by the prediction network; Build the Adam optimizer; A batch of samples is randomly selected from the training data set, the loss function is used to calculate the loss between the predicted value and the actual value, the back-propagation algorithm is used to calculate the gradient, and the Adam optimizer is used to update the parameters of the CoatNet network and the MLP network until the preset iteration stop condition is obtained.
7. The skin condition assessment method based on image classification model and visual processing according to claim 1, characterized in that: Image preprocessing of facial images with various skin conditions, including: Based on the MTCNN algorithm, face detection and positioning are performed on the input face image, and the image is cropped and aligned according to the detected face area; The facial image after positioning is scaled based on the bilinear interpolation algorithm and uniformly adjusted to the preset input size. The noise in the scaling process is removed based on the adaptive local mean filter and Gaussian filter.
8. A skin condition assessment system based on image classification model and visual processing, characterized in that: Used to implement the skin condition assessment method based on image classification model and visual processing as described in any one of claims 1 to 7, the system comprises: a training data set construction module, a CoatNet network construction module, an MLP network construction module, a network training module, an image preprocessing module, and a skin feature score output module; The training data set construction module is used to obtain and annotate facial images of people with various skin conditions, perform image data set enhancement, and construct a training data set; The CoatNet network construction module is used to construct a CoatNet network based on the S0-CCCT architecture, and input a human face image into the CoatNet network to obtain a high-dimensional feature vector; The MLP network construction module is used to construct an MLP network at the high-dimensional feature vector output of the CoatNet network, including multiple normalization and fully connected layers with residual connections, and output scores of different feature values of the face skin; The network training module is used to train the parameters of the CoatNet network and the MLP network based on the training data set, learn the mapping relationship between the facial image features and the skin condition scores, and train to obtain a visual model; The skin feature scoring output module is used to perform image preprocessing on human face images containing various skin conditions, and the human face images after image preprocessing are input into the visual model to obtain corresponding scoring values of various skin features.
9. A computer-readable storage medium storing a program, characterized in that: When the program is executed by a processor, the skin condition assessment method based on an image classification model and visual processing as described in any one of claims 1 to 7 is implemented.
10. A computer device comprising a processor and a memory for storing a program executable by the processor, characterized in that: When the processor executes the program stored in the memory, the skin condition assessment method based on the image classification model and visual processing as described in any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Fast aggregation classification method based on feature similarity calculation
CN119380113A
Method and device for analyzing skin moisture by using skin image
CN119445616A
Turnout detection method based on computer vision and intelligent monitoring pile
CN119648700A
Abnormal network traffic detection method, system and device based on deep learning, and medium
CN120223356A
