Face skin feature analysis method, device, equipment, medium and product

By collecting face images under different light sources and generating derivative images, inputting the object detection model to analyze skin characteristics, the problem that the existing technology cannot comprehensively analyze skin status is solved, and rapid and accurate skin evaluation is achieved, providing a scientific basis for care and treatment.

CN119867646APending Publication Date: 2025-04-25FOSHAN LINGMI MEDICAL EQUIP CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411928639.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The existing skin characteristic analysis methods cannot be analyzed for the overall status of the skin.

Method used

By collecting target face images of target users under different light sources, including natural light, parallel polarized light, cross-polarized light and ultraviolet light, and generating derivative images based on preset derivation algorithms, including brown area maps, red area maps and ultraviolet spot maps. These images are input into the object detection model to obtain the results of intelligent skin analysis.

Benefits of technology

A rapid and accurate overall evaluation of facial images is achieved, providing a scientific basis for personal care and skin treatment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119867646A_ABST
    Figure CN119867646A_ABST
Patent Text Reader

Abstract

The invention discloses a face skin feature analysis method, device, equipment, medium and product, and relates to the technical field of skin detection.The method comprises the steps that target face images of a target user under different light sources are collected, and the light sources comprise natural light, parallel polarized light, cross polarized light and ultraviolet light; on the basis of a preset derivation algorithm, a derivative image of the target face image is generated, the derivative image comprises a brown area map, a red area map and an ultraviolet ray spot map, the brown area map comprises a shallow layer brown area map, a deep layer brown area map and a brown area thermodynamic map, and the red area map comprises a red blood streak map, a shallow layer red area map, a deep layer red area map and a red area thermodynamic map; and inputting the derivative image into a target detection model to obtain an intelligent analysis result for the target face image. According to the invention, accurate skin analysis can be realized for the face image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of skin detection technology, and in particular to methods, devices, equipment, media and products for analyzing facial skin features. Background Art

[0002] With the continuous development of science and technology, people are paying more and more attention to skin health. However, the existing skin feature analysis methods mainly focus on the analysis of a single feature and cannot analyze the overall condition of the skin.

[0003] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0004] The main purpose of this application is to provide a facial skin feature analysis method, device, equipment, medium and product, aiming to solve the technical problem that the existing skin feature analysis method cannot analyze the overall condition of the skin.

[0005] To achieve the above objectives, the present application proposes a method for analyzing facial skin features, the method comprising:

[0006] Collecting target face images of target users under different light sources, wherein the light sources include natural light, parallel polarized light, cross polarized light, and ultraviolet light;

[0007] Based on a preset derivative algorithm, a derivative image of the target face image is generated, wherein the derivative image includes a brown area map, a red area map, and an ultraviolet spot map, the brown area map includes a shallow brown area map, a deep brown area map, and a brown area thermal map, and the red area map includes a red bloodshot map, a shallow red area map, a deep red area map, and a red area thermal map;

[0008] The target face image and the derived image are input into a target detection model to obtain an intelligent skin analysis result for the target face image.

[0009] In one embodiment, the step of generating a derivative image of the target face image based on a preset derivative algorithm includes:

[0010] Performing color channel separation on the target face image to obtain channel images of different color channels;

[0011] Performing binarization processing on the channel image to obtain a binarized image;

[0012] Based on an image filtering algorithm, the binary image is processed to obtain a filtered image;

[0013] Based on an image enhancement algorithm, performing image enhancement on the filtered image to obtain an enhanced image;

[0014] Identifying and extracting a face region in the enhanced image;

[0015] A mask is set for the face region, and a derivative image of the target face image is generated based on the mask.

[0016] In one embodiment, before the step of inputting the target face image and the derived image into a target detection model to obtain an intelligent skin analysis result for the target face image, the step further includes:

[0017] Collect an initial set of face images under different light sources;

[0018] Randomly extracting face images from the initial face image set, and merging the face images into a target image according to a preset ratio;

[0019] Adding the target image to the initial face image set to obtain a face image set;

[0020] Determining label information of all images in the face image set;

[0021] Based on the face image set and the label information, an initial target detection model is trained to obtain a target detection model.

[0022] In one embodiment, the step of training the initial target detection model based on the face image set and the label information to obtain the target detection model includes:

[0023] Inputting the face images in the face image set into the initial target detection model to obtain prediction information;

[0024] Based on the predicted bounding box loss function, generating a target loss value according to the predicted information and the label information, wherein the predicted bounding box loss function determines the loss value according to the overlapping area, center point distance and aspect ratio of the predicted box and the real box;

[0025] According to the target loss value, the model parameters of the initial target detection model are updated to obtain a target detection model.

[0026] In one embodiment, the step of inputting the target face image and the derived image into a target detection model to obtain an intelligent skin analysis result for the target face image comprises:

[0027] The target facial image and the derived image are input into a target detection model to obtain an intelligent skin analysis result for the target facial image, wherein the target detection model includes an input layer, a backbone network, a neck network and a prediction layer, the C3 network in the backbone network is replaced with a lightweight neural network, and the C3 network in the neck network is replaced with a preset attention mechanism, and the preset attention mechanism includes the C3 network and the SE attention mechanism.

[0028] In one embodiment, the step of inputting the target face image and the derived image into a target detection model to obtain an intelligent skin analysis result for the target face image comprises:

[0029] Inputting the target face image and the derived image into a target detection model to obtain target skin feature information for the target face image, wherein the target skin feature information includes pore information, blackhead information, ultraviolet freckle information, redness information, acne information, and brown spot information;

[0030] Determining a maximum cosine similarity between the target skin feature information and skin feature information stored in a target database;

[0031] Using the analysis result corresponding to the maximum cosine similarity in the target database as the initial analysis result of the target face image;

[0032] The initial analysis result is optimized according to the user information of the target user to obtain an intelligent analysis result for the target facial image.

[0033] In addition, to achieve the above-mentioned purpose, the present application also proposes a facial skin feature analysis device, the facial skin feature analysis device comprising:

[0034] A collection module, used for collecting target face images of target users under different light sources, wherein the light sources include natural light, parallel polarized light, cross polarized light and ultraviolet light;

[0035] A generating module, configured to generate a derivative image of the target face image based on a preset derivative algorithm, wherein the derivative image includes a brown area map, a red area map, and an ultraviolet spot map, the brown area map includes a shallow brown area map, a deep brown area map, and a brown area thermal map, and the red area map includes a red bloodshot map, a shallow red area map, a deep red area map, and a red area thermal map;

[0036] The input module is used to input the target face image and the derived image into the target detection model to obtain the intelligent skin analysis result for the target face image.

[0037] In addition, to achieve the above-mentioned purpose, the present application also proposes a facial skin feature analysis device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the facial skin feature analysis method described above.

[0038] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the facial skin feature analysis method described above are implemented.

[0039] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the facial skin feature analysis method as described above.

[0040] One or more technical solutions proposed in this application have at least the following technical effects:

[0041] The facial skin feature analysis method, device, equipment, medium and product proposed in the present application collect target facial images of target users under different light sources, wherein the light sources include natural light, parallel polarized light, cross-polarized light and ultraviolet light; based on a preset derivative algorithm, generate a derivative image of the target facial image, wherein the derivative image includes a brown area map, a red area map and an ultraviolet spot map, the brown area map includes a shallow brown area map, a deep brown area map and a brown area heat map, and the red area map includes a red bloodshot map, a shallow red area map, a deep red area map and a red area heat map; input the target facial image and the derivative image into a target detection model to obtain an intelligent skin analysis result for the target facial image, thereby solving the technical problem that the existing skin feature analysis method cannot analyze the overall state of the skin. Compared with the existing technology, the present application derives the input image of the target detection module after collecting facial images under different spectra, and uses the target detection module to more comprehensively evaluate and analyze skin features. This method can quickly and accurately perform an overall evaluation of the skin state of the facial image, thereby providing a scientific basis for personal care and skin treatment. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0043] In order to more clearly illustrate the embodiments of the present application 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 labor.

[0044] Figure 1 A schematic diagram of a process flow provided in Example 1 of the present applicant's facial skin feature analysis method;

[0045] Figure 2 A diagram of the model training process of the target detection model in the facial skin feature analysis method provided in Example 2 of the present application;

[0046] Figure 3 A schematic diagram of a flow chart provided for the second embodiment of the facial skin feature analysis method of the present applicant;

[0047] Figure 4 This is a schematic diagram of the module structure of the facial skin feature analysis device according to an embodiment of the present application;

[0048] Figure 5 Schematic diagram of the device structure of the hardware operating environment involved in the facial skin feature analysis method in the embodiment of the present application.

[0049] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0050] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0051] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0052] The main solution of the embodiment of the present application is: collecting target facial images of target users under different light sources, wherein the light sources include natural light, parallel polarized light, cross-polarized light and ultraviolet light; generating a derivative image of the target facial image based on a preset derivative algorithm, wherein the derivative image includes a brown area map, a red area map and an ultraviolet spot map, the brown area map includes a shallow brown area map, a deep brown area map and a brown area heat map, and the red area map includes a red bloodshot map, a shallow red area map, a deep red area map and a red area heat map; inputting the target facial image and the derivative image into a target detection model to obtain an intelligent skin analysis result for the target facial image.

[0053] It can be seen from the above embodiments that the present application collects target facial images of target users under different light sources, wherein the light sources include natural light, parallel polarized light, cross-polarized light and ultraviolet light; based on a preset derivative algorithm, generates a derivative image of the target facial image, wherein the derivative image includes a brown area map, a red area map and an ultraviolet spot map, the brown area map includes a shallow brown area map, a deep brown area map and a brown area heat map, and the red area map includes a red bloodshot map, a shallow red area map, a deep red area map and a red area heat map; the target facial image and the derivative image are input into a target detection model to obtain an intelligent skin analysis result for the target facial image, thereby solving the technical problem that the existing skin feature analysis method cannot analyze the overall state of the skin. Compared with the prior art, the present application derives the input image of the target detection module after collecting facial images under different spectra, and uses the target detection module to more comprehensively evaluate and analyze skin features. This method can quickly and accurately perform an overall evaluation of the skin state for facial images, thereby providing a scientific basis for personal care and skin treatment.

[0054] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a facial skin feature analysis device, etc. The following takes facial skin feature analysis as an example to illustrate this embodiment and the following embodiments.

[0055] Based on this, the present application embodiment provides a method for analyzing facial skin features, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the facial skin feature analysis method of the present applicant.

[0056] In this embodiment, the facial skin feature analysis method includes steps S10 to S40:

[0057] Step S10, collecting target face images of the target user under different light sources, wherein the light sources include natural light, parallel polarized light, cross polarized light and ultraviolet light;

[0058] It should be noted that the face images collected under natural light can provide rich colors and details because it contains all the colors in the visible spectrum. Natural light can provide more realistic facial features. By using parallel polarized light, the high light reflection on the surface can be reduced or eliminated, thereby improving the image quality. For example, by adjusting the polarizer in front of the light source, the high light spots on the collected reference surface image can be eliminated to obtain a clearer image. Cross-polarized light: cross-polarized light refers to a light source with two polarization directions perpendicular to each other. When collecting face images, cross-polarized light can be used to obtain face images in different polarization states, which helps to analyze and understand the structure and texture of the face surface. By comparing images in different polarization states, more facial feature information can be extracted. Ultraviolet light is a non-visible light that can provide information different from visible light. Ultraviolet light has a lower effect on the stability of face images, so it can be used outdoors and can overcome the impact of changes in ambient light on face recognition. Ultraviolet light can also reveal some hidden features of the face, such as blood vessel patterns, which are invisible under visible light. The ultraviolet light source can be UVA, UVB or UVC.

[0059] It is understandable that different light sources can reveal different features of the face, which is of great significance for improving the accuracy and robustness of face recognition. By collecting face images under different light sources, facial features can be more comprehensively understood and analyzed, thereby achieving more accurate recognition in various applications.

[0060] Step S20, generating a derivative image of the target face image based on a preset derivative algorithm, wherein the derivative image includes a brown area map, a red area map, and an ultraviolet spot map, and the red area map includes a red bloodshot map, a shallow red area map, a deep red area map, and a red area heat map;

[0061] It should be noted that the main brownfield maps include shallow brownfield maps, deep brownfield maps and brownfield thermal Figure 3 There are 2 types of images. The shallow brown area map and the deep brown area map are used to reflect the skin pigmentation conditions of the shallow and deep layers, such as pigmentation, freckles, freckle-like nevus, chloasma, etc. When melanin is secreted uncontrollably (excessive secretion), brown spots will appear. Melanin is produced by melanocytes in the basal layer of the skin. The brown area image enhancement technology algorithm can be used to separate the brown color components in the skin and detect the melanin spots that are invisible to the naked eye in the bottom layer of the skin. Among them, the brown area heat map is to more intuitively reflect the severity of the skin. By using image enhancement technology and the algorithm of symptom image mapping analysis, the skin is represented by a blue-green-yellow-red gradient mapping method, where blue is healthy skin and red is severe skin.

[0062] It should be noted that the red zone map mainly includes red blood line map, shallow red zone map, deep red zone map and red zone thermal map. Figure 4 There are three types of images. Among them, the red blood streak image, shallow red area image and deep red area image are used to reflect the sensitivity of the skin and the condition of capillaries, such as acne, inflammation, rosacea or spider nevi. Among them, blood vessels and hemoglobin exist in the dermal papillary layer of the skin, which constitute the red area. By separating the red components of the skin, the red area image enhancement technology algorithm is used to separate the red area in the skin and highlight the related symptoms. Among them, the red area heat map is to more intuitively reflect the severity of the skin. By using image enhancement technology and the algorithm of symptom image mapping analysis, the skin is represented by a blue-green-yellow-red gradient mapping method, where blue is healthy skin and red is severe skin.

[0063] It should be noted that the UV spot image is used to reflect the condition of the skin after being exposed to ultraviolet light, such as chloasma, freckles, etc. UV spots appear due to the accumulation of melanin under the epidermis, which is the result of sun damage. By utilizing the property that melanin in the epidermis does not fluoresce under ultraviolet light, the UV spot image enhancement algorithm is used to enhance the image using trace amounts of ultraviolet light, so that the distribution and severity of melanin in the epidermis can be analyzed.

[0064] In a feasible implementation, the step of generating a derivative image of the target facial image based on a preset derivative algorithm includes: performing color channel separation on the target facial image to obtain channel images of different color channels; binarizing the channel image to obtain a binarized image; processing the binarized image based on an image filtering algorithm to obtain a filtered image; performing image enhancement on the filtered image based on an image enhancement algorithm to obtain an enhanced image; identifying and extracting a facial area in the enhanced image; setting a mask for the facial area, and generating a derivative image of the target facial image based on the mask.

[0065] It should be noted that the input target face image is decomposed into individual channels of its constituent colors, such as red (R), green (G), and blue (B) channels, so that the distribution and intensity of each color in the image can be analyzed separately; the image of each color channel is converted into a binary image, that is, each pixel in the image has only two possible values ​​(usually 0 and 1 or 0 and 255), which helps to simplify the image data, making subsequent processing more efficient, and can highlight specific features in the image; a filtering algorithm is applied to the binarized image to remove noise or unwanted details. The filtering can be Gaussian filtering, median filtering, or other types of filtering, depending on the type of noise to be removed and the desired image characteristics; the image enhancement algorithm can be applied to the filtered image Enhancement is performed to improve the visual effect of the image or highlight certain features. Enhancement may include contrast enhancement, brightness adjustment, color correction, etc. to make the facial features in the image more obvious; face detection algorithms (such as Haar features, deep learning models, etc.) can be used to identify the face area in the image and extract it from the background; a mask is created for the extracted face area. The mask is a binary image of the same size as the original image, in which the face area is 1 (or 255) and the rest is 0; using the generated mask, the original image or enhanced image can be further processed to highlight facial features or perform other analysis. The derived image may be used for specific skin analysis, such as detecting spots, wrinkles or other skin conditions.

[0066] Step S30, inputting the target face image and the derived image into a target detection model to obtain an intelligent skin analysis result for the target face image.

[0067] It should be noted that the target detection model can adopt the YOLOv5 detection model, in which the target detection model adopts: 1. Anchor-free design: In traditional target detection algorithms, it is necessary to first determine the position of the object and give a candidate box, but YOLOv5 adopts an anchor-free design method to directly predict the position and size of the object, thereby avoiding the influence of the candidate box on the detection performance; 2. Multi-scale detection: The YOLOv5 algorithm can accurately detect targets of different scales, shapes and postures, and has good adaptability; 3. Accurate target positioning: YOLOv5 achieves accurate target positioning by deriving the center point coordinates, and optimizes both classification and regression, thereby improving target detection accuracy; 5. Fast detection speed: The use of efficient computing methods and the use of hardware acceleration technologies such as GPUs ensure that the YOLOv5 algorithm has a very fast detection speed while ensuring high accuracy, and is very suitable for deployment on edge devices.

[0068] It should be noted that the results of smart skin analysis include the symptom score, symptom description, symptom characteristics, causes, and daily care of the user's face. For example, the pore symptom scored 62 points; symptom description: pores are clearly visible or contain keratin plugs smaller than the size of pores; symptom characteristics: pores are the openings of the skin, which help distribute natural oils or sebum to the surface of the skin. The cause of pore blockage is that the skin metabolism is not smooth and cannot fall off as expected, causing the pores to expand. With the increase of age, blood circulation gradually becomes unsmooth, and the subcutaneous fat layer of the skin is prone to loosening and lack of elasticity. If it is not properly maintained and cared for, it will accelerate aging and the pores will become larger; daily care: use a mild facial cleanser to cleanse the face, remove oil and dirt, and clean thoroughly. Do a facial mask once or twice a week to absorb excess oil and shrink pores.

[0069] In a feasible implementation, the step of inputting the target facial image and the derived image into the target detection model to obtain the intelligent skin analysis result for the target facial image also includes: collecting an initial facial image set under different light sources; randomly extracting facial images from the initial facial image set, and merging the facial images into a target image according to a preset ratio; adding the target image to the initial facial image set to obtain a facial image set; determining the label information of all images in the facial image set; and training the initial target detection model based on the facial image set and the label information to obtain a target detection model.

[0070] It should be noted that the Mosaic data enhancement algorithm can be used to merge several images into one image according to a certain ratio. This approach is conducive to the model's ability to identify targets in smaller areas. Mosaic data enhancement has several advantages: 1. The data set is more diverse and rich: for example, 4 pictures are randomly used, randomly scaled and randomly spliced, and many small targets are added, which greatly increases the diversity of the data. 2. Enhance the robustness of the model: Mixing four pictures with different semantic information can enable the model to detect objects beyond the conventional context; 3. The effect of adding a batch normalization layer (BN Batch-Normal): If the model is created using the BN operation, try to increase the total batch size (BatchSize) during training, because the principle of BN is to calculate the mean and variance of each feature layer. If the total batch size is larger, the mean and variance calculated by BN are closer to the mean and variance of the entire data set, and the effect is better; 4. The Mosaic enhancement algorithm is conducive to detecting small objects: the image is composed of four original images, so the probability of each image containing a small object is higher, which improves the detection performance of the model.

[0071] In a feasible implementation, the step of training the initial target detection model based on the face image set and the label information to obtain the target detection model includes: inputting the face images in the face image set into the initial target detection model to obtain prediction information; based on the prediction bounding box loss function, generating a target loss value according to the prediction information and the label information, wherein the prediction bounding box loss function determines the loss value according to the overlapping area between the prediction box and the real box, the center point distance and the aspect ratio; according to the target loss value, updating the model parameters of the initial target detection model to obtain the target detection model.

[0072] It should be noted that a predicted bounding box loss function is used to measure the difference between the bounding box predicted by the model (the predicted box in the prediction information) and the actually annotated bounding box (the real box in the label information). This loss function takes into account the following factors: overlapping area, the ratio of the intersection over union (IoU) of the predicted box and the real box; center point distance, the Euclidean distance between the center point of the predicted box and the center point of the real box; aspect ratio, the consistency of the aspect ratio of the predicted box and the real box.

[0073] It can be understood that the calculated target loss value is used to update the parameters of the initial target detection model through the back-propagation algorithm, and the learning rate of the model can also be adjusted through cosine annealing. This process involves gradient descent or its variants, and the purpose is to minimize the loss function, thereby improving the prediction accuracy of the model.

[0074] It should be noted that if Figure 2 As shown in the figure, in YOLOv5, the loss function of the bounding box predicted by regression is CIOU_LOSS. The CIOU loss function adds constraints on the center point distance and aspect ratio on the basis of IOU, so that the difference between the predicted box and the real box can be evaluated more accurately. The CIOU loss function is more sensitive to the position prediction of the target box because it considers the consistency of the diagonal distance and aspect ratio of the target box. In addition, the CIOU loss function takes into account the shape information of the target box in its design, making the loss more robust to target boxes of different shapes.

[0075] In a feasible implementation, the step of inputting the target facial image and the derived image into a target detection model to obtain an intelligent skin analysis result for the target facial image includes: inputting the target facial image and the derived image into a target detection model to obtain target skin feature information for the target facial image, wherein the target skin feature information includes pore information, blackhead information, ultraviolet freckle information, redness information, acne information and brown spot information; determining the maximum cosine similarity between the target skin feature information and the skin feature information stored in a target database; using the analysis result corresponding to the maximum cosine similarity in the target database as the initial analysis result of the target facial image; optimizing the initial analysis result according to the user information of the target user to obtain an intelligent analysis result for the target facial image.

[0076] It should be noted that the pore information includes the proportion of large pores, the proportion of large pore area, the area of ​​large pores and the number of large pores; the blackhead information includes the proportion of blackhead area, the area of ​​blackheads, the number of blackheads, the oil depth of T zone and the oil depth of U zone; the UV freckles information includes the proportion of UV spot (UV freckles) area, the area of ​​UV spots and the depth of UV spots; the redness information includes the proportion of redness area, the area of ​​redness, the depth of redness, the proportion of red blood streaks area, the area of ​​red blood streaks and the depth of red blood streaks; the acne information includes the proportion of acne area, the area of ​​acne and the depth of acne; the brown spot information includes the number of brown spots, the proportion of brown spot area, the area of ​​brown spots, the depth of brown spots and the number of brown spots.

[0077] It should be noted that a large number of skin analysis cases are stored in the target database. After the target detection model outputs the target skin feature information, the target skin feature information can be matched with the skin analysis cases in the target database, and then the most matching skin analysis case is selected according to the cosine similarity, and the analysis result of this skin analysis case is used as the initial analysis result, and then the initial analysis result is optimized according to the user information (user age or user gender), and finally an intelligent analysis result is obtained, such as evaluating the user's purchasing power according to the user's age or gender, and then recommending related products to the user based on the user's purchasing power.

[0078] This embodiment collects target facial images of target users under different light sources, wherein the light sources include natural light, parallel polarized light, cross-polarized light and ultraviolet light; based on a preset derivative algorithm, generates a derivative image of the target facial image, wherein the derivative image includes a brown area map, a red area map and an ultraviolet spot map, the brown area map includes a shallow brown area map, a deep brown area map and a brown area heat map, and the red area map includes a red bloodshot map, a shallow red area map, a deep red area map and a red area heat map; the target facial image and the derivative image are input into a target detection model to obtain an intelligent skin analysis result for the target facial image, thereby solving the technical problem that the existing skin feature analysis method cannot analyze the overall state of the skin. Compared with the prior art, the present application derives the input image of the target detection module after collecting facial images under different spectra, and uses the target detection module to more comprehensively evaluate and analyze skin features. This method can quickly and accurately perform an overall evaluation of the skin state for facial images, thereby providing a scientific basis for personal care and skin treatment.

[0079] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 3 Before step S10, the facial skin feature analysis method further includes step S301:

[0080] Step S301, input the target facial image and the derived image into a target detection model to obtain an intelligent skin analysis result for the target facial image, wherein the target detection model includes an input layer, a backbone network, a neck network and a prediction layer, the C3 network in the backbone network is replaced with a lightweight neural network, and the C3 network in the neck network is replaced with a preset attention mechanism, and the preset attention mechanism includes the C3 network and the SE attention mechanism.

[0081] It should be noted that some lightweight neural networks (such as the ShuffleNet series of networks: by using point group convolution and channel shuffling to improve computational efficiency while maintaining accuracy; such as the MobileNet series of networks: by using depthwise separable convolution to reduce the amount of computation and the number of parameters, MobileNet V1 introduced this convolution method, and subsequent versions such as MobileNet V2 and V3 further optimized the network structure) can be used to replace the C3 network (i.e., C3 module) in the backbone network. This can effectively reduce the number of parameters of the model, randomly assign feature information of different channels, and realize information exchange between different groups; at the same time, a preset attention mechanism is added to the neck network (the preset attention mechanism is composed of the C3 network and the SE attention mechanism) to replace the C3 network. The preset attention mechanism can focus more on the skin features in the face image, further improving the detection accuracy of the model.

[0082] In the specific implementation, the preset attention mechanism first performs residual convolution compression on the input face image feature map, averages it into a feature vector [1,1,c], and reduces the channel dimension of the feature map vector to the original 1 / r through the FC fully connected layer. It is then activated using the Swish activation function to suppress the currently meaningless feature channels, and finally outputs the weighted feature map.

[0083] This embodiment obtains the intelligent skin analysis result for the target face image by inputting the target face image and the derived image into the target detection model, wherein the target detection model includes an input layer, a backbone network, a neck network and a prediction layer, the C3 network in the backbone network is replaced by a lightweight neural network, and the C3 network in the neck network is replaced by a preset attention mechanism, and the preset attention mechanism includes a C3 network and an SE attention mechanism. In the above manner, not only can the problem caused by the disappearance of the gradient in the calculation process of the model be alleviated, but also the detection accuracy can be further increased while reducing the number of model parameters.

[0084] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the facial skin feature analysis method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0085] This application also provides a facial skin feature analysis device, please refer to Figure 4 , the facial skin feature analysis device comprises:

[0086] The acquisition module 10 is used to acquire the target face image of the target user under different light sources, wherein the light sources include natural light, parallel polarized light, cross polarized light and ultraviolet light;

[0087] A generating module 20, configured to generate a derivative image of the target face image based on a preset derivative algorithm, wherein the derivative image includes a brown area map, a red area map, and an ultraviolet spot map, the brown area map includes a shallow brown area map, a deep brown area map, and a brown area thermal map, and the red area map includes a red bloodshot map, a shallow red area map, a deep red area map, and a red area thermal map;

[0088] The input module 30 is used to input the target face image and the derived image into the target detection model to obtain the intelligent skin analysis result for the target face image.

[0089] The facial skin feature analysis device provided by the present application adopts the facial skin feature analysis method in the above embodiment, which can solve the technical problem that the existing skin feature analysis method cannot analyze the overall state of the skin. Compared with the prior art, the beneficial effects of the facial skin feature analysis device provided by the present application are the same as the beneficial effects of the facial skin feature analysis method provided by the above embodiment, and the other technical features in the facial skin feature analysis device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0090] The present application provides a facial skin feature analysis device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the facial skin feature analysis method in the above-mentioned embodiment one.

[0091] Reference below Figure 5 , which shows a schematic diagram of the structure of a facial skin feature analysis device suitable for implementing the embodiment of the present application. The facial skin feature analysis device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The facial skin feature analysis device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0092] like Figure 5As shown, the facial skin feature analysis device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the facial skin feature analysis device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the facial skin feature analysis device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a facial skin feature analysis device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0093] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0094] The facial skin feature analysis device provided by the present application adopts the facial skin feature analysis method in the above embodiment, which can solve the technical problem that the existing skin feature analysis method cannot analyze the overall state of the skin. Compared with the prior art, the beneficial effects of the facial skin feature analysis device provided by the present application are the same as the beneficial effects of the facial skin feature analysis method provided by the above embodiment, and the other technical features in the facial skin feature analysis device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0095] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0096] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0097] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, the computer-readable program instructions being used to execute the facial skin feature analysis method in the above-mentioned embodiment.

[0098] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0099] The computer-readable storage medium may be included in the facial skin feature analysis device; or may exist independently without being assembled into the facial skin feature analysis device.

[0100] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by a facial skin feature analysis device, the facial skin feature analysis device: collects a target facial image of a target user under different light sources, wherein the light source includes natural light, parallel polarized light, cross-polarized light and ultraviolet light; generates a derivative image of the target facial image based on a preset derivative algorithm, wherein the derivative image includes a brown area map, a red area map and an ultraviolet spot map, the brown area map includes a shallow brown area map, a deep brown area map and a brown area heat map, and the red area map includes a red bloodshot map, a shallow red area map, a deep red area map and a red area heat map; inputs the target facial image and the derivative image into a target detection model to obtain an intelligent skin analysis result for the target facial image.

[0101] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0102] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0103] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0104] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned facial skin feature analysis method, and can solve the technical problem that the existing skin feature analysis method cannot analyze the overall state of the skin. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the facial skin feature analysis method provided by the above-mentioned embodiment, and will not be repeated here.

[0105] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned facial skin feature analysis method when executed by a processor.

[0106] The computer program product provided by the present application can solve the technical problem that the existing skin feature analysis method cannot analyze the overall condition of the skin. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the facial skin feature analysis method provided by the above embodiment, and will not be repeated here.

[0107] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A method for analyzing facial skin features, characterized in that: The method comprises: Collecting target face images of target users under different light sources, wherein the light sources include natural light, parallel polarized light, cross polarized light, and ultraviolet light; Based on a preset derivative algorithm, a derivative image of the target face image is generated, wherein the derivative image includes a brown area map, a red area map, and an ultraviolet spot map, the brown area map includes a shallow brown area map, a deep brown area map, and a brown area thermal map, and the red area map includes a red bloodshot map, a shallow red area map, a deep red area map, and a red area thermal map; The target face image and the derived image are input into a target detection model to obtain an intelligent skin analysis result for the target face image.

2. The method according to claim 1, characterized in that The step of generating a derivative image of the target face image based on a preset derivative algorithm comprises: Performing color channel separation on the target face image to obtain channel images of different color channels; Performing binarization processing on the channel image to obtain a binarized image; Based on an image filtering algorithm, the binary image is processed to obtain a filtered image; Based on an image enhancement algorithm, performing image enhancement on the filtered image to obtain an enhanced image; Identifying and extracting a face region in the enhanced image; A mask is set for the face region, and a derivative image of the target face image is generated based on the mask.

3. The method according to claim 1, characterized in that Before the step of inputting the target face image and the derived image into the target detection model to obtain the intelligent skin analysis result for the target face image, the step further includes: Collect an initial set of face images under different light sources; Randomly extracting face images from the initial face image set, and merging the face images into a target image according to a preset ratio; Adding the target image to the initial face image set to obtain a face image set; Determining label information of all images in the face image set; Based on the face image set and the label information, an initial target detection model is trained to obtain a target detection model.

4. The method according to claim 3, characterized in that The step of training the initial target detection model based on the face image set and the label information to obtain the target detection model comprises: Inputting the face images in the face image set into the initial target detection model to obtain prediction information; Based on the predicted bounding box loss function, generating a target loss value according to the predicted information and the label information, wherein the predicted bounding box loss function determines the loss value according to the overlapping area, center point distance and aspect ratio of the predicted box and the real box; According to the target loss value, the model parameters of the initial target detection model are updated to obtain a target detection model.

5. The method according to claim 1, characterized in that The step of inputting the target face image and the derived image into a target detection model to obtain an intelligent skin analysis result for the target face image comprises: The target facial image and the derived image are input into a target detection model to obtain an intelligent skin analysis result for the target facial image, wherein the target detection model includes an input layer, a backbone network, a neck network and a prediction layer, the C3 network in the backbone network is replaced with a lightweight neural network, and the C3 network in the neck network is replaced with a preset attention mechanism, and the preset attention mechanism includes the C3 network and the SE attention mechanism.

6. The method according to claim 1, characterized in that The step of inputting the target face image and the derived image into a target detection model to obtain an intelligent skin analysis result for the target face image comprises: Inputting the target face image and the derived image into a target detection model to obtain target skin feature information for the target face image, wherein the target skin feature information includes pore information, blackhead information, ultraviolet freckle information, redness information, acne information, and brown spot information; Determining a maximum cosine similarity between the target skin feature information and skin feature information stored in a target database; Using the analysis result corresponding to the maximum cosine similarity in the target database as the initial analysis result of the target face image; The initial analysis result is optimized according to the user information of the target user to obtain an intelligent analysis result for the target facial image.

7. A facial skin feature analysis device, characterized in that: The device comprises: A collection module, used for collecting target face images of target users under different light sources, wherein the light sources include natural light, parallel polarized light, cross polarized light and ultraviolet light; A generating module, configured to generate a derivative image of the target face image based on a preset derivative algorithm, wherein the derivative image includes a brown area map, a red area map, and an ultraviolet spot map, the brown area map includes a shallow brown area map, a deep brown area map, and a brown area thermal map, and the red area map includes a red bloodshot map, a shallow red area map, a deep red area map, and a red area thermal map; The input module is used to input the target face image and the derived image into the target detection model to obtain the intelligent skin analysis result for the target face image.

8. A facial skin feature analysis device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the facial skin feature analysis method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the facial skin feature analysis method according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the facial skin feature method according to any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • Image analysis-based skin texture depth measurement method and system, electronic equipment and storage medium

    CN121353364A

  • Skin texture depth determination method, system, electronic device and storage medium based on image analysis

    CN121353364B