Robust detection method and system for generated images based on multi-dimensional real feature distribution

CN123015470APending Publication Date: 2026-10-30BEIJING SHUMEI SHIDAI TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611210599.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-11
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

一类方法依托卷积神经网络学习特定生成模型留下的固有伪影,例如棋盘格效应和高频异常,对未见过的新型生成模型适应性较差

Benefits of technology

本发明的方法通过自适应掩蔽谱重建网络从对数幅度谱中提取频谱特征向量,利用可学习的残差卷积滤波器提取本征噪声模式得到噪声特征向量,并基于多尺度局部二值模式熵值分布获取纹理特征向量,再经跨模态注意力融合网络将上述多维特征统一为融合特征向量,进而以支持向量数据描述算法构建超球体来界定真实图像特征分布边界,通过计算待检测图像融合特征向量到球心的马氏距离得到真实性偏离分数,结合动态阈值完成判别,解决了现有方法依赖特定生成模型伪影导致对新型生成模型适应性不足,以及通用统计特征在面对后处理或压缩图像时稳定性差、可靠性受限的问题,提高了生成图像检测的泛化能力与鲁棒性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123015470A_ABST
    Figure CN123015470A_ABST
Patent Text Reader

Abstract

The application discloses a kind of generation image robust detection method and system based on multidimensional real feature distribution, frequency spectrum feature vector is extracted from logarithmic amplitude spectrum by adaptive masking spectrum reconstruction network, intrinsic noise mode is extracted using learnable residual convolution filter to obtain noise feature vector, and texture feature vector is obtained based on multi-scale local binary pattern entropy distribution, and the above multidimensional features are unified into fusion feature vector by cross-modal attention fusion network, to support vector data description algorithm to construct hypersphere to define the real image feature distribution boundary, the Mahalanobis distance of the fusion feature vector of the image to be detected to the center of sphere is calculated to obtain authenticity deviation score, combined with dynamic threshold to complete discrimination, solve the problem that new generation model is not adapted to specific generation model artifacts, and general statistical characteristics are poor in stability and reliability when facing post-processing or compressed image, improve the generalization ability and robustness of generation image detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer vision and artificial intelligence security technology, and in particular to a robust detection method and system for generated images based on multidimensional real feature distribution. Background Technology

[0002] With the rapid development of deep generation technologies such as diffusion models, AI-generated images have achieved highly realistic visual effects. However, these technologies have also been abused in scenarios such as fake news, deepfake face swapping, and alteration of classic cultural works, posing a serious threat to cultural security, social stability, and individual rights. Efficiently and accurately identifying whether an image is generated by AI has become an urgent need for content security governance.

[0003] Existing detection methods can be mainly divided into two categories. One type of method relies on convolutional neural networks to learn the inherent artifacts left by specific generative models, such as checkerboard effects and high-frequency anomalies, but it has poor adaptability to novel generative models that have not been seen before. The other type of method extracts general statistical features of images in the frequency or spatial domains for discrimination, but when faced with post-processed or compressed images, the feature stability is insufficient, and the detection reliability is limited.

[0004] Therefore, there is an urgent need to provide a technical solution to address the above problems. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention provides a robust detection method and system for generated images based on multidimensional real feature distribution.

[0006] Firstly, the present invention provides a robust detection method for generated images based on multidimensional real feature distribution, the technical solution of which is as follows: The original logarithmic amplitude spectrum of the image to be detected is extracted. After randomly masking the frequency bands in the original logarithmic amplitude spectrum, it is input into an adaptive masked spectrum reconstruction network for spectrum reconstruction. The error between the reconstructed spectrum and the original logarithmic amplitude spectrum is calculated to obtain the spectrum feature vector. The intrinsic noise pattern of the image to be detected is extracted by a learnable residual convolutional filter, the intrinsic noise pattern is used as a noise feature vector, and the entropy distribution of the local binary pattern feature map of the image to be detected at different scales is statistically analyzed to obtain the texture feature vector. The spectral feature vector, the noise feature vector, and the texture feature vector are input into a cross-modal attention fusion network, which outputs a unified fused feature vector. The center and radius of a pre-constructed hypersphere are obtained, and a dynamic threshold is set based on the radius. The hypersphere is constructed by a support vector data description algorithm from the fused feature vectors of a large number of real images. The center and radius are used to define the feature distribution boundary of the real images. Calculate the Mahalanobis distance from the fused feature vector to the center of the sphere, and use the Mahalanobis distance as the authenticity deviation score; When the authenticity deviation score is greater than the dynamic threshold, the image to be detected is determined to be an AI-generated image; otherwise, it is determined to be a real image.

[0007] The beneficial effects of the robust image detection method based on multidimensional real feature distribution of the present invention are as follows: The method of this invention extracts spectral feature vectors from the logarithmic amplitude spectrum through an adaptive masking spectral reconstruction network, extracts intrinsic noise patterns using a learnable residual convolutional filter to obtain noise feature vectors, and obtains texture feature vectors based on the multi-scale local binary mode entropy distribution. Then, the above multi-dimensional features are unified into a fused feature vector through a cross-modal attention fusion network. Subsequently, a hypersphere is constructed using a support vector data description algorithm to define the boundary of the real image feature distribution. The authenticity deviation score is obtained by calculating the Mahalanobis distance from the fused feature vector of the image to be detected to the center of the sphere. The discrimination is completed by combining dynamic thresholds. This method solves the problems of existing methods relying on artifacts of specific generation models, resulting in insufficient adaptability to new generation models, and the poor stability and limited reliability of general statistical features when facing post-processed or compressed images. It improves the generalization ability and robustness of generated image detection.

[0008] Based on the above scheme, the robust detection method for generated images based on multidimensional real feature distribution of the present invention can be further improved as follows.

[0009] In one alternative approach, when randomly masking frequency bands in the original logarithmic amplitude spectrum, the masked frequency bands are at least one of the low-frequency region, the mid-frequency region, and the high-frequency region.

[0010] The beneficial effects of adopting the above-mentioned optional approach are: further extending the masking range to at least one of the low-frequency, mid-frequency and high-frequency regions, enabling the adaptive masking spectrum reconstruction network to cover more complete frequency band information during the spectrum reconstruction process, and enhancing the ability of the spectrum feature vector to capture the frequency domain differences left by different generation models.

[0011] In one optional approach, the step of statistically analyzing the entropy distribution of the local binary pattern feature map of the image to be detected at different scales to obtain the texture feature vector includes: Calculate the local binary pattern feature map of the image to be detected; The entropy distribution of the local binary pattern feature map is statistically analyzed at multiple different scales, and the entropy distributions at multiple different scales are combined into the texture feature vector.

[0012] The beneficial effects of adopting the above optional method are as follows: further, the entropy distribution of local binary pattern feature maps is statistically analyzed at multiple scales and combined into texture feature vectors, so that texture features can characterize image texture at multiple levels from detailed structure to overall layout, thereby improving the ability to identify unnatural texture patterns in generated images.

[0013] In one alternative approach, the cross-modal attention fusion network performs weighted fusion of the spectral feature vector, the noise feature vector, and the texture feature vector using adaptively assigned weights to obtain the fused feature vector, wherein the weights are automatically determined by the cross-modal attention fusion network based on the input distribution of each feature vector.

[0014] The beneficial effects of adopting the above optional approach are as follows: the cross-modal attention fusion network automatically determines the weights based on the input distribution of the three types of feature vectors: spectrum, noise, and texture, and generates a fusion feature vector through adaptive weighted fusion, so that different modal features dynamically participate in the fusion process according to their respective information content.

[0015] In one alternative approach, the step of constructing the hypersphere includes: Extract the corresponding spectral feature vector, noise feature vector, and texture feature vector from multiple real images respectively; The spectral feature vector, noise feature vector, and texture feature vector corresponding to each real image are input into the cross-modal attention fusion network to obtain the fusion feature vector of each real image. The center and radius of the hypersphere are obtained by fitting the fused feature vectors of all real images using a support vector data description algorithm.

[0016] The advantages of adopting the above optional method are as follows: further extract the spectrum, noise and texture feature vectors from multiple real images and obtain the fused feature vector through a cross-modal attention fusion network. Then, use the support vector data description algorithm to fit the center and radius of the hypersphere, so that the boundary of the hypersphere is established on the basis of the multi-dimensional feature distribution of the real image.

[0017] In one alternative approach, the support vector data description algorithm uses a Gaussian radial basis function as the kernel function, and the kernel width of the Gaussian radial basis function is determined by cross-validation.

[0018] The advantages of adopting the above optional approach are as follows: further using the Gaussian radial basis function as the kernel function of the support vector data description algorithm, and determining the kernel width through cross-validation, so that the distribution pattern after the feature is mapped to the high-dimensional space can be reasonably characterized, and the hypersphere boundary can be more closely matched with the feature aggregation range of the real image.

[0019] In one alternative approach, prior to the step of obtaining the center and radius of the pre-constructed hypersphere, the following is also included: Collect a dataset of real images, and extract a fusion feature vector after applying image perturbation to each real image in the dataset; wherein, the image perturbation includes at least one of JPEG compression, Gaussian blur and image cropping; Constrain the consistency between the fused feature vectors corresponding to different perturbation versions of the same real image.

[0020] The beneficial effects of adopting the above optional methods are as follows: during the training phase, at least one of the following perturbations is applied to the images in the real image dataset: JPEG compression, Gaussian blur, or image cropping. The consistency between the fused feature vectors corresponding to different perturbation versions of the same image is constrained, so that the model can still maintain discrimination stability when facing post-processed images.

[0021] Secondly, the present invention provides a robust detection system for generated images based on multidimensional real feature distribution, the technical solution of which is as follows: The processing module is used to extract the original logarithmic amplitude spectrum of the image to be detected, randomly mask the frequency bands in the original logarithmic amplitude spectrum, input it into an adaptive masked spectrum reconstruction network for spectrum reconstruction, calculate the error between the reconstructed spectrum and the original logarithmic amplitude spectrum, and obtain the spectrum feature vector. The extraction module is used to extract the intrinsic noise pattern of the image to be detected through a learnable residual convolutional filter, use the intrinsic noise pattern as a noise feature vector, and statistically analyze the entropy distribution of the local binary pattern feature map of the image to be detected at different scales to obtain the texture feature vector. The fusion module is used to input the spectral feature vector, the noise feature vector, and the texture feature vector into the cross-modal attention fusion network and output a unified fused feature vector. A setting module is used to obtain the center and radius of a pre-constructed hypersphere and set a dynamic threshold based on the radius. The hypersphere is constructed by a support vector data description algorithm using the fused feature vectors of a large number of real images. The center and radius are used to define the feature distribution boundary of the real images. The calculation module is used to calculate the Mahalanobis distance from the fused feature vector to the center of the sphere, and to use the Mahalanobis distance as the authenticity deviation score. The determination module is used to determine that the image to be detected is an AI-generated image when the authenticity deviation score is greater than the dynamic threshold, and otherwise determine that it is a real image.

[0022] The beneficial effects of the robust image detection system based on multidimensional real feature distribution of the present invention are as follows: The system of this invention extracts spectral feature vectors from the logarithmic amplitude spectrum through an adaptive masking spectral reconstruction network, extracts intrinsic noise patterns using a learnable residual convolutional filter to obtain noise feature vectors, and obtains texture feature vectors based on the multi-scale local binary mode entropy distribution. Then, the above multi-dimensional features are unified into a fused feature vector through a cross-modal attention fusion network. Subsequently, a hypersphere is constructed using a support vector data description algorithm to define the boundary of the real image feature distribution. The authenticity deviation score is obtained by calculating the Mahalanobis distance from the fused feature vector of the image to be detected to the center of the sphere. The discrimination is completed by combining dynamic thresholds. This solves the problems of existing methods relying on specific generation model artifacts, resulting in insufficient adaptability to new generation models, and the poor stability and limited reliability of general statistical features when facing post-processed or compressed images. It improves the generalization ability and robustness of generated image detection.

[0023] Thirdly, the technical solution of an electronic device according to the present invention is as follows: It includes a memory, a processor, and a program stored in the memory and running on the processor, wherein the processor executes the program to implement the steps of the robust image generation detection method based on multidimensional real feature distribution of the present invention.

[0024] Fourthly, the technical solution of a computer-readable storage medium provided by the present invention is as follows: The computer-readable storage medium stores instructions that, when read, cause the computer-readable storage medium to perform the steps of the robust image detection method based on multidimensional real feature distribution of the present invention.

[0025] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other objects, features and advantages of the present invention more obvious and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0026] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This is a schematic flowchart of an embodiment of a robust image detection method based on multidimensional real feature distribution according to the present invention. Figure 2 This is a schematic diagram of the overall architecture; Figure 3 A schematic diagram of the adaptive masking spectrum reconstruction network; Figure 4 A flowchart illustrating the process of multi-dimensional feature fusion and hypersphere modeling; Figure 5This is a schematic diagram of an embodiment of a robust image detection system based on multidimensional real feature distribution according to the present invention. Figure 6 This is a schematic diagram of an embodiment of an electronic device according to the present invention. Detailed Implementation

[0027] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein.

[0028] Figure 1 This diagram illustrates a flowchart of an embodiment of a robust image generation detection method based on multidimensional real feature distribution provided by the present invention. This robust image generation detection method based on multidimensional real feature distribution can be executed by electronic devices such as terminal devices or servers. The terminal device can be any fixed or mobile terminal, such as user equipment (UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, in-vehicle device, or wearable device. The server can be a single server or a server cluster consisting of multiple servers. Any electronic device can implement the robust image generation detection method based on multidimensional real feature distribution by having its processor call computer-readable instructions stored in its memory. Figure 1 As shown, it includes the following steps: S1. Extract the original logarithmic amplitude spectrum of the image to be detected, randomly mask the frequency bands in the original logarithmic amplitude spectrum, and then input it into an adaptive masking spectrum reconstruction network for spectrum reconstruction. Calculate the error between the reconstructed spectrum and the original logarithmic amplitude spectrum to obtain the spectrum feature vector.

[0029] The image to be detected refers to a digital image received by the computer vision system and prepared for authenticity assessment during the image authenticity verification process. For example, an image to be verified is obtained from an internet content review platform and input into the detection system as the image to be detected. The original logarithmic amplitude spectrum refers to the spectral data obtained by extracting the frequency domain amplitude components from the image to be detected after performing a Fast Fourier Transform, followed by logarithmic calculation. For example, a Fast Fourier Transform is performed on the aforementioned image to be verified, the frequency domain amplitude values ​​are extracted, and the logarithm is calculated to obtain the original logarithmic amplitude spectrum.

[0030] Random masking refers to the operation of randomly selecting a portion of the original logarithmic amplitude spectrum according to a set ratio and setting the spectral data of this portion of the frequency band to zero. For example, random sampling within the range of 10% to 50% determines a masking ratio of 30%, and randomly selecting a portion of the original logarithmic amplitude spectrum, setting the spectral data of this portion of the frequency band to zero. The adaptive masked spectrum reconstruction network refers to a deep learning network based on an encoder-decoder architecture, used to receive the incomplete logarithmic amplitude spectrum after random masking. It extracts features through encoder downsampling, restores the spectral size through decoder upsampling, and combines skip connections to preserve detailed information, outputting a complete reconstructed spectrum. For example, the original logarithmic amplitude spectrum after random masking is input into the adaptive masked spectrum reconstruction network. The network encodes features through multiple layers of downsampling convolutional blocks, and then outputs a complete reconstructed spectrum through multiple layers of upsampling deconvolutional blocks combined with the encoded layer features passed through skip connection branches.

[0031] The reconstructed spectrum refers to the full-band spectrum data predicted by the adaptive masked spectrum reconstruction network based on the spectral structure dependencies learned by the network after randomly masking the incomplete logarithmic amplitude spectrum. For example, the adaptive masked spectrum reconstruction network outputs a reconstructed spectrum with the same size as the original logarithmic amplitude spectrum. The spectral feature vector refers to the numerical feature obtained by calculating the mean square error between the reconstructed spectrum and the original logarithmic amplitude spectrum, encoding the error value into a fixed-length numerical vector, and using it to quantify whether the image's spectral structure conforms to the real image's patterns. For example, the mean square error between the reconstructed spectrum and the original logarithmic amplitude spectrum is calculated, and the error value is encoded into a fixed-length vector to obtain the spectral feature vector.

[0032] Specifically, a Fast Fourier Transform is performed on the image to be detected to extract the frequency domain amplitude components and calculate their logarithms, resulting in the original logarithmic amplitude spectrum. A portion of the original logarithmic amplitude spectrum is randomly selected according to a predetermined ratio, and the spectral data within this portion is set to zero, achieving a random masking operation. The randomly masked original logarithmic amplitude spectrum is then input into an adaptive masking spectrum reconstruction network. This network is built on an encoder-decoder architecture, extracting features through encoder downsampling, recovering the spectral size through decoder upsampling, and preserving detailed information through skip connections, outputting a reconstructed spectrum of full size. The mean square error between the reconstructed spectrum and the original logarithmic amplitude spectrum is calculated, and this error is encoded into a fixed-length numerical vector to obtain the spectral feature vector.

[0033] It should be noted that the adaptive masking spectrum reconstruction network is trained using the Adam optimizer with a learning rate of 1×10⁻⁶. -4 The masking ratio is randomly sampled within the range of 10% to 50%.

[0034] S2. Extract the intrinsic noise pattern of the image to be detected through a learnable residual convolutional filter, use the intrinsic noise pattern as a noise feature vector, and statistically analyze the entropy distribution of the local binary pattern feature map of the image to be detected at different scales to obtain the texture feature vector.

[0035] The residual convolutional filter refers to a learnable filtering structure composed of multiple stacked convolutional layers, used to separate content signals from sensor noise in an input image and output residual noise components. For example, the image to be detected is input into the residual convolutional filter, and the filter separates the content signals from the image through multiple convolutional operations, outputting residual noise components. The intrinsic noise mode refers to the residual noise component output by the residual convolutional filter, reflecting the inherent noise statistical characteristics introduced by the image sensor during the imaging process. For example, the residual noise component output by the residual convolutional filter is used as the intrinsic noise mode.

[0036] The noise feature vector refers to a fixed-length numerical vector obtained by vectorizing the intrinsic noise pattern, which is used to quantify whether the noise distribution of the image conforms to the Gaussian-Poisson mixture distribution law of the real image. For example, the intrinsic noise pattern is flattened into a one-dimensional vector and mapped into a fixed-length numerical vector through a fully connected layer to obtain the noise feature vector.

[0037] The Local Binary Pattern Feature Map (LCM) refers to a texture description map composed of the decimal values ​​of all pixels, centered on the central pixel, and its neighboring pixels. For each pixel, the LCM values ​​are compared with the central pixel's grayscale values. The comparison results are encoded as binary numbers and converted to decimal values. For example, the LCM values ​​are calculated pixel-by-pixel for the image to be reviewed, generating a LCM with the same dimensions as the original image. The Texture Feature Vector (TVA) is a fixed-length numerical vector formed by combining the entropy values ​​obtained at each scale from the LCM at multiple different scales. This vector quantifies the randomness and complexity of the image texture. For example, the entropy distributions of the LCM at three different scales are calculated, and the entropy values ​​obtained at the three scales are combined into a fixed-length numerical vector to obtain the Texture Feature Vector.

[0038] Specifically, the image to be detected is input into a learnable residual convolutional filter, which consists of multiple stacked convolutional layers. Through multi-layer convolution operations, the content signal and sensor noise are separated from the image, and a residual noise component is output. This residual noise component is used as the intrinsic noise pattern, and the intrinsic noise pattern is vectorized and encoded to obtain a noise feature vector. Local binary pattern values ​​are calculated pixel-by-pixel in the image to be detected, generating a local binary pattern feature map. The entropy distribution of the local binary pattern feature map is statistically analyzed at multiple different scales, and the entropy values ​​obtained at each scale are combined to form a texture feature vector.

[0039] S3. Input the spectral feature vector, the noise feature vector and the texture feature vector into the cross-modal attention fusion network, and output a unified fusion feature vector.

[0040] The cross-modal attention fusion network refers to a multimodal feature fusion network built on an attention mechanism. It receives three inputs: a spectral feature vector, a noise feature vector, and a texture feature vector. It uses an adaptive learning weight allocation mechanism to weight and combine the feature vectors to output a unified fusion feature vector. For example, the spectral feature vector, noise feature vector, and texture feature vector are input into the cross-modal attention fusion network. The network automatically calculates the weights according to the distribution of each feature vector input, performs a weighted sum of the three feature vectors, and outputs a unified fusion feature vector.

[0041] The fusion feature vector refers to a single fixed-length numerical vector output by the cross-modal attention fusion network after adaptively weighting and fusing the three dimensions of spectral feature vector, noise feature vector, and texture feature vector. It is used to characterize the comprehensive features of the image in the three dimensions of spectrum, noise, and texture. For example, the cross-modal attention fusion network outputs a fixed-length vector as the fusion feature vector of the image to be detected.

[0042] Specifically, the spectral feature vector, noise feature vector, and texture feature vector are input into the cross-modal attention fusion network. The cross-modal attention fusion network automatically determines the weights based on the input distribution of each feature vector, and performs weighted fusion of the spectral feature vector, noise feature vector, and texture feature vector according to the weights, outputting a unified fused feature vector.

[0043] S4. Obtain the center and radius of the pre-constructed hypersphere, and set a dynamic threshold based on the radius. The hypersphere is constructed by the fusion feature vectors of a large number of real images through a support vector data description algorithm. The center and radius are used to define the feature distribution boundary of the real images.

[0044] In this context, the hypersphere refers to a high-dimensional spherical region constructed by a support vector data description algorithm in a multi-dimensional feature space. The boundary of this region distinguishes real images from AI-generated images. For example, a high-dimensional spherical region is obtained by fitting the fused feature vectors of a large number of real images into the high-dimensional feature space; this high-dimensional spherical region is the hypersphere. The center of the sphere refers to the position vector of the center point of the high-dimensional spherical region obtained by fitting the fused feature vectors of a large number of real images using the support vector data description algorithm. For example, the support vector data description algorithm optimizes the fused feature vectors of all real images to obtain the center point vector of the hypersphere; this vector is the center of the sphere. The radius refers to the maximum distance from the boundary of the high-dimensional spherical region to the center of the sphere obtained by fitting the fused feature vectors of a large number of real images using the support vector data description algorithm. For example, the support vector data description algorithm calculates the maximum distance from the fused feature vectors of all real images to the center of the sphere and uses this maximum value as the radius.

[0045] The dynamic threshold refers to a judgment threshold that is automatically adjusted based on the statistical distribution of the authenticity deviation scores of multiple images to be detected over a period of time, in order to adapt to the drift of image data distribution from different sources. For example, the mean and standard deviation of the authenticity deviation scores of multiple images to be detected in the current time period are calculated, and the sum of the mean and standard deviation is used as the current dynamic threshold.

[0046] Among them, the support vector data description algorithm refers to a single-class classification algorithm used to find the smallest volume hypersphere containing all training samples in the feature space, and to define the distribution boundary of the training samples by the center and radius of the hypersphere. For example, the fused feature vectors of all real images are input into the support vector data description algorithm, which uses the Gaussian radial basis function as the kernel function, and obtains the center and radius of the smallest hypersphere containing all real image feature vectors through optimization.

[0047] The feature distribution boundary refers to the spatial range defined by the center and radius of the hypersphere. Feature vectors within the spatial range belong to the true image feature distribution, while feature vectors outside the spatial range are considered out-of-distribution anomalies. For example, a spherical region is delineated in a high-dimensional space with the center of the sphere as the center and the radius as the distance threshold. The surface of the spherical region is the feature distribution boundary.

[0048] Specifically, the center and radius of a pre-constructed hypersphere are obtained. The hypersphere is constructed from the fused feature vectors of a large number of real images using a support vector data description algorithm. The support vector data description algorithm uses a Gaussian radial basis function as the kernel function, and the kernel width is determined through cross-validation. The product of the radius and a set coefficient is used as a dynamic threshold.

[0049] S5. Calculate the Mahalanobis distance from the fused feature vector to the center of the sphere, and use the Mahalanobis distance as the authenticity deviation score.

[0050] The authenticity deviation score refers to the Mahalanobis distance from the fused feature vector of the image to be detected to the center of the hypersphere, which is used to quantify the degree to which the image to be detected deviates from the center of the feature distribution of the real image. For example, the Mahalanobis distance from the fused feature vector of the image to be detected to the center of the hypersphere is calculated, and the distance value is used as the authenticity deviation score.

[0051] Specifically, the Mahalanobis distance from the fused feature vector to the center of the sphere is calculated, and the calculated Mahalanobis distance is used as the authenticity deviation score.

[0052] S6. When the authenticity deviation score is greater than the dynamic threshold, the image to be detected is determined to be an AI-generated image; otherwise, it is determined to be a real image.

[0053] Specifically, the authenticity deviation score is compared with a dynamic threshold; if the authenticity deviation score is greater than the dynamic threshold, the image to be detected is determined to be an AI-generated image. If the authenticity deviation score is less than or equal to the dynamic threshold, the image to be detected is determined to be a real image.

[0054] The technical solution of this embodiment extracts spectral feature vectors from the logarithmic amplitude spectrum through an adaptive masking spectral reconstruction network, extracts intrinsic noise patterns using a learnable residual convolutional filter to obtain noise feature vectors, and obtains texture feature vectors based on the multi-scale local binary mode entropy distribution. Then, the above multi-dimensional features are unified into a fused feature vector through a cross-modal attention fusion network. Subsequently, a hypersphere is constructed using a support vector data description algorithm to define the boundary of the real image feature distribution. The authenticity deviation score is obtained by calculating the Mahalanobis distance from the fused feature vector of the image to be detected to the center of the sphere. The discrimination is completed by combining dynamic thresholds. This solution solves the problems of existing methods relying on artifacts of specific generation models, resulting in insufficient adaptability to new generation models, and the poor stability and limited reliability of general statistical features when facing post-processed or compressed images. It improves the generalization ability and robustness of generated image detection.

[0055] In one alternative approach, when randomly masking frequency bands in the original logarithmic amplitude spectrum, the masked frequency bands are at least one of the low-frequency region, the mid-frequency region, and the high-frequency region.

[0056] The low-frequency region refers to the frequency band region with lower frequency components in the original logarithmic amplitude spectrum, corresponding to the parts of the image where grayscale changes slowly. For example, in the original logarithmic amplitude spectrum, the low-frequency component region occupying a certain proportion of the total spectral area near the center is marked as the low-frequency region. The mid-frequency region refers to the frequency band region with medium-level frequency components in the original logarithmic amplitude spectrum, located between the low-frequency and high-frequency regions. For example, in the original logarithmic amplitude spectrum, the frequency band region from the outer edge of the low-frequency region to the inner edge of the high-frequency region is marked as the mid-frequency region. The high-frequency region refers to the frequency band region with higher frequency components in the original logarithmic amplitude spectrum, corresponding to the edges and details of the image where grayscale changes drastically. For example, in the original logarithmic amplitude spectrum, the high-frequency component region occupying a certain proportion of the total spectral area at the spectral edge is marked as the high-frequency region.

[0057] In the above-mentioned optional methods, the masking range is further extended to at least one of the low-frequency, mid-frequency and high-frequency regions, so that the adaptive masking spectrum reconstruction network can cover more complete frequency band information during the spectrum reconstruction process, and enhance the ability of the spectrum feature vector to capture the frequency domain differences left by different generation models.

[0058] In one optional approach, the step of statistically analyzing the entropy distribution of the local binary pattern feature map of the image to be detected at different scales to obtain the texture feature vector includes: Calculate the local binary pattern feature map of the image to be detected.

[0059] Specifically, local binary pattern operation is performed pixel by pixel on the image to be detected. Taking each pixel as the center, the grayscale relationship between each pixel in the neighborhood and the center pixel is compared. The comparison result is encoded into a binary number and converted into a decimal value. The decimal values ​​of all pixels constitute the local binary pattern feature map.

[0060] The entropy distribution of the local binary pattern feature map is statistically analyzed at multiple different scales, and the entropy distributions at multiple different scales are combined into the texture feature vector.

[0061] Specifically, the local binary pattern feature map is scaled at multiple different scales. At each scale, the occurrence probability of each pixel value in the local binary pattern feature map is counted. The entropy value is calculated based on the occurrence probability to obtain the entropy value distribution corresponding to that scale. The entropy value distributions corresponding to multiple scales are sequentially concatenated to form a texture feature vector.

[0062] In the above-mentioned optional methods, the entropy distribution of local binary pattern feature maps is further statistically analyzed at multiple scales and combined into a texture feature vector, so that the texture features can depict the image texture at multiple levels from detailed structure to overall layout, thereby improving the ability to identify unnatural texture patterns in the generated image.

[0063] In one alternative approach, the cross-modal attention fusion network performs weighted fusion of the spectral feature vector, the noise feature vector, and the texture feature vector using adaptively assigned weights to obtain the fused feature vector, wherein the weights are automatically determined by the cross-modal attention fusion network based on the input distribution of each feature vector.

[0064] Here, the weights refer to the fusion coefficients assigned by the cross-modal attention fusion network to the spectral feature vector, noise feature vector, and texture feature vector, respectively. Each weight value is between 0 and 1, and the sum of the three is 1. They are used to control the contribution ratio of each feature vector in the fused feature vector. For example, the cross-modal attention fusion network assigns a weight of 0.5 to the spectral feature vector, a weight of 0.2 to the noise feature vector, and a weight of 0.3 to the texture feature vector. The weighted sum of the three is used to obtain the fused feature vector.

[0065] The input distribution refers to the statistical distribution of the values ​​of each dimension in the input feature vector of the cross-modal attention fusion network. For example, the cross-modal attention fusion network calculates the mean and variance of the input spectral feature vector, the mean and variance of the noise feature vector, and the mean and variance of the texture feature vector, and automatically determines the weights based on the input distribution of each feature vector.

[0066] In the above-mentioned optional approach, the cross-modal attention fusion network further automatically determines the weights based on the input distribution of the three types of feature vectors: spectrum, noise, and texture. It generates a fusion feature vector through adaptive weighted fusion, so that different modal features dynamically participate in the fusion process according to their respective information content.

[0067] In one alternative approach, the step of constructing the hypersphere includes: Extract the corresponding spectral feature vector, noise feature vector, and texture feature vector from multiple real images.

[0068] Specifically, a Fast Fourier Transform is performed on each real image to extract the logarithmic amplitude spectrum. After randomly masking the frequency band, the image is input into an adaptive masked spectrum reconstruction network for spectrum reconstruction. The error between the reconstructed spectrum and the original logarithmic amplitude spectrum is calculated to obtain the spectral feature vector of the real image. A learnable residual convolutional filtering operation is performed on each real image to separate the content signal from sensor noise, extract the intrinsic noise pattern, and encode the intrinsic noise pattern into a noise feature vector. Local binary pattern values ​​are calculated pixel-by-pixel for each real image to generate a local binary pattern feature map. The entropy distribution is statistically analyzed at multiple different scales and combined into a texture feature vector.

[0069] The spectral feature vector, noise feature vector, and texture feature vector corresponding to each real image are input into the cross-modal attention fusion network to obtain the fusion feature vector of each real image.

[0070] Specifically, for each real image, the spectral feature vector, noise feature vector, and texture feature vector corresponding to the real image are input into the cross-modal attention fusion network. The cross-modal attention fusion network automatically determines the weights according to the input distribution of each feature vector, and performs weighted fusion of the three feature vectors according to the weights to output the fused feature vector of the real image.

[0071] The center and radius of the hypersphere are obtained by fitting the fused feature vectors of all real images using a support vector data description algorithm.

[0072] Specifically, the fused feature vectors of all real images are input into the support vector data description algorithm. The support vector data description algorithm searches for the minimum volume hypersphere that contains the fused feature vectors of all real images in the feature space. The center point of the minimum volume hypersphere is taken as the center of the sphere, and the distance from the boundary of the minimum volume hypersphere to the center of the sphere is taken as the radius, thus obtaining the center of the sphere and the radius.

[0073] In the above-mentioned optional approach, spectral, noise and texture feature vectors are further extracted from multiple real images and fused feature vectors are obtained through a cross-modal attention fusion network. Then, the center and radius of the hypersphere are fitted using a support vector data description algorithm, so that the boundary of the hypersphere is established on the basis of the multi-dimensional feature distribution of real images.

[0074] In one alternative approach, the support vector data description algorithm uses a Gaussian radial basis function as the kernel function, and the kernel width of the Gaussian radial basis function is determined by cross-validation.

[0075] The Gaussian radial basis function is a kernel function that takes the Euclidean distance between two vectors as its independent variable. Its value decays exponentially with increasing distance, and its expression is: ,in and Represent two vectors in the feature space. This represents the Euclidean distance between two vectors. This represents the kernel width parameter; for example, in a support vector data description algorithm, a Gaussian radial basis function is used to calculate the similarity between two fused feature vectors. Set it to 0.5.

[0076] In Support Vector Data Description (SVM) algorithms, the kernel function is used to map feature vectors from the original feature space to a higher-dimensional feature space. It calculates the inner product in the higher-dimensional space without explicitly calculating the mapping. For example, SVM algorithms use the Gaussian Radial Basis Function (RBF) as the kernel function. During algorithm optimization, the kernel function is used to calculate the similarity between the fused feature vectors of any two real images in the mapping space. The kernel width is a scaling parameter in the RBF kernel function, used to control the rate at which the kernel value decays as the distance between input vectors increases. A smaller kernel width results in faster decay, while a larger kernel width results in slower decay. For example, the RBF kernel function uses a scale parameter to control the rate at which the kernel value decays as the distance between input vectors increases. When set to 0.5, the distance between the two feature vectors is 1, and the kernel function value is... It is approximately equal to 0.607.

[0077] Cross-validation refers to the method of dividing the training dataset into multiple subsets during training, using one subset as the validation set and the remaining subsets as the training set for multiple rounds of training and evaluation, and selecting the optimal parameters based on the average of the evaluation results of each round. For example, a real image dataset is randomly divided into 5 subsets, one subset is used as the validation set and the remaining 4 subsets are used as the training set for 5 rounds of training, the average of the evaluation results of the 5 rounds is calculated, and the kernel width value that makes the evaluation average optimal is selected.

[0078] In the above-mentioned optional methods, the Gaussian radial basis function is further used as the kernel function of the support vector data description algorithm, and the kernel width is determined by cross-validation, so that the distribution pattern after the feature is mapped to the high-dimensional space can be reasonably characterized, and the hypersphere boundary is more closely aligned with the feature aggregation range of the real image.

[0079] In one alternative approach, prior to the step of obtaining the center and radius of the pre-constructed hypersphere, the following is also included: Collect a dataset of real images, and extract a fusion feature vector after applying image perturbation to each real image in the dataset; wherein the image perturbation includes at least one of JPEG compression, Gaussian blur and image cropping.

[0080] The "real image dataset" refers to a collection of natural images that have not been generated or edited by AI. These images are directly captured or acquired by optical imaging devices and are used to construct the boundary of real image feature distribution during the training phase. For example, a large number of natural images taken by digital cameras, including multiple categories such as people, landscapes, buildings, and flora and fauna, are collected and used as the real image dataset. Image perturbation refers to simulated attack operations applied to images to simulate various transformations and degradations that images undergo in a real network environment. For example, a random intensity Gaussian blur is applied to a real image in the real image dataset to produce a blurring effect.

[0081] JPEG compression refers to a lossy image compression operation that reduces image data storage space through discrete cosine transform and quantization processes, with the quantization parameter controlling the compression strength. For example, a real image from a real image dataset is compressed using JPEG with a quality factor of 70 to obtain the compressed image. Gaussian blur refers to an image smoothing operation that achieves a blurring effect by convolving an image with a Gaussian kernel, with the Gaussian kernel standard deviation parameter controlling the blur strength. For example, a real image from a real image dataset is convolved with a Gaussian kernel with a standard deviation of 1.5 to obtain the blurred image. Image cropping refers to cropping an image, extracting a portion of the image as a new image. For example, a real image from a real image dataset is randomly cropped to an area equal to 80% of its original size to obtain the cropped image.

[0082] Specifically, a large number of ungenerated natural images are collected to form a real image dataset. For each real image in the dataset, at least one operation is randomly selected from JPEG compression, Gaussian blur, or image cropping and applied to it to obtain a perturbed image. The perturbed image is then subjected to a Fast Fourier Transform to extract the logarithmic amplitude spectrum, an intrinsic noise mode is extracted through a residual convolutional filter, a local binary mode feature map is calculated, and the entropy distribution is statistically analyzed. The obtained spectral feature vector, noise feature vector, and texture feature vector are input into a cross-modal attention fusion network, which outputs a fused feature vector.

[0083] Constrain the consistency between the fused feature vectors corresponding to different perturbation versions of the same real image.

[0084] Specifically, the fused feature vectors obtained after different image perturbation processes of the same real image are taken as a set of positive sample pairs. The distance between each fused feature vector is calculated, and the consistency between the fused feature vectors corresponding to different perturbation versions of the same real image is constrained by minimizing the distance.

[0085] In the above-mentioned optional methods, at least one of the following perturbations is further applied to the images in the real image dataset during the training phase: JPEG compression, Gaussian blur, or image cropping. The consistency between the fused feature vectors corresponding to different perturbation versions of the same image is constrained, so that the model can still maintain discrimination stability when faced with post-processed images.

[0086] like Figure 2 As shown, the overall scheme of this embodiment includes three components: a multi-dimensional real feature extractor, a realism feature distribution modeler, and an out-of-distribution discrimination and robustness enhancement engine. The multi-dimensional real feature extractor receives the image to be detected or a training real image and extracts spectral feature vectors, noise feature vectors, and texture feature vectors in parallel through spectral feature branches, noise feature branches, and texture feature branches. The realism feature distribution modeler inputs the feature vectors output from the three branches into a cross-modal attention fusion network, outputs a unified fused feature vector, and constructs a hypersphere using a support vector data description algorithm, forming a hypersphere modeling unit. The out-of-distribution discrimination and robustness enhancement engine includes a realism deviation score calculation unit, a dynamic threshold unit, an image perturbation contrast learning constraint unit, and an image authenticity determination output unit. These units are used to calculate the realism deviation score, set a dynamic threshold, apply contrast learning constraints, and output the final determination result. The image authenticity output result is either a real image or an AI-generated image.

[0087] In the multi-dimensional real feature extractor, the spectral feature branch first performs a Fast Fourier Transform on the image to be detected to extract the original logarithmic amplitude spectrum. Then, it randomly masks a portion of the frequency bands in the original logarithmic amplitude spectrum. The masked frequency bands are at least one of the low-frequency, mid-frequency, and high-frequency regions, with the masking ratio randomly sampled within the range of 10% to 50%. The masked logarithmic amplitude spectrum is input into an adaptive masked spectrum reconstruction network. This network is based on an encoder-decoder architecture, extracting features through encoder downsampling, restoring the spectral size through decoder upsampling, and preserving detailed information through skip connections, outputting the reconstructed spectrum. The mean square error between the reconstructed spectrum and the original logarithmic amplitude spectrum is calculated, and this error is encoded into a fixed-length numerical vector to obtain the spectral feature vector. Figure 3As shown, the network specifically includes a spectrum input unit, an adaptive frequency band masking unit, an encoding network, a decoding network, skip connection branches, a reconstructed spectrum output unit, and a mean square error loss calculation unit. The spectrum input unit is the logarithmic amplitude spectrum of the image's Fast Fourier Transform. The adaptive frequency band masking unit randomly masks at least one of the low, mid, and high frequency spectrum regions. The encoding network consists of multiple downsampled convolutional blocks, and the decoding network consists of multiple upsampled deconvolutional blocks. Skip connection branches transfer the features from the encoding layers to the corresponding decoding layers. The reconstructed spectrum output unit outputs the reconstructed spectrum, and the mean square error loss calculation unit calculates the mean square error between the reconstructed spectrum and the original spectrum. The adaptive masked spectrum reconstruction network uses the Adam optimizer with a learning rate of [value missing]. .

[0088] In the noise feature branch, a learnable residual convolutional filter separates the content signal from the sensor noise in the image to be detected, and outputs the residual noise component as the intrinsic noise pattern. This intrinsic noise pattern reflects the Gaussian-Poisson mixture distribution characteristics of the real image. The intrinsic noise pattern is flattened and mapped to a fixed-length numerical vector through a fully connected layer to obtain the noise feature vector.

[0089] In the texture feature branch, the local binary pattern feature map of the image to be detected is calculated. This involves comparing the grayscale relationship between each neighboring pixel and the center pixel at each pixel location, encoding the comparison result into a binary number, and then converting it into a decimal value to form a texture description map. The entropy distribution of the local binary pattern feature map is statistically analyzed at multiple different scales. The entropy values ​​obtained at each scale are combined into a fixed-length numerical vector to obtain the texture feature vector.

[0090] like Figure 4 As shown, the multi-dimensional feature fusion and hypersphere modeling process includes three multi-dimensional feature inputs: spectral feature vector, noise feature vector, and texture feature vector. The cross-modal attention fusion network performs weighted fusion on these three feature vectors through adaptively assigned weights. The weights are automatically determined by the cross-modal attention fusion network based on the input distribution of each feature vector, with each weight value between 0 and 1, and the sum of the three is 1. The weighted fusion outputs a unified fused feature vector. The realism feature distribution modeler utilizes the fused feature vectors from a large number of real images and employs a support vector data description algorithm to construct a hypersphere in the feature space. The support vector data description algorithm uses a Gaussian radial basis function as the kernel function, and the expression for the Gaussian radial basis function is: ,in and Represent two vectors in the feature space. This represents the Euclidean distance between two vectors. This represents the kernel width parameter, which is determined through cross-validation. The center and radius of the hypersphere define the feature distribution boundary of the real image, such as... Figure 4 center of the ball and radius As indicated by the annotation, the inside of the hypersphere boundary represents real image sample points, while the outside of the boundary represents AI-generated outlier points. The line segment from the center of the sphere to the sample point is the Mahalanobis distance segment, which represents the deviation score from the true representation.

[0091] The training phase involves collecting a dataset of real-world images, consisting of a large number of natural images not generated by AI, directly captured or acquired by optical imaging devices. For each real-world image in the dataset, an image perturbation is applied, and a fused feature vector is extracted. Image perturbations include at least one of JPEG compression, Gaussian blur, and image cropping. Constraints are placed on the consistency of the fused feature vectors corresponding to different perturbation versions of the same real-world image to achieve contrastive learning constraints. Then, using the fused feature vectors from all training images, the center of the hypersphere is calculated and stored using a support vector data description algorithm. and radius The kernel width of the support vector data description algorithm is determined through cross-validation.

[0092] The detection phase includes inputting the image to be detected and performing size normalization processing, adjusting the size to 224 pixels × 224 pixels. The image to be detected is then processed by a multi-dimensional ground truth feature extractor and a ground truth feature distribution modeler to obtain a fused feature vector, such as... Figure 4 The deviation from the true value of the line segment is shown. Calculate the fused feature vector to the center of the hypersphere. The Mahalanobis distance is used as the true deviation score. This true deviation score is then compared to a dynamic threshold based on the radius, for example, 1.1 times the radius. Furthermore, the dynamic threshold is automatically adjusted based on the statistical distribution of the authenticity deviation scores of multiple images to be detected over a period of time. The statistical distribution includes the mean and standard deviation. When the authenticity deviation score is greater than the dynamic threshold, the image to be detected is determined to be an AI-generated image; otherwise, it is determined to be a real image, and the image authenticity result is output.

[0093] Figure 5 This diagram illustrates a structural schematic of an embodiment of a robust image detection system 200 based on multidimensional real feature distribution provided by the present invention. Figure 5 As shown, the robust image detection system 200 based on multidimensional real feature distribution includes: Processing module 201 is used to extract the original logarithmic amplitude spectrum of the image to be detected, randomly mask the frequency bands in the original logarithmic amplitude spectrum, input it into an adaptive masking spectrum reconstruction network for spectrum reconstruction, calculate the error between the reconstructed spectrum and the original logarithmic amplitude spectrum, and obtain the spectrum feature vector. The extraction module 202 is used to extract the intrinsic noise pattern of the image to be detected through a learnable residual convolutional filter, use the intrinsic noise pattern as a noise feature vector, and statistically analyze the entropy distribution of the local binary pattern feature map of the image to be detected at different scales to obtain the texture feature vector. The fusion module 203 is used to input the spectral feature vector, the noise feature vector and the texture feature vector into the cross-modal attention fusion network and output a unified fused feature vector. The setting module 204 is used to obtain the center and radius of a pre-constructed hypersphere and set a dynamic threshold based on the radius. The hypersphere is constructed by a support vector data description algorithm using the fusion feature vectors of a large number of real images. The center and radius are used to define the feature distribution boundary of the real images. Calculation module 205 is used to calculate the Mahalanobis distance from the fused feature vector to the center of the sphere, and use the Mahalanobis distance as the authenticity deviation score; The determination module 206 is used to determine that the image to be detected is an AI-generated image when the authenticity deviation score is greater than the dynamic threshold, and otherwise determine that it is a real image.

[0094] In one alternative approach, when randomly masking frequency bands in the original logarithmic amplitude spectrum, the masked frequency bands are at least one of the low-frequency region, the mid-frequency region, and the high-frequency region.

[0095] In an alternative embodiment, the extraction module 202 is specifically used for: Calculate the local binary pattern feature map of the image to be detected; The entropy distribution of the local binary pattern feature map is statistically analyzed at multiple different scales, and the entropy distributions at multiple different scales are combined into the texture feature vector.

[0096] In one alternative approach, the cross-modal attention fusion network performs weighted fusion of the spectral feature vector, the noise feature vector, and the texture feature vector using adaptively assigned weights to obtain the fused feature vector, wherein the weights are automatically determined by the cross-modal attention fusion network based on the input distribution of each feature vector.

[0097] In an alternative embodiment, it further includes: a building module; the building module is used for: Extract the corresponding spectral feature vector, noise feature vector, and texture feature vector from multiple real images respectively; The spectral feature vector, noise feature vector, and texture feature vector corresponding to each real image are input into the cross-modal attention fusion network to obtain the fusion feature vector of each real image. The center and radius of the hypersphere are obtained by fitting the fused feature vectors of all real images using a support vector data description algorithm.

[0098] In one alternative approach, the support vector data description algorithm uses a Gaussian radial basis function as the kernel function, and the kernel width of the Gaussian radial basis function is determined by cross-validation.

[0099] In an alternative embodiment, the method further includes a preprocessing module; the preprocessing module is used for: Collect a dataset of real images, and extract a fusion feature vector after applying image perturbation to each real image in the dataset; wherein, the image perturbation includes at least one of JPEG compression, Gaussian blur and image cropping; Constrain the consistency between the fused feature vectors corresponding to different perturbation versions of the same real image.

[0100] It should be noted that the beneficial effects of the robust image generation detection system 200 based on multidimensional real feature distribution provided in the above embodiments are the same as those of the robust image generation detection method based on multidimensional real feature distribution described above, and will not be repeated here. Furthermore, the system provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the system can be divided into different functional modules according to the actual situation to complete all or part of the functions described above. In addition, the system and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process is detailed in the method embodiments, and will not be repeated here.

[0101] The robust image generation detection system 200 based on multidimensional real feature distribution of the present invention can be a computer program (including program code) running on a computer device. For example, the robust image generation detection system 200 based on multidimensional real feature distribution of the present invention is an application software that can be used to execute the corresponding steps in the robust image generation detection method based on multidimensional real feature distribution of the present invention.

[0102] In some embodiments, the robust image generation detection system 200 based on multidimensional real feature distribution of the present invention can be implemented in a combination of hardware and software. As an example, the robust image generation detection system 200 based on multidimensional real feature distribution of the present invention can be a processor in the form of a hardware decoding processor, which is programmed to execute the robust image generation detection method based on multidimensional real feature distribution of the present invention. For example, the processor in the form of a hardware decoding processor can be one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0103] The modules described in the embodiments of this invention can be implemented in software or hardware. The names of the modules are not, in some cases, limiting the scope of the module itself.

[0104] An electronic device according to an embodiment of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements any of the above-mentioned robust detection methods for generated images based on multidimensional real feature distribution. That is, an electronic device according to an embodiment of the present invention may include, but is not limited to: a processor and a memory; the memory is used to store the computer program; the processor is used to execute the robust detection method for generated images based on multidimensional real feature distribution shown in any embodiment of the present invention by calling the computer program.

[0105] In one alternative embodiment, an electronic device is provided, such as Figure 6 As shown, Figure 6 The illustrated electronic device 4000 includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present invention.

[0106] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this invention. Processor 4001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0107] Bus 4002 may include a path for transmitting information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 4002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6 The bus 4002 is represented by only one thick line, but this does not mean that there is only one bus or one type of bus.

[0108] The memory 4003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto.

[0109] The memory 4003 stores application code (computer program) for executing the present invention, and its execution is controlled by the processor 4001. The processor 4001 executes the application code stored in the memory 4003 to implement the content shown in the foregoing method embodiments.

[0110] Among them, electronic devices can also be terminal devices. A terminal device can be any terminal device that can install applications and access web pages through applications, including at least one of smartphones, tablets, laptops, desktop computers, smart speakers, smartwatches, smart TVs, and smart in-vehicle devices.

[0111] It should be noted that, Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of the present invention.

[0112] An embodiment of the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the above-mentioned robust image generation detection methods based on multidimensional real feature distribution.

[0113] Alternatively, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, a floppy disk, and an optical data storage device, etc.

[0114] In an exemplary embodiment, a computer program product or computer program is also provided, which includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the aforementioned robust image detection method based on multidimensional real feature distribution.

[0115] Computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0116] It should be understood that the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0117] The computer-readable storage medium provided in this invention can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0118] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the method shown in the above embodiments.

[0119] The above description is merely a preferred embodiment of the present invention and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this invention is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-disclosed concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this invention.

[0120] It should be noted that the terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and represent a limitation on a specific order or sequence. Where appropriate, the order of use for similar objects can be interchanged so that the embodiments of this application described herein can be implemented in an order other than that shown or described.

[0121] Those skilled in the art will recognize that this invention can be implemented as a system, method, or computer program product. Therefore, this invention can be specifically implemented in the following forms: it can be entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." Furthermore, in some embodiments, this invention can also be implemented as a computer program product contained in one or more computer-readable media, which includes computer-readable program code.

[0122] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A robust detection method for generated images based on multidimensional real feature distribution, characterized in that, include: The original logarithmic amplitude spectrum of the image to be detected is extracted. After randomly masking the frequency bands in the original logarithmic amplitude spectrum, it is input into an adaptive masked spectrum reconstruction network for spectrum reconstruction. The error between the reconstructed spectrum and the original logarithmic amplitude spectrum is calculated to obtain the spectrum feature vector. The intrinsic noise pattern of the image to be detected is extracted by a learnable residual convolutional filter, the intrinsic noise pattern is used as a noise feature vector, and the entropy distribution of the local binary pattern feature map of the image to be detected at different scales is statistically analyzed to obtain the texture feature vector. The spectral feature vector, the noise feature vector, and the texture feature vector are input into a cross-modal attention fusion network, which outputs a unified fused feature vector. The center and radius of a pre-constructed hypersphere are obtained, and a dynamic threshold is set based on the radius. The hypersphere is constructed by a support vector data description algorithm from the fused feature vectors of a large number of real images. The center and radius are used to define the feature distribution boundary of the real images. Calculate the Mahalanobis distance from the fused feature vector to the center of the sphere, and use the Mahalanobis distance as the authenticity deviation score; When the authenticity deviation score is greater than the dynamic threshold, the image to be detected is determined to be an AI-generated image; otherwise, it is determined to be a real image.

2. The robust detection method for generated images based on multidimensional real feature distribution according to claim 1, characterized in that, When randomly masking frequency bands in the original logarithmic amplitude spectrum, the masked frequency bands are at least one of the low-frequency region, the mid-frequency region, and the high-frequency region.

3. The robust image detection method based on multidimensional real feature distribution according to claim 1, characterized in that, The step of statistically analyzing the entropy distribution of the local binary pattern feature map of the image to be detected at different scales to obtain the texture feature vector includes: Calculate the local binary pattern feature map of the image to be detected; The entropy distribution of the local binary pattern feature map is statistically analyzed at multiple different scales, and the entropy distributions at multiple different scales are combined into the texture feature vector.

4. The robust detection method for generated images based on multidimensional real feature distribution according to claim 1, characterized in that, The cross-modal attention fusion network performs weighted fusion of the spectral feature vector, the noise feature vector, and the texture feature vector using adaptively assigned weights to obtain the fused feature vector. The weights are automatically determined by the cross-modal attention fusion network based on the input distribution of each feature vector.

5. The robust detection method for generated images based on multidimensional real feature distribution according to claim 1, characterized in that, The steps for constructing the hypersphere include: Extract the corresponding spectral feature vector, noise feature vector, and texture feature vector from multiple real images respectively; The spectral feature vector, noise feature vector, and texture feature vector corresponding to each real image are input into the cross-modal attention fusion network to obtain the fusion feature vector of each real image. The center and radius of the hypersphere are obtained by fitting the fused feature vectors of all real images using a support vector data description algorithm.

6. The robust detection method for generated images based on multidimensional real feature distribution according to claim 5, characterized in that, The support vector data description algorithm uses a Gaussian radial basis function as the kernel function, and the kernel width of the Gaussian radial basis function is determined by cross-validation.

7. The robust image detection method based on multidimensional real feature distribution according to claim 1, characterized in that, Before the steps of obtaining the center and radius of the pre-constructed hypersphere, the following are also included: Collect a dataset of real images, and extract a fusion feature vector after applying image perturbation to each real image in the dataset; wherein, the image perturbation includes at least one of JPEG compression, Gaussian blur and image cropping; Constrain the consistency between the fused feature vectors corresponding to different perturbation versions of the same real image.

8. A robust detection system for generated images based on multidimensional real feature distribution, characterized in that, include: The processing module is used to extract the original logarithmic amplitude spectrum of the image to be detected, randomly mask the frequency bands in the original logarithmic amplitude spectrum, input it into an adaptive masked spectrum reconstruction network for spectrum reconstruction, calculate the error between the reconstructed spectrum and the original logarithmic amplitude spectrum, and obtain the spectrum feature vector. The extraction module is used to extract the intrinsic noise pattern of the image to be detected through a learnable residual convolutional filter, use the intrinsic noise pattern as a noise feature vector, and statistically analyze the entropy distribution of the local binary pattern feature map of the image to be detected at different scales to obtain the texture feature vector. The fusion module is used to input the spectral feature vector, the noise feature vector, and the texture feature vector into the cross-modal attention fusion network and output a unified fused feature vector. A setting module is used to obtain the center and radius of a pre-constructed hypersphere and set a dynamic threshold based on the radius. The hypersphere is constructed by a support vector data description algorithm using the fused feature vectors of a large number of real images. The center and radius are used to define the feature distribution boundary of the real images. The calculation module is used to calculate the Mahalanobis distance from the fused feature vector to the center of the sphere, and use the Mahalanobis distance as the truth deviation score; The determination module is used to determine that the image to be detected is an AI-generated image when the authenticity deviation score is greater than the dynamic threshold, and otherwise determine that it is a real image.

9. An electronic device, characterized in that, The electronic device includes a processor coupled to a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor to enable the electronic device to implement the robust detection method for generated images based on multidimensional real feature distribution as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one computer program, which, when executed by a processor, implements the robust image generation detection method based on multidimensional real feature distribution as described in any one of claims 1 to 7.