Image processing method, device, equipment and medium

By generating a discriminator for adversarial network training, the problem that traditional face live detection technology is difficult to distinguish the authenticity of high-resolution forged face images is solved, and the accurate distinction between real and fake images is achieved, and the authentication process is improved. security.

CN112149631BActive Publication Date: 2025-01-07BEIJING DIDI INFINITY TECH & DEV CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011128339.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-20
Publication Date
2025-01-07
Estimated Expiration
2040-10-20

AI Technical Summary

Technical Problem

Traditional face live detection technology is difficult to accurately determine the authenticity when facing high-resolution forged face images, resulting in insufficient security in the authentication process.

Method used

The Generative Adversarial Network (GAN) idea is used to train the discriminator, and learn and identify cheat patterns through the game method of generation and confrontation, distinguish the original image of the real object, the original image of the fake object, the generated image of the real object, and the generated image of the fake object. Improve discrimination accuracy.

Benefits of technology

It effectively improves the security of the face authentication process, can accurately distinguish between real and forged images, enhances the detection ability of high-resolution forged images, and ensures the authenticity of the authentication results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112149631B_ABST
    Figure CN112149631B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure relate to methods, devices, apparatuses, and media for image processing. The method includes: obtaining an input image; and determining an attribute of the input image using a trained discriminator, the attribute indicating that the input image belongs to one of the following: an original image of a real object, an original image of a forged object, a generated image of a real object, and a generated image of a forged object. In this way, the accuracy of identifying the attribute of the input image can be improved, thereby improving the security of the authentication process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate generally to image processing, and more particularly to methods, apparatuses, electronic devices, and computer storage media for image processing. Background Art

[0002] In recent years, with the advancement of science and technology, the use of deep learning technology has gradually become popular. For example, deep learning technology has been used in the authentication process of identifying objects such as faces and fingerprints to be authenticated. Such an authentication process can identify the object to be authenticated to determine whether it is the real object to be authenticated, for example, whether it is the person himself, or which person it is. This authentication process can be widely used in scenarios such as account login, face payment, and roll call system.

[0003] In the traditional authentication process, in order to ensure security, liveness detection is required to correctly determine whether the object to be authenticated is the real object to be authenticated, such as whether it is a real face. However, the liveness detection capability of such an authentication process is poor. Summary of the invention

[0004] According to an embodiment of the present disclosure, a solution for image processing is provided.

[0005] In a first aspect of the present disclosure, a method for image processing is provided. The method comprises: obtaining an input image; and determining a property of the input image using a trained discriminator, the property indicating that the input image belongs to one of the following: an original image of a real object, an original image of a forged object, a generated image of a real object, and a generated image of a forged object.

[0006] In a second aspect of the present disclosure, a device for image processing is provided. The device includes: an acquisition module configured to acquire an input image; and a determination module configured to determine an attribute of the input image using a trained discriminator, wherein the attribute indicates that the input image belongs to one of the following: an original image of a real object, an original image of a forged object, a generated image of a real object, and a generated image of a forged object.

[0007] In a third aspect of the present disclosure, an electronic device is provided, which includes: one or more processors; and a memory for storing one or more programs, and when the one or more programs are executed by the one or more processors, the electronic device implements the method according to the first aspect of the present disclosure.

[0008] In a fourth aspect of the present disclosure, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method according to the first aspect of the present disclosure is implemented.

[0009] It should be understood that the contents described in the summary of the invention are not intended to limit the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:

[0011] Figure 1 A schematic diagram showing an exemplary environment in which embodiments of the present disclosure can be implemented;

[0012] Figure 2 A flowchart of a method for determining properties of an input image according to some embodiments of the present disclosure is shown;

[0013] Figure 3 A flowchart of a method for training a discriminator according to some embodiments of the present disclosure is shown;

[0014] Figure 4 A schematic diagram of training an initial discriminator according to some embodiments of the present disclosure is shown;

[0015] Figure 5 A schematic diagram of training a first generator and a second generator according to some embodiments of the present disclosure is shown;

[0016] Figure 6 A block diagram showing an apparatus for determining a property of an input image according to some embodiments of the present disclosure; and

[0017] Figure 7 A block diagram of an electronic device capable of implementing an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0018] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, but rather these embodiments are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0019] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0020] As mentioned above, in order to ensure security, liveness detection is required to correctly determine whether the object to be authenticated is a real object to be authenticated. In the following, a face will be used as an example of the object to be authenticated. However, it is easy for those skilled in the art to understand that the object to be authenticated can be any appropriate object to be authenticated or identified, such as a fingerprint, an iris, etc.

[0021] As an example, in order to ensure that the face recognition results are authentic, it is necessary to ensure that the object of face recognition is a real face, not a forged face, such as a face image obtained by reshooting or printing. For example, when paying by face, a malicious user may use a printed face image for face recognition. If there is no liveness detection, it is easy to deceive the system and complete the payment, resulting in property loss. Therefore, it is necessary to perform liveness detection during the authentication process to determine the authenticity of the face. For example, it is possible to pre-determine whether the object to be authenticated is a real face before face recognition, and subsequent face recognition is only performed if the object to be authenticated is a real face.

[0022] Traditionally, in order to perform liveness detection, a face liveness detection technology based on a monocular RGB (red, green, and blue) image is usually used. It uses deep learning technology to treat face liveness detection as a binary classification problem. It is carried out in the same way as a binary classification problem in both the training and prediction stages, and the final classification results are real faces and forged faces. For example, when the object to be authenticated is a real face, the classification result is a real face, and when the object to be authenticated is a printed or reproduced face image, the classification result is a forged face.

[0023] However, with the rapid development of hardware-based imaging technology, video or image post-processing technology, printing technology, etc., the diversity, complexity and realism of means of attacking with forged faces have increased significantly. This poses a huge challenge to face liveness detection technology. For example, the image resolution of the forged face used for attack may be extremely high, and there are no obvious cheating features such as moiré, distortion, borders, etc. In this case, even professionals find it difficult to judge the authenticity of the face. Therefore, it is necessary to improve the liveness detection technology to discover the detailed information of the image and find the subtle differences between the forged face image and the real face in order to correctly judge the authenticity of the face.

[0024] To this end, an embodiment of the present disclosure provides a scheme for image processing. In the scheme, an input image can be obtained, and a trained discriminator is used to determine the attributes of the input image. The attribute can indicate that the input image belongs to one of the following: an original image about a real object, an original image about a forged object, a generated image about a real object, and a generated image about a forged object. In this way, the type of the input image can be accurately discriminated, thereby improving security. The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0025] Figure 1 A schematic diagram of an exemplary environment 100 in which embodiments of the present disclosure can be implemented is shown. The exemplary environment 100 includes a computing device 110. The computing device 110 can be implemented as one or more computing devices, which at least include a processor, a memory, and other components that are usually present in a general-purpose computer to implement computing, storage, communication, control, and other functions.

[0026] The computing device 110 may obtain an input image 120. Hereinafter, a face image will be described as an example of the input image 120. However, it is easy for those skilled in the art to understand that the input image 120 may be an image of any suitable object to be authenticated or identified, such as a fingerprint image, an iris image, etc.

[0027] The computing device 110 may utilize the trained discriminator 130 to determine the attribute 140 of the input image 120. In some embodiments, the discriminator 130 may be deployed in the computing device 110. Alternatively, the discriminator 130 may also be deployed outside the computing device 110, and the scope of the present disclosure is not limited in this respect. The training process of the discriminator 130 will be described in detail below.

[0028] The attribute 140 may indicate that the input image 120 belongs to one of the following: an original image of a real object (e.g., a real captured face image), an original image of a forged object (e.g., a printed or re-photographed face image), a generated image of a real object (e.g., a generated image that simulates a real captured face image), and a generated image of a forged object (e.g., a generated image that simulates a printed or re-photographed face image). In this way, attack images obtained by various means and original images of real objects can be accurately distinguished, thereby improving the security of the authentication process.

[0029] Figure 2 1 is a flow chart of a method 200 for determining a property of an input image according to some embodiments of the present disclosure. The method 200 may be performed as follows: Figure 1Alternatively, method 200 may also be implemented by other entities besides computing device 110. It should be understood that method 200 may also include additional steps not shown and / or may omit the steps shown, and the scope of the present disclosure is not limited in this respect.

[0030] At 210, the computing device 110 obtains an input image. At 220, the computing device 110 uses the trained discriminator 130 to determine the attribute 140 of the input image 120. The attribute 140 indicates that the input image 120 belongs to one of: an original image about a real object, an original image about a fake object, a generated image about a real object, and a generated image about a fake object.

[0031] The principle that the discriminator 130 can accurately discriminate the attribute 140 of the input image 120 is that it adopts the idea of ​​a generative adversarial network (GAN), and learns and identifies cheating patterns through a game of generation and confrontation, thereby gradually improving the performance of the generator and the discriminator. For this reason, before using the discriminator 130 to discriminate the attribute 140 of the input image 120, the discriminator 130 needs to be trained. Training the discriminator 130 can optimize the model parameters of the discriminator 130 and find the global optimal solution, so that the trained discriminator 130 with optimized model parameters can be used to accurately predict the attribute 140 of the input image 120.

[0032] The training process of the discriminator 130 can be divided into three stages. In the first stage, the discriminator can be trained. In some embodiments, the original training images about the real object (e.g., the real collected face image) and the original training images about the forged object (e.g., the real collected but forged face image, such as the re-photographed or printed face image) can be used as input to train the discriminator. In some embodiments, the images generated by the generator can also be used to train the discriminator. After the discriminator is trained to a certain extent (e.g., the probability that the discriminator correctly identifies the attributes of the training image exceeds the threshold probability), the model parameters of the discriminator can be fixed unchanged.

[0033] In the second stage, the generator can be trained. This solution adopts two generators that can generate inverse attribute images. One generator (hereinafter referred to as the "first generator") can be used to generate simulated images about forged objects (for example, based on the real collected face image to simulate the reprinted or printed face image). Another generator (hereinafter referred to as the "second generator") can be used to generate simulated images about real objects (for example, based on the reprinted or printed face image to simulate the real collected face image). After the two generators are trained to a certain extent, their model parameters can be fixed unchanged. In some embodiments, the training degree of the generator can depend on the loss function. The loss function can include the recognition result loss of the discriminator trained in the previous stage for the image generated by the generator and the reconstruction loss of the original training image.

[0034] Then, the discriminator and the generator can be trained iteratively. To this end, the first stage and the second stage of training can be performed cyclically until the generator can generate high-quality inverse attribute images and the discriminator can effectively distinguish the original training images and the generated inverse attribute images.

[0035] The following will refer to Figure 3-5 The training process of the discriminator 130 is described in detail. Figure 3 FIG. 3 is a flowchart of a method 300 for training the discriminator 130 according to some embodiments of the present disclosure. The method 300 may be performed as follows: Figure 1 Alternatively, method 300 may be implemented by other entities other than computing device 110. It should be understood that method 300 may also include additional steps not shown and / or may omit the steps shown, and the scope of the present disclosure is not limited in this respect. Figure 4-5 Method 300 is described. Figure 4 FIG. 1 is a schematic diagram showing a training initial discriminator 130 according to some embodiments of the present disclosure. Figure 5 A schematic diagram of training a first generator 410 and a second generator 420 according to some embodiments of the present disclosure is shown.

[0036] At 310, computing device 110 obtains original training images 440 about real objects and original training images 450 about forged objects. For example, original training images 440 about real objects may be real captured face images, and original training images 450 about forged objects may be real captured but forged face images, such as copied or printed face images. At 320, computing device 110 trains initial discriminator 130 based on at least original training images 440 about real objects and original training images 450 about forged objects.

[0037] In some embodiments, the images generated by the generator can also be used to train the initial discriminator 130. As described above, the present solution uses two generators that can generate inverse attribute images, namely, a first generator 410 for generating simulated images about a forged object and a second generator 420 for generating simulated images about a real object. Therefore, the images generated by the initial generators may include: a generated image 442 about a forged object generated by the initial first generator 410 based on an original training image 440 about a real object, and a generated image 452 about a real object generated by the initial second generator 420 based on an original training image 450 of a forged object.

[0038] In this case, the discriminator 130 belongs to a multi-task network. On the one hand, the discriminator 130 needs to judge whether the input image is a real original image or a generated image generated by the generator. On the other hand, the discriminator 130 also needs to judge the authenticity of the object in the input image to determine whether it is a real object or a forged object. After the discriminator 130 is trained to a certain extent (for example, the probability that the discriminator 130 correctly identifies the attributes of the input image exceeds a threshold probability), the model parameters of the discriminator 130 can be fixed unchanged.

[0039] At 330 , the computing device 110 trains the first generator 410 and the second generator 420 using the trained discriminator 130 based on the original training image 440 about the real object and the original training image 450 about the fake object to update the trained discriminator 130 .

[0040] In some embodiments, computing device 110 may apply original training image 440 about the real object to first generator 410 to generate first generated image 542 about the forged object. In addition, computing device 110 may also apply original training image 450 about the forged object to second generator 420 to generate second generated image 552 about the real object.

[0041] In this way, four types of images are obtained: original training images 440 of real objects, original training images 450 of forged objects, first generated images 542 of forged objects, and second generated images 552 of real objects. The computing device 110 can train the first generator 410 and the second generator 420 using the trained discriminator 130 based on the four types of images.

[0042] As described above, the degree of training of the generator may depend on the loss function. The loss function may include the recognition result loss of the discriminator trained in the previous stage for the image generated by the generator and the reconstruction loss of the original training image. To this end, in some embodiments, in order to train the first generator 410 and the second generator 420, the computing device 110 may apply the first generated image 542 about the forged object and the second generated image 552 about the real object to the discriminator 130 to determine the recognition result loss (hereinafter referred to as "first loss"). The first loss is associated with the probability that the discriminator 130 correctly judges the attributes of the image. For example, the first loss may indicate the probability that the discriminator 130 incorrectly judges the attributes of the image. In this case, the higher the probability of correct judgment or the lower the probability of incorrect judgment, the smaller the first loss. Thus, the computing device 110 can train the first generator 410 and the second generator 420 based at least on the first loss.

[0043] In addition, in some embodiments, the computing device 110 may also apply the first generated image 542 about the fake object to the second generator 420 to generate a third generated image 544 about the real object, and apply the second generated image 552 about the real object to the first generator 410 to generate a fourth generated image 554 about the fake object. Thus, the computing device 110 may determine a second loss. The second loss is associated with the following two similarities: the similarity between the third generated image 544 about the real object and the original training image 440 about the real object, and the similarity between the fourth generated image 554 about the fake object and the original training image 450 about the fake object. For example, the second loss may indicate the difference between the third generated image 544 about the real object and the original training image 440 about the real object, and between the fourth generated image 554 about the fake object and the original training image 450 about the fake object. In this case, the higher the similarity or the smaller the difference, the smaller the second loss. Thus, the computing device 110 may train the first generator 410 and the second generator 420 based on the first loss and the second loss.

[0044] In some embodiments, the computing device 110 may determine a total loss based on the first loss and the second loss, and train the first generator 410 and the second generator 420 so that the total loss is lower than a threshold loss. For example, the total loss may be determined by the following formula (1):

[0045] L(G f→r ,G r→f ,D)=L gan (G f→r ,G r→f ,D)+λ*L cyc (G f→r ,Gr→f ) (1)

[0046] Among them, L(G f→r ,G r→f ,D) represents the total loss, L gan (G f→r ,G r→f ,D) represents the first loss, L cyc (G f→r ,G r→f ) represents the second loss, and λ represents the weight of the second loss.

[0047] Further, the computing device 110 may train the trained discriminator 130 based on at least the trained first generator 410 and the trained second generator 420. The process of training the trained discriminator 130 is similar to the process of training the initial discriminator 130.

[0048] In some embodiments, the computing device 110 may apply the original training image 440 about the real object to the trained first generator 410 to generate a fifth generated image about the forged object. In addition, the computing device 110 may apply the original training image 450 about the forged object to the trained second generator 420 to generate a sixth generated image about the real object. Thus, the computing device 110 may retrain the trained discriminator 130 based on the original training image 440 about the real object, the original training image 450 about the forged object, the fifth generated image about the forged object, and the sixth generated image about the real object, so that the probability that the discriminator correctly judges the attribute of the image exceeds the threshold probability.

[0049] As described above, the discriminator and the generator can be iteratively trained until the generator can generate high-quality inverse attribute images and the discriminator can effectively distinguish between the original image and the inverse attribute image. The discriminator 130 trained in this way can be used to predict the attributes of the input image, such as Figure 1 In some embodiments, the computing device 110 may also shield the judgment branch of the discriminator 130 as to whether the input image is a real original image or a generated image generated by the generator, so that the discriminator 130 only judges the authenticity of the object in the input image to determine whether it is a real object or a forged object, thereby simplifying the judgment process and improving the judgment efficiency.

[0050] Figure 6 FIG. 6 is a block diagram of an apparatus 600 for image processing according to some embodiments of the present disclosure. For example, the apparatus 600 may be disposed in the computing device 110. Figure 6As shown, the device 600 includes an acquisition module 610, configured to acquire an input image; and a determination module 620, configured to use a trained discriminator to determine the attribute of the input image, the attribute indicating that the input image belongs to one of the following: an original image about a real object, an original image about a forged object, a generated image about a real object, and a generated image about a forged object.

[0051] In some embodiments, the device 600 also includes: an original training image acquisition module, configured to acquire original training images about real objects and original training images about forged objects; an initial discriminator training module, configured to train the initial discriminator based on at least the original training images about real objects and the original training images about forged objects; and a first generator training module, configured to train the first generator and the second generator based on the original training images about real objects and the original training images about forged objects using the trained discriminator to update the trained discriminator.

[0052] In some embodiments, the first generator training module includes: a first generated image generation module, configured to apply an original training image about a real object to a first generator to generate a first generated image about a forged object, and the first generator is used to generate a simulated image about the forged object; a second generated image generation module, configured to apply the original training image about the forged object to a second generator to generate a second generated image about the real object, and the second generator is used to generate a simulated image about the real object; and a second generator training module, configured to train the first generator and the second generator using a trained discriminator based on the original training image about the real object, the original training image about the forged object, the first generated image about the forged object, and the second generated image about the real object.

[0053] In some embodiments, the second generator training module includes: a first loss determination module, configured to apply a first generated image about a fake object and a second generated image about a real object to a trained discriminator to determine a first loss, the first loss indicating a probability that the trained discriminator incorrectly judges an attribute of an image; and a third generator determination module, configured to train the first generator and the second generator based at least on the first loss.

[0054] In some embodiments, the third generator determination module includes: a third generated image generation module, configured to apply the first generated image about the forged object to the second generator to generate a third generated image about the real object; a fourth generated image generation module, configured to apply the second generated image about the real object to the first generator to generate a fourth generated image about the forged object; a second loss determination module, configured to determine a second loss, the second loss indicating the difference between the third generated image about the real object and the original training image about the real object and the fourth generated image about the forged object and the original training image about the forged object; and a fourth generator training module, configured to train the first generator and the second generator based on the first loss and the second loss.

[0055] In some embodiments, the fourth generator training module includes: a fifth generator training module configured to train the first generator and the second generator so that the total loss determined based on the first loss and the second loss is lower than a threshold loss.

[0056] In some embodiments, the device 600 also includes: a fifth generated image generation module, configured to apply the original training image about the real object to the trained first generator to generate a fifth generated image about the forged object; a sixth generated image generation module, configured to apply the original training image about the forged object to the trained second generator to generate a sixth generated image about the real object; and a discriminator training module, configured to train the trained discriminator based on the original training image about the real object, the original training image about the forged object, the fifth generated image about the forged object and the sixth generated image about the real object, so that the probability that the trained discriminator correctly judges the attributes of the image exceeds a threshold probability.

[0057] Figure 7 FIG. 7 is a schematic block diagram of an electronic device 700 that can be used to implement an embodiment of the present disclosure. The device 700 can be used to implement Figure 6 As shown in the figure, the device 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 702 or computer program instructions loaded from a storage unit 708 to a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0058] A number of components in the device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0059] The various processes and processing described above, such as method 200 and / or 300, may be performed by the processing unit 701. For example, in some embodiments, method 200 and / or 300 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed by CPU 701, one or more steps of method 200 and / or 300 described above may be performed. Alternatively, in other embodiments, CPU 701 may be configured to perform method 200 and / or 300 in any other appropriate manner (e.g., by means of firmware).

[0060] The present disclosure may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present disclosure.

[0061] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0062] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0063] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0064] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0065] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0066] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0067] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

[0068] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A method for image processing, characterized in that: The method comprises: obtaining an input image; and A property of the input image is determined using a trained discriminator, the property indicating that the input image belongs to one of the following: an original image of a real object, an original image of a forged object, a generated image of a real object and a generated image of a forged object, wherein the discriminator is trained based on original training images of the real object, original training images of the forged object, generated images of the forged object generated by a first generator and generated images of the real object generated by a second generator, the first generator is used to generate a simulated image of the forged object based on the original image of the real object, and the second generator is used to generate a simulated image of the real object based on the original image of the forged object.

2. The method according to claim 1, further comprising: Obtaining original training images of real objects and original training images of forged objects; Training an initial discriminator based at least on the original training image of the real object and the original training image of the forged object; as well as Based on the original training image about the real object and the original training image about the forged object, the first generator and the second generator are trained using the trained discriminator to update the trained discriminator.

3. The method of claim 2, wherein training the first generator and the second generator comprises: Applying the original training image of the real object to the first generator to generate a first generated image of the forged object; applying the original training image of the forged object to the second generator to generate a second generated image of the real object; as well as The first generator and the second generator are trained using the trained discriminator based on the original training image of the real object, the original training image of the forged object, the first generated image of the forged object, and the second generated image of the real object.

4. The method of claim 3, wherein training the first generator and the second generator comprises: applying the first generated image of the forged object and the second generated image of the real object to the trained discriminator to determine a first loss indicating a probability that the trained discriminator misjudges an attribute of an image; as well as The first generator and the second generator are trained based on at least the first loss.

5. The method of claim 4, wherein training the first generator and the second generator based at least on the first loss comprises: applying the first generated image of the fake object to the second generator to generate a third generated image of the real object; applying the second generated image of the real object to the first generator to generate a fourth generated image of the forged object; determining a second loss indicating a difference between the third generated image regarding the real object and the original training image regarding the real object and between the fourth generated image regarding the forged object and the original training image regarding the forged object; as well as The first generator and the second generator are trained based on the first loss and the second loss.

6. The method of claim 5, wherein training the first generator and the second generator based on the first loss and the second loss comprises: The first generator and the second generator are trained so that a total loss determined based on the first loss and the second loss is below a threshold loss.

7. The method according to claim 2, further comprising: applying the original training image of the real object to the trained first generator to generate a fifth generated image of the forged object; applying the original training image of the forged object to the trained second generator to generate a sixth generated image of the real object; as well as Based on the original training image about the real object, the original training image about the forged object, the fifth generated image about the forged object and the sixth generated image about the real object, the trained discriminator is trained so that the probability that the trained discriminator correctly judges the attribute of the image exceeds a threshold probability.

8. A device for image processing, characterized in that: The device comprises: An acquisition module configured to acquire an input image; and A determination module is configured to use a trained discriminator to determine the attribute of the input image, the attribute indicating that the input image belongs to one of the following: an original image about a real object, an original image about a forged object, a generated image about a real object and a generated image about a forged object, wherein the discriminator is trained based on the original training images about the real object, the original training images about the forged object, the generated images about the forged object generated by a first generator and the generated images about the real object generated by a second generator, the first generator is used to generate a simulated image about the forged object based on the original image about the real object, and the second generator is used to generate a simulated image about the real object based on the original image about the forged object.

9. The apparatus according to claim 8, further comprising: An original training image acquisition module is configured to acquire an original training image of a real object and an original training image of a forged object; an initial discriminator training module, configured to train an initial discriminator based at least on the original training image about the real object and the original training image about the forged object; as well as The first generator training module is configured to train the first generator and the second generator using the trained discriminator based on the original training image about the real object and the original training image about the forged object to update the trained discriminator.

10. The apparatus of claim 9, wherein the first generator training module comprises: A first generated image generation module, configured to apply the original training image about the real object to the first generator to generate a first generated image about the forged object; a second generated image generating module configured to apply the original training image about the forged object to the second generator to generate a second generated image about the real object; as well as The second generator training module is configured to train the first generator and the second generator using the trained discriminator based on the original training image of the real object, the original training image of the forged object, the first generated image of the forged object and the second generated image of the real object.

11. The apparatus of claim 10, wherein the second generator training module comprises: a first loss determination module configured to apply the first generated image about the forged object and the second generated image about the real object to the trained discriminator to determine a first loss indicating a probability that the trained discriminator misjudges an attribute of an image; as well as A third generator determination module is configured to train the first generator and the second generator based on at least the first loss.

12. The apparatus according to claim 11, wherein the third generator determination module comprises: a third generated image generating module configured to apply the first generated image regarding the forged object to the second generator to generate a third generated image regarding the real object; a fourth generated image generating module configured to apply the second generated image regarding the real object to the first generator to generate a fourth generated image regarding the forged object; a second loss determination module configured to determine a second loss indicating a difference between the third generated image about the real object and the original training image about the real object and between the fourth generated image about the forged object and the original training image about the forged object; as well as A fourth generator training module is configured to train the first generator and the second generator based on the first loss and the second loss.

13. The apparatus of claim 12, wherein the fourth generator training module comprises: A fifth generator training module is configured to train the first generator and the second generator so that a total loss determined based on the first loss and the second loss is lower than a threshold loss.

14. The apparatus according to claim 9, further comprising: a fifth generated image generating module configured to apply the original training image about the real object to the trained first generator to generate a fifth generated image about the forged object; a sixth generated image generating module configured to apply the original training image about the forged object to the trained second generator to generate a sixth generated image about the real object; as well as The discriminator training module is configured to train the trained discriminator based on the original training image about the real object, the original training image about the forged object, the fifth generated image about the forged object and the sixth generated image about the real object, so that the probability that the trained discriminator correctly judges the attribute of the image exceeds a threshold probability.

15. An electronic device, comprising: one or more processors; as well as A memory for storing one or more programs, which, when executed by the one or more processors, enables the electronic device to implement the method according to any one of claims 1 to 7.

16. A computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Image processing method and device, computer readable storage medium and electronic device

    CN108615073A

  • A living body detection method and system

    CN109840467A