Counterfeit face detection method based on proximity enhancement and related equipment
By acquiring the frequency domain and airspace proximity information feature maps and performing feature fusion, the problem of low detection accuracy of local forged faces in the prior art is solved, and the recognition accuracy of forged face images is improved, especially in the application in the financial field, the security of identity recognition is enhanced.
Patent Information
- Application Number
- CN202510328608.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2025-07-11
AI Technical Summary
The prior art is difficult to effectively identify face images forged in only some areas, resulting in a reduced accuracy of forged face detection, especially in the financial field, posing a threat to the security of financial transactions.
By acquiring the frequency domain information image of the face image to be identified and the airspace proximity information feature map, the proximity information attention feature map is used to perform feature fusion, and the detection accuracy of local forged features is improved.
On the basis of retaining the airspace and frequency domain information of the face image, the detection accuracy of local forged feature areas is significantly improved, and the recognition ability of forged face images is enhanced.
Smart Images

Figure CN120299071A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure generally relates to the field of face recognition technology, and particularly relates to a forged face detection method and related devices based on proximity enhancement. Background Art
[0002] Deepfake, that is, AI face swapping, has set off a craze on the Internet in recent years. Deepfake is an intelligent processing technology that uses artificial intelligence technology to forge digital content such as audio, images, or videos. Generally, it specifically refers to the tampering of the face area, which can imitate a specific person or make a specific person look like doing a specific thing, and for the human visual effect, it can reach the level of being indistinguishable from the real thing.
[0003] With the development of deep learning technology, the data-driven deepfake generation technology hardly leaves any traces on forged images. Technology is often a double-edged sword. While enriching our entertainment methods and facilitating our lives, it may also quietly affect us. In the financial field, face recognition is usually used to verify user identities. Therefore, it is particularly important to accurately detect forged faces to ensure the authenticity of online financial transactions. Summary of the Invention
[0004] In view of the above-mentioned defects or deficiencies in the prior art, it is desirable to provide a forged face detection method and related devices based on proximity enhancement, which can effectively improve the detection accuracy of forged faces with only partial regions forged by adding proximity information attention feature maps to the fused images.
[0005] In a first aspect, an embodiment of the present application provides a forged face detection method based on proximity enhancement, including:
[0006] Obtaining a frequency domain information image corresponding to the face image to be recognized based on the face image to be recognized;
[0007] Respectively obtaining a spatial domain proximity information feature map corresponding to the face image to be recognized and a frequency domain proximity information feature map corresponding to the frequency domain information image based on the face image to be recognized and the frequency domain information image;
[0008] Performing attention enhancement based on the spatial domain proximity information feature map and the frequency domain proximity information feature map to obtain a proximity information attention feature map;
[0009] Performing feature fusion on the face image to be recognized, the frequency domain information image, and the proximity information attention feature map to obtain a face fused image;
[0010] Detecting the authenticity of the face image to be recognized based on the face fused image.
[0011] In some embodiments, obtaining the frequency-domain information image corresponding to the face image to be recognized based on the face image to be recognized includes:
[0012] Performing frequency-domain feature extraction on the face image to be recognized by using the discrete cosine transform algorithm to obtain a frequency-domain feature extraction image;
[0013] Performing an inverse frequency-domain transform on the filtered frequency-domain feature extraction image to obtain the frequency-domain information image.
[0014] In some embodiments, obtaining the spatial-domain proximity information feature map corresponding to the face image to be recognized based on the face image to be recognized includes:
[0015] Dividing the face image to be recognized into a plurality of first image blocks;
[0016] Constructing a proximity feature block corresponding to each first image block based on the pixel values of each pixel point in each first image block;
[0017] Stitching the plurality of proximity feature blocks corresponding to the plurality of first image blocks according to the spatial positions of the plurality of first image blocks to obtain the spatial-domain proximity information feature map.
[0018] In some embodiments, constructing the proximity feature block corresponding to each first image block based on the pixel values of each pixel point in each first image block includes:
[0019] For each pixel point in the first image block, obtaining a first difference between other pixel points and the pixel point, and constructing a first proximity feature block corresponding to the first image block by using the first difference;
[0020] Obtaining a second difference between each pixel point in the first image block and the pixel average value of the first proximity feature block, and constructing a second proximity feature block corresponding to the first image block by using the second difference;
[0021] Stitching the first proximity feature block and the second proximity feature block into the proximity feature block corresponding to the first image block.
[0022] In some embodiments, performing attention enhancement on the spatial-domain proximity information feature map and the frequency-domain proximity information feature map to obtain a proximity information attention feature map includes:
[0023] Merging the spatial-domain proximity information feature map and the frequency-domain proximity information feature map along the channel direction to obtain a proximity information feature map;
[0024] Performing attention enhancement on the proximity information feature map by using max pooling and average pooling to obtain a proximity information attention feature map.
[0025] In some embodiments, detecting the authenticity of the to-be-recognized face image based on the face fusion image includes:
[0026] Performing feature extraction on the face fusion image to obtain a face fusion feature map;
[0027] Performing local authenticity classification detection for each feature point in the face fusion feature map; and performing authenticity classification detection on the to-be-recognized face image for the face fusion feature map.
[0028] In a second aspect, an apparatus for detecting forged faces based on proximity enhancement provided by an embodiment of the present application includes:
[0029] An acquisition module, configured to acquire a frequency-domain information image corresponding to the to-be-recognized face image based on the to-be-recognized face image;
[0030] A conversion module, configured to respectively acquire a spatial-domain proximity information feature map corresponding to the to-be-recognized face image and a frequency-domain proximity information feature map corresponding to the frequency-domain information image based on the to-be-recognized face image and the frequency-domain information image;
[0031] An enhancement module, configured to perform attention enhancement based on the spatial-domain proximity information feature map and the frequency-domain proximity information feature map to obtain a proximity information attention feature map;
[0032] A fusion module, configured to perform feature fusion on the to-be-recognized face image, the frequency-domain information image, and the proximity information attention feature map to obtain a face fusion image;
[0033] An identification module, configured to detect the authenticity of the to-be-recognized face image based on the face fusion image.
[0034] In a third aspect, an electronic device provided by an embodiment of the present application includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the program, the method described in the embodiment of the present application is implemented.
[0035] In a fourth aspect, a computer-readable storage medium provided by an embodiment of the present application has a computer program stored thereon, and when the program is executed by a processor, the method described in the embodiment of the present application is implemented.
[0036] In a fifth aspect, a computer program product provided by an embodiment of the present application includes a computer program, characterized in that when the computer program is executed by a processor, the method described in the embodiment of the present application is implemented.
[0037] Accordingly, the method for detecting forged faces based on proximity enhancement and related devices proposed in the embodiments of the present application calculate proximity information features based on the face image to be recognized and the frequency domain information image, and use the proximity feature attention mechanism to selectively focus on more important proximity feature maps. Then, the face image to be recognized, the frequency domain information image, and the proximity information attention feature map are fused to obtain a face fusion image, and the authenticity of the face image is recognized based on the face fusion image. On the basis of retaining the spatial and frequency domain information of the face image, the degree of attention to the proximity features between images is greatly improved, so as to effectively identify the locally forged feature regions and improve the detection accuracy of the face image to be recognized.
[0038] Additional aspects and advantages of the present invention will be given in part in the following description, become apparent in part from the following description, or be understood through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Other features, objects, and advantages of the present application will become more apparent by reading the detailed description of the non-limiting embodiments with reference to the following drawings:
[0040] Figure 1 FIG. 1 shows a schematic flow chart of a method for detecting forged faces based on proximity enhancement provided by an embodiment of the present application;
[0041] Figure 2 FIG. 2 shows a schematic principle diagram of a method for detecting forged faces based on proximity enhancement provided by an embodiment of the present application;
[0042] Figure 3 FIG. 3 shows a schematic flow chart of a method for detecting forged faces based on proximity enhancement provided by an embodiment of the present application;
[0043] Figure 4 FIG. 4 shows a schematic structural diagram of a device for detecting forged faces based on proximity enhancement provided by an embodiment of the present application;
[0044] Figure 5 FIG. 5 shows a schematic structural diagram of a computer system of an electronic device or server suitable for implementing the embodiments of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0045] The present application will be further described in detail below with reference to the drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the related invention and are not intended to limit the invention. In addition, it should be noted that for the sake of convenience of description, only the parts related to the invention are shown in the drawings.
[0046] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments may be combined with each other. The following will describe the present application in detail with reference to the drawings and in combination with the embodiments.
[0047] It should also be noted that the acquisition or use of the data in the embodiments of the present application requires the consent of the user, and relevant data can only be obtained after the user authorizes and permits, and the acquisition or use of the data complies with the provisions of relevant laws and regulations.
[0048] With the development of technology, AI face-swapping technology has reached the level of being indistinguishable from the real thing, which poses a great challenge to the technology industry that uses face recognition for identity recognition. Especially for the financial industry, face recognition-based identity recognition also has functions such as the management of financial accounts and transaction confirmation. If fake faces cannot be recognized in time, it is easy to cause irreparable property losses to real users.
[0049] This problem has also been noticed in related technologies, and a technical solution for forging face recognition using spatial domain features and frequency domain features has been proposed. However, today's AI face-swapping technology has developed to the point where only some features in the face can be replaced, such as only replacing some areas such as eyes and noses. For the entire face, the replaced part is very limited, which greatly reduces the accuracy of forgery recognition for the entire face and increases the difficulty of detecting forged faces.
[0050] Based on this, the present application proposes a method and related device for detecting forged faces based on proximity enhancement. By adding a proximity information feature map to the fused image, the detection accuracy of face images forged in only some areas can be effectively improved.
[0051] To further illustrate the technical solutions provided in the embodiments of the present application, the following will describe this in detail in combination with the drawings and specific implementation manners. Although the embodiments of the present application provide the method operation instruction steps shown in the following embodiments or drawings, more or fewer operation instruction steps may be included in the method based on routine or non-creative labor. In steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided in the embodiments of the present application. When the method is actually processed or the device executes, it may be executed in the order shown in the embodiments or drawings or executed in parallel.
[0052] Please refer to Figure 1 , Figure 1 which shows a schematic flowchart of a method for detecting forged faces based on proximity enhancement provided in an embodiment of the present application. As Figure 1 shown, the method includes:
[0053] Step 101, obtaining a frequency domain information image corresponding to the face image to be recognized based on the face image to be recognized.
[0054] It should be noted that the face image to be recognized can be a frontal image, a side image of the user's face image, or at least one face image to be recognized obtained by other systems during the execution of the identity authentication task, and the present application does not make specific limitations.
[0055] Among them, the frequency-domain information image is the information image of the face image to be recognized in the frequency domain, which can reflect the information of the face image to be recognized in the frequency domain and usually can contain some traces of forgery generation.
[0056] In a feasible embodiment, as Figure 2 shown, obtaining the frequency-domain information image corresponding to the face image to be recognized based on the face image to be recognized includes: extracting the frequency-domain features of the face image to be recognized by using the discrete cosine transform algorithm to obtain the frequency-domain feature extraction image; performing inverse frequency-domain transformation on the frequency-domain feature extraction image after filtering to obtain the frequency-domain information image.
[0057] It should be noted that the discrete cosine transform DCT is a mathematical transform used for signal processing and is particularly suitable for analyzing the frequency components in a signal. Compared with the Fourier transform, the DCT is more effective in processing non-periodic data because it can reduce the high-frequency noise caused by boundary discontinuities (such as the Gibbs phenomenon). Through the DCT, the image data of the face to be recognized can be converted into a frequency-domain representation, thereby extracting the frequency features in the image data.
[0058] Furthermore, use Gaussian filtering to perform linear smoothing filtering on the frequency-domain feature extraction image to reduce the noise in the frequency-domain feature extraction image. Then use the inverse frequency-domain transformation to convert the filtered frequency-domain information into the image space, that is, obtain the frequency-domain information image to facilitate subsequent feature extraction and fusion.
[0059] Step 102, respectively obtain the spatial-domain adjacent information feature map corresponding to the face image to be recognized and the frequency-domain adjacent information feature map corresponding to the frequency-domain information image based on the face image to be recognized and the frequency-domain information image.
[0060] That is to say, in the embodiment of the present application, adjacent information feature extraction is respectively performed on the face image to be recognized in the spatial domain and the frequency-domain information image in the frequency domain to obtain the spatial-domain adjacent information feature map corresponding to the face image to be recognized and the frequency-domain adjacent information feature map corresponding to the frequency-domain information image.
[0061] In a feasible embodiment, as Figure 3 shown, obtaining the spatial-domain adjacent information feature map corresponding to the face image to be recognized based on the face image to be recognized includes:
[0062] Step 301, divide the face image to be recognized into multiple first image blocks.
[0063] Exemplarily, assume that the size of the face image F to be recognized is c1×w×h. Then, divide the face image to be recognized into (w / n)×(h / n) image patches of size n×n, and take each image patch as the first image patch corresponding to the face image to be recognized. Each first image patch contains n×n pixel points, and the pixel values are a1, a2, …, a n×n .
[0064] Step 302: Based on the pixel values of each pixel point in each first image patch, construct a neighboring feature patch corresponding to the first image patch.
[0065] Specifically, for each pixel point in the first image patch, obtain the first difference between other pixel points and this pixel point, use the first difference to construct the first neighboring feature patch corresponding to the first image patch, obtain the second difference between each pixel point in the first image patch and the pixel average value of the first neighboring feature patch, use the second difference to construct the second neighboring feature patch corresponding to the first image patch, and splice the first neighboring feature patch and the second neighboring feature patch into the neighboring feature patch corresponding to the first image patch.
[0066] Exemplarily, first based on the first pixel point a1, calculate the first differences a1-a1, a2-a1, …, a n*n -a1 between each pixel point in the first image patch and the first pixel point a1, and form the first neighboring pixel feature patch corresponding to the first pixel point a1 with the pixel differences of each calculation result. And so on, successively using a2, …, a n×n calculate the first neighboring pixel feature patch corresponding to each pixel point, and then splice the first neighboring pixel feature patches corresponding to each pixel point in the first image according to the channel positions to obtain the first neighboring feature patch corresponding to the first image patch, that is, the first neighboring feature patch composed of n×n neighboring pixel feature patches.
[0067] Further, obtain the pixel average value a avg of the first neighboring feature patch, and obtain the second differences a1-a avg , a2-a avg , …, a n*n -a avg between each pixel point in the first image patch and the pixel average value, to obtain the second neighboring feature patch composed of the second differences. Finally, splice the first neighboring feature patch and the second neighboring feature patch to obtain the neighboring feature patch corresponding to the first image patch, with a size of (n×n + 1)×n×n.
[0068] And so on, obtain multiple neighboring feature patches corresponding to multiple first image patches corresponding to the face image to be recognized.
[0069] Step 303: Stitch the multiple adjacent feature blocks corresponding to the multiple first image blocks according to the spatial positions of the multiple first image blocks to obtain a spatial domain adjacent information feature map.
[0070] Among them, the size of the stitched spatial domain adjacent information feature map is (n×n + 1)×c1×w×h.
[0071] It should be noted that the same processing method can be used to obtain the frequency domain adjacent information feature map corresponding to the frequency domain information image based on the frequency domain information image. Exemplarily, the frequency domain information image is divided into multiple second image blocks, and based on the pixel values of each pixel point in each second image block, the adjacent feature blocks of the second image block are constructed. The multiple adjacent feature blocks corresponding to the multiple second image blocks are stitched according to the spatial positions of the multiple second image blocks to obtain a spatial domain adjacent information feature map with a size of (n×n + 1)×c2×w×h.
[0072] Step 103: Perform attention enhancement based on the spatial domain adjacent information feature map and the frequency domain adjacent information feature map to obtain an adjacent information attention feature map.
[0073] Specifically, the spatial domain adjacent information feature map and the frequency domain adjacent information feature map are merged along the channel direction to obtain an adjacent information feature map; the adjacent information feature map is subjected to attention enhancement using max pooling and average pooling to obtain an adjacent information attention feature map.
[0074] Exemplarily, when the spatial domain adjacent information feature map and the frequency domain adjacent information feature map are merged along the channel direction, an adjacent information feature map with a size of (n×n + 1)×(c1 + c2)×w×h is obtained, where the number of channels is (n×n + 1)×(c1 + c2). In this application, to select and focus on more important adjacent information channels, a channel attention mechanism is adopted for the adjacent information feature map, that is, max pooling and average pooling are respectively performed on each channel feature map (i.e., a feature map with a size of 1×w×h) to obtain a feature vector with a size of (n×n + 1)×(c1 + c2)×2. Then, through a fully connected layer and an activation function (such as sigmoid), an attention vector with a size of (n×n + 1)×(c1 + c2)×1×1 is obtained. Finally, the attention vector is multiplied by the adjacent information feature map to obtain an adjacent information attention feature map.
[0075] Step 104: Perform feature fusion on the face image to be recognized, the frequency domain information image, and the adjacent information attention feature map to obtain a face fusion image.
[0076] Specifically, it can be as Figure 2As shown, the face image to be recognized, the frequency domain information image, and the adjacent information attention feature map are subjected to feature fusion. Preferably, a splicing method along the channel direction can be adopted, or the face image to be recognized, the frequency domain information image, and the adjacent information attention feature map are first dimensionally elevated and then dimensionally reduced before splicing to obtain a face fusion image.
[0077] Step 105: Based on the face fusion image, detect the authenticity of the face image to be recognized.
[0078] Specifically, after obtaining the face fusion image, a convolutional neural network is used to extract features from the face fusion image, and then a classifier is used to classify each feature point, that is, to determine whether the feature point is a forged image, and whether the face image to be recognized is a forged image is obtained according to the weighted sum of all feature points.
[0079] Among them, the convolutional neural network is a feature extraction network including but not limited to VGG, GoogleNet, Xception, ResNet, MobileNet, ShuffleNet, etc. The weights corresponding to each feature point can be set according to the type of each feature point, and the present application does not make specific limitations. Exemplarily, the weights corresponding to the edges or feature points of each organ can be increased. When the local classification result of at least one edge point of an organ is false, it is determined that the face image to be recognized is a forged image.
[0080] Thus, the forged face detection method based on adjacent enhancement proposed in the embodiment of the present application calculates adjacent information features based on the face image to be recognized and the frequency domain information image, uses the adjacent feature attention mechanism to selectively focus on more important adjacent feature maps, and then fuses the face image to be recognized, the frequency domain information image, and the adjacent information attention feature map to obtain a face fusion image, and performs authenticity recognition of the face image based on the face fusion image. On the basis of retaining the spatial domain and frequency domain information of the face image, the degree of attention to the adjacent features between images is greatly improved, so as to effectively identify the locally forged feature regions and improve the detection accuracy of the face image to be recognized.
[0081] It should be noted that although the operations of the method of the present invention are described in a specific order in the drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result.
[0082] Figure 4 The structural schematic diagram of a forged face detection device based on adjacent enhancement provided by an embodiment of the present application is shown.
[0083] As Figure 4 shown, the forged face detection device 10 based on adjacent enhancement includes:
[0084] An acquisition module 11, configured to acquire a frequency-domain information image corresponding to the to-be-recognized face image based on the to-be-recognized face image;
[0085] A conversion module 12, configured to respectively acquire a spatial-domain neighboring information feature map corresponding to the to-be-recognized face image and a frequency-domain neighboring information feature map corresponding to the frequency-domain information image based on the to-be-recognized face image and the frequency-domain information image;
[0086] An enhancement module 13, configured to perform attention enhancement based on the spatial-domain neighboring information feature map and the frequency-domain neighboring information feature map to obtain a neighboring information attention feature map;
[0087] A fusion module 14, configured to perform feature fusion on the to-be-recognized face image, the frequency-domain information image, and the neighboring information attention feature map to obtain a face fusion image;
[0088] An identification module 15, configured to detect the authenticity of the to-be-recognized face image based on the face fusion image.
[0089] In some embodiments, the acquisition module 11 is further configured to:
[0090] Perform frequency-domain feature extraction on the to-be-recognized face image by using a discrete cosine transform algorithm to obtain a frequency-domain feature extraction image;
[0091] Perform inverse frequency-domain transformation on the filtered frequency-domain feature extraction image to obtain the frequency-domain information image.
[0092] In some embodiments, the conversion module 12 is further configured to:
[0093] Divide the to-be-recognized face image into a plurality of first image blocks;
[0094] Construct a neighboring feature block corresponding to each first image block based on the pixel values of each pixel point in each first image block;
[0095] Stitch the plurality of neighboring feature blocks corresponding to the plurality of first image blocks according to the spatial positions of the plurality of first image blocks to obtain the spatial-domain neighboring information feature map.
[0096] In some embodiments, the conversion module 12 is further configured to:
[0097] For each pixel point in the first image block, obtain a first difference between other pixel points and the pixel point, and construct a first neighboring feature block corresponding to the first image block by using the first difference;
[0098] Obtain a second difference between each pixel point in the first image block and the pixel average value of the first neighboring feature block, and construct a second neighboring feature block corresponding to the first image block by using the second difference;
[0099] Concatenate the first neighboring feature block and the second neighboring feature block into a neighboring feature block corresponding to the first image block.
[0100] In some embodiments, the enhancement module 13 is further configured to:
[0101] Merge the spatial domain neighboring information feature map and the frequency domain neighboring information feature map along the channel direction to obtain a neighboring information feature map;
[0102] Perform attention enhancement on the neighboring information feature map by using max pooling and average pooling to obtain a neighboring information attention feature map.
[0103] In some embodiments, the recognition module 15 is further configured to:
[0104] Extract features from the face fusion image to obtain a face fusion feature map;
[0105] Perform local authenticity classification detection on each feature point in the face fusion feature map; and perform authenticity classification detection on the to-be-recognized face image for the face fusion feature map.
[0106] It should be understood that the various modules described in the forged face detection device 10 based on neighboring enhancement or the features of the modules and the reference Figure 1 The described method steps correspond one by one. Therefore, the operations and features described above for the method also apply to the forged face detection device 10 based on neighboring enhancement and the modules included therein, and will not be repeated here. The forged face detection device 10 based on neighboring enhancement can be pre-implemented in the browser or other security applications of an electronic device, or can be loaded into the browser or its security application of the electronic device by means of downloading, etc. The corresponding modules in the forged face detection device 10 based on neighboring enhancement can cooperate with the modules in the electronic device to implement the solutions of the embodiments of the present application.
[0107] Regarding the several modules or units mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of the two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0108] Next, refer to Figure 5 , Figure 5The figure shows a schematic structural diagram of a computer system of an electronic device or a server suitable for implementing the embodiments of the present application.
[0109] As Figure 5 shown, the computer system includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 502 or the program loaded from the storage section 508 into the random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation instructions of the system are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. The input / output (I / O) interface 505 is also connected to the bus 504.
[0110] The following components are connected to the I / O interface 505; the input section 506 including a keyboard, a mouse, etc.; the output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and speakers, etc.; the storage section 508 including a hard disk, etc.; and the communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. The drive 510 is also connected to the I / O interface 505 as required. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as required, so that the computer program read from it can be installed into the storage section 508 as required.
[0111] Specifically, according to the embodiments of the present application, the process described above with reference to the flowchart Figure 2 can be implemented as a computer software program. For example, the embodiments of the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program codes for executing the method shown in the flowchart. In such an embodiment, the computer program contains program codes for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication section 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above functions defined in the system of the present application are executed.
[0112] It should be noted that the computer-readable medium shown in this application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of a computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, 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), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this application, a computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in conjunction with an instruction execution system, apparatus, or device. And in this application, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which the computer-readable program code is carried. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, and this computer-readable medium can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0113] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operation instructions of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram can represent a module, a program segment, or a part of code, and the foregoing module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two connected blocks can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operation instructions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0114] The units or modules involved in the embodiments described in this application can be implemented in software or in hardware. The described units or modules can also be provided in a processor. For example, it can be described as: a processor includes an acquisition module, a conversion module, an enhancement module, a fusion module, and an identification module. Among them, the names of these units or modules do not constitute a limitation to the units or modules themselves in some cases. For example, the acquisition module can also be described as "acquiring the frequency-domain information image corresponding to the to-be-identified face image based on the to-be-identified face image".
[0115] As another aspect, this application also provides a computer-readable storage medium. The computer-readable storage medium can be included in the electronic device described in the above embodiments, or can exist alone without being assembled into the electronic device. The above computer-readable storage medium stores one or more programs, and when the above programs are executed by one or more processors, they are used to implement the forgery face detection method based on proximity enhancement described in this application.
[0116] The above description is only a preferred embodiment of this application and an explanation of the technical principles applied. Those skilled in the art should understand that the scope of disclosure involved in this application is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the foregoing disclosure concept. For example, the technical solutions formed by mutually replacing the above features with the (but not limited to) technical features with similar functions disclosed in this application.
Claims
1. A forged face detection method based on proximity enhancement, characterized in that Comprising: Obtaining a frequency-domain information image corresponding to the to-be-identified face image based on the to-be-identified face image; Respectively based on the to-be-identified face image and the frequency-domain information image, obtaining a spatial-domain adjacent information feature map corresponding to the to-be-identified face image and a frequency-domain adjacent information feature map corresponding to the frequency-domain information image; Performing attention enhancement based on the spatial-domain adjacent information feature map and the frequency-domain adjacent information feature map to obtain an adjacent information attention feature map; Performing feature fusion on the to-be-identified face image, the frequency-domain information image, and the adjacent information attention feature map to obtain a face fusion image; Based on the face fusion image, detecting the authenticity of the to-be-identified face image.
2. The method for detecting forged human faces based on proximity enhancement according to claim 1, wherein The obtaining a frequency-domain information image corresponding to the to-be-identified face image based on the to-be-identified face image includes: Performing frequency-domain feature extraction on the to-be-identified face image by using a discrete cosine transform algorithm to obtain a frequency-domain feature extraction image; Performing frequency-domain inverse transformation on the frequency-domain feature extraction image after filtering to obtain the frequency-domain information image.
3. The method for detecting forged human faces based on proximity enhancement according to claim 1, characterized in that The obtaining a spatial-domain adjacent information feature map corresponding to the to-be-identified face image based on the to-be-identified face image includes: Dividing the to-be-identified face image into a plurality of first image blocks; Constructing an adjacent feature block corresponding to the first image block based on the pixel values of each pixel point in each first image block; Stitching the plurality of adjacent feature blocks corresponding to the plurality of first image blocks according to the spatial positions of the plurality of first image blocks to obtain the spatial-domain adjacent information feature map.
4. The forgery face detection method based on proximity enhancement according to claim 3, characterized in that, The constructing an adjacent feature block corresponding to the first image block based on the pixel values of each pixel point in each first image block includes: For each pixel point in the first image block, obtaining a first difference between other pixel points and the pixel point, and constructing a first adjacent feature block corresponding to the first image block by using the first difference; Obtaining a second difference between each pixel point in the first image block and the pixel average value of the first adjacent feature block, and constructing a second adjacent feature block corresponding to the first image block by using the second difference; Stitching the first adjacent feature block and the second adjacent feature block into an adjacent feature block corresponding to the first image block.
5. The method for detecting forged faces based on proximity enhancement according to claim 1, wherein The performing attention enhancement based on the spatial-domain adjacent information feature map and the frequency-domain adjacent information feature map to obtain an adjacent information attention feature map includes: Merging the spatial-domain adjacent information feature map and the frequency-domain adjacent information feature map along the channel direction to obtain an adjacent information feature map; Performing attention enhancement on the adjacent information feature map by using max pooling and average pooling to obtain an adjacent information attention feature map.
6. The method for detecting forged faces based on proximity enhancement according to claim 1, wherein The detecting the authenticity of the to-be-identified face image based on the face fusion image includes: Performing feature extraction on the face fusion image to obtain a face fusion feature map; Performing local authenticity classification detection for each feature point in the face fusion feature map; and performing authenticity classification detection on the to-be-identified face image for the face fusion feature map.
7. A forged face detection device based on proximity enhancement, characterized in that, Comprising: An acquisition module, configured to acquire a frequency-domain information image corresponding to the to-be-recognized face image based on the to-be-recognized face image; A conversion module, configured to respectively acquire a spatial-domain adjacent information feature map corresponding to the to-be-recognized face image and a frequency-domain adjacent information feature map corresponding to the frequency-domain information image based on the to-be-recognized face image and the frequency-domain information image; An enhancement module, configured to perform attention enhancement based on the spatial-domain adjacent information feature map and the frequency-domain adjacent information feature map to obtain an adjacent information attention feature map; A fusion module, configured to perform feature fusion on the to-be-recognized face image, the frequency-domain information image, and the adjacent information attention feature map to obtain a face fusion image; A recognition module, configured to detect the authenticity of the to-be-recognized face image based on the face fusion image.
8. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that When the processor executes the program, it implements the forgery face detection method based on adjacent enhancement as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the forgery face detection method based on adjacent enhancement as described in any one of claims 1-6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the forgery face detection method based on adjacent enhancement as described in any one of claims 1-6.