CN114267089B - Method, device and equipment for identifying forged image - Google Patents

Method, device and equipment for identifying forged image Download PDF

Info

Publication number
CN114267089B
CN114267089B CN202210203248.2A CN202210203248A CN114267089B CN 114267089 B CN114267089 B CN 114267089B CN 202210203248 A CN202210203248 A CN 202210203248A CN 114267089 B CN114267089 B CN 114267089B
Authority
CN
China
Prior art keywords
image
detected
frequency component
frequency
low
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.)
Active
Application number
CN202210203248.2A
Other languages
Chinese (zh)
Other versions
CN114267089A (en
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.)
Renmin Zhongke Jinan Intelligent Technology Co ltd
Institute of Automation of Chinese Academy of Science
Original Assignee
Renmin Zhongke Jinan Intelligent Technology Co ltd
Institute of Automation of Chinese Academy of Science
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 Renmin Zhongke Jinan Intelligent Technology Co ltd, Institute of Automation of Chinese Academy of Science filed Critical Renmin Zhongke Jinan Intelligent Technology Co ltd
Priority to CN202210203248.2A priority Critical patent/CN114267089B/en
Publication of CN114267089A publication Critical patent/CN114267089A/en
Application granted granted Critical
Publication of CN114267089B publication Critical patent/CN114267089B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)
  • Collating Specific Patterns (AREA)

Abstract

The invention discloses a method, a device and equipment for identifying a forged image, wherein the method comprises the following steps: acquiring an image to be detected; acquiring identity space constraint corresponding to the frequency spectrum mask of the image to be detected and the image to be detected, wherein the identity space constraint refers to a relevance weight distribution map of the image to be detected and a corresponding preset reference correct image; frequency division is carried out on the image to be detected according to the frequency spectrum mask, and high-frequency components and low-frequency components of the frequency spectrum are obtained respectively; respectively obtaining the counterfeiting probability of the high-frequency component and the counterfeiting probability of the low-frequency component through the high-frequency component and the low-frequency component of the frequency spectrum and the identity space constraint; and combining the counterfeiting probability of the high-frequency component and the counterfeiting probability of the low-frequency component to obtain the final counterfeiting probability. Through the mode, the generalization capability of the identification system to different counterfeiting technologies is improved, and the performance of the identifier is enhanced.

Description

Method, device and equipment for identifying forged image
Technical Field
The invention relates to the technical field of image identification, in particular to a method, a device and equipment for identifying a forged image.
Background
In the field of image identification, the conventional identification method automatically learns the true and false image through a deep convolutional neural network to obtain the true and false label, and frequency domain clues are not fully considered, so that the learned discrimination characteristics can only discriminate a specific fake image and cannot cope with other forged images, namely the generalization is poor.
Disclosure of Invention
In order to solve the above problems, a method, an apparatus and a device for identifying a counterfeit image according to embodiments of the present invention are provided.
According to an aspect of an embodiment of the present invention, there is provided a method for identifying a counterfeit image, including:
acquiring an image to be detected;
acquiring identity space constraint corresponding to the frequency spectrum mask of the image to be detected and the image to be detected, wherein the identity space constraint refers to a relevance weight distribution map of the image to be detected and a corresponding preset reference correct image;
frequency division is carried out on the image to be detected according to the frequency spectrum mask, and high-frequency components and low-frequency components of the frequency spectrum are obtained respectively;
respectively obtaining the counterfeiting probability of the high-frequency component and the counterfeiting probability of the low-frequency component through the high-frequency component and the low-frequency component of the frequency spectrum and the identity space constraint;
and combining the counterfeiting probability of the high-frequency component and the counterfeiting probability of the low-frequency component to obtain the final counterfeiting probability.
Optionally, obtaining the spectrum mask of the image to be detected includes:
acquiring a frequency division radius parameter of the image to be detected;
and generating a frequency spectrum mask of the image to be detected according to the frequency division radius parameter and a preset rule.
Optionally, frequency division is performed on the image to be detected according to the frequency spectrum mask, so as to obtain a high-frequency component and a low-frequency component of a frequency spectrum respectively, including:
performing fast Fourier transform on the image to be detected to obtain a first frequency response of the image to be detected;
translating and converting the first frequency response to obtain a second frequency response with a direct current component positioned at the center;
according to an algorithm
Figure 250859DEST_PATH_IMAGE001
Obtaining a high frequency component of a C channel of the spectrum, wherein,
Figure 260404DEST_PATH_IMAGE002
it is referred to the second frequency response that,
Figure 497350DEST_PATH_IMAGE003
refers to element-by-element multiplication, M refers to spectral mask;
performing fast Fourier inverse transformation on the high-frequency component of the channel C of the frequency spectrum to obtain the high-frequency component of the image to be detected;
according to an algorithm
Figure 301358DEST_PATH_IMAGE004
Obtaining a low-frequency component of a C channel of the frequency spectrum;
and performing fast Fourier inverse transformation on the low-frequency component of the channel C of the frequency spectrum to obtain the low-frequency component of the image to be detected.
Optionally, obtaining the identity space constraint corresponding to the image to be detected includes:
extracting first characteristic information of the image to be detected and second characteristic information of the preset reference correct image;
and determining the relevance weight distribution map of the image to be detected and the preset reference correct image according to the first characteristic information and the second characteristic information to obtain the identity space constraint.
Optionally, obtaining the forgery probability of the high frequency component and the forgery probability of the low frequency component respectively by the high frequency component and the low frequency component of the frequency spectrum and the identity space constraint, includes:
acquiring backbone networks corresponding to the high-frequency components and the low-frequency components respectively;
according to an algorithm
Figure 374487DEST_PATH_IMAGE005
Obtaining a forgery probability of the high frequency component, wherein,
Figure 187722DEST_PATH_IMAGE006
refers to the backbone network corresponding to the high frequency component,
Figure 13596DEST_PATH_IMAGE007
refers to the high frequency component of the image to be detected,
Figure 254084DEST_PATH_IMAGE008
is the identity space constraint;
according to an algorithm
Figure 313045DEST_PATH_IMAGE009
Obtaining a forgery probability of the low frequency component, wherein,
Figure 664392DEST_PATH_IMAGE010
refers to the backbone network corresponding to the low frequency component,
Figure 610351DEST_PATH_IMAGE011
is the low frequency component of the image to be detected.
Optionally, the step of combining the forgery probability of the high frequency component and the forgery probability of the low frequency component to obtain a final forgery probability includes:
by algorithm
Figure 21741DEST_PATH_IMAGE012
And obtaining the final forgery probability, wherein alpha is a weight parameter.
According to another aspect of embodiments of the present invention, there is provided an apparatus for recognizing a counterfeit image, the apparatus including:
the acquisition module is used for acquiring an image to be detected;
the processing module is used for acquiring the spectrum mask of the image to be detected and the identity space constraint corresponding to the image to be detected, wherein the identity space constraint refers to the relevance weight distribution map of the image to be detected and the corresponding preset reference correct image; frequency division is carried out on the image to be detected according to the frequency spectrum mask, and high-frequency components and low-frequency components of the frequency spectrum are obtained respectively; respectively obtaining the counterfeiting probability of the high-frequency component and the counterfeiting probability of the low-frequency component through the high-frequency component and the low-frequency component of the frequency spectrum and the identity space constraint;
and the output module is used for combining the counterfeiting probability of the high-frequency component and the counterfeiting probability of the low-frequency component to obtain the final counterfeiting probability.
According to still another aspect of an embodiment of the present invention, there is provided a computing device including: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the operation corresponding to the identification method of the forged image.
According to a further aspect of the embodiments of the present invention, there is provided a computer storage medium, in which at least one executable instruction is stored, and the executable instruction causes a processor to perform an operation corresponding to the method for identifying a counterfeit image as described above.
According to the scheme provided by the embodiment of the invention, the image to be detected is obtained; acquiring identity space constraint corresponding to the frequency spectrum mask of the image to be detected and the image to be detected, wherein the identity space constraint refers to a relevance weight distribution map of the image to be detected and a corresponding preset reference correct image; frequency division is carried out on the image to be detected according to the frequency spectrum mask, and high-frequency components and low-frequency components of the frequency spectrum are obtained respectively; respectively obtaining the counterfeiting probability of the high-frequency component and the counterfeiting probability of the low-frequency component through the high-frequency component and the low-frequency component of the frequency spectrum and the identity space constraint; and combining the counterfeiting probability of the high-frequency component and the counterfeiting probability of the low-frequency component to obtain the final counterfeiting probability. The generalization capability of the identification system to different counterfeiting technologies is improved, and the performance of the identifier is enhanced.
The foregoing description is only an overview of the technical solutions of the embodiments of the present invention, and the embodiments of the present invention can be implemented according to the content of the description in order to make the technical means of the embodiments of the present invention more clearly understood, and the detailed description of the embodiments of the present invention is provided below in order to make the foregoing and other objects, features, and advantages of the embodiments of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the embodiments of the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 shows a flowchart of a method for identifying a counterfeit image according to an embodiment of the present invention;
fig. 2 shows a schematic flow chart of an identity exchange type counterfeit face authentication method based on an entitlement frequency-division identity space constraint according to an embodiment of the present invention;
FIG. 3 is a flow diagram of the identity semantic encoder and backbone network of FIG. 2;
fig. 4 is a schematic structural diagram illustrating an apparatus for recognizing a counterfeit image according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computing device provided by an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
Fig. 1 shows a flowchart of a method for identifying a counterfeit image according to an embodiment of the present invention. As shown in fig. 1, the method comprises the steps of:
step 11, acquiring an image to be detected;
step 12, acquiring an identity space constraint corresponding to the frequency spectrum mask of the image to be detected and the image to be detected, wherein the identity space constraint is an association weight distribution map of the image to be detected and a corresponding preset reference correct image;
step 13, frequency division is carried out on the image to be detected according to the frequency spectrum mask, and high-frequency components and low-frequency components of the frequency spectrum are obtained respectively;
step 14, obtaining the counterfeiting probability of the high-frequency component and the counterfeiting probability of the low-frequency component respectively through the high-frequency component and the low-frequency component of the frequency spectrum and the identity space constraint;
and step 15, combining the counterfeiting probability of the high-frequency component and the counterfeiting probability of the low-frequency component to obtain the final counterfeiting probability.
In the embodiment, an image to be detected is obtained; acquiring identity space constraint corresponding to the frequency spectrum mask of the image to be detected and the image to be detected, wherein the identity space constraint refers to a relevance weight distribution map of the image to be detected and a corresponding preset reference correct image; frequency division is carried out on the image to be detected according to the frequency spectrum mask, and high-frequency components and low-frequency components of the frequency spectrum are obtained respectively; respectively obtaining the counterfeiting probability of the high-frequency component and the counterfeiting probability of the low-frequency component through the high-frequency component and the low-frequency component of the frequency spectrum and the identity space constraint; and combining the counterfeiting probability of the high-frequency component and the counterfeiting probability of the low-frequency component to obtain the final counterfeiting probability. The generalization capability of the identification system to different counterfeiting technologies is improved, and the performance of the identifier is enhanced.
In an alternative embodiment of the present invention, step 11 may include:
111, extracting key coordinates of the face of a person from the image to be detected, wherein the key coordinates are coordinates capable of identifying positions or ranges of eyes, noses and mouths;
and 112, transforming the extracted key coordinates according to a preset template to obtain the image to be detected after the posture is corrected.
In this embodiment, first, a face region coordinate and a face feature point coordinate in an image are obtained by using a face detection technology, and then, a face image is extracted from the image according to the face region coordinate and the face feature point coordinate and the face region is corrected to obtain a face image to be detected, where the face detection may detect a face region in a training image of a FaceForensics + + data set and extract key point coordinates of a face, but is not limited to the above, and the key point coordinates are preferably extracted by 68; and then, for each face, solving the optimal affine transformation from the key point coordinates of the face to the preset template coordinates to minimize the mean square difference distance of the transformed face and the preset template coordinates, acting the obtained transformation on the corresponding face, scaling the corresponding face to a proper proportion according to a preset constant, and cutting out a corrected face area.
In another optional embodiment of the present invention, in step 12, acquiring a spectrum mask and a response of the image to be detected may include:
step 121, obtaining a frequency division radius parameter of the image to be detected;
step 122, generating a frequency spectrum mask of the image to be detected according to a preset rule according to the frequency division radius parameter;
specifically, the generating the spectrum mask of the image to be detected according to the preset rule may include: generating a weight distribution graph with the central value close to 1 and the peripheral value close to 0, and generating a frequency spectrum mask according to the weight distribution graph, but not limited to the above.
As shown in FIG. 2 and FIG. 3, the authentication framework based on the weighted frequency division identity space constraint is composed of two common identity semantic coders and the authentication branches of the generated identity space constraint, which can also be called as the identity constraint area in the embodiment of the present invention, in which, firstly, the image to be detected is processed
Figure 803883DEST_PATH_IMAGE013
Acquiring a first frequency response X of an image to be detected by utilizing Fast Fourier Transform (FFT), wherein C is the number of channels input by the image to be detected, H is the height of the image to be detected, and W is the width of the image to be detected; secondly, the first frequency response is subjected to translation conversion, so that the direct current component is positioned at the center to obtain a second frequency response
Figure 693342DEST_PATH_IMAGE014
Finally, the frequency division radius is set
Figure 759387DEST_PATH_IMAGE015
By an algorithm
Figure 341678DEST_PATH_IMAGE016
Obtaining a spectrum mask of an image to be detected, wherein the spectrum mask
Figure 735750DEST_PATH_IMAGE017
Figure 805731DEST_PATH_IMAGE018
In order to be a hyper-parameter,
Figure 601649DEST_PATH_IMAGE019
Figure 479475DEST_PATH_IMAGE020
in order to be the coordinates of the position,
Figure 360843DEST_PATH_IMAGE021
the spectral mask is parameter-conductive and thus also participates in training, possibly in back propagation
Figure 467470DEST_PATH_IMAGE022
In another optional embodiment of the present invention, in step 12, acquiring the identity space constraint corresponding to the image to be detected may include:
step 123, extracting first characteristic information of the image to be detected and second characteristic information of the preset reference correct image;
and 124, determining the relevance weight distribution map of the image to be detected and the preset reference correct image according to the first characteristic information and the second characteristic information to obtain the identity space constraint.
In this embodiment, the backbone network initializes the network parameters using the parameters of ResNet-50 pre-trained on ImageNet. The identity semantic encoder is initialized with the parameters of the MobileFaceNet and kept frozen. After obtaining the image to be detected, the identity semantic encoder
Figure 117895DEST_PATH_IMAGE023
And generating an identity constraint region rho for the image to be detected.
Specifically, first, the algorithm is passed
Figure 166622DEST_PATH_IMAGE024
By corresponding convolution modules
Figure 535286DEST_PATH_IMAGE025
Extracting first characteristic information from ith scale
Figure 944140DEST_PATH_IMAGE026
Secondly, correspondingly, the preset correct image is also processed through the algorithm
Figure 449071DEST_PATH_IMAGE027
By corresponding convolution modules
Figure 934279DEST_PATH_IMAGE025
Extracting second characteristic information from ith scale
Figure 524660DEST_PATH_IMAGE028
The first feature information and the second feature information include information such as an identity feature map, but are not limited to the identity feature map.
Finally, get the firstAfter a characteristic information and a second characteristic information, passing through an algorithm
Figure 238669DEST_PATH_IMAGE029
An identity-constrained region p is obtained, where,
Figure 863686DEST_PATH_IMAGE030
is the first characteristic information
Figure 254216DEST_PATH_IMAGE031
And second characteristic information
Figure 331893DEST_PATH_IMAGE028
A feature vector located at coordinates (x, y).
In yet another alternative embodiment of the present invention, step 13 may comprise:
131, performing fast Fourier transform on the image to be detected to obtain a first frequency response of the image to be detected;
step 132, translating and converting the first frequency response to obtain a second frequency response with a direct current component located at the center;
step 133, according to an algorithm
Figure 339339DEST_PATH_IMAGE032
Obtaining a high frequency component of a C channel of the spectrum, wherein,
Figure 818862DEST_PATH_IMAGE002
it is referred to the second frequency response that,
Figure 380293DEST_PATH_IMAGE003
refers to element-by-element multiplication, M refers to spectral mask;
134, performing inverse fast fourier transform on the high-frequency component of the C-th channel of the frequency spectrum to obtain the high-frequency component of the frequency spectrum;
step 135, according to an algorithm
Figure 945267DEST_PATH_IMAGE033
Obtaining a low-frequency component of a C channel of the frequency spectrum;
and 136, performing inverse fast fourier transform on the low-frequency component of the channel C of the frequency spectrum to obtain the low-frequency component of the frequency spectrum.
In this embodiment, after obtaining the high frequency component and the low frequency component of the C-th channel of the frequency spectrum, the high frequency component and the low frequency component are respectively subjected to translational transformation to make the direct current component located at the upper left corner, and then the direct current component is respectively subjected to Inverse Fast Fourier Transform (IFFT) and a real part of a result is obtained to obtain the high frequency component of the image to be detected
Figure 125713DEST_PATH_IMAGE034
And low frequency components
Figure 600687DEST_PATH_IMAGE035
In yet another alternative embodiment of the present invention, step 14 may comprise:
step 141, obtaining the backbone networks corresponding to the high frequency component and the low frequency component respectively;
specifically, the backbone network has n down-sampling stages, i.e. n convolution modules
Figure 208386DEST_PATH_IMAGE036
And a classification unit c. For the first k-1 stages of the backbone network, the forward calculation and the original classification convolution network pass through the algorithm
Figure 385290DEST_PATH_IMAGE037
And are kept consistent, wherein,
Figure 212169DEST_PATH_IMAGE038
is a characteristic diagram corresponding to the ith stage and is initialized
Figure 666284DEST_PATH_IMAGE039
From the k stage to the last stage, introducing the identity constraint area into the backbone network, and performing algorithm
Figure 569518DEST_PATH_IMAGE040
Modulating each module
Figure 109084DEST_PATH_IMAGE036
To correct its attention, wherein,
Figure 506698DEST_PATH_IMAGE041
which means that the multiplication is performed element by element,
Figure 815320DEST_PATH_IMAGE042
the weight is constructed by corresponding space constraint of an identity semantic encoder
Figure 889455DEST_PATH_IMAGE043
Figure 916317DEST_PATH_IMAGE044
The function expand is scaled in the height-width dimension by bilinear interpolation
Figure 242256DEST_PATH_IMAGE045
And replicated along the channel dimension
Figure 516636DEST_PATH_IMAGE046
And secondly, the requirement of dimension consistency is met.
Step 142, according to the algorithm
Figure 902618DEST_PATH_IMAGE005
Obtaining a forgery probability of the high frequency component, wherein,
Figure 541410DEST_PATH_IMAGE006
refers to the backbone network corresponding to the high frequency component,
Figure 405461DEST_PATH_IMAGE007
refers to the high frequency component of the image to be detected,
Figure 298461DEST_PATH_IMAGE008
constraining the area for the identity;
step 143, according to an algorithm
Figure 855345DEST_PATH_IMAGE009
Obtaining a forgery probability of the low frequency component, wherein,
Figure 715853DEST_PATH_IMAGE010
refers to the backbone network corresponding to the low frequency component,
Figure 118016DEST_PATH_IMAGE011
is the low frequency component of the image to be detected.
In this embodiment, the backbone network corresponding to the high frequency component and the backbone network corresponding to the low frequency component have independent weights.
In yet another alternative embodiment of the present invention, step 15 may comprise:
step 151, passing the algorithm
Figure 895217DEST_PATH_IMAGE012
Obtaining the final forgery probability, wherein alpha is a weight parameter, wherein
Figure 623001DEST_PATH_IMAGE047
In this embodiment, the parameters can be unconstrained during training
Figure 705227DEST_PATH_IMAGE048
Making equivalent substitutions and optimizing the weight parameter α directly, i.e.
Figure 176659DEST_PATH_IMAGE049
So as to relieve
Figure 44252DEST_PATH_IMAGE047
So as not to cause inconvenience to the training.
In an optional embodiment of the present invention, step 15 may further include:
and step 16, if the final counterfeiting probability is greater than or equal to a preset confidence threshold, judging that the image to be detected is a real image, and if the final counterfeiting probability is lower than the preset confidence threshold, judging that the image to be detected is a counterfeit image.
In this embodiment, a confidence threshold may be set to be 0.5, but is not limited to 0.5, if the final forgery probability is greater than or equal to 0.5, the image to be detected is determined to be a true image, and if the final forgery probability is lower than 0.5, the image to be detected is determined to be a forged image.
In the above embodiment of the present invention, during the face detection training process, the data set provides at least one real video for each person identity, so that a reference image pool can be constructed by using the real videos. For each image to be detected, randomly selecting one image in the video with the same identity in the reference pool with equal probability, and then randomly sampling a frame of face image of the person from the video to serve as a reference image. In the training phase, this random selection process is independent for each image to be detected, i.e. there are no additional constraints between the video they select and the frames sampled from. Final benefit utilization two-class cross entropy loss function
Figure 677359DEST_PATH_IMAGE050
Training the parameters of the model, wherein y represents the true binary label of the sample, but is softened, namely limited in the range of 0.1 to 0.9, avoiding the extreme updating value encountered during training, p represents the normalized tamper confidence of the network output,
Figure 512460DEST_PATH_IMAGE051
denotes the loss value and j denotes the index of the sample. Batch size set to 32, learning rate set to
Figure 522004DEST_PATH_IMAGE052
And performing end-to-end training on the network by adopting a gradient descent algorithm.
After training is finished, the human face detection model can directly input images without manually marking human face areas. Then the model automatically detects all face regions in the image, tampering detection is carried out on the faces, and finally normalized confidence is output.
In the above embodiments of the present invention, a completely new face tampering detection model is proposed, in which spatial domain features and frequency domain features are deeply combined. The model inspects identity similarity between the face image to be detected and the reference face image, generates corresponding identity space constraint, and then applies the identity space constraint to a backbone network to enable the backbone network to pay more attention to the area related to the identity characteristic so as to improve the detection performance. The model is subjected to branch processing according to frequency response in the processing, each frequency band can extract corresponding characteristics in a self-adaptive manner, and the anti-interference performance of corresponding clues is higher. More suitable for protecting the practical scene of a specific character.
Meanwhile, in the embodiment of the invention, a new authentication paradigm of providing auxiliary information for an authenticator by using an additional reference face image is provided for an actual scene of protecting a specific person from being damaged by a forged image. The implementation framework of the method comprises two main parts, namely a backbone network and an identity semantic encoder, so that correspondingly generated identity space constraints can be introduced into the backbone network to force the backbone network to pay more attention to more discriminative and intrinsic discrimination clues, higher accuracy can be achieved when a face image synthesized by an unknown counterfeiting method is recognized, and good robustness to distortion disturbance and the like is achieved.
The above embodiments of the present invention also utilize spatial and frequency domain aliasing cues. On one hand, the identity space constraint pyramid is used for searching the area which is most relevant to the forged clue on the spatial domain level, and on the other hand, the frequency division branch is used for carrying out self-adaptive processing and fusion on the signals of different frequency bands. The method utilizes the complementarity of clues on two characteristic spaces, and greatly improves the performance of the discriminator. Compared with the traditional detection method based on artificial features, the method has the advantages that the feature semantic level on which the authenticity of the face image is judged is higher, and the feature dimensionality is richer. Compared with the existing detection method based on the neural network, the method has stronger pertinence in the practical process.
Fig. 4 is a schematic structural diagram of a device 40 for recognizing a counterfeit image according to an embodiment of the present invention. As shown in fig. 4, the apparatus includes:
an obtaining module 41, configured to obtain an image to be detected;
the processing module 42 is configured to obtain an identity space constraint corresponding to the spectrum mask of the image to be detected and the image to be detected, where the identity space constraint is a relevance weight distribution map of the image to be detected and a corresponding preset reference correct image; frequency division is carried out on the image to be detected according to the frequency spectrum mask, and high-frequency components and low-frequency components of the frequency spectrum are obtained respectively; respectively obtaining the counterfeiting probability of the high-frequency component and the counterfeiting probability of the low-frequency component through the high-frequency component and the low-frequency component of the frequency spectrum and the identity space constraint;
and an output module 43, configured to combine the forgery probability of the high-frequency component and the forgery probability of the low-frequency component to obtain a final forgery probability.
Optionally, the processing module 42 is further configured to obtain a frequency division radius parameter of the image to be detected;
and generating a frequency spectrum mask of the image to be detected according to the frequency division radius parameter and a preset rule.
Optionally, the processing module 42 is further configured to perform fast fourier transform on the image to be detected to obtain a first frequency response of the image to be detected;
translating and converting the first frequency response to obtain a second frequency response with a direct current component positioned at the center;
according to an algorithm
Figure 745568DEST_PATH_IMAGE001
Obtaining a high frequency component of a C channel of the spectrum, wherein,
Figure 815156DEST_PATH_IMAGE002
it is referred to the second frequency response that,
Figure 871973DEST_PATH_IMAGE003
refers to element-by-element multiplication, M refers to spectral mask;
performing fast Fourier inverse transformation on the high-frequency component of the channel C of the frequency spectrum to obtain the high-frequency component of the image to be detected;
according to an algorithm
Figure 685209DEST_PATH_IMAGE004
Obtaining a low-frequency component of a C channel of the frequency spectrum;
and performing fast Fourier inverse transformation on the low-frequency component of the channel C of the frequency spectrum to obtain the low-frequency component of the image to be detected.
Optionally, the processing module 42 is further configured to extract first feature information of the image to be detected and second feature information of the preset reference correct image;
and determining the relevance weight distribution map of the image to be detected and the preset reference correct image according to the first characteristic information and the second characteristic information to obtain the identity space constraint.
Optionally, the processing module 42 is further configured to obtain backbone networks corresponding to the high frequency component and the low frequency component respectively;
according to an algorithm
Figure 917607DEST_PATH_IMAGE005
Obtaining a forgery probability of the high frequency component, wherein,
Figure 767882DEST_PATH_IMAGE006
refers to the backbone network corresponding to the high frequency component,
Figure 452941DEST_PATH_IMAGE007
refers to the high frequency component of the image to be detected,
Figure 928922DEST_PATH_IMAGE008
is the identity space constraint;
according to an algorithm
Figure 750248DEST_PATH_IMAGE009
Obtaining a spurious summary of said low frequency componentThe ratio of the component to the component,
Figure 4380DEST_PATH_IMAGE010
refers to the backbone network corresponding to the low frequency component,
Figure 770211DEST_PATH_IMAGE011
is the low frequency component of the image to be detected.
Optionally, the output module 43 is further used for passing through an algorithm
Figure 925249DEST_PATH_IMAGE012
And obtaining the final forgery probability, wherein alpha is a weight parameter.
It should be understood that the above description of the method embodiments illustrated in fig. 1 to 5 is merely an illustration of the technical solution of the present invention by way of alternative examples, and the method for identifying a counterfeit image according to the present invention is not limited. In other embodiments, the execution steps and the sequence of the method for identifying a counterfeit image according to the present invention may be different from those of the above embodiments, and the embodiments of the present invention do not limit this.
It should be noted that this embodiment is an apparatus embodiment corresponding to the above method embodiment, and all the implementations in the above method embodiment are applicable to this apparatus embodiment, and the same technical effects can be achieved.
Embodiments of the present invention provide a non-volatile computer storage medium, where at least one executable instruction is stored in the computer storage medium, and the computer executable instruction may execute the method for identifying a counterfeit image in any of the above method embodiments.
Fig. 5 is a schematic structural diagram of a computing device according to an embodiment of the present invention, and the specific embodiment of the present invention does not limit the specific implementation of the computing device.
As shown in fig. 5, the computing device may include: a processor (processor), a Communications Interface (Communications Interface), a memory (memory), and a Communications bus.
Wherein: the processor, the communication interface, and the memory communicate with each other via a communication bus. A communication interface for communicating with network elements of other devices, such as clients or other servers. And the processor is used for executing the program, and particularly can execute the relevant steps in the embodiment of the identification method of the forged image for the computing equipment.
In particular, the program may include program code comprising computer operating instructions.
The processor may be a central processing unit CPU or an application Specific Integrated circuit asic or one or more Integrated circuits configured to implement embodiments of the present invention. The computing device includes one or more processors, which may be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
And the memory is used for storing programs. The memory may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program may specifically be adapted to cause the processor to execute the method of identifying a counterfeit image in any of the method embodiments described above. The specific implementation of each step in the program may refer to the corresponding steps and corresponding descriptions in the units in the above embodiment of the method for identifying a counterfeit image, which are not described herein again. It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described devices and modules may refer to the corresponding process descriptions in the foregoing method embodiments, and are not described herein again.
The algorithms or displays presented herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. In addition, embodiments of the present invention are not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of embodiments of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best modes of embodiments of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components.
Moreover, those of skill in the art will appreciate that while some embodiments herein include some features included in other embodiments, not others, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components according to embodiments of the present invention. Embodiments of the invention may also be implemented as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing embodiments of the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that the word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. Embodiments of the invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names. The steps in the above embodiments should not be construed as limiting the order of execution unless specified otherwise.

Claims (6)

1. A method for identifying a counterfeit image, the method comprising:
acquiring an image to be detected;
acquiring the spectrum mask of the image to be detected and the identity space constraint corresponding to the image to be detected, wherein the identity space constraint refers to the relevance weight distribution graph of the image to be detected and the corresponding preset reference correct image, and the acquiring of the identity space constraint corresponding to the image to be detected comprises the following steps: extracting first characteristic information of the image to be detected and second characteristic information of the preset reference correct image; determining an association weight distribution map of the image to be detected and the preset reference correct image according to the first characteristic information and the second characteristic information to obtain the identity space constraint; acquiring the identity space constraint corresponding to the image to be detected specifically comprises: by algorithm
Figure 559804DEST_PATH_IMAGE002
By corresponding convolution modules
Figure 318813DEST_PATH_IMAGE004
Extracting first characteristic information from ith scale
Figure 792520DEST_PATH_IMAGE006
(ii) a For the preset correct image, the algorithm is carried out
Figure 496033DEST_PATH_IMAGE008
By corresponding convolution modules
Figure 821710DEST_PATH_IMAGE004
Extracting second characteristic information from ith scale
Figure 825438DEST_PATH_IMAGE010
By an algorithm
Figure 345413DEST_PATH_IMAGE012
An identity constraint region p is obtained, wherein,
Figure 801802DEST_PATH_IMAGE014
is the first characteristic information
Figure 167055DEST_PATH_IMAGE006
And second characteristic information
Figure 759710DEST_PATH_IMAGE010
A feature vector located at coordinates (x, y);
frequency division is carried out on the image to be detected according to the frequency spectrum mask, and high-frequency components and low-frequency components of the frequency spectrum are obtained respectively;
respectively obtaining the counterfeiting probability of the high-frequency component and the counterfeiting probability of the low-frequency component through the high-frequency component and the low-frequency component of the frequency spectrum and the identity space constraint;
combining the counterfeiting probability of the high-frequency component and the counterfeiting probability of the low-frequency component to obtain a final counterfeiting probability;
the method comprises the following steps: acquiring backbone networks corresponding to the high-frequency components and the low-frequency components respectively;
according to an algorithm
Figure 716165DEST_PATH_IMAGE016
Obtaining a forgery probability of the high frequency component, wherein,
Figure 394271DEST_PATH_IMAGE018
refers to the backbone network corresponding to the high frequency component,
Figure 330260DEST_PATH_IMAGE020
refers to the high frequency component of the image to be detected,
Figure 43001DEST_PATH_IMAGE022
is the identity space constraint;
according to an algorithm
Figure 639198DEST_PATH_IMAGE024
Obtaining a forgery probability of the low frequency component, wherein,
Figure 70180DEST_PATH_IMAGE026
refers to the backbone network corresponding to the low frequency component,
Figure 901869DEST_PATH_IMAGE028
the low-frequency component of the image to be detected is referred to;
by algorithm
Figure 610062DEST_PATH_IMAGE030
Obtaining the final counterfeiting probability, wherein alpha is a weight parameter;
further comprising: with unconstrained parameters
Figure 501795DEST_PATH_IMAGE032
Equivalent substitution is carried out and prime weight parameters are directly optimized.
2. A method for identifying a counterfeit image according to claim 1, wherein obtaining a spectral mask of the image to be detected comprises:
acquiring a frequency division radius parameter of the image to be detected;
and generating a frequency spectrum mask of the image to be detected according to the frequency division radius parameter and a preset rule.
3. A method for identifying a counterfeit image according to claim 1, wherein the frequency division of the image to be detected based on the spectrum mask to obtain a high frequency component and a low frequency component of a spectrum respectively comprises:
performing fast Fourier transform on the image to be detected to obtain a first frequency response of the image to be detected;
translating and converting the first frequency response to obtain a second frequency response with a direct current component positioned at the center;
according to an algorithm
Figure 295439DEST_PATH_IMAGE034
Obtaining a high frequency component of a C channel of the spectrum, wherein,
Figure 196398DEST_PATH_IMAGE036
it is referred to the second frequency response that,
Figure 726475DEST_PATH_IMAGE038
refers to element-by-element multiplication, M refers to spectral mask;
performing fast Fourier inverse transformation on the high-frequency component of the channel C of the frequency spectrum to obtain the high-frequency component of the image to be detected;
according to an algorithm
Figure 54688DEST_PATH_IMAGE040
Obtaining a low-frequency component of a C channel of the frequency spectrum;
and performing fast Fourier inverse transformation on the low-frequency component of the channel C of the frequency spectrum to obtain the low-frequency component of the image to be detected.
4. An apparatus for recognizing a counterfeit image, the apparatus comprising:
the acquisition module is used for acquiring an image to be detected;
the processing module is configured to acquire an identity space constraint corresponding to the spectrum mask of the image to be detected and the image to be detected, where the identity space constraint refers to a relevance weight distribution map of the image to be detected and a corresponding preset reference correct image, and the acquiring of the identity space constraint corresponding to the image to be detected includes: extracting first characteristic information of the image to be detected and second characteristic information of the preset reference correct image; determining an association weight distribution map of the image to be detected and the preset reference correct image according to the first characteristic information and the second characteristic information to obtain the identity space constraint; acquiring the identity space constraint corresponding to the image to be detected specifically comprises: by algorithm
Figure 70048DEST_PATH_IMAGE002
By corresponding convolution modules
Figure 774699DEST_PATH_IMAGE004
Extracting first characteristic information from ith scale
Figure 191905DEST_PATH_IMAGE006
(ii) a For the preset correct image, the algorithm is carried out
Figure 425440DEST_PATH_IMAGE008
By corresponding convolution modules
Figure 52731DEST_PATH_IMAGE004
Extracting second characteristic information from ith scale
Figure 170860DEST_PATH_IMAGE010
By an algorithm
Figure 567206DEST_PATH_IMAGE041
Obtaining identity constraintsThe region p in which, among others,
Figure 602334DEST_PATH_IMAGE042
is the first characteristic information
Figure 716920DEST_PATH_IMAGE006
And second characteristic information
Figure 107582DEST_PATH_IMAGE010
A feature vector located at coordinates (x, y); frequency division is carried out on the image to be detected according to the frequency spectrum mask, and high-frequency components and low-frequency components of the frequency spectrum are obtained respectively; respectively obtaining the counterfeiting probability of the high-frequency component and the counterfeiting probability of the low-frequency component through the high-frequency component and the low-frequency component of the frequency spectrum and the identity space constraint; acquiring backbone networks corresponding to the high-frequency components and the low-frequency components respectively; according to an algorithm
Figure 624014DEST_PATH_IMAGE016
Obtaining a forgery probability of the high frequency component, wherein,
Figure 340297DEST_PATH_IMAGE018
refers to the backbone network corresponding to the high frequency component,
Figure 942180DEST_PATH_IMAGE020
refers to the high frequency component of the image to be detected,
Figure 402111DEST_PATH_IMAGE022
is the identity space constraint; according to an algorithm
Figure 507470DEST_PATH_IMAGE043
Obtaining a forgery probability of the low frequency component, wherein,
Figure 519288DEST_PATH_IMAGE044
refers to the backbone network corresponding to the low frequency component,
Figure 716789DEST_PATH_IMAGE028
the low-frequency component of the image to be detected is referred to; by algorithm
Figure 105045DEST_PATH_IMAGE045
Obtaining a final counterfeiting probability, wherein alpha is a weight parameter; with unconstrained parameters
Figure 940277DEST_PATH_IMAGE032
Making equivalent substitution and directly optimizing prime weight parameters;
and the output module is used for combining the counterfeiting probability of the high-frequency component and the counterfeiting probability of the low-frequency component to obtain the final counterfeiting probability.
5. A computing device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is configured to store at least one executable instruction which, when executed, causes the processor to perform a method of identifying a counterfeit image according to any one of claims 1-3.
6. A computer storage medium having stored therein at least one executable instruction that when executed causes a computing device to perform a method of identifying a counterfeit image as claimed in any one of claims 1 to 3.
CN202210203248.2A 2022-03-03 2022-03-03 Method, device and equipment for identifying forged image Active CN114267089B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210203248.2A CN114267089B (en) 2022-03-03 2022-03-03 Method, device and equipment for identifying forged image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210203248.2A CN114267089B (en) 2022-03-03 2022-03-03 Method, device and equipment for identifying forged image

Publications (2)

Publication Number Publication Date
CN114267089A CN114267089A (en) 2022-04-01
CN114267089B true CN114267089B (en) 2022-05-31

Family

ID=80834003

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210203248.2A Active CN114267089B (en) 2022-03-03 2022-03-03 Method, device and equipment for identifying forged image

Country Status (1)

Country Link
CN (1) CN114267089B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115035052A (en) * 2022-05-24 2022-09-09 浙江大学 Forged face-changing image detection method and system based on identity difference quantification

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109815794A (en) * 2018-12-14 2019-05-28 北京飞搜科技有限公司 Recognition of face is counter to cheat method, apparatus and electronic equipment
CN111127407A (en) * 2019-12-11 2020-05-08 北京航空航天大学 Fourier transform-based style migration counterfeit image detection device and method
CN111325719A (en) * 2020-02-02 2020-06-23 南京工业大学 Workpiece anti-counterfeiting method based on part surface image matching
CN112686331A (en) * 2021-01-11 2021-04-20 中国科学技术大学 Forged image recognition model training method and forged image recognition method
CN113935365A (en) * 2021-09-27 2022-01-14 华南农业大学 Depth counterfeit video identification method and system based on spatial domain and frequency domain dual characteristics

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109815794A (en) * 2018-12-14 2019-05-28 北京飞搜科技有限公司 Recognition of face is counter to cheat method, apparatus and electronic equipment
CN111127407A (en) * 2019-12-11 2020-05-08 北京航空航天大学 Fourier transform-based style migration counterfeit image detection device and method
CN111325719A (en) * 2020-02-02 2020-06-23 南京工业大学 Workpiece anti-counterfeiting method based on part surface image matching
CN112686331A (en) * 2021-01-11 2021-04-20 中国科学技术大学 Forged image recognition model training method and forged image recognition method
CN113935365A (en) * 2021-09-27 2022-01-14 华南农业大学 Depth counterfeit video identification method and system based on spatial domain and frequency domain dual characteristics

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Practical Face Swapping Detection Based on Identity Spatial Constraints;Jun Jiang等;《2021 IEEE International Joint Conference on Biometrics (IJCB)》;20210720;第1-8页 *
Thinking in Frequency: Face Forgery Detection by Mining Frequency-aware Clues;Yuyang Qian等;《arXiv》;20201027;第1-21页 *
人脸欺诈检测最新进展及典型方法;胡永健等;《信号处理》;20211231;第2261-2277页 *

Also Published As

Publication number Publication date
CN114267089A (en) 2022-04-01

Similar Documents

Publication Publication Date Title
JP7490141B2 (en) IMAGE DETECTION METHOD, MODEL TRAINING METHOD, IMAGE DETECTION APPARATUS, TRAINING APPARATUS, DEVICE, AND PROGRAM
Sun et al. Face spoofing detection based on local ternary label supervision in fully convolutional networks
Bappy et al. Hybrid lstm and encoder–decoder architecture for detection of image forgeries
US20200364478A1 (en) Method and apparatus for liveness detection, device, and storage medium
Kanwal et al. Detection of digital image forgery using fast fourier transform and local features
CN111862035B (en) Training method of light spot detection model, light spot detection method, device and medium
WO2021137946A1 (en) Forgery detection of face image
US20120057791A1 (en) Information processing apparatus and control method thereof
CN111932577B (en) Text detection method, electronic device and computer readable medium
CN113762138A (en) Method and device for identifying forged face picture, computer equipment and storage medium
CN113837942A (en) Super-resolution image generation method, device, equipment and storage medium based on SRGAN
CN115240280A (en) Construction method of human face living body detection classification model, detection classification method and device
CN114267089B (en) Method, device and equipment for identifying forged image
CN111259792B (en) DWT-LBP-DCT feature-based human face living body detection method
CN113807237B (en) Training of in vivo detection model, in vivo detection method, computer device, and medium
Luo et al. Image steganalysis with convolutional vision transformer
CN113313202A (en) Single-domain generalization method based on progressive unknown domain expansion
Knoche et al. Susceptibility to image resolution in face recognition and trainings strategies
Sabeena et al. Copy-move image forgery localization using deep feature pyramidal network
Kumari et al. Image splicing forgery detection: A review
CN117496601B (en) Face living body detection system and method based on fine classification and antibody domain generalization
CN114065867B (en) Data classification method and system and electronic equipment
CN114092864B (en) Fake video identification method and device, electronic equipment and computer storage medium
Selvarathi et al. Copy Move Counterfeiting Identification based on CNN using Scalar Invariant Feature Technique
Oke et al. Image Forgery Detection Using Cryptography and Deep Learning

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant