Image detection method and device, electronic equipment and storage medium

Through the combination of CLIP network, multi-head attention network and forgery adaptation network, the problem of insufficient generalization ability of AIGC detection model under unknown generated content and image processing operations is solved, and accurate detection of forged images is achieved, improving detection accuracy and efficiency.

CN120747586AActive Publication Date: 2025-10-03BEIZHI TECHNOLOGY (ANJI) CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510823465.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-19
Publication Date
2025-10-03
Estimated Expiration
2045-06-19

AI Technical Summary

Technical Problem

Existing AIGC detection models lack generalization capabilities when faced with unknown generated content, and their robustness to common image processing operations needs to be improved, making it difficult to accurately distinguish between forged images and real images.

Method used

A combination of CLIP network, multi-head attention network, forgery adaptation network and classification network is used to generate enhanced image-text features through quality evaluation text, content description text and image block information to improve the adaptability and accuracy of the detection model.

Benefits of technology

The model's adaptability to unknown generated content has been improved, enabling it to accurately distinguish between forged and real images, thereby improving the accuracy and efficiency of AIGC detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120747586A_ABST
    Figure CN120747586A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of artificial intelligence, and provides an image detection method and device, electronic equipment and a storage medium. The method comprises the following steps: firstly, determining a quality evaluation text and a content description text of a to-be-processed image and information of a plurality of image blocks; then obtaining quality text features, content text features and image features by using a CLIP network of an image detection model according to the quality evaluation text, the content description text and the information of the plurality of image blocks; a multi-head attention network of an image detection model is used, and fusion text features are obtained according to the quality text features and the content text features; obtaining enhanced image-text features according to the fused text features and the image features by using a counterfeit adaptive network of an image detection model; and finally, obtaining a detection result representing whether the to-be-processed image is a forged image or not according to the enhanced image-text features by utilizing a classification network of an image detection model. According to the invention, the detection model can accurately distinguish forged / real images, and the accuracy of AIGC detection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an image detection method, device, electronic device and storage medium. Background Art

[0002] In recent years, the rapid development of generative AI technologies, such as Generative Adversarial Networks (GANs) and Diffusion Models (DMs), has significantly driven progress in the field of Artificial Intelligence Generated Content (AIGC), revolutionizing image generation and editing. These advanced generative models enable users to generate and edit high-quality images simply by inputting a brief text prompt, spawning commercial applications such as DALLE-2, Midjourney, and Adobe Firefly. Diffusion models, with their exceptional controllability and impressive generation performance, demonstrate enormous transformative potential in areas such as creative design, digital media, and content creation.

[0003] However, the rapid adoption of AIGC technology has also posed unprecedented security challenges. Highly realistic synthetic images are blurring the line between real and fake content, making it difficult for the public to distinguish authenticity. This, in turn, has led to a range of issues, including the spread of false information and digital forgeries. Against this backdrop, accurately detecting fake and real images while ensuring technological advancement has become a crucial issue, mitigating the potential risks posed by AIGC technology. Summary of the Invention

[0004] In view of this, an object of the present invention is to provide an image detection method, device, electronic device and storage medium.

[0005] In order to achieve the above objectives, the technical solutions adopted in the embodiments of the present invention are as follows:

[0006] In a first aspect, the present invention provides an image detection method, comprising:

[0007] Determining a quality evaluation text and a content description text of an image to be processed, as well as information of multiple image blocks of the image to be processed;

[0008] Using the CLIP network of the image detection model, obtaining quality text features and content text features of the image to be processed based on the quality evaluation text and content description text of the image to be processed, and obtaining image features of the image to be processed based on multiple image block information of the image to be processed;

[0009] Using a multi-head attention network of an image detection model, obtaining a fused text feature of the image to be processed according to the quality text feature and the content text feature of the image to be processed;

[0010] Obtaining enhanced text-image features of the image to be processed based on the fused text features and image features of the image to be processed using a forged adaptation network of an image detection model;

[0011] A classification network of an image detection model is used to obtain a detection result indicating whether the image to be processed is a forged image according to the enhanced graphic and text features of the image to be processed.

[0012] In an optional embodiment, the CLIP network includes a text encoder and a plurality of visual encoders;

[0013] The method comprises: utilizing a CLIP network of an image detection model to obtain, based on the quality evaluation text and content description text of the image to be processed, quality text features and content text features of the image to be processed, and obtaining, based on information of multiple image blocks of the image to be processed, image features of the image to be processed, including:

[0014] Using the text encoder, respectively encoding the quality evaluation text and the content description text of the image to be processed to obtain the quality text features and the content text features of the image to be processed;

[0015] Using each visual encoder in turn, encoding multiple image block information of the image to be processed to obtain image features of the image to be processed;

[0016] Among them, the image features include global image features and multiple local image features; the global image features represent the degree of correlation between the global information of the image and the local information of each image block; and a local image feature represents the degree of correlation between the local information of an image block and the local information of other image blocks.

[0017] In an optional embodiment, the multi-head attention network includes multiple attention layers and splicing layers, each attention layer has a query vector, a key vector and a numerical vector, and the splicing layer has a fusion parameter;

[0018] Using the multi-head attention network of the image detection model, the fused text features of the image to be processed are obtained according to the quality text features and content text features of the image to be processed, including:

[0019] Using each attention layer, performing an aggregation operation based on the query vector, key vector, and value vector of the attention layer, as well as the quality text features and content text features of the image to be processed, to obtain the attention text features of the attention layer, thereby obtaining the attention text features of each attention layer;

[0020] The splicing layer is used to perform a splicing operation based on the attention text features of all attention layers to obtain a spliced ​​text feature, and the spliced ​​text feature is multiplied by the fusion parameter to obtain a fused text feature of the image to be processed.

[0021] In an optional embodiment, the forged adaptation network includes a connection layer, a transformation layer, and an interaction layer; the image features include a global image feature and a plurality of local image features;

[0022] Obtaining enhanced text-image features of the image to be processed based on the fused text features and image features of the image to be processed using a forgery adaptation network of the image detection model, including:

[0023] Using the connection layer, a fusion operation and an extraction operation are performed based on the fused text feature of the image to be processed and the global image feature to obtain a fused image-text feature, and a splicing operation is performed based on the fused image-text feature and the multiple local image features to obtain an initial image-text feature of the image to be processed;

[0024] Using the transformation layer, a transformation operation is performed based on the initial graphic features of the image to be processed to obtain transformed graphic features of the image to be processed;

[0025] The interactive layer is used to perform an enhancement operation based on the transformed graphic and text features of the image to be processed, thereby obtaining the enhanced graphic and text features of the image to be processed.

[0026] In an optional embodiment, using the transformation layer to perform a transformation operation based on the initial graphic features of the image to be processed to obtain the transformed graphic features of the image to be processed includes:

[0027] Using the transformation layer, a dimensionality reduction operation is performed based on the initial graphic and text features of the image to be processed to obtain a first graphic and text feature;

[0028] Using the transformation layer, performing a Fourier transform operation and an inverse Fourier transform operation based on the first image-text feature to obtain a second image-text feature;

[0029] The transformation layer is used to perform a dimensionality restoration operation based on the second graphic features to obtain the transformed graphic features of the image to be processed.

[0030] In an optional embodiment, utilizing the interactive layer to perform an enhancement operation based on the transformed graphic features of the image to be processed to obtain the enhanced graphic features of the image to be processed includes:

[0031] Using the interactive layer, performing a wavelet transform operation on the transformed graphic features of the image to be processed to obtain multi-band features;

[0032] Utilizing the interaction layer, obtaining high-frequency band features from the multi-band features and performing enhancement operations and inverse wavelet transform operations to obtain high-frequency graphic features;

[0033] The interactive layer is utilized to perform a fusion operation based on high-frequency graphic features and transformed graphic features to obtain enhanced graphic features of the image to be processed.

[0034] In an optional embodiment, the image detection model is obtained in the following manner:

[0035] According to the multiple image samples and their labels, a quality evaluation text and a content description text of each image sample and multiple image block information of each image sample are obtained;

[0036] Using the CLIP network of the image detection model to be trained, obtaining quality text features and content text features of the image sample based on the quality evaluation text and content description text of the image sample, and obtaining image features of the image sample based on multiple image block information of the image sample;

[0037] Using a multi-head attention network of the image detection model to be trained, obtaining a fused text feature of the image sample according to the quality text feature and the content text feature of the image sample;

[0038] Obtaining enhanced text-image features of the image sample based on the fused text features and image features of the image sample using a forgery adaptation network of the image detection model to be trained;

[0039] Using a classification network of the image detection model to be trained, and based on the enhanced graphic and text features of the image sample, obtaining a detection result indicating whether the image sample is a forged image;

[0040] The image detection model to be trained is trained according to the label and detection result of each image sample to obtain the image detection model.

[0041] In a second aspect, the present invention provides an image detection device, comprising:

[0042] A pre-processing module, configured to determine a quality evaluation text and a content description text of an image to be processed, as well as information of a plurality of image blocks of the image to be processed;

[0043] a detection module, configured to utilize a CLIP network of an image detection model to obtain, based on the quality evaluation text and content description text of the image to be processed, quality text features and content text features of the image to be processed, and to obtain, based on information of multiple image blocks of the image to be processed, image features of the image to be processed;

[0044] Using a multi-head attention network of an image detection model, obtaining a fused text feature of the image to be processed according to the quality text feature and the content text feature of the image to be processed;

[0045] Obtaining enhanced text-image features of the image to be processed based on the fused text features and image features of the image to be processed using a forged adaptation network of an image detection model;

[0046] A classification network of an image detection model is used to obtain a detection result indicating whether the image to be processed is a forged image according to the enhanced graphic and text features of the image to be processed.

[0047] In a third aspect, the present invention provides an electronic device comprising a processor and a memory, wherein the memory stores a computer program, and when the processor executes the computer program, the image detection method described in any one of the aforementioned embodiments is implemented.

[0048] In a fourth aspect, the present invention provides a storage medium having a computer program stored thereon. When the computer program is executed by a processor, the image detection method described in any one of the aforementioned embodiments is implemented.

[0049] The image detection method, device, electronic device, and storage medium provided by the embodiments of the present invention include: first determining the quality evaluation text and content description text of the image to be processed, as well as multiple image block information of the image to be processed; then using the CLIP network of the image detection model to obtain quality text features, content text features, and image features based on the quality evaluation text, content description text, and multiple image block information; then using the multi-head attention network of the image detection model to obtain fused text features based on the quality text features and content text features; then using the forgery adaptation network of the image detection model to obtain enhanced image-text features based on the fused text features and image features; finally, using the classification network of the image detection model to obtain a detection result indicating whether the image to be processed is a forged image based on the enhanced image-text features. This improves the detection model's adaptability to unknown generated content, enables the model to accurately distinguish forged images from real images, and improves the accuracy and efficiency of AIGC detection.

[0050] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.

[0052] Figure 1 A schematic diagram showing a flow chart of an image detection method provided by an embodiment of the present invention is shown;

[0053] Figure 2 An example diagram of an image detection method provided by an embodiment of the present invention is shown;

[0054] Figure 3 A diagram showing an example structure of a transformation layer provided by an embodiment of the present invention is shown;

[0055] Figure 4 A diagram showing an example structure of the interaction layer provided by an embodiment of the present invention is shown;

[0056] Figure 5 A schematic diagram of the training process of the image detection model provided by an embodiment of the present invention is shown;

[0057] Figure 6 A functional module diagram of an image detection device provided by an embodiment of the present invention is shown;

[0058] Figure 7 A block diagram of an electronic device provided by an embodiment of the present invention is shown.

[0059] Icon: 100 - electronic device; 110 - processor; 120 - memory; 130 - communication module; 300 - image detection device; 310 - preprocessing module; 330 - detection module. DETAILED DESCRIPTION

[0060] The following will be combined with the accompanying drawings to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations.

[0061] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention as claimed, but is merely intended to represent selected embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative work are within the scope of protection of the present invention.

[0062] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.

[0063] Currently, AIGC detection faces two core challenges: first, the model's generalization ability for unknown generated content is insufficient, and second, robustness to common image processing operations (such as compression, blurring, and adding noise) needs to be improved. To address these issues, it is necessary to design image detection methods that can effectively capture potential forgery features while being both highly discriminative and generalizable to adapt to the increasingly complex and diverse generated content environment.

[0064] Early AIGC detection research mainly addressed the generalization challenge through two strategies. The first method is to use data enhancement techniques (such as blurring, JPEG compression, hybrid transformation, etc.) to increase the diversity of training data, thereby enhancing the model's adaptability to different generated content and common image processing attacks. The second method is dedicated to mining transferable forgery features, including detectable forgery artifacts, facial structural abnormalities (such as abnormalities in the eye area), and discriminative features in the spatial and frequency domains. Although these methods have achieved certain results, because they rely on explicit learning of specific forgery patterns, the detection model is prone to overfitting during the training phase, resulting in a significant decrease in the generalization performance of the detection model when facing unknown generated images. Therefore, an embodiment of the present invention provides an image detection method to solve the above problems.

[0065] See also Figure 1 , is a flow chart of the image detection method provided by an embodiment of the present invention.

[0066] Step S202 : determining the quality evaluation text and content description text of the image to be processed, as well as information of multiple image blocks of the image to be processed.

[0067] In this embodiment, an image input by a user is obtained, i.e., an image to be processed. Then, a quality assessment of the image to be processed is performed using a preset image quality assessment model, thereby obtaining a quality assessment text for the image to be processed. Furthermore, a content extraction is performed using a preset image content generation model, thereby obtaining a content description text for the image to be processed.

[0068] The image quality assessment model can use the LIQE (Language-Image Quality Evaluator) model, and the image content generation model can use the BLIP (Bootstrapping Language-Image Pre-training) model. Furthermore, the quality assessment text can be understood as text used to represent image distortion or quality characteristics such as blur, compression level, and noise; the content description text can be understood as text used to describe the specific content of the image.

[0069] At the same time, according to the preset block parameter N, the image to be processed is divided into N image blocks. In order to ensure that the data dimension of each image block is consistent with the input data dimension of the image detection model, a linear mapping operation is performed on each image block to convert the data dimension of each image block into the input data dimension of the image detection model, thereby obtaining N image block information of the image to be processed.

[0070] Step S204, using the CLIP network of the image detection model, obtains the quality text features and content text features of the image to be processed based on the quality evaluation text and content description text of the image to be processed, and obtains the image features of the image to be processed based on multiple image block information of the image to be processed.

[0071] Step S206, using the multi-head attention network of the image detection model, obtains the fused text features of the image to be processed based on the quality text features and content text features of the image to be processed.

[0072] Step S208 , using the forged adaptation network of the image detection model, and obtaining enhanced text-image features of the image to be processed according to the fused text features and image features of the image to be processed.

[0073] In step S210 , a classification network of the image detection model is used to obtain a detection result indicating whether the image to be processed is a forged image based on the enhanced graphic and text features of the image to be processed.

[0074] In this embodiment, the image detection model sequentially includes a CLIP (Contrastive Language-Image Pre-Training) network, a multi-head attention network, a forgery adaptation network, and a classification network. The CLIP network can then be used to obtain the quality and content text features of the image to be processed based on the quality evaluation text and content description text of the image to be processed. Furthermore, the image features of the image to be processed can be obtained based on the information of N image blocks of the image to be processed.

[0075] Then, a multi-head attention network is used to obtain the fused text features of the image to be processed based on the quality text features and content text features of the image to be processed, thereby enhancing the semantic expression capability. Next, a forgery adaptation network is used to obtain the enhanced image-text features of the image to be processed based on the fused text features and image features of the image to be processed, thereby improving the ability to capture artifact features.

[0076] Finally, a classification network, such as a fully connected layer, is used to calculate a first probability that the image being processed is a forged image and a second probability that the image being processed is a real image based on the enhanced graphic features of the image being processed. Based on the comparison of the first and second probabilities, a determination is made as to whether the image being processed is a forged image, thereby obtaining a detection result for the image being processed. If the first probability is greater than or equal to the second probability, the detection result is that the image being processed is a forged image; if the second probability is less than the first probability, the detection result is that the image being processed is not a forged image, i.e., the image being processed is a real image.

[0077] It can be understood that the embodiments of the present invention use quality evaluation text and content description text to help the model understand the semantic feature information of the image. Simultaneously, by fusing quality text features with content text features, the model's semantic expression capabilities are enhanced, and by generating enhanced image-text features, the model's ability to capture artifact features is improved. This improves the detection model's adaptability to unknown generated content, enabling the model to accurately distinguish between forged and authentic images, and enhancing the accuracy and efficiency of AIGC detection.

[0078] Optionally, for step S204, an embodiment of the present invention provides a possible implementation method.

[0079] Step S204 - 1 : Using a text encoder, respectively encode the quality evaluation text and the content description text of the image to be processed to obtain the quality text features and the content text features of the image to be processed.

[0080] Step S204 - 2 , using each visual encoder in turn to perform encoding operations on multiple image block information of the image to be processed to obtain image features of the image to be processed.

[0081] Among them, image features include global image features and multiple local image features; global image features represent the degree of correlation between the global information of the image and the local information of each image block; a local image feature represents the degree of correlation between the local information of an image block and the local information of other image blocks.

[0082] In this embodiment, the CLIP network includes a text encoder and multiple visual encoders, and the text encoder is used to process text information, and the visual encoder is used to process image information. For ease of understanding, the embodiment of the present invention provides an example diagram, please refer to Figure 2 The following will be combined Figure 2 Step S204 - 1 and step S204 - 2 are described.

[0083] First, the quality evaluation text, content description text and N image block information of the image to be processed are input into the image detection module. Then, the text encoder of the CLIP network in the image detection module is used to encode the quality evaluation text of the image to be processed, and the quality text feature of the image to be processed, i.e., f q ; And, using the text encoder, the content description text of the image to be processed is encoded, and the content text feature of the image to be processed is obtained, that is, f c .

[0084] Next, the N image blocks of the image to be processed are input into the first visual encoder of the CLIP network, and the first visual encoder is used to encode the N image blocks, and the intermediate image features output by the first visual encoder are obtained. Moreover, for other visual encoders except the first visual encoder, the intermediate image features output by the previous visual encoder are encoded by the other visual encoders, and the intermediate image features output by the other visual encoders are obtained. The intermediate image features output by the last visual encoder are used as the image features of the image to be processed, i.e., f x .

[0085] Each visual encoder in the CLIP network has the same structure, consisting of a first normalization layer, an attention layer, a second normalization layer, and an MLP (Multilayer Perceptron). The visual encoder encodes input data to produce output data by: using the first normalization layer to normalize the input data to produce first normalized data, then using the attention layer to aggregate the first normalized data to produce aggregated data; then using the second normalization layer to normalize the data fused with the input data and the aggregated data to produce second normalized data; then using the multilayer perceptron to transform the second normalized data to produce transformed data; and finally, using the fused aggregated and transformed data as the output data of the visual encoder.

[0086] Moreover, the image feature f x The dimension is N+1, which includes a global image feature, namely And N local image features, namely Moreover, the global image feature is represents the overall information of the image to be processed and the degree of correlation between this global information and the local information of N image blocks; a local image feature represents the local information of an image block in the image to be processed and the degree of correlation between this local information and the local information of the other N-1 image blocks. It can be understood that the image features obtained by the embodiments of the present invention not only contain local details but also reflect the global structure, thereby providing multi-level information support for subsequent feature fusion.

[0087] It can be understood that the CLIP network of the embodiment of the present invention ensures the effective extraction of text information and image information through the collaborative work of the text encoder and the visual encoder, laying a solid foundation for the feature fusion and enhancement of the subsequent multi-head attention network and forgery adaptation network.

[0088] Optionally, for step S206, an embodiment of the present invention provides a possible implementation method.

[0089] Step S206-1, using each attention layer, performs aggregation operation based on the query vector, key vector and numerical vector of the attention layer, as well as the quality text features and content text features of the image to be processed, to obtain the attention text features of the attention layer, and obtain the attention text features of each attention layer.

[0090] Step S206-2: Using the splicing layer, a splicing operation is performed based on the attention text features of all attention layers to obtain a spliced ​​text feature, and the spliced ​​text feature is multiplied by the fusion parameter to obtain a fused text feature of the image to be processed.

[0091] In this embodiment, the multi-head attention network includes multiple attention layers and a splicing layer, and each attention layer has a query vector, a key vector and a numerical vector, and the splicing layer has a fusion parameter.

[0092] For ease of understanding, let's continue with Figure 2 Step S206-1 and step S206-2 are explained. For example, assuming that the multi-head attention network includes z attention layers, and the query vector, key vector and value vector of the i-th attention layer in the z attention layers are represented as And the fusion parameter is expressed as W O .

[0093] First, use these z attention layers to analyze the quality text features of the processed image, namely f q and content text features, i.e., f c Perform aggregation operations to obtain the attention text features of each of the z attention layers. It is understandable that the processing method of each attention layer is similar. For the sake of brief description, the embodiment of the present invention takes the i-th attention layer as an example. According to the preset clustering formula, the query vector based on the i-th attention layer is The key vector is and a numerical vector, i.e. There is still a quality text feature of the image to be processed, namely f q Clustering operation is performed on the content text features to obtain the attention text features of the i-th attention layer, namely h i . The clustering formula is as follows:

[0094]

[0095] Among them, h i represents the attention text feature of the i-th attention layer, f q Represents the quality text feature of the image to be processed, f c Represents the content text features of the image to be processed, represents the query vector of the i-th attention layer, represents the key vector of the i-th attention layer, Represents the numerical vector of the i-th attention layer, d represents the dimension of the quality text feature, the dimension of the quality text feature is the same as that of the content text feature, and softmax() represents the normalization function.

[0096] Then, each attention layer is processed in a similar way as above, and z attention text features are obtained, namely h1~h z And input to the splicing layer. Then, the splicing layer is used to process the z attention text features h1~h zPerform splicing operation to obtain splicing text features. Then combine the splicing text features with the fusion parameter W O Multiply them together and we get the fused text feature of the image to be processed, i.e., t x . This process can be expressed as: t x =Concat(h1,h2,…h i ,…,h z )*W O ; where t x Represents the fused text features of the image to be processed, h i represents the attention text feature of the i-th attention layer, W O Represents the fusion parameters, and Concat() represents the splicing operation.

[0097] It can be understood that the multi-head attention network of this embodiment of the present invention effectively integrates the quality text features and content text features of the processed image through the collaborative work of multiple attention layers and splicing layers. This process not only retains the key information of the input features but also enhances the model's ability to focus on important features through the attention mechanism, laying the foundation for feature enhancement in the subsequent forged adaptation network.

[0098] Optionally, for step S208, an embodiment of the present invention provides a possible implementation method.

[0099] Step S208-1, using the connection layer, performs fusion operations and extraction operations based on the fused text features and global image features of the image to be processed to obtain fused image-text features, and performs splicing operations based on the fused image-text features and multiple local image features to obtain initial image-text features of the image to be processed.

[0100] Step S208 - 2 : using the transformation layer, performing a transformation operation based on the initial graphic features of the image to be processed to obtain the transformed graphic features of the image to be processed.

[0101] Step S208 - 3 : utilizing the interactive layer to perform an enhancement operation based on the transformed graphic features of the image to be processed, thereby obtaining enhanced graphic features of the image to be processed.

[0102] In this embodiment, the forged adaptation network includes a connection layer, a transformation layer, and an interaction layer. Figure 2 Steps S208-1 to S208-3 are described.

[0103] First, using the connection layer, the fused text features of the image to be processed, namely t x And the global image feature is Perform fusion operation to obtain fusion features. And use the fast forward network block in the connection layer to extract the fusion features to enrich the representation of features, and then obtain the fusion image and text features, that is, Moreover, the fast forward network includes a normalization layer, a linear layer, an activation layer and a dropout layer in sequence.

[0104] Then, using the connection layer, based on the fusion of image and text features, And N local image features, namely Perform the splicing operation to obtain the initial graphic feature of the image to be processed, i.e. f′ x , this process can be expressed as: Among them, f′ x Represents the initial graphic features of the image to be processed, Indicates the fusion of graphic and text features, Represents N local image features of the image to be processed, and Concat() represents the splicing operation.

[0105] Then, using the transformation layer, based on the initial graphic features of the image to be processed, that is, f′ x Perform the transformation operation, and then obtain the transformed graphic features of the image to be processed, that is, Finally, using the interactive layer, the transformed graphic features of the image to be processed are Performing the enhancement operation yields the enhanced image features f of the image to be processed. This enhanced image features f are then fed into the classification network of the image detection module. This classification network then determines whether the image to be processed is forged based on the enhanced image features f, thereby obtaining a detection result for the image to be processed.

[0106] It can be understood that the forgery adaptation network of the embodiment of the present invention combines the fused text features with the visual features, namely the image features, through the step-by-step processing of the connection layer, the transformation layer and the interaction layer, thereby enhancing the model's ability to recognize visual forgery features and improving the model's generalization ability in the face of unknown AIGC images, laying a solid foundation for the subsequent accurate detection of image categories.

[0107] Optionally, for step S208-2, an embodiment of the present invention provides a possible implementation method.

[0108] Step S208-2-1: Using the transformation layer, a dimensionality reduction operation is performed based on the initial graphic features of the image to be processed to obtain a first graphic feature.

[0109] Step S208-2-2: Using the transformation layer, perform Fourier transform and inverse Fourier transform operations based on the first image and text features to obtain second image and text features.

[0110] Step S208-2-3: Using the transformation layer, perform a dimensionality recovery operation based on the second graphic feature to obtain the transformed graphic feature of the image to be processed.

[0111] For ease of understanding, the present invention provides an example diagram of the structure of the transformation layer. Figure 3 The following will be combined Figure 3 Steps S208-2-1 to S208-2-3 are explained.

[0112] For example, the transformation layer includes the first network block, the second network block, and the upsampling convolution layer in sequence. The first network block includes the downsampling convolution layer, the activation layer, and the dropout layer, and the second network block includes the Fourier transform layer, the convolution layer, the batch normalization layer, the activation layer, and the inverse Fourier transform layer.

[0113] First, using the first network block of the transformation layer, based on the initial graphic features of the image to be processed, that is, f′ x Perform dimensionality reduction operation. That is, use the downsampling convolution layer to process the initial image and text features of the image to be processed, i.e. f′ x Perform downsampling operation to convert the initial image and text features, i.e., f′ x The dimension of the image is halved to obtain the downsampled image feature; and the activation layer is used to activate the downsampled image feature to obtain the activated image feature; and the discard layer is used to discard the activated image feature to obtain the first image feature, that is,

[0114] This process can be expressed as: in, represents the first image-text feature, f′ x Represents the initial graphic features of the image to be processed, Conv1() represents the downsampling operation, ReLU() represents the activation operation, and Dropout() represents the discarding operation.

[0115] Then, the second network block of the transformation layer is used to Perform Fourier transform and inverse Fourier transform operations. That is, using the Fourier transform layer, the first image feature, i.e. Perform Fourier transform operation to obtain transformation features; and use the convolution layer to perform convolution operation on the transformation features to obtain convolution features; and use the batch normalization layer to perform batch normalization operation on the convolution features to obtain standardized features; and use the activation layer to perform activation operation on the standardized features to obtain activation features; then use the inverse Fourier transform layer to perform the inverse Fourier transform operation on the activation features to obtain the second image-text feature, i.e.

[0116] This process can be expressed as: in, Indicates a second graphic feature; Represents the first image-text feature; FFT() represents the Fourier transform operation; Conv() represents the convolution operation; BN() represents the batch normalization operation; ReLU() represents the activation operation; IFFT() represents the inverse Fourier transform operation.

[0117] Finally, the upsampling convolution layer of the transformation layer is used to perform an upsampling operation based on the second image feature to restore the dimension of the second image feature to the dimension of the initial image feature, and the transformed image feature of the image to be processed is obtained, that is, This process can be expressed as: in, Represents the transformed graphic features of the image to be processed; Represents the second image and text feature; Conv2() represents the upsampling operation.

[0118] It can be understood that the transformation layer in this embodiment of the present invention converts image features into frequency features through dimensionality reduction and Fourier transform, restores the frequency features to the spatial domain through inverse Fourier transform, and obtains high-frequency detail information through upsampling. In other words, by effectively combining the spatial and frequency domains, the model's ability to capture image artifacts and distortion patterns is improved, thereby enhancing the model's discriminative capabilities.

[0119] Optionally, for step S208-3, an embodiment of the present invention provides a possible implementation method.

[0120] Step S208-3-1: Using the interactive layer, perform a wavelet transform operation on the transformed graphic features of the image to be processed to obtain multi-band features.

[0121] Step S208-3-2: Utilize the interactive layer to obtain high-frequency band features from the multi-band features and perform enhancement operations and inverse wavelet transform operations to obtain high-frequency graphic features.

[0122] Step S208-3-3: using the interactive layer, a fusion operation is performed based on the high-frequency image and text features and the transformed image and text features to obtain enhanced image and text features of the image to be processed.

[0123] For ease of understanding, the present invention provides an example diagram of the structure of the interaction layer. Figure 4 The following will be combined Figure 4 Steps S208-3-1 to S208-3-3 are explained.

[0124] For example, the interaction layer includes a wavelet transform layer, two attention blocks, a linear block, a normalization layer, an inverse wavelet transform layer, and a fusion layer. The attention block includes an attention layer, a dropout layer, and a standard deviation layer. The linear block includes a first network layer consisting of a linear layer, an activation layer, and a dropout layer, and a second network layer consisting of a linear layer and a dropout layer.

[0125] First, the wavelet transform layer of the interactive layer is used to transform the image features to be processed, that is, Perform wavelet transform operation to obtain multi-band features. Among them, multi-band features include low-frequency band features, namely And high-frequency band features, and the high-frequency band features include three high-frequency sub-band features, namely the first high-frequency sub-band feature The second high frequency sub-band feature is The third high frequency sub-band feature is And the first high frequency sub-band feature is Represents the transformed graphic features, i.e. The longitudinal edge feature of the second high-frequency sub-band feature is Represents the transformed graphic features, i.e. The horizontal edge feature of the third high-frequency sub-band is Represents the transformed graphic features, i.e. diagonal features.

[0126] Then, the two attention blocks, linear blocks, and normalization layers of the interaction layer are used to analyze the three high-frequency sub-band features, namely Perform enhancement operation to obtain high-frequency enhancement features; and use the wavelet inverse transform layer of the interactive layer to perform wavelet inverse transform operation on the high-frequency enhancement features, and then obtain high-frequency graphic features, namely

[0127] Finally, the fusion layer of the interaction layer is used to and transforming graphic features, i.e. Perform fusion operation. That is, use the fusion layer to combine the preset adjustment parameter α with the high-frequency image and text features, i.e. The result after multiplication is the same as the transformed image and text features. By adding them together, we can get the enhanced graphic features of the image to be processed, that is, f. This process can be expressed as: Where f represents the enhanced graphic features of the image to be processed; represents the transformed image and text features; α represents the adjustment parameter; Represents high-frequency image and text features.

[0128] It can be understood that the interaction layer of the embodiment of the present invention combines high-frequency information through wavelet transform, high-frequency enhancement, inverse wavelet transform and fusion operations to enhance the model's sensitivity to artifact features and improve the model's discrimination ability.

[0129] Optionally, for the above-mentioned image detection model, the present invention also provides an implementation method for training the image detection model, please refer to Figure 5 .

[0130] Step S212: obtaining, based on the multiple image samples and their labels, a quality evaluation text and a content description text of each image sample, as well as multiple image block information of each image sample.

[0131] In this embodiment, multiple original images can be acquired and preprocessed on each original image. For example, each original image is sequentially subjected to operations such as resizing, data augmentation, normalization, and regularization to obtain an image sample. The image sample size is a preset size, such as 224*224. Data augmentation refers to randomly adjusting the brightness, saturation, and chroma of the original image. It should be understood that the size of the image sample can be set according to actual conditions and is not limited by the present invention.

[0132] Then, the image quality evaluation model is used to evaluate the quality of each image sample to obtain the quality evaluation text of each image sample, and the image content generation model is used to extract the content of each image sample to obtain the initial content description text of each image sample.

[0133] Next, based on the label and initial content description text of each image sample, a content description text is generated for each image sample. For example, if the initial content description text of an image sample is "an image of a dog", if the label of the image sample is real, then the content description text of the image sample will be "a real image of a dog"; if the label of the image sample is fake, then the content description text of the image sample will be "a fake image of a dog".

[0134] It should be noted that during model training, the image description is generated based on the image label and the initial content description output by the image content generation model. During model usage, the image description output by the image content generation model is directly used as the image description.

[0135] At the same time, each image sample is divided into N image blocks according to a preset block parameter N, and a linear mapping operation is performed on all image blocks in each image sample, thereby obtaining N image block information of each image sample.

[0136] Step S214, using the CLIP network of the image detection model to be trained, obtains the quality text features and content text features of the image sample based on the quality evaluation text and content description text of the image sample, and obtains the image features of the image sample based on multiple image block information of the image sample.

[0137] Step S216, using the multi-head attention network of the image detection model to be trained, obtains the fused text features of the image sample based on the quality text features and content text features of the image sample.

[0138] Step S218 , using the forgery adaptation network of the image detection model to be trained, and obtaining enhanced image-text features of the image sample according to the fused text features and image features of the image sample.

[0139] In step S220 , a classification network of the image detection model to be trained is used to obtain a detection result indicating whether the image sample is a forged image based on the enhanced graphic and text features of the image sample.

[0140] In this embodiment, the structure of the image detection model to be trained is identical to that of the image detection model, differing only in their network parameters. Specifically, the image detection model to be trained sequentially includes a CLIP network, a multi-head attention network, a forgery adaptation network, and a classification network. For each image sample, the CLIP network can first be used to obtain the image sample's quality text features and content text features based on the image sample's quality evaluation text and content description text. Furthermore, the image features of the image sample can be obtained based on the information of the image sample's N image blocks.

[0141] Then, a multi-head attention network is used to obtain the fused text features of the image sample based on its quality text features and content text features. Next, a forgery adaptation network is used to obtain the enhanced image-text features of the image sample based on its fused text features and image features. Finally, a classification network is used to determine whether the image sample is forged based on its enhanced image-text features, thereby obtaining the detection result of the image sample.

[0142] Step S222: training the image detection model to be trained according to the label and detection result of each image sample to obtain an image detection model.

[0143] In this embodiment, each image sample is processed in a similar manner to obtain a detection result for each image sample. A cross-loss value is then calculated based on the label and detection result of each image sample using a preset cross-loss function. Furthermore, a contrastive loss value is calculated based on the fused text features and image features of each image sample using a preset contrastive loss function.

[0144] Next, the result of multiplying the preset hyperparameters by the contrast loss value is added to the cross loss value to get the total loss value. This process can be expressed as: in, represents the total loss value, represents the cross loss value, λ represents the hyperparameter, Represents the contrast loss value.

[0145] Finally, the backpropagation algorithm is used to guide the training of the image detection model to be trained based on the total loss value, thereby updating the network parameters in the model to obtain the image detection model. It should be noted that during the model training process, since the CLIP network uses a pre-trained network, its parameters are frozen, that is, the CLIP network parameters are not updated. However, since the multi-head attention network, forgery adaptation network, and classification network are untrained, the parameters of these networks are updated.

[0146] In order to execute the corresponding steps in the above embodiments and various possible methods, an implementation method of an image detection device is given below. Figure 6 , is a functional module diagram of an image detection device provided in an embodiment of the present invention. It should be noted that the basic principles and technical effects of the image detection device 300 provided in this embodiment are the same as those of the above-mentioned embodiment. For the sake of simplicity, any matters not mentioned in this embodiment can be referred to the corresponding contents in the above-mentioned embodiment. The image detection device 300 includes:

[0147] The pre-processing module 310 is used to determine the quality evaluation text and content description text of the image to be processed, as well as information of multiple image blocks of the image to be processed.

[0148] The detection module 330 is used to use the CLIP network of the image detection model to obtain the quality text features and content text features of the image to be processed based on the quality evaluation text and content description text of the image to be processed, and obtain the image features of the image to be processed based on multiple image block information of the image to be processed; use the multi-head attention network of the image detection model to obtain the fused text features of the image to be processed based on the quality text features and content text features of the image to be processed; use the forgery adaptation network of the image detection model to obtain the enhanced image-text features of the image to be processed based on the fused text features and image features of the image to be processed; use the classification network of the image detection model to obtain a detection result indicating whether the image to be processed is a forged image based on the enhanced image-text features of the image to be processed.

[0149] Optionally, the detection module 330 is also used to: use a text encoder to encode the quality evaluation text and content description text of the image to be processed, respectively, to obtain quality text features and content text features of the image to be processed; use each visual encoder in turn to encode multiple image block information of the image to be processed, to obtain image features of the image to be processed; wherein, the image features include global image features and multiple local image features; the global image features represent the degree of correlation between the global information of the image and the local information of each image block; a local image feature represents the degree of correlation between the local information of an image block and the local information of other image blocks.

[0150] Optionally, the detection module 330 is also used to: utilize each attention layer to perform an aggregation operation based on the query vector, key vector and numerical vector of the attention layer, as well as the quality text features and content text features of the image to be processed, to obtain the attention text features of the attention layer, and to obtain the attention text features of each attention layer; utilize the splicing layer to perform a splicing operation based on the attention text features of all attention layers to obtain the spliced ​​text features, and multiply the spliced ​​text features by the fusion parameter to obtain the fused text features of the image to be processed.

[0151] Optionally, the detection module 330 is also used to: use the connection layer to perform fusion operations and extraction operations based on the fused text features and global image features of the image to be processed to obtain fused image-text features, and perform splicing operations based on the fused image-text features and multiple local image features to obtain initial image-text features of the image to be processed; use the transformation layer to perform transformation operations based on the initial image-text features of the image to be processed to obtain transformed image-text features of the image to be processed; use the interaction layer to perform enhancement operations based on the transformed image-text features of the image to be processed to obtain enhanced image-text features of the image to be processed.

[0152] Optionally, the detection module 330 is also used to: use the transformation layer to perform a dimensionality reduction operation based on the initial graphic features of the image to be processed to obtain a first graphic feature; use the transformation layer to perform a Fourier transform operation and an inverse Fourier transform operation based on the first graphic feature to obtain a second graphic feature; use the transformation layer to perform a dimensionality recovery operation based on the second graphic feature to obtain a transformed graphic feature of the image to be processed.

[0153] Optionally, the detection module 330 is also used to: utilize the interactive layer to perform a wavelet transform operation on the transformed graphic features of the image to be processed to obtain multi-band features; utilize the interactive layer to obtain high-frequency band features from the multi-band features and perform enhancement operations and wavelet inverse transform operations to obtain high-frequency graphic features; utilize the interactive layer to perform a fusion operation based on the high-frequency graphic features and the transformed graphic features to obtain enhanced graphic features of the image to be processed.

[0154] Optionally, the image detection model is obtained in the following manner: based on multiple image samples and their labels, the quality evaluation text and content description text of each image sample, as well as multiple image block information of each image sample are obtained; using the CLIP network of the image detection model to be trained, the quality text features and content text features of the image sample are obtained based on the quality evaluation text and content description text of the image sample, and the image features of the image sample are obtained based on the multiple image block information of the image sample; using the multi-head attention network of the image detection model to be trained, the fused text features of the image sample are obtained based on the quality text features and content text features of the image sample; using the forgery adaptation network of the image detection model to be trained, the enhanced image-text features of the image sample are obtained based on the fused text features and image features of the image sample; using the classification network of the image detection model to be trained, the enhanced image-text features of the image sample are obtained based on the enhanced image-text features of the image sample; based on the label and detection result of each image sample, the image detection model to be trained is trained to obtain the image detection model.

[0155] See also Figure 7 is a block diagram of an electronic device provided by an embodiment of the present invention. The electronic device 100 includes a processor 110, a memory 120, and a communication module 130. Each of these components is electrically connected to one another, directly or indirectly, to enable data transmission or interaction. For example, these components may be electrically connected to one another via one or more communication buses or signal lines.

[0156] The processor 110 is used to read / write data or programs stored in the memory 120 and execute corresponding functions. It can be a general-purpose processor, including a CPU (Central Processing Unit), an NP (Network Processor), etc.; it can also be a DSP digital signal processor, an ASIC application-specific integrated circuit, an FPGA off-the-shelf programmable gate array or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0157] The memory 120 is used to store programs or data. The memory 120 can be RAM (Random Access Memory), ROM (Read Only Memory), PROM (Programmable Read-Only Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electric Erasable Programmable Read-Only Memory), etc.

[0158] The communication module 130 is used to communicate signaling or data with other devices.

[0159] It is understandable that Figure 7 The structure shown is only a schematic diagram of the structure of the electronic device 100. The electronic device 100 may also include Figure 7 More or fewer components than shown, or with Figure 7 Different configurations shown. Figure 7 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0160] The memory in the electronic device provided by the embodiment of the present invention stores a computer program, and when the processor executes the computer program, the image detection method disclosed in the embodiment of the present invention is implemented.

[0161] An embodiment of the present invention further provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the image detection method disclosed in the embodiment of the present invention is implemented.

[0162] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a portion of code, and the module, program segment or a portion of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or can be implemented using a combination of dedicated hardware and computer instructions.

[0163] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0164] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0165] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.

Claims

1. An image detection method, characterized in that: The method comprises: Determining a quality evaluation text and a content description text of an image to be processed, as well as information of multiple image blocks of the image to be processed; Using the CLIP network of the image detection model, obtaining quality text features and content text features of the image to be processed based on the quality evaluation text and content description text of the image to be processed, and obtaining image features of the image to be processed based on multiple image block information of the image to be processed; Using a multi-head attention network of an image detection model, obtaining a fused text feature of the image to be processed according to the quality text feature and the content text feature of the image to be processed; Obtaining enhanced text-image features of the image to be processed based on the fused text features and image features of the image to be processed using a forged adaptation network of an image detection model; A classification network of an image detection model is used to obtain a detection result indicating whether the image to be processed is a forged image according to the enhanced graphic and text features of the image to be processed.

2. The image detection method according to claim 1, wherein: The CLIP network includes a text encoder and multiple visual encoders; The method comprises: utilizing a CLIP network of an image detection model to obtain, based on the quality evaluation text and content description text of the image to be processed, quality text features and content text features of the image to be processed, and obtaining, based on information of multiple image blocks of the image to be processed, image features of the image to be processed, including: Using the text encoder, respectively encoding the quality evaluation text and the content description text of the image to be processed to obtain the quality text features and the content text features of the image to be processed; Using each visual encoder in turn, encoding multiple image block information of the image to be processed to obtain image features of the image to be processed; Among them, the image features include global image features and multiple local image features; the global image features represent the degree of correlation between the global information of the image and the local information of each image block; and a local image feature represents the degree of correlation between the local information of an image block and the local information of other image blocks.

3. The image detection method according to claim 1, wherein: The multi-head attention network includes multiple attention layers and splicing layers, each attention layer has a query vector, a key vector and a numerical vector, and the splicing layer has a fusion parameter; Using the multi-head attention network of the image detection model, the fused text features of the image to be processed are obtained according to the quality text features and content text features of the image to be processed, including: Using each attention layer, performing an aggregation operation based on the query vector, key vector, and value vector of the attention layer, as well as the quality text features and content text features of the image to be processed, to obtain the attention text features of the attention layer, thereby obtaining the attention text features of each attention layer; The splicing layer is used to perform a splicing operation based on the attention text features of all attention layers to obtain a spliced ​​text feature, and the spliced ​​text feature is multiplied by the fusion parameter to obtain a fused text feature of the image to be processed.

4. The image detection method according to claim 1, wherein: The forged adaptation network includes a connection layer, a transformation layer and an interaction layer; the image features include global image features and multiple local image features; Obtaining enhanced text-image features of the image to be processed based on the fused text features and image features of the image to be processed using a forgery adaptation network of the image detection model, including: Using the connection layer, a fusion operation and an extraction operation are performed based on the fused text feature of the image to be processed and the global image feature to obtain a fused image-text feature, and a splicing operation is performed based on the fused image-text feature and the multiple local image features to obtain an initial image-text feature of the image to be processed; Using the transformation layer, a transformation operation is performed based on the initial graphic features of the image to be processed to obtain transformed graphic features of the image to be processed; The interactive layer is used to perform an enhancement operation based on the transformed graphic and text features of the image to be processed, thereby obtaining the enhanced graphic and text features of the image to be processed.

5. The image detection method according to claim 4, characterized in that: Using the transformation layer, a transformation operation is performed based on the initial graphic features of the image to be processed to obtain the transformed graphic features of the image to be processed, including: Using the transformation layer, a dimensionality reduction operation is performed based on the initial graphic and text features of the image to be processed to obtain a first graphic and text feature; Using the transformation layer, performing a Fourier transform operation and an inverse Fourier transform operation based on the first image-text feature to obtain a second image-text feature; The transformation layer is used to perform a dimensionality restoration operation based on the second graphic features to obtain the transformed graphic features of the image to be processed.

6. The image detection method according to claim 4, characterized in that: Utilizing the interactive layer, performing an enhancement operation based on the transformed graphic features of the image to be processed to obtain the enhanced graphic features of the image to be processed, including: Using the interactive layer, performing a wavelet transform operation on the transformed graphic features of the image to be processed to obtain multi-band features; Utilizing the interaction layer, obtaining high-frequency band features from the multi-band features and performing enhancement operations and inverse wavelet transform operations to obtain high-frequency graphic features; The interactive layer is utilized to perform a fusion operation based on high-frequency graphic features and transformed graphic features to obtain enhanced graphic features of the image to be processed.

7. The image detection method according to claim 1, wherein: The image detection model is obtained in the following way: According to the multiple image samples and their labels, a quality evaluation text and a content description text of each image sample and multiple image block information of each image sample are obtained; Using the CLIP network of the image detection model to be trained, obtaining quality text features and content text features of the image sample based on the quality evaluation text and content description text of the image sample, and obtaining image features of the image sample based on multiple image block information of the image sample; Using a multi-head attention network of the image detection model to be trained, obtaining a fused text feature of the image sample according to the quality text feature and the content text feature of the image sample; Obtaining enhanced text-image features of the image sample based on the fused text features and image features of the image sample using a forgery adaptation network of the image detection model to be trained; Using a classification network of the image detection model to be trained, and based on the enhanced graphic and text features of the image sample, obtaining a detection result indicating whether the image sample is a forged image; The image detection model to be trained is trained according to the label and detection result of each image sample to obtain the image detection model.

8. An image detection device, characterized in that: The device comprises: A pre-processing module, configured to determine a quality evaluation text and a content description text of an image to be processed, as well as information of a plurality of image blocks of the image to be processed; a detection module, configured to utilize a CLIP network of an image detection model to obtain, based on the quality evaluation text and content description text of the image to be processed, quality text features and content text features of the image to be processed, and to obtain, based on information of multiple image blocks of the image to be processed, image features of the image to be processed; Using a multi-head attention network of an image detection model, obtaining a fused text feature of the image to be processed according to the quality text feature and the content text feature of the image to be processed; Obtaining enhanced text-image features of the image to be processed based on the fused text features and image features of the image to be processed using a forged adaptation network of an image detection model; A classification network of an image detection model is used to obtain a detection result indicating whether the image to be processed is a forged image according to the enhanced graphic and text features of the image to be processed.

9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program, and when the processor executes the computer program, the image detection method according to any one of claims 1 to 7 is implemented.

10. A storage medium, characterized in that: The storage medium stores a computer program, which, when executed by a processor, implements the image detection method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Image text feature alignment fusion information extraction method, device and program product

    CN119250189A

  • Cross-modal fusion-guided CLIP domain generalization face anti-counterfeiting method

    CN119339447A

  • Multi-modal image-text tampering detection and positioning method based on feature enhancement

    CN119513743A

  • Privacy image detection method based on multi-scale features and cross-modal residual attention

    CN119625424A

  • Method for an explainable autoencoder and an explainable generative adversarial network

    US20220172050A1