Phototherapy mask control method and device, readable storage medium and electronic equipment
The method and device for light therapy masks enhance control accuracy by using facial image analysis to identify skin imperfections and adjust settings automatically, improving the effectiveness of light therapy.
Patent Information
- Application Number
- CN202510371838.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-07-15
AI Technical Summary
The existing phototherapy mask control methods are less accurate and have poor use effects, and they need to rely on the user's personal experience.
By obtaining facial images of the phototherapy subject, identifying skin blemishes, determining the area and type of skin blemishes, selecting the target lamp bead collection and phototherapy method, and automatically controlling the phototherapy mask for phototherapy.
It improves the accuracy of phototherapy mask control, get rid of the dependence on the user's personal experience, and improves the use effect.
Smart Images

Figure CN120305573A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of light therapy masks, and particularly relates to a light therapy mask control method, device, computer-readable storage medium, and electronic device. Background Art
[0002] A light therapy mask refers to a mask that uses light for skin care and beauty. Due to its characteristics of not intervening in the human body and not causing trauma, it has been increasingly widely used in various beauty institutions and personal daily facial care scenarios.
[0003] In the prior art, when using a light therapy mask, generally relevant operators or users themselves need to manually control the light therapy mask according to personal experience, which requires a high level of the user. For users with less experience, the accuracy of controlling the light therapy mask is often low, resulting in poor use effects of the light therapy mask. Summary of the Invention
[0004] In view of this, embodiments of this application provide a light therapy mask control method, device, computer-readable storage medium, and electronic device to solve the problems of low accuracy and poor use effects existing in the existing light therapy mask control methods.
[0005] The first aspect of the embodiments of this application provides a light therapy mask control method, which may include:
[0006] Obtain a facial image of the light therapy object;
[0007] Perform skin defect recognition in the facial image to obtain the skin defect area and the corresponding skin defect type;
[0008] Determine a target lamp bead set corresponding to the skin defect area in the light therapy mask;
[0009] Determine a target light therapy method corresponding to the skin defect type;
[0010] Control the target lamp bead set in the light therapy mask to perform light therapy on the light therapy object according to the target light therapy method.
[0011] In a specific implementation manner of the first aspect, the facial image may include a facial UV image;
[0012] Correspondingly, the performing skin defect recognition in the facial image to obtain the skin defect area and the corresponding skin defect type may include:
[0013] Perform skin pigmentation recognition in the facial UV image to obtain the skin defect area with pigmentation.
[0014] In a specific implementation of the first aspect, after obtaining the skin blemish area and the corresponding skin blemish type, it may further include:
[0015] Obtain skin blemish type modification information;
[0016] Modify the skin blemish type according to the skin blemish modification information to obtain the modified skin blemish type;
[0017] Correspondingly, the determining the target phototherapy method corresponding to the skin blemish type includes:
[0018] Determine the target phototherapy method corresponding to the modified skin blemish type.
[0019] In a specific implementation of the first aspect, after obtaining the facial image of the phototherapy object, it may further include:
[0020] Determine the shooting angle of the facial image;
[0021] Perform image correction on the facial image according to the shooting angle to obtain the corrected facial image;
[0022] Correspondingly, the performing skin blemish recognition in the facial image to obtain the skin blemish area and the corresponding skin blemish type may include:
[0023] Perform skin blemish recognition in the corrected facial image to obtain the skin blemish area and the corresponding skin blemish type.
[0024] In a specific implementation of the first aspect, the performing skin blemish recognition in the facial image to obtain the skin blemish area and the corresponding skin blemish type may include:
[0025] Input the facial image into a preset skin blemish recognition model, and obtain the skin blemish area and the corresponding skin blemish type output by the skin blemish recognition model;
[0026] Wherein, the skin blemish recognition model is an artificial intelligence model pre-trained for performing skin blemish recognition.
[0027] In a specific implementation of the first aspect, before inputting the facial image into a preset skin blemish recognition model, it may further include:
[0028] Construct a training data set for training the skin blemish recognition model; wherein, the training data set includes a number of training samples, and the training sample includes a set of sample facial images and the corresponding skin blemish recognition annotation results;
[0029] Taking the sample facial image of the training sample as the input and the corresponding skin defect recognition annotation result as the expected output, training the initial artificial intelligence model to obtain the trained skin defect recognition model.
[0030] In a specific implementation manner of the first aspect, the step of taking the sample facial image of the training sample as the input and the corresponding skin defect recognition annotation result as the expected output, and training the initial artificial intelligence model to obtain the trained skin defect recognition model may include:
[0031] Using the artificial intelligence model to process the sample facial image of the training sample to obtain the actual output of the training sample;
[0032] Using a preset loss function to determine the training loss value according to the expected output and the actual output in the training sample;
[0033] Adjusting the model parameters of the artificial intelligence model according to the training loss value until the preset training conditions are met, to obtain the trained skin defect recognition model.
[0034] In a specific implementation manner of the first aspect, after obtaining the facial image of the phototherapy object, it may further include:
[0035] Performing skin color analysis on the facial image to obtain the skin color information of the phototherapy object;
[0036] Correspondingly, the step of performing skin defect recognition in the facial image to obtain the skin defect area and the corresponding skin defect type may include:
[0037] Based on the skin color information, performing skin defect recognition in the facial image to obtain the skin defect area and the corresponding skin defect type.
[0038] In a specific implementation manner of the first aspect, the phototherapy mask control method may further include:
[0039] Determining the user profile corresponding to the phototherapy object, and obtaining the historical phototherapy record of the phototherapy object from the user profile;
[0040] Correspondingly, the step of determining the target phototherapy method corresponding to the skin defect type may include:
[0041] Combining the historical phototherapy record to determine the target phototherapy method corresponding to the skin defect type.
[0042] In a specific implementation manner of the first aspect, the step of combining the historical phototherapy record to determine the target phototherapy method corresponding to the skin defect type may include:
[0043] Perform an image comparison on the facial images in the historical phototherapy records and the facial images of the current phototherapy to obtain the facial image differences;
[0044] Determine the target phototherapy method corresponding to the skin defect type according to the facial image differences.
[0045] A second aspect of the embodiments of the present application provides a phototherapy mask control device, which may include:
[0046] A facial image acquisition module, configured to acquire the facial image of the phototherapy object;
[0047] A skin defect recognition module, configured to perform skin defect recognition in the facial image to obtain the skin defect area and the corresponding skin defect type;
[0048] A lamp bead set determination module, configured to determine the target lamp bead set corresponding to the skin defect area in the phototherapy mask;
[0049] A phototherapy method determination module, configured to determine the target phototherapy method corresponding to the skin defect type;
[0050] A phototherapy mask control module, configured to control the target lamp bead set in the phototherapy mask to perform phototherapy on the phototherapy object according to the target phototherapy method.
[0051] In a specific implementation manner of the second aspect, the facial image may include a facial UV image;
[0052] Correspondingly, the skin defect recognition module may include:
[0053] A UV image processing unit, configured to perform skin pigmentation recognition in the facial UV image to obtain the skin defect area with pigmentation.
[0054] In a specific implementation manner of the second aspect, the phototherapy mask control device may further include:
[0055] A skin defect type modification module, configured to obtain skin defect type modification information; modify the skin defect type according to the skin defect modification information to obtain the modified skin defect type;
[0056] Correspondingly, the phototherapy method determination module may be specifically configured to: determine the target phototherapy method corresponding to the modified skin defect type.
[0057] In a specific implementation manner of the second aspect, the phototherapy mask control device may further include:
[0058] A facial image correction module, configured to determine the shooting angle of the facial image; perform image correction on the facial image according to the shooting angle to obtain the corrected facial image;
[0059] Correspondingly, the skin blemish recognition module may specifically be configured to: perform skin blemish recognition on the corrected facial image to obtain a skin blemish area and the corresponding skin blemish type.
[0060] In a specific implementation manner of the second aspect, the skin blemish recognition module may specifically be configured to: input the facial image into a preset skin blemish recognition model, and obtain the skin blemish area and the corresponding skin blemish type output by the skin blemish recognition model; wherein, the skin blemish recognition model is an artificial intelligence model pre-trained for skin blemish recognition.
[0061] In a specific implementation manner of the second aspect, the phototherapy mask control device may further include:
[0062] A training dataset construction module, configured to construct a training dataset for training the skin blemish recognition model; wherein, the training dataset includes a number of training samples, and each training sample includes a set of sample facial images and the corresponding skin blemish recognition annotation results;
[0063] A model training module, configured to use the sample facial images of the training samples as inputs and the corresponding skin blemish recognition annotation results as expected outputs to train an initial artificial intelligence model to obtain the trained skin blemish recognition model.
[0064] In a specific implementation manner of the second aspect, the model training module may specifically be configured to: use an artificial intelligence model to process the sample facial images of the training samples to obtain the actual outputs of the training samples; use a preset loss function to determine a training loss value according to the expected outputs and the actual outputs in the training samples; adjust the model parameters of the artificial intelligence model according to the training loss value until a preset training condition is met to obtain the trained skin blemish recognition model.
[0065] In a specific implementation manner of the second aspect, the phototherapy mask control device may further include:
[0066] A skin color analysis module, configured to perform skin color analysis on the facial image to obtain the skin color information of the phototherapy object;
[0067] Correspondingly, the skin blemish recognition module may specifically be configured to: based on the skin color information, perform skin blemish recognition on the facial image to obtain a skin blemish area and the corresponding skin blemish type.
[0068] In a specific implementation manner of the second aspect, the light therapy mask control device may further include:
[0069] A historical light therapy record acquisition module, configured to determine a user profile corresponding to the light therapy object, and acquire the historical light therapy record of the light therapy object from the user profile;
[0070] Correspondingly, the light therapy method determination module may specifically be configured to: combine the historical light therapy record to determine a target light therapy method corresponding to the skin defect type.
[0071] In a specific implementation manner of the second aspect, the light therapy method determination module may include:
[0072] A historical image comparison unit, configured to perform image comparison on the facial images in the historical light therapy record and the facial image of the current light therapy to obtain a facial image difference;
[0073] A light therapy method determination unit, configured to determine a target light therapy method corresponding to the skin defect type according to the facial image difference.
[0074] A third aspect of the embodiments of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of any of the above light therapy mask control methods are implemented.
[0075] A fourth aspect of the embodiments of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of any of the above light therapy mask control methods are implemented.
[0076] A fifth aspect of the embodiments of the present application provides a computer program product. When the computer program product runs on an electronic device, the electronic device is enabled to execute the steps of any of the above light therapy mask control methods.
[0077] The beneficial effects of the embodiments of the present application compared with the prior art are as follows: The embodiments of the present application acquire the facial image of the phototherapy object; perform skin flaw recognition on the facial image to obtain the skin flaw area and the corresponding skin flaw type; determine the target lamp bead set corresponding to the skin flaw area in the phototherapy mask; determine the target phototherapy method corresponding to the skin flaw type; control the target lamp bead set in the phototherapy mask to perform phototherapy on the phototherapy object according to the target phototherapy method. Through the embodiments of the present application, skin flaw recognition can be performed based on the facial image of the phototherapy object. Based on the recognized skin flaw area and skin flaw type, the corresponding target lamp bead set and target phototherapy method are respectively determined, and the phototherapy mask is automatically controlled to perform phototherapy on the phototherapy object according to this information, getting rid of the dependence on the personal experience of the user, effectively improving the accuracy of controlling the phototherapy mask, and having a better use effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0079] Figure 1 It is a flowchart of an embodiment of a method for controlling a phototherapy mask in an embodiment of the present application;
[0080] Figure 2 It is a schematic diagram of a skin flaw recognition model;
[0081] Figure 3 It is a schematic diagram of the skin flaw recognition result;
[0082] Figure 4 It is a schematic diagram of determining the target lamp bead set corresponding to the skin flaw area;
[0083] Figure 5 It is a structural diagram of an embodiment of a device for controlling a phototherapy mask in an embodiment of the present application;
[0084] Figure 6 It is a schematic block diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0085] To make the objectives, features, and advantages of the present application more obvious and understandable, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the embodiments described below are only a part of the embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0086] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.
[0087] It should also be understood that the terms used in this specification of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in this specification of the present application and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" are intended to include the plural forms.
[0088] It should be further understood that the term "and / or" used in this specification of the present application and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0089] As used in this specification and the appended claims, the term "if" can be interpreted as "when", "once", "in response to determining", or "in response to detecting" according to the context. Similarly, the phrase "if determined" or "if [the described condition or event] is detected" can be interpreted as meaning "once determined", "in response to determining", "once [the described condition or event] is detected", or "in response to detecting [the described condition or event]" according to the context.
[0090] In addition, in the description of the present application, the terms "first", "second", "third", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.
[0091] A light therapy mask refers to a mask that uses light for skin care and beauty. Due to its characteristics of not intervening in the human body and not causing trauma, it has been increasingly widely used in various beauty institutions and personal daily facial care scenarios.
[0092] In the prior art, when using a phototherapy mask, generally, relevant operators or users themselves need to manually control the phototherapy mask based on personal experience, which requires a relatively high level of the user. For users lacking experience, the accuracy of controlling the phototherapy mask is often low, resulting in a poor usage effect of the phototherapy mask.
[0093] In view of this, embodiments of the present application provide a method, a device, a computer-readable storage medium, and an electronic device for controlling a phototherapy mask to solve the problems of low accuracy and poor usage effect existing in the existing phototherapy mask control methods.
[0094] In the embodiments of the present application, skin flaw recognition can be performed based on the facial image of the phototherapy object. Based on the recognized skin flaw regions and skin flaw types, corresponding target lamp bead sets and target phototherapy methods are respectively determined, and the phototherapy mask is automatically controlled to perform phototherapy on the phototherapy object according to this information, getting rid of the dependence on the user's personal experience, effectively improving the accuracy of controlling the phototherapy mask, and having a better usage effect.
[0095] Please refer to Figure 1 , an embodiment of a method for controlling a phototherapy mask in the embodiments of the present application may include:
[0096] Step S101, obtain a facial image of the phototherapy object.
[0097] In the embodiments of the present application, a preset camera device can be used to take a photo of the phototherapy object to obtain a facial image of the phototherapy object.
[0098] It should be noted that the process of obtaining the facial image and the subsequent analysis and recognition process involved in the present application are performed with the user's knowledge and permission, that is, the process of obtaining the facial image and the subsequent analysis and recognition process comply with relevant requirements and do not belong to acts that harm the public interest.
[0099] Step S102, perform skin flaw recognition on the facial image to obtain skin flaw regions and corresponding skin flaw types.
[0100] In the embodiments of the present application, the obtained facial image may include but is not limited to: a facial visible light image taken under visible light, and a facial UV image taken under ultraviolet light (UV). Skin flaw recognition such as acne, eczema, freckles, etc. can be performed on the facial visible light image to obtain corresponding skin flaw regions; skin flaw recognition such as skin pigmentation can be performed on the facial UV image to obtain corresponding skin flaw regions.
[0101] In the embodiments of the present application, as Figure 2As shown, a facial image can be input into a preset skin blemish recognition model, and the skin blemish area and the corresponding skin blemish type output by the skin blemish recognition model can be obtained. Among them, the skin blemish recognition model is an artificial intelligence model pre-trained for skin blemish recognition.
[0102] Specifically, a training dataset for training the skin blemish recognition model can be constructed. Among them, the training dataset can include a number of training samples. Each training sample can include a set of sample facial images and the corresponding skin blemish recognition annotation results. The skin blemish recognition annotation results can include the skin blemish area and the corresponding skin blemish type. Using the sample facial image of the training sample as the input and the corresponding skin blemish recognition annotation result as the expected output to train the initial artificial intelligence model, the trained skin blemish recognition model can be obtained.
[0103] During the training process, for each training sample, the artificial intelligence model can be used to process the sample facial image of the training sample to obtain the actual output of the training sample. Then, a preset loss function can be used to determine the training loss value according to the expected output and the actual output in the training sample. In the embodiments of the present application, any loss function in the prior art can be selected according to the actual situation to calculate the training loss value, and the embodiments of the present application do not make specific limitations on this.
[0104] After calculating the training loss value, the model parameters of the artificial intelligence model can be adjusted according to the training loss value. In the embodiments of the present application, it is assumed that in the initial state, the model parameters of the artificial intelligence model are W1. The training loss value is backpropagated to modify the model parameters W1 of the artificial intelligence model to obtain the modified model parameters W2. After modifying the parameters, continue to execute the next training process. In this training process, recalculate the training loss value, backpropagate the training loss value to modify the model parameters W2 of the artificial intelligence model to obtain the modified model parameters W3, and so on. Repeat the above process continuously. Each training process can modify the model parameters until the preset training conditions are met. Among them, the training conditions can be that the number of training times reaches the preset number threshold, and the number threshold can be set according to the actual situation. For example, it can be set to several thousand, tens of thousands, hundreds of thousands or even larger values; the training conditions can also be that the artificial intelligence model converges; due to the possibility that the number of training times has not reached the number threshold, but the artificial intelligence model has already converged, which may lead to unnecessary repeated work; or the artificial intelligence model cannot converge all the time, which may lead to an infinite loop and the training process cannot end. Based on the above two situations, the training conditions can also be that the number of training times reaches the number threshold or the artificial intelligence model converges. When the training conditions are met, the trained skin blemish recognition model can be obtained.
[0105] Through the above process, the sample facial images of the training samples and the corresponding skin defect recognition and annotation results are used as the learning objects of the artificial intelligence model. Through the training process, the artificial intelligence model can establish a mapping relationship between the sample facial images and the corresponding skin defect recognition and annotation results. Thus, when facing a new facial image, the skin defect area and the corresponding skin defect type in the facial image can also be obtained according to this mapping relationship.
[0106] After the training of the skin defect recognition model is completed, the obtained facial image can be input into the skin defect recognition model, and the skin defect area and the corresponding skin defect type output by the skin defect recognition model can be obtained. Among them, the skin defect type can include but is not limited to acne, eczema, freckles, and other defect types.
[0107] Figure 3 The figure shows a schematic diagram of the skin defect recognition result. In this figure, a total of 4 skin defect areas are recognized in the facial image, which are respectively denoted as area A1, area A2, area A3, and area A4. Among them, the skin defect type corresponding to area A1 is B1, the skin defect type corresponding to area A2 is B2, the skin defect type corresponding to area A3 is B3, and the skin defect type corresponding to area A4 is B4. It should be noted that the number, position, area of the skin defect areas in this figure, and the corresponding skin defect types are only examples, rather than specific limitations. In actual applications, for different phototherapy objects, skin defect recognition results consistent with their actual situations will be obtained.
[0108] In a specific implementation manner of the embodiment of the present application, in addition to outputting the skin defect area and the corresponding skin defect type, the skin defect recognition model can also output the corresponding severity level. Correspondingly, the skin defect recognition and annotation results of the training samples can also include the corresponding severity level in addition to the skin defect area and the corresponding skin defect type. Through the training process, the artificial intelligence model can establish a mapping relationship between the sample facial images and the corresponding skin defect recognition and annotation results. Thus, when facing a new facial image, the skin defect area, the corresponding skin defect type, and the severity level in the facial image can also be obtained according to this mapping relationship.
[0109] Step S103: Determine the target lamp bead set corresponding to the skin defect area in the phototherapy mask.
[0110] In the embodiment of the present application, the recognized skin defect area can be mapped to the phototherapy mask, so as to obtain the mask area corresponding to the skin defect area, and the phototherapy lamp beads in this mask area are the target lamp bead set corresponding to the skin defect area.
[0111] Figure 4The figure shows a schematic diagram for determining the target light bead set corresponding to the skin defect area. As shown in the figure, area A1 is mapped to the corresponding area S1 in the light therapy mask, then the light therapy beads in area S1 are the target light bead set corresponding to area A1. Area A2 is mapped to the corresponding area S2 in the light therapy mask, then the light therapy beads in area S2 are the target light bead set corresponding to area A2. Area A3 is mapped to the corresponding area S3 in the light therapy mask, then the light therapy beads in area S3 are the target light bead set corresponding to area A3. Area A4 is mapped to the corresponding area S4 in the light therapy mask, then the light therapy beads in area S4 are the target light bead set corresponding to area A4.
[0112] Step S104: Determine the target light therapy method corresponding to the skin defect type.
[0113] In the embodiment of the present application, a corresponding relationship can be established in advance between various different skin defect types and various different light therapy methods. For example, the light therapy method corresponding to skin defect type B1 is: using red light therapy with a light therapy cycle of T1 time; the light therapy method corresponding to skin defect type B2 is: using blue light therapy with a light therapy cycle of T2 time; the light therapy method corresponding to skin defect type B3 is: using infrared light therapy with a light therapy cycle of T3 time, and so on. In the case of identifying the skin defect type, the light therapy method corresponding to the identified skin defect type can be determined according to the above corresponding relationship and recorded as the target light therapy method.
[0114] In a specific implementation manner of the embodiment of the present application, when determining the target light therapy method, in addition to considering the skin defect type, the severity of the skin defect can also be further considered, and the light therapy cycle can be adjusted accordingly according to the severity of the skin defect. Among them, the light therapy cycle is positively correlated with the severity of the skin defect, that is, the more severe the skin defect, the longer the light therapy cycle; conversely, the milder the skin defect, the shorter the light therapy cycle. For example, for different severities of skin defect type B1, red light therapy is used, but when the severity of the skin defect is mild, the light therapy cycle is the shorter T1_1 time, when the severity of the skin defect is medium, the light therapy cycle is the moderate T1_2 time, and when the severity of the skin defect is severe, the light therapy cycle is the longer T1_3 time, and so on.
[0115] Step S105: Control the target light bead set in the light therapy mask to perform light therapy on the light therapy object according to the target light therapy method.
[0116] After determining the target LED bead set and the corresponding target phototherapy method, a phototherapy control instruction can be sent to the phototherapy mask to control the target LED bead set in the phototherapy mask to perform phototherapy on the phototherapy object according to the target phototherapy method. For example, control the phototherapy LED beads in the S1 area of the phototherapy mask to perform red light phototherapy with a phototherapy cycle of T1 time, control the phototherapy LED beads in the S2 area of the phototherapy mask to perform blue light phototherapy with a phototherapy cycle of T2 time, and control the phototherapy LED beads in the S3 area of the phototherapy mask to perform infrared light phototherapy with a phototherapy cycle of T3 time, and so on.
[0117] In a specific implementation manner of the embodiment of the present application, after obtaining the skin defect recognition result, an artificial review link can be further added to ensure the accuracy of the recognition result. Specifically, the skin defect recognition result can be displayed to the user through a preset human-computer interaction interface. The user can check the skin defect recognition result. If the check is correct, the skin defect recognition result is confirmed; if the check is incorrect, the skin defect recognition result can be modified through the human-computer interaction interface. For example, the skin defect type corresponding to the A1 area can be modified from B1 to B2. After the user finishes modifying, the skin defect type modification information can be obtained, and the skin defect type can be modified according to the skin defect modification information to obtain the modified skin defect type. Correspondingly, the skin defect type used in the subsequent process refers to the modified skin defect type.
[0118] In a specific implementation manner of the embodiment of the present application, after obtaining the facial image of the phototherapy object, the consideration of the shooting angle can be further added to reduce the image deviation caused by different shooting angles. Specifically, the shooting angle of the facial image can be determined, and the facial image can be corrected according to the shooting angle to obtain the corrected facial image. For a facial image taken from the side, it is corrected to a frontal facial image. Correspondingly, the facial image used in the subsequent process refers to the corrected facial image.
[0119] In a specific implementation manner of the embodiment of the present application, during the process of skin flaw recognition, the consideration of skin color can be further added to reduce the deviation of the recognition result caused by different skin colors. Specifically, the skin color of the facial image can be analyzed to obtain the skin color information of the phototherapy object. Then, based on the skin color information, skin flaw recognition can be performed on the facial image to obtain the corresponding skin flaw recognition result. Correspondingly, in addition to the sample facial image and the corresponding skin flaw recognition annotation result in the training sample, the corresponding skin color annotation information can also be included. During the training process, the initial artificial intelligence model is trained with the sample facial image and the skin color annotation information of the training sample as the input and the corresponding skin flaw recognition annotation result as the expected output, so as to obtain the trained skin flaw recognition model. Through the training process, the artificial intelligence model can establish a mapping relationship between the sample facial image, the skin color annotation information, and the corresponding skin flaw recognition annotation result, so that when facing a new facial image and skin color information, the corresponding skin flaw recognition result can also be obtained according to this mapping relationship.
[0120] In a specific implementation manner of the embodiment of the present application, during the process of performing phototherapy on the phototherapy object, the user profile corresponding to the phototherapy object can also be determined, and the historical phototherapy record of the phototherapy object can be obtained from the user profile. When determining the target phototherapy method, in addition to considering the analysis result of the current phototherapy, the historical phototherapy record can be further combined to determine the target phototherapy method corresponding to the skin flaw type.
[0121] Specifically, the facial images in the historical phototherapy record and the facial image of the current phototherapy can be compared to obtain the facial image difference between the two. Through this facial image difference, the previous phototherapy effect can be reflected. For example, whether various previous skin flaws have been improved and the degree of improvement, etc. According to this facial image difference, the phototherapy method can be adjusted accordingly to determine the target phototherapy method of the current phototherapy.
[0122] In summary, the embodiment of the present application obtains the facial image of the phototherapy object; performs skin flaw recognition on the facial image to obtain the skin flaw area and the corresponding skin flaw type; determines the target lamp bead set corresponding to the skin flaw area in the phototherapy mask; determines the target phototherapy method corresponding to the skin flaw type; controls the target lamp bead set in the phototherapy mask to perform phototherapy on the phototherapy object according to the target phototherapy method. Through the embodiment of the present application, skin flaw recognition can be performed according to the facial image of the phototherapy object. Based on the recognized skin flaw area and skin flaw type, the corresponding target lamp bead set and target phototherapy method are respectively determined, and the phototherapy mask is automatically controlled to perform phototherapy on the phototherapy object according to this information, getting rid of the dependence on the personal experience of the user, effectively improving the accuracy of controlling the phototherapy mask, and having a better use effect.
[0123] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not imply the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0124] Corresponding to a light therapy mask control method described in the above embodiments, Figure 5 FIG. shows a structural diagram of an embodiment of a light therapy mask control device provided by an embodiment of the present application.
[0125] In this embodiment, a light therapy mask control device may include:
[0126] A facial image acquisition module 501, configured to acquire a facial image of a light therapy object;
[0127] A skin defect recognition module 502, configured to perform skin defect recognition in the facial image to obtain a skin defect area and a corresponding skin defect type;
[0128] A lamp bead set determination module 503, configured to determine a target lamp bead set corresponding to the skin defect area in the light therapy mask;
[0129] A light therapy mode determination module 504, configured to determine a target light therapy mode corresponding to the skin defect type;
[0130] A light therapy mask control module 505, configured to control the target lamp bead set in the light therapy mask to perform light therapy on the light therapy object according to the target light therapy mode.
[0131] In a specific implementation manner of the embodiment of the present application, the facial image may include a facial UV image;
[0132] Correspondingly, the skin defect recognition module may include:
[0133] A UV image processing unit, configured to perform skin pigmentation recognition in the facial UV image to obtain a pigmented skin defect area.
[0134] In a specific implementation manner of the embodiment of the present application, the light therapy mask control device may further include:
[0135] A skin defect type modification module, configured to obtain skin defect type modification information; modify the skin defect type according to the skin defect modification information to obtain the modified skin defect type;
[0136] Correspondingly, the light therapy mode determination module may be specifically configured to: determine a target light therapy mode corresponding to the modified skin defect type.
[0137] In a specific implementation manner of the embodiment of the present application, the phototherapy mask control device may further include:
[0138] A facial image correction module, configured to determine the shooting angle of the facial image; perform image correction on the facial image according to the shooting angle to obtain the corrected facial image;
[0139] Correspondingly, the skin defect recognition module may be specifically configured to: perform skin defect recognition in the corrected facial image to obtain a skin defect area and the corresponding skin defect type.
[0140] In a specific implementation manner of the embodiment of the present application, the skin defect recognition module may be specifically configured to: input the facial image into a preset skin defect recognition model, and obtain the skin defect area and the corresponding skin defect type output by the skin defect recognition model; wherein, the skin defect recognition model is an artificial intelligence model pre-trained for skin defect recognition.
[0141] In a specific implementation manner of the embodiment of the present application, the phototherapy mask control device may further include:
[0142] A training dataset construction module, configured to construct a training dataset for training the skin defect recognition model; wherein, the training dataset includes a number of training samples, and each training sample includes a set of sample facial images and the corresponding skin defect recognition annotation results;
[0143] A model training module, configured to use the sample facial images of the training samples as inputs and the corresponding skin defect recognition annotation results as expected outputs to train an initial artificial intelligence model to obtain the trained skin defect recognition model.
[0144] In a specific implementation manner of the embodiment of the present application, the model training module may be specifically configured to: use an artificial intelligence model to process the sample facial images of the training samples to obtain the actual outputs of the training samples; use a preset loss function to determine a training loss value according to the expected outputs and the actual outputs in the training samples; adjust the model parameters of the artificial intelligence model according to the training loss value until a preset training condition is met, to obtain the trained skin defect recognition model.
[0145] In a specific implementation manner of the embodiment of the present application, the phototherapy mask control device may further include:
[0146] A skin color analysis module, configured to perform skin color analysis on the facial image to obtain the skin color information of the phototherapy object;
[0147] Correspondingly, the skin blemish recognition module may be specifically configured to: perform skin blemish recognition on the facial image based on the skin color information to obtain the skin blemish area and the corresponding skin blemish type.
[0148] In a specific implementation manner of the embodiment of the present application, the phototherapy mask control device may further include:
[0149] A historical phototherapy record acquisition module, configured to determine a user profile corresponding to the phototherapy object and obtain the historical phototherapy record of the phototherapy object from the user profile;
[0150] Correspondingly, the phototherapy method determination module may be specifically configured to: combine the historical phototherapy record to determine a target phototherapy method corresponding to the skin blemish type.
[0151] In a specific implementation manner of the embodiment of the present application, the phototherapy method determination module may include:
[0152] A historical image comparison unit, configured to perform image comparison on the facial image in the historical phototherapy record and the facial image of the current phototherapy to obtain the facial image difference;
[0153] A phototherapy method determination unit, configured to determine a target phototherapy method corresponding to the skin blemish type according to the facial image difference.
[0154] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described devices, modules, and units can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0155] In the above embodiments, the descriptions of the respective embodiments have their own focuses. For parts not detailed or recorded in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0156] Figure 6 FIG. shows a schematic block diagram of an electronic device provided by an embodiment of the present application. For the sake of convenience of description, only parts related to the embodiment of the present application are shown.
[0157] As Figure 6 shown, the electronic device 6 of this embodiment includes: a processor 60, a memory 61, and a computer program 62 stored in the memory 61 and executable on the processor 60. When the processor 60 executes the computer program 62, the steps in the foregoing various embodiments of the phototherapy mask control method are implemented, such as Figure 1 the steps S101 to S105 shown. Alternatively, when the processor 60 executes the computer program 62, the functions of the respective modules / units in the foregoing device embodiments are implemented, such as Figure 5The functions of the modules 501 to 505 shown.
[0158] Exemplarily, the computer program 62 can be divided into one or more modules / units, and the one or more modules / units are stored in the memory 61 and executed by the processor 60 to complete the present application. The one or more modules / units can be a series of computer program instruction segments capable of completing specific functions, and these instruction segments are used to describe the execution process of the computer program 62 in the electronic device 6.
[0159] The electronic device 6 can include, but is not limited to, computing devices such as a light therapy facial mask, a desktop computer, a notebook, a palm computer, and a server. Those skilled in the art can understand that Figure 6 These are merely examples of the electronic device 6 and do not constitute a limitation on the electronic device 6. It may include more or fewer components than shown in the figure, or combine certain components, or have different components. For example, the electronic device 6 may further include input / output devices, network access devices, a bus, etc.
[0160] The processor 60 can be a central processing unit (CPU), or can also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0161] The memory 61 can be an internal storage unit of the electronic device 6, such as the hard disk or memory of the electronic device 6. The memory 61 can also be an external storage device of the electronic device 6, such as a plug-in hard disk equipped on the electronic device 6, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Further, the memory 61 can also include both the internal storage unit and the external storage device of the electronic device 6. The memory 61 is used to store the computer program and other programs and data required by the electronic device 6. The memory 61 can also be used to temporarily store data that has been output or will be output.
[0162] Those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the above-mentioned division of each functional unit and module is used as an example. In practical applications, the above functions can be allocated to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiments can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of this application. The specific working processes of the units and modules in the above system can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated here.
[0163] In the above embodiments, the descriptions of each embodiment have their own emphases. For the parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0164] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or by a combination of computer software and electronic hardware. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0165] In the embodiments provided in this application, it should be understood that the disclosed device / electronic device and method can be implemented in other ways. For example, the device / electronic device embodiments described above are only illustrative. For example, the division of the module or unit is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in electrical, mechanical or other forms.
[0166] The unit described as a separated component may or may not be physically separated, and the component displayed as a unit may or may not be a physical unit, that is, it can be located in one place, or can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0167] In addition, in each embodiment of the present application, each functional unit can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0168] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above-mentioned embodiment methods of the present application, it can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable storage medium can include: any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable storage medium does not include electrical carrier signals and telecommunication signals.
[0169] The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for controlling a light therapy facial mask, characterized in that Including: Obtain a facial image of the phototherapy object; Perform skin flaw recognition on the facial image to obtain a skin flaw area and the corresponding skin flaw type; Determine a target lamp bead set corresponding to the skin flaw area in the phototherapy mask; Determine a target phototherapy method corresponding to the skin flaw type; Control the target lamp bead set in the phototherapy mask to perform phototherapy on the phototherapy object according to the target phototherapy method.
2. The light therapy mask control method according to claim 1, wherein The facial image includes a facial UV image; Correspondingly, the performing skin flaw recognition on the facial image to obtain a skin flaw area and the corresponding skin flaw type includes: Perform skin pigmentation recognition on the facial UV image to obtain the skin flaw area with pigmentation.
3. The method for controlling a light therapy facial mask according to claim 1, wherein After obtaining the skin flaw area and the corresponding skin flaw type, it further includes: Obtain skin flaw type modification information; Modify the skin flaw type according to the skin flaw modification information to obtain the modified skin flaw type; Correspondingly, the determining a target phototherapy method corresponding to the skin flaw type includes: Determine a target phototherapy method corresponding to the modified skin flaw type.
4. The light therapy mask control method according to claim 1, wherein After obtaining the facial image of the phototherapy object, it further includes: Determine the shooting angle of the facial image; Perform image correction on the facial image according to the shooting angle to obtain the corrected facial image; Correspondingly, the performing skin flaw recognition on the facial image to obtain a skin flaw area and the corresponding skin flaw type includes: Perform skin flaw recognition on the corrected facial image to obtain a skin flaw area and the corresponding skin flaw type.
5. The light therapy facial mask control method according to claim 1, wherein The performing skin flaw recognition on the facial image to obtain a skin flaw area and the corresponding skin flaw type includes: Input the facial image into a preset skin flaw recognition model and obtain the skin flaw area and the corresponding skin flaw type output by the skin flaw recognition model; Wherein, the skin flaw recognition model is an artificial intelligence model pre-trained for skin flaw recognition.
6. The light therapy mask control method according to claim 5, wherein Before inputting the facial image into the preset skin flaw recognition model, it further includes: Construct a training data set for training the skin flaw recognition model; wherein, the training data set includes a number of training samples, and each training sample includes a set of sample facial images and the corresponding skin flaw recognition annotation results; Use the sample facial images of the training samples as inputs and the corresponding skin flaw recognition annotation results as expected outputs to train an initial artificial intelligence model to obtain the trained skin flaw recognition model.
7. The light therapy mask control method according to claim 6, characterized in that, The using the sample facial images of the training samples as inputs and the corresponding skin flaw recognition annotation results as expected outputs to train an initial artificial intelligence model to obtain the trained skin flaw recognition model includes: Use the artificial intelligence model to process the sample facial images of the training samples to obtain the actual outputs of the training samples; Use a preset loss function to determine a training loss value according to the expected outputs and actual outputs in the training samples; Adjust the model parameters of the artificial intelligence model according to the training loss value until the preset training conditions are met, and obtain the trained skin defect recognition model.
8. The light therapy mask control method according to claim 1, characterized in that After obtaining the facial image of the phototherapy object, it further includes: Perform skin color analysis on the facial image to obtain the skin color information of the phototherapy object; Correspondingly, the step of performing skin defect recognition in the facial image to obtain the skin defect area and the corresponding skin defect type includes: Based on the skin color information, perform skin defect recognition in the facial image to obtain the skin defect area and the corresponding skin defect type.
9. The light therapy facial mask control method according to any one of claims 1 to 8, characterized in that, It further includes: Determine the user profile corresponding to the phototherapy object, and obtain the historical phototherapy record of the phototherapy object from the user profile; Correspondingly, the step of determining the target phototherapy method corresponding to the skin defect type includes: Combine the historical phototherapy record to determine the target phototherapy method corresponding to the skin defect type.
10. The light therapy mask control method according to claim 9, characterized in that, The step of combining the historical phototherapy record to determine the target phototherapy method corresponding to the skin defect type includes: Perform image comparison on the facial image in the historical phototherapy record and the facial image of the current phototherapy to obtain the facial image difference; According to the facial image difference, determine the target phototherapy method corresponding to the skin defect type.
11. A light therapy facial mask control device, characterized in that, It includes: A facial image acquisition module for acquiring the facial image of the phototherapy object; A skin defect recognition module for performing skin defect recognition in the facial image to obtain the skin defect area and the corresponding skin defect type; A lamp bead set determination module for determining the target lamp bead set corresponding to the skin defect area in the phototherapy mask; A phototherapy method determination module for determining the target phototherapy method corresponding to the skin defect type; A phototherapy mask control module for controlling the target lamp bead set in the phototherapy mask to perform phototherapy on the phototherapy object according to the target phototherapy method.
12. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the phototherapy mask control method according to any one of claims 1 to 10.
13. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the phototherapy mask control method according to any one of claims 1 to 10.