Small sample image forgery detection method and system
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-08
- Publication Date
- 2026-08-11
AI Technical Summary
[0039]本发明提供的小样本图像伪造检测方法,通过双分支特征提取网络与互斥子空间路由模块,由双分支特征提取网络的第一分支用于视觉特征向量,由第二分支提取频域引导信号;互斥子空间路由模块包括互斥的多个子空间,将频域引导信号和视觉特征向量输入至互斥子空间路由模块,获得解耦后的输出特征。在训练阶段通过正交约束损失强制非AI样本与AI样本激活完全不同的子空间,并引入了“规避路由机制”,利用规避损失强制抑制新型伪造样本在真实子空间上的路由选择。本发明通过双分支架构和互斥子空间设计,显著提升了模型在开放世界场景下的检测精度。特别是在面对未知的新型生成模型时,仅需极少样本即可实现90%以上的检测准确率,提高了高保真伪造图像的检测准确度,同时保持对旧模型和真实图像的高准确度。
Smart Images

Figure CN122551058A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision technology, and in particular to a method and system for detecting forgery in small sample images. Background Technology
[0002] With the rapid development of generative AI, image forgery detection technology faces severe challenges. Existing methods employ periodic upsampling artifacts generated by convolutional networks, frequency domain analysis to identify forgery traces, or visual-language models such as CLIP. However, these existing technologies have the following drawbacks: First, extracting general features for detection relies on capturing specific fingerprints left by the generative model, largely depending on the "static forgery trace assumption," which assumes the existence of some general, invariant forgery features. However, with the heterogeneous evolution of generator architectures (from generative adversarial networks to diffusion models to Transformers), the forgery traces of novel high-fidelity images are extremely weak, causing the static feature space to fail. Second, when faced with extremely realistic novel generated images, existing methods often struggle to capture unknown, weak traces, leading to newly generated forgery images being incorrectly mapped to the feature manifold of real images, resulting in misclassification of forgery images as real images and causing a large number of false negatives. Third, model fine-tuning can easily cause the model to forget previously learned forgery feature types or impair its ability to distinguish real images, leading to misjudgments. Summary of the Invention
[0003] This invention provides a method and system for detecting forgery in few-sample images. Through a dual-branch architecture and mutually exclusive subspace design, it significantly improves the detection accuracy of few-sample images.
[0004] This invention provides a method for detecting image forgery in small samples, comprising:
[0005] An image is input into a dual-branch feature extraction network to obtain a visual feature vector and a frequency domain guiding signal. The dual-branch feature extraction network includes a first branch and a second branch. The first branch is used to extract the visual feature vector, and the second branch is used to extract the frequency domain guiding signal.
[0006] The frequency domain guiding signal and the visual feature vector are input to the mutually exclusive subspace routing module to obtain the decoupled output features. The mutually exclusive subspace routing module includes multiple mutually exclusive subspaces, and each subspace is defined by a subspace address and subspace features.
[0007] The output features are input into a classification network to obtain forgery detection results.
[0008] In one embodiment of the present invention, it further includes:
[0009] Obtain novel forged samples and replay sets including historical samples;
[0010] The dual-branch feature extraction network and the mutually exclusive subspace routing module are jointly pre-trained to obtain a pre-trained model. The joint pre-training uses orthogonal constraint loss to constrain non-AI samples and AI samples to activate different subspaces.
[0011] The novel forged samples and the replay set are input into the pre-trained model for small-sample dynamic adaptation.
[0012] In one embodiment of the present invention, the first branch uses a pre-trained large visual model DINOv3 as the backbone network, and fine-tunes the parameters of the backbone network through a low-rank adaptive matrix.
[0013] In one embodiment of the present invention, the second branch includes a high-pass filter and a convolutional encoder; wherein,
[0014] The second branch extracts the frequency domain guiding signal, including:
[0015] Perform a Fast Fourier Transform on the image to obtain its frequency domain representation;
[0016] The frequency domain representation is filtered using a high-pass filter to obtain high-frequency signal components;
[0017] Perform an inverse Fourier transform on the high-frequency signal components to obtain a high-frequency spatial domain image;
[0018] The high-frequency spatial domain image is input into a convolutional encoder to obtain the frequency domain guiding signal.
[0019] In one embodiment of the present invention, the frequency domain guiding signal and the visual feature vector are input to a mutually exclusive subspace routing module to obtain decoupled output features, including:
[0020] The visual feature vectors are input into the address projection layer and feature projection layer of the multiple subspaces respectively to obtain the subspace address and subspace features of each subspace;
[0021] The frequency domain guiding signal is normalized after performing a dot product operation with each of the subspace addresses to obtain the routing weight corresponding to each subspace.
[0022] The output features are obtained by weighting and fusing the features of each subspace according to the routing weights. These features include:
[0023] Calculate the dot product similarity between the frequency domain guiding signal and the subspace address of each of the subspaces;
[0024] The dot product similarity values are input into the Softmax function for normalization to obtain the routing weights corresponding to each subspace.
[0025] In one embodiment of the present invention, the output features are obtained by weighted fusion of the features of each subspace according to the routing weights, including:
[0026] The subspace features of each subspace are multiplied by their corresponding routing weights and then concatenated. The concatenation result is then subjected to a nonlinear transformation through a projection network to obtain the output features.
[0027] In one embodiment of the present invention, the orthogonal constraint loss is calculated as follows:
[0028] Calculate the dot product between the average routing weight of non-AI samples and the average routing weight of AI samples, and obtain the orthogonal constraint loss by minimizing the dot product.
[0029] In one embodiment of the present invention, the total loss function of the joint pre-training further includes a coverage constraint loss, which is used to constrain the uniformity of the calls to each of the subspaces.
[0030] In one embodiment of the present invention, the novel forged sample and the replay set are input into the pre-trained model for small-sample dynamic adaptation, including:
[0031] Calculate the real anchor points and fake anchor points based on the samples in the playback set;
[0032] By circumventing constraints, the orthogonality between the routing weights of the novel forged sample and the real anchor point is calculated, thereby suppressing the projection response of the novel forged sample on the feature subspace activated by the non-AI sample.
[0033] The consistency of the output features of the adapted model and the pre-trained model in old samples is constrained by the anti-forgetting distillation loss.
[0034] Another aspect of the present invention provides a small sample image forgery detection system, comprising:
[0035] A feature extraction unit is used to input an image into a dual-branch feature extraction network to obtain a visual feature vector and a frequency domain guiding signal. The dual-branch feature extraction network includes a first branch and a second branch. The first branch is used to extract the visual feature vector, and the second branch is used to extract the frequency domain guiding signal.
[0036] A decoupling unit is used to input the frequency domain guiding signal and the visual feature vector into a mutually exclusive subspace routing module to obtain decoupled output features. The mutually exclusive subspace routing module includes multiple mutually exclusive subspaces, each of which is defined by a subspace address and subspace features.
[0037] A classification unit is used to input the output features into a classification network to obtain forgery detection results.
[0038] As can be seen from the above solutions, the advantages of the present invention are:
[0039] This invention provides a few-sample image forgery detection method. It employs a dual-branch feature extraction network and a mutually exclusive subspace routing module. The first branch of the dual-branch feature extraction network extracts visual feature vectors, while the second branch extracts frequency domain guidance signals. The mutually exclusive subspace routing module comprises multiple mutually exclusive subspaces. The frequency domain guidance signals and visual feature vectors are input into the mutually exclusive subspace routing module to obtain decoupled output features. During the training phase, orthogonal constraint loss forces non-AI samples and AI samples to activate completely different subspaces, and an "avoidance routing mechanism" is introduced to forcibly suppress the routing selection of novel forgery samples in the real subspace using avoidance loss. This invention, through its dual-branch architecture and mutually exclusive subspace design, significantly improves the detection accuracy of the model in open-world scenarios. Especially when facing unknown novel generative models, it achieves a detection accuracy of over 90% with only a very small number of samples, improving the detection accuracy of high-fidelity forged images while maintaining high accuracy for older models and real images. Attached Figure Description
[0040] Figure 1 This is a flowchart illustrating a small-sample image forgery detection method according to an embodiment of the present invention;
[0041] Figure 2 for Figure 1 A detailed flowchart of step S2 is shown below;
[0042] Figure 3 for Figure 1 A detailed flowchart of step S5 is shown below;
[0043] Figure 4 This is an overall block diagram of a small sample image forgery detection system provided in another embodiment of the present invention.
[0044] The attached figures are labeled as follows:
[0045] 400: Small Sample Image Forgery Detection System;
[0046] 410: Feature extraction unit;
[0047] 420: Decoupling unit;
[0048] 430: Classification unit;
[0049] 440: Pre-trained unit;
[0050] 450: Dynamic Adaptive Unit. Detailed Implementation
[0051] It should be noted that, in this invention, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus.
[0052] In the absence of further restrictions, an element defined by the phrase "comprising a..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0053] refer to Figure 1 As shown, Figure 1 A flowchart illustrating a small-sample image forgery detection method provided in an embodiment of the present invention is shown.
[0054] A method for detecting image forgery in small samples includes the following steps:
[0055] Step S1: Input the image into a dual-branch feature extraction network to obtain a visual feature vector and a frequency domain guiding signal. The dual-branch feature extraction network includes a first branch and a second branch. The first branch is used to extract the visual feature vector, and the second branch is used to extract the frequency domain guiding signal.
[0056] In one embodiment, a dual-branch feature extraction network is constructed to simultaneously utilize the semantic representation capabilities of a large-scale visual model and the sensitivity of frequency-domain fingerprints to forgery traces. The dual-branch feature extraction network includes a first branch and a second branch, wherein the first branch uses a pre-trained large-scale visual model DINOv3 as its backbone network. Furthermore, given that general vision models primarily focus on semantic content, a low-rank adaptive matrix is introduced. The parameters of the backbone network are fine-tuned to focus on feature extraction required for the forensic task. The second branch generates routing signals and includes a high-pass filter and a convolutional encoder. Since generative models often leave specific artifacts in the frequency domain (such as upsampling traces), and these traces are insensitive to semantic changes, this second branch first performs a Fast Fourier Transform on the input image and utilizes a high-pass filter... Low-frequency semantic interference is filtered out, and only high-frequency signals that are sensitive to the generation mechanism are retained.
[0057] Specifically, the input image The input is fed into a dual-branch feature extraction network, where the first branch is used to extract the visual feature vector and the second branch is used to extract the frequency domain guiding signal.
[0058] The visual feature vector extracted by the first branch It is a high-dimensional entangled representation that includes the distribution of real images and various forgery features, calculated as follows:
[0059]
[0060] in, These are native DINOv3 parameters. These are the fine-tuned network parameters. It is a D-dimensional real space.
[0061] The second branch first processes the input image. Perform a fast Fourier transform to obtain the frequency domain representation;
[0062] Using a high-pass filter The frequency domain representation is filtered to remove low-frequency semantic interference, retaining only the high-frequency signal that is sensitive to the generation mechanism, thus obtaining the high-frequency signal component. An inverse Fourier transform is then performed on the high-frequency signal component to obtain the high-frequency spatial domain image. , represented as:
[0063]
[0064] in, For the input image The frequency domain representation, For inverse Fourier transform, For Hadama accumulation.
[0065] Subsequently, the high-frequency spatial domain image The input is fed into the convolution encoder, and then processed by the convolution encoder. Extract semantically independent high-frequency features as frequency domain guidance signals for subsequent subspace routing. :
[0066]
[0067] Finally, the input image is fed into a two-branch feature extraction network, and the first branch outputs a visual feature vector. The second branch outputs a frequency domain guiding signal. .
[0068] The first branch utilizes a pre-trained large model (such as DINOv3) combined with low-rank adaptive techniques to extract rich features from the image; the second branch extracts high-frequency fingerprint signals sensitive to the generation mechanism through fast Fourier transform and high-pass filters, and uses these to generate dynamic routing signals. The dual-branch feature extraction network simultaneously leverages the powerful feature extraction capabilities of large-scale models and the keen ability of frequency domain signals to capture forgery traces, solving the problem that a single feature perspective is insufficient to handle high-fidelity forged images.
[0069] Step S2: Input the frequency domain guiding signal and the visual feature vector into the mutual exclusion subspace routing module to obtain the decoupled output features. The mutual exclusion subspace routing module includes multiple subspaces, each defined by a subspace address and subspace features.
[0070] To address the feature entanglement problem, a mutually exclusive subspace routing module was designed. This module comprises multiple subspaces, each defined by a subspace address and subspace features. The subspace address is used to match the subspace containing the routing information, while the subspace features are used to match the actual stored information of the routing signal.
[0071] refer to Figure 2 As shown, Figure 2 A schematic diagram of the specific process for step S2 is shown.
[0072] The specific steps for inputting the frequency domain guiding signal and the visual feature vector into the mutually exclusive subspace routing module to obtain the decoupled output features include:
[0073] Step S21: Input the visual feature vector z into the address projection layer and feature projection layer of each of the C subspaces to obtain the subspace address of each subspace. and subspace features Where i is the subspace index, Visual feature vectors As high-dimensional features, the visual feature vector Projected to In each independent subspace, the following calculation is performed using affine transformation:
[0074]
[0075] in, Let be the address projection weight matrix of the i-th subspace. Let be the address projection bias vector of the i-th subspace; Let be the feature projection weight matrix of the i-th subspace. Let be the feature projection bias vector of the i-th feature subspace.
[0076] Step S22: Using frequency domain guidance signals With each subspace address A gated network is constructed using dot products. The frequency domain guiding signal is then multiplied by the address of each subspace. The dot product results are then input into a Softmax function for normalization to obtain the routing weights corresponding to each subspace. , represented as:
[0077]
[0078] Where d is the feature dimension scaling factor, and j is the summation index for traversing C subspaces. Let be the routing weight for subspace i.
[0079] Step S23: Weight and fuse the features of each subspace according to the routing weights to obtain the output features. Specifically, multiply the subspace features of each subspace by the corresponding routing weights to obtain the weighted subspace features. ; the weighted subspace features of each Perform splicing operations sequentially according to subspace sequence number. Obtain the concatenated feature vector The concatenated feature vectors are input into the projection network. Perform a nonlinear transformation to obtain the decoupled output characteristics. , represented as .
[0080] Step S3: Input the output features into the classification network to obtain the forgery detection results.
[0081] After decoupling via the mutual exclusion subspace routing module, the output features This is already a low-dimensional, compact representation that physically isolates the features of real and fake images. Based on this, The input is fed into a classification network to obtain the final forgery detection result. Specifically, the classification network employs a multilayer perceptron (MLP) classification head consisting of fully connected layers and a softmax activation function. The output features... After undergoing a linear transformation through at least one fully connected layer, the feature dimensions are mapped to a binary classification space (real / fake). Then, the output values are normalized to a probability distribution using the Softmax function to obtain the probability that the detected image belongs to the non-AI category and the probability that it belongs to the AI category.
[0082] Furthermore, during the pre-training phase, the classification network can be jointly optimized with the dual-branch feature extraction network and the mutually exclusive subspace routing module, enabling the classification head to accurately utilize the decoupled features for discrimination.
[0083] In one embodiment, step S4, during the pre-training stage, involves jointly pre-training the dual-branch feature extraction network and the mutually exclusive subspace routing module to obtain a pre-trained model. The joint pre-training uses orthogonal constraint loss to constrain the activation of different subspaces for non-AI samples and AI samples. That is, by utilizing orthogonal constraints, features are forcibly decoupled and divided into two sets of functionally mutually exclusive subspaces: one set maintains the inherent visual representation of the real image, and the other set is specifically used to capture and generate relevant fake features.
[0084] Introducing orthogonal constraint loss ( By calculating the average routing weight of non-AI samples Average routing weight of AI samples The orthogonal constraint loss is obtained by minimizing the dot product between the two values.
[0085]
[0086] Where c is the subspace index and C is the total number of subspaces. Let c be the average routing weight of the non-AI sample in the c-th subspace. Let be the average routing weight of the AI sample in the c-th subspace.
[0087] Orthogonal constraint loss forces non-AI samples and AI samples to activate different subspaces, thereby physically isolating the feature flow of the two types of data.
[0088] Furthermore, in one embodiment, the total loss function of the joint pre-training also includes a coverage constraint loss. The coverage constraint loss is used to constrain the uniformity of the calls to each of the subspaces, ensuring that all subspace dimensions are effectively utilized.
[0089] In this embodiment, a mutually exclusive subspace routing model is designed, which includes multiple subspaces. During the pre-training stage, orthogonal constraint loss forces non-AI samples and AI samples to activate completely different subspaces, thereby decoupling real image features and fake image features in physical space and storing them in mutually exclusive subspaces, effectively solving the feature mixing problem.
[0090] Furthermore, in one embodiment, during the adaptation phase, to address the issue that novel high-fidelity generated images are prone to erroneously activating the realism subspace due to their highly realistic visual distribution, an avoidance routing mechanism is introduced to dynamically correct the information flow. This mechanism prevents the real domain representation from shifting to accommodate forged samples by forcibly suppressing the projection response of new forged samples in the real relevant subspace.
[0091] Specifically, step S5 involves obtaining novel forged samples and a replay set including historical samples; inputting the novel forged samples and the replay set into the pre-trained model for small-sample dynamic adaptation. (Reference) Figure 3 As shown, Figure 3 A schematic diagram of the specific process for step S5 is shown.
[0092] Step S51: According to the playback set The sample calculation of the true anchor point With fake anchors .
[0093] Step S52: By circumventing constraints Calculate the routing weight of the novel forged sample and the real anchor point. The degree of orthogonality between them, to suppress the novel fake samples. The projection response on the feature subspace activated by the non-AI sample is calculated using the following formula:
[0094]
[0095] in, Forging image sample sets for AI, This is a non-AI real sample set. The number of samples in the AI sample set. Let represent the number of samples in the non-AI real sample set, where i is the index of the AI sample and j is the index of the non-AI sample. Let i be the routing weight for the i-th AI sample. Let be the routing weight for the j-th non-AI sample.
[0096] In this embodiment, the feature stream of novel forged samples is stripped from the real subspace and redirected to the forged subspace, thereby achieving rapid alignment without disrupting the original real feature space. This strategy blocks the model's "false attribution" based on visual realism, forcing the feature information stream to be redirected to the forged-related subspace under the physical guidance of the frequency domain fingerprint. This "splitting and isolation" strategy avoids blind fine-tuning of the entire high-dimensional feature set, strictly constraining the model's optimization space to the generator's unique forged feature extraction and enhancement, ensuring rapid and robust adaptation to the newly generated distribution under conditions of very few samples.
[0097] Step S53: To prevent catastrophic forgetting, loss is mitigated through anti-forgetting distillation. Constrain the consistency of the output features of the adapted model and the pre-trained model on the old samples.
[0098] The total loss function for the final adaptation phase is:
[0099]
[0100] in, The standard contrastive learning loss is used to construct the discriminative feature space. , These are the weighting coefficients.
[0101] To address the issue of newly generated images being easily misidentified as real images, an "avoidance routing mechanism" is introduced during the small-sample adaptation stage. By calculating the real anchor points in the playback set, avoidance loss is used to forcibly suppress the projection response of novel forgery samples in the real subspace, accurately guiding their feature flow to the forgery subspace. Simultaneously, an anti-forgetting distillation loss is introduced to constrain the geometric distribution of features. This achieves "splitting and isolation," enabling rapid capture of novel forgery traces even with only a very small number of samples (e.g., 1-10 images) while avoiding catastrophic forgetting caused by blind fine-tuning, ensuring the model's rapid alignment capability with unknown threats.
[0102] In summary, the few-sample image forgery detection method provided by this invention utilizes a dual-branch feature extraction network and a mutually exclusive subspace routing module. The first branch of the dual-branch feature extraction network is used for visual feature vectors, while the second branch extracts frequency domain guidance signals. The mutually exclusive subspace routing module comprises multiple mutually exclusive subspaces. The frequency domain guidance signals and visual feature vectors are input into the mutually exclusive subspace routing module to obtain decoupled output features. During the training phase, orthogonal constraint loss forces non-AI samples and AI samples to activate completely different subspaces, and an "avoidance routing mechanism" is introduced to forcibly suppress the routing selection of novel forgery samples in the real subspace using avoidance loss. Compared with existing technologies, this invention significantly improves the detection accuracy of the model in open-world scenarios through its dual-branch architecture and mutually exclusive subspace design. Especially when facing unknown novel generative models, it can achieve a detection accuracy of over 90% with only a very small number of samples, improving the detection accuracy of high-fidelity forged images while maintaining high accuracy for old models and real images. This greatly reduces data collection costs and model update costs, and has extremely high practical application value.
[0103] Furthermore, it should be noted that in this method implementation, the steps are not limited to sequential description. For example, steps S4 and S5 are not executed sequentially from steps S1-S3. The execution order is not strictly limited. Those skilled in the art can adjust the logical order of the steps according to the actual application scenario. There is no strict sequential dependency relationship, as long as it does not violate the internal logic of the technical solution.
[0104] In one embodiment, reference Figure 4 As shown, Figure 4 A schematic diagram of the overall structure of a small sample image forgery detection system is shown.
[0105] A small sample image forgery detection system 400 includes:
[0106] The feature extraction unit 410 is used to input an image into a dual-branch feature extraction network to obtain a visual feature vector and a frequency domain guiding signal. The dual-branch feature extraction network includes a first branch and a second branch. The first branch is used to extract the visual feature vector, and the second branch is used to extract the frequency domain guiding signal.
[0107] The decoupling unit 420 is used to input the frequency domain guiding signal and the visual feature vector into the mutual exclusion subspace routing module to obtain the decoupled output features. The mutual exclusion subspace routing module includes multiple subspaces, each subspace is defined by a subspace address and subspace features. The frequency domain guiding signal is matched with each subspace address to generate routing weights, and the features of each subspace are weighted and fused according to the routing weights to obtain the output features.
[0108] The classification unit 430 is used to input the output features into the classification network to obtain the forgery detection result.
[0109] The pre-training unit 440 is used to jointly pre-train the dual-branch feature extraction network and the mutually exclusive subspace routing module to obtain a pre-trained model. The joint pre-training uses orthogonal constraint loss to constrain non-AI samples and AI samples to activate different subspaces.
[0110] The dynamic adaptation unit 450 is used to input the newly acquired fake samples and the replay set including historical samples into the pre-trained model for small-sample dynamic adaptation.
[0111] It should be noted that this system implementation method can be implemented in conjunction with the above-described method implementation method. The relevant technical details mentioned in the above method implementation method remain valid in this system implementation method, and will not be repeated here to avoid repetition.
[0112] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of the present invention.
Claims
1. A small sample image forgery detection method, characterized in that, include: An image is input into a dual-branch feature extraction network to obtain a visual feature vector and a frequency domain guiding signal. The dual-branch feature extraction network includes a first branch and a second branch. The first branch is used to extract the visual feature vector, and the second branch is used to extract the frequency domain guiding signal. The frequency domain guiding signal and the visual feature vector are input to the mutually exclusive subspace routing module to obtain the decoupled output features. The mutually exclusive subspace routing module includes multiple mutually exclusive subspaces, and each subspace is defined by a subspace address and subspace features. The output features are input into a classification network to obtain forgery detection results.
2. The method of claim 1, wherein, Also includes: Obtain novel forged samples and replay sets including historical samples; The dual-branch feature extraction network and the mutually exclusive subspace routing module are jointly pre-trained to obtain a pre-trained model. The joint pre-training uses orthogonal constraint loss to constrain non-AI samples and AI samples to activate different subspaces. The novel forged samples and the replay set are input into the pre-trained model for small-sample dynamic adaptation.
3. The method according to claim 1, characterized in that, The first branch uses a pre-trained large visual model DINOv3 as the backbone network, and fine-tunes the parameters of the backbone network using a low-rank adaptive matrix.
4. The method of claim 1, wherein, The second branch includes a high-pass filter and a convolutional encoder; wherein, The second branch extracts the frequency domain guiding signal, including: Perform a Fast Fourier Transform on the image to obtain its frequency domain representation; The frequency domain representation is filtered using a high-pass filter to obtain high-frequency signal components; Perform an inverse Fourier transform on the high-frequency signal components to obtain a high-frequency spatial domain image; The high-frequency spatial domain image is input into a convolutional encoder to obtain the frequency domain guiding signal.
5. The method of claim 1, wherein, The frequency domain guiding signal and the visual feature vector are input into the mutually exclusive subspace routing module to obtain the decoupled output features, including: The visual feature vectors are input into the address projection layer and feature projection layer of the multiple subspaces respectively to obtain the subspace address and subspace features of each subspace; The frequency domain guiding signal is normalized after being multiplied by the address of each subspace to obtain the routing weight corresponding to each subspace. The output features are obtained by weighting and fusing the features of each subspace according to the routing weights.
6. The method according to claim 5, characterized in that, The output features are obtained by weighting and fusing the features of each subspace according to the routing weights, including: The subspace features of each subspace are multiplied by their corresponding routing weights and then concatenated. The concatenation result is then subjected to a nonlinear transformation through a projection network to obtain the output features.
7. The method of claim 2, wherein, The orthogonal constraint loss is calculated as follows: Calculate the dot product between the average routing weight of non-AI samples and the average routing weight of AI samples, and obtain the orthogonal constraint loss by minimizing the dot product.
8. The method according to claim 2, characterized in that, The total loss function of the joint pre-training also includes a coverage constraint loss, which is used to constrain the uniformity of the calls to each of the subspaces.
9. The method according to claim 2, characterized in that, The novel forged samples and the replay set are input into the pre-trained model for small-sample dynamic adaptation, including: Calculate the real anchor points and fake anchor points based on the samples in the playback set; By circumventing constraints, the orthogonality between the routing weights of the novel forged sample and the real anchor point is calculated, thereby suppressing the projection response of the novel forged sample on the feature subspace activated by the non-AI sample. The consistency of the output features of the adapted model with those of the pre-trained model on old samples is constrained by the anti-forgetting distillation loss.
10. A small sample image forgery detection system characterized in that, include: A feature extraction unit is used to input an image into a dual-branch feature extraction network to obtain a visual feature vector and a frequency domain guiding signal. The dual-branch feature extraction network includes a first branch and a second branch. The first branch is used to extract the visual feature vector, and the second branch is used to extract the frequency domain guiding signal. A decoupling unit is used to input the frequency domain guiding signal and the visual feature vector into a mutually exclusive subspace routing module to obtain decoupled output features. The mutually exclusive subspace routing module includes multiple mutually exclusive subspaces, each of which is defined by a subspace address and subspace features. A classification unit is used to input the output features into a classification network to obtain forgery detection results.