Method and device for identifying forged images based on temporal and spatial distribution changes
By constructing a forged image identification method based on spatial and temporal distribution changes, using time-series change data and evolutionary graph structures, the generation process of forged images is deeply analyzed, and the deep mechanism of forged image generation is achieved, which solves the problem that the existing technology fails to deeply analyze the process of forged image generation, and has good generalization ability.
Patent Information
- Application Number
- CN202411818625.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2044-12-11
AI Technical Summary
The existing forged image identification technology fails to deeply analyze the generation process of forged images, which limits the comprehensive reflection of the deep mechanism of forged image generation.
Using a forged image identification method based on spatial and temporal distribution changes, the timing change data of adjacent noise graphs is obtained through the denoising diffusion implicit model (DDIM) denoising sampling process, directed weighted evolution graphs are constructed, feature representations of time series are learned, and classifiers are trained to achieve forged image identification.
This method creatively introduces timing information, breaks through the traditional solution ideas of frequency domain or airspace angles, has good generalization capabilities, and performs well on benchmark datasets such as DeepFaceGen and Genimage.
Smart Images

Figure CN119295841B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of forged image identification, and in particular to a forged image identification method based on spatiotemporal distribution changes. Background Art
[0002] According to the technical route of forged image identification technology, identification technology can be divided into two types.
[0003] First, artifact identification based on task-driven forged images. This type of identification technology draws on the idea of identifying task-driven forged images, and performs forgery identification by identifying forgery traces left in the spatial or frequency domain during the forgery process.
[0004] Second, forgery identification based on reconstruction error. This type of identification technology models classification features based on the differences between forged images and real images after reconstruction. The forgery identification model is constructed by maximizing the reconstruction loss.
[0005] However, the above methods only stay at the inherent experience of forgery identification or only use reconstruction as an end-to-end auxiliary identification tool. They all fail to deeply analyze the generation process of forged images and regard the generation process of the diffusion model as a black box operation, which limits the comprehensive reflection of the deep mechanism of forged image generation. Summary of the invention
[0006] In view of the defect that the prior art only uses the reconstruction of forged pictures as an end-to-end auxiliary identification tool and fails to deeply analyze the generation process of forged pictures, the purpose of the present invention is to provide a forged picture identification method and device based on spatiotemporal distribution changes.
[0007] A forged image identification method based on spatiotemporal distribution changes, comprising:
[0008] Step 1: Obtain task training data and divide it into training set and validation set;
[0009] Step 2: Using the training data, a denoising diffusion implicit model (DDIM) denoising sampling process is used to obtain the time series variation data S of adjacent noise images;
[0010] Step 3: Obtain the distance between each candidate discriminant factor (DFactor) and the time series data S, and obtain the optimal DFactor discriminant factor with a fixed length of L from the set C of candidate DFactors based on the loss function of KL divergence;
[0011] Step 4: Use the optimal DFactor discriminant factor to construct the time series change data S into a directed weighted evolution graph G;
[0012] Step 5: Use the directed weighted evolution graph G to learn the feature representation of the time series S ;
[0013] Step 6: Representing with features The corresponding true and false labels are used as input to train the classifier to identify forged images.
[0014] Preferably, the task training data acquired in step 1 is the large-scale face evaluation dataset DeepFaceGen and the artificial intelligence generated image detection dataset Genimage.
[0015] Preferably, the step 2 of using the DDIM denoising sampling process to obtain the time series variation data S of adjacent noise images includes:
[0016] Step 2-1: In the training data, each image to be detected is sampled into T noise image change sequences using the DDIM denoising sampling method, where T represents the sampling time step;
[0017] Step 2-2: Calculate the structural similarity SSIM of adjacent noise graphs between T noise graph change sequences to form an SSIM numerical sequence S of length T-1.
[0018] Preferably, the DFactor described in step 3 is a segment in the time series variation data S that can be used to distinguish normal samples from forged samples.
[0019] Preferably, the set C of candidate set DFactor described in step 3 includes:
[0020] Each data in the time series change data S According to the fixed length L split, based on the greedy algorithm to select The DFactors that are closest to each other constitute the set C.
[0021] Preferably, the step 3 of obtaining the distance between each candidate DFactor and the time series data S, and obtaining the optimal DFactor discriminant factor with a fixed length L from the set C of candidate DFactors based on the loss function of KL divergence, includes:
[0022] Step 3-1: Calculate the weighted distance between each candidate DFactor and the time series ;
[0023] Step 3-2: Perform a weighted sum of all distances to obtain the total distance of the time series :
[0024] Step 3-3: Construct a loss function based on the distance between positive and negative samples based on KL divergence , N represents the number of samples, represents the sum of local and global factors, , are the mean and standard deviation of the distances between positive and negative classes, respectively. Represents element regularization; KL divergence is used to minimize the loss by gradient descent between positive and negative samples to extract the optimal DFactor discriminant factor.
[0025] Preferably, the step 4 uses the optimal DFactor discriminant factor to construct the time series change data S into a directed weighted evolution graph G; including:
[0026] ,in Contains K vertices, each vertex represents a DFactor, and each directed edge Associate a weight , indicating that in the same time series, DFactor Connecting to another DFactor probability of occurrence.
[0027] Preferably, the directed weighted evolution graph G described in step 5 is used to learn the feature representation of the time series S. ,include:
[0028] Step 5-1: For each data in the time series data S , and its corresponding allocation DFactor is , the probability of assignment is , where t represents the tth sub-block of the input graph, and m is the number of allocated DFactors; the graph embedding algorithm DeepWalk is used to extract each DFactor The representation vector , and multiply by the probability of assignment ;
[0029] Step 5-2: The sum is calculated for each sub-segment in . The representation of the sub-segment is obtained ;
[0030] Step 5-3: Connect the embedding vectors of all sub-segments of each data to obtain the representation vector of its own time series .
[0031] Preferably, step 6 of representing the feature The corresponding true and false labels are used as input to train the classifier to identify forged images, including:
[0032] The characteristics of the time series variation data S are expressed as The corresponding true and false labels are used as the input of the Xgboost classifier to implement the training of the classifier, the image to be detected is input into the trained Xgboost model, and the true and false attributes of the image are output.
[0033] The second aspect of the present invention relates to a device for identifying forged images based on changes in spatiotemporal distribution, comprising a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, they are used to implement a method for identifying forged images based on changes in spatiotemporal distribution of the present invention.
[0034] The innovations of the present invention are: (1) analyzing the change mechanisms of diffusion-generated images from the perspective of temporal information; and (2) quantifying the change differences of forged data through changes in connectivity in the graph structure.
[0035] The working principle of the present invention is as follows: the present invention models the spatiotemporal specific changes of forged images during the reconstruction process of AIGC-generated images, constructs the behavior pattern of the specific changes through a graph structure, completes the construction of classification features based on the connectivity differences in the graph structure, and completes the authenticity identification based on the generation mechanism of forged images.
[0036] Compared with the existing method, the present invention has the following beneficial effects:
[0037] The forged image identification technology based on spatiotemporal distribution changes of the present invention creatively introduces time sequence information into the field of image forgery identification, breaking through the inherent idea of solving the problem of image forgery identification from the perspective of frequency domain or spatial domain.
[0038] The forged image identification method based on spatiotemporal distribution changes of the present invention has been experimentally verified on benchmark datasets such as DeepFaceGen and Genimage. The results show that it does not rely on a pre-trained denoising model and has good generalization ability in practical application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 is a flow chart of a method for identifying forged images based on spatiotemporal distribution changes in one embodiment of the present invention, wherein Figure 1 Part (a) is the capture of spatiotemporal information, Figure 1 Part (b) is the distribution change pattern extraction, Figure 1 Part (c) is difference detection;
[0040] FIG. 2 is a performance comparison diagram of a forged image identification method based on spatiotemporal distribution changes in an embodiment of the present invention and other identification methods on different data sets. Figure 2a is a comparison chart of the AUC scores of an embodiment of the present invention and other identification methods on the Deepfacegen dataset. Figure 2bis a comparison chart of ACC scores of an embodiment of the present invention and other identification methods on the Genimage dataset;
[0041] Figure 3 It is a schematic diagram of feature construction and forgery detection based on changes in graph structure connectivity in difference detection;
[0042] Figure 4 is the change of AUC scores at different DDIM time steps of the forged image identification method based on spatiotemporal distribution change in one embodiment of the present invention;
[0043] Figure 5 It is a schematic diagram of the device of the present invention. DETAILED DESCRIPTION
[0044] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help method personnel in this field to further understand the present invention, but do not limit the present invention in any form. It should be noted that for ordinary method personnel in this field, some variations and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
[0045] Example 1
[0046] This embodiment provides a method for identifying forged images based on temporal and spatial distribution changes, such as Figure 1 and Figure 3 , including the following steps:
[0047] S100, obtaining task training data and dividing it into a training set and a validation set;
[0048] S200, using the training data and using the DDIM denoising sampling process to obtain time series variation data S of adjacent noise images;
[0049] S300, obtaining the distance between each candidate DFactor and the time series data S, and obtaining the optimal DFactor discriminant factor with a fixed length L from the set C of candidate DFactors based on the loss function of KL divergence;
[0050] S400, using the best DFactor discriminant factor to construct the time series change data S into a directed weighted evolution graph G;
[0051] S500, using a directed weighted evolution graph G to learn the feature representation of the time series S ;
[0052] S600, the feature representation The corresponding true and false labels are used as input to train the classifier to identify forged images.
[0053] The above-mentioned embodiment adopts a forged image identification method based on spatiotemporal distribution changes to solve the forged image detection problem, and does not rely on a pre-trained noise model.
[0054] In this embodiment, S100 is implemented to obtain task training data and divide it into a training set and a verification set. The task training data obtained is a forgery detection benchmark data set of DeepFaceGen and Genimage, which is divided into a training set and a verification set.
[0055] Based on the consideration of model performance, this embodiment uses the noise-added model pre-trained in ImageNet as a sampling network for implementing DDIM denoising, implements S200, and uses the DDIM denoising sampling process to obtain the time series change data S of adjacent noise images. Further, the main steps of S200 are:
[0056] S201, in the training data, using the DDIM denoising sampling method to sample each to-be-detected picture into T noise map variation sequences, where T represents a sampling time step;
[0057] S202, calculating the structural similarity SSIM of adjacent noise graphs between T noise graph change sequences, and forming an SSIM numerical sequence S with a length of T-1.
[0058] In step S201, the noise map is regularized by the noise matrix obtained by DDIM denoising. The matrix values are projected to the range of 0-255 to provide a visual display for subsequent tasks.
[0059] In this embodiment, S300 is implemented, and the DFactor is a segment in the time series variation data that can be used to distinguish normal samples from forged samples.
[0060] In this embodiment, S300 is implemented, and the candidate set DFactor set C is described. Specifically, each data in the time series change data S is According to the fixed length L split, based on the greedy algorithm to select The DFactors that are closest to each other constitute the set C.
[0061] In this embodiment, S300 is implemented to obtain the distance between each candidate DFactor and the time series data S, and the optimal DFactor discriminant factor with a fixed length of L is obtained from the set C of candidate DFactors based on the loss function of KL divergence. Further, the main steps of S300 are:
[0062] S301, calculate the weighted distance between each candidate DFactor and the time series ;
[0063] S302: Perform weighted summation on all distances to obtain the total distance of the time series :
[0064] S303, construct a loss function based on the distance between positive and negative samples based on KL divergence , N represents the number of samples, represents the sum of local and global factors, , are the mean and standard deviation of the distances between positive and negative classes, respectively. Represents element regularization. KL divergence is used to minimize the loss by gradient descent between positive and negative samples to extract the best DFactor discriminant factor.
[0065] In this embodiment, S400 is implemented to construct the time series change data into a directed weighted evolution graph using the optimal DFactor discriminant factor; specifically,
[0066] ,in Contains K vertices, each vertex represents a DFactor, and each directed edge Associate a weight , indicating that in the same time series, DFactor Connecting to another DFactor probability of occurrence.
[0067] In this embodiment, S500 is implemented to use a directed weighted evolution graph G to learn the feature representation of the time series S Furthermore, the main steps of S500 are:
[0068] S501: For each data in the time series data S , and its corresponding allocation DFactor is , the probability of assignment is , where t represents the tth sub-block of the input graph and m is the number of DFactors assigned. The graph embedding algorithm DeepWalk is used to extract each DFactor The representation vector , and multiply by the probability of assignment ;
[0069] S502: Yes The sum is calculated for each sub-segment in . The representation of the sub-segment is obtained ;
[0070] S503: Connect the embedding vectors of all sub-segments of each data to obtain the representation vector of its own time series .
[0071] In this embodiment, S600 is implemented to represent the characteristic The corresponding true and false labels are used as input to train the classifier to identify forged images. Specifically,
[0072] The characteristics of the time series variation data S are expressed as The corresponding true and false labels are used as the input of the Xgboost classifier to implement the training of the classifier, the image to be detected is input into the trained Xgboost model, and the true and false attributes of the image are output.
[0073] Example 2
[0074] In order to verify the performance and effect of the forged image identification method based on spatiotemporal distribution changes in the embodiment of the present invention, the following four groups of experiments were conducted in this embodiment:
[0075] Experimental Example 1
[0076] The method in the above embodiment is compared with the existing method in performance experiments on forgery detection benchmark datasets such as DeepFaceGen and Genimage to verify the performance of the method in the embodiment of the present invention in different data scenario datasets.
[0077] The experimental results are shown in Figure 2, where Figure 2a shows the AUC results of DeepFaceGen (forged images with faces as the subject) compared with other identification methods. The compared identification methods include: Deep Separable Convolution (Xception), Compound Scaling Model (EfficientNet), Dual Domain Feature Extraction Network (F3Net), Generalized Model Detector (UnivFD), Image Reconstruction Detector (DIRE), Deep Forgery Attribution Network (DNADet), Frequency Domain Aware Detector (FreqNet), Pixel Correlation Detector (NPR), Diffusion Contrastive Learning Detector (DRCT). Figure 2b shows the ACC results of Genimage (forged images with natural photos as the subject) compared with other identification methods. The compared identification methods include: Image Reconstruction Detector (DIRE), Texture Enhancement Detector (GramNet), Dual Domain Feature Extraction Network (F3Net), Convolutional Forged Image Detector (CNNSpot), Generalized Model Detector (UnivFD), De-fake, Hybrid Forged Feature Detector (AIDE), Diffusion Contrastive Learning Detector (DRCT). The AUC and ACC performance of the method in the embodiment of the present invention both exceed the optimal method in the evaluation benchmark. This result verifies the effectiveness of the method in the embodiment of the present invention.
[0078] Experimental Example 2
[0079] The method in the above embodiment is compared with the optimal reconstruction method for existing forged image identification in the scenario where the noise pre-training model and the recognition target do not match.
[0080] Table 1 shows the AUC results of training and testing in DeepFaceGen (face scene) when the noise pre-training model is a cat, a horse, and a bedroom.
[0081]
[0082] From the results, it can be seen that when the noise pre-training model does not match the recognition target, the current optimal reconstruction method index for forged image identification shows a sharp decline compared to the index in Figure 2a. However, in comparison, the method of the embodiment of the present invention still maintains an AUC score of more than 90%. This result verifies the robustness of the method in the embodiment of the present invention.
[0083] Experimental Example 3
[0084] The method in the above embodiment is used to perform data compression and size scaling operations to verify the performance changes of the method in the embodiment of the present invention when the data passes through the propagation compression scenario in an actual scenario.
[0085] Table 2 shows the AUC scores of the method in the above embodiment on the subset with the most challenging detection performance on DeepFacegen under the conditions of scale resizing and image compression.
[0086]
[0087] From the results, it can be seen that under the conditions of resizing and JPEG compression, the performance variation of the method in the embodiment of the present invention is controlled within 1%. This result verifies the generalizability of the method in the embodiment of the present invention.
[0088] Experimental Example 4
[0089] The performance variation of the method in the above embodiment is analyzed under different time step lengths in DDIM.
[0090] The experimental results are as follows Figure 4 As shown, the method in the embodiment is experimented on the four subsets with the highest detection difficulty in Deepfacegen. The experimental results show that the AUC scores of the method in the embodiment are all higher than 90% when the time steps are 5, 10, 20 and 50, which verifies the stability of the method in the embodiment of the present invention.
[0091] Example 3
[0092] The present embodiment relates to a forged image identification device based on spatiotemporal distribution changes, including a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, they are used to implement a forged image identification method based on spatiotemporal distribution changes of the present invention.
[0093] like Figure 5 As mentioned above, at the hardware level, the device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 Of course, in addition to the software implementation, the present invention does not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0094] For the improvement of a technology, it can be clearly distinguished whether it is a hardware improvement (for example, improvement of the circuit structure of diodes, transistors, switches, etc.) or a software improvement (improvement of the method flow). However, with the development of technology, many improvements of the method flow today can be regarded as direct improvements of the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented with a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming themselves, without having to ask chip manufacturers to design and make dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one kind of HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0095] The controller may be implemented in any suitable manner, for example, the controller may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (e.g., software or firmware) executable by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, and the memory controller may also be implemented as part of the control logic of the memory. It is also known to those skilled in the art that, in addition to implementing the controller in a purely computer-readable program code manner, the controller may be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, such a controller may be considered as a hardware component, and the devices for implementing various functions included therein may also be considered as structures within the hardware component. Or even, the devices for implementing various functions may be considered as both software modules for implementing the method and structures within the hardware component.
[0096] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0097] For the convenience of description, the above device is described as being divided into various units according to their functions. Of course, when implementing the present invention, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0098] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0099] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0100] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0101] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0102] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0103] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0104] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0105] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0106] It should be understood by those skilled in the art that the embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0107] The present invention may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0108] Each embodiment of the present invention is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0109] The above description is only an embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.
Claims
1. A method for identifying forged images based on spatiotemporal distribution changes, characterized in that: include: Step 1: Obtain task training data and divide it into training set and validation set; Step 2: Using the training data, the denoising diffusion implicit model DDIM denoising sampling process is used to obtain the time series variation data of adjacent noise maps ; Step 3: Obtain each candidate discriminant factor DFactor and time series data The distance between the two, the DFactor is the time series change data can be used as a fragment to distinguish normal samples from forged samples; the loss function based on KL divergence is selected from the set of candidate DFactors C The fixed length is obtained as L The best DFactor discriminant factor; Step 3-1: Calculate the weighted distance between each candidate DFactor and the time series ; Step 3-2: Perform a weighted sum of all distances to obtain the total distance of the time series : Step 3-3: Construct a loss function based on the distance between positive and negative samples based on KL divergence , N represents the number of samples, represents the sum of local and global factors, are the mean and standard deviation of the distances between positive and negative classes, respectively. Represents element regularization; KL divergence is used to minimize the loss by gradient descent between positive and negative samples to extract the optimal DFactor discriminant factor; Step 4: Use the best DFactor discriminant factor to convert the time series change data Construct a directed weighted evolution graph ; Step 5: Use a directed weighted evolution graph , learning the time series The feature representation ; Step 6: Represent the features The corresponding true and false labels are used as input to train the classifier to identify forged images.
2. The method for identifying forged images based on spatiotemporal distribution changes according to claim 1, characterized in that: The task training data obtained in step 1 is the large-scale face evaluation dataset DeepFaceGen and the artificial intelligence generated image detection dataset Genimage.
3. The method for identifying forged images based on spatiotemporal distribution changes according to claim 1, characterized in that: The DDIM denoising sampling process described in step 2 obtains the time series variation data of adjacent noise images ,include: Step 2-1: In the training data, each image to be detected is sampled into T A noise pattern variation sequence, T represents the sampling time step; Step 2-2: Calculation T The structural similarity SSIM of adjacent noise graphs between noise graph change sequences is formed with a length of T-1 SSIM numerical sequence .
4. The method for identifying forged images based on spatiotemporal distribution changes according to claim 1, characterized in that: The set of candidate DFactors described in step 3 C ,include: Time series change data Each piece of data According to the fixed length L Segmentation , Based on the greedy algorithm, The closest DFactor, forming a set C .
5. The method for identifying forged images based on spatiotemporal distribution changes according to claim 1, characterized in that: Step 4 describes the use of the optimal DFactor discriminant factor to convert the time series change data Construct a directed weighted evolution graph ;include: ,in Contains K vertices, each vertex represents a DFactor, and each directed edge Associate a weight , indicating that in the same time series, DFactor Connecting to another DFactor probability of occurrence.
6. The method for identifying forged images based on spatiotemporal distribution changes according to claim 1, characterized in that: Step 5 uses a directed weighted evolution graph , learning the time series The feature representation ,include: Step 5-1: For time series data Each piece of data , and its corresponding allocation DFactor is , the probability of assignment is ,in t Represents the input graph t Sub-blocks, m is the number of DFactors allocated; the graph embedding algorithm DeepWalk is used to extract each DFactor The representation vector , and multiply by the probability of assignment ; Step 5-2: Each sub-segment in is summed up; the representation of the sub-segment is obtained ; Step 5-3: Connect the embedding vectors of all sub-segments of each data to obtain the representation vector of its own time series .
7. The method for identifying forged images based on spatiotemporal distribution changes according to claim 1, characterized in that: Step 6 describes the feature representation The corresponding true and false labels are used as input to train the classifier to identify forged images, including: Time series change data The feature representation The corresponding true and false labels are used as the input of the Xgboost classifier to implement the classifier training, the face image to be detected is input into the trained Xgboost model, and the true and false attributes of the face image are output.
8. A forged image identification device based on spatiotemporal distribution changes, characterized in that: The invention comprises a memory and one or more processors, wherein the memory stores executable codes, and when the one or more processors execute the executable codes, they are used to implement a forged image identification method based on spatiotemporal distribution changes as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Generative steganography method for anti-counterfeiting of electronic certificate
CN117376484A
Deep fake face detection method based on generative adversarial network
CN117831137A