WO2021249006A1 - 识别人脸图像真伪的方法、装置及介质和程序产品 - Google Patents

识别人脸图像真伪的方法、装置及介质和程序产品 Download PDF

Info

Publication number
WO2021249006A1
WO2021249006A1 PCT/CN2021/086893 CN2021086893W WO2021249006A1 WO 2021249006 A1 WO2021249006 A1 WO 2021249006A1 CN 2021086893 W CN2021086893 W CN 2021086893W WO 2021249006 A1 WO2021249006 A1 WO 2021249006A1
Authority
WO
WIPO (PCT)
Prior art keywords
spectrogram
input data
feature map
frequency domain
spectrograms
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2021/086893
Other languages
English (en)
French (fr)
Inventor
殷国君
邵婧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Sensetime Intelligent Technology Co Ltd
Original Assignee
Shanghai Sensetime Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Sensetime Intelligent Technology Co Ltd filed Critical Shanghai Sensetime Intelligent Technology Co Ltd
Priority to JP2022524624A priority Critical patent/JP7251000B2/ja
Publication of WO2021249006A1 publication Critical patent/WO2021249006A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/14Fourier, Walsh or analogous domain transformations, e.g. Laplace, Hilbert, Karhunen-Loeve, transforms
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/14Fourier, Walsh or analogous domain transformations, e.g. Laplace, Hilbert, Karhunen-Loeve, transforms
    • G06F17/141Discrete Fourier transforms
    • G06F17/142Fast Fourier transforms, e.g. using a Cooley-Tukey type algorithm
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/30Noise filtering

Definitions

  • This application relates to the field of image recognition technology, in particular to methods, devices, media, and program products for recognizing the authenticity of face images.
  • Facial forgery technology can realistically replace human faces or modify facial expressions, mouth shapes, and so on.
  • the face of A in the video can be replaced with the face of B through facial forgery technology.
  • the frequency domain information of the image is widely used to identify whether the facial image is forged.
  • the discrete cosine transform (DCT) is performed on the image to extract the frequency domain information of the image, and the edge and texture of the image are analyzed through the frequency domain information.
  • DCT discrete cosine transform
  • the edge and texture of the image are analyzed through the frequency domain information.
  • the image is fake.
  • some low-quality images for example, compressed images, when it is determined that the edges or textures are abnormal, it is not completely certain that the image is forged.
  • the embodiments of the present application provide a method, device, and medium for identifying the authenticity of a face image.
  • the spectrogram is filtered through multiple sets of filters to obtain multiple frequency band information, thereby improving the accuracy of identifying the authenticity of the face image.
  • an embodiment of the present application provides a method for identifying the authenticity of a face image, including: acquiring a first face image; performing frequency domain transformation on the first face image to obtain a first spectrogram; The first spectrogram is subjected to multiple filtering processes to obtain multiple second spectrograms; according to the multiple second spectrograms, input data is obtained; according to the input data, the authenticity of the first face image is determined Pseudo.
  • an embodiment of the present application provides an apparatus for identifying the authenticity of a face image, including: an acquisition unit for acquiring a first face image; a transformation unit for performing frequency domain transformation on the first face image, Obtain a first spectrogram; a filtering unit, configured to perform multiple filtering processing on the first spectrogram to obtain multiple second spectrograms; a processing unit, configured to obtain an input based on the plurality of second spectrograms Data; a judging unit for determining the authenticity of the first face image according to the input data.
  • an embodiment of the present application provides an apparatus for identifying the authenticity of a face image, including a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory And is configured to be executed by the processor, and the program includes instructions for executing the steps in the method as described in the first aspect.
  • an embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and the computer program enables a computer to execute the method described in the first aspect.
  • the embodiments of the present application provide a computer program product
  • the computer program product includes a non-transitory computer-readable storage medium storing a computer program
  • the computer is operated to cause the computer to execute the computer program as described in the first aspect. The method described.
  • the implementation of the embodiment of the present application has the following beneficial effects: it can be seen that, in the embodiment of the present application, multiple sets of filters are used to perform multiple filtering processing on the first spectrogram to obtain multiple second spectrograms. Therefore, the frequency band information of the multiple second spectrograms is different; the input data is obtained according to the multiple second spectrograms, so the input data contains multiple frequency band information of the first spectrogram, and the identification is based on the input data
  • the authenticity of the first face image is to recognize the authenticity of the first face image by using multiple frequency band information, thereby improving the accuracy of identifying the authenticity of the first face image and reducing the false recognition rate.
  • FIG. 1 is a schematic flowchart of a method for identifying the authenticity of a face image provided by an embodiment of the application.
  • FIG. 2 is a schematic diagram of a filtering process provided by an embodiment of the application.
  • FIG. 3 is a schematic diagram of a process for setting a second preset parameter according to an embodiment of the application.
  • FIG. 4 is a schematic diagram of a cross fusion process provided by an embodiment of the application.
  • FIG. 5 is a schematic diagram of a method for identifying the authenticity of a face image provided by another embodiment of the application.
  • Fig. 6 is a schematic diagram of a global frequency domain transform branch provided by an embodiment of the application.
  • FIG. 7 is a schematic diagram of a local frequency domain transform branch provided by an embodiment of the application.
  • FIG. 8 is a schematic structural diagram of an apparatus for identifying the authenticity of a face image provided by an embodiment of the application.
  • FIG. 9 is a block diagram of functional units of a device for identifying the authenticity of a face image provided by an embodiment of the application.
  • FIG. 1 is a schematic flowchart of a method for identifying the authenticity of a face image provided by an embodiment of the application. This method is applied to a device that recognizes the authenticity of a human face image. The method includes the following steps.
  • the frequency domain transform includes but is not limited to one of the following: DCT, Fourier Transform (Fourier Transformation), Fast Fourier Transform (Fast Fourier Transform, FFT).
  • DCT Fourier Transform
  • FFT Fast Fourier Transform
  • the conversion of the frequency domain to DCT is taken as an example for description.
  • the frequency domain transform includes a global frequency domain transform and/or a local frequency domain transform.
  • Global frequency domain transformation refers to performing frequency domain transformation on the entire first face image to obtain a first spectrogram.
  • the local frequency domain transformation is to perform frequency domain transformation on multiple partial regions in the first face image to obtain multiple first spectrograms.
  • the local frequency domain transformation may use a sliding window to slide the first face image, and perform frequency domain transformation on a part of the region selected by the sliding window each time. Therefore, the local frequency domain transform may be a sliding window discrete cosine transform (SWDCT).
  • SWDCT sliding window discrete cosine transform
  • the area may be a preset area, an area with more detailed information, or The area of focus is not limited in this application. Therefore, in the case of performing local frequency domain transformation on the first face image, the number of obtained first spectrograms may be one or more.
  • the first spectrogram obtained by the global frequency domain transform is called the first local spectrogram;
  • the obtained first spectrogram is called the first global spectrogram.
  • the global frequency domain transformation may be performed first, or the local frequency domain transformation may be performed first, or the global frequency domain transformation and the global frequency domain transformation may be performed in parallel.
  • this application does not limit the order of frequency domain transformation.
  • the first global spectrogram in the case where only the global frequency domain transform is performed on the first face image, that is to say, the first global spectrogram is obtained through the global frequency domain transform, it can be obtained by the global frequency domain transform.
  • Multiple sets of filters perform multiple filtering processing on the first global spectrogram to obtain the multiple second spectrograms.
  • the multiple sets of filters corresponding to the global frequency domain transform are referred to as multiple sets of first filters. The process of performing multiple filtering processing on the first global spectrogram through multiple sets of first filters will be described in detail later. , I won’t describe too much here.
  • the second spectrogram of different frequency bands can be obtained, so that the subsequent input data contains the information of different frequency bands in the first global spectrogram, so that The input data contains abundant frequency band information, which can further improve the accuracy of authenticating the first face image.
  • multiple sets of filtering corresponding to the local transformation may be used The device performs multiple filtering processing on each first partial spectrogram to obtain multiple second spectrograms corresponding to each first partial spectrogram.
  • the multiple sets of filters corresponding to the local frequency domain transform are referred to as multiple sets of second filters, and the method of performing multiple filtering processing on each first partial spectrogram through multiple sets of second filters will be described in detail later. The process is not described here.
  • the first spectrogram when the global frequency domain transform and the local frequency domain transform are performed on the first face image, that is to say, the first spectrogram includes a first global spectrogram and a local frequency domain obtained by the global frequency domain transform.
  • the multiple first local spectrograms obtained by domain transformation it is necessary to perform multiple filtering processing on the first global spectrogram through multiple sets of first filters to obtain multiple second spectrograms corresponding to the first global spectrogram; Perform multiple filtering processing on each first partial spectrogram through multiple sets of second filters to obtain multiple second spectrograms corresponding to each first partial spectrogram.
  • the multiple second spectrograms include multiple second spectrograms obtained by performing multiple filtering processes on the first global spectrogram obtained by the global frequency domain transformation, and each of the second spectrograms obtained by the local frequency domain transformation. Multiple second spectrograms obtained by performing multiple filtering processing on the first partial spectrogram.
  • multiple sets of first filters may be used to perform multiple filtering processing on the first global spectrogram obtained by the global frequency domain transformation, or through multiple sets of first filters.
  • the second filter group performs multiple filtering processing on each first local spectrogram obtained by local frequency domain transformation; of course, it is also possible to perform filtering processing on the first spectrogram obtained from global frequency domain transformation and local frequency domain transformation in parallel. . This application does not limit the order of filtering.
  • a second spectrogram can be obtained for each filtering process, and each group of filters corresponds to one filtering process.
  • each second spectrogram of the plurality of second spectrograms may be performed Inverse frequency domain transform to obtain multiple second images, wherein the inverse frequency domain transform is the inverse process of the global frequency domain transform. Then, the multiple second images are spliced to obtain the input data.
  • the input data obtained through the global frequency domain transformation is referred to as the first input data.
  • the energy of each second spectrogram may be determined according to the energy corresponding to each The energies of the multiple second spectrograms of the first partial spectrogram are obtained to obtain the eigenvectors corresponding to each first partial spectrogram; then, the eigenvectors corresponding to the multiple first partial spectrograms are re-assembled. ) To get the input data.
  • the input data obtained through the local frequency domain transformation is referred to as the second input data.
  • the size of the second input data obtained after reassembly does not match the size specified by the neural network, it is necessary to perform channel conversion on the second input data obtained after reassembly to make the second input data
  • the size of the second input data matches the size specified by the neural network, and the channel-converted data is used as the second input data.
  • the second input data mentioned later are all converted through corresponding channels to obtain input data matching the size specified by the neural network.
  • the input data when the plurality of second spectrograms include a plurality of second spectrograms corresponding to the global frequency domain transform and a plurality of second spectrograms corresponding to the local frequency domain transform, the input data
  • the method including the above-mentioned first input data and the second input data, and the method of obtaining the first input data and the second input data is similar to the above-mentioned process, and will not be described again.
  • Determining the authenticity of the first face image is essentially to determine whether the first face image is an original face image, that is, to determine whether the first face image has been replaced, modified, or copied.
  • the frequency band information of the multiple second spectrograms is different; the input data is obtained according to the multiple second spectrograms, so the input data contains multiple frequency band information of the first spectrogram, and the identification is based on the input data
  • the authenticity of the first face image is to identify the authenticity of the first face image by using multiple frequency band information, thereby improving the accuracy of identifying the authenticity of the first face image and reducing the rate of misrecognition.
  • feature extraction can be performed on the input data to obtain a first feature map; determine according to the first feature map The authenticity of the first face image is classified according to the first feature map to determine the authenticity of the first face image.
  • the authenticity of the first face image is identified through multiple frequency band information in the first spectrogram, instead of using a single frequency band information for identification, thereby improving the accuracy of identifying the authenticity of the first face image.
  • the first input data and the second input data need to be cross-fused to obtain the second feature map and The third feature map; the authenticity of the first face image is determined according to the second feature map and the third feature map.
  • the second feature map and the third feature map can be spliced, and the authenticity of the first image can be determined according to the spliced feature map. That is, perform feature extraction on the spliced feature maps to obtain the target feature map, and classify according to the target feature map to determine the authenticity of the first image.
  • the second feature map and the third feature map can be pooled at the same time to obtain the target feature map, which is equivalent to fusing the second feature map and the third feature map during the pooling process; , Classify according to the target feature map, and determine the authenticity of the first image.
  • cross-fusion processing is performed on the global frequency domain information and local frequency domain information of the first face image, so that the second feature map and the third feature map after cross fusion contain more frequency band information, which can improve the recognition The accuracy of the authenticity of the first face image.
  • the global frequency domain transform will extract more detailed frequency band information in the first face image, further improving the recognition accuracy.
  • the local frequency domain transformation process will use a sliding window to frame the first face image. Therefore, the feature vector of each first partial spectrogram also contains spatial position information (the sliding window is in the first face image). The position selected by the frame), so that the second input data contains spatial position information, so that the information contained in the target feature map is more abundant.
  • the number of times of the cross fusion processing may be multiple times, and then the realization process of obtaining the second feature map and the third feature map may be: performing a first input data on the first input data and the second input data.
  • the fourth feature map and the fifth feature map are obtained by one cross fusion processing; the fourth feature map and the fifth feature map are used as the input data for the next cross fusion processing, and after the cross fusion processing is performed multiple times, Obtain the second characteristic map and the third characteristic map.
  • the following describes the specific process of the cross fusion processing by performing the first cross fusion processing on the first input data and the second input data.
  • the implementation process of the other cross fusion processing is similar to the process of the first cross fusion processing, and will not be described again. .
  • the process of feature extraction for the first input data and the second input data is in no sequence; the first matrix is obtained according to the sixth feature map and the seventh feature map, and the first matrix is used to represent the sixth feature map Correlation between and the seventh feature map. That is, the sixth feature map and the seventh feature map are essentially two matrices, and the first matrix is the correlation coefficient between the two matrices.
  • an eighth feature map is obtained, that is, the first matrix and the seventh feature map are multiplied by corresponding elements to obtain the eighth feature map, and the eighth feature map Superimpose with the sixth characteristic map to obtain the fourth characteristic map.
  • a ninth feature map is obtained, that is, the first matrix and the sixth feature map are multiplied by corresponding elements to obtain the ninth feature map; then, the ninth feature map Superimpose with the seventh characteristic map to obtain the fifth characteristic map.
  • performing multiple filtering processes on the first global spectrogram and/or the first local spectrogram includes: performing multiple filtering processes on the first global spectrogram and/or the first local spectrogram through multiple sets of filters, Among them, the filter parameters of each set of filters include preset parameters and reference parameters.
  • the reference parameters are network parameters, which are obtained by pre-training the neural network. The following describes in detail how to obtain the reference parameters, so I will not do too much here.
  • each set of filters is used to separate the frequency band information corresponding to the preset parameter from the first global spectrogram and/or the first local spectrogram, and the reference parameter is used to compensate the frequency band information, and any two groups
  • the frequency band information separated by the filters is different, and the multiple frequency band information separated by the multiple sets of filters include all frequency band information in the first global spectrogram and/or the first partial spectrogram.
  • the first global spectrogram and/ Or the first partial spectrogram is subjected to multiple filtering processing.
  • the filter parameters between the filters used are different, and the number of filters used is also different.
  • the difference in filtering parameters means that the preset parameters between the filters are different, or the reference parameters between the filters are different, or the preset parameters and the reference parameters are different between the filters.
  • the preset parameters and reference parameters between the filters are generally set to be different.
  • the preset parameters and reference parameters between the first filter and the second filter are different, and the number of the first filter and the number of the second filter are also different. Therefore, in order to facilitate the distinction, the preset parameters and reference parameters of the first filter can be referred to as the first preset parameters and the first reference parameters; the preset parameters and reference parameters of the second filter are referred to as the second Preset parameters and second reference parameters.
  • the first frequency band information of the first global spectrogram obtained by the global frequency domain transformation is extracted by the first preset parameters of each group of first filters, and the first frequency band information is performed by the first reference parameter Compensation to obtain the second spectrogram corresponding to the group of first filters, that is, extract the third frequency band information in the first global spectrogram through the first reference parameter, and combine the first frequency band information and the third The frequency band information is superimposed to obtain the second spectrogram.
  • the first preset parameters between any two groups of first filters are different, that is to say, the first frequency band information extracted by any two groups of first filters is different, and the multiple first filters extracted by multiple groups of filters are different.
  • the frequency band information includes all frequency band information in the first global spectrogram, that is, by combining the multiple first frequency band information, all frequency band information in the first global spectrogram can be obtained.
  • extracting the first frequency band information through the first preset parameter is to use the first preset parameter and the first global spectrogram to perform a corresponding position element multiplication operation to filter out part of the frequency band information in the first global spectrogram.
  • Part of the frequency band information is reserved, and the part of the reserved frequency band information is the first frequency band information.
  • the first preset parameter may be a binary matrix with the same scale as the first global spectrogram.
  • the first preset parameter is [0,1/16], then [0,1/16] indicates that the 1/16 part of the upper left corner of the matrix takes the value 1, and the other parts take the value 0.
  • the black part in the matrix corresponding to the first preset parameter represents a value of 0, and the white part represents a value of 1.
  • the first global spectrogram 210 is obtained by performing DCT transformation on the first face image. Performing DCT transformation on any image, the upper left corner of the obtained spectrogram is the low frequency information of the image, the middle part is the intermediate frequency information of the image, and the lower right corner is the high frequency information of the image.
  • multiple sets of different first filters can be used to perform multiple filtering processing on the same first global spectrogram, and multiple different second spectrograms corresponding to the first global spectrogram can be obtained.
  • the first preset parameter of the first group of first filters 220 is [0, 1/16]
  • the first preset parameter of the group of first filters 220 and the first global frequency spectrum are used
  • the frequency band information in the 1/16 part of the upper left corner of the first global spectrogram 210 can be retained, that is, the retained low frequency information, and other frequency band information in the first global spectrogram can be filtered out to obtain
  • the second spectrogram 230 corresponding to the group of first filters 220, and the white part in the second spectrogram 230 is the low frequency information.
  • the first preset parameter of the last set of first filters 22n is [1/8, 1], therefore, the first preset parameter pair of the first set of filters 22n is used and
  • the first global spectrogram 210 multiplies the corresponding elements, and the frequency band information in the 7/8 part of the lower right corner of the first global spectrogram 210 can be retained, that is, the high frequency information is retained, and other parts in the first global spectrogram 210 are filtered out.
  • Frequency band information, a second spectrogram 23n corresponding to the set of first filters 22n is obtained, and the white part in the second spectrogram 23n is the retained high-frequency information.
  • the subsequent process of filtering the spectrogram using the filter can refer to the filtering process shown in FIG. 2 and will not be described in detail.
  • the first preset parameters of the three groups of first filters are respectively therefore, Used to separate the low frequency information in the first global spectrogram, Used to separate the intermediate frequency information in the first global spectrogram, Used to separate high frequency information in the first global spectrogram.
  • the three sets of first preset parameters are only examples for illustration.
  • the first global spectrogram can also be equally filtered, that is, the distances between the first preset parameters of the three sets of filters are the same.
  • the first preset parameters are [0,1/3], [1/3,2/3], [2/3,1].
  • the first preset parameter of each group of first filters can be set in advance according to the frequency band information to be separated.
  • the first preset parameters can be set to In this way, it can be ensured that the energy of the three second spectrograms obtained after the filtering process is the same. Therefore, in the first input data obtained by splicing the three second spectrograms, the energy difference between each layer of data will not be too large, which satisfies spatial continuity and facilitates subsequent extraction of the characteristics of the first input data .
  • each group of first filters may include a basic filter and a tunable filter, wherein the filter parameter of the basic filter is the first preset parameter of the group of first filters, and the filter parameter of the tunable filter It is the first reference parameter of the first filter of the group.
  • the first filter of each group can be expressed by formula (1):
  • f i is the first filter of the i-th group of the multiple groups of first filters, Is the first preset parameter of the i-th group of first filtering, that is, the basic filter, Is the first reference parameter of the i-th group of first filtering, that is, the filter can be adjusted;
  • the first reference parameter only compensates for frequency band information, that is, the range of frequency band information separated by each group of first filters is determined by the basic filter in each group of first filters. In this way, it is also ensured that after dividing multiple sets of first filters in advance, all frequency band information of the first global spectrogram can be extracted. Therefore, the use of the compression function ⁇ is mainly to compress the value of the first reference parameter to [-1,1], so as to avoid the value of the first reference parameter being too large.
  • the filter parameter of a filter is finally determined by the first reference parameter, which causes the range of the separated frequency band information to be determined by the tunable filter, which may result in the inability to extract all the frequency bands of the first global spectrogram information.
  • s i is the second spectrogram corresponding to the first filter of the i-th group in the multiple groups of first filters
  • x is the first face image
  • D(x) is the overall calculation of the first face image Frequency domain transformation, that is, the first global spectrogram
  • is the dot product between the matrices, that is, the corresponding element-wise product (element-wise product).
  • the inverse frequency domain transform is the inverse process of the global transform, and the process of obtaining the second image can be expressed by formula (3) in combination with formula (2):
  • x is the first face image
  • y i is the second image corresponding to the i-th group of first filters
  • D(x) is the global frequency domain transform
  • D -1 is the frequency domain inverse transform
  • is the matrix The dot product between the corresponding elements is multiplied.
  • the second frequency band information corresponding to the second preset parameter in each first partial spectrogram can be extracted through each set of second filters,
  • the second reference parameter compensates the second frequency band information extracted by the set of filters to obtain a second spectrogram corresponding to the second filter. That is, the fourth frequency band information in the first partial spectrogram is extracted by the first reference parameter, and the second frequency band information and the fourth frequency band information are superimposed to obtain the second spectrogram.
  • the second reference parameter is also a network parameter, which is also obtained through pre-training.
  • the second preset parameters of any two sets of second filters are different, the second frequency band information extracted by any two sets of second filters is different.
  • the multiple second frequency band information extracted by the multiple sets of second filters include all the frequency band information in each first partial spectrogram, that is, the multiple second frequency band information can be combined to obtain each first partial All frequency band information of the spectrogram.
  • each group of second filters also includes a basic filter and a tunable filter, wherein the filter parameter of the basic filter is the second preset parameter of the group of second filters, and the filter parameter of the tunable filter It is the second reference parameter of the second filter of the group.
  • each group of second filters can be expressed by formula (4):
  • h i is the i-th group of second filters among the multiple groups of second filters
  • is the compression function
  • g i is the i-th second spectrogram in the multiple second spectrograms corresponding to each first partial spectrogram
  • p is the image area obtained by performing the p-th frame selection on the first face image
  • D(p) is the frequency domain transformation of the partial image, that is, the first partial spectrogram
  • is the dot product between the matrices, that is, the corresponding element is multiplied.
  • the second preset parameters of the multiple sets of second filters are set in advance.
  • the setting of the second preset parameter may be obtained by dividing equidistantly along the diagonal of the first partial spectrogram according to the set number of second filters.
  • the diagonal can be moved equidistantly, and the second preset parameters of each set of second filters can be determined.
  • the second preset parameters of the 8 groups of second filters are: [0,1/32], [1/32,1/8], [1/8,9/32], [9/32,1/ 2], [1/2,23/32], [23/32,28/32], [28/32,31/32], [31/32,1].
  • the equidistant division may not be performed.
  • the diagonal line can be moved in an arithmetic increasing manner to obtain the second preset parameter, or the diagonal can be moved in an arithmetic decreasing manner to obtain the second preset parameter, or other movements Way. This application does not limit the manner of setting the second preset parameter.
  • each second spectrogram in the multiple second spectrograms corresponding to each first partial spectrogram is determined to obtain multiple energies; the multiple energies are combined into a feature vector, and each first partial spectrogram can be obtained
  • the feature vector corresponding to the spectrogram Since the frequency band information corresponding to each second spectrogram is different, the feature vector essentially consists of the energy corresponding to each frequency band in the first partial spectrogram.
  • q i is the energy of the i-th second spectrogram in the multiple second spectrograms corresponding to each first partial spectrogram
  • 1 is a norm of the matrix, that is, each element in the matrix
  • M is the number of the multiple second spectrograms, that is, the number of second filters
  • is between the matrices
  • the dot product of, that is, the corresponding elements are multiplied.
  • log10 is to make the energy of different frequency bands fall in the same order of magnitude to prevent the energy of some frequency bands from being too high, and the energy of some frequency bands is too low, which will bring inconvenience to subsequent processing.
  • each q i can be combined as a 1 ⁇ 1 ⁇ M feature vector.
  • these eigenvectors are reconstituted into a new matrix according to the frequency band of the second preset parameter as the second input data.
  • the energy of the i-th second spectrogram corresponding to each first partial spectrogram can be reassembled to the same channel, so the number of channels is equal to M.
  • the second input data is an A ⁇ B ⁇ M matrix.
  • the first filter performs filtering processing on the first global spectrogram of the global frequency domain transformation. Therefore, the first filter performs filtering processing on the global frequency band information, and can roughly divide the frequency band information of the first global spectrogram. For example, it can be divided into high frequency, intermediate frequency, and low frequency. Therefore, the number of first filters can be set relatively small.
  • the second filter is to filter the first partial spectrogram of the local transformation. Therefore, the second filter is to filter the local frequency band information. It is to extract more detailed frequency domain information from the first partial spectrogram. . Therefore, the frequency band information of the first partial spectrogram needs to be finely divided, and the number of second filters needs to be set relatively large.
  • the above-mentioned process of identifying the authenticity of the face image may be implemented through a neural network.
  • the neural network includes a first network and a second network.
  • the training process of the neural network is the existing supervised training, which will not be described again.
  • the first face image is input to the first network for frequency domain transformation to obtain the first spectrogram, and the first spectrogram is filtered for multiple times to obtain multiple second spectrograms, and according to The multiple second spectrograms obtain input data; then, the input data is input to the second network to determine the authenticity of the first face.
  • the first network may be a neural network capable of frequency domain transformation and filtering.
  • the first network due to the introduction of a tunable filter, it is necessary to train the first reference parameter and the second reference parameter of the tunable filter while training the neural network; then, during the training process, the The first reference parameter and the second reference parameter of the neural network are optimized.
  • the first network can be used to perform frequency domain transformation on the first face image and perform multiple filtering processing on the first spectrogram to obtain the input data.
  • performing frequency domain transformation on the first face image and performing multiple filtering processing on the first spectrogram can also be implemented through encapsulated functions. That is to say, after completing the training of the first network, the filter parameters of the multiple sets of filters of the first network (including multiple sets of first filters and multiple sets of second filters) are encapsulated into functions, which can be used later This function directly performs frequency domain transformation and filtering processing on the face image. Therefore, in practical applications, the first network can be implemented by a neural network, or can be implemented by a function with determined parameters, which is not limited in this application.
  • the following describes the process of determining the authenticity of the first face through the second network.
  • the second network may be a convolutional neural network.
  • the second network uses the Xception network as the backbone of the convolutional neural network.
  • the second network includes two branches and multiple cross-integration processing modules. Wherein, each branch includes multiple network blocks, each block includes multiple convolutional layers and pooling layers, and the block is an existing network structure, which will not be further described. And the two branches correspond to the first input data 401 and the second input data 402 respectively.
  • the first input data can be feature extraction through the first branch, that is, feature extraction is performed through multiple blocks 411 of the first branch, and directly based on the extracted The feature determines the authenticity of the first face image.
  • the cross-fusion process 440 is not involved.
  • the first input data can be feature extracted through the second branch, that is, feature extraction is performed through multiple blocks 412 of the second branch, and directly based on the extracted
  • the feature map determines the authenticity of the first face image.
  • the cross-fusion process 440 is not involved.
  • the input data includes the first input data and the second input data
  • feature extraction is performed on the first input data 401 and the second input data 402 through the block of each branch, and the sixth feature map 421 and the first input data can be obtained.
  • the sixth feature map 421 and the seventh feature map 422 are cross-fused for the first time to obtain the fourth feature map 431 and the fifth feature map 432.
  • use the fourth feature map 431 and the fifth feature map 432 as the input data for the next cross fusion process, and continue the cross fusion process 440 until the second feature map 451 and the third feature map 452 corresponding to the two branches are obtained.
  • the second feature map 451 and the third feature map 452 are spliced or pooled, and the authenticity of the first face image is determined according to the spliced or pooled feature map.
  • the frequency domain information obtained by the global frequency domain transform and the local frequency domain transform is cross-fused, that is, the frequency domain information obtained by the two frequency domain transforms Mutual fusion, so that the obtained second feature map and the third feature map both contain the global frequency domain information and the local frequency domain information in the first spectrogram, which can improve the accuracy of identifying the authenticity of the first face image.
  • the first face image 510 is subjected to frequency domain transformation and filtering processing respectively through two transformation branches, that is, global frequency domain transformation and local frequency domain transformation are performed on the first face image 510, and a series of The filtering process of, obtains the first input data 521 corresponding to the branch 520 of the global frequency domain transformation, and the second input data 531 corresponding to the branch 530 of the local frequency domain transformation. Then, the first input data 521 and the second input data 531 are respectively input to the convolutional networks 541 and 542 corresponding to the respective branches, feature extraction is performed, and the extracted features are cross-fused 543, and finally two branches are obtained.
  • the second feature map 544 and the third feature map 545; the second feature map 544 and the third feature map 545 are synchronously pooled 550 to obtain the target feature map 551; finally, the first feature map 551 is compared according to the target feature map 551
  • the authenticity of the face image 510 is predicted 560 to determine the authenticity of the first face image 510.
  • FIG. 6 is the refinement process of the branch 520 of the global frequency domain transform.
  • the first face image 510 is first subjected to DCT transformation 620 to obtain the first global spectrogram 621; then, it passes through multiple sets of first filters 630 ( Figure 6 only shows three sets of first filters).
  • FIG. 7 is the refinement process of the branch 530 of the local frequency domain transform.
  • the first face image 510 is first subjected to SWDCT transformation 720 to obtain a plurality of first partial spectrograms 721.
  • each first partial spectrogram 721 is subjected to multiple filtering processing 730 through multiple sets of second filters 731 to obtain multiple second spectrograms corresponding to each first partial spectrogram, and to determine each second spectrogram
  • the energy of the graph (the filtering process 730 in FIG. 7 includes the step of calculating the energy).
  • each first partial spectrogram determines the feature vector of each first partial spectrogram (as shown by the 6 histograms in each cell in 732, Each column represents the energy of a second spectrogram). Finally, the feature vectors corresponding to the multiple first partial spectrograms are reassembled, and the data of the same frequency band is merged into the same channel according to the frequency band of the second preset parameter, so as to obtain the second input data 532.
  • the portrait image in the case that the first face image is a portrait image of the user, the portrait image can be recognized based on the technical solution of the present application, and in the case of determining that the portrait image is a fake image, There are different countermeasures according to specific application scenarios. For example, in a user authentication scenario, users who use the fake image can be denied access to the system. Furthermore, in some cases, it can be determined that another person has modified the portrait image, which may infringe the user's portrait right, and the malicious modification of the portrait image can be held accountable.
  • the face image in the case that the first face image is any frame of the video to be recognized or a specific frame of face image, the face image can be recognized based on the technical solution of the present application. In the case of determining that the face image, that is, the first face image referred to in this application, is a fake image, if it is determined that another person has modified the video to be recognized, the person can be held accountable for tampering with the video work.
  • FIG. 8 is a schematic structural diagram of an apparatus for identifying the authenticity of a face image provided by an embodiment of the application.
  • the device 800 includes a processor 810, a memory 820, a communication interface 830, and one or more programs.
  • the processor 810, the memory 820, and the communication interface 830 are connected to each other through a bus 840.
  • the above-mentioned one or more programs are stored in the above-mentioned memory 820 and are configured to be executed by the above-mentioned processor 810, and the above-mentioned programs include instructions for performing the following steps: acquiring a first face image; The face image is transformed in the frequency domain to obtain a first spectrogram; the first spectrogram is filtered for multiple times to obtain a plurality of second spectrograms; the input data is obtained according to the plurality of second spectrograms; The input data determines the authenticity of the first face image.
  • the frequency domain transform includes at least one of the following: a global frequency domain transform and a local frequency domain transform.
  • the obtaining input data according to the multiple second spectrograms includes: performing each of the second spectrograms Inverse frequency domain transformation is performed to obtain a second image.
  • the inverse frequency domain transformation is an inverse process of the global frequency domain transformation; a plurality of second images are spliced to obtain the input data.
  • the frequency domain transformation includes the local frequency domain transformation
  • the number of the first spectrogram is multiple; and the first spectrogram is filtered for multiple times.
  • Obtaining multiple second spectrograms includes: performing multiple filtering processing on each first spectrogram in the multiple first spectrograms, respectively, to obtain multiple second spectrograms corresponding to each first spectrogram .
  • obtaining input data according to the plurality of second spectrograms includes: determining the energy of each second spectrogram; using each first spectrogram as the first partial spectrogram, according to the corresponding The energies of the multiple second spectrograms of the first partial spectrogram are obtained to obtain the eigenvectors corresponding to the first partial spectrogram; the eigenvectors corresponding to the multiple first partial spectrograms are reassembled to obtain the input data.
  • determining the authenticity of the first face image according to the input data includes: performing feature extraction on the input data to obtain a first feature map; according to the first feature map, Determine the authenticity of the first face image.
  • the global frequency domain transform obtains a first global spectrogram
  • the local frequency domain transform Domain transform to obtain multiple first local spectrograms, respectively performing multiple filtering processing on the first spectrogram
  • obtaining multiple second spectrograms includes: performing multiple filtering processing on the first global spectrogram to obtain and Multiple second spectrograms corresponding to the first global spectrogram; performing multiple filtering processing on the multiple first local spectrograms to obtain multiple second spectrograms corresponding to each first local spectrogram.
  • the input data includes first input data and second input data
  • the obtaining the input data according to the plurality of second spectrograms includes: converting the plurality of spectrograms corresponding to the first global spectrogram. Inverse frequency domain transform is performed on each second spectrogram in the second spectrogram to obtain a plurality of second images.
  • the inverse frequency domain transform is the inverse process of the global frequency domain transform; Perform splicing to obtain the first input data; for each first partial spectrogram, determine the energy of each second spectrogram in the multiple second spectrograms corresponding to the first partial spectrogram; according to the first partial spectrogram The energies of multiple second spectrograms corresponding to a partial spectrogram are obtained to obtain the eigenvectors corresponding to the first partial spectrogram; the eigenvectors corresponding to the multiple first partial spectrograms are reassembled to obtain the second input data.
  • determining the authenticity of the first face image according to the input data includes: performing cross-fusion processing on the first input data and the second input data to obtain a second feature Figure and the third feature map; according to the second feature map and the third feature map, determine the authenticity of the first face image.
  • cross fusion processing is performed on the first input data and the second input data to obtain a second feature map and a third feature map.
  • the feature map includes: performing the first cross-fusion processing on the first input data and the second input data to obtain a fourth feature map and a fifth feature map; combining the fourth feature map and the fifth feature map
  • the graph is used as the input data of the next cross fusion processing, and after the cross fusion processing is performed multiple times, the second feature map and the third feature map are obtained.
  • performing the first cross-fusion processing on the first input data and the second input data to obtain the fourth feature map and the fifth feature map includes: performing the first input data Feature extraction to obtain a sixth feature map; feature extraction of the second input data to obtain a seventh feature map; according to the sixth feature map and the seventh feature map, a first matrix is obtained, and the first The matrix is used to represent the correlation between the sixth feature map and the seventh feature map; according to the first matrix and the seventh feature map, an eighth feature map is obtained, and the eighth feature map is combined Figure and the sixth feature map are superimposed to obtain the fourth feature map; according to the first matrix and the sixth feature map, a ninth feature map is obtained, and the ninth feature map and the The seventh feature map is superimposed to obtain the fifth feature map.
  • determining the authenticity of the first face image according to the second feature map and the third feature map includes: comparing the second feature map and the third feature map Perform processing, and determine the authenticity of the first face image according to the processed feature map, wherein the processing includes at least one of the following: stitching or pooling.
  • the multiple filtering processing includes: performing multiple filtering processing on the first spectrogram through multiple sets of filters, wherein each set of the filters corresponds to one filtering process; the filtering of each set of filters
  • the parameters include preset parameters and reference parameters.
  • Each set of filters is used to separate frequency band information corresponding to the preset parameters from the first spectrogram, and the reference parameters are used to compensate for the frequency band information, any two groups
  • the frequency band information separated by the filter is different, and the multiple frequency band information separated by the multiple sets of filters include all frequency band information in the first spectrogram.
  • the filter parameters of each set of filters are different.
  • Fig. 9 is a device for identifying the authenticity of a face image provided by an embodiment of the application.
  • the device 900 includes: an acquisition unit 910, a transformation unit 920, a filtering unit 930, a processing unit 940, and a judgment unit 950.
  • the obtaining unit 910 is configured to obtain a first face image.
  • the transformation unit 920 is configured to perform frequency domain transformation on the first face image to obtain a first spectrogram.
  • the filtering unit 930 is configured to perform multiple filtering processing on the first spectrogram to obtain multiple second spectrograms.
  • the processing unit 940 is configured to obtain input data according to the multiple second spectrograms; the judging unit 950 is configured to determine the authenticity of the first face image according to the input data.
  • the frequency domain transform includes at least one of the following: a global frequency domain transform and a local frequency domain transform.
  • the processing unit 940 is specifically configured to: perform frequency domain inverse transformation on each of the second spectrograms to obtain the first Two images, the frequency domain inverse transform is the inverse process of the global frequency domain transform; the multiple second images are spliced to obtain the input data.
  • the filtering unit 930 is specifically configured to: Each first spectrogram in the first spectrograms is subjected to multiple filtering processing to obtain multiple second spectrograms corresponding to each first spectrogram.
  • the processing unit 940 is specifically configured to: determine the energy of each second spectrogram; use each first spectrogram as a first partial spectrogram, and according to corresponding to the first partial spectrogram The energies of the multiple second spectrograms are obtained to obtain the feature vector corresponding to the first partial spectrogram; the feature vectors corresponding to the multiple first partial spectrograms are reassembled to obtain the input data.
  • the judging unit 950 is specifically configured to: perform feature extraction on the input data to obtain a first feature map; and determine the authenticity of the first face image according to the first feature map .
  • the global frequency domain transform when the frequency domain transform includes the global frequency domain transform and the local frequency domain transform, the global frequency domain transform obtains a first global spectrogram, and the local frequency domain transform
  • the filtering unit 930 is specifically configured to perform multiple filtering processing on the first global spectrogram to obtain multiple second spectrograms corresponding to the first global spectrogram by domain transformation. ; Perform multiple filtering processing on the multiple first partial spectrograms to obtain multiple second spectrograms corresponding to each first partial spectrogram.
  • the input data includes first input data and second input data
  • the processing unit 940 is specifically configured to: convert each of a plurality of second spectrograms corresponding to the first global spectrogram Perform inverse frequency domain transformation on the second spectrogram to obtain a plurality of second images.
  • the inverse frequency domain transformation is the inverse process of the global frequency domain transformation; and the plurality of second images are spliced to obtain the first One input data; for each first partial spectrogram, determine the energy of each second spectrogram in the multiple second spectrograms corresponding to the first partial spectrogram; according to the multiple corresponding to the first partial spectrogram The energy of the second spectrogram is obtained to obtain the feature vector corresponding to the first partial spectrogram; the feature vectors corresponding to the multiple first partial spectrograms are reassembled to obtain the second input data.
  • the judging unit 950 is specifically configured to: perform cross-fusion processing on the first input data and the second input data to obtain a second feature map and a third feature map; The second feature map and the third feature map determine the authenticity of the first face image.
  • the judging unit 950 is specifically configured to: perform a first cross of the first input data and the second input data Fusion processing to obtain a fourth feature map and a fifth feature map; use the fourth feature map and the fifth feature map as the input data for the next cross fusion processing, and after performing the cross fusion processing multiple times, Obtain the second characteristic map and the third characteristic map.
  • the judging unit 950 is specifically configured to: perform feature extraction on the first input data to obtain a sixth feature map; perform feature extraction on the second input data to obtain a seventh feature map; According to the sixth feature map and the seventh feature map, a first matrix is obtained, and the first matrix is used to represent the correlation between the sixth feature map and the seventh feature map; according to the The first matrix and the seventh feature map are used to obtain an eighth feature map, and the eighth feature map and the sixth feature map are superimposed to obtain the fourth feature map; according to the first matrix and The sixth characteristic map is used to obtain a ninth characteristic map, and the ninth characteristic map and the seventh characteristic map are superimposed to obtain the fifth characteristic map.
  • the judging unit 950 is specifically configured to: process the second feature map and the third feature map, and determine the trueness of the first face image according to the processed feature map. Pseudo, wherein the processing includes at least one of the following: splicing or pooling.
  • the filtering unit 930 is specifically configured to: perform multiple filtering processing on the first spectrogram through multiple sets of filters, where each set of filters corresponds to one filtering process; each set of filters
  • the filter parameters include preset parameters and reference parameters, each set of filters is used to separate frequency band information corresponding to the preset parameters from the first spectrogram, and the reference parameters are used to compensate for the frequency band information, any The frequency band information separated by the two sets of filters are different, and the multiple frequency band information separated by the multiple sets of filters include all frequency band information in the first spectrogram.
  • the filter parameters of each set of filters are different.
  • the relevant part can refer to the part of the description of the method embodiment.
  • the embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to realize any face recognition as recorded in the above method embodiments. Part or all of the steps in the method of image authenticity.
  • the computer-readable storage medium may be a non-volatile storage medium.
  • the embodiments of the present application also provide a computer program product.
  • the computer program product includes a non-transitory computer-readable storage medium storing a computer program.
  • the computer program is operated to cause a computer to execute any of the methods described in the foregoing method embodiments. A part or all of the steps of a method for identifying the authenticity of a face image.
  • the disclosed device may be implemented in other ways.
  • the device embodiments described above are merely illustrative, for example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be realized in the form of hardware or software program module.
  • the integrated unit is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer readable memory.
  • the technical solution of the present application essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, A number of instructions are included to enable a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
  • the program can be stored in a computer-readable memory, and the memory can include: a flash disk , Read-Only Memory (ROM), Random Access Memory (RAM), magnetic disk or optical disk, etc.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • magnetic disk or optical disk etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Computational Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Algebra (AREA)
  • Multimedia (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Evolutionary Biology (AREA)
  • Human Computer Interaction (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Discrete Mathematics (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)
  • Collating Specific Patterns (AREA)

Abstract

本申请公开了一种识别人脸图像真伪的方法、装置及介质和程序产品。该方法包括:获取第一人脸图像;对所述第一人脸图像进行频域变换,得到第一频谱图;分别对所述第一频谱图进行多次滤波处理,得到多个第二频谱图;根据所述多个第二频谱图,得到输入数据;根据所述输入数据,确定所述第一人脸图像的真伪。

Description

识别人脸图像真伪的方法、装置及介质和程序产品
相关申请的交叉引用
本专利申请要求于2020年6月10日提交的、申请号为202010527530.7、发明名称为“识别人脸图像真伪的方法、装置及介质”的中国专利申请的优先权,该申请的全文以引用的方式并入本文中。
技术领域
本申请涉及图像识别技术领域,具体涉及识别人脸图像真伪的方法、装置及介质和程序产品。
背景技术
随着机器学习和计算机视觉技术的进步,越来越多的面部伪造技术兴起。通过面部伪造技术可以逼真地更换人脸或是修改面部表情、嘴形,等等。例如,可以通过面部伪造技术将视频中A的脸更换为B的脸。
但是,这种面部伪造技术会极大的侵犯他人的肖像权和名誉权。为了对面部图像伪造进行识别,目前,广泛使用图像的频域信息来识别面部图像是否是伪造的。例如,对图像进行离散余弦变换(Discrete Cosine Transform,DCT),提取图像的频域信息,通过该频域信息对该图像的边缘和纹理进行分析,在边缘或纹理异常的情况下,可以确定该图像是伪造的。但是,对于一些低质量的图像,例如,经过压缩的图像,在确定边缘或纹理异常的情况下,并不能完全确定该图像是伪造。
发明内容
本申请实施例提供了一种识别人脸图像真伪的方法、装置及介质。通过多组滤波器对频谱图进行滤波处理,得到多个频段信息,进而提高对对人脸图像真伪识别的精度。
第一方面,本申请实施例提供一种识别人脸图像真伪的方法,包括:获取第一人脸图像;对所述第一人脸图像进行频域变换,得到第一频谱图;分别对所述第一频谱图进行多次滤波处理,得到多个第二频谱图;根据所述多个第二频谱图,得到输入数据;根据所述输入数据,确定所述第一人脸图像的真伪。
第二方面,本申请实施例提供识别人脸图像真伪的装置,包括:获取单元,用于获取第一人脸图像;变换单元,用于对所述第一人脸图像进行频域变换,得到第一频谱图;滤波单元,用于分别对所述第一频谱图进行多次滤波处理,得到多个第二频谱图;处理单元,用于根据所述多个第二频谱图,得到输入数据;判断单元,用于根据所述输入数据,确定所述第一人脸图像的真伪。
第三方面,本申请实施例提供一种识别人脸图像真伪的装置,包括处理器、存储器、 通信接口以及一个或多个程序,其中,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述程序包括用于执行如第一方面所述的方法中的步骤的指令。
第四方面,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序使得计算机执行如第一方面所述的方法。
第五方面,本申请实施例提供一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,操作所述计算机来使所述计算机执行如第一方面所述的方法。
实施本申请实施例,具有如下有益效果:可以看出,在本申请实施例中,通过多组滤波器对该第一频谱图进行多次滤波处理,得到多个第二频谱图。因此,该多个第二频谱图的频段信息不同;根据该多个第二频谱图得到输入数据,故该输入数据中包含有该第一频谱图的多个频段信息,又根据该输入数据识别第一人脸图像的真伪,即利用多个频段信息识别第一人脸图像的真,进而提高识别第一人脸图像的真伪的精度,降低误识别率。
附图说明
图1为本申请实施例提供的一种识别人脸图像真伪的方法的流程示意图。
图2为本申请实施例提供的一种滤波处理的示意图。
图3为本申请实施例提供的一种设定第二预设参数的流程示意图。
图4为本申请实施例提供的一种交叉融合处理的示意图。
图5为本申请另一实施例提供的一种识别人脸图像真伪的方法的示意图。
图6为本申请实施例提供的一种全局频域变换分支的示意图。
图7为本申请实施例提供的一种局部频域变换分支的示意图。
图8为本申请实施例提供的一种识别人脸图像真伪的装置的结构示意图。
图9为本申请实施例提供的一种识别人脸图像真伪的装置的功能单元组成框图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请的说明书和权利要求书及所述附图中的术语“第一”、“第二”、“第三” 和“第四”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结果或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。
图1为本申请实施例提供的一种识别人脸图像真伪的方法的流程示意图。该方法应用于识别人脸图像真伪的装置。该方法包括以下步骤。
101:获取第一人脸图像。
102:对第一人脸图像进行频域变换,得到第一频谱图。
该频域变换包括但不限于以下一种:DCT、傅里叶变换(Fourier Transformation),快速傅里叶变换(Fast Fourier Transform,FFT)。本申请中以该频域变换为DCT为例进行说明。
进一步地,该频域变换包括全局频域变换和/或局部频域变换。全局频域变换是指对该第一人脸图像整体进行频域变换,得到一个第一频谱图。局部频域变换是对该第一人脸图像中的多个部分区域进行频域变换,得到多个第一频谱图。在一些例子中,局部频域变换可以使用滑动窗口在该第一人脸图像进行滑动,对每次滑动该滑动窗口所框选到的部分区域进行频域变换。因此,该局部频域变换可以是滑动窗口离散余弦变换(Slide Window Discrete Cosine Transform,SWDCT)。
此外,在一些例子中,还可以不使用滑动窗口对该第一人脸图像的多个区域进行频域变换,例如,该区域可以为预先设定好的区域、细节信息较多的区域、或者重点关注的区域,本申请对此不做限定。因此,在对该第一人脸图像进行局部频域变换的情况下,得到的第一频谱图的数量可以为或多个。
为了便于区分全局频域变换和局部频域变换得到的第一频谱图,在本申请后续部分中,将局部频域变换得到的第一频谱图称作第一局部频谱图;将全局频域变换得到的第一频谱图称作第一全局频谱图。
需要说明,在对该第一人脸图像进行全局频域变换和局部频域变换的情况下,可以先进行全局频域变换,也可以先进行局部频域变换,或者并行进行全局频域变换和局部频域变换,本申请不对频域变换的顺序进行限定。
103:分别对第一频谱图进行多次滤波处理,得到多个第二频谱图。
示例性的,在仅对该第一人脸图像进行全局频域变换,也就是说该第一全局频谱图是通过全局频域变换得到的情况下,则可通过与该全局频域变换对应的多组滤波器对该第一全局频谱图进行多次滤波处理,得到该多个第二频谱图。本申请中,将与该全局频域变换对应的多组滤波器称作多组第一滤波器,后面详细介绍通过多组第一滤波器对该第一全局频谱图进行多次滤波处理的过程,在此不做过多描述。通过多组第一滤波器对第一全局频谱图进行滤波,可得到不同频段的第二频谱图,使后续得到的输入数据中包含有该第一全局频谱图中不同频段的信息,也就使该输入数据中包含有丰富的频段信息,进而可提高对第一人脸图像进行真伪鉴别的精度。
示例性的,在仅对该第一人脸图像进行局部频域变换,也就是说该第一局部频谱图是通过局部频域变换得到的情况下,可通过与该局部变换对应的多组滤波器,对每个第一局部频谱图进行多次滤波处理,得到与每个第一局部频谱图对应的多个第二频谱图。本申请中,将与该局部频域变换对应的多组滤波器称作多组第二滤波器,后面详细介绍通过多组第二滤波器对每个第一局部频谱图进行多次滤波处理的过程,在此不做过多描述。
示例性的,在对该第一人脸图像进行全局频域变换和局部频域变换的情况下,也就是说该第一频谱图包括全局频域变换得到的一个第一全局频谱图和局部频域变换得到的多个第一局部频谱图,则需要通过多组第一滤波器对第一全局频谱图进行多次滤波处理,得到与该第一全局频谱图对应的多个第二频谱图;通过多组第二滤波器对每个第一局部频谱图进行多次滤波处理,得到与每个第一局部频谱图对应的多个第二频谱图。因此,在此种情况下,多个第二频谱图包括对全局频域变换得到的第一全局频谱图进行多次滤波处理得到的多个第二频谱图,以及对局部频域变换得到的每个第一局部频谱图进行多次滤波处理得到的多个第二频谱图。
需要说明,上述在对第一频谱图进行多次滤波处理的过程,可以先通过多组第一滤波器对全局频域变换得到的第一全局频谱图进行多次滤波处理,也可以先通过多组第二滤波器对局部频域变换得到的每个第一局部频谱图进行多次滤波处理;当然,也可以并行对全局频域变换处理和局部频域变换得到的第一频谱图进行滤波处理。本申请并不对滤波的顺序进行限定。
其中,上述涉及的滤波处理过程,每次滤波处理可以得到一个第二频谱图,每组滤波器对应一次滤波处理。
104:根据多个第二频谱图,得到输入数据。
示例性的,在该多个第二频谱图仅包括与第一全局频谱图对应的多个第二频谱图的情况下,可对该多个第二频谱图中的每个第二频谱图进行频域反变换,得到多个第二图像,其中,该频域反变换为该全局频域变换的逆过程。然后,对该多个第二图像进行拼接,得到该输入数据。在本申请中,将通过全局频域变换得到的输入数据称作第一输入 数据。
示例性的,在该多个第二频谱图仅包括与该第一局部频谱图对应的多个第二频谱图的情况下,则可确定每个第二频谱图的能量,根据对应于每个第一局部频谱图的多个第二频谱图的能量,得到每个第一局部频谱图对应的特征向量;然后,将该多个第一局部频谱图对应的特征向量进行重新装配(re-assemble),得到该输入数据。在本申请中,将通过局部频域变换得到的输入数据称作第二输入数据。
需要说明的是,在重新装配后得到的第二输入数据的尺寸与该神经网络所规定的尺寸不匹配的情况下,则需要对重新装配后得到的第二输入数据进行通道转换,以使第二输入数据的尺寸与该神经网络所规定的尺寸匹配,并将通道转换后的数据作为该第二输入数据。后续所提到的第二输入数据均是经过相应的通道转换,得到与该神经网络所规定的尺寸匹配的输入数据。
示例性的,在该多个第二频谱图包括与该全局频域变换对应的多个第二频谱图以及与该局部频域变换对应的多个第二频谱图的情况下,则该输入数据包括上述的第一输入数据和第二输入数据,且得到该第一输入数据和该第二输入数据的方式与上述过程类似,不再叙述。
105:根据输入数据,确定第一人脸图像的真伪。
确定该第一人脸图像的真伪本质上就是确定该第一人脸图像是否为原始的人脸图像,即确定该第一人脸图像是否被替换过、修改过或是被翻拍过等。
可以看出,在本申请实施例中,通过多组滤波器对该第一频谱图进行多次滤波处理,得到多个第二频谱图。因此,该多个第二频谱图的频段信息不同;根据该多个第二频谱图得到输入数据,故该输入数据中包含有该第一频谱图的多个频段信息,又根据该输入数据识别第一人脸图像的真伪,即利用多个频段信息识别第一人脸图像的真伪,进而提高识别第一人脸图像的真伪的精度,降低误识别率。
在一些可能的实施方式中,在该输入数据仅包括第一输入数据或第二输入数据的情况下,则可对该输入数据进行特征提取,得到第一特征图;根据该第一特征图确定第一人脸图像的真伪,即根据该第一特征图进行分类,确定第一人脸图像的真伪。
可以看出,通过第一频谱图中的多个频段信息识别第一人脸图像的真伪,而不是用单一的频段信息进行识别,进而提高识别第一人脸图像的真伪的精度。
在一些可能的实施方式中,在该输入数据包括第一输入数据和第二输入数据的情况下,则需要对该第一输入数据和第二输入数据进行交叉融合处理,得到第二特征图和第三特征图;根据该第二特征图和该第三特征图确定该第一人脸图像的真伪。
例如,可将该第二特征图和第三特征图进行拼接,并根据拼接后的特征图确定该第一图像的真伪。即对拼接后的特征图进行特征提取,得到目标特征图,根据该目标特征 图进行分类,确定该第一图像的真伪。
另外,也可以无需对该第二特征图和第三特征图进行拼接。示例性的,可同时对该第二特征图和第三特征图进行池化处理,得到目标特征图,相当于在池化过程对该第二特征图和该第三特征图进行了融合;然后,根据该目标特征图进行分类,确定该第一图像的真伪。
可以看出,将第一人脸图像的全局频域信息和局部频域信息进行交叉融合处理,从而交叉融合后的第二特征图和第三特征图包含有更多频段信息,进而可以提高识别第一人脸图像的真伪的精度。而且,全局频域变换会提取出该第一人脸图像中更细节的频段信息,进一步提高识别精度。此外,局部频域变换过程会使用滑动窗口对第一人脸图像进行框选,因此,每个第一局部频谱图的特征向量,还包含有空间位置信息(滑动窗口在第一人脸图像中框选的位置),也就使该第二输入数据包含有空间位置信息,从而目标特征图所包含的信息更加丰富。
在一些可能的实施方式中,该交叉融合处理的次数可以为多次,则得到该二特征图和第三特征图的实现过程可以为:对该第一输入数据和该第二输入数据进行第一次交叉融合处理,得到第四特征图和第五特征图;将该第四特征图和该第五特征图作为下次交叉融合处理的输入数据,并在进行多次该交叉融合处理后,得到该第二特征图和该第三特征图。
下面以对第一输入数据和第二输入数据进行第一次交叉融合处理说明交叉融合处理的具体过程,其他次交叉融合处理的实现过程与该第一次交叉融合处理的过程类似,不再叙述。
对该第一输入数据进行特征提取,得到第六特征图;对该第二数据输入数据进行特征提取,得到第七特征图。需要说明,对第一输入数据和第二输入数据进行特征提取的过程并无先后顺序;根据该第六特征图和第七特征图得到第一矩阵,该第一矩阵用于表示第六特征图和第七特征图之间的相关性。即该第六特征图和第七特征图本质上为两个矩阵,该第一矩阵则为该两个矩阵之间的互相关系数。根据该第一矩阵和该第七特征图,得到第八特征图,即将该第一矩阵与该第七特征图进行对应元素相乘,可得到该第八特征图,并将该第八特征图和该第六特征图进行叠加,得到该第四特征图。根据该第一矩阵以及该第六特征图,得到第九特征图,即将该第一矩阵与该第六特征图进行对应元素相乘,得到该第九特征图;然后,将该第九特征图与该第七特征图进行叠加,得到该第五特征图。
下面详细介绍本申请中对第一频谱图进行多次滤波处理的过程。
首先说明,本申请中无论是对全局频域变换得到的第一全局频谱图进行多次滤波处理,还是对局部频域变换得到的第一局部频谱图进行多次滤波处理,都是使用多组滤波器对频谱图进行多次滤波处理。因此,对第一全局频谱图和/或第一局部频谱图进行多次 滤波处理过程包括:通过多组滤波器,对第一全局频谱图和/或第一局部频谱图进行多次滤波处理,其中,每组滤波器的滤波参数包括预设参数和参考参数,该参考参数即为网络参数,是对神经网络进行预先训练得到的,后续详细描述如何得到该参考参数,在此不做过多描述。此外,每组滤波器用于从第一全局频谱图和/或第一局部频谱图中分离出与该预设参数对应的频段信息,该参考参数用于对该频段信息进行补偿,且任意两组滤波器分离出的频段信息不同,且该多组滤波器分离出的多个频段信息包括该第一全局频谱图和/或第一局部频谱图中的全部频段信息。
虽然在对全局频域变换得到的第一全局频谱图以及局部频域变换得到的第一局部频谱图进行多次滤波处理的过程中,都是通过多组滤波器对第一全局频谱图和/或第一局部频谱图进行多次滤波处理。在实际应用中,相对于不同的频域变换,所使用的滤波器之间的滤波参数不同,且使用的滤波器的数量也不相同。该滤波参数不同是指滤波器之间的预设参数不同、或滤波器之间的参考参数不同、或滤波器之间的预设参数和参考参数均不相同。当然,在实际应用中,在对全局频域处理和局部频域处理滤波器得到的频谱进行滤波的过程中,一般将滤波器之间的预设参数和参考参数均设置为不相同。也就是说,第一滤波器和第二滤波器之间的预设参数和参考参数均不同,且第一滤波器的数量和第二滤波器的数量也不同。因此,为了便于区分,可将第一滤波器的预设参数和参考参数,称作第一预设参数和第一参考参数;将第二滤波器的预设参数和参考参数,称作第二预设参数和第二参考参数。下面分别介绍通过多组第一滤波器和多组第二滤波器进行滤波的过程。
示例性的,通过每组第一滤波器的第一预设参数提取该全局频域变换得到的第一全局频谱图的第一频段信息,并通过该第一参考参数对该第一频段信息进行补偿,从而得到与该组第一滤波器对应的第二频谱图,即通过该第一参考参数提取该第一全局频谱图中的第三频段信息,并将该第一频段信息和该第三频段信息进行叠加得到该第二频谱图。另外,任意两组第一滤波器之间的第一预设参数不同,也就是说任意两组第一滤波器提取到的第一频段信息不同,且多组滤波器提取到的多个第一频段信息包括该第一全局频谱图中的全部频段信息,即将该多个第一频段信息进行组合,可得到该第一全局频谱图中的全部频段信息。
在实际应用中,也可以先将每组第一滤波器的第一预设参数和第一参考参数进行叠加,并使用叠加后的参数对该第一全局频谱图进行滤波处理,直接得到与该组第一滤波器对应的该第二频谱图。
其中,通过该第一预设参数提取第一频段信息就是使用该第一预设参数与该第一全局频谱图进行对应位置元素乘法运算,滤除该第一全局频谱图中的部分频段信息,保留部分频段信息,保留的部分频段信息也就是该第一频段信息。
其中,该第一预设参数可以是一个与该第一全局频谱图规模相同的二值矩阵。示例 性的,第一预设参数为[0,1/16],则[0,1/16]表示该矩阵中的左上角的1/16部分取值为1,其他部分取值为0。如图2所示,与该第一预设参数对应的矩阵中的黑色部分代表取值为0,白色部分代表1。另外,由于该第一全局频谱图210是对第一人脸图像进行DCT变换得到的。对任意一张图像进行DCT变换,得到的频谱图中的左上角部分为该图像的低频信息、中间部分为该图像的中频信息、右下角为该图像的高频信息。因此,可通过多组不同的第一滤波器,对同一个第一全局频谱图进行多次滤波处理,可得到与该第一全局频谱图对应的多个不同的第二频谱图。如图2所示,假设第一组第一滤波器220的第一预设参数为[0,1/16],则使用该组第一滤波器220的第一预设参数与第一全局频谱图210进行对应元素相乘,可以保留该第一全局频谱图210左上角1/16部分区域的频段信息,即保留下来的低频信息,滤除该第一全局频谱图中的其他频段信息,得到与该组第一滤波器220对应的第二频谱图230,该第二频谱图230中的白色部分即为低频信息。再如,如图2所示,最后一组第一滤波器22n的第一预设参数为[1/8,1],因此,使用该组第一滤波器22n的第一预设参数对与第一全局频谱图210进行对应元素相乘,可以保留该第一全局频谱图210右下角7/8部分区域的频段信息,即保留高频信息,滤除该第一全局频谱图210中的其他频段信息,得到与该组第一滤波器22n对应的第二频谱图23n,该第二频谱图23n中的白色部分即为保留下来的高频信息。后续使用滤波器对频谱图进行滤波的过程可参见图2所示的滤波过程,不再详细叙述。
因此,可以设计多组第一滤波器对该第一全局频谱图像进行滤波处理,得到多个频段信息互不相同的第二频谱图。示例性的,在分离该第一全局频谱图的低频信息、中频信息和高频信息的情况下,可以设计三组第一滤波器进行滤波处理。例如,该三组第一滤波器的第一预设参数分别为
Figure PCTCN2021086893-appb-000001
因此,
Figure PCTCN2021086893-appb-000002
用于分离该第一全局频谱图中的低频信息,
Figure PCTCN2021086893-appb-000003
用于分离该第一全局频谱图中的中频信息,
Figure PCTCN2021086893-appb-000004
用于分离该第一全局频谱图中的高频信息。该三组第一预设参数仅为举例说明,在实际应用中,也可以对该第一全局频谱图进行等分滤波,即设计使三组滤波器的第一预设参数之间的间距相同,则第一预设参数分别为[0,1/3],[1/3,2/3],[2/3,1]。
因此,每组第一滤波器的第一预设参数可根据所要分离的频段信息提前设定好。例如,可以将第一预设参数分别设置为
Figure PCTCN2021086893-appb-000005
这样可以保证滤波处理后得到的三个第二频谱图的能量相同。从而对该三个第二频谱图进行拼接后得到的第一输入数据中,每层数据之间的能量差异不会过大,满足空间上的连续性,便于后续提取该第一输入数据的特征。
此外,每组第一滤波器可包括一个基础滤波和一个可调滤波器,其中,该基础滤波器的滤波参数为该组第一滤波器的第一预设参数,该可调滤波的滤波参数为该组第一滤波器的第一参考参数。
其中,每组第一滤波器可以通过公式(1)表示:
Figure PCTCN2021086893-appb-000006
其中,f i为多组第一滤波器中的第i组第一滤波器,
Figure PCTCN2021086893-appb-000007
为该第i组第一滤波的第一预设参数,即基础滤波器,
Figure PCTCN2021086893-appb-000008
为该第i组第一滤波的第一参考参数,即可调滤波器;σ为压缩函数,用于将第一参考参数的取值压缩到预设范围。例如,σ(x)=(1-e x)/(1+e x),i的取值为1~N的整数,N为该多组第一滤波器的数量。例如,在上面的分离高中低频信息的例子中,N为3。
由于,第一参考参数只是对频段信息进行补偿,也就是说,每组第一滤波器分离出的频段信息的范围是由每组第一滤波器中的基础滤波器决定的。这样也就保证提前划分好多组第一滤波器后,可以提取到该第一全局频谱图的全部频段信息。因此,使用压缩函数σ主要是将该第一参考参数的取值压缩到[-1,1],从而避免第一参考参数的取值过大,在与基础滤波器叠加之后,导致每组第一滤波器的滤波参数最终由该第一参考参数决定,也就造成分离出的频段信息的范围是由可调滤波器决定的,也就可能导致无法提取到该第一全局频谱图的全部频段信息。
结合公式(1),对第一全局频谱图进行多次滤波处理可以通过公式(2)表示:
Figure PCTCN2021086893-appb-000009
其中,s i为该多组第一滤波器中与第i组第一滤波器对应的第二频谱图,x为第一人脸图像,D(x)为对第一人脸图像的整体做频域变换,也就是第一全局频谱图,⊙为矩阵之间的点乘,即对应元素相乘(element-wise product)。
此外,频域反变换为该全局变换的逆过程,则结合公式(2),得到第二图像的过程可通过公式(3)表示:
Figure PCTCN2021086893-appb-000010
其中,x为第一人脸图像,y i为与第i组第一滤波器对应的第二图像,D(x)为全局频域变换,D -1为频域反变换,⊙为矩阵之间的点乘,即对应元素相乘。
示例性的,与第一滤波器类似的,可通过每组第二滤波器提取每个第一局部频谱图中与第二预设参数对应的第二频段信息,通过该组第二滤波器的第二参考参数对该组滤波器提取到的第二频段信息进行补偿,得到与该第二滤波器对应的第二频谱图。即通过该第一参考参数提取该第一局部频谱图中的第四频段信息,并将该第二频段信息和该第四频段信息进行叠加得到该第二频谱图。其中,该第二参考参数也是网络参数,也是预先训练得到。另外,任意两组第二滤波器的第二预设参数不同,则任意两组第二滤波器提取到的第二频段信息不同。而且,该多组第二滤波器提取到的多个第二频段信息包括每个第一局部频谱图中的全部频段信息,即将该多个第二频段信息进行组合,可得到每个第一局部频谱图的全部频段信息。
此外,每组第二滤波器也包括一个基础滤波和一个可调滤波器,其中,该基础滤波器的滤波参数为该组第二滤波器的第二预设参数,该可调滤波的滤波参数为该组第二滤波器的第二参考参数。
其中,每组第二滤波器可通过公式(4)表示:
Figure PCTCN2021086893-appb-000011
其中,h i为多组第二滤波器中的第i组第二滤波器,
Figure PCTCN2021086893-appb-000012
为该第i组第二滤波器的第二预设参数,即基础滤波器,
Figure PCTCN2021086893-appb-000013
为该第i组第二滤波器的参考参数,即可调滤波器,σ为压缩函数。
结合公式(4),对每个第一目标频谱进行多次滤波处理的过程可以通过公式(5)表示:
Figure PCTCN2021086893-appb-000014
其中,g i为与每个第一局部频谱图对应的多个第二频谱图中的第i个第二频谱图,p为对该第一人脸图像进行第p次框选得到的图像区域,D(p)为对局部图像做频域变换,也就是该第一局部频谱图,⊙为矩阵之间的点乘,即对应元素相乘。
在一些可能的实施方式中,该多组第二滤波器的第二预设参数是提前设定好的。示例性的,对第二预设参数的设定可以依据设定的第二滤波器的数量,沿着该第一局部频谱图的对角线进行等距离划分得到。如图3所示,局部频谱图在设置8组第二滤波器的情况下,则可将对角线进行等距离移动,可确定出每组第二滤波器的第二预设参数,且该8组第二滤波器的第二预设参数分别为:[0,1/32]、[1/32,1/8]、[1/8,9/32]、[9/32,1/2]、[1/2,23/32]、[23/32,28/32]、[28/32,31/32]、[31/32,1]。
当然,在设定第二预设参数的过程中,也可不进行等距离划分。比如,可以按照等差递增的方式将对角线进行移动,得到第二预设参数,或者,按照等差递减的方式将对角线进行移动,得到第二预设参数,或者,其他的移动方式。本申请不对设定第二预设参数的方式进行限定。
然后,确定每个第一局部频谱图对应的多个第二频谱图中每个第二频谱图的能量,得到多个能量;将该多个能量组成特征向量,则可得到每个第一局部频谱图对应的特征向量。由于每个第二频谱图对应的频段信息不同,因此该特征向量本质上由该第一局部频谱图中各个频段对应的能量组成。
其中,每个第二频谱图的能量可通过公式(6)表示:
Figure PCTCN2021086893-appb-000015
其中,q i为与每个第一局部频谱图对应的多个第二频谱图中的第i个第二频谱图的能量, || || 1为矩阵的一范数,即矩阵中各个元素的绝对值之和,即求频谱图的能量,i的取值为1~M中的整数,M为该多个第二频谱图的数量,即第二滤波器的数量,⊙为矩阵之间的点乘,即对应元素相乘。
其中,log10是为了使不同频段的能量落在同一数量级,防止有些频段的能量过高,而有些频段的能量过低,给后续处理带来不便。
对于每个第一局部频谱图,在获得其对应的多个第二频谱图的能量之后,也就是获得各个q i之后,可以将各个q i联合起来当做一个1×1×M的特征向量。在得到所有第一局部频谱图的特征向量之后,将这些特征向量根据第二预设参数的频段重新组成新的矩阵以作为第二输入数据。示例性的,如图7所示,可以将每个第一局部频谱图对应的第i个第二频谱图的能量重新装配到同一通道,因此通道的数量等于M。假设共有A×B个第一局部频谱图,则第二输入数据为A×B×M的矩阵。
需要说明,第一滤波器是对全局频域变换的第一全局频谱图进行滤波处理。所以,第一滤波器是对全局的频段信息进行滤波处理,可以对第一全局频谱图的频段信息进行粗略的划分。例如,可以划分为高频、中频、低频。因此,可以将第一滤波器的数量设置的相对较少。而第二滤波器是对局部变换的第一局部频谱图进行滤波处理,所以,第二滤波器是对局部的频段信息进行滤波,是想从第一局部频谱图中提取更细节的频域信息。因此,需要对第一局部频谱图的频段信息进行精细的划分,也就需要将第二滤波器的数量设置的相对较多。
在一些可能的实施方式中,上述识别人脸图像真伪的过程可以通过神经网络来实现。该神经网络包括第一网络和第二网络。其中,对该神经网络的训练过程为现有的有监督训练,不再叙述。
在实际使用中,将第一人脸图像输入到第一网络进行频域变换,得到第一频谱图,并对第一频谱图进行过多次滤波处理,得到多个第二频谱图,并根据该多个第二频谱图得到输入数据;然后,将该输入数据输入到第二网络,确定第一人脸的真伪。
示例性的,该第一网络可以为能够进行频域变换和滤波的神经网络。对于本申请来说,由于引入了可调滤波器,需要在训练该神经网络的同时,训练可调滤波器的的第一参考参数和第二参考参数;然后,在训练的过程中,对该神经网络的第一参考参数和第二参考参数进行优化,在训练完成后,可通过该第一网络对第一人脸图像进行频域变换以及对第一频谱图进行多次滤波处理,得到输入数据。
在实际应用中,对第一人脸图像进行频域变换以及对第一频谱图进行多次滤波处理,也可以通过封装好的函数实现。也就是相当于,在对第一网络完成训练后,将该第一网络的多组滤波器(包括多组第一滤波器和多组第二滤波器)的滤波参数封装为函数,后续可使用该函数直接对该人脸图像进行频域变换以及滤波处理。因此,实际应用中,第一网络可以由神经网络实现,也可以由确定了参数的函数实现,本申请对此不作限制。
下面介绍通过第二网络确定第一人脸的真伪的过程。
示例性的,该第二网络可以为卷积神经网络。如图4所示,该第二网络以Xception网络作为该卷积神经网络的主干。该第二网络包括两个分支和多个交叉融合处理模块。其中,每个分支包括多个网络块(block),每个block包括多个卷积层和池化层,且该block为现有的网络结构,不再展开描述。且该两个分支分别与第一输入数据401和第二输入数据402对应。
在该输入数据为第一输入数据401的情况下,则可通过第一个分支对该第一输入数据进行特征提取,即通过第一分支的多个block 411进行特征提取,并直接根据提取到的特征确定该第一人脸图像的真伪。在此情况下,不涉及交叉融合处理440。
在该输入数据为第二输入数据402的情况下,则可通过第二个分支对该第一输入数据进行特征提取,即通过第二分支的多个block 412进行特征提取,并直接根据提取到的特征图确定该第一人脸图像的真伪。在此情况下,不涉及交叉融合处理440。
在该输入数据包括第一输入数据和第二输入数据的情况下,分别通过每个分支的block对第一输入数据401和第二输入数据402进行特征提取,可以得到第六特征图421和第七特征图422。然后,通过交叉融合处理440,对该第六特征图421和第七特征图422进行第一次交叉融合,得到第四特征图431和第五特征图432。后续,将该第四特征图431和第五特征图432作为下次交叉融合处理的输入数据,继续进行交叉融合处理440,直至得到两个分支对应的第二特征图451和第三特征图452。最后,将该第二特征图451和第三特征图452进行拼接或池化处理,根据拼接或池化处理后的特征图确定该第一人脸图像的真伪。
可以看出,相对于现有对频域信息进行拼接方式,本申请中是将全局频域变换和局部频域变换得到的频域信息进行交叉融合,即将两个频域变换得到的频域信息互相融合,从而使得到的第二特征图和第三特征图均包含有该第一频谱图中的全局频域信息和局部频域信息,可提高识别该第一人脸图像真伪的精度。
下面结合图5-图7,详细说明本申请的识别人脸图像真伪的过程。
如图5所示,通过两个变换分支对第一人脸图像510分别进行频域变换以及滤波处理,即对第一人脸图像510进行全局频域变换和局部频域变换,并进行一系列的滤波处理,得到与全局频域变换这个分支520对应的第一输入数据521,以及与局部频域变换这个分支530对应的第二输入数据531。然后,将该第一输入数据521和第二输入数据531分别输入到各自分支对应的卷积网络541和542,进行特征提取,并对提取到的特征进行交叉融合处理543,最后得到两个分支的第二特征图544和第三特征图545;并对第二特征图544和第三特征图545进行同步池化处理550,得到目标特征图551;最后,根据该目标特征图551对第一人脸图像510真伪进行预测560,以确定该第一人脸图像510的真伪。
图6是全局频域变换这个分支520的细化过程。如图6所示,首先对第一人脸图像510进行DCT变换620,得到第一全局频谱图621;然后,通过多组第一滤波器630(图6仅示出了三组第一滤波器)对该第一全局频谱图621进行多次滤波处理,得到多个第二频谱图631;最后,对该多个第二频谱图631中的每个第二频谱图进行频域反变换640,得到多个第二图像641,并将该多个第二图像641进行拼接,得到第一输入数据。
图7是局部频域变换这个分支530的细化过程。如图7所示,首先对该第一人脸图像510进行SWDCT变换720,得到多个第一局部频谱图721。然后,通过多组第二滤波器731对每个第一局部频谱图721进行多次滤波处理730,得到每个第一局部频谱图对应的多个第二频谱图,并确定每个第二频谱图的能量(图7中的滤波处理730包含了计算能量的步骤)。根据相对应于每个第一局部频谱图的多个第二频谱图的能量732,确定每个第一局部频谱图的特征向量(如732中每个小格里面的6个柱状图所示,每个柱子代表一个第二频谱图的能量)。最后,将该多个第一局部频谱图对应的特征向量进行重新装配,根据第二预设参数的频段,将频段相同的数据合并到同一个通道,从而得到第二输入数据532。
下面结合本申请识别人脸真伪的方法,介绍本申请技术方案的应用场景。
在一些可能的实施方式中,在该第一人脸图像为用户的肖像图像的情况下,可基于本申请的技术方案对该肖像图像进行识别,在确定该肖像图像为伪图像的情况下,可以根据具体的应用场景,有不同的对策。比如用户认证的场景下,可以拒绝使用该伪图像的用户进入系统。更进一步的,在某些情况下,还可以确定他人对该肖像图像进行了修改,有可能侵犯了该用户的肖像权,可对恶意进行肖像图像修改的行为进行追责。
在一些可能的实施方式中,在该第一人脸图像为待识别视频的任意一帧或是特定一帧人脸图像的情况下,可基于本申请的技术方案对该人脸图像进行识别,在确定该人脸图像,即本申请所指的第一人脸图像为伪图像的情况下,确定他人对该待识别视频进行了修改,可对他人篡改视频作品的行为进行追责。
图8为本申请实施例提供的一种识别人脸图像真伪的装置的结构示意图。如图8所示,装置800包括处理器810、存储器820、通信接口830以及一个或多个程序,处理器810、存储器820和通信接口830通过总线840相互连接。其中,上述一个或多个程序被存储在上述存储器820中,并且被配置由上述处理器810执行,上述程序包括用于执行以下步骤的指令:获取第一人脸图像;对所述第一人脸图像进行频域变换,得到第一频谱图;分别对所述第一频谱图进行多次滤波处理,得到多个第二频谱图;根据所述多个第二频谱图,得到输入数据;根据所述输入数据,确定所述第一人脸图像的真伪。
在一些可能的实施方式中,所述频域变换包括如下至少一项:全局频域变换和局部频域变换。
在一些可能的实施方式中,在频域变换包括所述全局频域变换的情况下,所述根据 所述多个第二频谱图,得到输入数据包括:对每个所述第二频谱图进行频域反变换,得到第二图像,所述频域反变换为所述全局频域变换的逆过程;将多个第二图像进行拼接,得到所述输入数据。
在一些可能的实施方式中,在所述频域变换包括所述局部频域变换的情况下,所述第一频谱图的数量为多个;在对所述第一频谱图进行多次滤波处理,得到多个第二频谱图包括:分别对所述多个第一频谱图中的每个第一频谱图进行多次滤波处理,得到与每个第一频谱图对应的多个第二频谱图。
在一些可能的实施方式中,根据所述多个第二频谱图,得到输入数据包括:确定每个第二频谱图的能量;将每个第一频谱图作为第一局部频谱图,根据对应于所述第一局部频谱图的多个第二频谱图的能量,得到所述第一局部频谱图对应的特征向量;将多个第一局部频谱图对应的特征向量进行重新装配,得到所述输入数据。
在一些可能的实施方式中,根据所述输入数据,确定所述第一人脸图像的真伪包括:对所述输入数据进行特征提取,得到第一特征图;根据所述第一特征图,确定所述第一人脸图像的真伪。
在一些可能的实施方式中,在所述频域变换包括所述全局频域变换和所述局部频域变换的情况下,所述全局频域变换得到一个第一全局频谱图,所述局部频域变换得到多个第一局部频谱图,分别对所述第一频谱图进行多次滤波处理,得到多个第二频谱图包括:对所述第一全局频谱图进行多次滤波处理,得到与所述第一全局频谱图对应的多个第二频谱图;对所述多个第一局部频谱图进行多次滤波处理,得到与每个第一局部频谱图对应的多个第二频谱图。
在一些可能的实施方式中,输入数据包括第一输入数据和第二输入数据,所述根据所述多个第二频谱图,得到输入数据包括:将与所述第一全局频谱图对应的多个第二频谱图中每个第二频谱图进行频域反变换,得到多个第二图像,所述频域反变换为所述全局频域变换的逆过程;将所述多个第二图像进行拼接,得到所述第一输入数据;对于每个第一局部频谱图,确定所述第一局部频谱图对应的多个第二频谱图中每个第二频谱图的能量;根据所述第一局部频谱图对应的多个第二频谱图的能量,得到所述第一局部频谱图对应的特征向量;将多个第一局部频谱图对应的特征向量进行重新装配,得到所述第二输入数据。
在一些可能的实施方式中,根据所述输入数据,确定所述第一人脸图像的真伪包括:对所述第一输入数据和所述第二输入数据进行交叉融合处理,得到第二特征图和第三特征图;根据所述第二特征图和所述第三特征图,确定所述第一人脸图像的真伪。
在一些可能的实施方式中,在所述交叉融合处理的次数为多次的情况下,对所述第一输入数据和所述第二输入数据进行交叉融合处理,得到第二特征图和第三特征图包括:对所述第一输入数据和所述第二输入数据进行第一次交叉融合处理,得到第四特 征图和第五特征图;将所述第四特征图和所述第五特征图作为下次交叉融合处理的输入数据,并在进行多次所述交叉融合处理后,得到所述第二特征图和所述第三特征图。
在一些可能的实施方式中,对所述第一输入数据和所述第二输入数据进行第一次交叉融合处理,得到第四特征图和第五特征图包括:对所述第一输入数据进行特征提取,得到第六特征图;对所述第二输入数据进行特征提取,得到第七特征图;根据所述第六特征图和所述第七特征图,得到第一矩阵,所述第一矩阵用于表示所述第六特征图和所述第七特征图之间的相关性;根据所述第一矩阵以及所述第七特征图,得到第八特征图,并将所述第八特征图和所述第六特征图进行叠加,得到所述第四特征图;根据所述第一矩阵以及所述第六特征图,得到第九特征图,并将所述第九特征图和所述第七特征图进行叠加,得到所述第五特征图。
在一些可能的实施方式中,根据所述第二特征图和所述第三特征图,确定所述第一人脸图像的真伪包括:对所述第二特征图和所述第三特征图进行处理,并根据处理后的特征图确定所述第一人脸图像的真伪,其中所述处理包括以下至少一项:拼接或池化。
在一些可能的实施方式中,多次滤波处理包括:通过多组滤波器,对第一频谱图进行多次滤波处理,其中,每组所述滤波器对应一次滤波处理;每组滤波器的滤波参数包括预设参数和参考参数,每组滤波器用于从第一频谱图中分离出与所述预设参数对应的频段信息,所述参考参数用于对所述频段信息进行补偿,任意两组所述滤波器分离出的频段信息不同,且所述多组滤波器分离出的多个频段信息包括所述第一频谱图中的全部频段信息。
在一些可能的实施方式中,在通过多组滤波器分别对所述第一频谱图进行多次滤波处理的过程中,每组滤波器的滤波参数不相同。
图9为本申请实施例提供的一种识别人脸图像真伪的装置。装置900包括:获取单元910、变换单元920、滤波单元930、处理单元940和判断单元950。获取单元910,用于获取第一人脸图像。变换单元920,用于对所述第一人脸图像进行频域变换,得到第一频谱图。滤波单元930,用于分别对所述第一频谱图进行多次滤波处理,得到多个第二频谱图。处理单元940,用于根据所述多个第二频谱图,得到输入数据;判断单元950,用于根据所述输入数据,确定所述第一人脸图像的真伪。
在一些可能的实施方式中,所述频域变换包括如下至少一项:全局频域变换和局部频域变换。
在一些可能的实施方式中,在所述频域变换包括所述全局频域变换的情况下,处理单元940,具体用于:对每个所述第二频谱图进行频域反变换,得到第二图像,所述频域反变换为所述全局频域变换的逆过程;将所述多个第二图像进行拼接,得到所述输入数据。
在一些可能的实施方式中,在所述频域变换包括所述局部频域变换的情况下,所述第一频谱图的数量为多个;滤波单元930,具体用于:分别对所述多个第一频谱图中的每个第一频谱图进行多次滤波处理,得到与每个第一频谱图对应的多个第二频谱图。
在一些可能的实施方式中,处理单元940,具体用于:确定每个第二频谱图的能量;将每个第一频谱图作为第一局部频谱图,根据对应于所述第一局部频谱图的多个第二频谱图的能量,得到所述第一局部频谱图对应的特征向量;将多个第一局部频谱图对应的特征向量进行重新装配,得到所述输入数据。
在一些可能的实施方式中,判断单元950,具体用于:对所述输入数据进行特征提取,得到第一特征图;根据所述第一特征图,确定所述第一人脸图像的真伪。
在一些可能的实施方式中,在所述频域变换包括所述全局频域变换和所述局部频域变换的情况下,所述全局频域变换得到一个第一全局频谱图,所述局部频域变换得到多个第一局部频谱图,滤波单元930,具体用于:对所述第一全局频谱图进行多次滤波处理,得到与所述第一全局频谱图对应的多个第二频谱图;对所述多个第一局部频谱图进行多次滤波处理,得到与每个第一局部频谱图对应的多个第二频谱图。
在一些可能的实施方式中,所述输入数据包括第一输入数据和第二输入数据,处理单元940,具体用于:将与所述第一全局频谱图对应的多个第二频谱图中每个第二频谱图进行频域反变换,得到多个第二图像,所述频域反变换为所述全局频域变换的逆过程;将所述多个第二图像进行拼接,得到所述第一输入数据;对于每个第一局部频谱图,确定所述第一局部频谱图对应的多个第二频谱图中每个第二频谱图的能量;根据所述第一局部频谱图对应的多个第二频谱图的能量,得到所述第一局部频谱图对应的特征向量;将多个第一局部频谱图对应的特征向量进行重新装配,得到所述第二输入数据。
在一些可能的实施方式中,判断单元950,具体用于:对所述第一输入数据和所述第二输入数据进行交叉融合处理,得到第二特征图和第三特征图;根据所述第二特征图和所述第三特征图,确定所述第一人脸图像的真伪。
在一些可能的实施方式中,在所述交叉融合处理的次数为多次的情况下,判断单元950,具体用于:对所述第一输入数据和所述第二输入数据进行第一次交叉融合处理,得到第四特征图和第五特征图;将所述第四特征图和所述第五特征图作为下次交叉融合处理的输入数据,并在进行多次所述交叉融合处理后,得到所述第二特征图和所述第三特征图。
在一些可能的实施方式中,判断单元950,具体用于:对所述第一输入数据进行特征提取,得到第六特征图;对所述第二输入数据进行特征提取,得到第七特征图;根据所述第六特征图和所述第七特征图,得到第一矩阵,所述第一矩阵用于表示所述第六特征图和所述第七特征图之间的相关性;根据所述第一矩阵以及所述第七特征图,得到第八特征图,并将所述第八特征图和所述第六特征图进行叠加,得到所述第四特征图; 根据所述第一矩阵以及所述第六特征图,得到第九特征图,并将所述第九特征图和所述第七特征图进行叠加,得到所述第五特征图。
在一些可能的实施方式中,判断单元950,具体用于:对所述第二特征图和所述第三特征图进行处理,并根据处理后的特征图确定所述第一人脸图像的真伪,其中所述处理包括以下至少一项:拼接或池化。
在一些可能的实施方式中,滤波单元930,具体用于:通过多组滤波器,对第一频谱图进行多次滤波处理,其中,每组所述滤波器对应一次滤波处理;每组滤波器的滤波参数包括预设参数和参考参数,每组滤波器用于从第一频谱图中分离出与所述预设参数对应的频段信息,所述参考参数用于对所述频段信息进行补偿,任意两组所述滤波器分离出的频段信息不同,且所述多组滤波器分离出的多个频段信息包括所述第一频谱图中的全部频段信息。
在一些可能的实施方式中,在通过多组滤波器分别对所述第一频谱图进行多次滤波处理的过程中,每组滤波器的滤波参数不相同。
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行以实现如上述方法实施例中记载的任何一种识别人脸图像真伪的方法的部分或全部步骤。所述计算机可读存储介质可以是非易失性存储介质。
本申请实施例还提供一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,操作所述计算机程序来使计算机执行如上述方法实施例中记载的任何一种识别人脸图像真伪的方法的部分或全部步骤。
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于可选实施例,所涉及的动作和模块并不一定是本申请所必须的。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨 论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件程序模块的形式实现。
所述集成的单元如果以软件程序模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储器中,存储器可以包括:闪存盘、只读存储器(Read-Only Memory,ROM)、随机存取器(Random Access Memory,RAM)、磁盘或光盘等。
以上对本申请实施例进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (18)

  1. 一种识别人脸图像真伪的方法,其特征在于,包括:
    获取第一人脸图像;
    对所述第一人脸图像进行频域变换,得到第一频谱图;
    分别对所述第一频谱图进行多次滤波处理,得到多个第二频谱图;
    根据所述多个第二频谱图,得到输入数据;
    根据所述输入数据,确定所述第一人脸图像的真伪。
  2. 根据权利要求1所述的方法,其特征在于,所述频域变换包括如下至少一项:全局频域变换和局部频域变换。
  3. 根据权利要求2所述的方法,其特征在于,在所述频域变换包括所述全局频域变换的情况下,所述根据所述多个第二频谱图,得到输入数据,包括:
    对每个所述第二频谱图进行频域反变换,得到第二图像,所述频域反变换为所述全局频域变换的逆过程;
    将多个第二图像进行拼接,得到所述输入数据。
  4. 根据权利要求2所述的方法,其特征在于,在所述频域变换包括所述局部频域变换的情况下,所述第一频谱图的数量为多个;
    所述对所述第一频谱图进行多次滤波处理,得到多个第二频谱图,包括:
    分别对所述多个第一频谱图中的每个第一频谱图进行多次滤波处理,得到与每个第一频谱图对应的多个第二频谱图。
  5. 根据权利要求4所述的方法,其特征在于,所述根据所述多个第二频谱图,得到输入数据,包括:
    确定每个第二频谱图的能量;
    将每个第一频谱图作为第一局部频谱图,根据对应于所述第一局部频谱图的多个第二频谱图的能量,得到所述第一局部频谱图对应的特征向量;
    将多个第一局部频谱图对应的特征向量进行重新装配,得到所述输入数据。
  6. 根据权利要求1-5中任一项所述的方法,其特征在于,所述根据所述输入数据,确定所述第一人脸图像的真伪,包括:
    对所述输入数据进行特征提取,得到第一特征图;
    根据所述第一特征图,确定所述第一人脸图像的真伪。
  7. 根据权利要求2所述的方法,其特征在于,在所述频域变换包括所述全局频域变换和所述局部频域变换的情况下,所述全局频域变换得到一个第一全局频谱图,所述 局部频域变换得到多个第一局部频谱图,所述分别对所述第一频谱图进行多次滤波处理,得到多个第二频谱图,包括:
    对所述第一全局频谱图进行多次滤波处理,得到与所述第一全局频谱图对应的多个第二频谱图;
    对所述多个第一局部频谱图进行多次滤波处理,得到与每个第一局部频谱图对应的多个第二频谱图。
  8. 根据权利要求7所述的方法,其特征在于,所述输入数据包括第一输入数据和第二输入数据,所述根据所述多个第二频谱图,得到输入数据,包括:
    将与所述第一全局频谱图对应的多个第二频谱图中每个第二频谱图进行频域反变换,得到多个第二图像,所述频域反变换为所述全局频域变换的逆过程;
    将所述多个第二图像进行拼接,得到所述第一输入数据;
    对于每个第一局部频谱图,
    确定所述第一局部频谱图对应的多个第二频谱图中每个第二频谱图的能量;
    根据所述第一局部频谱图对应的多个第二频谱图的能量,得到所述第一局部频谱图对应的特征向量;
    将多个第一局部频谱图对应的特征向量进行重新装配,得到所述第二输入数据。
  9. 根据权利要求8所述的方法,其特征在于,所述根据所述输入数据,确定所述第一人脸图像的真伪,包括:
    对所述第一输入数据和所述第二输入数据进行交叉融合处理,得到第二特征图和第三特征图;
    根据所述第二特征图和所述第三特征图,确定所述第一人脸图像的真伪。
  10. 根据权利要求9所述的方法,其特征在于,在所述交叉融合处理的次数为多次的情况下,所述对所述第一输入数据和所述第二输入数据进行交叉融合处理,得到第二特征图和第三特征图,包括:
    对所述第一输入数据和所述第二输入数据进行第一次交叉融合处理,得到第四特征图和第五特征图;
    将所述第四特征图和所述第五特征图作为下次交叉融合处理的输入数据,并在进行多次所述交叉融合处理后,得到所述第二特征图和所述第三特征图。
  11. 根据权利要求10所述的方法,其特征在于,所述对所述第一输入数据和所述第二输入数据进行第一次交叉融合处理,得到第四特征图和第五特征图,包括:
    对所述第一输入数据进行特征提取,得到第六特征图;
    对所述第二输入数据进行特征提取,得到第七特征图;
    根据所述第六特征图和所述第七特征图,得到第一矩阵,所述第一矩阵用于表示所述第六特征图和所述第七特征图之间的相关性;
    根据所述第一矩阵以及所述第七特征图,得到第八特征图;
    将所述第八特征图和所述第六特征图进行叠加,得到所述第四特征图;
    根据所述第一矩阵以及所述第六特征图,得到第九特征图;
    将所述第九特征图和所述第七特征图进行叠加,得到所述第五特征图。
  12. 根据权利要求9-11中任一项所述的方法,其特征在于,所述根据所述第二特征图和所述第三特征图,确定所述第一人脸图像的真伪,包括:
    对所述第二特征图和所述第三特征图进行处理,并根据处理后的特征图确定所述第一人脸图像的真伪,其中所述处理包括以下至少一项:拼接或池化。
  13. 根据权利要求1-12中任一项所述的方法,其特征在于,所述多次滤波处理,包括:
    通过多组滤波器,对第一频谱图进行多次滤波处理,其中,每组所述滤波器对应一次滤波处理;
    每组滤波器的滤波参数包括预设参数和参考参数,每组滤波器用于从第一频谱图中分离出与所述预设参数对应的频段信息,所述参考参数用于对所述频段信息进行补偿,任意两组所述滤波器分离出的频段信息不同,且所述多组滤波器分离出的多个频段信息包括所述第一频谱图中的全部频段信息。
  14. 根据权利要求13所述的方法,其特征在于,
    在通过多组滤波器分别对所述第一频谱图进行多次滤波处理的过程中,每组滤波器的滤波参数不相同。
  15. 一种识别人脸图像真伪的装置,其特征在于,包括:
    获取单元,用于获取第一人脸图像;
    变换单元,用于对所述第一人脸图像进行频域变换,得到第一频谱图;
    滤波单元,用于分别对所述第一频谱图进行多次滤波处理,得到多个第二频谱图;
    处理单元,用于根据所述多个第二频谱图,得到输入数据;
    判断单元,用于根据所述输入数据,确定所述第一人脸图像的真伪。
  16. 一种识别人脸图像真伪的装置,其特征在于,包括处理器、存储器、通信接口以及一个或多个程序,其中,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述一个或多个程序包括用于执行权利要求1-14中任一项方法中 的步骤的指令。
  17. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行以实现如权利要求1-14中任一项所述的方法。
  18. 一种计算机程序产品,其特征在于,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,操作所述计算机以使所述计算机执行如权利要求1-14中任一项所述的方法。
PCT/CN2021/086893 2020-06-10 2021-04-13 识别人脸图像真伪的方法、装置及介质和程序产品 Ceased WO2021249006A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2022524624A JP7251000B2 (ja) 2020-06-10 2021-04-13 顔画像の真偽を識別する方法、装置、デバイス及び媒体並びにコンピュータプログラム

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010527530.7A CN111723714B (zh) 2020-06-10 2020-06-10 识别人脸图像真伪的方法、装置及介质
CN202010527530.7 2020-06-10

Publications (1)

Publication Number Publication Date
WO2021249006A1 true WO2021249006A1 (zh) 2021-12-16

Family

ID=72567953

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/086893 Ceased WO2021249006A1 (zh) 2020-06-10 2021-04-13 识别人脸图像真伪的方法、装置及介质和程序产品

Country Status (3)

Country Link
JP (1) JP7251000B2 (zh)
CN (1) CN111723714B (zh)
WO (1) WO2021249006A1 (zh)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114693975A (zh) * 2022-03-31 2022-07-01 南京林业大学 用于深度学习的光谱区域联合识别方法
CN115050066A (zh) * 2022-05-17 2022-09-13 度小满科技(北京)有限公司 人脸伪造检测方法、装置、终端及存储介质
CN115273169A (zh) * 2022-05-23 2022-11-01 西安电子科技大学 基于时-空频域线索增强的人脸伪造检测系统和方法
CN115829909A (zh) * 2022-05-27 2023-03-21 华侨大学 一种基于特征增强和频谱分析的伪造检测方法
CN115909445A (zh) * 2022-11-11 2023-04-04 中国人民解放军国防科技大学 人脸图像伪造检测方法及相关设备
JP2023091486A (ja) * 2021-12-20 2023-06-30 キヤノン株式会社 情報処理装置、情報処理方法
CN116934639A (zh) * 2022-04-07 2023-10-24 腾讯科技(上海)有限公司 图像处理方法、装置、设备、介质及程序产品
CN117197560A (zh) * 2023-09-07 2023-12-08 北京理工大学 一种图像检测方法、装置、电子设备及存储介质
KR20240054682A (ko) * 2022-10-19 2024-04-26 울산과학기술원 페이크 이미지 검출을 위한 특징 추출 방법 및 그 시스템
CN118297951A (zh) * 2024-06-06 2024-07-05 浙江大学 基于频域学习的gan伪造图像增强检测方法和装置
CN120451517A (zh) * 2025-07-09 2025-08-08 厦门工学院 一种伪装目标识别方法及系统
CN121214145A (zh) * 2025-11-25 2025-12-26 慧铁科技股份有限公司 一种货车车轮状态识别方法及系统

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111723714B (zh) * 2020-06-10 2023-11-03 上海商汤智能科技有限公司 识别人脸图像真伪的方法、装置及介质
CN113537173B (zh) * 2021-09-16 2022-03-18 中国人民解放军国防科技大学 一种基于面部补丁映射的人脸图像真伪识别方法
CN113935365B (zh) * 2021-09-27 2024-05-14 华南农业大学 基于空域和频域双特征的深度伪造视频鉴定方法及系统
CN114283475B (zh) * 2021-12-24 2024-11-12 深圳万兴软件有限公司 视频人脸分割方法、装置、计算机设备及存储介质
CN115005782A (zh) * 2022-06-06 2022-09-06 杭州新瀚光电科技有限公司 一种人体健康的评估方法、系统、终端设备及存储介质
CN117315750A (zh) * 2023-09-25 2023-12-29 中国信息通信研究院 虚假人脸检测方法、装置及计算机可读介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080107311A1 (en) * 2006-11-08 2008-05-08 Samsung Electronics Co., Ltd. Method and apparatus for face recognition using extended gabor wavelet features
CN107292275A (zh) * 2017-06-28 2017-10-24 北京飞搜科技有限公司 一种频域划分的人脸特征识别方法及系统
CN107911576A (zh) * 2017-11-01 2018-04-13 北京小米移动软件有限公司 图像处理方法、装置和存储介质
CN110428402A (zh) * 2019-07-18 2019-11-08 数字广东网络建设有限公司 图像篡改识别方法、装置、计算机设备及存储介质
CN110462633A (zh) * 2019-06-27 2019-11-15 深圳市汇顶科技股份有限公司 一种人脸识别的方法、装置和电子设备
CN111723714A (zh) * 2020-06-10 2020-09-29 上海商汤智能科技有限公司 识别人脸图像真伪的方法、装置及介质

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09147115A (ja) * 1995-11-20 1997-06-06 Hamamatsu Photonics Kk 人物照合装置
KR100819027B1 (ko) * 2006-04-26 2008-04-02 한국전자통신연구원 얼굴 영상을 이용한 사용자 인증 방법 및 장치
JP5294300B2 (ja) 2008-03-05 2013-09-18 国立大学法人 東京大学 音信号の分離方法
JP5672144B2 (ja) 2011-05-20 2015-02-18 富士通株式会社 心拍数・呼吸数検出装置,方法およびプログラム
KR101443139B1 (ko) * 2011-09-30 2014-09-19 아이포콤 주식회사 단일 영상을 사용한 위조 얼굴 검출 방법
JP6048025B2 (ja) 2012-09-18 2016-12-21 富士ゼロックス株式会社 分類装置及びプログラム
CN104143078B (zh) * 2013-05-09 2016-08-24 腾讯科技(深圳)有限公司 活体人脸识别方法、装置和设备
US9875393B2 (en) 2014-02-12 2018-01-23 Nec Corporation Information processing apparatus, information processing method, and program
CN106485192B (zh) 2015-09-02 2019-12-06 富士通株式会社 用于图像识别的神经网络的训练方法和装置
CN106372648B (zh) * 2016-10-20 2020-03-13 中国海洋大学 基于多特征融合卷积神经网络的浮游生物图像分类方法
CN111201569B (zh) 2017-10-25 2023-10-20 三星电子株式会社 电子装置及其控制方法
JP7269705B2 (ja) 2018-07-12 2023-05-09 日産自動車株式会社 個人照合方法及び個人照合装置
CN110826444A (zh) * 2019-10-28 2020-02-21 北京影谱科技股份有限公司 一种基于Gabor滤波器的人脸表情识别方法及系统
CN111178137B (zh) * 2019-12-04 2023-05-26 百度在线网络技术(北京)有限公司 检测真实人脸方法、装置、电子设备以及计算机可读存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080107311A1 (en) * 2006-11-08 2008-05-08 Samsung Electronics Co., Ltd. Method and apparatus for face recognition using extended gabor wavelet features
CN107292275A (zh) * 2017-06-28 2017-10-24 北京飞搜科技有限公司 一种频域划分的人脸特征识别方法及系统
CN107911576A (zh) * 2017-11-01 2018-04-13 北京小米移动软件有限公司 图像处理方法、装置和存储介质
CN110462633A (zh) * 2019-06-27 2019-11-15 深圳市汇顶科技股份有限公司 一种人脸识别的方法、装置和电子设备
CN110428402A (zh) * 2019-07-18 2019-11-08 数字广东网络建设有限公司 图像篡改识别方法、装置、计算机设备及存储介质
CN111723714A (zh) * 2020-06-10 2020-09-29 上海商汤智能科技有限公司 识别人脸图像真伪的方法、装置及介质

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2023091486A (ja) * 2021-12-20 2023-06-30 キヤノン株式会社 情報処理装置、情報処理方法
CN114693975A (zh) * 2022-03-31 2022-07-01 南京林业大学 用于深度学习的光谱区域联合识别方法
CN116934639A (zh) * 2022-04-07 2023-10-24 腾讯科技(上海)有限公司 图像处理方法、装置、设备、介质及程序产品
CN115050066A (zh) * 2022-05-17 2022-09-13 度小满科技(北京)有限公司 人脸伪造检测方法、装置、终端及存储介质
CN115273169A (zh) * 2022-05-23 2022-11-01 西安电子科技大学 基于时-空频域线索增强的人脸伪造检测系统和方法
CN115829909A (zh) * 2022-05-27 2023-03-21 华侨大学 一种基于特征增强和频谱分析的伪造检测方法
KR20240054682A (ko) * 2022-10-19 2024-04-26 울산과학기술원 페이크 이미지 검출을 위한 특징 추출 방법 및 그 시스템
KR102855975B1 (ko) * 2022-10-19 2025-09-04 울산과학기술원 페이크 이미지 검출을 위한 특징 추출 방법 및 그 시스템
CN115909445A (zh) * 2022-11-11 2023-04-04 中国人民解放军国防科技大学 人脸图像伪造检测方法及相关设备
CN117197560A (zh) * 2023-09-07 2023-12-08 北京理工大学 一种图像检测方法、装置、电子设备及存储介质
CN118297951A (zh) * 2024-06-06 2024-07-05 浙江大学 基于频域学习的gan伪造图像增强检测方法和装置
CN120451517A (zh) * 2025-07-09 2025-08-08 厦门工学院 一种伪装目标识别方法及系统
CN121214145A (zh) * 2025-11-25 2025-12-26 慧铁科技股份有限公司 一种货车车轮状态识别方法及系统

Also Published As

Publication number Publication date
CN111723714A (zh) 2020-09-29
JP7251000B2 (ja) 2023-04-03
CN111723714B (zh) 2023-11-03
JP2022553768A (ja) 2022-12-26

Similar Documents

Publication Publication Date Title
CN111723714B (zh) 识别人脸图像真伪的方法、装置及介质
JP7490141B2 (ja) 画像検出方法、モデルトレーニング方法、画像検出装置、トレーニング装置、機器及びプログラム
CN114596608B (zh) 一种基于多线索的双流视频人脸伪造检测方法及系统
CN110353675B (zh) 基于图片生成的脑电信号情感识别方法及装置
CN109871845B (zh) 证件图像提取方法及终端设备
WO2019100282A1 (zh) 一种人脸肤色识别方法、装置和智能终端
CN108269254A (zh) 图像质量评估方法和装置
CN110427972B (zh) 证件视频特征提取方法、装置、计算机设备和存储介质
WO2015180042A1 (en) Learning deep face representation
CN105243376A (zh) 一种活体检测方法和装置
CN110838119A (zh) 人脸图像质量评估方法、计算机装置及计算机可读存储介质
CN110796100A (zh) 步态识别方法、装置、终端及存储装置
CN114387548B (zh) 视频及活体检测方法、系统、设备、存储介质及程序产品
CN115661618A (zh) 图像质量评估模型的训练方法、图像质量评估方法及装置
CN113591603A (zh) 证件的验证方法、装置、电子设备及存储介质
Yue et al. Local region frequency guided dynamic inconsistency network for deepfake video detection
JP7082129B2 (ja) 色類似性評価のための方法及び装置
CN105528616A (zh) 人脸识别方法和装置
CN114549892A (zh) 图像处理方法、装置及计算机设备
CN113920556A (zh) 一种人脸防伪方法、装置、存储介质及电子设备
Abbaas et al. Evaluation of biometric user authentication using an ensemble classifier with face and voice recognition
Liu et al. Bi-directional normalization and color attention-guided generative adversarial network for image enhancement
CN114782853A (zh) 视频数据处理方法、装置、计算机设备和存储介质
Kas et al. Generative adversarial networks for 2D-based CNN pose-invariant face recognition
KR20250116517A (ko) 멀티 모달 학습을 적용한 얼굴 위조 판별 장치 및 방법

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21822644

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022524624

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 19.05.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21822644

Country of ref document: EP

Kind code of ref document: A1