Image data processing method and device, computer equipment and storage medium
By receiving the user's bare face images, performing image preprocessing and target generation model processing, combining detailed optimization and suggestions generation strategies, personalized makeup suggestions are generated, which solves the problem of inaccurate makeup suggestions in the existing technology, and realizes intelligent and personalized makeup suggestions, which improves the user experience.
Patent Information
- Application Number
- CN202411731147.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-11
AI Technical Summary
The existing technology cannot provide users with intelligent and personalized makeup advice, and fails to fully consider the individual differences of users, resulting in inaccurate makeup advice.
By receiving the bare face images uploaded by the user, after image preprocessing, image processing is performed based on the preset target generation model, combined with image detail optimization strategies and suggestions generation strategies, personalized makeup suggestions are generated, and displayed in the preset interface.
It has achieved personalized and intelligent makeup suggestions for users, improved the user's makeup efficiency and effect, and increased user stickiness.
Smart Images

Figure CN119600154A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the fields of artificial intelligence technology, financial technology and digital medicine, and in particular to methods, devices, computer equipment and storage media for processing image data. Background Art
[0002] In today's fast-paced social environment, makeup has become an indispensable part of many women's daily lives. It not only helps to improve personal image, but also enhances self-confidence and adds luster to daily life, work and social occasions. However, although the importance of makeup is widely recognized, how to customize makeup according to individual characteristics is a technical challenge. In response to this demand, many makeup-related applications have emerged on the market, such as beauty applications. These applications teach users makeup skills in the form of videos, pictures and texts to provide users with value-added services about makeup suggestions, thereby enhancing user stickiness. However, most of these applications use universal makeup steps and techniques, lack intelligent and personalized analysis functions, fail to fully consider the individual differences of users, and thus cannot provide accurate makeup suggestions based on users' facial features. Therefore, it is urgent to develop a solution that can provide users with intelligent and personalized makeup suggestions to make up for the shortcomings of existing applications in personalized services, thereby improving users' makeup efficiency and effects and increasing user stickiness. Summary of the invention
[0003] The purpose of the embodiments of the present application is to propose a method, apparatus, computer device and storage medium for processing image data to solve the technical problem that the application in the prior art cannot provide users with a solution for intelligent and personalized makeup suggestions.
[0004] In order to solve the above technical problems, the present application provides a method for processing image data, which adopts the following technical solution:
[0005] Receive the bare-faced image uploaded by the user in the preset interface;
[0006] Performing image preprocessing on the plain-faced image to obtain a corresponding designated plain-faced image;
[0007] Performing image processing on the designated plain-faced image based on a preset target generation model to obtain a corresponding makeup image;
[0008] Performing detail optimization processing on the makeup image based on a preset image detail optimization strategy to obtain a corresponding target makeup image;
[0009] Performing suggestion generation processing on the target makeup image based on a preset suggestion generation strategy to obtain corresponding makeup suggestions;
[0010] The target makeup image and the makeup suggestion are displayed in the preset interface.
[0011] Furthermore, before the step of performing image processing on the designated plain-faced image based on the preset target generation model to obtain the corresponding makeup image, the method further includes:
[0012] Acquire pre-collected initial makeup image data;
[0013] constructing corresponding makeup sample data based on the initial makeup image data;
[0014] Dividing the makeup sample data into a training data set and a test data set;
[0015] Calling a pre-built initial generative adversarial network; wherein the initial generative adversarial network includes a generator and a discriminator;
[0016] Based on a preset training strategy, the generator and the discriminator of the initial generative adversarial network are trained using the training data set to obtain a trained first generative model;
[0017] Performing model tuning processing on the first generation model based on the test data set to obtain a second generation model that meets preset performance requirements;
[0018] The second generative model is used as the target generative model.
[0019] Furthermore, the step of constructing corresponding makeup sample data based on the initial makeup image data specifically includes:
[0020] Preprocessing the makeup image data to obtain corresponding first makeup image data;
[0021] Performing data enhancement processing on the first makeup image data to obtain corresponding second makeup image data;
[0022] Performing data integration processing on the first makeup image data and the second makeup image data to obtain corresponding integrated image data;
[0023] The integrated image data is used as the makeup sample data.
[0024] Furthermore, the step of performing detail optimization processing on the makeup image based on a preset image detail optimization strategy to obtain a corresponding target makeup image specifically includes:
[0025] Performing definition enhancement processing on the makeup image to obtain a corresponding first makeup image;
[0026] Performing naturalness enhancement processing on the first makeup image to obtain a corresponding second makeup image;
[0027] Performing facial key point detection and alignment processing on the second makeup image to obtain a corresponding third makeup image;
[0028] The third makeup image is used as the target makeup image.
[0029] Furthermore, the step of performing suggestion generation processing on the target makeup image based on a preset suggestion generation strategy to obtain corresponding makeup suggestions specifically includes:
[0030] Performing color analysis on the target makeup image to obtain a corresponding color analysis result;
[0031] Performing makeup style analysis on the target makeup image to obtain a corresponding makeup style recognition result;
[0032] Integrate the color analysis result and the makeup style recognition result to obtain a corresponding integration result;
[0033] The integration result is used as the makeup suggestion.
[0034] Furthermore, the step of displaying the target makeup image and the makeup suggestion in the preset interface specifically includes:
[0035] Determining an image preview area and a suggested display area in the preset interface;
[0036] Displaying the target makeup image in the image preview area;
[0037] The makeup suggestion is displayed in the suggestion display area.
[0038] Furthermore, the step of performing image preprocessing on the plain image to obtain the corresponding designated plain image specifically includes:
[0039] Performing cropping processing on the plain-face image to obtain a corresponding first plain-face image;
[0040] Scaling the first plain-faced image to obtain a corresponding second plain-faced image;
[0041] Performing format verification on the second plain image;
[0042] If the second plain-faced image passes the format verification, the second plain-faced image is used as the designated plain-faced image.
[0043] In order to solve the above technical problems, the embodiment of the present application further provides an image data processing device, which adopts the following technical solution:
[0044] A receiving module, used to receive the bare face image uploaded by the user in the preset interface;
[0045] A preprocessing module, used for performing image preprocessing on the plain face image to obtain a corresponding designated plain face image;
[0046] A processing module, used for performing image processing on the specified plain-faced image based on a preset target generation model to obtain a corresponding makeup image;
[0047] An optimization module, used for performing detail optimization processing on the makeup image based on a preset image detail optimization strategy to obtain a corresponding target makeup image;
[0048] A generation module, configured to perform suggestion generation processing on the target makeup image based on a preset suggestion generation strategy to obtain corresponding makeup suggestions;
[0049] A display module is used to display the target makeup image and the makeup suggestion in the preset interface.
[0050] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:
[0051] Receive the bare-faced image uploaded by the user in the preset interface;
[0052] Performing image preprocessing on the plain-faced image to obtain a corresponding designated plain-faced image;
[0053] Performing image processing on the designated plain-faced image based on a preset target generation model to obtain a corresponding makeup image;
[0054] Performing detail optimization processing on the makeup image based on a preset image detail optimization strategy to obtain a corresponding target makeup image;
[0055] Performing suggestion generation processing on the target makeup image based on a preset suggestion generation strategy to obtain corresponding makeup suggestions;
[0056] The target makeup image and the makeup suggestion are displayed in the preset interface.
[0057] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:
[0058] Receive the bare-faced image uploaded by the user in the preset interface;
[0059] Performing image preprocessing on the plain-faced image to obtain a corresponding designated plain-faced image;
[0060] Performing image processing on the designated plain-faced image based on a preset target generation model to obtain a corresponding makeup image;
[0061] Performing detail optimization processing on the makeup image based on a preset image detail optimization strategy to obtain a corresponding target makeup image;
[0062] Performing suggestion generation processing on the target makeup image based on a preset suggestion generation strategy to obtain corresponding makeup suggestions;
[0063] The target makeup image and the makeup suggestion are displayed in the preset interface.
[0064] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0065] The present application first receives a bare-faced image uploaded by a user in a preset interface; and performs image preprocessing on the bare-faced image to obtain a corresponding designated bare-faced image; then performs image processing on the designated bare-faced image based on a preset target generation model to obtain a corresponding makeup image; then performs detail optimization processing on the makeup image based on a preset image detail optimization strategy to obtain a corresponding target makeup image; subsequently, performs suggestion generation processing on the target makeup image based on a preset suggestion generation strategy to obtain a corresponding makeup suggestion; finally, the target makeup image and the makeup suggestion are displayed in the preset interface. The present application performs image preprocessing on the bare-faced image uploaded by the user in the preset interface to obtain the designated bare-faced image, then performs image processing on the designated bare-faced image based on the use of a target generation model to obtain a makeup image, and performs detail optimization processing on the makeup image based on the use of an image detail optimization strategy to obtain a target makeup image, and further performs suggestion generation processing on the target makeup image based on the use of a suggestion generation strategy to obtain makeup suggestions, and then displays the target makeup image and the makeup suggestions in the preset interface, so as to provide the user with personalized and intelligent makeup suggestion information by displaying the target makeup image and the makeup suggestions, thereby effectively improving the user's makeup efficiency and effect, and helping to increase user stickiness. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0067] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0068] Figure 2 A flowchart of an embodiment of a method for processing image data according to the present application;
[0069] Figure 3 is a structural schematic diagram of an embodiment of an image data processing device according to the present application;
[0070] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0071] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0072] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0073] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0074] like Figure 1 As shown, the system architecture 100 may include a terminal device 101, a network 102 and a server 103. The terminal device 101 may be a laptop 1011, a tablet computer 1012 or a mobile phone 1013. The network 102 is used to provide a medium for a communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0075] The user can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0076] The terminal device 101 can be any electronic device with a display screen and supporting web browsing. In addition to the laptop computer 1011, tablet computer 1012 or mobile phone 1013, the terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV), a laptop computer, a desktop computer, etc.
[0077] The server 103 may be a server that provides various services, such as a background server that provides support for a web page displayed on the terminal device 101 .
[0078] It should be noted that the image data processing method provided in the embodiment of the present application is generally executed by a server / terminal device, and accordingly, the image data processing device is generally set in the server / terminal device.
[0079] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0080] Continue to refer Figure 2 , a flowchart of an embodiment of a method for processing image data according to the present application is shown. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted. The method for processing image data provided in the embodiment of the present application can be applied to any scenario where image data processing is required, and the method for processing image data can be applied to products in these scenarios, for example, makeup image processing in makeup scenarios in the field of smart cities. The method for processing image data comprises the following steps:
[0081] Step S201, receiving a bare-face image uploaded by a user in a preset interface.
[0082] In this embodiment, the image data processing method is executed on an electronic device (eg Figure 1The server / terminal device shown in the figure) can obtain the bare face image through a wired connection or a wireless connection. It should be noted that the above-mentioned wireless connection method may include but is not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future. The executor of the present application may be an image processing system, or simply referred to as a system. The image processing system can be integrated into financial applications or medical applications. By adding a function that can provide customized makeup suggestions based on the specific facial features of the customer to financial applications or medical applications, it is possible to intelligently attract customers or bring other added value to users, thereby further increasing customer stickiness. The above-mentioned preset interface is a user interface that is pre-built according to actual business needs and includes an upload image button, an image preview area, a suggestion display area, etc. The above-mentioned bare face image refers to the bare face image of the user's face. The user can upload a bare face image of the face in the user interface provided by the image processing system.
[0083] Step S202, performing image preprocessing on the plain face image to obtain a corresponding designated plain face image.
[0084] In the present embodiment, the above-mentioned specific implementation process of performing image preprocessing on the plain image to obtain the corresponding designated plain image will be described in further detail in subsequent specific embodiments of the present application and will not be elaborated in detail here.
[0085] Step S203, performing image processing on the designated plain-face image based on a preset target generation model to obtain a corresponding makeup image.
[0086] In this embodiment, by inputting a specified plain face image into the above-mentioned target generation model, the target generation model will automatically apply makeup to the specified plain face image, thereby outputting a corresponding makeup image. The target generation model is a pre-constructed model that has the function of outputting a makeup face image of any plain face image input. The construction process of the above-mentioned target generation model will be further described in detail in the subsequent specific embodiments of this application, and will not be elaborated on here.
[0087] Step S204: performing detail optimization processing on the makeup image based on a preset image detail optimization strategy to obtain a corresponding target makeup image.
[0088] In this embodiment, the specific implementation process of performing detail optimization processing on the makeup image based on the preset image detail optimization strategy to obtain the corresponding target makeup image will be further described in detail in the subsequent specific embodiments of this application, and will not be elaborated on here. By performing detail optimization processing on the makeup image, the clarity and naturalness of the generated target makeup image can be enhanced.
[0089] Step S205 , performing suggestion generation processing on the target makeup image based on a preset suggestion generation strategy to obtain corresponding makeup suggestions.
[0090] In this embodiment, the above-mentioned specific implementation process of performing suggestion generation processing on the target makeup image based on the preset suggestion generation strategy to obtain the corresponding makeup suggestion will be further described in detail in the subsequent specific embodiments of this application and will not be elaborated in detail here.
[0091] Step S206: displaying the target makeup image and the makeup suggestion in the preset interface.
[0092] In this embodiment, the specific implementation process of displaying the target makeup image and the makeup suggestions in the preset interface will be further described in detail in subsequent specific embodiments of the present application and will not be elaborated on here.
[0093] This application can provide customized makeup suggestions based on the specific facial features in the bare-faced images uploaded by users, helping them quickly improve their makeup skills in daily life and save time. As a value-added service, applications that integrate the image processing system of this application, such as financial applications and medical applications, will greatly enhance customer stickiness and enhance the company's product influence outside of financial services. It also brings potential cross-selling opportunities for core businesses such as insurance and banking.
[0094] The present application first receives a bare-faced image uploaded by a user in a preset interface; and performs image preprocessing on the bare-faced image to obtain a corresponding designated bare-faced image; then performs image processing on the designated bare-faced image based on a preset target generation model to obtain a corresponding makeup image; then performs detail optimization processing on the makeup image based on a preset image detail optimization strategy to obtain a corresponding target makeup image; subsequently, performs suggestion generation processing on the target makeup image based on a preset suggestion generation strategy to obtain a corresponding makeup suggestion; finally, the target makeup image and the makeup suggestion are displayed in the preset interface. The present application performs image preprocessing on the plain face image uploaded by the user in the preset interface to obtain the designated plain face image, then performs image processing on the designated plain face image based on the use of the target generation model to obtain the makeup image, and performs detail optimization processing on the makeup image based on the use of the image detail optimization strategy to obtain the target makeup image, and further performs suggestion generation processing on the target makeup image based on the use of the suggestion generation strategy to obtain the makeup suggestion, and then displays the target makeup image and the makeup suggestion in the preset interface, so as to provide the user with personalized and intelligent makeup suggestion information by displaying the target makeup image and the makeup suggestion, effectively improving the user's makeup efficiency and effect, and helping to increase user stickiness. In some optional implementations, before step S202, the above-mentioned electronic device may also perform the following steps:
[0095] Acquire pre-collected initial makeup image data.
[0096] In this embodiment, a large number of facial images before and after makeup are collected in advance from beauty bloggers, social media platforms and other channels, and the facial images before makeup (bare face photos) are used as training data, and the facial images after makeup are used as label data to construct corresponding initial makeup image data.
[0097] Corresponding makeup sample data is constructed based on the initial makeup image data.
[0098] In this embodiment, the specific implementation process of constructing the corresponding makeup sample data based on the initial makeup image data will be further described in detail in subsequent specific embodiments of the present application, and will not be elaborated on here.
[0099] The makeup sample data is divided into a training data set and a test data set.
[0100] In this embodiment, a preset division ratio may be used to divide the makeup sample data into a training data set and a test data set. There is no specific limitation on the numerical value of the division ratio, which may be set according to actual business needs, for example, 7:3.
[0101] Call a pre-built initial generative adversarial network; wherein the initial generative adversarial network includes a generator and a discriminator.
[0102] In this embodiment, the above-mentioned initial generative adversarial network is composed of a pre-designed generator and a discriminator. Specifically, the above-mentioned generator is a generator network that can receive a bare face photo as input and output a photo after makeup. Network structures such as U-Net and ResNet can be used, or a custom design can be performed to better capture the changing characteristics before and after makeup. The above-mentioned discriminator is a discriminator network that can receive a photo as input and determine whether the photo is a real photo after makeup. A CNN network structure can be used, or a custom design can be performed to improve the accuracy of the judgment. In addition, the loss function of the generator includes an adversarial loss function. The adversarial loss function is used to determine whether the photo output by the generator is similar to the real photo after makeup, and the loss function of the discriminator includes a reconstruction loss function. The reconstruction loss function is used to ensure the similarity between the photo output by the generator and the input bare face photo, so as to avoid generating makeup that deviates too much from the original face.
[0103] Based on a preset training strategy, the training data set is used to train the generator and the discriminator of the initial generative adversarial network to obtain a trained first generative model.
[0104] In this embodiment, the above training strategy refers to a strategy based on a deep learning framework, such as TensorFlow and PyTorch. Specifically, based on a deep learning framework, a training data set (including training data and label data) is input into the initial generative adversarial network for training. During the training process, the parameters of the generator and the discriminator are continuously optimized so that the generator can generate more realistic makeup photos, while the discriminator can more accurately judge the authenticity of the photos. And adaptive learning rate, batch normalization and other technologies are used to improve the training effect and stability of the model. Specifically, the model performance can be further optimized by adjusting parameters such as the network structure and the loss function, so as to obtain a trained first generation model.
[0105] The first generation model is subjected to model tuning processing based on the test data set to obtain a second generation model that meets preset performance requirements.
[0106] In this embodiment, the first generation model is evaluated by using a test data set, image quality indicators, user satisfaction and other indicators are calculated, and the evaluation results are analyzed (the image quality indicators are used to evaluate the clarity, naturalness and authenticity of the generated pictures), and the advantages and disadvantages of the model are identified. Then, the first generation model is tuned according to the evaluation results, such as adjusting the network structure, loss function, data enhancement strategy, etc., and the training and evaluation process is repeated until the model performance reaches a satisfactory level, thereby obtaining the corresponding second generation model.
[0107] The second generative model is used as the target generative model.
[0108] The present application obtains pre-collected initial makeup image data; then constructs corresponding makeup sample data based on the initial makeup image data; and divides the makeup sample data into a training data set and a test data set; then calls a pre-constructed initial generative adversarial network; wherein the initial generative adversarial network includes a generator and a discriminator; subsequently, based on a preset training strategy, the training data set is used to train the generator and discriminator of the initial generative adversarial network to obtain a trained first generative model; further, the first generative model is model-tuned based on the test data set to obtain a second generative model that meets preset performance requirements; and finally, the second generative model is used as the target generative model. The present application constructs corresponding makeup sample data based on pre-collected initial makeup image data, and divides the makeup sample data into a training data set and a test data set, and then uses the training data set to train the generator and discriminator of the initial generative adversarial network based on the training strategy to obtain a trained first generation model, and further performs model tuning on the first generation model based on the test data set, so as to efficiently and accurately construct a target generation model that meets performance requirements, effectively improve the model construction efficiency of the target generation model, and ensure the model effect of the obtained target generation model.
[0109] In some optional implementations of this embodiment, constructing corresponding makeup sample data based on the initial makeup image data includes the following steps:
[0110] The makeup image data is preprocessed to obtain corresponding first makeup image data.
[0111] In this embodiment, the preprocessing includes image cropping and scaling, image rotation and normalization. Specifically, image cropping and scaling include: using an image processing library to crop the image, remove unnecessary background information, and scale the cropped image to the same size (such as 256x256 pixels) to ensure the consistency of the model input. Image rotation includes: rotating the image to correct the deviation of the shooting angle. Normalization includes: normalizing the pixel value of the image from the range of 0-255 to the range of 0-1 or -1 to 1.
[0112] Perform data enhancement processing on the first makeup image data to obtain corresponding second makeup image data.
[0113] In this embodiment, the data enhancement process may include random rotation, scaling, flipping, etc. The data enhancement operation can increase the diversity of the training data set, thereby improving the robustness and generalization ability of the model.
[0114] The first makeup image data and the second makeup image data are subjected to data integration processing to obtain corresponding integrated image data.
[0115] In this embodiment, the integrated image data includes the first makeup image data and the second makeup image data.
[0116] The integrated image data is used as the makeup sample data.
[0117] The present application obtains the corresponding first makeup image data by preprocessing the makeup image data; then performs data enhancement processing on the first makeup image data to obtain the corresponding second makeup image data; then performs data integration processing on the first makeup image data and the second makeup image data to obtain the corresponding integrated image data; and subsequently uses the integrated image data as the makeup sample data. The present application obtains the first makeup image data by preprocessing the makeup image data, and obtains the second makeup image data by data enhancement processing on the first makeup image data, and then performs data integration processing on the first makeup image data and the second makeup image data, so that the corresponding makeup sample data can be constructed quickly and accurately, thereby improving the diversity and accuracy of the generated makeup sample data.
[0118] In some optional implementations, step S204 includes the following steps:
[0119] Perform definition enhancement processing on the makeup image to obtain a corresponding first makeup image.
[0120] In this embodiment, the definition enhancement process includes: using a sharpening filter in an image processing library to enhance the definition of the image.
[0121] The first makeup image is processed to enhance naturalness to obtain a corresponding second makeup image.
[0122] In this embodiment, the naturalness enhancement process includes: adjusting parameters such as contrast and brightness of the image to make the makeup image look more natural. This can be achieved by applying corresponding adjustment functions in the image processing library.
[0123] Perform facial key point detection and alignment processing on the second makeup image to obtain a corresponding third makeup image.
[0124] In this embodiment, the facial key point detection and alignment process includes: o Using a face detection algorithm to detect facial key points in the makeup image. Then, face alignment is performed based on the detected facial key points to ensure the accuracy and naturalness of the makeup. Specifically, this can be achieved based on geometric transformations such as affine transformation or perspective transformation.
[0125] The third makeup image is used as the target makeup image.
[0126] In this embodiment, the beauty function in the image processing library may be further called or a custom beauty algorithm, such as skin smoothing, freckle removal, acne removal, etc., may be used to further optimize the makeup image.
[0127] The present application performs clarity enhancement processing on the makeup image to obtain a corresponding first makeup image; then performs naturalness enhancement processing on the first makeup image to obtain a corresponding second makeup image; then performs facial key point detection and alignment processing on the second makeup image to obtain a corresponding third makeup image; and subsequently uses the third makeup image as the target makeup image. The present application performs clarity enhancement processing, naturalness enhancement processing, and facial key point detection and alignment processing on the makeup image based on the use of an image detail optimization strategy, thereby achieving efficient and accurate detail optimization processing for the makeup image, making the generated target makeup image more realistic and natural, enhancing the clarity and naturalness of the target makeup image, and effectively improving the image quality of the generated target makeup image.
[0128] In some optional implementations, step S205 includes the following steps:
[0129] Performing color analysis on the target makeup image to obtain a corresponding color analysis result.
[0130] In this embodiment, the color analysis of the target makeup image can be implemented by using a color recognition algorithm or a color extraction function in an image processing library to extract the main color tone and color scheme in the target makeup image, thereby obtaining a corresponding color analysis result.
[0131] Perform makeup style analysis on the target makeup image to obtain a corresponding makeup style recognition result.
[0132] In this embodiment, a deep learning model or an image classification algorithm can be used to identify the makeup style (such as natural makeup, smoky makeup, retro makeup, etc.) in the target makeup image based on factors such as color matching and makeup characteristics in the image, thereby obtaining the corresponding makeup style recognition result.
[0133] The color analysis result and the makeup style recognition result are integrated to obtain a corresponding integration result.
[0134] In this embodiment, the integration result includes the color analysis result and the makeup style recognition result.
[0135] The integration result is used as the makeup suggestion.
[0136] In this embodiment, specific makeup suggestions can be generated based on the color analysis results and makeup style recognition results. The makeup suggestions can include which color of eye shadow, lipstick, blush, etc. to use, as well as how to match colors and create makeup. In addition, the makeup suggestions can be displayed to the user in text form, or conveyed to the user in voice form through speech synthesis technology.
[0137] This application performs color analysis on the target makeup image to obtain a corresponding color analysis result; then performs makeup style analysis on the target makeup image to obtain a corresponding makeup style recognition result; then integrates the color analysis result and the makeup style recognition result to obtain a corresponding integration result; and subsequently uses the integration result as the makeup suggestion. This application performs color analysis and makeup style analysis on the target makeup image based on the use of a suggestion generation strategy to obtain a corresponding color analysis result and a makeup style recognition result, and then integrates the obtained color analysis result and the makeup style recognition result, so that the corresponding makeup suggestion can be generated quickly and accurately, ensuring the intelligence and accuracy of the generated makeup suggestion, which is beneficial to subsequently providing personalized makeup suggestions to users, thereby improving the user experience.
[0138] In some optional implementations of this embodiment, step S206 includes the following steps:
[0139] An image preview area and a suggested display area are determined in the preset interface.
[0140] In this embodiment, the preset interface is a user interface pre-built according to actual business needs and includes an upload image button, an image preview area, a suggestion display area, etc.
[0141] The target makeup image is displayed in the image preview area.
[0142] In this embodiment, the first position information of the image preview area in the preset interface can be determined, and then the target makeup image can be displayed in the image preview area according to the first position information.
[0143] The makeup suggestion is displayed in the suggestion display area.
[0144] In this embodiment, the second position information of the suggestion display area in the above-mentioned preset interface can be determined, and then the makeup suggestions can be displayed in the above-mentioned suggestion display area according to the second position information.
[0145] This application determines the image preview area and the suggestion display area in the preset interface; subsequently displays the target makeup image in the image preview area; and displays the makeup suggestion in the suggestion display area, so that the target makeup image and makeup suggestion can be displayed and processed quickly and accurately in the preset interface, thereby improving the standardization of data display. In addition, personalized and intelligent makeup suggestion information can be provided to users based on the display form of the target makeup image and makeup suggestion, effectively improving the user experience.
[0146] In some optional implementations of this embodiment, step S202 includes the following steps:
[0147] The plain-face image is cropped to obtain a corresponding first plain-face image.
[0148] In this embodiment, the plain image is cropped to match the size requirement of the model input of the target generation model.
[0149] The first plain-face image is scaled to obtain a corresponding second plain-face image.
[0150] In this embodiment, similarly, the first plain image is scaled to match the size requirement of the model input of the target generation model.
[0151] Perform format verification on the second plain image.
[0152] In this embodiment, the format verification refers to detecting whether the image format of the second plain image is a target format supported by the target generation model, wherein the target format may include PEG, PNG, GIF, etc.
[0153] If the second plain-faced image passes the format verification, the second plain-faced image is used as the designated plain-faced image.
[0154] In this embodiment, if the image format of the second plain face image is the target format supported by the target generation model, the second plain face image is determined to have passed the format verification, and the second plain face image is used as the designated plain face image. If the image format of the second plain face image is not the target format supported by the target generation model, the second plain face image is formatted to conform to the target format supported by the target generation model, and the plain face image after the format adjustment is used as the designated plain face image.
[0155] The present application obtains a corresponding first plain-faced image by cropping the plain-faced image; then scales the first plain-faced image to obtain a corresponding second plain-faced image; then performs format verification on the second plain-faced image; if the second plain-faced image passes the format verification, the second plain-faced image is used as the designated plain-faced image. The present application can efficiently and accurately complete image preprocessing of the plain-faced image by cropping, scaling, and format verification of the plain-faced image, thereby ensuring that the generated designated plain-faced image meets the processing requirements of the target generation model and ensures the accuracy of the designated plain-faced image.
[0156] In some optional implementations, the user information obtained is subject to the user's consent and complies with relevant laws and policies.
[0157] In addition, the non-Company software tools or components that appear in the embodiments of the present application are merely examples and do not represent actual use.
[0158] In addition, by adopting generative adversarial network technology, the makeup images generated by this application are more personalized and professional, and can adapt to the facial features and needs of different people, while saving makeup time and energy. The image processing system can be used as an intelligent assistant for women's makeup, helping women to achieve personalized makeup and improve makeup effects and efficiency. In addition, this application can also be applied to fields such as cosmetics sales and promotion. By displaying the effects of cosmetics on the generated face images, the effects of cosmetics can be more intuitively displayed, improving sales and promotion effects.
[0159] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0160] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned target makeup image, the above-mentioned target makeup image can also be stored in a node of a blockchain.
[0161] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0162] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0163] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0164] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0165] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0166] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of a device for processing image data. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0167] like Figure 3 As shown, the image data processing device 300 described in this embodiment includes: a receiving module 301, a preprocessing module 302, a processing module 303, an optimization module 304, a generation module 305 and a display module 306. Among them:
[0168] The receiving module 301 is used to receive the natural face image uploaded by the user in the preset interface;
[0169] A preprocessing module 302 is used to perform image preprocessing on the plain face image to obtain a corresponding designated plain face image;
[0170] The processing module 303 is used to perform image processing on the specified plain-faced image based on a preset target generation model to obtain a corresponding makeup image;
[0171] An optimization module 304 is used to perform detail optimization processing on the makeup image based on a preset image detail optimization strategy to obtain a corresponding target makeup image;
[0172] A generating module 305 is used to perform suggestion generation processing on the target makeup image based on a preset suggestion generation strategy to obtain corresponding makeup suggestions;
[0173] The display module 306 is used to display the target makeup image and the makeup suggestion in the preset interface.
[0174] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the image data processing method in the aforementioned embodiment, and are not described in detail here.
[0175] In some optional implementations of this embodiment, the image data processing device 300 further includes:
[0176] An acquisition module, used to acquire pre-collected initial makeup image data;
[0177] A construction module, used to construct corresponding makeup sample data based on the initial makeup image data;
[0178] A division module, used for dividing the makeup sample data into a training data set and a test data set;
[0179] A generation module, used to call a pre-built initial generative adversarial network; wherein the initial generative adversarial network includes a generator and a discriminator;
[0180] A training module, configured to train the generator and the discriminator of the initial generative adversarial network using the training data set based on a preset training strategy to obtain a trained first generative model;
[0181] A tuning module, used to perform model tuning processing on the first generation model based on the test data set to obtain a second generation model that meets preset performance requirements;
[0182] A determination module is used to use the second generation model as the target generation model.
[0183] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the image data processing method in the aforementioned embodiment, and are not described in detail here.
[0184] In some optional implementations of this embodiment, the building blocks include:
[0185] A preprocessing submodule, used for preprocessing the makeup image data to obtain corresponding first makeup image data;
[0186] A first enhancement submodule, configured to perform data enhancement processing on the first makeup image data to obtain corresponding second makeup image data;
[0187] A first integration submodule, configured to perform data integration processing on the first makeup image data and the second makeup image data to obtain corresponding integrated image data;
[0188] The first determining submodule is used to use the integrated image data as the makeup sample data.
[0189] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the image data processing method in the aforementioned embodiment, and are not described in detail here.
[0190] In some optional implementations of this embodiment, the optimization module 304 includes:
[0191] A second enhancement submodule is used to perform definition enhancement processing on the makeup image to obtain a corresponding first makeup image;
[0192] an enhancement submodule, configured to perform naturalness enhancement processing on the first makeup image to obtain a corresponding second makeup image;
[0193] A processing submodule, configured to perform facial key point detection and alignment processing on the second makeup image to obtain a corresponding third makeup image;
[0194] The second determining submodule is configured to use the third makeup image as the target makeup image.
[0195] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the image data processing method in the aforementioned embodiment, and are not described in detail here.
[0196] In some optional implementations of this embodiment, the generating module 305 includes:
[0197] A first analysis submodule, configured to perform color analysis on the target makeup image to obtain a corresponding color analysis result;
[0198] The second analysis submodule is used to perform makeup style analysis on the target makeup image to obtain a corresponding makeup style recognition result;
[0199] A second integration submodule is used to integrate the color analysis result and the makeup style recognition result to obtain a corresponding integration result;
[0200] The third determination submodule is used to use the integration result as the makeup suggestion.
[0201] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the image data processing method in the aforementioned embodiment, and are not described in detail here.
[0202] In some optional implementations of this embodiment, the display module 306 includes:
[0203] A fourth determination submodule, used to determine an image preview area and a suggested display area in the preset interface;
[0204] A first display submodule, used to display the target makeup image in the image preview area;
[0205] The second display submodule is used to display the makeup suggestion in the suggestion display area.
[0206] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the image data processing method in the aforementioned embodiment, and are not described in detail here.
[0207] In some optional implementations of this embodiment, the preprocessing module 302 includes:
[0208] A cropping submodule, used for cropping the plain-faced image to obtain a corresponding first plain-faced image;
[0209] A scaling submodule, used for scaling the first plain-faced image to obtain a corresponding second plain-faced image;
[0210] A verification submodule, used for performing format verification on the second plain image;
[0211] The fifth determination submodule is configured to use the second plain-faced image as the designated plain-faced image if the second plain-faced image passes the format verification.
[0212] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the image data processing method in the aforementioned embodiment, and are not described in detail here.
[0213] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0214] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.
[0215] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0216] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk equipped on the computer device 4, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of the image data processing method, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.
[0217] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run computer-readable instructions stored in the memory 41 or process data, such as computer-readable instructions for running the image data processing method.
[0218] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0219] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0220] In an embodiment of the present application, the present application first receives a bare-face image uploaded by a user in a preset interface; and performs image preprocessing on the bare-face image to obtain a corresponding designated bare-face image; then performs image processing on the designated bare-face image based on a preset target generation model to obtain a corresponding makeup image; then performs detail optimization processing on the makeup image based on a preset image detail optimization strategy to obtain a corresponding target makeup image; subsequently, performs suggestion generation processing on the target makeup image based on a preset suggestion generation strategy to obtain a corresponding makeup suggestion; finally, the target makeup image and the makeup suggestion are displayed in the preset interface. The present application performs image preprocessing on the bare-faced image uploaded by the user in the preset interface to obtain the designated bare-faced image, then performs image processing on the designated bare-faced image based on the use of a target generation model to obtain a makeup image, and performs detail optimization processing on the makeup image based on the use of an image detail optimization strategy to obtain a target makeup image, and further performs suggestion generation processing on the target makeup image based on the use of a suggestion generation strategy to obtain makeup suggestions, and then displays the target makeup image and the makeup suggestions in the preset interface, so as to provide the user with personalized and intelligent makeup suggestion information by displaying the target makeup image and the makeup suggestions, thereby effectively improving the user's makeup efficiency and effect, and helping to increase user stickiness.
[0221] The present application also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the image data processing method as described above.
[0222] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0223] In an embodiment of the present application, the present application first receives a bare-face image uploaded by a user in a preset interface; and performs image preprocessing on the bare-face image to obtain a corresponding designated bare-face image; then performs image processing on the designated bare-face image based on a preset target generation model to obtain a corresponding makeup image; then performs detail optimization processing on the makeup image based on a preset image detail optimization strategy to obtain a corresponding target makeup image; subsequently, performs suggestion generation processing on the target makeup image based on a preset suggestion generation strategy to obtain a corresponding makeup suggestion; finally, the target makeup image and the makeup suggestion are displayed in the preset interface. The present application performs image preprocessing on the bare-faced image uploaded by the user in the preset interface to obtain the designated bare-faced image, then performs image processing on the designated bare-faced image based on the use of a target generation model to obtain a makeup image, and performs detail optimization processing on the makeup image based on the use of an image detail optimization strategy to obtain a target makeup image, and further performs suggestion generation processing on the target makeup image based on the use of a suggestion generation strategy to obtain makeup suggestions, and then displays the target makeup image and the makeup suggestions in the preset interface, so as to provide the user with personalized and intelligent makeup suggestion information by displaying the target makeup image and the makeup suggestions, thereby effectively improving the user's makeup efficiency and effect, and helping to increase user stickiness.
[0224] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0225] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A method for processing image data, characterized in that: The steps include: Receive the bare-faced image uploaded by the user in the preset interface; Performing image preprocessing on the plain-faced image to obtain a corresponding designated plain-faced image; Performing image processing on the designated plain-faced image based on a preset target generation model to obtain a corresponding makeup image; Performing detail optimization processing on the makeup image based on a preset image detail optimization strategy to obtain a corresponding target makeup image; Performing suggestion generation processing on the target makeup image based on a preset suggestion generation strategy to obtain corresponding makeup suggestions; The target makeup image and the makeup suggestion are displayed in the preset interface.
2. The method for processing image data according to claim 1, characterized in that: Before the step of performing image processing on the designated plain-faced image based on the preset target generation model to obtain the corresponding makeup image, the method further includes: Acquire pre-collected initial makeup image data; constructing corresponding makeup sample data based on the initial makeup image data; Dividing the makeup sample data into a training data set and a test data set; Calling a pre-built initial generative adversarial network; wherein the initial generative adversarial network includes a generator and a discriminator; Based on a preset training strategy, the generator and the discriminator of the initial generative adversarial network are trained using the training data set to obtain a trained first generative model; Performing model tuning processing on the first generation model based on the test data set to obtain a second generation model that meets preset performance requirements; The second generative model is used as the target generative model.
3. The method for processing image data according to claim 2, characterized in that: The step of constructing corresponding makeup sample data based on the initial makeup image data specifically includes: Preprocessing the makeup image data to obtain corresponding first makeup image data; Performing data enhancement processing on the first makeup image data to obtain corresponding second makeup image data; Performing data integration processing on the first makeup image data and the second makeup image data to obtain corresponding integrated image data; The integrated image data is used as the makeup sample data.
4. The method for processing image data according to claim 1, characterized in that: The step of performing detail optimization processing on the makeup image based on a preset image detail optimization strategy to obtain a corresponding target makeup image specifically includes: Performing definition enhancement processing on the makeup image to obtain a corresponding first makeup image; Performing naturalness enhancement processing on the first makeup image to obtain a corresponding second makeup image; Performing facial key point detection and alignment processing on the second makeup image to obtain a corresponding third makeup image; The third makeup image is used as the target makeup image.
5. The method for processing image data according to claim 1, characterized in that: The step of performing suggestion generation processing on the target makeup image based on a preset suggestion generation strategy to obtain corresponding makeup suggestions specifically includes: Performing color analysis on the target makeup image to obtain a corresponding color analysis result; Performing makeup style analysis on the target makeup image to obtain a corresponding makeup style recognition result; Integrate the color analysis result and the makeup style recognition result to obtain a corresponding integration result; The integration result is used as the makeup suggestion.
6. The method for processing image data according to claim 1, characterized in that: The step of displaying the target makeup image and the makeup suggestion in the preset interface specifically includes: Determining an image preview area and a suggested display area in the preset interface; Displaying the target makeup image in the image preview area; The makeup suggestion is displayed in the suggestion display area.
7. The method for processing image data according to claim 1, characterized in that: The step of performing image preprocessing on the plain image to obtain a corresponding designated plain image specifically includes: Performing cropping processing on the plain-face image to obtain a corresponding first plain-face image; Scaling the first plain-faced image to obtain a corresponding second plain-faced image; Performing format verification on the second plain image; If the second plain-faced image passes the format verification, the second plain-faced image is used as the designated plain-faced image.
8. An image data processing device, characterized in that: include: A receiving module, used to receive the bare face image uploaded by the user in the preset interface; A preprocessing module, used for performing image preprocessing on the plain image to obtain a corresponding designated plain image; A processing module, used for performing image processing on the specified plain-faced image based on a preset target generation model to obtain a corresponding makeup image; An optimization module, used for performing detail optimization processing on the makeup image based on a preset image detail optimization strategy to obtain a corresponding target makeup image; A generation module, configured to perform suggestion generation processing on the target makeup image based on a preset suggestion generation strategy to obtain corresponding makeup suggestions; A display module is used to display the target makeup image and the makeup suggestion in the preset interface.
9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the method for processing image data according to any one of claims 1 to 7 when executing the computer-readable instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the method for processing image data according to any one of claims 1 to 7 are implemented.