Active deep fake forensics method based on separable-aware hash enhancement

By embedding separable perceptual hash codes in the image, the problem of difficult to distinguish between real images and deep fake images in the prior art is solved, and reliable detection and protection of image sources is realized, ensuring that the watermark is in the content maintenance operation Strongness and accuracy of evidence.

CN118587568BActive Publication Date: 2024-11-08QILU UNIVERSITY OF TECHNOLOGY (SHANDONG ACADEMY OF SCIENCES)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411060517.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-05
Publication Date
2024-11-08
Estimated Expiration
2044-08-05

AI Technical Summary

Technical Problem

The prior art is difficult to effectively distinguish between real images and deep fake images, especially under confrontational training, and it is difficult to achieve the problem that the robust watermark of face traceability and protection of original faces is difficult to distinguish between real images and fake images before and after depth fakes.

Method used

Using the deep forgery active forensics based on separable perceptual hash enhancement, the deep forensics model is constructed, and the identity information is embedded in the face image using a secret-loaded network, a decoder and a discriminator, to generate a secret-loaded image, and through Perceptual hash codes remain robust during content-keeping operations, ensuring that watermarks are reliably extracted after transmission and tampering.

Benefits of technology

A unified framework for image source detection and deep forgery active forensics is realized, which enhances the accuracy and reliability of forensics, ensures that the watermark is robust in the content maintenance operation, can effectively distinguish between real images and forged images, and protects the original image. source.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587568B_ABST
    Figure CN118587568B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of deep fake technology, and in particular, provides a deep fake active forensics method based on separable perceptual hash enhancement. The method includes embedding a first watermark corresponding to an original face image into a face image containing identity information to obtain a secret image; inputting the secret image into a content retention operation module to simulate the environment in which the image is transmitted in a network, and obtaining the hash cross-correlation similarity through a trained discriminator. The method improves the face deep fake active forensics system, provides a unified framework for image source detection and deep fake active forensics, ensures the robustness of the watermark in the content retention operation, and enhances the accuracy and reliability of forensics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of deep fake technology, and in particular to a deep fake active evidence collection method based on separable perceptual hash enhancement. Background Art

[0002] With the rapid development of deep learning and computer vision technologies, AI has made significant progress in image generation and processing. However, this progress has also brought about serious security challenges. In particular, the emergence of a large number of image editing software has continuously reduced the cost of image modification, making anyone a master of manipulation, creating seemingly authentic content with a single click. In recent years, the promotion of deep learning technology has brought facial image deepfakes to the forefront, making forged images difficult to distinguish from real ones. This has attracted the attention of numerous researchers. The provenance and authenticity of images circulated online have never been more important, with profound implications for personal privacy, public safety, and social stability.

[0003] Deepfakes originate from the fusion of deep learning and forgery. To address the challenges posed by deepfakes, researchers have proposed various methods for passively detecting deepfake images. These methods, such as leveraging handcrafted features like blinking, head pose, and color inconsistencies, are well-suited for early detection. However, adversarial training can easily fix these shallow manipulations. Currently, existing techniques, to distinguish between real and fake, leverage continuous facial landmarks by modeling five sensory and facial regions to construct facial muscle motion features to address the problem of detecting compressed deepfake videos. Alternatively, they consider the high-level semantics of the image being detected and detect suspicious faces by detecting identity inconsistencies within and outside the face. While these strategies perform remarkably well on public datasets, they lack robustness and suffer from generalization issues to new forgery strategies. Furthermore, most detection methods rely heavily on large amounts of training data. Furthermore, even if the classification result is false, it is difficult to trace the face's origin, leaving the original face essentially unprotected.

[0004] Robust watermarking is an important technology for authentication and source detection. Scholars have used robust watermarking technology to embed watermarks into images through a watermark encoder. Even if the watermarked image has suffered severe distortion, the watermark can still be correctly extracted in an invisible manner. Extraction only requires marking the image. Invisible watermarking has increasingly wide applications in the modern multimedia ecosystem, including copyright protection, traceability, and content authentication. Because robust watermarking has high robustness requirements, even if the main part of the marked image is obscured or captured by a screenshot, the embedded watermark can still be extracted after severe distortion. Excessive robustness may also cause the watermark to exist before and after deepfakes, making it difficult to distinguish between real and forged images. Existing technologies use different robust decoders to extract watermarks separately to solve this problem. However, only the combined action of a semi-robust decoder and a robust decoder can reliably track the trusted source of the marked face and detect whether it has been tampered with. Neither of the two can achieve this goal. Summary of the Invention

[0005] In view of this, the present invention provides a deep fake active forensics method based on separable perceptual hashing enhancement, which is used to improve the facial deep fake active forensics system, provide a unified framework for image source detection and deep fake active forensics, ensure the robustness of watermarks in content preservation operations, and enhance the accuracy and reliability of forensics.

[0006] In a first aspect, the present invention provides a deep fake active forensics method based on separable perceptual hash enhancement, the method comprising:

[0007] Step 1: Build a deep fake active forensics model to obtain the secret network, decoder De, content preservation operation module and discriminator; the secret network includes the watermark generator G H , encoder;

[0008] Step 2: Train the encoder, decoder, and discriminator in step 1 to obtain the trained encoder, decoder De, and discriminator;

[0009] Step 3: Use the encoder trained in step 2 to embed the identity information into the original face image I to generate a face image I1;

[0010] Step 4: Annotate the background and foreground of the original face image I and input the original face image I into the watermark generator G in step 1. H , extract facial features from the original face image I and generate a face-aware hash code corresponding to the original face image I;

[0011] Step 5: Convert the face-aware hash code in step 4 into binary to obtain the first watermark H FA ;

[0012] Step 6: Use the encoder trained in step 2 to convert the first watermark H in step 5 into FA Embed the face image I1 in step 3 to obtain the encrypted image I En ;

[0013] Step 7: The encrypted image I in step 6 En The content-preserving operation module input into step 1 simulates the environment in which the image is transmitted in the network, and obtains the hash cross-correlation similarity through the discriminator trained in step 2.

[0014] Optionally, the formula for converting to binary in step 5 is:

[0015] ;

[0016] in, Represents the i-th binary number in the hash sequence; ; m represents the length of the feature coding sequence, Represents the i-th real feature code of the output.

[0017] Optionally, step 6 includes:

[0018] Step 61: Convert the RGB image of the face image I1 into a YUV image using the trained encoder, where Y represents brightness information and U and V represent chrominance information.

[0019] Step 62: For each block space of the YUV image in step 61, a discrete cosine transform (DCT) is used to transform the image from the spatial domain to the frequency domain to extract frequency domain information.

[0020] Step 63: extract the background area low-frequency component from the DCT-transformed YUV image in step 62 according to the information shared by the watermark generator;

[0021] Step 64: The first watermark H FA Adjust the size to match the low-frequency component of the background area extracted in step 63, and FA Embedded into low-frequency components;

[0022] Step 65: embed the first watermark H in step 64 FA The DCT coefficients are converted back to YUV space by applying inverse discrete cosine transform IDCT to obtain the time domain image, i.e. YUV image.

[0023] Step 66: Convert the YUV image in step 65 back to RGB image to generate the encrypted image I En .

[0024] Optionally include:

[0025] Secret Image I En Visually similar to the original face image I, the loss function is , whose expression is:

[0026] ;

[0027] in, represents the training parameters, H FA is the first watermark of the original face image I;

[0028] To ensure the confidentiality of the image I En The perceptual quality of the encrypted image I is similar to that of the original face image I. The perceptual loss is designed to measure the En Compared with the original face image I, the loss function is expressed as:

[0029] ;

[0030] in, Represents the feature map of the image at layer l; Represents the Euclidean distance between feature maps at the feature map position (h, w); h represents the height index of the feature map; w represents the width index of the feature map; Indicates the height of the feature map of the lth layer; Indicates the width of the l-th layer feature map;

[0031] The total variation loss is used to encrypt the image I En Regularization is performed, and the expression of the total variation loss function is:

[0032] ;

[0033] Where i represents the pixel index of the image in the vertical direction, and j represents the pixel index of the image in the horizontal direction; Indicates a secret image; Represents the pixel value of the encrypted image at position (i+1, j); Represents the pixel value of the encrypted image at position (i, j); Represents the pixel value of the encrypted image at position (i, j+1);

[0034] Total loss function The expression is:

[0035] ;

[0036] in, 、 and are the weights of the corresponding losses.

[0037] Optionally, step 7 includes:

[0038] Step 71: Encrypted image I En Input to the content preservation operation module to simulate the image transmission environment in the network, and obtain the simulated encrypted image I CO ;

[0039] Step 72: The encrypted image I simulated in step 71 is CO Input to the watermark generator G H , extract the simulated encrypted image I CO The facial features in the image are used to generate the simulated encrypted image I CO The corresponding face perception hash code is converted into binary to obtain the corresponding second watermark ;

[0040] Step 73: Extract the simulated encrypted image I through the trained decoder De CO The first watermark H in FA ; And the first watermark H is converted into FA and the second watermark Compare and obtain the similarity of hash cross-correlation.

[0041] Optionally, step 7 includes:

[0042] Step 74: Encrypted image I En Input to the content preservation operation module to simulate the environment in which the image is transmitted in the network, and obtain the tampered image I MD ;

[0043] Step 75: The image I tampered with in step 74 MD Input to the watermark generator G H , extract the tampered image I MD The facial features in the image are used to generate the tampered image I MD The corresponding face perception hash code is converted into binary to obtain the corresponding third watermark ;

[0044] Step 76: Extract the tampered image I through the trained decoder De MD The first watermark H in FA ; And the first watermark H is converted into FA and the third watermark Compare and obtain the similarity of hash cross-correlation.

[0045] Optionally, the similarity of the first hash cross-correlation The expression is:

[0046] ;

[0047] in, Indicates the first watermark H FA With the second watermark covariance of Indicates the first watermark H FA The standard deviation of each series in ; Indicates the second watermark The standard deviation of each series in .

[0048] Optionally, the similarity of the second hash cross-correlation The expression is:

[0049] ;

[0050] in, Indicates the first watermark H FA With the third watermark covariance of Indicates the first watermark H FA The standard deviation of each series in ; Indicates the third watermark The standard deviation of each series in .

[0051] In a second aspect, an embodiment of the present invention provides a computer-readable storage medium, which includes a stored program, wherein when the program is running, the electronic device where the computer-readable storage medium is located is controlled to execute the deep fake active forensics method based on separable perceptual hash enhancement in the first aspect or any possible implementation of the first aspect.

[0052] In a third aspect, an embodiment of the present invention provides an electronic device comprising: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions that, when executed by the electronic device, enable the device to execute the deep fake active forensics method based on separable perceptual hash enhancement in the first aspect or any possible implementation of the first aspect.

[0053] In the technical solution provided by the present invention, the method includes constructing a deep fake active forensics model, obtaining a secret network, a decoder De, a content preservation operation module and a discriminator; wherein the secret network includes a watermark generator GH and an encoder; and obtaining the trained encoder, decoder De and discriminator; embedding the identity information into the original face image I through the trained encoder to generate a face image I1; inputting the original face image I into the watermark generator G in step 1 H, extract the features of the original face image I, generate the face-aware hash code corresponding to the original face image I; convert the face-aware hash code into binary to obtain the first watermark H FA ; The first watermark H is converted by the trained encoder FA Embedded into the face image I1, obtain the encrypted image I En ; The encrypted image I En The input to the content-preserving operation module simulates the environment in which the image is transmitted in the network, and the hash cross-correlation similarity is obtained through the trained discriminator. This method improves the active forensics system for deep fake faces, provides a unified framework for image source detection and active forensics for deep fakes, ensures the robustness of the watermark in the content-preserving operation, and enhances the accuracy and reliability of forensics. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0055] Figure 1 A flowchart of the deep fake active evidence collection method provided by an embodiment of the present invention;

[0056] Figure 2 A schematic diagram of a deep fake active evidence collection model provided by an embodiment of the present invention;

[0057] Figure 3 A schematic diagram of a model for obtaining a classified image provided by an embodiment of the present invention;

[0058] Figure 4 A schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0059] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0060] It should be understood that the embodiments described are only a portion of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative work are within the scope of protection of the present invention.

[0061] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The singular forms "a", "the" and "the" used in the embodiments of the present invention are also intended to include plural forms, unless the context clearly indicates other meanings.

[0062] It should be understood that the term "and / or" as used herein simply describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A alone, A and B together, or B alone. Furthermore, the character " / " in this document generally indicates an "or" relationship between the associated objects.

[0063] The word "if," as used herein, may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to the determination" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)," depending on the context.

[0064] Image perceptual hashing is a hashing algorithm that generates fixed-length hash codes based on the visual content features of an image. On the one hand, it inherits the characteristics of traditional hash functions, such as unidirectionality, collision resistance, and abstractness; on the other hand, image perceptual hashing also has the following characteristics: (1) Robustness: Unlike traditional hashing algorithms that are extremely sensitive to the original data, the original image can still generate similar hash sequence codes after content-preserving operations (such as compression, noise addition, rotation, etc.). Any perceptually similar images should have similar hash values, thereby achieving authentication of images with the same content. (2) Distinguishing: For images with different contents, the perceptual hashing algorithm should generate perceptual hash codes with large differences, thereby achieving identification of images with different contents. (3) Security: Using different keys should generate completely different perceptual hash codes. Even if the image perceptual hashing generation algorithm is public, an attacker who does not have the key cannot forge a hash code that is consistent with the target perceptual hash. Based on the above characteristics, the image content forensics algorithm based on perceptual hashing has become an ideal choice for image content authentication and copyright protection. The technical solution proposed in this invention does not require the participation of a complex face parsing model. It uses a perceptual hash code that is robust to recognition of images with the same content but sensitive to differentiation of images with different contents as an embedded watermark, so that the entire EDFF process is end-to-end and a new paradigm of robust watermarking for deep face forgery is created.

[0065] Faced with the increasingly sophisticated threats posed by deep fake technology, the demand for deep fake forensics continues to grow. Here are some related cutting-edge forensics technologies:

[0066] Passive deepfake forensics identifies forged content by analyzing the intrinsic features of images, videos, or audio. These methods do not rely on pre-embedded information, but instead leverage the inherent characteristics of the content for detection. Existing techniques include the novel Gram-Net architecture, which leverages a global image texture representation for robust forged image detection; or the Multi-Attention Deepfake Detection Network, which utilizes multiple spatial attention heads, texture feature enhancement blocks, and attention map-guided feature aggregation for fine-grained deepfake detection. Recently, by introducing the concept of Neighboring Pixel Relation (NPR) and redesigning the CNN-based generator architecture, they have improved forged image detection by capturing generalized structural artifacts caused by upsampling. Researchers have proposed using small, untrainable filters and randomly initialized convolutional layers as data-independent operators (DIOs), which effectively capture generalized artifacts and achieve state-of-the-art performance on popular classifiers. Through a systematic study of various image generators, researchers found significant differences between generated and real images in the Fourier domain, autocorrelation, and frequency signal distribution. The researchers used the Global and Local Feature Fusion (GLFF) framework to combine global multi-scale features and local fine features to detect synthetic images, and created a challenging dataset called DeepFakeFaceFrensics (DFβ) for evaluation. In general, passive forensics methods do not require pre-embedded information, are applicable to various content types, and can automate large-scale detection. However, they have shortcomings such as susceptibility to adversarial attacks, lags behind in new forgery techniques, and require high computing resources. In addition, they are limited in that they cannot detect the source.

[0067] 2. Active Deep Fake Forensics: By proactively implementing defensive measures during content generation and dissemination, we effectively prevent forgery and tampering, enhancing the credibility and security of content. Researchers proposed an active forensics framework that degrades the performance of facial manipulation models by injecting small perturbations into facial data. They also proposed a new anti-forgery technique that continuously generates perceptual perturbations to protect facial images from popular forgery techniques. They proposed a new data-driven approach that effectively prevents face manipulation by generating specific image perturbations in the original image, replacing the actual manipulation with predefined manipulation targets. They leveraged differentiable compressible approximations to improve robustness to common image compression and introduced an attention-based fusion method for manipulation-specific perturbations. By generating a cross-model universal adversarial watermark (CMUA-Watermark), the researchers employed iterative attacks and a two-level perturbation fusion strategy to address model-level conflicts and optimization issues, protecting images from forgery models. They designed a set of templates that, when added to real images, can more accurately detect image manipulation operations. These templates make manipulated images more distinct from the original, real images. Researchers proposed an identity-aware watermarking framework that assigns identity semantics to watermarks and combines it with a chaotic encryption system to ensure confidentiality. This framework utilizes an encoder-decoder framework and adversarial image operations to encode and recover watermarks for verifying and tracing the authenticity of image content. Researchers also proposed a solution called SepMark, which leverages the highly robust Tracer decoder and the Deepfake-sensitive Detector semi-robust detector to achieve watermark survival and extinction at varying levels of robustness. However, these approaches also face challenges such as technical adversarial forces, resource requirements, and privacy protection, requiring continuous optimization and improvement.

[0068] 3. Deep watermarking is an emerging digital watermarking method that combines deep learning techniques with traditional watermarking technology, aiming to protect the copyright and integrity of digital media. Benefiting from the powerful capabilities of deep learning, many watermark embedding techniques based on deep neural networks have been proposed. HiDDeN is the first end-to-end learning architecture for robust watermarking. It consists of an encoder, a discriminator, a noise layer, and a decoder. The differential noise layer is used to enhance the data of the marked image to ensure robustness. Researchers proposed a three-stage watermarking framework, consisting of a noise-free initialization stage, a mask-guided frequency enhancement stage, and an adversarial training stage, ensuring high-quality watermarks that can be extracted even after realistic distortion. Researchers designed a learning steganography algorithm, called StegaStamp, that uses deep neural networks to robustly encode and decode arbitrary hyperlink bit strings and can withstand image perturbations in a near-perceptually stealthy manner. Researchers developed light field message transfer (LFM) to embed and transmit hidden information through photographic steganography and leverage the camera display transfer function (CDTF) to optimize information embedding and recovery. Researchers proposed a new Universal Deep Hiding (UDH) meta-architecture that achieves efficient steganography by leveraging frequency differences and remains robust to pixel intensity variations, making it suitable for image / video steganography and light field messaging (LFM). Image-perceptual hashing is a hashing algorithm that generates fixed-length hash codes based on the visual content of an image. A high-performing perceptual hashing algorithm should be able to achieve a good balance between the two. The researchers divided the input image into sub-blocks and then applied the Local Linear Embedding (LLE) algorithm to a normalized matrix composed of random sub-blocks to generate perceptual hash codes. The researchers used Locality Preserving Projection (LPP) to extract inherent local structural features from the maximum Gabor filtered image. The High-Level Locality Preserving Projection (HLPP) algorithm can be used to generate perceptual hash codes. The researchers proposed an unsupervised perceptual hashing image content forensics method based on a bidirectional generative adversarial network (BiGAN). The method generates perceptual hash codes with strong image semantic feature representation through iterative adversarial interactions between the encoder network, the generator network, and the discriminator network. Although deep robust watermarking has been greatly developed, using a single watermark to simultaneously perform forgery detection and source tracking remains largely unexplored in the current research field.

[0069] Figure 1Flowchart of the deep fake active evidence collection method provided by the embodiment of the present invention, such as Figure 1 As shown, the method includes:

[0070] Step 1: Build a deep fake active forensics model to obtain the secret network, decoder De, content preservation operation module and discriminator; the secret network includes the watermark generator G H , encoder.

[0071] Step 2: Train the encoder, decoder, and discriminator in step 1 to obtain the trained encoder, decoder De, and discriminator.

[0072] In this embodiment of the present invention, during the training process, the deepfake active forensics model is trained based on facial images, watermarks, encrypted images, and tampered images to obtain an encoder, decoder, and discriminator. In practical applications, images are inevitably affected by common post-processing operations and noise during upload and transmission, such as compression, blurring, and noise. These operations and noise can significantly affect image quality. In this process, content preservation operations are simulated in real-world image transmission environments, as shown in Table 1:

[0073] Table 1

[0074] ;

[0075] As shown in Table 1, operations include contrast adjustment, gamma filtering, median filtering, salt and pepper noise, Gaussian noise, rotation, JPEG compression, circular averaging filtering, and brightness; parameters include Photoshop scale, gamma coefficient, filter size, density, variance, rotation angle, quality factor, filter size, Photoshop scale; and the corresponding parameter values.

[0076] In the embodiment of the present invention, the training is performed based on the L2 norm:

[0077] Secret Image I En Visually similar to the original face image I, the loss function is , whose expression is:

[0078] ;

[0079] in, represents the training parameters, H FA is the first watermark of the original face image I;

[0080] For two decoders, the decoder De in the robustness verification should be able to achieve the encrypted image I after simulation. CO Extract the first watermark HFA The decoder De in the distinguishing verification can realize the tampered image I MD Extract the first watermark H FA . The loss functions are:

[0081] ;

[0082] ;

[0083] in, and Represents the training parameters of content preservation operation and tampering training parameters, CPO represents content preservation operation.

[0084] Step 3: Use the encoder trained in step 2 to embed the identity information into the original face image I to generate a face image I1.

[0085] Step 4: Annotate the background and foreground of the original face image I and input the original face image I into the watermark generator G in step 1. H , extract facial features from the original face image I, and generate a face-aware hash code corresponding to the original face image I.

[0086] Step 5: Convert the face-aware hash code in step 4 into binary to obtain the first watermark H FA .

[0087] In the embodiment of the present invention, the formula for converting to binary in step 5 is:

[0088] ;

[0089] in, Represents the i-th binary number in the hash sequence; ; m represents the length of the feature coding sequence, Represents the i-th real feature code of the output.

[0090] Step 6: Use the encoder trained in step 2 to convert the first watermark H in step 5 into FA Embed the face image I1 in step 3 to obtain the encrypted image I En .

[0091] In the embodiment of the present invention, Figure 2 As shown in the figure, the encrypted network consists of convolutional layers, fully connected layers, upsampling and downsampling. It takes the original face image I as input, embeds the identity information into the original face image I, and generates a face-aware hash code to obtain the first watermark H FA Embedded into the background low-frequency area for convolution and upsampling to generate the dense image I En .

[0092] In the embodiment of the present invention, Figure 3 As shown, step 6 includes:

[0093] Step 61: Convert the RGB image of the face image I1 into a YUV image using the trained encoder, where Y represents brightness information and U and V represent chrominance information.

[0094] Step 62: For each block space of the YUV image in step 61, a discrete cosine transform (DCT) is used to transform the image from the spatial domain to the frequency domain to extract frequency domain information.

[0095] Step 63: extract the background area low-frequency component from the DCT-transformed YUV image in step 62 according to the information shared by the watermark generator;

[0096] The original face image I is input into a fused U-net. During the downsampling phase, conv-in-relu with a stride of 2 is used for dimensionality reduction, and the number of channels is adjusted through a Double Conv. To enhance the robustness of the embedded watermark, the RGB image is converted to YUV color space and a discrete cosine transform (DCT) is performed on the YUV image. The frequency content of each block is calculated to separate low-frequency and high-frequency components. The watermark generator uses an image-perceptual hashing algorithm, leveraging the perceptual robustness, discriminative sensitivity, and key-dependence of hash codes. Since the goal is to detect deepfake face swaps by resolving inconsistencies between the recovered watermark of a candidate image and the content-matched watermark, it is necessary to ensure that two different watermarks belong to different facial identities. A perceptual hashing framework that integrates region recognition and enhanced deep feature networks is used to extract a face-perceptual hash code of length l.

[0097] Step 64: The first watermark H FA Adjust the size to match the low-frequency component of the background area extracted in step 63, and FA Embedded into low-frequency components;

[0098] The first watermark H is adjusted by linear transformation and nearest neighbor interpolation (F.interpolate) FA Reshape it to a size that matches the low-frequency component and use the foreground and background masks to determine the embedding area. FA Embed the background area of ​​the image and keep the foreground area unchanged; then, embed the first watermark H FA The low-frequency component of is concatenated with the original high-frequency component.

[0099] Step 65: embed the first watermark H in step 64 FAThe DCT coefficients are converted back to YUV space by applying inverse discrete cosine transform IDCT to obtain the time domain image, i.e. YUV image.

[0100] Step 66: Convert the YUV image in step 65 back to RGB image to generate the encrypted image I En .

[0101] The first watermark H FA The YUV image is converted back to RGB color space, the color information is restored, and the final image embedded with the first watermark H is obtained. FA , and the RGB encrypted image I is visually identical to the original face image I En .

[0102] In an embodiment of the present invention, the present invention includes:

[0103] This paper introduces separable image-aware hash codes to generate highly stable and untamperable facial watermarks. The watermark is then embedded into the low-frequency components of the original facial image background through an encoding-decoding network, ensuring its invisibility and robustness. To train a unified framework for both original facial image source detection and deepfake active forensics, the paper also designs a loss function based on the joint optimization of multi-scale perceptual smoothing, introducing L2 loss, perceptual loss (Learned Perceptual Image Patch Similarity, LPIPS), and total variation loss (TV Loss). This paper achieves a comprehensive optimization of numerical accuracy, perceptual quality, and image smoothness. The loss function is designed as follows:

[0104] Secret Image I En Visually similar to the original face image I, the loss function is , whose expression is:

[0105] ;

[0106] in, represents the training parameters, H FA is the first watermark of the original face image I;

[0107] To ensure the confidentiality of the image I En The perceptual quality of the encrypted image I is similar to that of the original face image I. The perceptual loss is designed to measure the En Compared with the original face image I, the loss function is expressed as:

[0108] ;

[0109] in, Represents the feature map of the image at layer l; Represents the Euclidean distance between feature maps at the feature map position (h, w); h represents the height index of the feature map; w represents the width index of the feature map; Indicates the height of the feature map of the lth layer; Indicates the width of the l-th layer feature map;

[0110] The total variation loss is used to encrypt the image I En Regularization is performed, and the expression of the total variation loss function is:

[0111] ;

[0112] Where i represents the pixel index of the image in the vertical direction, and j represents the pixel index of the image in the horizontal direction; Indicates a secret image; Represents the pixel value of the encrypted image at position (i+1, j); Represents the pixel value of the encrypted image at position (i, j); Represents the pixel value of the encrypted image at position (i, j+1);

[0113] Total loss function The expression is:

[0114] ;

[0115] in, 、 and are the weights of the corresponding losses.

[0116] Step 7: The encrypted image I in step 6 En The content-preserving operation module input into step 1 simulates the environment in which the image is transmitted in the network, and obtains the hash cross-correlation similarity through the discriminator trained in step 2.

[0117] In the embodiment of the present invention, the cross-correlation coefficient is quantized and mapped to a distribution between 0 and 1 to represent the similarity between two sequences. The closer the cross-correlation value is to 1, the more similar the sequences are, and the closer it is to 0, the more dissimilar the sequences are.

[0118] In this embodiment of the present invention, step 7 includes:

[0119] Step 71: Encrypted image I En Input to the content preservation operation module to simulate the image transmission environment in the network, and obtain the simulated encrypted image I CO ;

[0120] Step 72: The encrypted image I simulated in step 71 is COInput to the watermark generator G H , extract the simulated encrypted image I CO The facial features in the image are used to generate the simulated encrypted image I CO The corresponding face perception hash code is converted into binary to obtain the corresponding second watermark ;

[0121] Step 73: Extract the simulated encrypted image I through the trained decoder De CO The first watermark H in FA ; And the first watermark H is converted into FA and the second watermark Compare and obtain the similarity of the first hash correlation.

[0122] In the first watermark H FA In the extraction process, the U-net structure is first used to downsample the input layer by layer with the first watermark H FA RGB images are processed to extract multi-scale features. These feature maps are then converted to YUV color space to separate brightness and chromaticity information. The brightness (Y) component contains the main structural information of the image, while the chromaticity U and V components contain color information. Next, the YUV feature map is subjected to discrete cosine transform (DCT) to convert it into a frequency domain representation. The DCT transform can effectively separate the low-frequency and high-frequency components in the image, where the low-frequency component contains the main energy and structural information of the image. The area for extracting the watermark is then determined by the background mask, and the watermark is extracted from the low-frequency component. The background mask is used to distinguish between the foreground and background in the image, so that the watermark information is extracted only in the background area. The decoder part of the U-net is used to upsample the low-frequency component feature map layer by layer to restore it to the same spatial size as the original input image. In this way, the decoder is able to gradually recover the embedded watermark information in the image. Finally, the extracted first watermark H is adjusted FA resize to restore it to its original size and format for comparison and verification. The decoder is designed with the same U-net structure as the encoder. During the model training process, in order to evaluate and improve the robustness of the watermark, the robustness detection module receives various distorted and noisy images (ICO) and uses the mean square error (MSE) to optimize the decoding information. In this way, the model is able to maintain high decoding accuracy in the face of different types of image distortion. In addition, in order to verify the performance of the model, a malicious distortion module is also introduced. This module contains the Deepfake face swap model, which is used to generate forged images, that is, tampered images I MDBy subjecting the input image to a Deepfake operation to generate a fake image, the model's discriminability in the face of malicious attacks is tested. Through this comprehensive testing method, the present invention aims to ensure that the proposed watermarking framework can demonstrate good robustness and reliability in various practical application scenarios.

[0123] As an encoding method for representing the essential features of an image, the perceptual hashing algorithm provides an effective way to assess content consistency between images. Perceptual hash codes not only authenticate content-preserving tampering but also allow identification of images with varying content. The key to this algorithm lies in its ability to generate hash codes that capture both global and local image features, maintaining high recognition accuracy even after various image transformations (such as scaling, rotation, and compression). By utilizing the perceptual hashing algorithm, content consistency verification can be performed throughout image upload, distribution, and usage, ensuring image authenticity and integrity. Furthermore, this technology can be used to detect and prevent the illegal copying and distribution of images, thereby protecting image copyright and related rights.

[0124] In this embodiment of the present invention, the similarity of the first hash correlation The expression is:

[0125] ;

[0126] in, Indicates the first watermark H FA With the second watermark covariance of Indicates the first watermark H FA The standard deviation of each series in ; Indicates the second watermark The standard deviation of each series in .

[0127] In this embodiment of the present invention, step 7 includes:

[0128] Step 74: Encrypted image I En Input to the content preservation operation module to simulate the environment in which the image is transmitted in the network, and obtain the tampered image I MD ;

[0129] Step 75: The image I tampered with in step 74 MD Input to the watermark generator G H , extract the tampered image I MD The facial features in the image are used to generate the tampered image I MD The corresponding face perception hash code is converted into binary to obtain the corresponding third watermark ;

[0130] Step 76: Extract the tampered image I through the trained decoder De MD The first watermark H in FA ; And the first watermark H is converted into FA and the third watermark Compare and obtain the similarity of the second hash correlation.

[0131] In this embodiment of the present invention, the similarity of the second hash correlation The expression is:

[0132] ;

[0133] in, Indicates the first watermark H FA With the third watermark covariance of Indicates the first watermark H FA The standard deviation of each series in ; Indicates the third watermark The standard deviation of each series in .

[0134] In the embodiment of the present invention, the face of a person is maliciously tampered with by criminals, and the tampered image I MD The same steps are used to input the decoder and watermark generator G H , extract the first watermark H FA and the tampered image I MD Corresponding third watermark Cross-correlation distribution, used to represent the third watermark of tampering with the face The first watermark H of the original face image FA If the watermark is inconsistent, it means that the original face image has been maliciously tampered with. The extracted watermark is used to detect the source of the image and protect the copyright of the image.

[0135] In the embodiment of the present invention, Figure 2 As shown, V H Represents the cross-correlation value, T represents the threshold; when the cross-correlation value V H When the cross-correlation value V is greater than the threshold T, it means that the sequence is the same and the image has not been tampered with. H When it is less than the threshold T, it means that the image has been maliciously tampered with.

[0136] In the embodiment of the present invention, through experiments, the discriminator uses error back propagation to correct the model parameters of the fully connected neural network based on the recognition error of the perceptual hash code. This process ensures that the model can effectively learn and adjust, thereby improving the recognition accuracy of the perceptual hash code. In the experiment, the hash correlation coefficient is used to calculate the similarity degree of the image perceptual hash code. For images with consistent content, the cross-correlation distribution result should be as close to 1 as possible. This means that the perceptual hash code can maintain a high similarity between the same images, thereby verifying the consistency of their content. On the contrary, for images with inconsistent content, the cross-correlation distribution result should be as close to 0 as possible. This ensures that the perceptual hash code can effectively distinguish between images with different contents, thereby achieving accurate identity authentication and copyright protection. Its goal is to distinguish between untampered images and tampered images. The loss function of the discriminator The design includes the following two aspects:

[0137] ;

[0138] The consistency probability is used to measure the consistency between the perceptual hash code extracted from the background and the perceptual hash code of the face.

[0139] ;

[0140] in, represents the probability that the discriminator thinks the image is a real image. is the discriminator's response to the simulated encrypted image I CO The discriminant output.

[0141] ;

[0142] in, and are the weights of the corresponding losses.

[0143] The expression of the overall loss function is:

[0144] ;

[0145] in 、 、 、 are the weights of the corresponding losses.

[0146] To validate the effectiveness of our proposed method, we used the widely used CelebA-HQ dataset, which contains 30,000 image samples, all resized to 128×128 and 256×256 resolutions. For malicious manipulation, we selected the SimSwap, GANimation, and StarGAN models, representing typical deepfakes, representing face swapping, face re-creation, and attribute editing, respectively. Specifically, the target face for swapping was randomly selected from the CelebA evaluation set, and the attribute editing set included gender (male), straight hair (straight hair), curly hair (curly hair), and black hair (black hair). These editing operations were implemented based on published pre-trained models to produce convincing deepfakes. Furthermore, common content-preserving operations were considered in the experiment, as shown in Table 1. Cropping is not considered in this experiment because it is not a common distortion of the full face. These operations allow for a more comprehensive evaluation of the effectiveness of our active deepfake detection scheme based on separable perceptual hashing enhancement.

[0147] The goal of this experiment is to systematically test and validate the performance and reliability of separable perceptual hashing enhancement technology in identifying and extracting different types of deepfake images. Through these experimental data and results, we can evaluate the effectiveness and robustness of this technology in real-world applications. This experiment uses a segmented training approach, first training the model using content-preserving operations (CPO).

[0148] After sufficient iterations, the model is further trained using malicious manipulation (MD) to detect face forgery. When the network is trained using content-preserving operation (CPO), the weight parameters corresponding to each loss are =1, =5, =5, =0.02; the learning rate lr is set to 0.0001 to ensure good watermark recovery performance under common operations. =5, =1, =1, =0.02 and lr = 0.00001 to fine-tune the network to achieve a balance between the visual quality of the embedded watermarked image and the robustness of the watermark.

[0149] In the experiment, the cross-correlation value was used as an evaluation metric to ensure the consistency of the algorithm performance evaluation and verify its effectiveness. The hash cross-correlation value can simultaneously reflect the influence of the numerical value of different elements in the perceptual hash sequence and the weight of their position, and is therefore more suitable for perceptual hash code similarity evaluation and image content forensics of sample images based on large databases. The present invention uses the Receiver Operating Characteristic Curve (ROC) curve to evaluate the performance of the algorithm. The ROC curve is used to analyze various state-of-the-art schemes to provide a quantitative comparison of the algorithm performance. The proposed method is designed and implemented based on the PyTorch framework, and the random initialization of the network parameters is guaranteed. All experiments were implemented on a Dell T630 machine equipped with 128GB RAM and an RTX 3090 GPU equipped with 24GB VRAM.

[0150] This experiment further analyzed the visual quality of the watermarked images by evaluating the average Peak Signal-to-Noise Ratio (PSNR), Structural Similarity Index (SSIM), and Learned Perceptual Image Patch Similarity (LPIPS) between the original face image and the embedded watermarked image. To ensure the comprehensiveness and reliability of the results, the experiment tested the visual quality of the embedded images at two different resolutions. Table 2 shows the quantitative visual quality evaluation of the 128×128 resolution watermarked images on CelebA-HQ.

[0151] Table 2

[0152] ;

[0153] As shown in Table 2, the proposed solution slightly outperforms CIN and significantly outperforms MBRS, SepMark, HiDDeN, and ARWGAN in terms of PSNR and SSIM. This demonstrates that the proposed solution effectively embeds watermark information while ensuring image quality. Although CIN performs well in terms of visual quality, its reversible neural network has limited flexibility and exhibits reduced robustness to quantization noise. Furthermore, the Cross-Model Universal Adversarial Watermark (CMUAWatermark) designed by Huang et al. demonstrates excellent defense against various facial images and deepfake models. However, CMUAWatermark still has limitations in terms of model generalization and visual quality. Specifically, while effective across a wide range of images and models, the embedded watermark may degrade the visual quality of the image in some cases, and its adaptability to different models requires further improvement. Overall, the proposed active forensics technique enhances watermark embedding effectiveness and attack resistance while maintaining visual quality, demonstrating superior performance to existing methods.

[0154] In the embodiment of the present invention, the combined effect of multiple watermarks is:

[0155] Enhanced robustness and concealment: Multiple watermarks are embedded in different layers and regions, making it difficult for attackers to simultaneously destroy all embedded information, thereby enhancing the robustness and concealment of the watermark. The embedded information is diverse and widely distributed, forcing attackers to deal with multiple different types of embedded information simultaneously, greatly increasing the difficulty of the attack.

[0156] Multi-level verification: During verification, multi-level verification can be performed based on different types of embedded information. Even if one of the watermarks is destroyed, the other watermarks can still provide strong verification evidence.

[0157] In the embodiment of the present invention, robustness verification is performed by: FA and the second watermark For comparison, the discriminator calculates the cross-correlation coefficient between the two sequences to evaluate the watermark recovery performance of the separable perceptual hash enhanced deep fake active forensics algorithm. FA and the third watermark For comparison, the discriminator calculates the cross-correlation coefficient between the two sequences to evaluate the discrimination ability of the deep fake active forensics model based on separable perceptual hashing enhancement on images with various contents.

[0158] The embodiments of the present invention, on the one hand, avoid the possibility of the watermark being perceived and attacked by embedding the original face image perceptual hash code in the background in the form of a robust invisible watermark, so that the watermark can still be completely extracted after undergoing a content preservation operation; on the other hand, after the face image is maliciously tampered with, the face perceptual hash code of the maliciously tampered image generated is different from the embedded image. At this time, the embedded original face perceptual hash code can still be extracted. By comparing the difference between the extracted original face perceptual hash and the tampered face hash code, it is possible to detect whether the image has been changed, and the uniqueness of the image face perceptual hash code ensures identity source detection.

[0159] The malicious use of deepfakes has triggered an urgent need to distinguish between real faces and forged faces. Although a variety of countermeasures for post-detection of deepfakes have been introduced, there is a clear lack of actions to take preventive measures against original faces before facing foreseen manipulation. In order to improve the active forensics system for facial deepfakes, the technical solution provided by the present invention provides a unified framework for image source detection and active defense against deepfakes. For the first time, it is proposed to use separable image-aware hash codes for facial deepfakes. The deep separable perceptual hash code technology is used to generate highly stable and non-modifiable facial watermarks, ensuring the robustness of the watermark in content-preserving operations. The generated watermark is efficiently embedded into the background of the original facial image through an encoding-decoding network, ensuring the invisibility of the watermark and further enhancing the accuracy and reliability of the forensics. In addition, the present invention designs a loss function based on the joint optimization of multi-scale perceptual smoothness, which effectively improves the overall quality of the watermark embedding process by optimizing perceptual similarity, structural smoothness and embedding stability. The face-aware watermark can still exist before and after deep fakes, realizing reliable face source detection and judging whether the image has been tampered with. A large number of experiments have shown the effectiveness of the technical solution proposed in this invention against classic deep fake strategies, demonstrating its potential and advantages in protecting personal privacy and preventing deep fakes.

[0160] Compared with the prior art, the present invention has the following beneficial effects:

[0161] 1. This invention proposes for the first time the application of separable perceptual hash codes in deep fake active forensics. By utilizing the interaction between human faces and non-human faces, the encoder embeds the highly stable and non-modifiable face-perceptual hash code generated by deep separable perceptual hash code technology into the non-face area. The decoder can still extract the face-perceptual hash code embedded in the non-face area after the face image has been tampered with, realizing reliable source detection and providing a new solution for deep fake active forensics.

[0162] 2. By constructing an end-to-end deep separable perceptual hashing active forensics framework, this paper conducts robustness testing of cryptanalyzed images under various content-preserving operations. This framework combines a multi-scale perceptual smoothing joint optimization loss (MPSO) with a weighted mean squared error (MSE), learned perceptual image patch similarity (LPIPS), and total variation loss (TV Loss) to achieve comprehensive optimization in terms of numerical accuracy, perceptual quality, and image smoothness. This approach significantly improves the overall performance of image steganography and restoration algorithms, enhances the robustness of separable face-perceptual hashing, and improves the visual quality of generated images. Furthermore, this framework preserves the provenance information of the original authentic image, enabling the distinction between forged and original images without prior knowledge.

[0163] 3. For a variety of classic face deep fake schemes, a large number of experiments have verified the effectiveness of separable perceptual hash codes in applying to active face forgery forensics, realizing the trusted source detection of face images and reliably judging whether the original face has been maliciously tampered with. The results show that compared with the most advanced methods, the present invention has achieved satisfactory performance.

[0164] Each step of the embodiment of the present invention may be performed by an electronic device, including but not limited to a mobile phone, a tablet computer, a portable PC, a desktop computer, etc.

[0165] In the technical solution provided by the present invention, the method includes constructing a deep fake active forensics model, obtaining a secret network, a decoder De, a content preservation operation module and a discriminator; wherein the secret network includes a watermark generator GH and an encoder; and obtaining the trained encoder, decoder De and discriminator; embedding the identity information into the original face image I through the trained encoder to generate a face image I1; inputting the original face image I into the watermark generator G H , extract the features of the original face image I, generate the face-aware hash code corresponding to the original face image I; convert the face-aware hash code into binary to obtain the first watermark H FA ; The first watermark H is converted by the trained encoder FA Embedded into the face image I1, obtain the encrypted image I En ; The encrypted image I EnThe input to the content-preserving operation module simulates the environment in which the image is transmitted in the network, and the hash cross-correlation similarity is obtained through the trained discriminator. This method improves the active forensics system for deep fake faces, provides a unified framework for image source detection and active forensics for deep fakes, ensures the robustness of the watermark in the content-preserving operation, and enhances the accuracy and reliability of forensics.

[0166] An embodiment of the present invention provides a computer-readable storage medium, which includes a stored program, wherein when the program is running, the electronic device where the computer-readable storage medium is located is controlled to execute the above-mentioned embodiment of the deep fake active forensics method based on separable perceptual hash enhancement.

[0167] Figure 4 A schematic diagram of an electronic device provided by an embodiment of the present invention is shown in FIG. Figure 4 As shown, the electronic device 21 includes: a processor 211, a memory 212, and a computer program 213 stored in the memory 212 and executable on the processor 211. When the computer program 213 is executed by the processor 211, the deep fake active forensics method based on separable perceptual hash enhancement in the embodiment is implemented. To avoid repetition, they are not described here one by one.

[0168] The electronic device 21 includes, but is not limited to, a processor 211 and a memory 212. Those skilled in the art will understand that Figure 4 It is only an example of the electronic device 21 and does not constitute a limitation of the electronic device 21. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0169] The processor 211 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0170] The memory 212 can be an internal storage unit of the electronic device 21, such as the hard drive or memory of the electronic device 21. The memory 212 can also be an external storage device of the electronic device 21, such as a plug-in hard drive, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on the electronic device 21. Furthermore, the memory 212 can include both the internal storage unit of the electronic device 21 and an external storage device. The memory 212 is used to store computer programs and other programs and data required by the network device. The memory 212 can also be used to temporarily store data that has been output or is about to be output.

[0171] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0172] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A deep fake active forensics method based on separable perceptual hash enhancement, characterized in that: The method comprises: Step 1: Build a deep forgery active forensics model to obtain the secret network, decoder De, content preservation operation module and discriminator; the secret network includes a watermark generator G H , encoder; Step 2: Train the encoder, decoder and discriminator in step 1 to obtain the trained encoder, decoder De and discriminator; Step 3: embed the identity information into the original face image I through the encoder trained in step 2 to generate a face image I1; Step 4: Annotate the background and foreground of the original face image I, and input the original face image I into the watermark generator G in step 1. H , extract the facial features in the original face image I, and generate a face-aware hash code corresponding to the original face image I; Step 5: Convert the face-aware hash code in step 4 into binary to obtain the first watermark H FA ; Step 6: Use the encoder trained in step 2 to convert the first watermark H in step 5 FA Embed the face image I1 in step 3 to obtain the encrypted image I En ; Step 7: The encrypted image I in step 6 En The content preservation operation module input to step 1 simulates the environment in which the image is transmitted in the network, and obtains the hash cross-correlation similarity through the discriminator trained in step 2; Step 6 includes: Step 61: Convert the RGB image of the face image I1 into a YUV image through the trained encoder, where Y represents brightness information, and U and V represent chrominance information; Step 62: for each block space of the YUV image in step 61, a discrete cosine transform (DCT) is used to transform the image from the spatial domain to the frequency domain to extract frequency domain information; Step 63: extracting the background area low-frequency component from the DCT-transformed YUV image in step 62 according to the information shared by the watermark generator; Step 64: Set the first watermark H FA Adjust the size to match the low-frequency component of the background area extracted in step 63, and add the first watermark H FA Embedded into low-frequency components; Step 65: embed the first watermark H in step 64 FA The DCT coefficients are converted back to YUV space using inverse discrete cosine transform (IDCT) to obtain a time domain image, i.e., a YUV image. Step 66: Convert the YUV image in step 65 back to an RGB image to generate a encrypted image I En .

2. The method according to claim 1, characterized in that The formula for converting to binary in step 5 is: ; in, Represents the i-th binary number in the hash sequence; ; m represents the length of the feature coding sequence, Represents the i-th real feature code of the output.

3. The method according to claim 1, characterized in that include: Encrypted Image I En Visually similar to the original face image I, the loss function is , whose expression is: ; in, represents the training parameters, H FA is the first watermark of the original face image I; To ensure the confidentiality of the image I En The perceptual quality of the encrypted image I is similar to that of the original face image I. The perceptual loss is designed to measure the En Compared with the original face image I, the loss function is expressed as: ; in, Represents the feature map of the image at layer l; Represents the Euclidean distance between feature maps at the feature map position (h, w); h represents the height index of the feature map; w represents the width index of the feature map; Represents the height of the feature map of the lth layer; Indicates the width of the feature map of the lth layer; The total variation loss is used to encrypt the image I En Regularization is performed, and the expression of the total variation loss function is: ; Where i represents the pixel index of the image in the vertical direction, and j represents the pixel index of the image in the horizontal direction; Indicates a secret image; Represents the pixel value of the encrypted image at position (i+1,j); Represents the pixel value of the encrypted image at position (i, j); Represents the pixel value of the encrypted image at position (i, j+1); Total loss function The expression is: ; in, , and are the weights of the corresponding losses respectively.

4. The method according to claim 1, characterized in that: Step 7 includes: Step 71: The encrypted image I En Input to the content retention operation module to simulate the image transmission environment in the network, and obtain the simulated encrypted image I CO ; Step 72: The encrypted image I simulated in step 71 is CO Input to the watermark generator G H , extract the simulated encrypted image I CO The facial features in the image are used to generate the simulated encrypted image I CO The corresponding face-aware hash code is converted into binary to obtain the corresponding second watermark ; Step 73: Extract the simulated encrypted image I through the trained decoder De CO The first watermark H FA ; and the first watermark H is transformed into FA and the second watermark The comparison is performed to obtain the similarity of the first hash cross-correlation.

5. The method according to claim 1, characterized in that Step 7 includes: Step 74: The encrypted image I En Input to the content preservation operation module to simulate the environment in which the image is transmitted in the network, and obtain the tampered image I MD ; Step 75: The image I tampered with in step 74 MD Input to the watermark generator G H , extract the tampered image I MD The facial features in the image are used to generate the tampered image I MD The corresponding face-aware hash code is converted into binary to obtain the corresponding third watermark ; Step 76: Extract the tampered image I through the trained decoder De MD The first watermark H FA ; and the first watermark H is transformed into FA and the third watermark The comparison is performed to obtain the similarity of the second hash cross-correlation.

6. The method according to claim 4, characterized in that First hash cross-correlation similarity The expression is: ; in, Indicates the first watermark H FA With the second watermark The covariance of Indicates the first watermark H FA The standard deviation of each series in ; Indicates the second watermark The standard deviation of each series in .

7. The method according to claim 5, characterized in that Second hash cross-correlation similarity The expression is: ; in, Indicates the first watermark H FA With the third watermark The covariance of Indicates the first watermark H FA The standard deviation of each series in ; Indicates the third watermark The standard deviation of each series in .

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is run, the electronic device where the computer-readable storage medium is located is controlled to execute the deep fake active forensics method based on separable perceptual hash enhancement as described in any one of claims 1 to 7.

9. An electronic device, characterized in that: include: one or more processors; Memory; And one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the electronic device, enable the device to perform the deep fake active forensics method based on separable perceptual hash enhancement as described in any one of claims 1 to 7.