Eyebrow shape transformation method, device, client, server and storage medium
By establishing a communication connection between the client and the server, using the eyebrow model generated by the server to transform the face image, the problems of slow processing speed and poor beautification effect caused by simple eyebrow processing in the prior art are solved, and the effects of rapid transformation and efficient beautification are achieved.
Patent Information
- Application Number
- CN202210246339.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-14
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2042-03-14
AI Technical Summary
When beauty of face images in the prior art, the processing of eyebrows is relatively simple, resulting in slow processing speed and poor beautification effect.
By establishing a communication connection between the client and the server, multiple eyebrow models are generated using the encoder and face generator in the server, each model corresponding to one eyebrow shape. The client responds to the user's eyebrow shape transformation operation and sends the target eyebrow shape request to the server. The server selects the corresponding eyebrow shape model and sends it to the client. The client transforms the eyebrow shape in the face image selected by the user through this model.
It realizes rapid change of eyebrows shape and real-time preview effects, improves processing speed and efficiency, optimizes the beautification effect of eyebrows and improves user experience.
Smart Images

Figure CN114581294B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to an eyebrow shape transformation method, device, client, server and storage medium. Background Art
[0002] With the popularization of smart terminals, more and more smart devices can beautify facial images. The existing technology for beautifying facial images usually processes relatively prominent parts of the face, such as eyes and nose, while the processing of eyebrows is relatively simple, and the model used is relatively large, resulting in slow processing speed and poor eyebrow beautification effect. Summary of the invention
[0003] In view of this, an object of the present invention is to provide an eyebrow shape transformation method, device, client, server and storage medium.
[0004] In order to achieve the above purpose, the technical solution adopted by the embodiment of the present invention is as follows:
[0005] In a first aspect, the present invention provides an eyebrow shape transformation method, which is applied to a client, and the method comprises:
[0006] In response to a user's confirmation operation on the eyebrow shape changing interface, a plurality of first face images are displayed; the eyebrows in the plurality of first face images have a plurality of eyebrow shapes;
[0007] In response to the user's selection operation in the eyebrow shape transformation interface, a target face image is acquired, and a target eyebrow shape to which the eyebrows in the target face image belong is determined;
[0008] In response to the user's picture selection operation in the eyebrow shape transformation interface, a second face image is obtained;
[0009] The second facial image is transformed using a target eyebrow shape model corresponding to the target eyebrow shape, and a second facial image including the target eyebrow shape is displayed.
[0010] In an optional implementation, the client is communicatively connected to a server, and the server pre-stores an encoder and a face generator;
[0011] The step of displaying a plurality of first face images in response to the user's confirmation operation on the eyebrow shape transformation interface comprises:
[0012] In response to a confirmation operation of the user on the eyebrow shape change interface, sending a first request to the server;
[0013] The first request is used to instruct the encoder to generate a plurality of facial feature vectors, and input each of the facial feature vectors into the face generator to obtain the plurality of first face images;
[0014] The multiple first face images sent by the server are received and displayed.
[0015] In an optional implementation manner, the client pre-stores a plurality of cosine vectors and an eyebrow shape represented by each of the cosine vectors;
[0016] The step of determining the target eyebrow shape to which the eyebrows in the target face image belong comprises:
[0017] Performing key point detection on the eyebrows in the target face image to obtain a plurality of eyebrow key points;
[0018] Based on the multiple eyebrow key points, calculating a target cosine vector;
[0019] The target cosine vector is matched with the multiple cosine vectors to obtain the target eyebrow shape.
[0020] In an optional implementation, the client is in communication connection with a server, the server pre-stores a plurality of eyebrow shape models, and the plurality of eyebrow shape models are obtained through an encoder and a face generator in the server;
[0021] The step of transforming the second face image by using the target eyebrow shape model corresponding to the target eyebrow shape to display the second face image including the target eyebrow shape comprises:
[0022] Sending a request message including the target eyebrow shape to the server, and receiving a target eyebrow shape model corresponding to the target eyebrow shape sent by the server;
[0023] generating a third image including the target eyebrow shape by using the target eyebrow shape model;
[0024] The eyebrow shape in the second facial image is replaced based on the third image to obtain and display a second facial image containing the target eyebrow shape.
[0025] In a second aspect, the present invention provides an eyebrow shape transformation method, which is applied to a server, wherein the server is in communication connection with a client; the server pre-stores an encoder and a face generator; the method comprises:
[0026] Obtaining a plurality of eyebrow shape models through the encoder and the face generator, each eyebrow shape model corresponds to an eyebrow shape;
[0027] After receiving the request message including the target eyebrow shape sent by the client, a target eyebrow shape model corresponding to the target eyebrow shape is selected from the multiple eyebrow shape models; wherein the target eyebrow shape represents the eyebrow shape selected by the user in the eyebrow shape transformation interface of the client;
[0028] The target eyebrow shape model is sent to the client, so that the client transforms the eyebrow shape in the face image selected by the user through the target eyebrow shape model.
[0029] In an optional implementation, the step of obtaining a plurality of eyebrow shape models through the encoder and the face generator includes:
[0030] Generate multiple encoding vectors containing facial features through the encoder, and obtain transformation vectors of multiple eyebrow shapes based on the multiple encoding vectors;
[0031] Input each encoding vector into the face generator to obtain a set of original face images;
[0032] For each eyebrow shape, a vector obtained by superimposing each encoding vector and the transformation vector of the eyebrow shape is input into the face generator to obtain a face image set corresponding to the eyebrow shape, thereby obtaining a face image set corresponding to each eyebrow shape;
[0033] For each eyebrow shape, based on the original face image set and the face image set corresponding to the eyebrow shape, a basic model is trained to obtain an eyebrow shape model corresponding to the eyebrow shape, thereby obtaining an eyebrow shape model corresponding to each eyebrow shape.
[0034] In a third aspect, the present invention provides an eyebrow shape transformation method, which is applied to a system, wherein the system includes a server and a client connected in communication, wherein the server pre-stores an encoder and a face generator, and the method includes:
[0035] The server obtains a plurality of eyebrow shape models through the encoder and the face generator, each of the eyebrow shape models corresponding to one eyebrow shape;
[0036] The client responds to the user's eyebrow shape changing operation and sends a request message including the target eyebrow shape to the server;
[0037] The server selects a target eyebrow shape model corresponding to the target eyebrow shape from the multiple eyebrow shape models according to the request message and sends the target eyebrow shape to the client;
[0038] The client receives the target eyebrow shape model, and transforms the eyebrow shape in the face image selected by the user through the target eyebrow shape model.
[0039] In a fourth aspect, the present invention provides an eyebrow shape changing device, applied to a client, the device comprising:
[0040] A response module, used for responding to the user's confirmation operation on the eyebrow shape change interface, and displaying a plurality of first face images; the eyebrows in the plurality of first face images have a variety of eyebrow shapes;
[0041] In response to the user's selection operation in the eyebrow shape transformation interface, a target face image is acquired, and a target eyebrow shape to which the eyebrows in the target face image belong is determined;
[0042] In response to the user's picture selection operation in the eyebrow shape transformation interface, a second face image is obtained;
[0043] The transformation module is used to transform the second face image by using a target eyebrow shape model corresponding to the target eyebrow shape, and display the second face image including the target eyebrow shape.
[0044] In a fifth aspect, the present invention provides an eyebrow shape transformation device, which is applied to a server, wherein the server is communicatively connected to a client; the server pre-stores an encoder and a face generator, and the device comprises:
[0045] A generating module, used for obtaining a plurality of eyebrow shape models through the encoder and the face generator, each eyebrow shape model corresponding to an eyebrow shape;
[0046] A selection module, configured to, upon receiving a request message containing a target eyebrow shape sent by the client, select a target eyebrow shape model corresponding to the target eyebrow shape from the multiple eyebrow shape models; wherein the target eyebrow shape represents the eyebrow shape selected by the user in the eyebrow shape transformation interface of the client;
[0047] The sending module is used to send the target eyebrow shape model to the client, so that the client can transform the eyebrow shape in the face image selected by the user through the target eyebrow shape model.
[0048] In a sixth aspect, the present invention provides a client, comprising a processor and a memory, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in any one of the aforementioned embodiments is implemented.
[0049] In a seventh aspect, the present invention provides a server, comprising a processor and a memory, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in any one of the aforementioned embodiments is implemented.
[0050] In an eighth aspect, the present invention provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any one of the aforementioned embodiments or the method described in any one of the aforementioned embodiments.
[0051] The eyebrow shape transformation method, device, client, server and storage medium provided by the embodiment of the present invention, by responding to the user's confirmation operation in the eyebrow shape transformation interface, display multiple first face images, the eyebrows in the multiple first face images have multiple eyebrow shapes; then responding to the user's selection operation in the eyebrow shape transformation interface to obtain the target face image, and determine the target eyebrow shape to which the eyebrows in the target face image belong; then responding to the user's picture selection operation in the eyebrow shape transformation interface to obtain the second face image; finally, through the target eyebrow shape model corresponding to the target eyebrow shape, the second face image is transformed, and the second face image containing the target eyebrow shape is displayed. By performing eyebrow shape transformation on the face image selected by the user through the eyebrow shape model, the eyebrow shape can be quickly transformed and the effect of the eyebrow shape transformation can be previewed in real time, thereby improving the processing speed and efficiency, optimizing the eyebrow beautification effect and enhancing the user experience.
[0052] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0054] Figure 1 A schematic diagram of a system block diagram provided by an embodiment of the present invention is shown;
[0055] Figure 2 A block diagram of an electronic device provided by an embodiment of the present invention is shown;
[0056] Figure 3 A schematic diagram of a process of an eyebrow shape transformation method provided by an embodiment of the present invention is shown;
[0057] Figure 4 Another schematic diagram of the process of the eyebrow shape transformation method provided by the embodiment of the present invention is shown;
[0058] Figure 5 An example diagram of an eyebrow shape transformation method provided by an embodiment of the present invention is shown;
[0059] Figure 6 Another example diagram of the eyebrow shape transformation method provided by an embodiment of the present invention is shown;
[0060] Figure 7 Another example diagram of the eyebrow shape transformation method provided by an embodiment of the present invention is shown;
[0061] Figure 8 Another schematic diagram of the process of the eyebrow shape transformation method provided by the embodiment of the present invention is shown;
[0062] Fig. 9 A functional module diagram of an eyebrow shape changing device 500 provided in an embodiment of the present invention is shown;
[0063] Fig.10 A functional module diagram of an eyebrow shape changing device 600 provided in an embodiment of the present invention is shown.
[0064] Icons: 10-system; 100-server; 102-client; 110-bus; 120-processor; 130-memory; 170-communication interface; 500, 600-eyebrow transformation device; 510-response module; 530-transformation module; 610-generation module; 630-selection module; 650-sending module. DETAILED DESCRIPTION
[0065] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0066] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.
[0067] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0068] With the popularization of smart terminals, more and more smart devices can beautify facial images. The existing technology for beautifying facial images usually processes relatively prominent parts of the face, such as the eyes and nose, while the processing of eyebrows is relatively simple. For example, the eyebrow shape is generally processed by a fixed beautification method, but it cannot meet the needs of users who want to try a variety of eyebrow shapes. At the same time, the model used is large, resulting in slow processing speed and poor beautification effect on the eyebrow shape. Furthermore, the embodiment of the present invention provides an eyebrow shape transformation method to solve the above problems.
[0069] Please refer to Figure 1 , is a schematic diagram of a system provided by an embodiment of the present invention. The system 10 includes a server 100 and a client 102 that are in communication connection, and there may be multiple clients 102.
[0070] The server 100 may be an independent server or a server cluster composed of multiple servers.
[0071] The client 102 may be a smart phone, a personal computer, a tablet computer, a wearable device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc. The embodiment of the present invention does not impose any limitation on this.
[0072] Please refer to Figure 2 , is a block diagram of an electronic device provided by an embodiment of the present invention. The electronic device includes a bus 110 , a processor 120 , a memory 130 , and a communication interface 170 .
[0073] The bus 110 may be a circuit that connects the above elements to each other and transfers communications (eg, control messages) between the above elements.
[0074] The processor 120 may receive commands from the other elements described above (eg, the memory 130 , the communication interface 170 , etc.) through the bus 110 , may interpret the received commands, and may perform calculations or data processing according to the interpreted commands.
[0075] The processor 120 may be an integrated circuit chip with signal processing capabilities. The processor 120 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0076] The memory 130 may store commands or data received from the processor 120 or other elements (eg, the communication interface 170 , etc.) or commands or data generated by the processor 120 or other elements.
[0077] The memory 130 can 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), or an electrically erasable programmable read-only memory (EEPROM).
[0078] The communication interface 170 may be used to communicate signaling or data with other node devices.
[0079] It should be noted that Figure 2 The structure shown is only a schematic diagram of the structure of the electronic device. The electronic device may also include Figure 2 More or fewer components as shown, or with Figure 2 Different configurations shown. Figure 2 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0080] Understandably, Figure 2 The electronic device shown in the figure can be used to implement the above Figure 1 In order to realize the corresponding functions of the client 102, the electronic device may also include other modules, such as: radio frequency circuit, I / O interface, battery, touch screen, microphone / speaker, camera module, etc. This is not limited here.
[0081] The following will be Figure 1 The system in the embodiment of the present invention is used as the execution subject to introduce the eyebrow shape transformation method provided by the embodiment of the present invention and achieve the corresponding technical effect. Figure 3 , Figure 3 It is a flowchart of an eyebrow shape transformation method provided by an embodiment of the present invention.
[0082] Step S202: the server obtains a plurality of eyebrow shape models through an encoder and a face generator, each eyebrow shape model corresponding to one eyebrow shape;
[0083] The server pre-stores an encoder and a face generator. The encoder may be a coding generation model obtained by training a large number of face feature samples, and the face generator may be a face generation model based on the StyleGan structure.
[0084] It is understandable that since the encoder is a model trained based on a large number of facial feature samples, the dimension of the encoding vector it generates is large and the facial features it represents are more detailed, so the encoder needs to occupy a large amount of memory during operation. The face generator can decouple the encoding vector features and generate high-resolution facial images, which also occupies a large amount of memory during operation.
[0085] In this embodiment, multiple original face images and multiple face images after eyebrow shape transformation can be obtained through the encoder and face generator in the server. Based on the multiple original face images and multiple face images corresponding to each eyebrow shape, the basic model can be trained to obtain the eyebrow model corresponding to each eyebrow shape, that is, multiple eyebrow models are obtained, and each eyebrow model can generate a corresponding eyebrow image.
[0086] It is understandable that the basic model can adopt a model with the UNET framework as the backbone, such as the image translation model pix2pix, which occupies little memory and can run stably on smart devices such as smartphones, tablets, and laptops.
[0087] Step S204, the client responds to the user's eyebrow shape changing operation and sends a request message including the target eyebrow shape to the server;
[0088] In this embodiment, the client is installed with a beautification application. The user performs an eyebrow shape transformation operation based on the beautification application. The client obtains the user's eyebrow shape transformation operation and can obtain the eyebrow shape that the user wants, that is, the target eyebrow shape, and then sends a request message containing the target eyebrow shape to the server.
[0089] Step S206: the server selects a target eyebrow shape model corresponding to the target eyebrow shape from the multiple eyebrow shape models according to the request message and sends the target eyebrow shape to the client;
[0090] In this embodiment, the server receives the request message sent by the client, and selects an eyebrow model corresponding to the target eyebrow shape from multiple eyebrow models according to the target eyebrow shape in the request message, namely the target eyebrow model, and sends the target eyebrow model to the client.
[0091] Step S208: The client receives the target eyebrow shape model, and transforms the eyebrow shape in the face image selected by the user using the target eyebrow shape model.
[0092] In this embodiment, the client receives the target eyebrow shape model sent by the server, and transforms the eyebrow shape in the face image selected by the user through the target eyebrow shape model.
[0093] Optionally, if the user wants to change to other eyebrow shapes, he or she can continue to select other eyebrow shapes. Then the client can communicate with the server to obtain the eyebrow model corresponding to the eyebrow shape selected by the user, and realize real-time transformation of the eyebrow shape in the face image selected by the user, so as to facilitate the user to select the eyebrow shape they like and improve the beauty effect of the eyebrows.
[0094] It is understandable that since the eyebrow shape model occupies less memory, the client can quickly respond to the user's eyebrow shape transformation operation based on the eyebrow shape model, thereby improving processing speed and efficiency. And since the eyebrow shape model is generated on the server, it avoids running jams caused by occupying a large amount of memory for model training on the client.
[0095] It can be seen that based on the above steps, through a system including a server and a client connected in communication, the server obtains multiple eyebrow models through a pre-stored encoder and a face generator, each eyebrow model corresponds to an eyebrow shape; the client responds to the user's eyebrow shape transformation operation and sends a request message including a target eyebrow shape to the server; the server selects a target eyebrow shape model corresponding to the target eyebrow shape from multiple eyebrow shape models according to the request message and sends it to the client; the client receives the target eyebrow shape model and transforms the eyebrow shape in the face image selected by the user through the target eyebrow shape model. The encoder and face generator that occupy a large memory are stored in the server to generate an eyebrow shape model that occupies a small memory. When the client responds to the user's eyebrow shape transformation operation, the server sends the corresponding eyebrow shape model to the client through the communication interaction between the client and the server, and the client transforms the eyebrow shape in the selected face image through the eyebrow shape model. Therefore, the client can quickly respond to the user's eyebrow shape transformation operation, improve the processing speed and efficiency, and the user can change the eyebrow shape multiple times and preview the effect of the eyebrow shape transformation in real time, thereby optimizing the eyebrow beautification effect and improving the user experience.
[0096] The following will be Figure 1 The client and server in the embodiment are respectively used as execution entities to introduce the eyebrow shape transformation method provided by the embodiment of the present invention and achieve corresponding technical effects.
[0097] The following first introduces the eyebrow shape transformation method provided by the embodiment of the present invention by taking the client as the execution subject. Figure 4 .
[0098] Step S302, in response to the user's confirmation operation on the eyebrow shape transformation interface, displaying a plurality of first face images;
[0099] The eyebrows in the plurality of first face images have a variety of eyebrow shapes.
[0100] In this embodiment, the client is installed with a beauty application, which includes an eyebrow shape change interface. The user can perform a confirmation operation in the eyebrow shape change interface, and the client responds to the confirmation operation and displays multiple first face images. The eyebrows in these multiple first face images have multiple eyebrow shapes. It can be understood that the client displays face images with multiple eyebrow shapes based on the user's confirmation operation, so that the user can select the desired eyebrow shape.
[0101] For ease of understanding, this embodiment provides an example diagram of an eyebrow shape transformation interface. Figure 5 As shown in (a) of FIG. 1 , the user performs a confirmation operation on the eyebrow shape transformation interface, and the client responds to the confirmation operation by displaying multiple first face images, such as Figure 5 As shown in (b), it includes three first face images, namely picture 1, picture 2 and picture 3.
[0102] Optionally, the eyebrow shape change interface may further include an eyebrow shape selection area, which is used to display face images with various eyebrow shapes, and the user may select the eyebrow shape they want to view in the eyebrow shape selection area. In order to facilitate the user to quickly obtain the desired eyebrow shape, various eyebrow shape images may also be displayed in the eyebrow shape selection area, and the name of the eyebrow shape may be annotated with text.
[0103] The eyebrow shape selection area may also include a random transformation button, through which the user may update the face image in the eyebrow shape selection area and view more face images with different eyebrow shapes.
[0104] The eyebrow shape transformation interface also includes an eyebrow shape preview area. Based on the user's eyebrow shape preview operation, the eyebrow shape preview area can enlarge and display the first face image selected by the user for preview, so that the user can intuitively view the effects of various eyebrow shapes.
[0105] Step S304, in response to the user's selection operation in the eyebrow shape transformation interface, acquiring a target face image, and determining a target eyebrow shape to which the eyebrows in the target face image belong;
[0106] In this embodiment, the user performs a selection operation in the eyebrow shape transformation interface, and the client obtains the first face image selected by the user from multiple first face images based on the selection operation, that is, obtains the target face image; and identifies the target face image to determine the target eyebrow shape to which its eyebrows belong.
[0107] like Figure 6 As shown in (c) in FIG. 1 , the user performs a selection operation in the eyebrow shape transformation interface and selects picture 1. The client uses picture 1 as the target face image and recognizes picture 1 to determine the target eyebrow shape to which the eyebrows in picture 1 belong.
[0108] Step S306, in response to the user's picture selection operation in the eyebrow shape transformation interface, obtaining a second face image;
[0109] In this embodiment, the user performs a picture selection operation in the eyebrow shape transformation interface, and the client obtains a second face image selected by the user based on the picture selection operation. The second face image can be understood as a face image selected by the user to be subjected to eyebrow shape transformation.
[0110] The second face image can be selected by the user from locally stored pictures, or can be acquired by the user through real-time shooting using a shooting module on the client. Figure 6 As shown in (d) in the figure, the eyebrow shape transformation interface includes a local picture selection area and a picture shooting area.
[0111] The user can perform interactive operations in the local image selection area. The client retrieves a locally stored image list, such as an album, and obtains the image selected by the user, that is, the second face image, based on the user's selection operation in the image list.
[0112] The user can also perform interactive operations in the picture shooting area. The client enters the shooting mode by calling the camera and other shooting modules. Based on the user's shooting operation, the picture taken by the user is obtained, that is, the second face image is obtained.
[0113] For example, the user performs an interactive operation in the local image selection area in the eyebrow shape transformation interface and selects image A in the image list, then image A is displayed in the eyebrow shape transformation interface to facilitate the user to confirm the face image to be subjected to eyebrow shape transformation, and the user's confirmation operation is obtained to obtain the second face image, i.e., image A. Figure 6 As shown in (e) in .
[0114] Step S308, transforming the second face image using the target eyebrow shape model corresponding to the target eyebrow shape, and displaying the second face image including the target eyebrow shape;
[0115] In this embodiment, the client can pre-store multiple eyebrow models corresponding to eyebrow shapes, and based on the determined target eyebrow shape, obtain the eyebrow model corresponding to the target eyebrow shape from the multiple eyebrow models stored locally; or obtain the target eyebrow model corresponding to the target eyebrow shape by communicating with the server. Then, the second face image is transformed by the target eyebrow model to obtain and display the second face image containing the target eyebrow shape.
[0116] For example, it is determined that the target eyebrow shape of the eyebrows in picture 1 is a straight eyebrow. The client obtains a straight eyebrow model corresponding to the straight eyebrow through communication and interaction with the server, that is, obtains the target eyebrow shape model, and transforms the second face image through the straight eyebrow model to obtain and display the second face image containing the straight eyebrow. Figure 6 As shown in (f) in the figure, the picture B displayed on the eyebrow shape transformation interface is the face image with the eyebrow shape in picture A transformed into a straight eyebrow.
[0117] Optionally, the eyebrow shape transformation interface for displaying the second facial image including the target eyebrow shape may also include a save control, a share control, and a return control. The user may store the facial image after the eyebrow shape transformation locally through the save control. The user may share the facial image after the eyebrow shape transformation to a social platform through the share control. The user may return to the interface displaying multiple first facial images and reselect an eyebrow shape through the return control; the user may also return to the interface for selecting the second facial image and reselect the facial image to be subjected to the eyebrow shape transformation.
[0118] It can be seen that through the above steps, by responding to the user's confirmation operation in the eyebrow shape transformation interface, multiple first face images are displayed, and the eyebrows in the multiple first face images have multiple eyebrow shapes; then responding to the user's selection operation in the eyebrow shape transformation interface to obtain the target face image, and determine the target eyebrow shape to which the eyebrows in the target face image belong; then responding to the user's picture selection operation in the eyebrow shape transformation interface to obtain the second face image; finally, through the target eyebrow shape model corresponding to the target eyebrow shape, the second face image is transformed, and the second face image containing the target eyebrow shape is displayed. By performing eyebrow shape transformation on the face image selected by the user through the eyebrow shape model, the eyebrow shape can be quickly transformed and the effect of the eyebrow shape transformation can be previewed in real time, thereby improving the processing speed and efficiency, optimizing the eyebrow beautification effect and enhancing the user experience.
[0119] Optionally, in order to provide users with a variety of eyebrow shapes, an embodiment of the present invention provides a possible implementation method for the above step S302. Step S302 includes the following steps:
[0120] Step S302-1, in response to the user's confirmation operation on the eyebrow shape transformation interface, sending a first request to the server; wherein the first request is used to instruct the encoder to generate a plurality of facial feature feature vectors, and input each facial feature feature vector into the face generator to obtain a plurality of first face images;
[0121] Step S302-3, receiving and displaying a plurality of first face images sent by the server;
[0122] In this embodiment, the client is connected to the server for communication, and the server has a pre-stored encoder and a face generator.
[0123] The user performs a confirmation operation in the eyebrow shape change interface, and the client obtains the confirmation operation and sends a first request to the server. The first request can be understood as the client requesting the server to obtain multiple face images containing multiple eyebrow shapes.
[0124] The server generates multiple facial feature vectors through an encoder according to the received first request, and inputs each facial feature vector into a face generator to generate a corresponding first face image, that is, to obtain multiple first face images; and then sends the multiple first face images to the client. The client receives the multiple first face images and displays them.
[0125] It can be seen that the client sends a request to the server and receives multiple face images containing multiple eyebrow shapes generated by the server through the encoder and face generator. Compared with the existing method of pre-storing multiple eyebrow template images on the client, it does not need to store eyebrow images, thereby saving memory resources; through communication and interaction with the server, a rich variety of eyebrow shapes can be obtained based on the encoder and face generator in the server for user selection; and by displaying face images, users can more intuitively feel the effect of eyebrow shapes on the overall face. This saves memory resources and improves user experience.
[0126] Optionally, with respect to determining the target eyebrow shape of the eyebrows in the target face image in the above step S304, an embodiment of the present invention provides a possible implementation method. Step S304 includes the following steps:
[0127] Step S304-1, performing key point detection on the eyebrows in the target face image to obtain a plurality of eyebrow key points;
[0128] It is understandable that for different eyebrow shapes, the overall shape is different. The overall shape of the eyebrow shape can be represented by a cosine vector, and different cosine vectors can represent different eyebrow shapes.
[0129] In this embodiment, the client pre-stores a plurality of cosine vectors and the eyebrow shape represented by each cosine vector. The eyebrow key points in the target face image are detected by a face key point detection algorithm to obtain a plurality of eyebrow key points.
[0130] For example, 68 facial key points are obtained, including 5 left eyebrow key points and 5 right eyebrow key points.
[0131] Step S304-3, calculating the target cosine vector based on multiple eyebrow key points;
[0132] It is understandable that the human face can be considered bilaterally symmetrical, and the target cosine vector can be calculated through the key points of one eyebrow. For example, the target cosine vector can be calculated through the five key points of the right eyebrow, and the target cosine vector can be understood as fitting the key points of the eyebrow on the side into the cosine of two vectors.
[0133] like Figure 7As shown in (g), the five key points of the right eyebrow are K1 to K5, and the key points K1 to K3 are fitted as vectors Fit key points K3 to K5 as vectors Calculating vectors and vector The cosine angle value of the target cosine vector is obtained. It can be seen that based on the vector and vector The cosine angle value of the eyebrow is , and the overall shape of the eyebrow is a curved willow leaf, so the eyebrow shape is a willow leaf eyebrow.
[0134] like Figure 7 As shown in (h), the 5 key points of the right eyebrow are M1 to M5, and the key points M1 to M3 are fitted as vectors Fit key points M3 to M5 as vectors Calculating vectors and vector The cosine angle value of the target cosine vector is obtained. It can be seen that based on the vector and vector The cosine angle value of the eyebrow is in the shape of a straight line as a whole, so the eyebrow shape is a straight eyebrow.
[0135] Step S304-5, matching the target cosine vector with multiple cosine vectors to obtain the target eyebrow shape;
[0136] In this embodiment, the size of the target cosine vector is compared with the sizes of multiple pre-stored cosine vectors, and a first cosine vector whose size differs from the target cosine vector within a preset range is obtained. The eyebrow shape represented by the first cosine vector is used as the target eyebrow shape, that is, the target eyebrow shape is obtained.
[0137] It can be seen that by detecting the key points of the eyebrows in the target face image, multiple eyebrow key points are obtained, and the target cosine vector calculated based on the multiple eyebrow key points is matched with the pre-stored multiple cosine vectors to obtain the target eyebrow shape. The eyebrow shape in the target face image can be accurately determined by the cosine vector, so that an accurate eyebrow shape model can be obtained in the subsequent steps, so that the effect of the actual eyebrow shape transformation is consistent with the eyebrow shape effect in the selected target face image, thereby improving the beautification effect of the eyebrows.
[0138] Optionally, for step S308, an embodiment of the present invention provides a possible implementation method.
[0139] Wherein step S308 comprises the following steps:
[0140] Step S308-1, sending a request message containing a target eyebrow shape to a server, and receiving a target eyebrow shape model corresponding to the target eyebrow shape sent by the server;
[0141] It should be noted that the client is connected to the server for communication, and the server pre-stores a plurality of eyebrow models, each eyebrow model corresponds to an eyebrow shape, and the plurality of eyebrow models are obtained through an encoder and a face generator in the server.
[0142] In this embodiment, the client sends a request message containing the target eyebrow shape to the server based on the determined target eyebrow shape; the server receives the request message and obtains a target eyebrow shape model corresponding to the target eyebrow shape from multiple eyebrow shape models based on the target eyebrow shape, and sends the target eyebrow shape model to the client; the client receives the target eyebrow shape model.
[0143] Step S308-3, generating a third image including the target eyebrow shape by using the target eyebrow shape model;
[0144] Step S308-5: replace the eyebrow shape in the second facial image based on the third image, and obtain and display the second facial image containing the target eyebrow shape.
[0145] In this embodiment, the client generates a third image containing the target eyebrow shape based on the received target eyebrow shape model, fuses the third image with the second face image, replaces the eyebrow shape in the second face image with the target eyebrow shape, obtains the second face image containing the target eyebrow shape, and displays it.
[0146] It can be seen that the client sends a request message including the target eyebrow shape to the server, obtains the target eyebrow shape model corresponding to the target eyebrow shape through communication interaction with the server, and replaces the eyebrow shape in the second face image with the third image including the target eyebrow shape generated by the target eyebrow shape model to achieve eyebrow shape transformation. The client obtains the corresponding eyebrow shape model in real time through communication interaction with the server, which can avoid storing multiple eyebrow shape models and occupying a large amount of memory, and performs eyebrow shape transformation on the face image based on the eyebrow shape image generated by the eyebrow shape model. This saves memory resources, realizes real-time transformation of eyebrow shape and improves user experience.
[0147] The following will take the server as the execution subject to introduce the eyebrow shape transformation method provided by the embodiment of the present invention. Figure 8 .
[0148] Step S402, obtaining a plurality of eyebrow shape models through an encoder and a face generator, each eyebrow shape model corresponding to an eyebrow shape;
[0149] Step S404, upon receiving a request message including a target eyebrow shape sent by the client, selecting a target eyebrow shape model corresponding to the target eyebrow shape from a plurality of eyebrow shape models; wherein the target eyebrow shape represents the eyebrow shape selected by the user in the eyebrow shape transformation interface of the client;
[0150] Step S406: sending the target eyebrow shape model to the client, so that the client transforms the eyebrow shape in the face image selected by the user through the target eyebrow shape model.
[0151] It can be understood that in the above-mentioned embodiment of the system and the client executing the eyebrow shape transformation method, the above-mentioned steps S404 and S406, i.e., the process of communication and interaction between the server and the client, have been explained, and its basic principles and the technical effects produced are the same as those in the above-mentioned embodiment. For a brief description, reference may be made to the corresponding contents in the above-mentioned embodiment.
[0152] It can be seen that the server obtains multiple eyebrow models through the pre-stored encoder and face generator, each eyebrow model corresponds to an eyebrow shape; then, after receiving the request message containing the target eyebrow shape sent by the client, the target eyebrow model corresponding to the target eyebrow shape is selected from the multiple eyebrow models and sent to the client, and the target eyebrow shape represents the eyebrow shape selected by the user in the eyebrow shape transformation interface of the client; and then the target eyebrow model is sent to the client, so that the client can transform the eyebrow shape in the face image selected by the user through the target eyebrow model. The server generates an eyebrow model that occupies less memory through the encoder and face generator that occupy a large amount of memory, and sends the corresponding eyebrow model to the client through communication and interaction with the client, so that the client can quickly transform the eyebrow shape of the face image selected by the user, thereby improving the processing speed and efficiency, and avoiding the jamming caused by the client using the model that occupies a large amount of memory.
[0153] With respect to the above step S402, the embodiment of the present invention provides a possible implementation method.
[0154] Step S402-1, generating a plurality of encoding vectors including facial features through an encoder, and obtaining transformation vectors of a plurality of eyebrow shapes based on the plurality of encoding vectors;
[0155] In this embodiment, the server pre-stores an encoder and a face generator, and the encoder can generate multiple encoding vectors containing facial features. These multiple encoding vectors are classified according to eyebrow shapes to obtain encoding vectors corresponding to each eyebrow shape. For each eyebrow shape, the encoding vector corresponding to the eyebrow shape can be calculated by a support vector machine (SVM) in a multi-dimensional space to obtain the transformation vector corresponding to the eyebrow shape, that is, the transformation vector corresponding to each eyebrow shape is obtained.
[0156] Step S402-3, input each encoding vector into a face generator to obtain an original face image set;
[0157] In this embodiment, each coding vector is input to a face generator, and the face generator generates a corresponding original face image based on the facial features contained in the coding vector. Based on multiple coding vectors, multiple original face images can be generated, that is, a set of original face images is obtained.
[0158] Step S402-5: for each eyebrow shape, a vector obtained by superimposing each coding vector with the transformation vector of the eyebrow shape is input into a face generator to obtain a face image set corresponding to the eyebrow shape, thereby obtaining a face image set corresponding to each eyebrow shape;
[0159] In this embodiment, for each eyebrow shape, each encoding vector is superimposed with the transformation vector of the eyebrow shape to obtain multiple superimposed vectors corresponding to the eyebrow shape; each superimposed vector corresponding to the eyebrow shape is input into the face generator to generate a corresponding face image; based on the multiple superimposed vectors corresponding to the eyebrow shape, multiple face images corresponding to the eyebrow shape can be generated, that is, a face image set corresponding to the eyebrow shape is obtained. Based on multiple eyebrow shapes, a face image set corresponding to each eyebrow shape can be obtained.
[0160] Step S402-7, for each eyebrow shape, based on the original face image set and the face image set corresponding to the eyebrow shape, the basic model is trained to obtain the eyebrow shape model corresponding to the eyebrow shape, and the eyebrow shape model corresponding to each eyebrow shape is obtained.
[0161] In this embodiment, the original face image set and the face image set corresponding to one eyebrow shape can be formed into a group of image sets, and a basic model can be trained based on the group of image sets to obtain an eyebrow shape model corresponding to one eyebrow shape. Based on multiple eyebrow shapes, multiple groups of image sets can be obtained, and based on the original face image set and the face image set corresponding to the eyebrow shape in each group of image sets, the basic model is trained to obtain the eyebrow shape model corresponding to the eyebrow shape, that is, to obtain eyebrow shape models corresponding to multiple eyebrow shapes.
[0162] It can be seen that the server generates an encoding vector through an encoder, and inputs the encoding vector and the vector superimposed with the transformation vector of each eyebrow shape into the face generator to obtain the original face image set and the face image set corresponding to each eyebrow shape, and trains multiple basic models based on these image sets to obtain the eyebrow shape model corresponding to each eyebrow shape. A model that occupies a large amount of memory is generated from a model that occupies a large amount of memory, and the eyebrow shape model that occupies a small amount of memory is sent to the client, so that the client can quickly respond to the user's eyebrow shape transformation operation, which provides a guarantee for the client to achieve real-time eyebrow shape transformation.
[0163] In order to execute the corresponding steps in the above embodiments and various possible methods, a method for implementing an eyebrow shape transformation device applied to a client is given below. Fig. 9 , Fig. 9This is a functional module diagram of an eyebrow shape changing device 500 provided in an embodiment of the present invention. It should be noted that the basic principle and technical effects of the eyebrow shape changing device 500 provided in this embodiment are the same as those of the above-mentioned embodiments. For the sake of brief description, for the parts not mentioned in this embodiment, reference can be made to the corresponding contents in the above-mentioned embodiments. The eyebrow shape changing device 500 includes:
[0164] The response module 510 is used to respond to the user's confirmation operation on the eyebrow shape change interface and display a plurality of first face images; the eyebrows in the plurality of first face images have a variety of eyebrow shapes;
[0165] In response to the user's selection operation in the eyebrow shape transformation interface, a target face image is acquired, and a target eyebrow shape to which the eyebrows in the target face image belong is determined;
[0166] In response to the user's picture selection operation in the eyebrow shape transformation interface, a second face image is obtained;
[0167] The transformation module 530 is used to transform the second face image using a target eyebrow shape model corresponding to the target eyebrow shape, and display the second face image including the target eyebrow shape.
[0168] Optionally, the response module 510 is specifically used to: respond to the user's confirmation operation in the eyebrow shape transformation interface, and send a first request to the server; wherein the first request is used to instruct the encoder to generate multiple facial feature vectors, and input each facial feature vector into the face generator to obtain multiple first face images; receive the multiple first face images sent by the server and display them.
[0169] Optionally, the response module 510 is specifically used to: perform key point detection on the eyebrows in the target face image to obtain multiple eyebrow key points; calculate the target cosine vector based on the multiple eyebrow key points; match the target cosine vector with the multiple cosine vectors to obtain the target eyebrow shape.
[0170] Optionally, the transformation module 530 is specifically used to: send a request message containing a target eyebrow shape to the server, and accept a target eyebrow shape model corresponding to the target eyebrow shape sent by the server; generate a third image including the target eyebrow shape through the target eyebrow shape model; replace the eyebrow shape in the second facial image based on the third image, and obtain and display the second facial image containing the target eyebrow shape.
[0171] In order to execute the corresponding steps in the above embodiments and various possible methods, a method for implementing an eyebrow shape changing device applied to a server is given below. Fig.10 , Fig.10This is a functional module diagram of an eyebrow shape changing device 600 provided in an embodiment of the present invention. It should be noted that the basic principle and technical effects of the eyebrow shape changing device 600 provided in this embodiment are the same as those of the above-mentioned embodiments. For the sake of brief description, for the parts not mentioned in this embodiment, reference can be made to the corresponding contents in the above-mentioned embodiments. The eyebrow shape changing device 600 includes:
[0172] A generating module 610, configured to obtain a plurality of eyebrow shape models through an encoder and a face generator, each eyebrow shape model corresponding to an eyebrow shape;
[0173] The selection module 630 is used to select a target eyebrow shape model corresponding to the target eyebrow shape from multiple eyebrow shape models upon receiving a request message containing a target eyebrow shape sent by the client; wherein the target eyebrow shape represents the eyebrow shape selected by the user in the eyebrow shape transformation interface of the client;
[0174] The sending module 650 is used to send the target eyebrow shape model to the client, so that the client can transform the eyebrow shape in the face image selected by the user through the target eyebrow shape model.
[0175] Optionally, the generating module 610 is specifically used to: generate a plurality of encoding vectors including facial features through an encoder, and obtain transformation vectors of a plurality of eyebrow shapes based on the plurality of encoding vectors; input each encoding vector into a face generator to obtain an original face image set;
[0176] For each eyebrow shape, a vector obtained by superimposing each encoding vector with the transformation vector of the eyebrow shape is input into a face generator to obtain a face image set corresponding to the eyebrow shape, thereby obtaining a face image set corresponding to each eyebrow shape;
[0177] For each eyebrow shape, based on the original face image set and the face image set corresponding to the eyebrow shape, the basic model is trained to obtain the eyebrow shape model corresponding to the eyebrow shape, and the eyebrow shape model corresponding to each eyebrow shape is obtained.
[0178] The embodiment of the present invention further provides a client, including a processor 120 and a memory 130. The memory 130 stores a computer program. When the processor executes the computer program, the eyebrow shape transformation method disclosed in the above embodiment is implemented.
[0179] The embodiment of the present invention further provides a server, including a processor 120 and a memory 130. The memory 130 stores a computer program. When the processor executes the computer program, the eyebrow shape transformation method disclosed in the above embodiment is implemented.
[0180] The embodiment of the present invention further provides a storage medium on which a computer program is stored. When the computer program is executed by the processor 120, the eyebrow shape transformation method disclosed in the embodiment of the present invention is implemented.
[0181] In several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0182] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
[0183] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0184] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for transforming eyebrow shape, characterized in that: Applied to a client, the client is connected to a server for communication, and the server has a pre-stored encoder and a face generator; the method comprises: In response to the user's confirmation operation on the eyebrow shape transformation interface, a first request is sent to the server; wherein the first request is used to instruct the encoder to generate a plurality of facial feature vectors, and input each of the facial feature vectors into the face generator to obtain the plurality of first face images; receiving and displaying the plurality of first face images sent by the server; the eyebrows in the plurality of first face images have a variety of eyebrow shapes; In response to the user's selection operation in the eyebrow shape transformation interface, a target face image is acquired, and a target eyebrow shape to which the eyebrows in the target face image belong is determined; In response to the user's picture selection operation in the eyebrow shape transformation interface, a second face image is obtained; The second facial image is transformed using a target eyebrow shape model corresponding to the target eyebrow shape, and a second facial image including the target eyebrow shape is displayed.
2. The method according to claim 1, characterized in that The client pre-stores a plurality of cosine vectors and an eyebrow shape represented by each of the cosine vectors; The step of determining the target eyebrow shape to which the eyebrows in the target face image belong comprises: Performing key point detection on the eyebrows in the target face image to obtain a plurality of eyebrow key points; Based on the multiple eyebrow key points, calculating a target cosine vector; The target cosine vector is matched with the multiple cosine vectors to obtain the target eyebrow shape.
3. The method according to claim 1, characterized in that: The client is connected to a server for communication, and the server pre-stores a plurality of eyebrow shape models, and the plurality of eyebrow shape models are obtained through an encoder and a face generator in the server; The step of transforming the second face image by using the target eyebrow shape model corresponding to the target eyebrow shape to display the second face image including the target eyebrow shape comprises: Sending a request message including the target eyebrow shape to the server, and receiving a target eyebrow shape model corresponding to the target eyebrow shape sent by the server; generating a third image including the target eyebrow shape by using the target eyebrow shape model; The eyebrow shape in the second facial image is replaced based on the third image to obtain and display a second facial image containing the target eyebrow shape.
4. A method for transforming eyebrow shape, characterized in that: Applied to a server, the server is connected to a client for communication; the server pre-stores an encoder and a face generator; the method comprises: Obtaining a plurality of eyebrow shape models through the encoder and the face generator, each eyebrow shape model corresponds to an eyebrow shape; After receiving the request message including the target eyebrow shape sent by the client, a target eyebrow shape model corresponding to the target eyebrow shape is selected from the multiple eyebrow shape models; wherein the target eyebrow shape represents the eyebrow shape selected by the user in the eyebrow shape transformation interface of the client; The target eyebrow shape model is sent to the client, so that the client transforms the eyebrow shape in the face image selected by the user through the target eyebrow shape model.
5. The method according to claim 4, characterized in that The step of obtaining a plurality of eyebrow shape models through the encoder and the face generator comprises: Generate multiple encoding vectors containing facial features through the encoder, and obtain transformation vectors of multiple eyebrow shapes based on the multiple encoding vectors; Input each encoding vector into the face generator to obtain a set of original face images; For each eyebrow shape, a vector obtained by superimposing each encoding vector and the transformation vector of the eyebrow shape is input into the face generator to obtain a face image set corresponding to the eyebrow shape, thereby obtaining a face image set corresponding to each eyebrow shape; For each eyebrow shape, based on the original face image set and the face image set corresponding to the eyebrow shape, a basic model is trained to obtain an eyebrow shape model corresponding to the eyebrow shape, thereby obtaining an eyebrow shape model corresponding to each eyebrow shape.
6. A method for transforming eyebrow shape, characterized in that: Applied to a system, the system includes a server and a client connected in communication, the server pre-stores an encoder and a face generator, and the method includes: The server obtains a plurality of eyebrow shape models through the encoder and the face generator, each of the eyebrow shape models corresponding to one eyebrow shape; The client responds to the user's eyebrow shape changing operation and sends a request message including the target eyebrow shape to the server; The server selects a target eyebrow shape model corresponding to the target eyebrow shape from the multiple eyebrow shape models according to the request message and sends the target eyebrow shape to the client; The client receives the target eyebrow shape model, and transforms the eyebrow shape in the face image selected by the user through the target eyebrow shape model.
7. An eyebrow shape changing device, characterized in that: Applied to a client, the client is connected to a server for communication, and the server is pre-stored with an encoder and a face generator; the device comprises: A response module, configured to respond to a user's confirmation operation on the eyebrow shape transformation interface and send a first request to the server; wherein the first request is used to instruct the encoder to generate a plurality of facial feature vectors, and input each of the facial feature vectors into the face generator to obtain the plurality of first face images; receive the plurality of first face images sent by the server and display them; the eyebrows in the plurality of first face images have a variety of eyebrow shapes; In response to the user's selection operation in the eyebrow shape transformation interface, a target face image is acquired, and a target eyebrow shape to which the eyebrows in the target face image belong is determined; In response to the user's picture selection operation in the eyebrow shape transformation interface, a second face image is obtained; The transformation module is used to transform the second face image by using a target eyebrow shape model corresponding to the target eyebrow shape, and display the second face image including the target eyebrow shape.
8. An eyebrow shape changing device, characterized in that: Applied to a server, the server is connected to a client for communication; the server is pre-stored with an encoder and a face generator, and the device comprises: A generating module, used for obtaining a plurality of eyebrow shape models through the encoder and the face generator, each eyebrow shape model corresponding to an eyebrow shape; A selection module, configured to, upon receiving a request message containing a target eyebrow shape sent by the client, select a target eyebrow shape model corresponding to the target eyebrow shape from the multiple eyebrow shape models; wherein the target eyebrow shape represents the eyebrow shape selected by the user in the eyebrow shape transformation interface of the client; The sending module is used to send the target eyebrow shape model to the client, so that the client can transform the eyebrow shape in the face image selected by the user through the target eyebrow shape model.
9. A client, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program, and when the processor executes the computer program, the method according to any one of claims 1 to 3 is implemented.
10. A server, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program, and when the processor executes the computer program, the method according to any one of claims 4 and 5 is implemented.
11. A storage medium, characterized in that: The storage medium stores a computer program, which, when executed by a processor, implements the method of any one of claims 1 to 3 or any one of claims 4 to 5.
Citation Information
Patent Citations
Makeup recommendation method and device, storage medium and mobile terminal
CN110110118A
Method for digitally beautifying eyebrows, electronic equipment and storage medium
CN113689325A