CN114267089B - Method, device and equipment for identifying forged image - Google Patents
Method, device and equipment for identifying forged image Download PDFInfo
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 46
- 238000001228 spectrum Methods 0.000 claims abstract description 70
- 238000004422 calculation algorithm Methods 0.000 claims description 37
- 230000004044 response Effects 0.000 claims description 21
- 238000004891 communication Methods 0.000 claims description 16
- 238000012545 processing Methods 0.000 claims description 11
- 230000009466 transformation Effects 0.000 claims description 9
- 230000003595 spectral effect Effects 0.000 claims description 6
- 238000006467 substitution reaction Methods 0.000 claims description 3
- 238000005516 engineering process Methods 0.000 abstract description 4
- 238000012549 training Methods 0.000 description 10
- 238000001514 detection method Methods 0.000 description 9
- 238000010586 diagram Methods 0.000 description 6
- 230000008901 benefit Effects 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 238000004590 computer program Methods 0.000 description 2
- 238000005070 sampling Methods 0.000 description 2
- PXFBZOLANLWPMH-UHFFFAOYSA-N 16-Epiaffinine Natural products C1C(C2=CC=CC=C2N2)=C2C(=O)CC2C(=CC)CN(C)C1C2CO PXFBZOLANLWPMH-UHFFFAOYSA-N 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000013527 convolutional neural network Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 210000000887 face Anatomy 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 210000001331 nose Anatomy 0.000 description 1
- 238000011022 operating instruction Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000001131 transforming effect Effects 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
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
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 algorithmObtaining a high frequency component of a C channel of the spectrum, wherein,it is referred to the second frequency response that,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 algorithmObtaining 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 algorithmObtaining a forgery probability of the high frequency component, wherein,refers to the backbone network corresponding to the high frequency component,refers to the high frequency component of the image to be detected,is the identity space constraint;
according to an algorithmObtaining a forgery probability of the low frequency component, wherein,refers to the backbone network corresponding to the low frequency component,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:
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 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;
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 processedAcquiring 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;
Finally, the frequency division radius is setBy an algorithmObtaining a spectrum mask of an image to be detected, wherein the spectrum mask,In order to be a hyper-parameter,,in order to be the coordinates of the position,the spectral mask is parameter-conductive and thus also participates in training, possibly in back propagation。
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 encoderAnd generating an identity constraint region rho for the image to be detected.
Specifically, first, the algorithm is passedBy corresponding convolution modulesExtracting first characteristic information from ith scale。
Secondly, correspondingly, the preset correct image is also processed through the algorithmBy corresponding convolution modulesExtracting second characteristic information from ith scaleThe 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 algorithmAn identity-constrained region p is obtained, where,is the first characteristic informationAnd second characteristic informationA 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 algorithmObtaining a high frequency component of a C channel of the spectrum, wherein,it is referred to the second frequency response that,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 algorithmObtaining 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 detectedAnd low frequency components。
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 modulesAnd 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 algorithmAnd are kept consistent, wherein,is a characteristic diagram corresponding to the ith stage and is initialized。
From the k stage to the last stage, introducing the identity constraint area into the backbone network, and performing algorithmModulating each moduleTo correct its attention, wherein,which means that the multiplication is performed element by element,the weight is constructed by corresponding space constraint of an identity semantic encoder,The function expand is scaled in the height-width dimension by bilinear interpolationAnd replicated along the channel dimensionAnd secondly, the requirement of dimension consistency is met.
Step 142, according to the algorithmObtaining a forgery probability of the high frequency component, wherein,refers to the backbone network corresponding to the high frequency component,refers to the high frequency component of the image to be detected,constraining the area for the identity;
step 143, according to an algorithmObtaining a forgery probability of the low frequency component, wherein,refers to the backbone network corresponding to the low frequency component,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 algorithmObtaining the final forgery probability, wherein alpha is a weight parameter, wherein。
In this embodiment, the parameters can be unconstrained during trainingMaking equivalent substitutions and optimizing the weight parameter α directly, i.e.So as to relieveSo 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 functionTraining 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,denotes the loss value and j denotes the index of the sample. Batch size set to 32, learning rate set toAnd 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 algorithmObtaining a high frequency component of a C channel of the spectrum, wherein,it is referred to the second frequency response that,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 algorithmObtaining 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 algorithmObtaining a forgery probability of the high frequency component, wherein,refers to the backbone network corresponding to the high frequency component,refers to the high frequency component of the image to be detected,is the identity space constraint;
according to an algorithmObtaining a spurious summary of said low frequency componentThe ratio of the component to the component,refers to the backbone network corresponding to the low frequency component,is the low frequency component of the image to be detected.
Optionally, the output module 43 is further used for passing through an algorithmAnd 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 algorithmBy corresponding convolution modulesExtracting first characteristic information from ith scale(ii) a For the preset correct image, the algorithm is carried outBy corresponding convolution modulesExtracting second characteristic information from ith scaleBy an algorithmAn identity constraint region p is obtained, wherein,is the first characteristic informationAnd second characteristic informationA 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 algorithmObtaining a forgery probability of the high frequency component, wherein,refers to the backbone network corresponding to the high frequency component,refers to the high frequency component of the image to be detected,is the identity space constraint;
according to an algorithmObtaining a forgery probability of the low frequency component, wherein,refers to the backbone network corresponding to the low frequency component,the low-frequency component of the image to be detected is referred to;
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 algorithmObtaining a high frequency component of a C channel of the spectrum, wherein,it is referred to the second frequency response that,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 algorithmObtaining 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 algorithmBy corresponding convolution modulesExtracting first characteristic information from ith scale(ii) a For the preset correct image, the algorithm is carried outBy corresponding convolution modulesExtracting second characteristic information from ith scaleBy an algorithmObtaining identity constraintsThe region p in which, among others,is the first characteristic informationAnd second characteristic informationA 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 algorithmObtaining a forgery probability of the high frequency component, wherein,refers to the backbone network corresponding to the high frequency component,refers to the high frequency component of the image to be detected,is the identity space constraint; according to an algorithmObtaining a forgery probability of the low frequency component, wherein,refers to the backbone network corresponding to the low frequency component,the low-frequency component of the image to be detected is referred to; by algorithmObtaining a final counterfeiting probability, wherein alpha is a weight parameter; with unconstrained parametersMaking 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.
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)
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)
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 |
-
2022
- 2022-03-03 CN CN202210203248.2A patent/CN114267089B/en active Active
Patent Citations (5)
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)
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 |