Generated face image identification method and system based on high-frequency information
By using high -frequency information in the identification of adult face images, the Fourier transformation and high -pass filtering are used to extract high -frequency information, and the classification network is used to identify. The problem has achieved the identification effect of high accuracy and strong generalization capabilities.
Patent Information
- Application Number
- CN202411246420.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2025-01-28
AI Technical Summary
In the identification of the generated face image, the existing technology has problems such as different data set quality, poor multimodal feature combination, and poor generalization capabilities of the model, making it difficult to effectively distinguish between real and generated face images.
Adopt a method of identifying the face image of racial face -based information, to extract high -frequency information of face images through discrete Fourier transformation and Qualcomm filtering, combined with classification networks to identify, and use high -frequency information in the category of high -frequency information. The characteristics of low correlation to improve the accuracy of identification.
It improves the accuracy and generalization ability of raising face image identification, can effectively distinguish between real and generated face images, and has a high ability to identify high -quality human face images generated by different generation methods.
Smart Images

Figure CN119380383A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of facial image identification, and in particular relates to a method and system for generating facial image identification based on high-frequency information. Background Art
[0002] With the widespread application of face recognition technology, face-based identity authentication has become more and more common. However, with the development of technology, the methods of generating face images are also constantly improving, such as deep fake technology (DeepFake) and other image synthesis technologies. The illegal application of face generation technology will have a bad impact on social stability, personal reputation and even national security. Therefore, the identification of generated face images has become a difficult point and research hotspot in the field of computer vision. With the promotion and application of generated face identification methods in the security field, the technology of generating faces is also constantly developing. At present, the research in this field is based on traditional face recognition and image classification technology. By building a deep learning network to distinguish real faces from generated faces, there are problems such as uneven data set quality, how to effectively combine multimodal features, and poor model generalization ability. In order to meet these challenges, a method that can effectively distinguish between real and generated face images is needed. Summary of the invention
[0003] In view of the above technical problems, the present invention proposes a method for generating a facial image identification based on high-frequency information, the method comprising the following steps:
[0004] S1: Establish a real face image dataset and generate a face image dataset as a training set;
[0005] S2: performing discrete Fourier transform on the original face images in the real face image dataset and the generated face image dataset to obtain face image spectra, performing high-pass filtering on the face image spectra, and then performing inverse Fourier transform to obtain high-frequency information face image data;
[0006] S3: preprocessing the high-frequency information face image data to obtain a high-frequency information face image grayscale image;
[0007] S4: Select a classification network, use the high-frequency information face image grayscale image of S3 as the input of the classification network, and train the classification network into a discrimination network;
[0008] S5: For any facial image to be identified, obtain high-frequency information facial image data according to S1-S3, and input the high-frequency information facial image data into the identification network according to S4, and judge whether the facial image to be identified is a generated facial image based on the discrimination result output by the identification network.
[0009] The present invention also proposes a system for generating facial image identification based on high-frequency information, the system comprising:
[0010] The high-frequency information face image module performs discrete Fourier transform on the face image to obtain its spectrum, performs high-pass filtering on the spectrum, and then performs inverse Fourier transform to obtain the high-frequency information face image;
[0011] The image preprocessing module performs grayscale normalization processing on the obtained high-frequency information face image until the pixel value of each pixel is within the range of 0-255 to obtain a grayscale image;
[0012] The image probability distribution acquisition module calculates the histogram of the feature vector output by the network, normalizes the histogram to obtain the probability distribution, and obtains the probability distribution information of the real high-frequency face image and the generated high-frequency face image respectively;
[0013] The prediction module is used to identify the face image. The high-frequency information face image of the input face image is input into the classification network to obtain the features of the high-frequency information face image. The histogram of the feature vector of the high-frequency information face image is calculated and normalized to obtain the probability distribution. A discrimination probability indicating whether the image is a generated image is output, and whether the input image is a generated face image is determined based on the discrimination probability.
[0014] The technical solution of the present invention has the following advantages:
[0015] 1. Extract high-frequency information of face images. This high-frequency information has high intra-class correlation and low inter-class correlation, has good separability, and has a high accuracy rate in identifying generated face images;
[0016] 2. The probability distribution difference between the real high-frequency information face image and the generated high-frequency information face image is compared to better reflect the difference between the real and fake images;
[0017] 3. When the training set and test set are based on different databases, compared with some classic algorithms, it has high accuracy and strong generalization ability, and will not be affected by changes in the forgery method. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 :Generate a flow chart of a method and system for identifying a face image;
[0019] Figure 2 : Real face image dataset;
[0020] Figure 3 : Generate face image dataset;
[0021] Figure 4 : The original image of a real face and its high-frequency information face image, (a) is the original image of a real face, (b) is the high-frequency information face image;
[0022] Figure 5 : Generate high-frequency information face images, (a) is the DCGAN method to generate high-frequency information face images, (b) is the ProGAN method to generate high-frequency information face images, (c) is the StarGAN method to generate high-frequency information face images, (d) is the DeepFake method to generate high-frequency information face images, (e) is the StyleGAN method to generate high-frequency information face images;
[0023] Figure 6 : Probability distribution diagram of high-frequency information of real face images; (a) is the probability distribution of the original image, (b) is the probability distribution of the high-frequency information image;
[0024] Figure 7 : Probability distribution diagram of generated face images; (a) is the probability distribution of the original image generated by DCGAN, (b) is the probability distribution of the high-frequency information of the image generated by DCGAN, (c) is the probability distribution of the original image generated by ProGAN, (d) is the probability distribution of the high-frequency information of the image generated by ProGAN, (e) is the probability distribution of the original image generated by StarGAN, (f) is the probability distribution of the high-frequency information of the image generated by StarGAN, (g) is the probability distribution of the original image generated by DeepFake, (h) is the probability distribution of the high-frequency information of the image generated by DeepFake, (i) is the probability distribution of the original image generated by StyleGAN, (j) is the probability distribution of the high-frequency information of the image generated by StyleGAN;
[0025] Figure 8 : A structural block diagram of a facial image identification system based on high-frequency information. DETAILED DESCRIPTION
[0026] First, the following terms of the present invention are explained and illustrated.
[0027] ResNet50 is a deep convolutional neural network based on the residual network architecture.
[0028] The following examples further illustrate the content of the present invention, but should not be construed as limiting the present invention. Without departing from the spirit and substance of the present invention, modifications or substitutions made to the methods, steps or conditions of the present invention all fall within the scope of the present invention.
[0029] Some solutions include Figure 1 The following steps are shown:
[0030] S1: Establish a real face image dataset and generate a face image dataset as a training set;
[0031] S2: performing discrete Fourier transform on the original face images in the real face image dataset and the generated face image dataset to obtain face image spectra, performing high-pass filtering on the face image spectra, and then performing inverse Fourier transform to obtain high-frequency information face image data;
[0032] S3: preprocessing the high-frequency information face image data to obtain a high-frequency information face image grayscale image;
[0033] S4: Select a classification network, use the high-frequency information face image grayscale image of S3 as the input of the classification network, and train the classification network into a discrimination network;
[0034] S5: For any facial image to be identified, obtain high-frequency information facial image data according to S1-S3, and input the high-frequency information facial image data into the identification network according to S4, and judge whether the facial image to be identified is a generated facial image based on the discrimination result output by the identification network.
[0035] Based on the above scheme, in some specific schemes, the real face image dataset is Figure 2 The CelebAMask-HQ dataset shown in the figure generates a face image dataset such as Figure 3 , including facial images generated using methods such as DCGAN, ProGAN, StarGAN, StyleGAN, and DeepFake. Figure 3 The high-frequency information face images generated by the face image dataset are as follows Figure 5 .
[0036] Based on the above scheme, the specific steps of S2 of some specific schemes are:
[0037] S21: performing discrete Fourier transform on the original face image to obtain a face image spectrum, and moving the center of the face image spectrum to the center of the image;
[0038] S22 creates a mask with the same size as the image and sets the center area of the mask to 1;
[0039] S23 multiplies the mask by the face image spectrum to obtain low-frequency information, then inverts the mask and multiplies it by the face image spectrum to obtain high-frequency information, and then performs inverse Fourier transform on the high-frequency information to obtain the high-frequency information face image data. The specific real face original image and its high-frequency information face image are as follows: Figure 4 .
[0040] Based on the above scheme, some specific preprocessing steps of Scheme S3 are:
[0041] S31 uses bilinear interpolation to scale the low-resolution high-frequency information face image data to 256 on the short side and maintain the same aspect ratio as the original image;
[0042] S32 maintains the original resolution of the high-frequency information face image data with high resolution, and performs center cropping of all face image data to 224*224;
[0043] S33 performs grayscale normalization processing on all high-frequency information facial image data until each pixel value is within the range of 0-255, thereby obtaining the high-frequency information facial image grayscale image.
[0044] Based on the above scheme, S4 specifically includes the following steps:
[0045] S41 uses ResNet50 as the classification network, and the input channel parameter of its first layer of convolution is 1;
[0046] The classification network in S42 receives a high-frequency information face image as input, changes the fully connected layer, sets the classification category to 2, outputs the discrimination probability of whether the corresponding image is generated, and determines whether the input image is a generated face image based on the discrimination probability.
[0047] S4 also includes the following steps: before the fully connected layer, the histogram is calculated according to the feature vector output by the classification network, the histogram is normalized to obtain the probability distribution, and the probability distribution of the high-frequency information face image of the real face image is obtained respectively ( Figure 6 ) and the probability distribution of high-frequency information face images generated by face images ( Figure 7 ).
[0048] Based on a specific embodiment of the above scheme S42, the discriminant network outputs a discriminant probability value for the image to be discriminated. If the discriminant probability value exceeds 50%, the image to be discriminated is judged to be a generated face image; otherwise, the image to be discriminated is judged to be a real face image.
[0049] Some solutions based on the above solutions have been proposed, such as Figure 8 A system for generating facial image identification based on high-frequency information, the system comprising:
[0050] The high-frequency information face image module performs discrete Fourier transform on the face image to obtain its spectrum, performs high-pass filtering on the spectrum, and then performs inverse Fourier transform to obtain the high-frequency information face image;
[0051] The image preprocessing module performs grayscale normalization processing on the obtained high-frequency information face image until the pixel value of each pixel is within the range of 0-255 to obtain a grayscale image;
[0052] The image probability distribution acquisition module calculates the histogram of the feature vector output by the network, normalizes the histogram to obtain the probability distribution, and obtains the probability distribution information of the real high-frequency face image and the generated high-frequency face image respectively;
[0053] The prediction module is used to identify the face image. The high-frequency information face image of the input face image is input into the classification network to obtain the features of the high-frequency information face image. The histogram of the feature vector of the high-frequency information face image is calculated and normalized to obtain the probability distribution. A discrimination probability indicating whether the image is a generated image is output, and whether the input image is a generated face image is determined based on the discrimination probability.
[0054] Using the method and / or system for identifying generated facial images based on high-frequency information proposed in the present invention, the method of the present invention is to use a variety of face generation methods to form a generated facial image data set, and use the facial images generated by DCGAN as a training set, and use the facial images generated by ProGAN, StarGAN, StyleGAN, and Deepfake for testing, and obtain the results in Table 1. It can be seen that even for the facial images generated by StyleGAN with high quality and high resolution, the identification can achieve a high accuracy rate.
[0055] Table 1. Accuracy of the face image identification method generated by the present invention
[0056]
[0057]
[0058] The following two embodiments based on the above solution are used to explain the technical solution of the present invention in more detail.
[0059] Example 1
[0060] Embodiment 1 of the present invention provides a method and system for generating facial image identification based on high-frequency information, such as Figure 1 As shown, the identification method includes:
[0061] S1: Get real and generated face image datasets, such as Figure 2 As shown, it is the real face dataset CelebAMask-HQ, such as Figure 3 As shown, face generation methods such as DCGAN, ProGAN, StarGAN, StyleGAN, and DeepFake are used to generate face datasets;
[0062] S2: Perform discrete Fourier transform (DFT) on the face image in the dataset to obtain the spectrum of the face image, move the center of the spectrum to the center of the image, create a mask with the same size as the image, and set it to 1 (low-frequency area) in the center area, apply the mask to the spectrum to obtain the low-frequency part, then invert the mask and apply it to the spectrum to obtain the high-frequency part, and then perform inverse Fourier transform on the high-frequency part to obtain the high-frequency information face image, such as Figure 4 ;
[0063] S3: Preprocess the input high-frequency face image. For the lower-resolution image, use bilinear interpolation to scale the image to 256 on the short side and have the same aspect ratio. For the high-resolution image, keep the same resolution, then crop the center to 224*224, and then perform grayscale normalization until each pixel value is in the range of 0-255 to obtain a grayscale image.
[0064] S4: Use the ResNet50 classification network to generate a facial image identification network. Use the real face dataset in step S1 and the face images generated by a method in the generated face dataset as training datasets. The input channel parameter of the first convolution layer of the network is set to 1. The high-frequency image obtained in steps S1-S3 is received as the input of the network. The histogram of the output feature vector is calculated before the fully connected layer, and the histogram is normalized to obtain the probability distribution. The process of calculating the probability distribution does not participate in the gradient backpropagation. Finally, change the fully connected layer, set the classification category to 2, output the discrimination probability of whether the corresponding image is generated, and determine whether the input image is a generated face image based on the discrimination probability.
[0065] S5: Use face images generated by other methods as test data sets, input them into the network, and obtain the discrimination results.
[0066] Example 2
[0067] Embodiment 2 of the present invention provides a system for generating a facial image identification system based on high-frequency information, such as Figure 8 As shown, the identification system includes:
[0068] The high-frequency information face module 1 is used to obtain a high-frequency image of a face image, wherein the high-frequency image of the face image is obtained by performing a discrete Fourier transform (DFT) on the face image in the data set to obtain the spectrum of the face image, moving the center of the spectrum to the center of the image, creating a mask with the same size as the image, and setting it to 1 (low-frequency area) in the center area, applying the mask to the spectrum to obtain the low-frequency part, then inverting the mask and applying it to the spectrum to obtain the high-frequency part, and then performing an inverse Fourier transform on the high-frequency part to obtain the high-frequency information face image;
[0069] The image preprocessing module 2 is used to perform grayscale normalization processing on the obtained high-frequency image until the pixel value of each pixel is within the range of 0-255, thereby obtaining a grayscale image;
[0070] The image probability distribution acquisition module 3 is used to obtain the probability distribution information corresponding to the high-frequency images of the real and generated faces, calculate the histogram of the feature vector output by the network, normalize the histogram to obtain the probability distribution, and obtain the probability distribution information of the real high-frequency face image and the generated high-frequency face image respectively;
[0071] Prediction module 4 is used to identify the input face image, input the high-frequency information face image of the face image into the classification network, select ResNet50 as the classification network, and output the discrimination probability of the high-frequency image, indicating whether the image is a generated image;
[0072] Using the method and / or system for identifying generated facial images based on high-frequency information proposed in the present invention, the method of the present invention is to use a variety of face generation methods to form a generated facial image data set, and use the facial images generated by DCGAN as a training set, and use the facial images generated by ProGAN, StarGAN, StyleGAN, and Deepfake for testing, and obtain the results in Table 1. It can be seen that even for the facial images generated by StyleGAN with high quality and high resolution, the identification can achieve a high accuracy rate.
[0073] Some solutions propose a computer-readable storage medium having a computer program / instruction stored thereon, which implements all the steps of the above solutions when the computer program / instruction is executed by a processor.
[0074] A computer program (which may also be referred to or described as a program, software, software application, module, software module, script or code) may be written in any form of programming language, including compiled or interpreted languages or declarative or procedural languages, and the computer program may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment. A computer program may, but need not, correspond to a file in a file system. A program may be stored in a portion of a file that stores other programs or data, for example, one or more scripts stored in the following: in a markup language document; in a single file dedicated to a related program; or in multiple collaborative files, for example, files storing one or more modules, subroutines or code portions. A computer program may be deployed to execute on one or more computers, the computers being located in one place or distributed to multiple locations and interconnected by a communication network.
[0075] The computer suitable for implementing the computer program includes and exemplarily can be based on a general-purpose microprocessor or a special-purpose microprocessor or both of the above-mentioned processors, or any other kind of central processing unit. Generally, the central processing unit will receive instructions and data from a read-only memory or a random access memory or both. The main element of the computer is a central processing unit for running or executing instructions and one or more memory devices for storing instructions and data. Generally, the computer will also include or be operably coupled to receive data from one or more large-capacity storage devices for storing data or transfer data to the large-capacity storage device, or receive and transfer both, and the large-capacity storage device is, for example, a magnetic disk, a magneto-optical disk or an optical disk. However, the computer does not necessarily have such a device. In addition, the computer can be embedded in another device, for example, a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver or a removable storage device, for example, a universal serial bus (USB) flash drive, etc. Computer readable media suitable for storing computer program instructions and data include all forms of nonvolatile memory, media and memory devices, including, as examples: semiconductor memory devices, such as EPROM, EEPROM and flash memory devices; magnetic disks, such as internal hard disks or removable disks; magneto-optical disks; CD-ROM and DVD-ROM disks. The processor and memory may be supplemented by or incorporated into a special purpose logic circuit.
[0076] Although this specification contains many specific implementation details, these should not be interpreted as limitations on the scope of any invention or the scope of what can be claimed, but rather as an illustration of features that can concretize a particular embodiment of a particular invention. The specific features described in this specification in the context of independent embodiments can also be implemented in combination with a single embodiment. Conversely, the various features described in the context of a single embodiment can also be implemented independently in multiple embodiments, or in any suitable sub-combination. In addition, although the features can be described above as a combination effect and even initially required, one or more features from the required combination can be removed from the combination in some cases, and the required combination can be turned to a sub-combination or a variation of the sub-combination.
Claims
1. A method for generating facial image identification based on high-frequency information, characterized in that: The method comprises the following steps: S1: Establish a real face image dataset and generate a face image dataset as a training set; S2: performing discrete Fourier transform on the original face images in the real face image dataset and the generated face image dataset to obtain face image spectra, performing high-pass filtering on the face image spectra, and then performing inverse Fourier transform to obtain high-frequency information face image data; S3: preprocessing the high-frequency information face image data to obtain a high-frequency information face image grayscale image; S4: Select a classification network, use the high-frequency information face image grayscale image of S3 as the input of the classification network, and train the classification network into a discrimination network; S5: For any facial image to be identified, obtain high-frequency information facial image data according to S1-S3, and input the high-frequency information facial image data into the identification network according to S4, and judge whether the facial image to be identified is a generated facial image based on the discrimination result output by the identification network.
2. The method for generating facial image identification based on high-frequency information according to claim 1, characterized in that: The real face image dataset of S1 is the CelebAMask-HQ dataset.
3. The method for generating facial image identification based on high-frequency information according to claim 1, characterized in that: The generated facial image dataset includes facial images generated using methods such as DCGAN, ProGAN, StarGAN, StyleGAN, and DeepFake.
4. According to the method for generating facial image identification based on high-frequency information in claim 1, the specific steps of S2 are: S21: performing discrete Fourier transform on the original face image to obtain a face image spectrum, and moving the center of the face image spectrum to the center of the image; S22 creates a mask with the same size as the image and sets the center area of the mask to 1; S23 multiplies the mask by the face image spectrum to obtain low-frequency information, inverts the mask and multiplies it by the face image spectrum to obtain high-frequency information, and then performs inverse Fourier transform on the high-frequency information to obtain the high-frequency information face image data.
5. The method for generating facial image identification based on high-frequency information according to claim 1, characterized in that: The preprocessing steps of S3 are: S31 uses bilinear interpolation to scale the low-resolution high-frequency information face image data to 256 on the short side and maintain the same aspect ratio as the original image; S32 maintains the original resolution of the high-frequency information face image data with high resolution, and performs center cropping of all face image data to 224*224; S33 performs grayscale normalization processing on all high-frequency information facial image data until each pixel value is within the range of 0-255, thereby obtaining the high-frequency information facial image grayscale image.
6. The method for generating facial image identification based on high frequency information according to claim 1, characterized in that: S4 specifically includes the following steps: S41 uses ResNet50 as the classification network, and the input channel parameter of its first layer of convolution is 1; The classification network in S42 receives a high-frequency information face image as input, changes the fully connected layer, sets the classification category to 2, outputs a discrimination probability of whether the corresponding image is generated, and determines whether the input image is a generated face image based on the discrimination probability.
7. The method for generating facial image identification based on high frequency information according to claim 6, characterized in that: S4 also includes the following steps: before the fully connected layer, the histogram is calculated according to the feature vector output by the classification network, the histogram is normalized to obtain the probability distribution, and the probability distribution of the real high-frequency face image and the generated high-frequency face image are obtained respectively.
8. The method for generating a facial image based on high frequency information according to claim 1, characterized in that: S5 determines whether the face image to be identified is a generated face image according to the discrimination result output by the discrimination network, which specifically includes the following steps: the discrimination network outputs a discrimination probability value for the image to be identified, and if the discrimination probability value exceeds 50%, the image to be identified is identified as a generated face image, otherwise, the image to be identified is identified as a real face image.
9. A facial image identification system based on high-frequency information, characterized in that: The system comprises: The high-frequency information face image module performs discrete Fourier transform on the face image to obtain its spectrum, performs high-pass filtering on the spectrum, and then performs inverse Fourier transform to obtain the high-frequency information face image; The image preprocessing module performs grayscale normalization processing on the obtained high-frequency information face image until the pixel value of each pixel is within the range of 0-255 to obtain a grayscale image; The image probability distribution acquisition module calculates the histogram of the feature vector output by the network, normalizes the histogram to obtain the probability distribution, and obtains the probability distribution information of the real high-frequency face image and the generated high-frequency face image respectively; The prediction module is used to identify the face image. The high-frequency information face image of the input face image is input into the classification network to obtain the features of the high-frequency information face image. The histogram of the feature vector of the high-frequency information face image is calculated and normalized to obtain the probability distribution. A discrimination probability indicating whether the image is a generated image is output, and whether the input image is a generated face image is determined based on the discrimination probability.
10. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to claim 1 are implemented.