Facial color recognition method, device, electronic device and storage medium
Through feature point extraction, mask processing and color space conversion of facial images, the problem of environmental interference in facial recognition is solved, the accuracy of facial recognition is improved, and more accurate facial recognition results are achieved.
Patent Information
- Application Number
- CN202411266702.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-09-10
AI Technical Summary
The existing facial color recognition method based on computer vision technology has the problem of inaccurate facial color recognition, which is mainly because different facial images are doped with many different facial features, resulting in complex environmental interference.
By acquiring the user's facial image, feature point extraction, mask processing and color space conversion are performed, feature points and color features of the facial area are extracted, environmental interference is reduced, and the accuracy of facial color recognition is improved.
By masking and color space conversion of the target area in the facial image, environmental interference is effectively avoided, the accuracy of facial color recognition is improved, and the color characteristics of facial skin are better represented, thereby improving the accuracy of facial color recognition .
Smart Images

Figure CN118781645B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing technology, and in particular to a facial color recognition method, device, electronic device and storage medium. Background Art
[0002] In traditional Chinese medicine facial diagnosis, complexion diagnosis is an important part of the facial diagnosis process. It is a method of diagnosing diseases by observing the color of a person's facial skin. Traditional complexion diagnosis mainly relies on the doctor's visual observation and verbal description, which has the problem of strong subjective dependence.
[0003] In order to overcome the problem of strong subjective dependence of traditional complexion diagnosis, computer vision technology is combined in the existing complexion diagnosis process to extract and analyze information of the patient's facial image through computer vision technology, and then perform complexion recognition based on the extracted information and analysis results.
[0004] However, since different facial images are mixed with many features different from complexion, complex environmental interference is brought to complexion recognition, resulting in inaccurate complexion recognition in existing complexion recognition methods based on computer vision technology. Summary of the invention
[0005] In order to solve the above technical problems, the present disclosure provides a facial color recognition method, device, electronic device and storage medium.
[0006] A first aspect of an embodiment of the present disclosure provides a facial color recognition method, comprising:
[0007] Get the user's facial image;
[0008] Inputting the facial image into a feature point extraction model, and extracting feature points from the facial image by the feature point extraction model to obtain a first result, wherein the first result includes a plurality of feature points corresponding to a facial region in the facial image and position information of each feature point;
[0009] Performing mask processing on a target area in the facial image based on the first result to obtain a first image, wherein the target area includes a facial feature area and a background area in the facial image;
[0010] Performing color space conversion processing on the first image to obtain a second image;
[0011] The second image is input into the facial color recognition model, and the facial color recognition model performs facial color recognition on the second image to obtain a facial color recognition result.
[0012] A second aspect of an embodiment of the present disclosure provides a facial color recognition device, comprising:
[0013] An image acquisition module, used to acquire a user's facial image;
[0014] A feature point extraction module, used to input the facial image into a feature point extraction model, and the feature point extraction model extracts feature points from the facial image to obtain a first result, wherein the first result includes a plurality of feature points corresponding to the facial area in the facial image and position information of each feature point;
[0015] A mask processing module, configured to perform mask processing on a target area in the facial image based on the first result to obtain a first image, wherein the target area includes a facial feature area and a background area in the facial image;
[0016] A conversion processing module, used for performing color space conversion processing on the first image to obtain a second image;
[0017] The facial color recognition module is used to input the second image into the facial color recognition model, and the facial color recognition model performs facial color recognition on the second image to obtain a facial color recognition result.
[0018] A third aspect of the embodiments of the present disclosure provides an electronic device, including:
[0019] processor;
[0020] A memory for storing executable instructions;
[0021] The processor is used to read executable instructions from the memory and execute the executable instructions to implement the facial color recognition method provided in the first aspect.
[0022] A fourth aspect of an embodiment of the present disclosure provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor implements the facial color recognition method provided by the first aspect.
[0023] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:
[0024] The facial color recognition method, device, electronic device and storage medium provided by the embodiment of the present disclosure can, after acquiring the facial image of the user, input the facial image into a feature point extraction model, and extract feature points from the facial image by the feature point extraction model to obtain a first result, wherein the first result includes multiple feature points corresponding to the facial area and the position information of each feature point. Then, based on the first result, mask processing is performed on the target area in the facial image to obtain a first image, and the target area includes the facial features area and the background area in the facial image; color space conversion processing is performed on the first image to obtain a second image; the second image is input into the facial color recognition model, and the facial color recognition model performs facial color recognition on the second image to obtain a facial color recognition result. Thus, by masking the target area in the facial image of the user, the influence of environmental interference in the facial image on facial color recognition can be avoided, and at the same time, the color space conversion processing is performed on the masked first image, so that the color space of the obtained second image can better represent the color characteristics of the facial skin, thereby improving the accuracy of facial color recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0026] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0027] Figure 1 is a flow chart of a facial color recognition method provided by an embodiment of the present disclosure;
[0028] Figure 2 This is a schematic diagram of the effect of preprocessing an image to be recognized provided by an embodiment of the present disclosure;
[0029] Figure 3 is a schematic diagram of the effect of converting an image to be recognized into a facial image provided by an embodiment of the present disclosure;
[0030] Figure 4 It is a schematic diagram of a feature point effect after feature point extraction of a facial image provided by an embodiment of the present disclosure;
[0031] Figure 5 is a schematic diagram of an effect of a contour line obtained based on the first result provided by an embodiment of the present disclosure;
[0032] Figure 6It is a schematic diagram of the effect of generating a facial mask image based on contour lines provided by an embodiment of the present disclosure;
[0033] Figure 7 is a schematic diagram of an effect of generating a first image based on a facial mask image provided by an embodiment of the present disclosure;
[0034] Figure 8 This is a schematic diagram of the effect of performing color space conversion processing on a first image to obtain a second image provided by an embodiment of the present disclosure;
[0035] Fig. 9 is a flow chart of another facial color recognition method provided by an embodiment of the present disclosure;
[0036] Fig.10 is a structural schematic diagram of a facial color recognition device provided by an embodiment of the present disclosure;
[0037] Fig.11 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0038] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0039] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0040] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0041] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0042] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0043] Generally speaking, in the process of facial color recognition based on existing computer vision technology, since different facial images are mixed with many features different from the complexion, complex environmental interference is brought to the facial color recognition, resulting in the problem of inaccurate facial color recognition in the existing facial color recognition method based on computer vision technology. To address this problem, the embodiment of the present disclosure provides a facial color recognition method, which is introduced in conjunction with a specific embodiment below.
[0044] Figure 1 It is a flow chart of a facial color recognition method provided by an embodiment of the present disclosure. The method can be executed by a facial color recognition device. The facial color recognition device can be implemented in software and / or hardware. The facial color recognition device can be configured in an electronic device, such as a server or a terminal, wherein the terminal specifically includes a mobile phone, a computer or a tablet computer, etc.
[0045] like Figure 1 As shown, the facial color recognition method provided in this embodiment includes the following steps.
[0046] S110: Obtain a facial image of a user.
[0047] In the embodiment of the present disclosure, a facial image may be understood as an image containing a user's face.
[0048] The facial image may be a facial image in which eyes have been occluded.
[0049] In some embodiments of the present disclosure, after receiving the facial recognition instruction, the electronic device may parse the facial recognition instruction and obtain the user's facial image from the facial recognition instruction. The facial recognition instruction is an instruction for controlling the electronic device to perform facial recognition.
[0050] In some other embodiments of the present disclosure, after receiving a facial recognition instruction, the electronic device can control the image acquisition device to perform an image acquisition operation, acquire the facial image of the user, and upload the acquired facial image to the electronic device, so that the electronic device can obtain the facial image of the user.
[0051] S120, inputting the facial image into a feature point extraction model, and having the feature point extraction model extract feature points from the facial image to obtain a first result, wherein the first result includes a plurality of feature points corresponding to the facial area in the facial image and position information of each feature point.
[0052] In the embodiment of the present disclosure, the feature point extraction model is a pre-trained model for extracting feature points from an image.
[0053] The feature point extraction model may include an input layer, a first backbone network and an output layer, wherein a visual attention neural network (such as Vision Transformer) may be used as the first backbone network.
[0054] Specifically, after acquiring the facial image of the user, the electronic device inputs the facial image into the feature point extraction model, and the feature point extraction model extracts feature points from the facial image to obtain a first result. The first result includes multiple feature points corresponding to the facial area (i.e., the area including the facial features and the face) in the facial image, the position information of each feature point, and may also include the category corresponding to each feature point.
[0055] The position information of the feature point may be the coordinates of the pixel point corresponding to the feature point.
[0056] The categories corresponding to the feature points include nose, face, eyebrows, mouth, etc.
[0057] S130. Perform mask processing on the target area in the facial image based on the first result to obtain a first image, where the target area includes the facial features area and the background area in the facial image.
[0058] In the embodiment of the present disclosure, mask processing can be understood as performing occlusion processing on the target area.
[0059] Specifically, after obtaining the first result, the electronic device determines the target area based on the feature points in the first result and the position information corresponding to each feature point, and then performs mask processing on the target area in the facial image to obtain the first image.
[0060] S140: Perform color space conversion processing on the first image to obtain a second image.
[0061] In the embodiment of the present disclosure, the color space conversion process can be understood as converting the color space of the image.
[0062] In the embodiment of the present disclosure, the first image may be in RGB format, and the color space conversion process may be to convert the first image from RGB format to Lab format.
[0063] Specifically, after obtaining the first image, the electronic device performs color space conversion processing on the first image, converting the first image from RGB format to Lab format to obtain a second image, thereby enabling the obtained second image to better represent the color characteristics of facial skin, and at the same time, the color space of the second image is closer to the human eye's perception of color. Among them, the specific implementation method of converting the first image from RGB format to Lab format is similar to the existing specific implementation method of converting the image format from RGB to Lab, and will not be repeated here.
[0064] S150, inputting the second image into a facial color recognition model, and using the facial color recognition model to perform facial color recognition on the second image to obtain a facial color recognition result.
[0065] In the embodiment of the present disclosure, the facial color recognition model can be understood as a pre-trained model for facial color recognition.
[0066] The facial recognition model may include an input layer, a second backbone network, a fully connected layer, and an output layer, wherein a visual attention neural network (such as Vision Transformer) may be used as the second backbone network. The network structure and function of the fully connected layer are similar to those of the fully connected layer in the existing machine learning model, and will not be described in detail here.
[0067] Specifically, after acquiring the second image, the electronic device inputs the second image into the facial color recognition model, and the facial color recognition model performs facial color recognition on the second image to obtain a facial color recognition result.
[0068] The facial color recognition result may include a facial color category and a confidence level of the facial color category.
[0069] Complexion categories include dark complexion, pale complexion, blue complexion, yellow complexion, red complexion, and normal complexion.
[0070] In the disclosed embodiment, after acquiring the facial image of the user, the facial image can be input into the feature point extraction model, and the feature point extraction model extracts the feature points of the facial image to obtain a first result, wherein the first result includes a plurality of feature points corresponding to the facial region and the position information of each feature point. Then, based on the first result, the target region in the facial image is masked to obtain a first image, wherein the target region includes the facial features region and the background region in the facial image; the first image is subjected to color space conversion processing to obtain a second image; the second image is input into the complexion recognition model, and the complexion recognition model performs complexion recognition on the second image to obtain a complexion recognition result. Thus, by masking the target region in the facial image of the user, the influence of environmental interference in the facial image on complexion recognition can be avoided, and at the same time, the color space conversion processing is performed on the masked first image, so that the color space of the obtained second image can better represent the color characteristics of the facial skin, thereby improving the accuracy of complexion recognition.
[0071] On the basis of the above-mentioned embodiments of the present disclosure, obtaining a facial image of a user may specifically include: obtaining an image to be identified, where the image to be identified is an image containing a facial area of the user; inputting the image to be identified into an image detection model, and having the image detection model detect the facial area in the image to be identified to obtain a second result, wherein the second result includes a detection frame and pixel coordinates corresponding to the facial area; and cropping the image to be identified based on the second result to obtain a facial image.
[0072] The image to be recognized is a color image containing the user's face, such as an image in RGB format.
[0073] The pixel coordinates can be understood as the pixel coordinates corresponding to the detection box.
[0074] In some embodiments of the present disclosure, after acquiring the image to be identified, the facial color recognition method may further include: preprocessing the image to be identified to obtain a preprocessed third image, the preprocessing including at least one of eye occlusion processing, denoising processing, color correction processing and brightness normalization processing.
[0075] Among them, the eye occlusion processing can be understood as occluding the eyes of the user in the image, thereby protecting the user's privacy well.
[0076] De-noising can be understood as removing noise from an image. Specifically, spatial domain methods (such as mean filtering, median filtering, Gaussian filtering, etc.) and transform domain methods (such as Fourier transform, wavelet transform, etc.) can be used to denoise the image to be identified.
[0077] Color correction processing can be understood as processing for color correction of images to remove color cast in images, etc. For example, color correction processing can be performed on the image to be identified based on a standard color card and a preset correction algorithm, or preset image processing software can be used to perform color correction processing on the image to be identified.
[0078] Brightness normalization can be understood as adjusting the brightness of an image to make the brightness distribution of the image uniform and reduce the brightness differences caused by different shooting conditions.
[0079] Specifically, after acquiring the image to be recognized, the electronic device preprocesses the image to be recognized to obtain the third image.
[0080] Figure 2 FIG. 1 is a schematic diagram of the effect of preprocessing an image to be recognized provided by an embodiment of the present disclosure. Figure 2 As shown, Figure 2 The left side is the image to be recognized, that is, the image before preprocessing. This image has been blocked for the user's eyes. Figure 2 The image to be identified on the left is obtained after preprocessing Figure 2 The preprocessed image on the right is compared with the image before preprocessing. Figure 2 The image on the left has more uniform brightness, is clearer, etc.
[0081] Furthermore, the image to be identified is input into the image detection model, and the image detection model detects the facial area in the image to be identified to obtain the second result, which may specifically include: inputting the third image into the image detection model, and the image detection model detects the facial area in the third image to obtain the second result. Thus, the accuracy of the obtained second result is improved.
[0082] The image detection model can be understood as a trained model for detecting target objects in images.
[0083] The image detection model includes an input layer, a third backbone network, a fully connected layer and an output layer. Among them, a convolutional neural network can be used as the third backbone network.
[0084] Figure 3 FIG. 1 is a schematic diagram of the effect of converting an image to be recognized into a facial image provided by an embodiment of the present disclosure. Figure 3 As shown, the third image obtained after preprocessing is Figure 3 The leftmost image is input into the image detection model, which performs facial region detection on the third image and obtains Figure 3 The middle picture, Figure 3 The middle image is a picture containing the facial area detection frame, and the pixel coordinates corresponding to the detection frame are output at the same time.
[0085] Further, Figure 3 The middle image is cropped based on the detection frame and the pixel coordinates corresponding to the detection frame to obtain the facial image, such as Figure 3 The rightmost picture.
[0086] In the embodiment of the present disclosure, it is possible to obtain a second result by preprocessing the image to be identified, performing image detection on a third image obtained after preprocessing the image to be identified based on an image detection model, and obtaining a facial image based on the second result. Thus, other areas except the facial image in the image to be identified can be removed, thereby reducing the influence of the background environment on facial recognition and improving the accuracy of facial recognition.
[0087] In an embodiment of the present disclosure, masking is performed on a target area in a facial image based on a first result to obtain a first image, which may specifically include: creating a blank mask map, and displaying a plurality of feature points in the first result in the blank mask map, respectively, wherein a size of the blank mask map is consistent with an image size of the facial image; determining a category corresponding to each of a plurality of feature points in the first result; sequentially connecting a plurality of target feature points belonging to the same category based on the category corresponding to each feature point and position information of each feature point to obtain contour lines corresponding to each category in the blank mask map; and masking is performed on the target area in the facial image based on the contour lines to obtain the first image.
[0088] Among them, the categories corresponding to the feature points include nose, face, eyebrows, mouth, etc.
[0089] Figure 4 FIG. 1 is a schematic diagram of a feature point effect after feature point extraction of a facial image provided by an embodiment of the present disclosure. Figure 4 As shown, the facial image is Figure 4 The leftmost image in the figure is input into the feature point extraction model, and multiple feature points corresponding to the facial image can be obtained, such as Figure 4 The middle figure contains multiple feature points obtained by the feature point extraction model after identifying the facial image. After obtaining multiple feature points, a blank mask image is created. The image size of the blank mask image is consistent with the image size of the facial image. The default pixels of the blank mask image are all black (that is, the pixel values of the pixels are all 0). Based on the position information of each feature point, each feature point is displayed in the blank mask image, and the following is obtained: Figure 4 The rightmost picture in .
[0090] Figure 5 is a schematic diagram of the effect of a contour line obtained based on the first result provided by an embodiment of the present disclosure, such as Figure 5As shown in , after obtaining each feature point, each feature point corresponds to a category, such as mouth, eyebrows, etc., and multiple target feature points belonging to the same category are sequentially connected. For example, the target feature points belonging to the mouth are sequentially connected to obtain the contour line of the mouth, and the target feature points belonging to the nose are sequentially connected to obtain the contour line of the nose, etc., until all feature points are processed, and the contour lines corresponding to each category in the blank mask image are obtained, as shown in Figure 5 The figure on the right.
[0091] In an embodiment of the present disclosure, after obtaining the contour lines corresponding to each category, a mask process is performed on a target area in the facial image based on the contour lines to obtain a first image, which may specifically include: determining a first contour line of a face category and second contour lines corresponding to other categories other than the face; performing a first filling process on a first area corresponding to the first contour line, and performing a second filling process on a second area corresponding to the second contour line to obtain a facial mask map; and performing a mask process on the target area in the facial image based on the facial mask map to obtain the first image.
[0092] Figure 6 FIG. 1 is a schematic diagram of the effect of generating a facial mask image based on contour lines provided by an embodiment of the present disclosure. Figure 6 The left side of the figure is a blank mask image containing contour lines corresponding to each category. After obtaining the contour lines corresponding to each category, the first contour line of the face is determined, that is, Figure 6 The maximum contour line consistent with the facial shape structure shown in is used to perform a first filling process on the first area corresponding to the first contour line, that is, the entire facial area (that is, the pixel values of the pixels in the facial area are changed from 0 to 255), and the entire facial area is filled with white; then, a second filling process is performed on the second area corresponding to the contour lines corresponding to the eyebrows, nose, and mouth except the face (that is, the pixel values of the pixels in the areas corresponding to the eyebrows, nose, and mouth are changed from 255 to 0), and the areas corresponding to the eyebrows, nose, and mouth are filled with black, and the result is as follows Figure 6 The image on the right is the face mask.
[0093] Further, masking the target area in the facial image based on the facial mask map to obtain the first image may specifically include: inputting the facial mask map and the facial image into a preset masker, performing a masking operation on the facial image, and obtaining the first image.
[0094] Figure 7 FIG. 1 is a schematic diagram showing an effect of generating a first image based on a facial mask image provided by an embodiment of the present disclosure. Figure 7 As shown, after obtaining the facial mask map, Figure 7 After the upper left figure in the middle, the facial mask image and the preprocessed facial image are Figure 7The lower left image is input into the preset masker, which performs a pixel-by-pixel masking operation on the preprocessed facial image based on the facial mask image to obtain the first image as shown in FIG. Figure 7 The first image is an RGB image.
[0095] In the disclosed embodiment, feature points of a facial image can be extracted to obtain multiple feature points and location information of each feature point, and the contour line corresponding to each category can be accurately obtained based on the category and location information of each feature point. Then, the target area of the facial image is determined based on the contour line, which improves the accuracy of the target area determination, thereby improving the accuracy and effectiveness of the obtained first image.
[0096] Furthermore, the obtained first image is subjected to color space conversion processing to obtain a second image.
[0097] Specifically, the RGB color space corresponding to the first image is converted into an XYZ space (also called a CIEXYZ space), and then converted from the XYZ space to a Lab space (also called a CIELAB space), thereby obtaining the second image.
[0098] Among them, the conversion from RGB to XYZ is the process of converting from device-dependent color space to linear color space. The specific formula for converting from RGB space to XYZ space is as follows:
[0099]
[0100] The specific formula for converting from XYZ space to Lab space is as follows:
[0101]
[0102] in, Represents the value of the reference point in XYZ space;
[0103] .
[0104] Figure 8 is a schematic diagram of an effect of performing color space conversion processing on a first image to obtain a second image provided by an embodiment of the present disclosure, such as Figure 8 As shown, the first image in RGB format is Figure 8 The left image is converted into a Lab format image by color space conversion. Figure 8 The picture on the right.
[0105] It should be noted that Figures 2 to 8The grayscale image is only used to simplify the key steps of the image processing process in the face recognition process. In actual use, the face recognition of the user uses a color image containing the user's face, such as an image in RGB format, to better recognize the user's face. At the same time, Figures 2 to 8 The images of users in the website are images that have been authorized for use by the users themselves.
[0106] In the embodiment of the present disclosure, after performing color space conversion processing on the first image to obtain the second image, the facial color recognition method may also include: calculating the first channel mean, first standard deviation and first color space vertex distance corresponding to each channel in the first image, and the second channel mean, second standard deviation and second color space vertex distance corresponding to each channel in the second image; performing distribution consistency detection on the first image and the second image based on a preset detection algorithm to obtain a first detection value corresponding to the first image and a second detection value corresponding to the second image.
[0107] In an embodiment of the present disclosure, when the first image is an RGB image, the first channel mean, first standard deviation and first color space vertex distance corresponding to each channel in the first image are calculated, that is, the first channel mean, first standard deviation and first color space vertex distance corresponding to the R channel, G channel and B channel are calculated respectively.
[0108] When the second image is a Lab image, the second channel mean, second standard deviation and second color space vertex distance corresponding to each channel in the second image, that is, the second channel mean, second standard deviation and second color space vertex distance corresponding to the L channel, a channel and b channel are calculated respectively.
[0109] Among them, the specific implementation method of calculating the channel mean, standard deviation and color space vertex distance corresponding to each channel is similar to the existing implementation method of calculating the channel mean, standard deviation and color space vertex distance of each channel in the image, and will not be repeated here.
[0110] In the embodiment of the present disclosure, the preset detection algorithm may be an algorithm for detecting the distribution consistency of two images. Exemplarily, the preset detection algorithm may be a Kolmogorov–Smirnov test algorithm, referred to as a KS test algorithm.
[0111] The following description takes the preset detection algorithm as the KS test algorithm as an example.
[0112] In the process of performing the KS test algorithm, the histograms of the RGB image and the Lab image of normal facial color are used as reference histograms, and the target histograms corresponding to the first image and the second image are used as inputs to perform distribution consistency detection on the first image and the second image.
[0113] In the process of distribution consistency detection, the first image and the second image correspond to two samples X1, X2, ..., X n and Y1, Y2, ..., Y m The corresponding cumulative distribution functions (CDFs) of these two books are F n (X) and G m (X), the unified calculation formula of the cumulative distribution function is as follows:
[0114]
[0115] Where X represents a given random variable.
[0116] From the above CDF formula, we can know that CDF (F (x)) represents the probability that the random variable X takes a value less than or equal to x. As x increases, F (x) is monotonically non-decreasing, and the value range of CDF is (0,1). When x tends to negative infinity, F (x) tends to 0, and when x tends to positive infinity, F (x) tends to 1. For two samples with cumulative distribution functions, the calculation formula of the KS test algorithm output detection value (p value) is as follows:
[0117]
[0118]
[0119] Among them, F n (X) represents the cumulative distribution function of sample X; G m (X) represents the cumulative distribution function of sample Y.
[0120] Based on the above formula, the first detection value corresponding to the first image and the second detection value corresponding to the second image can be obtained.
[0121] In the embodiment of the present disclosure, after statistical analysis of the first image and the second image, the first channel mean, the first standard deviation and the first color space vertex distance corresponding to each channel in the first image, the second channel mean, the second standard deviation and the second color space vertex distance corresponding to each channel in the second image, and the first detection value corresponding to the first image and the second detection value corresponding to the second image are obtained, and then output as the statistical analysis results of the first image and the second image. The above statistical analysis results can be used to quantitatively analyze the factors affecting facial color recognition in the facial color recognition process, thereby ensuring the reliability of the facial color recognition results. At the same time, it provides multi-dimensional analysis indicators for subsequent professionals to perform result analysis on facial images, ensures the consistency and standardization of the facial color recognition results, and further improves the accuracy of the facial color recognition results.
[0122] In the disclosed embodiment, before inputting the facial image into the feature point extraction model and extracting feature points from the facial image by the feature point extraction model to obtain the first result, the facial color recognition method may further include: acquiring the feature point extraction model.
[0123] Among them, obtaining a feature point extraction model can specifically include: obtaining a training sample set and the labeling results of each training sample in the training sample set; for each training sample, inputting the training sample into a preset machine learning model, and using the preset machine learning model to extract feature points from the training sample to obtain feature point extraction results; determining a loss value based on the feature point extraction results and the labeling results; and adjusting the parameters of the preset machine learning model based on the loss value until convergence to obtain a feature point extraction model.
[0124] In some embodiments of the present disclosure, after receiving the model training instruction, the electronic device may parse the model training instruction to obtain a training sample set and a labeling result of each training sample in the training sample set.
[0125] In other embodiments of the present disclosure, after receiving a model training instruction, the electronic device can obtain a training sample set by searching a preset database based on the model training instruction, and then label each training sample in the training sample set based on a preset labeling tool to obtain a labeling result corresponding to each training sample.
[0126] The training sample set may be an image containing a face, an image containing a face with eyes occluded, or an image obtained by preprocessing an image containing a face or an image containing a face with eyes occluded, and there is no limitation here.
[0127] The sources of the training sample set can be images collected by the TCM intelligent robot, user images collected by image acquisition equipment, Internet public data, and images that have been collected and desensitized.
[0128] When training the feature point extraction model, the annotation results of the training samples can be the feature points corresponding to the face in the training samples, such as the feature points corresponding to the nose, mouth, eyebrows, face, etc., the position information of each feature point, and can also include the category to which each feature point belongs. When the training sample is an image containing a face and after the eyes are blocked, the annotation results do not include the eye feature points.
[0129] Specifically, when the electronic device trains the feature point extraction model, it obtains a training sample set and the labeling results of each training sample in the training sample set; for each training sample, the training sample is input into a preset machine learning model, and the preset machine learning model extracts feature points from the training sample to obtain feature point extraction results, determines a loss value based on the feature point extraction results and the labeling results and a preset loss function, and adjusts the parameters of the preset machine learning model based on the loss value until convergence to obtain a trained feature point extraction model.
[0130] Among them, the preset loss function can be a cross entropy loss function, a mean square error loss function, etc., which is not limited here.
[0131] In the embodiment of the present disclosure, before the image to be recognized is input into the image detection model and the image detection model detects the facial area in the image to be recognized, the facial color recognition method may further include: acquiring the image detection model.
[0132] Specifically, obtaining the image detection model may include: obtaining a first training sample set and a first annotation result of each first training sample in the first training sample set; for each first training sample, inputting the first training sample into the image detection model to be trained, and having the image detection model to be trained perform facial area detection on the first training sample to obtain a facial area detection result; determining a first loss value based on the facial area detection result and the first annotation result; and adjusting the parameters of the image detection model to be trained based on the first loss value until convergence to obtain a trained image detection model.
[0133] In the embodiment of the present disclosure, the specific implementation of obtaining the first training sample set is similar to the implementation of obtaining the training sample set in the above embodiment of the present disclosure, and will not be described in detail here.
[0134] The first training sample set may be images containing faces, images containing faces with eyes occluded, or images obtained by preprocessing images containing faces or images containing faces with eyes occluded, and there is no limitation here.
[0135] The first labeling result may include a detection frame corresponding to the face in the first training sample, and may also include position information of the detection frame.
[0136] Specifically, when training an image detection model, the electronic device obtains a first training sample set and a first annotation result corresponding to each first training sample in the first training sample set; for each first training sample, the first training sample is input into the image detection model to be trained, and the image detection model to be trained performs facial area detection on the first training sample to obtain a facial area detection result, determines a first loss value based on the facial area detection result and the first annotation result and a preset first loss function, and adjusts the parameters of the image detection model to be trained based on the first loss value until convergence to obtain a trained image detection model.
[0137] Among them, the first loss function can be a cross entropy loss function, a mean square error loss function, a LOU loss function, etc., which is not limited here.
[0138] In the embodiment of the present disclosure, before inputting the second image into the facial color recognition model and performing facial color recognition on the second image by the facial color recognition model, the facial color recognition method may further include: acquiring the facial color recognition model.
[0139] Specifically, obtaining the facial color recognition model may include: obtaining a second training sample set and a second annotation result of each second training sample in the second training sample set; for each second training sample, inputting the second training sample into the facial color recognition model to be trained, and having the facial color recognition model to be trained perform facial color recognition on the second training sample to obtain a facial color recognition result; determining a second loss value based on the facial color recognition result and the second annotation result; adjusting the parameters of the facial color recognition model to be trained based on the second loss value until convergence, to obtain a trained facial color recognition model.
[0140] In the embodiment of the present disclosure, the specific implementation of obtaining the second training sample set is similar to the implementation of obtaining the training sample set in the above embodiment of the present disclosure, and will not be described in detail here.
[0141] The second training sample set may be a LAB format image containing a face, or a LAB format image containing a face and after eyes are occluded, or a LAB format image obtained by preprocessing an image containing a face or an image containing a face and after eyes are occluded, and there is no limitation here.
[0142] The second labeling result may include a facial color recognition result corresponding to the face in the second training sample, and may also include a confidence level corresponding to the facial color recognition result.
[0143] Specifically, when training a facial color recognition model, the electronic device obtains a second training sample set and a second annotation result corresponding to each second training sample in the second training sample set; for each second training sample, the second training sample is input into the facial color recognition model to be trained, and the facial color recognition model to be trained performs facial color recognition on the second training sample to obtain a facial color recognition result, determines a second loss value based on the facial color recognition result, the second annotation result and a preset second loss function, and adjusts the parameters of the facial color recognition model to be trained based on the second loss value until convergence to obtain a trained facial color recognition model.
[0144] Among them, the second loss function can be a cross entropy loss function, a Hinge loss function, a KL divergence loss function, etc., which is not limited here.
[0145] After obtaining the trained image detection model, feature point extraction model, and facial color recognition model, you can also adjust hyperparameters and monitor overfitting through the validation set, and evaluate the model performance of the trained image detection model, feature point extraction model, and facial color recognition model through the test set.
[0146] In the embodiments of the present disclosure, in order to ensure the generalization ability and robustness of the image detection model, feature point extraction model and facial color recognition model, the training set, validation set and test set are divided according to preset ratios, so as to balance the amount of data in the training process and ensure that the model can be fully learned and adjusted in the training and validation stages, and a comprehensive performance evaluation can be carried out in the testing stage.
[0147] For example, for the image detection model and the feature point extraction model, the ratio of the number of training sets, validation sets and test sets can be 8:1:1; for the facial color recognition model, the ratio of the number of training sets, validation sets and test sets can be 65:15:20.
[0148] In the disclosed embodiments, the image detection model, feature point extraction model and complexion recognition model obtained through model training can perform face detection, feature point extraction and complexion recognition more accurately, thereby improving the accuracy of complexion recognition.
[0149] Fig. 9 is a flow chart of another facial color recognition method provided by an embodiment of the present disclosure. Fig. 9 As shown, the facial color recognition method specifically includes the following steps:
[0150] S910, obtaining an image to be recognized, preprocessing the image to be recognized to obtain a preprocessed third image, inputting the third image into an image detection model, and having the image detection model detect the facial area in the third image to obtain a second result; based on the second result, cropping the image to be recognized to obtain a facial image of the user.
[0151] S920: Input the facial image into a feature point extraction model, and use the feature point extraction model to extract feature points from the facial image to obtain a first result, wherein the first result includes multiple feature points corresponding to the facial area and position information of each feature point.
[0152] S930, determining the category corresponding to each feature point in the first result; sequentially connecting multiple target feature points belonging to the same category based on the category corresponding to each feature point and the position information of each feature point to obtain contour lines corresponding to each category.
[0153] S940: Perform mask processing on the target area in the facial image based on the contour line to obtain a first image.
[0154] S950: Perform color space conversion processing on the first image to obtain a second image.
[0155] S960: Input the second image into a facial color recognition model, and use the facial color recognition model to perform facial color recognition on the second image to obtain a facial color recognition result.
[0156] In the disclosed embodiment, the user's facial image can be obtained by preprocessing the image to be recognized, and then performing image detection on the preprocessed third image based on the image detection model. Then, feature points are extracted from the user's facial image based on the feature point extraction model to obtain a first result, and the contour line of the target area is determined based on the categories, i.e., the position information, corresponding to the multiple feature points in the first result, and then the facial image is masked based on the contour line to obtain a first image, and the first image is converted to a color space to obtain a second image. After the second image is obtained, the second image is input into the complexion recognition model, and the complexion recognition model performs complexion recognition on the second image to obtain a complexion recognition result. Thus, the target area in the user's facial image can be masked to avoid the influence of environmental interference in the facial image on complexion recognition, and the first image after masking is converted to a color space, so that the color space of the obtained second image can better represent the color characteristics of the facial skin, thereby improving the accuracy of complexion recognition.
[0157] Fig.10 It is a structural schematic diagram of a facial color recognition device provided in an embodiment of the present disclosure.
[0158] In the disclosed embodiment, the facial color recognition device can be arranged in an electronic device, and is understood as a part of the functional modules in the electronic device. Specifically, the electronic device can be a server or a terminal, wherein the terminal specifically includes a mobile phone, a computer or a tablet computer, etc., which is not limited here.
[0159] like Fig.10 As shown, the facial color recognition device 1000 may include an image acquisition module 1010 , a feature point extraction module 1020 , a mask processing module 1030 , a conversion processing module 1040 and a facial color recognition module 1050 .
[0160] The image acquisition module 1010 can be used to acquire a facial image of a user.
[0161] The feature point extraction module 1020 can be used to input the facial image into the feature point extraction model, and the feature point extraction model extracts feature points from the facial image to obtain a first result, wherein the first result includes multiple feature points corresponding to the facial area in the facial image and the location information of each feature point.
[0162] The mask processing module 1030 can be used to perform mask processing on the target area in the facial image based on the first result to obtain a first image, where the target area includes the facial features area and the background area in the facial image.
[0163] The conversion processing module 1040 can be used to perform color space conversion processing on the first image to obtain a second image.
[0164] The facial color recognition module 1050 can be used to input the second image into a facial color recognition model, and the facial color recognition model performs facial color recognition on the second image to obtain a facial color recognition result.
[0165] In the disclosed embodiment, after acquiring the facial image of the user, the facial image can be input into the feature point extraction model, and the feature point extraction model extracts the feature points of the facial image to obtain a first result, wherein the first result includes a plurality of feature points corresponding to the facial region and the position information of each feature point. Then, based on the first result, the target region in the facial image is masked to obtain a first image, wherein the target region includes the facial features region and the background region in the facial image; the first image is subjected to color space conversion processing to obtain a second image; the second image is input into the complexion recognition model, and the complexion recognition model performs complexion recognition on the second image to obtain a complexion recognition result. Thus, by masking the target region in the facial image of the user, the influence of environmental interference in the facial image on complexion recognition can be avoided, and at the same time, the color space conversion processing is performed on the masked first image, so that the color space of the obtained second image can better represent the color characteristics of the facial skin, thereby improving the accuracy of complexion recognition.
[0166] In some embodiments of the present disclosure, the image acquisition module 1010 may be specifically used to acquire an image to be identified, where the image to be identified is an image containing a user's facial region;
[0167] Inputting the image to be identified into the image detection model, the image detection model detects the facial area in the image to be identified, and obtains a second result, wherein the second result includes a detection frame and pixel coordinates corresponding to the facial area;
[0168] The image to be recognized is cropped based on the second result to obtain a facial image.
[0169] In some embodiments of the present disclosure, the facial color recognition device 1000 may further include an image preprocessing module.
[0170] The image preprocessing module can be used to preprocess the image to be recognized after acquiring the image to be recognized to obtain a preprocessed third image, and the preprocessing includes at least one of eye occlusion processing, denoising processing, color correction processing and brightness standardization processing.
[0171] The image acquisition module 1010 can also be specifically used to input the third image into the image detection model, and the image detection model detects the facial area in the third image to obtain a second result.
[0172] In some embodiments of the present disclosure, the mask processing module 1030 may be specifically used to create a blank mask image, and display the multiple feature points in the first result in the blank mask image, wherein the size of the blank mask image is consistent with the image size of the facial image;
[0173] Determine a category corresponding to each of the plurality of feature points in the first result;
[0174] Based on the category corresponding to each feature point and the position information of each feature point, multiple target feature points belonging to the same category are sequentially connected to obtain the contour lines corresponding to each category in the blank mask image;
[0175] A mask process is performed on the target area in the facial image based on the contour line to obtain a first image.
[0176] In some embodiments of the present disclosure, the mask processing module 1030 may also be specifically used to determine first contour lines of a face category and second contour lines corresponding to other categories other than a face;
[0177] Performing a first filling process on a first area corresponding to the first contour line, and performing a second filling process on a second area corresponding to the second contour line, to obtain a facial mask image;
[0178] Masking is performed on a target area in the facial image based on the facial mask map to obtain a first image.
[0179] In some embodiments of the present disclosure, the facial color recognition device 1000 may further include a model acquisition module.
[0180] The model acquisition module can be used to acquire the feature point extraction model before inputting the facial image into the feature point extraction model and extracting feature points from the facial image by the feature point extraction model to obtain the first result.
[0181] The model acquisition module can be specifically used to obtain the training sample set and the annotation results of each training sample in the training sample set;
[0182] For each training sample, the training sample is input into a preset machine learning model, and the preset machine learning model extracts feature points from the training sample to obtain a feature point extraction result;
[0183] Determine the loss value based on the feature point extraction result and the labeling result;
[0184] Based on the loss value, the parameters of the preset machine learning model are adjusted until convergence to obtain a feature point extraction model.
[0185] In some embodiments of the present disclosure, the facial color recognition device 1000 may further include a data analysis module.
[0186] The data analysis module can be used to calculate the first channel mean, first standard deviation and first color space vertex distance corresponding to each channel in the first image, and the second channel mean, second standard deviation and second color space vertex distance corresponding to each channel in the second image after performing color space conversion processing on the first image to obtain the second image;
[0187] Based on a preset detection algorithm, distribution consistency detection is performed on the first image and the second image respectively to obtain a first detection value corresponding to the first image and a second detection value corresponding to the second image.
[0188] It should be noted that Fig.10 The facial color recognition device 1000 shown can execute each step in the above method embodiment and realize each process and effect in the above method embodiment, which will not be described in detail here.
[0189] Fig.11 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure.
[0190] In the disclosed embodiment, Fig.11 The electronic device shown may be a server or a terminal, wherein the terminal specifically includes a mobile phone, a computer or a tablet computer, etc., which is not limited here.
[0191] like Fig.11 As shown, the electronic device may include a processor 1110 and a memory 1120 storing computer program instructions.
[0192] Specifically, the processor 1110 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present disclosure.
[0193] The memory 1120 may include a large capacity memory for information or instructions. By way of example and not limitation, the memory 1120 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 1120 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 1120 may be inside or outside the integrated gateway device. In a specific embodiment, the memory 1120 is a non-volatile solid-state memory. In a specific embodiment, the memory 1120 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM) or flash memory, or a combination of two or more of these.
[0194] The processor 1110 reads and executes the computer program instructions stored in the memory 1120 to perform the steps of the facial color recognition method provided in the embodiment of the present disclosure.
[0195] In one example, the electronic device may further include a transceiver 1130 and a bus 1140. Fig.11 As shown, the processor 1110 , the memory 1120 , and the transceiver 1130 are connected via a bus 1140 and communicate with each other.
[0196] The bus 1140 includes hardware, software, or both. For example, but not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a Memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 1140 may include one or more buses.
[0197] The embodiment of the present disclosure further provides a computer-readable storage medium, which may store a computer program. When the computer program is executed by a processor, the processor implements the facial color recognition method provided by the embodiment of the present disclosure.
[0198] The storage medium may include, for example, a memory 1120 of computer program instructions, and the instructions may be executed by a processor 1110 of the electronic device to complete the facial color recognition method provided by the embodiment of the present disclosure. Optionally, the storage medium may be a non-temporary computer-readable storage medium, for example, a non-temporary computer-readable storage medium may be a ROM, a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
[0199] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A facial color recognition method, characterized in that: include: Get the user's facial image; Inputting the facial image into a feature point extraction model, and extracting feature points from the facial image by the feature point extraction model to obtain a first result, wherein the first result includes a plurality of feature points corresponding to a facial region in the facial image and position information of each feature point; performing mask processing on a target area in the facial image based on the first result to obtain a first image, wherein the target area includes a facial feature area and a background area in the facial image; Performing color space conversion processing on the first image to obtain a second image; Inputting the second image into a facial color recognition model, and using the facial color recognition model to perform facial color recognition on the second image to obtain a facial color recognition result; The step of performing mask processing on the target area in the facial image based on the first result to obtain a first image includes: Creating a blank mask image, and displaying the plurality of feature points in the first result in the blank mask image, respectively, wherein the size of the blank mask image is consistent with the image size of the facial image; Determine a category corresponding to each feature point in the plurality of feature points in the first result; Based on the category corresponding to each feature point and the position information of each feature point, multiple target feature points belonging to the same category are sequentially connected to obtain contour lines corresponding to each category in the blank mask image; Mask processing is performed on the target area in the facial image based on the contour line to obtain the first image.
2. The method according to claim 1, characterized in that The step of obtaining a facial image of a user comprises: Acquire an image to be identified, where the image to be identified is an image containing a facial area of the user; Inputting the image to be identified into an image detection model, and having the image detection model detect a facial region in the image to be identified to obtain a second result, wherein the second result includes a detection frame and pixel coordinates corresponding to the facial region; The image to be recognized is cropped based on the second result to obtain the facial image.
3. The method according to claim 2, characterized in that After acquiring the image to be identified, the method further includes: Preprocessing the image to be recognized to obtain a preprocessed third image, wherein the preprocessing includes at least one of eye occlusion processing, denoising processing, color correction processing, and brightness normalization processing; The step of inputting the image to be identified into an image detection model, and having the image detection model detect a facial region in the image to be identified to obtain a second result, comprises: The third image is input into the image detection model, and the image detection model detects the facial area in the third image to obtain the second result.
4. The method according to claim 1, characterized in that: The step of performing mask processing on the target area in the facial image based on the contour line to obtain the first image includes: Determine that the first contour line of the face category and the second contour lines of other categories other than the face correspond to each other; Performing a first filling process on a first area corresponding to the first contour line, and performing a second filling process on a second area corresponding to the second contour line, to obtain a facial mask image; Masking is performed on a target area in the facial image based on the facial mask map to obtain the first image.
5. The method according to claim 1, characterized in that Before inputting the facial image into the feature point extraction model and extracting feature points from the facial image by the feature point extraction model to obtain the first result, the method further includes: Acquire the feature point extraction model; The obtaining of the feature point extraction model comprises: Obtaining a training sample set and a labeling result of each training sample in the training sample set; For each training sample, the training sample is input into a preset machine learning model, and the preset machine learning model extracts feature points from the training sample to obtain a feature point extraction result; Determine a loss value based on the feature point extraction result and the labeling result; The parameters of the preset machine learning model are adjusted based on the loss value until convergence to obtain the feature point extraction model.
6. The method according to claim 1, characterized in that After performing color space conversion processing on the first image to obtain the second image, the method further includes: Calculate a first channel mean, a first standard deviation, and a first color space vertex distance corresponding to each channel in the first image, and a second channel mean, a second standard deviation, and a second color space vertex distance corresponding to each channel in the second image; Based on a preset detection algorithm, distribution consistency detection is performed on the first image and the second image respectively to obtain a first detection value corresponding to the first image and a second detection value corresponding to the second image.
7. A facial color recognition device, characterized in that: include: An image acquisition module, used to acquire a user's facial image; A feature point extraction module, used for inputting the facial image into a feature point extraction model, and extracting feature points from the facial image by the feature point extraction model to obtain a first result, wherein the first result includes a plurality of feature points corresponding to a facial region in the facial image and position information of each feature point; a mask processing module, configured to perform mask processing on a target area in the facial image based on the first result to obtain a first image, wherein the target area includes a facial feature area and a background area in the facial image; A conversion processing module, used for performing color space conversion processing on the first image to obtain a second image; A facial color recognition module, used for inputting the second image into a facial color recognition model, and having the facial color recognition model perform facial color recognition on the second image to obtain a facial color recognition result; The mask processing module is specifically used to create a blank mask map, and display multiple feature points in the first result in the blank mask map respectively, wherein the size of the blank mask map is consistent with the image size of the facial image; determine the category corresponding to each of the multiple feature points in the first result; based on the category corresponding to each feature point and the position information of each feature point, sequentially connect multiple target feature points belonging to the same category to obtain contour lines corresponding to each category in the blank mask map; mask the target area in the facial image based on the contour lines to obtain the first image.
8. An electronic device, characterized in that: include: processor; A memory for storing executable instructions; Wherein, the processor is used to read the executable instructions from the memory and execute the executable instructions to implement the facial color recognition method described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the processor implements the facial color recognition method described in any one of claims 1 to 6.
