Image processing method, device, equipment and computer storage medium
By using the GAN model and HCGAN technology to process the target parts of the face image, combined with preset color filling, the problem of local unnaturalness in face image processing is solved, achieving highly realistic and natural effects and wider applicability.
Patent Information
- Application Number
- CN201910342929.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-04-26
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2040-02-22
AI Technical Summary
In the face image processing using the existing technology, especially in the face-swapping process, unnatural local parts such as teeth, noses, eyes, etc. are prone to appear, making it difficult to achieve highly realistic and natural effects.
The Generative Adversarial Network (GAN) model is used to obtain the target parts of the face image, cut out and fused, and combined with Hidden Conditional Generative Adversarial Networks (HCGAN) technology, train the GAN network to adjust parameters and fill the target parts with preset colors. , ensuring the controllability and naturalness of image processing.
It achieves high-fidelity natural effects of face images, is suitable for many-to-many application scenarios, improves processing speed and naturalness, has a wider scope of application, and avoids the limitations of feature point alignment.
Smart Images

Figure CN111861863B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of image processing technology, and in particular relates to an image processing method, device, equipment and computer storage medium. Background Art
[0002] With the continuous development of network and computer technology, the number of social software for mass entertainment is increasing. Social software with functions such as beauty, cute face, and live broadcast is favored by the majority of users. In addition, face swapping has gradually become a new hot spot for people's social entertainment. At present, the application of video face swapping technology is very extensive. As the name suggests, it means replacing one face with another in an image or video.
[0003] However, usually after a facial image is processed (eg, face-changing), some parts may be unnatural, such as teeth, nose, eyes, etc. Summary of the invention
[0004] The embodiments of the present invention provide an image processing method, device, equipment and computer storage medium, which can make facial images more natural.
[0005] In a first aspect, an embodiment of the present invention provides an image processing method, the method comprising:
[0006] Obtaining a first face image;
[0007] Identify the target part of the first face image and remove the target part to obtain a second face image;
[0008] The second face image is input into a Generative Adversarial Networks (GAN) model to obtain a target face image that is a fusion of the second face image and the target part pre-stored in the GAN model.
[0009] According to the image processing method provided by the embodiment of the present invention, the GAN network is trained to obtain a GAN model, and the training includes:
[0010] The target part of the third face image is removed to obtain a fourth face image;
[0011] Inputting the fourth face image into the GAN network to obtain a fifth face image that is a fusion of the fourth face image and the target part pre-stored in the GAN network;
[0012] comparing the fifth face image with the third face image to obtain an error between a target portion of the fifth face image and a target portion of the third face image;
[0013] Adjust the parameters of the GAN network according to the error;
[0014] Repeat the above steps using different third-person face images to train the GAN network until the error meets the preset requirements;
[0015] After the error meets the preset requirements, the GAN model is obtained.
[0016] According to the image processing method provided by the embodiment of the present invention, the GAN network includes a generator G and a discriminator D, and the parameters of the GAN network are adjusted according to the error, including:
[0017] The first parameters of the generator G and the second parameters of the discriminator D are adjusted according to the error.
[0018] According to the image processing method provided by the embodiment of the present invention, after removing the target part, the method further includes:
[0019] The area where the target part of the first face image is located is filled with a preset color.
[0020] According to the image processing method provided by the embodiment of the present invention, the preset color includes any one of black, white, red and blue.
[0021] According to the image processing method provided by the embodiment of the present invention, the target part includes one or more of the following: teeth, eyebrows, eyes, mouth, and nose.
[0022] According to the image processing method provided by the embodiment of the present invention, the first face image includes a face-changed face image.
[0023] In a second aspect, an embodiment of the present invention provides an image processing device, the device comprising:
[0024] An image acquisition module, used to acquire a first face image;
[0025] A first image processing module, used for identifying a target part of the first face image and removing the target part to obtain a second face image;
[0026] The second image processing module is used to input the second face image into the generative adversarial network (GAN) model to obtain a target face image after the second face image is fused with the target part pre-stored in the GAN network model.
[0027] In a third aspect, an embodiment of the present invention provides an image processing device, the device comprising: a processor and a memory storing computer program instructions;
[0028] When the processor executes the computer program instructions, the image processing method of the first aspect is implemented.
[0029] In a fourth aspect, an embodiment of the present invention provides a computer storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the image processing method as described in the first aspect is implemented.
[0030] The image processing method, device, equipment and computer storage medium of the embodiment of the present invention remove the target part of the face image to be processed, input the face image without the target part into the GAN network model, and fuse it with the target part pre-stored in the GAN network model to obtain the target face image. According to the embodiment of the present invention, the face image can be made more natural. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solution of the embodiment of the present invention, the following is a brief introduction to the drawings required for use in the embodiment of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0032] Figure 1 is a flowchart of an image processing method provided by an embodiment of the present invention;
[0033] Figure 2 The face image before and after the target part is removed provided by the embodiment of the present invention;
[0034] Figure 3 is a structural schematic diagram of an image processing device provided by an embodiment of the present invention;
[0035] Figure 4 It is a schematic diagram of the structure of an image processing device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0036] The features and exemplary embodiments of various aspects of the present invention will be described in detail below. In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only configured to explain the present invention and are not configured to limit the present invention. For those skilled in the art, the present invention can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present invention by illustrating examples of the present invention.
[0037] It should be noted that, in this article, relational terms such as first and second, etc. are only used 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 statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0038] In order to solve the problems in the prior art, the embodiments of the present invention provide an image processing method, device, equipment and computer storage medium. The image processing method provided by the embodiments of the present invention is first introduced below.
[0039] Figure 1 FIG. 1 is a flow chart of an image processing method provided by an embodiment of the present invention. Figure 1 As shown, the image processing method of the embodiment of the present invention includes the following steps:
[0040] S110, obtaining a first face image.
[0041] S120, identifying a target part of the first facial image, and removing the target part to obtain a second facial image.
[0042] S130, inputting the second facial image into a generative adversarial network (GAN) model to obtain a target facial image that is a fusion of the second facial image and the target part pre-stored in the GAN model.
[0043] According to the method provided by the embodiment of the present invention, the target part of the face image to be processed is removed, and the face image without the target part is input into the GAN network model, and fused with the target part pre-stored in the GAN network model to obtain the target face image. The present invention can make the face image more natural.
[0044] A simple GAN network, whose input is random noise Z, generally has random output, that is, the input and output of a simple GAN network are uncontrollable. However, this application uses a specific conditional graph and combines the GAN network to form a hidden conditional generative adversarial network (HCGAN), making the input and output controllable.
[0045] In S110, if the scene is based on face swapping, the first face image obtained is the face image after face swapping; if the scene is based on face plastic surgery, the first face image obtained is the original face image; if the scene is based on other entertainment nature, the first face image obtained is a processed face image (for example, thin face, big eyes, etc.). Regardless of the scene in which the face image is obtained, the face image can be made more natural according to the present invention.
[0046] In the scenario of face swapping, the present application is a third-generation face-changing image processing method. The first-generation face-changing image processing method is to simply replace the person's head, and the resulting image is extremely uncoordinated and unnatural. The second-generation face-changing image processing method is to align feature points with feature points, which has great limitations, slow processing speed, and does not achieve the desired degree of naturalness. The present application is different from the first-generation face-changing image processing method and the second-generation face-changing image processing method, and is suitable for many-to-many applications, that is, it is suitable for the processing of any face-swapping image, and the resulting face image is highly realistic and natural, with a wider range of applications, and the processing speed is also greatly improved. In addition, many-to-many applications are also suitable for facial plastic surgery, or other entertainment scenarios (for example, face thinning, big eyes, etc.).
[0047] In addition, the first facial image obtained may be a facial image recognized from an ID photo or other static photos, or may be a facial image recognized from a target frame image in a video.
[0048] To recognize a face image from a ID photo, other static photos, or a target frame image in a video, any of the following methods may be used, including methods based on geometric features, local feature analysis methods, eigenface methods, neural network methods, etc.
[0049] In S120, when removing the target part from the first face image, the key points of the first face image may be identified first, and the target part may be found based on the key points. The target part may be any one of teeth, eyebrows, eyes, mouth, nose, etc. When the target part is teeth, generally, the expression of the first face image should be in an open mouth state, and the teeth are exposed. The position of the teeth may be determined based on the key points of the lips, i.e., the feature points of the lower edge of the upper lip and the feature points of the lower edge of the lower lip, and the area surrounded by the feature points of the lower edge of the upper lip and the feature points of the upper edge of the lower lip may be removed, and the upper and lower lips are still retained to prevent the lips from being mistakenly removed in order to make the teeth look natural.
[0050] For example, in the face swap scenario, the target part is usually the teeth. Figure 2This is a face image before and after the target part is removed provided by an embodiment of the present invention. Because everyone's cheekbones are different. For example, if the face of person A is replaced with a face image of person B with exposed teeth, it is easy to cause the teeth of the face image obtained after the face replacement to be unnatural because the cheekbones of person A and person B are different. Therefore, it is very necessary to further repair the face image after the face replacement to obtain a highly realistic and natural face image.
[0051] Preferably, after the target part is removed from the first face image, the area where the target part is located in the first face image is filled with a preset color to obtain the second face image. For example, the preset color is any one of black, white, red, blue, etc. Preferably, the area where the target part is located in the first face image is filled with black.
[0052] The area where the target part in the first face image is located is filled with a preset color, so that even if the target part is removed, it can be quickly identified.
[0053] In the present invention, the second facial image obtained by removing the target part of the first facial image is a specific condition of the GAN model. The GAN model is a trained GAN network. The present invention introduces specific conditions to make the input and output of the GAN model controllable and improve the processing speed, so that the obtained facial image is more realistic and natural.
[0054] In S130, the second face image is fused with the target part pre-stored in the GAN model, and the information of the target part pre-stored in the GAN model may be the capability information of generating the target part, which is used to generate the target part that can naturally match the second face image. The capability information may be trained from a large number of face images. For example, a large amount of abstract and common information of teeth is pre-stored in the GAN model, and teeth are generated based on the abstract and common information to match the second face image. The abstract and common information of teeth may be the shape, color, gap between left and right teeth, gap between upper and lower teeth, starting position of teeth, size of teeth, etc. Alternatively, the information of the target part pre-stored in the GAN model is an image of the target part, including images of various tooth shapes under different lighting conditions.
[0055] In the present invention, information of the target part is pre-stored in the GAN model, so that when the images are fused, the GAN model has a generated target part or a pre-stored image of the target part to match the second face image, thereby improving the naturalness of the fused face image.
[0056] Before inputting the second face image into the GAN model, the GAN needs to be trained to obtain the GAN model. Training the GAN network may include: removing the target part of the third face image to obtain a fourth face image, inputting the fourth face image into the GAN network, obtaining a fifth face image after the fourth face image is fused with the target part pre-stored in the GAN network; comparing the fifth face image with the third face image to obtain the error between the target part of the fifth face image and the target part of the third face image; adjusting the parameters of the GAN network according to the error; repeating the above steps with different third face images to train the GAN network until the error meets the preset requirements; after the error meets the preset requirements, obtaining the GAN model.
[0057] During training, the information of the target part pre-stored in the GAN network can be the ability information of generating the target part, that is, the ability information of the generator G. This ability information is continuously enhanced with continuous iterative training until the ability reaches the optimal level, so that after any face image with the target part removed is input into the trained GAN model, the generator G can produce the target part that naturally matches the face image with high realism.
[0058] The GAN network includes a generator (Generator, G) and a discriminator (Discriminator, D). The GAN network can be seen as two network models competing against each other. The generative network model G is a network used to generate images. The input of the model is a random noise z, and the corresponding image is generated through this noise. The image is recorded as G(z). The discriminator network model D is a judgment network, which is used to determine whether the network is a real sample. During the training process, the purpose of the generative network G is to generate real pictures as much as possible to deceive the discriminator network D. The purpose of the discriminator network D is to distinguish between the pictures of the generative network G and the real samples.
[0059] The above training process is unsupervised, and the input is random data, which will cause the input and output to be uncontrollable. The present invention uses HCGAN to add occlusion supervision information in the training process of the GAN network, that is, the face image with the target part removed, which enhances the controllability and improves the performance effect.
[0060] In the present invention, the specific condition can be understood as a face image with the target part removed, and the specific condition is introduced in the training of both the generator G and the discriminator D.
[0061] For example, the GAN network is trained using the facial image of person C, the target part of the facial image of person C is subtracted, and the subtracted area is filled with black to form a specific conditional facial image of person C. The specific conditional facial image of person C is used as input, and the GAN network has the original facial image of person C and a large amount of information about the target part. The generator G generates a fused facial image of person C based on the specific conditional facial image of person C and the pre-stored information about the target part. The discriminator D compares the fused facial image of C with the original facial image of person C, and obtains the error between the target part of the fused facial image of person C and the original facial image of person C, and further guides the generator G based on the error.
[0062] Here, the target part in the fused face image of person C is not necessarily that of person C, but may be that of other people. The purpose of the present invention is not to fuse the real target part of person C to the face image of person C under specific conditions, but to make the fused face image of person C reach a high degree of realism and naturalness.
[0063] Furthermore, the GAN network is continuously trained using a large number of facial images of the same person with different expressions and postures, or a large number of facial images of different people, until the error between the target part of the fused facial image and the original facial image meets certain requirements, such as the error is infinitely close to 0. At this time, the first parameter of the generator G and the second parameter of the discriminator D have both reached the optimal value, that is, the overall parameter of the GAN network has reached the optimal value. At this point, the GAN network with the optimal parameters can be used as a GAN network model.
[0064] According to the embodiment of the present invention, a technical means combining specific conditions with a GAN network is used to make up for the unnatural defects of some parts of the facial image after processing. In addition, the present invention does not require alignment of feature points, has a fast processing speed and is more widely applicable.
[0065] Figure 3 Schematic diagram of the structure of the image processing device provided by the embodiment of the present invention. Figure 3 As shown, the image processing device provided by the embodiment of the invention includes the following modules:
[0066] An image acquisition module 31, used to acquire a first face image;
[0067] A first image processing module 32, used to identify a target part of the first face image and remove the target part to obtain a second face image;
[0068] The second image processing module 33 is used to input the second face image into the generative adversarial network (GAN) model to obtain a target face image after the second face image is fused with the target part pre-stored in the GAN model.
[0069] In one embodiment, the second image processing module 33 is specifically used for:
[0070] The target part of the third facial image is removed to obtain a fourth facial image, and the fourth facial image is input into the GAN network to obtain a fifth facial image which is a fusion of the fourth facial image and the target part pre-stored in the GAN network;
[0071] comparing the fifth face image with the third face image to obtain an error between a target portion of the fifth face image and a target portion of the third face image;
[0072] Adjust the parameters of the GAN network according to the error;
[0073] Repeat the above steps using different third-person face images to train the GAN network until the error meets the preset requirements;
[0074] After the error meets the preset requirements, the GAN model is obtained.
[0075] In one embodiment, the second image processing module 33 is specifically used for:
[0076] The GAN network includes a generator G and a discriminator D. The parameters of the GAN network are adjusted according to the error, including:
[0077] The first parameters of the generator G and the second parameters of the discriminator D are adjusted according to the error.
[0078] In one embodiment, the first image processing module 32 is specifically used for:
[0079] The area where the target part of the first face image is located is filled with a preset color.
[0080] In one embodiment, the second image processing module 33 is specifically used for:
[0081] The preset colors include any one of black, white, red, and blue.
[0082] In one embodiment, the second image processing module 33 is specifically used for:
[0083] Target areas include one or more of the following: teeth, eyebrows, eyes, mouth, nose.
[0084] In one embodiment, the image acquisition module 31 is specifically used for:
[0085] The first facial image includes a face-changed facial image.
[0086] According to the device provided by the embodiment of the present invention, the target part of the face image to be processed is removed, and the face image without the target part is input into the GAN model, and fused with the target part pre-stored in the GAN model to obtain the target face image. The present invention can make the face image more natural.
[0087] Figure 4 A schematic diagram of the hardware structure of an image processing device provided by an embodiment of the present invention is shown.
[0088] In the embodiment of the present invention, the image processing device may include a smart phone, a tablet computer, a PDA, a laptop computer, a mobile Internet device (MID) or a wearable device, etc. The above devices are only examples, not exhaustive, and include but are not limited to the above devices.
[0089] The image processing device may include a processor 301 and a memory 302 storing computer program instructions.
[0090] Specifically, the processor 301 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiment of the present invention.
[0091] The memory 302 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 302 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 302 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 302 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 302 is a non-volatile solid-state memory. In a specific embodiment, the memory 302 includes a read-only memory (ROM). In appropriate cases, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM) or a flash memory or a combination of two or more of these.
[0092] The processor 301 implements any one of the image processing methods in the above embodiments by reading and executing computer program instructions stored in the memory 302 .
[0093] In one example, the image processing device may further include a communication interface 303 and a bus 310. Figure 3 As shown, the processor 301, the memory 302, and the communication interface 303 are connected via a bus 310 and communicate with each other.
[0094] The communication interface 303 is mainly used to implement the communication between the modules, devices, units and / or equipment in the embodiment of the present invention.
[0095] Bus 310 includes hardware, software or both, and the components of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 310 may include one or more buses. Although the embodiment of the present invention describes and shows a specific bus, the present invention considers any suitable bus or interconnection.
[0096] The image processing device can execute the image processing method in the embodiment of the present invention, thereby realizing the combination Figure 1 and Figure 3 The image processing method and apparatus are described.
[0097] In addition, in combination with the image processing method in the above embodiment, the embodiment of the present invention can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the image processing methods in the above embodiment is implemented.
[0098] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.
[0099] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0100] It should also be noted that the exemplary embodiments mentioned in the present invention describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiments, or in a different order from the embodiments, or several steps can be performed simultaneously.
[0101] The above is only a specific implementation of the present invention. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the system, module and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. It should be understood that the protection scope of the present invention is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be covered within the protection scope of the present invention.
Claims
1. An image processing method, characterized in that: include: Acquire a first facial image, wherein the first facial image is a facial image that has been processed with special effects, wherein the special effects processing includes at least one of face-changing processing, beautification processing, face-slimming processing, and eye-enlarging processing; Identifying a target part of the first facial image and removing the target part to obtain a second facial image; Inputting the second face image into a generative adversarial network (GAN) model to obtain a target face image after the second face image is fused with a target part pre-stored in the GAN model, wherein the generative adversarial network (GAN) model is an occlusion conditional generative adversarial network (GAN) model; The GAN network is trained to obtain the GAN model, wherein the training includes: removing the target part of the third facial image to obtain a fourth facial image; Inputting the fourth facial image into a GAN network to obtain a fifth facial image that is a fusion of the fourth facial image and the target part pre-stored in the GAN network; Comparing the fifth facial image with the third facial image to obtain an error between a target portion of the fifth facial image and a target portion of the third facial image; Adjusting parameters of the GAN network according to the error; Repeat the above steps using different third face images to train the GAN network until the error meets the preset requirement; After the error meets the preset requirements, the GAN model is obtained.
2. The image processing method according to claim 1, characterized in that: The GAN network includes a generator G and a discriminator D, and adjusting the parameters of the GAN network according to the error includes: The first parameter of the generator G and the second parameter of the discriminator D are adjusted according to the error.
3. The image processing method according to claim 1, characterized in that: After the target part is removed, the method further comprises: The area where the target part of the first facial image is located is filled with a preset color.
4. The image processing method according to claim 3, characterized in that: The preset color includes any one of black, white, red and blue.
5. The image processing method according to any one of claims 1 to 4, characterized in that: The target part includes one or more of the following: teeth, eyebrows, eyes, mouth, nose.
6. The image processing method according to any one of claims 1 to 4, characterized in that: The first facial image includes a facial image after face replacement.
7. An image processing device, characterized in that: The device comprises: An image acquisition module, used to acquire a first face image, wherein the first face image is a face image processed with special effects, wherein the special effects processing includes at least one of face replacement processing, beautification processing, face slimming processing, and eye enlargement processing; A first image processing module, used for identifying a target part of the first face image and removing the target part to obtain a second face image; A second image processing module is used to input the second face image into a generative adversarial network (GAN) model to obtain a target face image after the second face image is fused with a target part pre-stored in the GAN model, wherein the generative adversarial network (GAN) model is an occlusion conditional generative adversarial network (GAN) model; The GAN network is trained to obtain the GAN model, wherein the training includes: removing the target part of the third facial image to obtain a fourth facial image; Inputting the fourth facial image into a GAN network to obtain a fifth facial image that is a fusion of the fourth facial image and the target part pre-stored in the GAN network; Comparing the fifth facial image with the third facial image to obtain an error between a target portion of the fifth facial image and a target portion of the third facial image; Adjusting parameters of the GAN network according to the error; Repeat the above steps using different third face images to train the GAN network until the error meets the preset requirement; After the error meets the preset requirements, the GAN model is obtained.
8. An image processing device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the image processing method according to any one of claims 1 to 6 is implemented.
9. A computer storage medium, characterized in that The computer storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the image processing method according to any one of claims 1 to 6 is implemented.
