Lipstick color recommendation method, device, medium and program product

By obtaining the target image input by the user, determining the facial features and clothing features, combining the scene type, selecting images with high similarity from the preset image library to recommend lipstick colors, which solves the complexity and low accuracy of model training in the existing technology. The problem of this problem is to realize the simple, convenient and high-precision lipstick color recommendation, which improves user satisfaction.

CN114610995BActive Publication Date: 2024-11-05TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210229724.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-10
Publication Date
2024-11-05
Estimated Expiration
2042-03-10

AI Technical Summary

Technical Problem

The model training process of the existing lipstick color recommendation method is complicated and the recommended results are not accurate, which cannot meet the user's choice needs.

Method used

By obtaining the target image input by the user, determining the facial features and clothing features, combining the scene type, selecting images with high similarity from the preset image library to recommend lipstick colors, simplifying the model training process and improving the recommended accuracy and Adaptability.

Benefits of technology

It realizes simple and convenient lipstick color recommendation, improves the adaptability and accuracy of recommendations, and improves user satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114610995B_ABST
    Figure CN114610995B_ABST
Patent Text Reader

Abstract

The present application provides a lipstick color recommendation method, device, medium and program product. The method includes: obtaining a target image input by a user, determining the facial features and clothing features of the target image; determining the scene type of the scene in which the lipstick is used; determining a first image whose similarity with the target image is greater than a preset threshold from a preset image library based on the facial features, clothing features and scene type; determining a recommended lipstick color corresponding to the target image based on the lipstick color in the first image; and outputting the recommended lipstick color to the user. The method of the present application can complete the recommendation of lipstick color without a complex model training process, is simple and convenient to operate, and improves the adaptability and accuracy of lipstick color recommendation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a lipstick color recommendation method, device, medium and program product. Background Art

[0002] Lipstick is an important lip makeup that can enhance facial beauty and personal charm by modifying lip color and contour. Therefore, it is very important to choose the right lipstick color for the user.

[0003] In the prior art, when users choose a suitable lipstick color, first, the user can upload his or her own photo to the lipstick color recommendation applet. Then, the applet can select and output a suitable lipstick color based on the user's facial features, skin color features, etc. in the photo. A lipstick color recommendation model is pre-set in the applet. During training, the model uses celebrity makeup images, makeup images in social media, etc. as training samples, facial features and skin color features as input, and lipstick color as output for training, so that the trained model has the function of recommending lipstick colors based on facial features and skin color features in the image. However, the training process of the model is relatively complicated, and the lipstick color recommended by the model is not accurate, and often fails to satisfy users.

[0004] Therefore, a simpler and more accurate lipstick color recommendation solution is needed. Summary of the invention

[0005] The present application provides a lipstick color recommendation method, device, medium and program product to solve the technical problems of the existing lipstick color recommendation method, such as the complex model training process and the low accuracy of the recommendation results.

[0006] In a first aspect, the present application provides a lipstick color recommendation method, comprising:

[0007] Acquire a target image input by a user, and determine facial features and clothing features of the target image;

[0008] Determine the scene type of the scene in which the lipstick is used;

[0009] Determine, from a preset image library, a first image whose similarity to the target image is greater than a preset threshold value according to facial features, clothing features, and scene types;

[0010] Determining a recommended lipstick color corresponding to the target image according to the lipstick color in the first image;

[0011] The recommended lipstick color is output to the user.

[0012] In a possible implementation manner, determining the scene type of the scene in which the lipstick is used specifically includes:

[0013] Receive the scene type of the lipstick usage scene input by the user;

[0014] or,

[0015] Determining the scene type of the scene in which the lipstick is used according to the clothing characteristics;

[0016] or,

[0017] The background features of the target image are extracted, and the scene type of the scene in which the lipstick is used is determined according to the background features.

[0018] In a possible implementation manner, determining the recommended lipstick color corresponding to the target image according to the lipstick color in the first image specifically includes:

[0019] Determine a color weight corresponding to each first image according to the number of the first images and the similarity corresponding to each first image; respectively determine a pixel value corresponding to the lipstick color at the lip position in each first image; determine a color pixel value according to the sum of the product of the pixel value corresponding to each first image and the color weight corresponding to the first image; determine a recommended lipstick color corresponding to the color pixel value;

[0020] or,

[0021] Determine a second image with the greatest similarity to the first image; and determine a recommended lipstick color for the target image according to the lipstick color at the lip position in the second image.

[0022] In a possible implementation manner, outputting the recommended lipstick color to the user specifically includes:

[0023] Determining the lip position of the face in the target image;

[0024] adding the recommended lipstick color at the lip position to generate a second image;

[0025] Outputting the second image and color confirmation prompt information to the user;

[0026] When receiving a color confirmation instruction input by the user, generating a formulation strategy for the recommended lipstick color;

[0027] When a color modification instruction input by the user is received, the lipstick color in the color modification instruction is obtained, and a formulation strategy for the lipstick color is generated, or the step of determining, from a preset image library, a first image whose similarity with the target image is greater than a preset threshold based on facial features, clothing features and scene types is re-executed.

[0028] In a possible implementation manner, generating the recommended lipstick color or the formulation strategy of the lipstick color specifically includes:

[0029] Determine the corresponding color to be prepared according to the recommended lipstick color or the color system of the lipstick color;

[0030] Determine the recommended lipstick color or the color number corresponding to the lipstick color;

[0031] Determine the ratio of the color to be prepared corresponding to the color number;

[0032] The recommended lipstick color or the lipstick color preparation strategy is generated according to the colors to be prepared and the proportion relationship of the colors to be prepared.

[0033] In a possible implementation manner, after determining the ratio of the to-be-mixed colors corresponding to the color numbers, the method further includes:

[0034] Acquire images of lipstick liquid corresponding to each color to be prepared in the lipstick preparation device;

[0035] respectively determining the pixel difference between the color of each of the images of the lipstick liquid and the corresponding color to be prepared;

[0036] The proportion relationship of the colors to be prepared is corrected according to the pixel difference.

[0037] In a possible implementation manner, after the proportional relationship of the colors to be prepared is corrected according to the pixel difference, the method further includes:

[0038] The proportion relationship of the colors to be prepared corresponding to the color number is updated according to the corrected proportion relationship of the colors to be prepared.

[0039] In a second aspect, the present application provides a lipstick color recommendation device, comprising: a processor, and a memory communicatively connected to the processor;

[0040] The memory stores computer-executable instructions;

[0041] The processor executes the computer-executable instructions stored in the memory to implement the above method.

[0042] In a third aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to implement the above-mentioned method when executed by a processor.

[0043] In a fourth aspect, the present application provides a computer program product, including a computer program, which implements the above method when executed by a processor.

[0044] The lipstick color recommendation method provided by the present application can obtain the target image input by the user, determine the facial features and clothing features of the target image; determine the scene type of the scene where the lipstick is used; determine the first image whose similarity with the target image is greater than a preset threshold from the preset image library according to the facial features, clothing features and scene type; determine the recommended lipstick color corresponding to the target image according to the lipstick color in the first image; and output the recommended lipstick color to the user. Since the lipstick color is mainly determined by the facial features, clothing features and scene type, an image library can be established in advance, and the lipstick color of each image in the image library can be obtained by professionals according to the facial features, clothing features and scene type in the image. After obtaining the target image input by the user, by calculating the similarity between the target image and the image in the preset image library using the facial features, clothing features and scene type, the first image similar to the target image in the preset image library can be obtained, and the recommended lipstick color corresponding to the target image can be simply and accurately determined according to the lipstick color in the first image. The method of the present application can complete the recommendation of lipstick color without a complex model training process, and the operation is simple and convenient. In addition, since the recommended lipstick color is determined based on the first image that is similar to the target image, under the premise that the similarity of facial features, clothing features and scene types is high, the lipstick color of the first image is also more compatible with the target image. Through such a setting, the adaptability and accuracy of the lipstick color recommendation are improved, thereby improving user satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] 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.

[0046] Figure 1 This is a schematic diagram of an operation interface of an embodiment of the present application;

[0047] Figure 2 A system architecture diagram of an embodiment of the present application;

[0048] Figure 3 This is a flow chart of a lipstick color recommendation method according to an embodiment of the present application;

[0049] Figure 4 A flow chart of a lipstick color recommendation method according to another embodiment of the present application;

[0050] Figure 5 This is a schematic structural diagram of a lipstick color recommendation device according to an embodiment of the present application.

[0051] Figure numerals: 1. lipstick color recommendation application; 2. lipstick manufacturing device.

[0052] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0053] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0054] In the prior art, users can download related applications for lipstick color recommendation on their mobile phones. When selecting a suitable lipstick color, the user first opens the application and takes a photo, and uploads the image of the color to be recommended to the application. After receiving the image of the color to be recommended, the application first determines the facial features and skin color features of the image, and then uses the pre-loaded color recommendation model to determine the corresponding recommended color based on the facial features and skin color features, and finally outputs the recommended lipstick color to the user. The user can decorate his lips according to the lipstick color output by the application.

[0055] The color recommendation model is trained in the following steps: First, celebrity makeup images and makeup images in social media are collected as training samples. Then, the facial features and skin color features of the image and the color of the lipstick are annotated to generate labels. After that, a suitable neural network framework and loss function are selected, and the labeled training samples are trained for multiple iterations. Finally, the trained model is tested to obtain a color recommendation model, which has the function of recommending lipstick colors based on the facial features and skin color features of the image.

[0056] However, the training process of the above model is complicated and the convergence speed is slow. The long training time leads to low model accuracy, which makes the lipstick color recommended by the model not very accurate and often fails to satisfy users.

[0057] The lipstick color recommendation method provided by the present application is intended to solve the above technical problems of the prior art. The method can pre-establish an image library, and the lipstick color of each image in the image library can be matched by professionals according to facial features, clothing features and scene types. After obtaining the target image input by the user, the similarity between the target image and the image in the preset image library is calculated by using facial features, clothing features and scene types, so that the first image similar to the target image in the preset image library can be obtained, and the recommended lipstick color corresponding to the target image can be simply and accurately determined according to the lipstick color in the first image. The method of the present application does not require a complex model training process to complete the recommendation of lipstick color, and the operation is simple and convenient. In addition, since the recommended lipstick color is determined based on the first image similar to the target image, under the premise of high similarity of facial features, clothing features and scene types, the lipstick color of the first image is also highly compatible with the target image. Through such a setting, the adaptability and accuracy of the lipstick color recommendation are improved, and the user satisfaction is also improved.

[0058] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0059] Figure 1 This is a schematic diagram of the operation interface of an embodiment of the present application. When a user wants to get a suitable lipstick color, he can open the lipstick color recommendation APP on the mobile phone. Figure 1 As shown in the left picture of the , users can click the photo option in the left picture interface to take a photo and upload the target image, or click the upload option to upload the selected photo as the target image. After the lipstick color recommendation APP obtains the target image, it determines the facial features and clothing features of the target image on the one hand, and displays the display interface for selecting the lipstick usage scene type on the other hand. Figure 1 As shown in the middle figure, users can click on the scene type of lipstick actually used, such as the "Dating" option. After the lipstick color recommendation APP obtains the scene type of the lipstick usage scenario, it finds the first image with a similarity with the photo greater than a preset threshold from the stored image library based on the facial features, clothing features and scene type, and determines the recommended lipstick color corresponding to the target image based on the lipstick color in the first image. Afterwards, the lipstick color recommendation APP adds the recommended lipstick color to the lip position in the target image to generate a second image, and displays the second image and color confirmation prompt information on the display interface. As shown Figure 1As shown in the right picture, if the user is satisfied with the recommended lipstick color, the user can click the OK option. If the user is not satisfied with the recommended lipstick color, the user can click the Modify option to modify the recommended lipstick color, so that the user can easily and accurately obtain the lipstick color that suits him or her.

[0060] Figure 2 This is a system architecture diagram of an embodiment of the present application, such as Figure 2 As shown, in Figure 1 After the display interface shown in the right figure is displayed, if the user clicks the confirmation option, the lipstick color recommendation application 1 generates a formulation strategy for the recommended lipstick color and sends the formulation strategy to the lipstick manufacturing device 2. After receiving the formulation strategy, the lipstick manufacturing device 2 determines the control parameters according to the formulation strategy and manufactures the lipstick according to the control parameters, and the user can decorate the lips according to the manufactured lipstick.

[0061] Embodiment 1

[0062] Figure 3 This is a flow chart of a lipstick color recommendation method provided by an embodiment of the present application. The execution subject of the lipstick color recommendation method provided by the embodiment of the present application can be an electronic device (hereinafter referred to as an electronic device) integrated with a lipstick color recommendation program, or a server. This embodiment describes the lipstick color recommendation method with the execution subject being an electronic device. Figure 3 As shown, the lipstick color recommendation method may include the following steps:

[0063] S101: Acquire a target image input by a user, and determine facial features and clothing features of the target image.

[0064] In this embodiment, facial features and clothing features are the basis for lipstick color recommendation, and the lipstick color that matches the facial features and clothing features is the personalized lipstick color suitable for the user.

[0065] For example, if the face is heavily made-up, it usually corresponds to a darker lipstick color; if the face is round, it usually corresponds to a more lively lipstick color; the lipstick color is usually in the same color family as the clothing.

[0066] In this embodiment, the electronic device may be a mobile phone, a computer, a smart makeup mirror, etc. For example, the user can directly take a photo and upload the target image in the relevant application for lipstick color recommendation in the mobile phone, or upload the photo taken in advance to the application.

[0067] In this embodiment, the face features may include face shape features, facial features, makeup features, hairstyle features and expression features, and of course, other face features may also be used, without any limitation. Clothing features may include clothing color, style and other features.

[0068] S102: Determine the scene type of the scene in which the lipstick is used.

[0069] In this embodiment, the color of the lipstick should be compatible with the scene type of the scene in which the lipstick is used. Different scenes have different requirements for the color of the lipstick. For example, a party scene is suitable for a relatively stable bright red color, while a dating scene and an entertainment scene are suitable for a relatively lively orange-red color. Therefore, the scene type of the scene in which the lipstick is used is crucial to the recommendation of the lipstick color.

[0070] In this embodiment, the scene types may include: work scenes, dating scenes, sports scenes, entertainment scenes, party scenes, etc. Those skilled in the art may set them flexibly without any limitation here.

[0071] In a possible implementation, the above step S102 of determining the scene type of the scene in which the lipstick is used may include: receiving the scene type of the scene in which the lipstick is used input by the user.

[0072] In this embodiment, the electronic device can display scene type options on the display interface for the user to select, and of course, the user can also directly input the scene type on the display interface. Through such a setting, the process of the electronic device obtaining the scene type is simple and accurate.

[0073] Alternatively, the above step S102 of determining the scene type of the scene in which the lipstick is used may also include: determining the scene type of the scene in which the lipstick is used according to clothing features.

[0074] In this embodiment, since the user's clothing is closely related to the scene the user is going to, that is, the scene where the lipstick is used, the scene type of the scene where the lipstick is used can be directly determined based on the user's clothing features in the image. For example, if the user is wearing a dress, the scene where the lipstick is used is a party scene; if the user is wearing a suit and a briefcase, the scene where the lipstick is used is a work scene.

[0075] In this embodiment, the scene type of the scene in which the lipstick is used can be directly determined based on the clothing features obtained in the above step S101, without the user having to input any information, and the operation is simpler and more intelligent.

[0076] Alternatively, the above step S102 of determining the scene type of the scene in which the lipstick is used may further include: extracting background features of the target image, and determining the scene type of the scene in which the lipstick is used according to the background features.

[0077] In this embodiment, the background in the target image is usually the scene that the user wants to go to, that is, the scene where the lipstick is used. Therefore, if the target image includes the background, the scene type of the scene where the lipstick is used can also be determined according to the background characteristics. For example, if the background in the target image is a stadium, the scene where the lipstick is used is a sports scene; if the background in the target image is a cafe, the scene where the lipstick is used is a dating scene.

[0078] In this embodiment, the scene type of the scene in which the lipstick is used is determined according to the background features of the extracted target image, which is easy to operate and has high intelligence and accuracy.

[0079] S103: Determine, from a preset image library, a first image whose similarity to the target image is greater than a preset threshold value according to facial features, clothing features and scene types.

[0080] In this embodiment, the preset image library may include multiple images, each of which may include a face, clothing combinations and scenes. Of course, it may also include only a face, and the clothing combinations and scenes are marked as labels on the corresponding images. The faces, clothing combinations and scenes in the images may be a random combination of various facial features, clothing features and scene types. The lip position in each image also includes a lipstick color, which can be obtained by a professional makeup artist based on the face, clothing combinations and scenes in the image. This combination can be considered to be adaptive and can produce a gain effect on the face in the image and enhance personal charm. In other words, the preset image library is an image library that has been matched with lipstick colors based on facial features, clothing features and scene types.

[0081] In this embodiment, if the similarity with the target image is greater than the preset threshold, it means that the first image and the target image have a high similarity, that is, the facial features, clothing features and scene types of the target image and the first image are basically consistent, and then the recommended lipstick color corresponding to the target image can be determined according to the lipstick color in the first image. Those skilled in the art can flexibly set the preset threshold, for example, the preset threshold can be 0.8 or 0.9, and no limitation is made here.

[0082] S104: Determine a recommended lipstick color corresponding to the target image according to the lipstick color in the first image.

[0083] In a possible implementation, the above-mentioned step S104 determines the recommended lipstick color corresponding to the target image based on the lipstick color in the first image, and may include: determining the color weight corresponding to each first image based on the number of first images and the similarity corresponding to each first image; respectively determining the pixel value corresponding to the lipstick color at the lip position in each first image; determining the color pixel value based on the sum of the product of the pixel value corresponding to each first image and the color weight corresponding to the first image; and determining the recommended lipstick color corresponding to the color pixel value.

[0084] In this embodiment, different lipstick manufacturers have different names and definitions for lipstick colors and color numbers, so the color pixel value can be calculated first, and then the corresponding recommended lipstick color can be determined based on the color pixel value. Furthermore, there may be multiple first images, and the lipstick colors in different first images may be different. Therefore, the pixel values ​​corresponding to the first images can be weighted and summed to obtain the final color pixel value, so that the recommended lipstick color corresponding to the color pixel value is more accurate and adaptable, further improving the accuracy and adaptability of the lipstick color recommendation.

[0085] For example, there are three first images A, B, and C whose similarity with the target image is greater than the preset threshold of 0.9, and their similarities are 0.95, 0.97, and 0.99, respectively. The color weight of image A is 0.95 / (0.95+0.97+0.99)=0.32, the color weight of image B is 0.97 / (0.95+0.97+0.99)=0.33, and the color weight of image C is 1-0.32-0.33=0.35. If the pixel values ​​corresponding to the lipstick color at the lip position of the three images A, B, and C are a, b, and c, respectively, then the color pixel value is 0.32a+0.33b+0.35c, and the color corresponding to the color pixel value is the recommended lipstick color.

[0086] Alternatively, the above step S104 determines the recommended lipstick color corresponding to the target image according to the lipstick color in the first image, and may also include: determining the second image with the greatest similarity in the first image; and determining the recommended lipstick color of the target image according to the lipstick color at the lip position in the second image.

[0087] In this embodiment, when there are multiple first images, the lipstick color at the lip position in the image with the greatest similarity can be directly used as the recommended lipstick color for the target image. The operation is simple and convenient. Moreover, since the image with the greatest similarity is also the closest to the target image, it also means that the lipstick color at the lip position in the image is also the most suitable for the target image, which further improves the accuracy and adaptability of the lipstick color recommendation.

[0088] S105: Outputting the recommended lipstick color to the user.

[0089] In a possible implementation, the above step S105 outputting the recommended lipstick color to the user may include: determining the lip position of the face in the target image; adding the recommended lipstick color to the lip position to generate a second image; and outputting the second image and color confirmation prompt information to the user. When a color confirmation instruction input by the user is received, a formulation strategy for the recommended lipstick color is generated; when a color modification instruction input by the user is received, the lipstick color in the color modification instruction is obtained, and a formulation strategy for the lipstick color is generated.

[0090] In this embodiment, please refer to Embodiment 2 for details on the specific method of generating the recommended lipstick color or the formulation strategy of the lipstick color.

[0091] In this embodiment, the recommended lipstick color can be added to the lip position in the target image to generate a second image, and the second image and color confirmation prompt information are output to the user so that the user can determine whether the recommended lipstick color is suitable and whether it needs to be modified based on the second image. If the user is not satisfied, the recommended lipstick color can be directly modified, thereby further improving the adaptability and accuracy of the lipstick color recommendation and enhancing user satisfaction.

[0092] In this embodiment, if the user is not satisfied with the recommended lipstick color, the electronic device can directly output color modification options on the display screen, and the user can select a suitable color from the options. Of course, the user can also directly input a satisfactory lipstick color into the electronic device.

[0093] Alternatively, when a color modification instruction input by the user is received, the step of determining a first image having a similarity with the target image greater than a preset threshold from a preset image library according to facial features, clothing features and scene type may be re-executed.

[0094] In this embodiment, if the user is not satisfied with the recommended lipstick color, the above step S103 can be re-executed to re-recommend a lipstick color that matches the target image, thereby improving the intelligence of the lipstick color recommendation.

[0095] In this embodiment, since the lipstick color is mainly determined by facial features, clothing features and scene types, an image library can be established in advance, and the lipstick color of each image in the image library can be matched by professionals according to the facial features, clothing features and scene types in the image. After obtaining the target image input by the user, the similarity between the target image and the image in the preset image library is calculated by using the facial features, clothing features and scene types, so that the first image similar to the target image in the preset image library can be obtained, and the recommended lipstick color corresponding to the target image can be simply and accurately determined according to the lipstick color in the first image. The method of the present application can complete the recommendation of lipstick color without a complex model training process, and the operation is simple and convenient. In addition, since the recommended lipstick color is determined based on the first image similar to the target image, under the premise that the similarity of facial features, clothing features and scene types is high, the lipstick color of the first image is also highly compatible with the target image. Through such a setting, the adaptability and accuracy of the lipstick color recommendation are improved, and user satisfaction is improved.

[0096] The specific contents of generating the recommended lipstick color or the preparation strategy of the lipstick color in step S105 of the first embodiment are described in detail below with reference to the second embodiment.

[0097] Embodiment 2

[0098] Figure 4 This is a flow chart of a lipstick color recommendation method provided by an embodiment of the present application. The execution subject of the lipstick color recommendation method provided by the embodiment of the present application can be an electronic device (hereinafter referred to as an electronic device) integrated with a lipstick color recommendation program, or a server. This embodiment describes the lipstick color recommendation method with the execution subject being an electronic device. Figure 4 As shown, the lipstick color recommendation method may include the following steps:

[0099] S201: Determine a corresponding color to be prepared according to a recommended lipstick color or a color system of the lipstick color.

[0100] In this embodiment, lipstick colors can be roughly divided into five color systems: red, pink, orange, brown, and purple. Lipstick is not prepared in the common way of mixing basic colors. For example, rose-red lipstick is not prepared by directly mixing the three basic colors of red, green, and blue, but by mixing lipstick liquids corresponding to red, pink, and blue-purple. Red, pink, and blue-purple are also the colors to be prepared in the entire color system of red. By adjusting the mixing ratio of each color to be prepared, all colors of the red system can be prepared. Therefore, when generating a recommended lipstick color or a lipstick color preparation strategy, it is first necessary to determine the color system in which the recommended lipstick color or lipstick color is located, and then determine the corresponding color to be prepared according to the color system.

[0101] For example, the colors to be prepared corresponding to each color system are shown in Table 1 below:

[0102] Table 1

[0103] Color Color to be prepared red Red, pink and violet pink Rose, pink and red Orange Red, orange and pink brown Red, brown and orange Purple Red, pink and violet

[0104] In this embodiment, the colors to be prepared corresponding to each color system can be flexibly set by those skilled in the art according to actual conditions, and no limitation is made here.

[0105] S202: Determine a recommended lipstick color or a color number corresponding to the lipstick color.

[0106] In this embodiment, although different lipstick manufacturers have different names and definitions for lipstick colors and color numbers, the pixel values ​​corresponding to lipstick colors are fixed. For example, RGB255, 0, 0 represents red, which is called bright red by some manufacturers and numbered as 500, and called true red by some manufacturers and numbered as 999, but in fact, their pixel values ​​are the same and are the same color. The six-digit color code starting with "#" represents a hexadecimal color code, which is a common representation of lipstick colors. Therefore, in this embodiment, we use the six-digit color code starting with "#" as the only lipstick color number, and uniformly number the lipstick colors, and each color corresponds to a lipstick color number, for example, the color number of red is #FF0000, and the color number of light pink is #FFB6C1. In this embodiment, the pixel value of the recommended lipstick color or lipstick color can be determined first, and then the corresponding lipstick color number can be determined according to the pixel value.

[0107] Usually, the RGB mode is used to determine a color, which is to specify the intensity of the three primary colors R / G / B, that is, red / green / blue, respectively. The intensity of each color is from 0 to 255, so it is expressed in hexadecimal values, and 255 corresponds to FF in hexadecimal. The hexadecimal values ​​corresponding to the three RGB values ​​are listed in sequence, and the color code is formed by starting with #. For example, the color code "#FF0000" represents red because the red value reaches the highest value FF (that is, 255 in decimal) and the intensity of the other two colors is 0.

[0108] S203: Determine the ratio of the color to be prepared corresponding to the color number.

[0109] In this embodiment, the proportional relationship between the colors to be prepared corresponding to different color numbers is a known proportional relationship table, and the proportional relationship between the colors to be prepared corresponding to the color numbers can be known according to the proportional relationship table.

[0110] For example, the ratio relationship table of color numbers and colors to be prepared is shown in Table 2 below:

[0111] Table 2

[0112] Color color Color to be prepared Proportional relationship #FF0000 red Red, pink and violet 1:0:0 #FF7F50 Coral Red Red, pink and violet 7:2:1 #FF00FF Magenta Red, pink and violet 5:1:4 #DA70D6 Aunt Red Red, pink and violet 3:3:4 #FFC0CB Pink Red, pink and violet 3:6:1

[0113] S204: Acquire images of lipstick liquids corresponding to the colors to be prepared in the lipstick preparation device.

[0114] S205: Determine the pixel difference between the color of each lipstick liquid image and the corresponding color to be prepared.

[0115] S206: Correcting the proportion of the colors to be prepared according to the pixel difference.

[0116] In this embodiment, due to production and processing errors, the actual color of the lipstick liquid may have a small error from the standard color to be prepared. For example, the color of lipstick liquids from different production batches may have errors, and the color of lipstick liquids from the same production batch at different production times may have errors. Therefore, it is necessary to correct the ratio of the color to be prepared according to the actual color of the lipstick liquid to improve the accuracy of the recommended lipstick color or the lipstick color.

[0117] In a possible implementation manner, after the proportional relationship of the colors to be prepared is corrected according to the pixel difference, the method may further include: updating the proportional relationship of the colors to be prepared corresponding to the color numbers according to the corrected proportional relationship of the colors to be prepared.

[0118] In this embodiment, by updating the proportion relationship of the colors to be prepared corresponding to the color number according to the corrected proportion relationship of the colors to be prepared, the generation efficiency of the preparation strategy can be improved. When the user selects the recommended lipstick color or lipstick color again, there is no need to correct the proportion relationship of the colors to be prepared, that is, there is no need to perform the operations of steps S204-S206, thereby improving the operation efficiency.

[0119] S207: Generate a recommended lipstick color or a lipstick color preparation strategy according to the colors to be prepared and the ratio relationship of the colors to be prepared.

[0120] In this embodiment, the corresponding color to be prepared is determined according to the recommended lipstick color or the color system of the lipstick color, so that the preparation strategy obtained thereby conforms to the actual preparation and production of lipstick. Furthermore, lipstick colors of different manufacturers are uniformly numbered according to the color number of the lipstick color, so that a one-to-one correspondence between the color and the color number is achieved, which facilitates the subsequent search for the proportion relationship of the corresponding color to be prepared according to the color number, thereby improving the accuracy of the recommended lipstick color or the preparation strategy of the lipstick color.

[0121] In this embodiment, after obtaining the lipstick color adapted to the user, the user does not necessarily have the lipstick of the color, so the electronic device can also be connected to the lipstick manufacturing device for communication. After the user determines the lipstick color, the electronic device can generate a formulation strategy for the lipstick color, and then send the formulation strategy for the lipstick to the lipstick manufacturing device. After receiving the formulation strategy, the lipstick manufacturing device can determine the control parameters according to the formulation strategy and manufacture the lipstick according to the control parameters, so that the user can use the lipstick of the color.

[0122] The lipstick color recommendation method of the present application is described below with reference to a specific embodiment.

[0123] Embodiment 3

[0124] In a specific embodiment, a user goes to a company for an interview. After matching the clothes for the interview, the user opens a lipstick color recommendation app on the mobile phone to get a suitable lipstick color. The specific lipstick color recommendation process is as follows:

[0125] In the first step, the user opens the app, selects the camera function to take a photo that includes the face and matched clothes, then uploads the photo and enters the interview scene.

[0126] In the second step, after the APP receives the photos uploaded by the user, it determines the facial features and clothing features of the photos.

[0127] In the third step, the APP finds the first image with a similarity greater than 0.9 with the photo from the stored image library based on facial features, clothing features and scene type.

[0128] In the fourth step, the APP determines the color pixel value according to the sum of the product of the pixel value corresponding to each first image and the color weight corresponding to the first image, and determines the recommended lipstick color corresponding to the color pixel value.

[0129] In the fifth step, the APP adds the recommended lipstick color to the lip position of the photo to generate a second image, and displays the second image and the option to confirm or modify the color on the display screen.

[0130] In the sixth step, the user is satisfied with the lipstick color in the second image and clicks on the confirmation option.

[0131] In the seventh step, the APP determines the color system of the lipstick color and the color to be prepared in that color system.

[0132] In the eighth step, the APP determines the color number of the lipstick color and the proportion of the color to be prepared corresponding to the color number.

[0133] In the ninth step, the APP generates a formulation strategy according to the colors to be formulated and the proportion relationship of the colors to be formulated, and sends the formulation strategy to the lipstick manufacturing device.

[0134] In the tenth step, after receiving the formulation strategy, the lipstick manufacturing device determines the control parameters according to the formulation strategy and manufactures the lipstick according to the control parameters. The user can decorate his lips according to the manufactured lipstick.

[0135] Figure 5 FIG. 1 is a schematic diagram of the structure of a lipstick color recommendation device according to an embodiment of the present application. Figure 5 As shown, the lipstick color recommendation device includes: a processor 101, and a memory 102 that is communicatively connected to the processor 101; the memory 102 stores computer-executable instructions; the processor 101 executes the computer-executable instructions stored in the memory 102 to implement the steps of the lipstick color recommendation method in the above-mentioned method embodiments.

[0136] The lipstick color recommendation device can be independent or a part of an electronic device such as a mobile phone or a computer loaded with the lipstick recommendation method. The processor 101 and the memory 102 can adopt the existing hardware of the electronic device.

[0137] In the above-mentioned lipstick color recommendation device, the memory 102 and the processor 101 are electrically connected directly or indirectly to realize data transmission or interaction. For example, these elements can be electrically connected to each other through one or more communication buses or signal lines, such as through a bus connection. The memory 102 stores computer-executable instructions for implementing the data access control method, including at least one software function module that can be stored in the memory 102 in the form of software or firmware. The processor 101 executes various functional applications and data processing by running the software programs and modules stored in the memory 102.

[0138] The memory 102 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electric erasable programmable read-only memory (EEPROM), etc. The memory 102 is used to store programs, and the processor 101 executes the programs after receiving the execution instruction. Furthermore, the software programs and modules in the above-mentioned memory 102 may also include an operating system, which may include various software components and / or drivers for managing system tasks (such as memory management, storage device control, power management, etc.), and may communicate with various hardware or software components to provide an operating environment for other software components.

[0139] The processor 101 may be an integrated circuit chip having the ability to process signals. The processor 101 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc. The methods, steps, and logic diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0140] An embodiment of the present application further provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the steps of each method embodiment of the present application.

[0141] An embodiment of the present application further provides a computer program product, including a computer program, which implements the steps of each method embodiment of the present application when executed by a processor.

[0142] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0143] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A lipstick color recommendation method, characterized in that: include: Acquire a target image input by a user, and determine facial features and clothing features of the target image; Determine the scene type of the scene in which the lipstick is used; Determine, from a preset image library, a first image whose similarity to the target image is greater than a preset threshold value according to facial features, clothing features, and scene types; Determining a recommended lipstick color corresponding to the target image according to the lipstick color in the first image; Determining the lip position of the face in the target image; adding the recommended lipstick color at the lip position to generate a second image; Outputting the second image and color confirmation prompt information to the user; When receiving a color confirmation instruction or a color modification instruction input by the user, determining the lipstick color corresponding to the instruction; Determine the corresponding color to be prepared according to the color system of the lipstick color; Determine the color number corresponding to the lipstick color; Determine the ratio of the color to be prepared corresponding to the color number; Acquire images of lipstick liquid corresponding to each color to be prepared in the lipstick preparation device; respectively determining the pixel difference between the color of each of the images of the lipstick liquid and the corresponding color to be prepared; Correcting the proportion relationship of the colors to be prepared according to the pixel difference; updating the proportion relationship of the colors to be prepared corresponding to the color number according to the corrected proportion relationship of the colors to be prepared; A formulation strategy for the lipstick color is generated according to the color to be formulated and the updated ratio relationship of the color to be formulated.

2. The method according to claim 1, characterized in that The determining of the scene type of the lipstick usage scene specifically includes: Receive the scene type of the lipstick usage scene input by the user; or, Determining the scene type of the scene in which the lipstick is used according to the clothing characteristics; or, The background features of the target image are extracted, and the scene type of the scene in which the lipstick is used is determined according to the background features.

3. The method according to claim 1, characterized in that The determining, according to the lipstick color in the first image, a recommended lipstick color corresponding to the target image specifically includes: Determine a color weight corresponding to each first image according to the number of the first images and the similarity corresponding to each first image; respectively determine a pixel value corresponding to the lipstick color at the lip position in each first image; determine a color pixel value according to the sum of the product of the pixel value corresponding to each first image and the color weight corresponding to the first image; determine a recommended lipstick color corresponding to the color pixel value; or, Determine a second image with the greatest similarity to the first image; and determine a recommended lipstick color for the target image according to the lipstick color at the lip position in the second image.

4. A lipstick color recommendation device, comprising a processor and a memory in communication with the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 3.

5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 3 when executed by a processor.

6. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.