Universal unsupervised image tampering positioning system and method based on cognitive guidance

By constructing a multi-level semantic prototype library and a causal reasoning mechanism for image tampering localization, the generalization ability and background interference problems of unsupervised image tampering localization technology are solved, achieving high-precision and robust image tampering detection.

CN121190903APending Publication Date: 2025-12-23XINJIANG UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511384144.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-26
Publication Date
2025-12-23

AI Technical Summary

Technical Problem

Existing unsupervised image tampering localization techniques suffer from problems such as weak generalization ability, reliance on physical cues, insufficient semantic understanding ability, and difficulty in suppressing background interference, resulting in poor detection performance in complex scenes.

Method used

A general-purpose unsupervised image tampering localization system based on cognitive guidance is adopted, including a two-stage semantic prototype construction module, a causal intervention and abnormal activation module, and an abnormal-to-hint adapter module. By constructing a multi-level semantic prototype library and combining causal reasoning and semantic segmentation models, end-to-end image tampering localization is achieved.

Benefits of technology

It achieves high-precision and robust image tampering localization without the need for labeled data, has strong generalization ability, can effectively suppress background interference, and improves detection accuracy and boundary integrity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121190903A_ABST
    Figure CN121190903A_ABST
Patent Text Reader

Abstract

The invention discloses a universal unsupervised image tampering positioning system and method based on cognitive guidance, and belongs to the technical field of computer vision. The system provided by the invention comprises a two-stage semantic prototype construction module, a causal intervention and exception activation module and an exception transfer prompt adapter module, the method comprises the following steps: in a training stage, extracting multilayer semantic features from a large number of real images, and constructing a fine-grained and coarse-grained prototype knowledge base; in the reasoning stage, a test image is input, semantic features of the test image are extracted firstly, interference of a non-tampering region is suppressed through a causal intervention mechanism, then an abnormal region is recognized through an anomaly detection mechanism, and finally an accurate tampering region segmentation mask is generated through SAM guidance. The method effectively solves the technical problems that an existing method is weak in generalization ability, depends on physical clues, does not have structure understanding ability and is difficult to restrain background interference and the like.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer vision, and particularly relates to a general unsupervised image tampering positioning system and method based on cognitive guidance. BACKGROUND

[0002] Image Manipulation Localization (IML) is a key technology in digital image forensics, aiming to identify tampered regions in images through pixel-level positioning to ensure the authenticity of multimedia content. Current image tampering detection and positioning technology (IML) has attracted widespread attention in the fields of digital forensics, news verification, judicial authentication, etc. In particular, in the task of unsupervised image tampering positioning, most methods rely on low-level physical features introduced by tampering behavior in images, such as Color Filter Array (CFA) mismatch, sensor noise inconsistency, JPEG compression artifacts, etc. Representative studies of such methods include:

[0003] 1. Methods based on noise or CFA inconsistency: locate tampered regions by analyzing physical features such as fixed noise patterns or CFA patterns.

[0004] 2. Methods based on mosaic consistency: assume that images from a fixed camera have inherent structural consistency, learn this consistency through neural networks, and analyze mosaic structure inconsistency in images to find abnormalities.

[0005] 3. Self-supervised training methods: use a visual model backbone to transform images, and analyze the inconsistency of the transformed image structure to locate tampering.

[0006] However, these methods have the following common problems:

[0007] 1. Dependence on physical clues, poor generalization ability: traditional methods often rely on low-level physical features in images such as noise inconsistency, CFA artifacts, etc., but these features may be weakened or even eliminated by compression, filtering or stylization in actual application scenarios, resulting in significant performance degradation.

[0008] 2. Weak semantic understanding: existing unsupervised methods lack modeling of high-level semantic structures, making it difficult to identify tampered regions in images with complex structural or deeply integrated context semantics.

[0009] 3. Dependence on handcrafted features and artificial settings: most traditional methods rely on manually set feature extraction processes or threshold adjustments, and lack end-to-end modeling capabilities, limiting the scope of use of the method.

[0010] 4. Lack of modeling and interference suppression mechanism: Unsupervised methods are very susceptible to external information interference, and are easily disturbed by strong features in image backgrounds or non-tampered regions during use, leading to misjudgment or missed judgment.

[0011] The cause of the above problem is that:

[0012] 1. The bottom features are easily disturbed and unstable, and the low-level physical information is extremely sensitive to image compression, style migration, denoising, etc. It is easy to lose or be covered, leading to the failure of traditional detection methods.

[0013] 2. The semantic modeling ability of deep neural networks is not fully utilized, and most methods do not build a general and high-level semantic prototype library or use deep learning methods to learn deep features of images, nor establish the structural relationship between image contexts.

[0014] 3. Image understanding ability is limited by model design: Some methods are only for specific task data, so fine-tuning is needed for specific tasks to achieve relatively good adaptability, lack of flexibility and migration ability, and unstable performance on unknown data sets.

[0015] 4. No structural modeling thinking is introduced, the current model lacks a complete deep learning training and reasoning framework, and does not consider the mechanism of suppressing mixed variables (such as strong features of non-tampered regions) through structural causal model, leading to poor performance and easy to make wrong judgments.

[0016] Although a small number of neural network models have been applied to unsupervised image tampering positioning in recent years, these methods are still limited by task-specific design, lack of modeling ability for complex semantic structures, and do not introduce causal modeling mechanisms to handle mixed features under unsupervised conditions.

[0017] Therefore, under unsupervised conditions, how to establish an end-to-end image tampering positioning framework without human annotation, with stronger generalization and robustness, is a key problem that needs to be broken through in current technology. In view of this, the present application proposes a general unsupervised image tampering positioning system and method based on cognitive guidance. SUMMARY

[0018] The purpose of the present application is to propose a general unsupervised image tampering positioning system and method based on cognitive guidance to solve the technical problems of weak generalization ability, dependence on physical clues, lack of structural understanding ability, and difficulty in suppressing background interference in the prior art.

[0019] In order to achieve the above purpose, the technical scheme adopted by the present application is as follows:

[0020] A general unsupervised image tampering localization system based on cognitive guidance is proposed. The system includes a two-stage semantic prototype construction module (DPC), a causal intervention and abnormal activation module (CIAA), and an abnormal-to-hint adapter module (A2P).

[0021] The two-stage semantic prototype building module (DPC) runs during the training phase and is used to extract multi-level semantic features from real images and build two prototype libraries: fine-grained semantic prototype and coarse-grained semantic prototype.

[0022] The Causal Intervention and Anomaly Activation (CIAA) module includes a Feature-Level Causal Intervention submodule and a Prototype-Guided Anomaly Activation submodule. It plays a role in the inference stage by using the constructed prototype library and combining the idea of ​​causal inference to perform feature intervention and anomaly activation processing on the test image to locate potential tampering areas.

[0023] The anomaly-to-hint adapter module (A2P) is used to convert the anomaly activation map into an input hint suitable for the Segment All Model (SAM) to improve the accuracy and boundary integrity of the localization results.

[0024] Preferably, the construction of the prototype library specifically includes the following:

[0025] Building a fine-grained semantic prototype library, including:

[0026] Feature maps are extracted from layers 2 and 4 of the model's backbone network;

[0027] Normalize the feature convolution channel dimensions to obtain a standardized semantic description;

[0028] The local features of all images are stitched together to form a high-dimensional prototype, which is used to describe the "normal pattern" of the local structure; the formula for the above process is as follows:

[0029] X i =Norm(Conv 1×1 (F))

[0030] M f =[X1,…,X k ] T

[0031] In the formula, X i F represents the standardized semantic description; M represents the feature map; fdenotes high-dimensional prototype; superscript T denotes transpose operation;

[0032] constructing a coarse-grained semantic prototype library, comprising:

[0033] dividing the feature map into overlapping blocks, and integrating into local semantic features by weighted neighborhood aggregation;

[0034] sending the local semantic features into a multi-layer feature layer for aggregation, dimension reduction and integration to form a multi-image semantic prototype;

[0035] obtaining a coarse-grained prototype library after synthesizing the multi-image semantic prototype to enhance the global structure understanding ability; the formula of the above process is as follows:

[0036] P = Patchify (F) = {p1, p2,..., pn}, n = 1, 2, 3,..., N n}, p i ∈R C×s×s

[0037]

[0038] In the formula, P represents a feature block; Patchify represents the operation of blocking the target feature; denotes the processed local semantic block; denotes the weighted operation on the relevant local semantic features; N(i) denotes the feature block set around the semantic feature block with label i; w it denotes the weighted weight of a certain feature block; p i and p t both represent relevant feature blocks; z j denotes the combination of semantic features of the relevant layers; denotes the obtained single-block feature set of a single layer of a single image; M p denotes a coarse-grained prototype library; m (b) denotes multi-layer feature aggregation of a single image; F fuse denotes the multi-layer feature aggregation operation of a single image.

[0039] Preferably, the execution of the feature-level causal intervention mechanism submodule specifically includes the following contents:

[0040] A structural causal model (SCM) is adopted, in which the variables are defined as follows:

[0041] A: real region feature; T: tampered region feature; C: mixed feature of the interface region of the two; O: model output;

[0042] Based on the above definition, by intervening T to block the paths of A→T→O and A→C→O, the direct causal path of T→O is reserved;

[0043] The output of the intervened model is represented as:

[0044]

[0045] Approximate modeling is performed on the above formula:

[0046]

[0047] In the formula, A i is the real feature in the prototype library, as a conditional reference;

[0048] The similarity suppression mechanism is introduced:

[0049] For the test image feature, according to the similarity of the most similar feature in the fine-grained prototype library, the reserved weight is determined, and the formula of the similarity suppression mechanism is as follows:

[0050]

[0051] In the formula, F test represents the test image feature; m j represents the test image feature and the most similar feature in the fine-grained prototype library; <·,·> represents the inner product similarity; and ⊙ represents element-wise multiplication.

[0052] Preferably, the execution of the prototype-guided anomaly activation mechanism submodule specifically includes the following contents:

[0053] The obtained test image feature F test is positioned, and F test is divided into patches: y i ∈F′ test ;

[0054] The Euclidean distance between each patch and the most similar prototype in the coarse-grained prototype library M p is calculated as an anomaly activation score, and the specific calculation formula is:

[0055]

[0056] All the scores s i obtained are rearranged back to the spatial structure to form a two-dimensional activation map S:

[0057] S=Reshape([s1,s2,...,s n ],[H,W])

[0058] In the formula, s i represents the obtained anomaly score value; y i represents the read test image feature; m * represents the most similar feature found from the feature library; and |y i -m* |2 Operation computes distance of both; Reshape reshapes linear scores into 2D structure; S is 2D activation map.

[0059] Preferably, the abnormality-to-cue adapter module performing the specific operations comprises the following:

[0060] 1) Cue generation procedure, comprising:

[0061] Given an abnormality activation map, the abnormality-to-cue adapter module generates a binary cue mask according to the following procedure:

[0062] G' = Norm(G), B(G', τ) = Top-τ binarization of G'

[0063] CC(B(G', τ)) = Connected Component with Global Peak

[0064] D = CLOSE(CC(B(G', τ)))

[0065] In the formula, D represents the binary cue mask; G represents the abnormality activation map; G' represents the processed abnormality map region; Norm represents normalization; B represents the Top-τ region with the highest abnormality degree; CC represents connecting the possible abnormality regions; and CLOSE represents filling the possible internal holes to obtain a better mask.

[0066] Binarization: binarization according to a threshold after normalization of the image;

[0067] Peak connection: selecting the region where the highest activated point is located as the mask;

[0068] Image closure: filling the existing binary image holes;

[0069] Based on the above procedure, the generated binary cue mask D contains the most representative potential tampering region;

[0070] 2) A guided segmentation all model (SAM) generates a final mask, comprising:

[0071] The abnormality-to-cue adapter module generates a cue signal using the mask D to guide the segmentation all model (SAM) to perform accurate segmentation:

[0072] Peak: the pixel point with the highest response value in the activation map;

[0073] Box: the smallest enclosing box of the mask D.

[0074] The segmentation all model (SAM) is activated through the following function call:

[0075]

[0076] In the formula, I represents an original image; To segment the final accurate tampering mask output by all models; Peak represents a foreground point prompt; Box represents a spatial prior box; SAM represents using a segmentation-all model (SAM) to perform a segmentation task.

[0077] The general unsupervised image tampering positioning method based on cognitive guidance comprises the following contents:

[0078] In the training stage: multi-layer semantic features are extracted from a large number of real images, and a fine-grained and coarse-grained prototype knowledge base is constructed.

[0079] In the inference stage: the semantic features of a test image are extracted, non-tampering area interference is inhibited through a causal intervention mechanism, an abnormal area is identified through an anomaly detection mechanism, and finally an accurate tampering area segmentation mask is generated through SAM guidance.

[0080] The application further protects a computer-readable storage medium, wherein at least one instruction, at least one program, a code set or an instruction set is stored in the computer-readable storage medium, and the instruction, program, code set or instruction set is loaded and executed by a processor to realize the above-mentioned general unsupervised image tampering positioning system based on cognitive guidance.

[0081] Compared with the prior art, the application provides a general unsupervised image tampering positioning system and method based on cognitive guidance, which has the following beneficial effects:

[0082] (1) The application does not need labeled data and has complete unsupervised modeling capability:

[0083] The application uses a multi-layer semantic prototype construction module (DPC) to automatically extract fine-grained and coarse-grained semantic prototypes from real images, forming a corresponding knowledge base. Unlike most methods that rely on artificial labels or weak supervision signals, the application completely models based on the internal structural features of images without any external supervision or human intervention.

[0084] (2) The application has stronger anti-background interference capability and low false detection rate:

[0085] The application introduces a structural causal model (SCM) and a prototype similarity suppression mechanism to remove mixed background features through a feature-level intervention means and only retain abnormal signals related to tampering. Traditional methods directly use all features for anomaly detection, which is easily misled by complex image backgrounds. The application can effectively decouple interference and improve the accuracy and robustness of positioning.

[0086] (3) The present application can improve the discrimination ability of fuzzy areas by explicitly modeling prediction uncertainty:

[0087] The present application designs an abnormal conversion prompt module (A2P) to convert the activation map of the model into a structured prompt (foreground point + region box) to guide the SAM to perform high-resolution segmentation. Existing unsupervised methods cannot be used in conjunction with semantic large models, and the boundary of the segmentation result is blurred. The present application first realizes the linkage of unsupervised positioning and SAM, and significantly improves the boundary clarity and structural integrity.

[0088] (4) The present application has strong generalization ability for unknown data sets and platform compressed images:

[0089] The present application learns general structures and patterns through a unified multi-layer prototype semantic modeling method, and does not rely on task-specific features. Traditional methods are sensitive to image sources, formats, and compression methods. The present application verifies the stability and universality on multiple social platform compressed images, and has strong generalization ability.

[0090] In summary, the present application proposes an end-to-end, unsupervised, cognitive and causal reasoning mechanism for image tampering positioning system, which breaks through many limitations of the prior art and achieves key improvements in precision, automation and universality. BRIEF DESCRIPTION OF DRAWINGS

[0091] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0092] Figure 1 The overall architecture of the general unsupervised image tampering positioning system based on cognitive guidance proposed by the present application is shown in the figure;

[0093] Figure 2 The causal structure model in the causal intervention mechanism proposed by the present application is shown in the figure, where left: before intervention; right: after intervention;

[0094] Figure 3 The multi-model effect comparison in the known data set proposed in embodiment 2 of the present application is shown in the figure, where Ours represents the model result of the present application;

[0095] Figure 4 The multi-model effect comparison in the unknown data set proposed in embodiment 2 of the present application is shown in the figure, where Ours represents the model result of the present application. DETAILED DESCRIPTION

[0096] With reference to the accompanying drawings, the technical solutions in the embodiments of the present application will be clearly and completely described below, obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments.

[0097] The present application proposes a general unsupervised image tampering positioning system and method based on cognitive guidance, which innovatively introduces human cognitive mechanism as inspiration, combines three key technical links of causal intervention modeling, semantic prototype learning and general image segmentation model (SAM), and solves the technical problems such as weak generalization ability, dependence on physical clues, lack of structural understanding ability, and difficulty in suppressing background interference of existing methods. The present application breaks through the traditional dependence on physical clues, constructs a prototype knowledge base based on multi-level semantic features, realizes semantic level tampering detection; in addition, a structural causal intervention mechanism is introduced, which effectively suppresses the influence of mixed features in non-tampered areas of the image, and highlights the real tampered area; further, a "abnormal to prompt" adapter module is designed, which integrates the boundary understanding ability of the segmentation model (SAM), further improves the positioning accuracy; the present application also realizes a general, end-to-end, and robust unsupervised image tampering positioning system, which is suitable for various data sets, compression scenarios and complex image structures. Through the realization of the above objectives, the present application significantly improves the accuracy, robustness and practical application ability of unsupervised image tampering detection, and is suitable for image security, media forensics, content review and other fields.

[0098] The general unsupervised image tampering positioning system and method based on cognitive guidance proposed by the present application will be further described below in combination with related drawings and specific examples, and the specific content is as follows.

[0099] Embodiment 1:

[0100] Please refer to Figures 1-2 The present application proposes a general unsupervised image tampering positioning system based on cognitive guidance, which is defined as USAM-IML, and its overall architecture is composed of three core modules:

[0101] 1. Double-stage semantic prototype construction module (DPC)

[0102] 2. Causal intervention and abnormal activation module (CIAA)

[0103] 3. Abnormal to prompt adapter module (A2P)

[0104] Based on the above system, the present application further proposes a general unsupervised image tampering positioning method based on cognitive guidance, and the process is as follows:

[0105] In the training stage: extract multi-level semantic features from a large number of real images to construct fine-grained and coarse-grained prototype knowledge base.

[0106] In the inference stage: input the test image, first extract its semantic features, inhibit the interference of non-tampered areas through the causal intervention mechanism, then identify the abnormal area through the anomaly detection mechanism, and finally generate an accurate tampered area segmentation mask through SAM guidance.

[0107] The proposed system is further described below, and the specific content is as follows.

[0108] 1. Dual-stage semantic prototype construction module (DPC)

[0109] This module runs in the training stage, aiming to extract multi-level semantic features from real (untampered) images and construct two prototype libraries:

[0110] a. Fine-Grained Prototype

[0111] Extract feature maps F from the 2nd and 4th layers of the model backbone network (PVTv2-B3);

[0112] Normalize the feature convolution channel dimension and get the standardized semantic description X i ;

[0113] The local features of all images are spliced to form a high-dimensional prototype M f , which describes the "normal mode" of local structure.

[0114] The formula is as follows:

[0115] X i =Norm(Conv 1×1 (F))

[0116] M f =[X1,…,X k ] T

[0117] In the formula, X i represents the standardized semantic description; F represents the feature map; M f represents the high-dimensional prototype; the superscript T represents the transpose operation;

[0118] b. Coarse-Grained Prototype

[0119] Divide the feature map into overlapping blocks p and integrate them into local semantic features through weighted neighborhood aggregation

[0120] Reduce the dimension of the block features aggregated by multiple layers (second and fourth layers) to integrate the semantic prototype m (b) ;

[0121] After the multi-image semantic prototype synthesis, a coarse-grained prototype library M is obtained p , and the global structure understanding ability is enhanced.

[0122] The formula is as follows:

[0123] P = Patchify (F) = {p1, p2, …, p n}, p i ∈R C×s×s

[0124]

[0125] 2. Causal Intervention and Anomaly Activation (CIAA)

[0126] This module plays a role in the reasoning stage, and the main function is to use the prototype knowledge base, combined with causal reasoning ideas, to process feature intervention and anomaly activation of the test image, and locate the potential tampering area.

[0127] This module contains two key sub-modules:

[0128] 2.1 Feature-Level Causal Intervention

[0129] The features of the real area in the image (denoted as A) are easy to cover the features of the tampered area (denoted as T), produce mixed interference, and affect the model's judgment of the tampered area.

[0130] Therefore, a structural causal model (SCM) is used, in which the variables are defined as follows:

[0131] A: Real area feature (mixed variable)

[0132] T: Tampered area feature (target variable)

[0133] C: Mixed features of the intersection area of the two

[0134] O: Model output (positioning result)

[0135] The present application intervenes in T (denoted as do(T)) to block the A→T→O and A→C→O paths, thereby retaining the direct causal path of T→O.

[0136] The model output after intervention is represented as:

[0137]

[0138] Approximate modeling of the above formula:

[0139]

[0140] where A i is the real feature in the prototype library as the conditional reference;

[0141] A similarity suppression mechanism is introduced:

[0142] For the test image feature, its reserved weight is determined according to its similarity with the most similar feature in the fine-grained prototype library, and the formula of the similarity suppression mechanism is as follows:

[0143]

[0144] where F test represents the test image feature; m j represents the test image feature and the most similar feature in the fine-grained prototype library; <·,·> represents the inner product similarity; and ⊙ represents element-wise multiplication.

[0145] High-similarity features are strongly suppressed, achieving a “de-mixing” effect.

[0146] 2.2 Prototype-Guided Anomaly Activation

[0147] After the intervention, the feature map F test is obtained, and positioning can be performed at this time.

[0148] First, the feature is divided into patches: y i ∈ F′ test ;

[0149] Then, the Euclidean distance between each patch and the most similar prototype in the coarse-grained prototype library M p is calculated as the anomaly activation score:

[0150]

[0151] All the scores s i are rearranged back into a spatial structure to form a two-dimensional activation map S:

[0152] S = Reshape ([s1, s2,..., s n ], [H, W])

[0153] 3. Anomaly-to-Prompt Adapter (A2P)

[0154] Although the anomaly activation mechanism in the previous stage can generate an activation map reflecting the tampered area, the map still has the following defects:

[0155] Activation region boundary is blurred;

[0156] Cannot meet the accuracy requirement of semantic segmentation;

[0157] Direct threshold processing is easy to introduce noise.

[0158] Therefore, the present application designs an "abnormal conversion prompt adapter" module (A2P) for converting abnormal activation maps into input prompts suitable for a segmentation all model (SAM), thereby significantly improving the accuracy and boundary integrity of the positioning result.

[0159] 3.1 Prompt generation process

[0160] Given the abnormal activation map G generated by the previous step, the A2P module generates a binary prompt mask D according to the following process:

[0161] G' = Norm(G), B(G', τ) = Top-τ binarization of G'

[0162] CC(B(G', τ)) = Connected Component with Global Peak

[0163] D = CLOSE(CC(B(G', τ)))

[0164] Binarization (Top-τ binarization): After normalizing the image, binarize according to the threshold;

[0165] Highest point connection (CC): Select the region where the highest activation point is located as the mask;

[0166] Image closure (CLOSE): Fill in possible empty holes in the binary image;

[0167] Finally, the mask D contains the most representative potential tampering region.

[0168] 3.2 Guide SAM to generate the final mask

[0169] The A2P module uses two key pieces of information from the mask D to generate a prompt signal to guide the SAM to perform accurate segmentation:

[0170] Foreground point prompt (Peak): The pixel point with the highest response value in the activation map;

[0171] Spatial prior box (Box): The minimum enclosing box of the mask D.

[0172] The SAM model is activated by the following function call:

[0173]

[0174] wherein:

[0175] I represents an original image;

[0176] The final accurate tampering mask output by the SAM.

[0177] This mechanism can significantly improve the model's ability to identify fine-grained boundaries under unsupervised conditions, and is particularly suitable for tamper detection in multi-target, small target or weak texture images.

[0178] Embodiment 2:

[0179] Based on embodiment 1 but with the difference that a comparative experiment is designed to characterize the performance of the cognitive guidance-based general unsupervised image tamper positioning system proposed in the application, and the comparison results are shown in Table 1 and Table 2. Figures 3-4 and Table 1.

[0180] Figure 3 Fig. 2 is a multi-model effect comparison chart of the model constructed based on the application in a known data set, Figure 4 Fig. 3 is a multi-model effect comparison of the model constructed based on the application in an unknown data set, and it can be seen from the visual effect in the figure that the application has good visual effect in both known and unknown data sets.

[0181] Table 1 and index effect comparison between models of different supervision types

[0182]

[0183] Please refer to Table 1, and it can be seen from the index effect shown in Table 1 that the application has good index effect in both known and unknown data sets, and can be compared with the full supervision method to some extent.

[0184] The above is only a preferred specific embodiment of the application, but the protection scope of the application is not limited thereto, and those of ordinary skill in the art can make several improvements and refinements without departing from the principles of the application, and these improvements and refinements should also be considered as the protection scope of the application.

Claims

1. A general-purpose unsupervised image forgery localization system based on cognitive guidance, characterized in that, The system comprises a two-stage semantic prototype construction module, a causal intervention and abnormal activation module, and an abnormal conversion prompt adapter module. The two-stage semantic prototype construction module is used for extracting multi-level semantic features from real images and constructing two prototype libraries of fine-grained semantic prototypes and coarse-grained semantic prototypes in a training stage. The causal intervention and abnormal activation module comprises a feature-level causal intervention mechanism submodule and a prototype-guided abnormal activation mechanism submodule, which are used for feature intervention and abnormal activation processing of a test image by using the constructed prototype library and combining with causal reasoning ideas in an inference stage, so as to locate a potential tampering area. The abnormal conversion prompt adapter module is used for converting an abnormal activation map into an input prompt suitable for a segmentation-all model, so as to improve the accuracy and boundary integrity of a positioning result.

2. The cognitive guidance based general purpose unsupervised image forgery localization system of claim 1, wherein, The construction of the prototype library comprises the following steps: The fine-grained semantic prototype library is constructed by: extracting feature maps from the 2nd and 4th layers of a model backbone network; normalizing the feature convolution channel dimension to obtain a standardized semantic description; splicing the local features of all images to form a high-dimensional prototype for describing the "normal mode" of local structure; and the formula of the above process is as follows: X i = Norm(Conv 1×1 (F)) M f = [X1,..., X k ] T wherein X i denotes a standardized semantic description; F denotes a feature map; M f denotes a high-dimensional prototype; the superscript T denotes a transposition operation; The coarse-grained semantic prototype library is constructed by: dividing the feature maps into overlapping blocks and integrating them into local semantic features through weighted neighborhood aggregation; sending the local semantic features into a multi-layer feature layer for aggregation, dimension reduction and integration to form multi-image semantic prototypes; synthesizing the multi-image semantic prototypes to obtain a coarse-grained prototype library to enhance the global structure understanding ability; and the formula of the above process is as follows: P = Patchify(F) = {pi, p2,..., p n}, p i ∈ R C×s×s wherein, denotes local semantic feature; denotes weighted operation on relevant local semantic feature; N(i) denotes the set of feature blocks around the semantic feature block of label i; w it denotes the weighted weight of the specific feature block; z j denotes the combination of semantic features of relevant layers; is the single block feature set of the single layer obtained in the previous step; M p denotes the coarse-grained prototype library; m (b) denotes the multi-layer feature aggregation of a single picture; F fuse denotes the multi-layer feature aggregation operation of a single picture.

3. The cognitive guidance based general purpose unsupervised image forgery localization system of claim 2, wherein, The execution of the feature-level causal intervention mechanism submodule comprises the following steps: a structural causal model is adopted, wherein the variables are defined as follows: A: real area feature; T: tampered area feature; C: mixed feature of the junction area of A and T; O: model output; based on the above definition, T is intervened to block the paths of A->T->O and A->C->O, and the direct causal path of T->O is reserved; the model output after intervention is represented as: the above formula is approximated as: In the formula, A i are real features in the prototype library, as conditional references; a similarity suppression mechanism is introduced: for the features of a test image, the similarity between the test image and the most similar feature in the fine-grained prototype library is used to determine the retention weight of the test image; and the formula of the similarity suppression mechanism is as follows: where F test denotes the test image feature; m j denotes the most similar feature in the fine-grained prototype library to the test image feature; <·,·> denotes the inner product similarity; and denotes the element-wise multiplication.

4. The cognitive guidance based general purpose unsupervised image forgery localization system of claim 3, wherein, The execution of the prototype-guided abnormal activation mechanism submodule comprises the following steps: Using the obtained test image features F test Positioning is performed, F test is divided into patches: y i ∈ F' test ; Compute the Euclidean distance of each patch to the most similar prototype in the coarse-grained prototype library M p as the anomaly activation score, which is computed as follows: All the scores s are obtained i Re-arrange back to spatial structure, form two-dimensional activation map S: S = Reshape([s1, s2,..., s n ], [H, W]) In the formula, s i represents the acquired abnormal score value; y i represents the read test picture features; m * represents the most similar features found in the feature library to him; |y i -m * |2 operation computes the similarity of both; Reshape reshapes the linear scores into a two-dimensional structure; S is the two-dimensional activation map.

5. The cognitive guidance based general purpose unsupervised image forgery localization system of claim 4, wherein, The execution of the abnormal conversion prompt adapter module comprises the following steps: 1) prompt generation process, comprising: given an abnormal activation map, the abnormal conversion prompt adapter module generates a binary prompt mask according to the following process: G' = Norm(G), B(G', τ) = Top-τ binarization of G' CC(B(G', τ)) = Connected Component with Global Peak D = CLOSE(CC(B(G', τ))) In the formula, D represents a binary hint mask; G represents an anomaly activation map; G' represents a processed anomaly map region; Norm represents normalization; B represents a Top-τ region with the highest anomaly degree; CC represents connecting possible anomaly regions; and CLOSE represents filling possible internal holes to obtain a better mask. Binaryzation: after image normalization, threshold binaryzation is performed; Highest point connection: a region where the highest activation point is located is selected as a mask; Image closure: fill the existing binary image holes; Based on the above process, the generated binary hint mask D contains the most representative potential tampering region; 2) Guide the all-in-one segmentation model to generate the final mask, including: The anomaly-to-hint adapter module generates a hint signal using the mask D to guide the all-in-one segmentation model to perform accurate segmentation: Foreground point hint: the pixel point with the highest response value in the activation map; Spatial prior box: the minimum enclosing box of the mask D. The all-in-one segmentation model is activated by the following function call: In the formula, I represents an original image; To segment the final accurate tampering mask output by all models; Peak represents a foreground point prompt; Box represents a spatial prior box; SAM represents using a segmentation-all model (SAM) to perform a segmentation task.

6. The general-purpose unsupervised image manipulation localization method based on cognitive guidance to which the system of any one of claims 1-5 is applied, characterized in that, Including the following contents: In the training stage: extract multi-layer semantic features from a large number of real images, and construct a prototype knowledge base with fine-grained and coarse-grained; In the inference stage: input the test image, first extract its semantic features, then suppress the interference of non-tampered regions through the causal intervention mechanism, then identify the abnormal region through the anomaly detection mechanism, and finally generate an accurate tampering region segmentation mask through SAM guidance.

7. A computer device, comprising: The computer device includes a processor and a memory, and the memory stores at least one instruction, at least one program, a code set or an instruction set, which are loaded and executed by the processor to realize the general unsupervised image tampering positioning system based on cognitive guidance according to any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores at least one instruction, at least one program, a code set or an instruction set, which are loaded and executed by the processor to realize the general unsupervised image tampering positioning system based on cognitive guidance according to any one of claims 1-5.