A virtual image detection method based on artificial intelligence

Through the virtual image detection method based on artificial intelligence, the generation adversarial network and dynamic learning algorithm are used to solve the problem of insensitive response of virtual image detection in the existing technology, efficient recognition and rapid adaptation of virtual images are achieved, and accurate detection is improved and adaptability.

CN118691944BActive Publication Date: 2024-12-06KUNSHAN KANGTAIDA INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410896867.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-12-06
Estimated Expiration
2044-07-05

Smart Images

  • Figure CN118691944B_ABST
    Figure CN118691944B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image detection technology, specifically to a virtual image detection method based on artificial intelligence, comprising the following steps: based on input image data, using a generative adversarial network, performing pixel-level adjustment on virtual image samples, matching training set standards, adjusting image contrast and brightness, evaluating image edge sharpening effects, optimizing the model's ability to recognize fake images, and obtaining a preliminary image feature model. In the present invention, by introducing a generative adversarial network to perform pixel-level adjustment in image detection, and combining contrast and brightness optimization, the ability to express virtual image features is improved, the accuracy of edge sharpening evaluation further improves the recognition accuracy of virtual images, the adjustment of the dynamic learning rate allows the model to self-optimize for complex virtual image tampering, and improves adaptability to new tampering technologies, and the application of online learning and incremental learning ensures that the model can be updated in a timely manner.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image detection, and in particular to a virtual image detection method based on artificial intelligence. Background Art

[0002] The field of image detection technology mainly involves the automatic recognition and analysis of various visual elements from images. It is widely used in the fields of computer vision and image processing, covering a variety of functions from simple image enhancement and restoration to complex object recognition, scene understanding and behavior analysis. With the development of artificial intelligence, especially the advancement of deep learning technology, image detection technology has been able to interpret and process visual information more accurately, and is widely used in security monitoring, medical diagnosis, autonomous driving and industrial inspection, effectively improving processing speed and accuracy.

[0003] Among them, the virtual image detection method refers to the technology of identifying and analyzing image data generated in a digital environment. This method can detect the authenticity of the image content, distinguish whether the image has been tampered with or virtually generated, and identify the difference between virtual and real-world images. Its main uses include network security, preventing the spread of false information and verification of media content, as well as applications in legal and copyright protection, and combating deep fakes and other issues.

[0004] Although existing image detection technology can handle basic image recognition tasks, it performs poorly in identifying and analyzing tampered or virtually generated images. Existing technologies lack the ability to dynamically adjust and adaptively learn. They are not sensitive enough to complex or emerging tampering techniques, especially pixel-level tampering. They lack sufficient flexibility to adapt to the rapidly developing virtual image technology, which causes key signs of tampering to be missed in actual operations, leading to the spread of false information and misjudgment of tampered content. This limitation is particularly prominent in virtual image detection applications that require high accuracy and real-time response, limiting the effectiveness of image detection. Summary of the invention

[0005] The purpose of the present invention is to solve the shortcomings of the prior art and to propose a virtual image detection method based on artificial intelligence.

[0006] In order to achieve the above object, the present invention adopts the following technical solution: a virtual image detection method based on artificial intelligence, comprising the following steps:

[0007] S1: Based on the input image data, a generative adversarial network is used to adjust the virtual image samples at the pixel level to match the training set standard, adjust the image contrast and brightness, evaluate the image edge sharpening effect, optimize the model's ability to recognize fake images, and obtain a preliminary image feature model;

[0008] S2: Based on the preliminary image feature model, for the virtual image area with insufficient recognition results, adjusting the model learning rate, optimizing the recognition performance of the target area, and adjusting the detail texture detection in the virtual image to obtain the texture recognition optimization configuration;

[0009] S3: Based on the texture recognition optimization configuration, an online learning algorithm is used to adjust the model to match the newly input tampered virtual image sample, and the model parameters are iteratively updated to continuously verify the model on the sample set, thereby optimizing the response performance of the model to the new tampering method and obtaining the model adaptability configuration;

[0010] S4: Utilizing the adaptive configuration of the model, adopting an incremental learning algorithm, comparing the feature differences between new and old data points, adjusting the model processing weights, and optimizing the image detection process according to the virtual image tampering trend to obtain optimized image detection results.

[0011] The present invention is improved in that the step of adjusting the virtual image sample at the pixel level is specifically as follows:

[0012] S111: Based on the input image data, use the generative adversarial network to perform preliminary pixel-level adjustments using the formula:

[0013] G(x)=x+γΔx+∈

[0014] Generate an adjusted virtual image sample dataset G(x), where x is the pixel value of the original virtual image sample, Δx is the pixel adjustment amount generated by the GAN network, γ is the adjustment intensity coefficient used to control the amplitude of the pixel adjustment, and ∈ is the noise control term;

[0015] S112: Based on the adjusted virtual image sample data set, perform detail optimization, including image texture and color, and apply color balance and texture enhancement algorithms for processing, the formula is:

[0016] I′=αI+(1-α)(I·H β )

[0017] Obtain the image sample I′ after texture and color enhancement, where I is the pixel value of the adjusted virtual image sample, H is the texture enhancement kernel, α is the color balance coefficient, and β is the texture enhancement factor;

[0018] S113: Based on the texture and color enhanced image samples, pixel-level difference analysis is performed to compare the difference between the original virtual image samples and the adjusted image samples, using the formula:

[0019]

[0020] The evaluation result D of the pixel-level adjustment effect is obtained, where I origis the pixel value of the original virtual image sample, and I′ is the image sample after texture and color enhancement.

[0021] The present invention is improved in that the step of evaluating the image edge sharpening effect is specifically as follows:

[0022] S121: Based on the adjusted image contrast and brightness, an edge detection algorithm is used to perform a preliminary analysis on the sharpened image samples, and a Sobel operator is used to calculate the gradient strength of the image, using the formula:

[0023]

[0024] Get the edge strength map G, where G x Represents the gradient of the image in the x direction, G y Represents the gradient of the image in the y direction, k x and k y are the adjustment factors for horizontal and vertical gradients, respectively;

[0025] S122: Based on the edge intensity map, calculate the total edge response of the image using the formula:

[0026]

[0027] Get the average edge response R, where G i is the edge strength of each pixel, n is the total number of pixels, w i is the weight of the edge pixel;

[0028] S123: Based on the average edge response, compare with a sharpening effect threshold:

[0029]

[0030] Where R is the average edge response and T is the sharpening effect threshold.

[0031] The present invention is improved in that the steps of adjusting the model learning rate are specifically as follows:

[0032] S211: Based on the preliminary image feature model, analyze the recognition confidence of each virtual image area by the model, determine the area whose confidence is lower than the threshold, and use the formula:

[0033] R low ={x|Conf(x)<θ,x∈X}

[0034] Get a list of regions with low confidence R low , where X is the region in the virtual image, x is a single region, Conf(x) is the model's recognition confidence for region x, and θ is the confidence threshold;

[0035] S212: Based on the list of regions with low confidence, the average confidence of the regions is calculated, and the learning rate is adjusted using the formula:

[0036]

[0037] Get the new learning rate λ new , where λ is the initial learning rate, AC(R low ) is R low is the average confidence, θ is the confidence threshold, σ s is the adjustment factor, β z is the learning rate adjustment strength;

[0038] S213: Retraining the model based on the new learning rate to optimize the recognition performance of the target area.

[0039] The present invention is improved in that the step of adjusting the detail texture detection in the virtual image is specifically:

[0040] S221: Analyze the detail texture in the virtual image and automatically identify the area with poor texture performance, using the formula:

[0041] T low ={t|Complexity(t)<μ(T)-o(T)}

[0042] Get the list of insufficient texture areas T low , where T represents the texture area in the virtual image, Complexity(t) is the texture complexity of area t, μ(T) is the average value of the area, and σ(T) is the standard deviation of the area;

[0043] S222: Based on the list of insufficient texture regions, adjust the recognition parameters of the texture detection algorithm, using the formula:

[0044]

[0045] The adjusted texture detection parameter AP is obtained, where iP is the original texture detection parameter, AComplexity(T low ) is T low The average texture complexity of , μ(T) is the average value of the region;

[0046] S223: Utilizing the adjusted texture detection parameters, the detection capability of the area with insufficient texture performance is optimized to obtain texture recognition optimization configuration.

[0047] The present invention is improved in that the matching step of the newly input tampered virtual image sample is specifically as follows:

[0048] S311: Based on the texture recognition optimization configuration, the newly input tampered virtual image sample is analyzed to extract key visual features, and a feature extraction algorithm is used, and the formula is:

[0049] F=w1·f1(x)+w2·f2(X))+w3·f3(x)

[0050] Get the feature vector F extracted from each sample, where f1, f2 and f3 represent the feature extraction functions of the difference type, w1, w2 and w3 are the weight parameters of the feature, which are used to weight and balance the influence of the feature, and x is the input tampered virtual image sample;

[0051] S312: Based on the extracted feature vector, the feature vector is compared with the existing feature library of the model to determine the similarity, using the formula:

[0052]

[0053] Get the similarity score S, where F i is the i-th element in the eigenvector F, M i is the corresponding i-th element in the model feature library, and n is the number of elements in the feature vector;

[0054] S313: Based on the similarity score, evaluate whether the model needs to be updated and match the new tampering method. If the similarity score is lower than the threshold, the marked sample needs to be analyzed and the model is updated. The formula is:

[0055] Decision = S < threshold "Update": "No change"

[0056] Among them, Decision is the decision result and S is the similarity score.

[0057] The present invention is improved in that the step of performing model verification on the sample set is specifically:

[0058] S321: Perform model baseline verification to determine the basic response of the model to the current sample set using the formula:

[0059]

[0060] Get the weighted baseline verification result V init , where v i is the validation function for the i-th sample, is the i-th test sample, M is the current model, ω i is the weight given to the i-th sample, and n is the number of test samples;

[0061] S322: Based on the baseline verification result, the model parameters are optimized using the formula:

[0062] P neW =P old ×(1+γ·log(1+δ·V init ))

[0063] Get the adjusted new model parameter P new , where P old is the original model parameter, γ and δ are weight adjustment coefficients used to control the rate and influence of parameter adjustment, V init is the baseline verification result;

[0064] S323: Based on the new model parameters, perform model verification again to determine the optimization effect, using an iterative verification algorithm:

[0065]

[0066] Get the model verification result V final , and obtain the model adaptability configuration, where v j is the validation function for the jth sample, is the jth test sample, P new are the new model parameters and m is the total number of test samples.

[0067] The present invention is improved in that the steps of obtaining the optimized image detection results are specifically as follows:

[0068] S411: Analyze the feature differences between new and old data points using the model adaptive configuration, and calculate the feature difference using the formula:

[0069]

[0070] The sum of feature differences ΔF is obtained, where n represents the number of data points. and are the i-th eigenvalues ​​of the new and old data points respectively;

[0071] S412: Based on the sum of the feature differences, adjust the model processing weight to match the feature changes, using the formula:

[0072] W new =W old ·e -α·ΔF

[0073] Get the new processing weight W new , where W old is the original treatment weight, α is the adjustment coefficient used to control the effect of feature differences on weight adjustment, and ΔF is the sum of feature differences;

[0074] S413: Based on the new processing weights, the image detection process is optimized, and the weight data is combined, using the formula:

[0075] R optimized = detect(S,W new )

[0076] Get the optimized image detection result R optimized , where detect is the detection function, S is the image sample to be detected, and W new is the new processing weight.

[0077] Compared with the prior art, the advantages and positive effects of the present invention are:

[0078] In the present invention, by introducing a generative adversarial network in image detection for pixel-level adjustment and combining contrast and brightness optimization, the ability to express virtual image features is improved, the accuracy of edge sharpening evaluation further improves the recognition accuracy of virtual images, the adjustment of the dynamic learning rate allows the model to self-optimize for complex virtual image tampering, and improves the adaptability to new tampering technologies, and the application of online learning and incremental learning ensures that the model can be updated in a timely manner to maintain its high efficiency and accuracy in virtual image detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] Figure 1 It is a schematic diagram of the process of the present invention;

[0080] Figure 2 It is a schematic diagram of the process of performing pixel-level adjustment on a virtual image sample in the present invention;

[0081] Figure 3 A schematic diagram of a process for evaluating the image edge sharpening effect in the present invention;

[0082] Figure 4 Schematic diagram of the adjustment process of the model learning rate in the present invention;

[0083] Figure 5 A schematic diagram of a process for adjusting detail texture detection in a virtual image in the present invention;

[0084] Figure 6 A schematic diagram of the matching process of a newly input tampered virtual image sample in the present invention;

[0085] Figure 7 It is a schematic diagram of the process of model verification on the sample set in the present invention;

[0086] Figure 8 The figure is a schematic diagram of the process of obtaining the optimized image detection results in the present invention. DETAILED DESCRIPTION

[0087] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0088] In the description of the present invention, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating positions or positional relationships, are based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, in the description of the present invention, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0089] Example

[0090] See also Figure 1 The present invention provides a technical solution: a virtual image detection method based on artificial intelligence, comprising the following steps:

[0091] S1: Based on the input image data, a generative adversarial network is used to adjust the virtual image samples at the pixel level to match the training set standard, adjust the image contrast and brightness, evaluate the image edge sharpening effect, optimize the model's ability to recognize fake images, and obtain a preliminary image feature model;

[0092] S2: Based on the preliminary image feature model, for the virtual image area with insufficient recognition results, the model learning rate is adjusted to optimize the recognition performance of the target area, and the detailed texture detection in the virtual image is adjusted to obtain the texture recognition optimization configuration;

[0093] S3: Based on texture recognition optimization configuration, the model is adjusted using an online learning algorithm to match the newly input tampered virtual image samples. The model parameters are updated iteratively, and the model is continuously verified on the sample set to optimize the model's response performance to new tampering methods, thus obtaining the model's adaptive configuration.

[0094] S4: Utilize the adaptive configuration of the model and adopt the incremental learning algorithm to compare the feature differences between the new and old data points, adjust the model processing weights, and optimize the image detection process according to the trend of virtual image tampering to obtain optimized image detection results.

[0095] The preliminary image feature model includes contrast optimization standard, brightness adjustment benchmark, and edge clarity level. The texture recognition optimization configuration includes the adjusted learning rate setting, texture resolution optimization parameters, and region recognition optimization indicators. The model adaptability configuration includes the new tampering recognition index, update frequency setting, and model stability indicator. The optimized image detection results include feature comparison analysis results, weight adjustment results, and detection process improvement measures.

[0096] See also Figure 2 , the specific steps of pixel-level adjustment of virtual image samples are:

[0097] S111: Based on the input image data, use the generative adversarial network to perform preliminary pixel-level adjustments using the formula:

[0098] G(x)=x+γΔx+∈

[0099] Generate an adjusted virtual image sample dataset G(x), where x is the pixel value of the original virtual image sample, Δx is the pixel adjustment amount generated by the GAN network, γ is the adjustment intensity coefficient used to control the amplitude of the pixel adjustment, and ∈ is the noise control term to add randomness to the model;

[0100] S112: Based on the adjusted virtual image sample data set, perform detail optimization, including image texture and color, and apply color balance and texture enhancement algorithms for processing. The formula is:

[0101] I′=αI+(1-α)(I·H β )

[0102] Obtain the image sample I′ after texture and color enhancement, where I is the pixel value of the adjusted virtual image sample, H is the texture enhancement kernel, α is the color balance coefficient, and β is the texture enhancement factor;

[0103] S113: Based on the image samples after texture and color enhancement, pixel-level difference analysis is performed to compare the difference between the original virtual image samples and the adjusted image samples, using the formula:

[0104]

[0105] The evaluation result D of the pixel-level adjustment effect is obtained, where I orig is the pixel value of the original virtual image sample, and I′ is the image sample after texture and color enhancement.

[0106] Assume that:

[0107] x is assumed to be 100 (assuming pixel values ​​range from 0 to 255);

[0108] Δx assumes an adjustment of 15 (assuming the general range of pixel adjustment is -50 to +50);

[0109] γ is set to 0.8;

[0110] ∈ is assumed to be 22.

[0111] Calculation process:

[0112] Calculate the impact of the adjustment:

[0113] γΔx=0.8×15=12

[0114] Add the noise term:

[0115] 12+2=14

[0116] Adjusted pixel values:

[0117] G(x)=100+14=114

[0118] The adjusted pixel value is 114, which means that the adjustment amount learned by the GAN network and a small amount of noise are added to the original pixel value to generate a more realistic image effect.

[0119] Assume that:

[0120] I is 114;

[0121] H is assumed to be 1.05 (the texture enhancement kernel is usually slightly larger than 1 and is used to enhance the texture effect of the image);

[0122] Alpha is set to 0.7 (to maintain the balance between the original color and the enhancement effect);

[0123] β is set to 1.2 (to control the influence of the texture enhancement kernel).

[0124] Calculation process:

[0125] Calculate the effect of texture enhancement:

[0126] I.H β =114×1.05 1.2 ≈120

[0127] Calculate the final pixel value:

[0128] I′=0.7×114+0.3×120≈117

[0129] The pixel value after texture and color enhancement is 117, which shows that after the algorithm processing, the texture and color of the image are enhanced while maintaining the original image.

[0130] Assume that:

[0131] I orig Assume it is 100;

[0132] I′ is 117.

[0133] Calculation process:

[0134] Calculate the square of the pixel difference:

[0135] C100-117) 2 =289

[0136] Compute pixel-level differences:

[0137]

[0138] The pixel-level difference is 17, which indicates the degree of difference between the original image and the processed image and is used to evaluate the impact of the image processing algorithm.

[0139] See also Figure 3 , the steps to evaluate the image edge sharpening effect are as follows:

[0140] S121: Based on the adjusted image contrast and brightness, the edge detection algorithm is used to perform a preliminary analysis on the sharpened image samples, and the Sobel operator is used to calculate the gradient intensity of the image using the formula:

[0141]

[0142] Get the edge strength map G, where G x Represents the gradient of the image in the x direction, G y Represents the gradient of the image in the y direction, k x and k y are the adjustment factors for horizontal and vertical gradients, respectively;

[0143] S122: Based on the edge intensity map, calculate the total edge response of the image using the formula:

[0144]

[0145] Get the average edge response R, where G i is the edge strength of each pixel, n is the total number of pixels, w i is the weight of the edge pixel;

[0146] S123: Based on the average edge response, compare with the sharpening effect threshold:

[0147]

[0148] Where R is the average edge response and T is the sharpening effect threshold.

[0149] Assume the following:

[0150] G x Assume it is 20 (the gradient value is generally in the range of 0-255);

[0151] G y Assume 15;

[0152] k x Set to 1.1;

[0153] k y Set to 1.0.

[0154] Calculate the adjusted horizontal gradient:

[0155] k x ·G x =1.1×20=22

[0156] Calculate the adjusted vertical gradient:

[0157] k y ·G y =1.0×15=15

[0158] Calculate edge strength:

[0159]

[0160] The obtained edge strength value is 26.63, which represents the edge response strength of the image at that point after sharpening and is used as a reference for subsequent evaluation of the image sharpening effect.

[0161] Assume the following:

[0162] G i is 26.63;

[0163] n is assumed to be 100;

[0164] w i is 1.

[0165] Compute the weighted sum of edge strengths:

[0166]

[0167] Compute the average edge response:

[0168]

[0169] The average edge response R is 26.63, which indicates the average level of edge strength of the entire image after sharpening. The higher the value, the more obvious the sharpening effect.

[0170] Assuming T is 25, determine whether R is greater than or equal to T, then 26.63≥25, which is satisfactory.

[0171] See also Figure 4 , the specific steps for adjusting the model learning rate are:

[0172] S211: Based on the preliminary image feature model, analyze the recognition confidence of the model for each virtual image area, determine the area with a confidence lower than the threshold, and use the formula:

[0173] R low ={x|Conf(x)<θ,x∈X}

[0174] Get a list of regions with low confidence R low , where X is the region in the virtual image, x is a single region, Conf(x) is the model's recognition confidence for region x, and θ is the confidence threshold;

[0175] S212: Based on the list of regions with low confidence, calculate the average confidence of the regions and adjust the learning rate using the formula:

[0176]

[0177] Get the new learning rate λ new , where λ is the initial learning rate, AC(R low ) is R low is the average confidence, θ is the confidence threshold, σ s is an adjustment factor to avoid division by zero error, β z is the learning rate adjustment strength;

[0178] S213: Retrain the model based on the new learning rate to optimize the recognition performance of the target area.

[0179] Assume the following:

[0180] θ is set to 0.8. Assume that X contains 100 regions, of which 40 regions have confidence levels lower than 0.8. The confidence levels lower than 0.8 are collected to form a set R. low ;

[0181] λ is set to 0.01;

[0182] AC(R low ) is assumed to be 0.55;

[0183] σ s The value is 0.05;

[0184] β z Set to 2.

[0185] Calculate the ratio of the confidence gap to the adjusted denominator:

[0186]

[0187] Calculate the learning rate adjustment factor:

[0188] 1+0.2941=1.2941

[0189] Apply the adjusted strength for learning rate updates:

[0190] λ new =0.01·1.2941 2 ≈0.01·1.6753=0.0168

[0191] The new learning rate λ is obtained new It is 0.0168, which means that the original learning rate is increased. The model is adjusted to improve the recognition effect of low-confidence areas. The new learning rate will be used to retrain the model, especially for those areas with insufficient recognition performance.

[0192] See also Figure 5 , the steps of adjusting the detail texture detection in the virtual image are as follows:

[0193] S221: Analyze the detailed texture in the virtual image and automatically identify the area with poor texture performance using the formula:

[0194] T low ={t|Complexity(t)<μ(T)-σ(T)}

[0195] Get the list of insufficient texture areas T low , where T represents the texture area in the virtual image, Complexity(t) is the texture complexity of area t, μ(T) is the average value of the area, and σ(T) is the standard deviation of the area;

[0196] S222: Based on the list of insufficient texture representation areas, adjust the recognition parameters of the texture detection algorithm, using the formula:

[0197]

[0198] The adjusted texture detection parameter AP is obtained, where iP is the original texture detection parameter, AComplexity(T low ) is T low The average texture complexity of , μ(T) is the average value of the region;

[0199] S223: Utilizing the adjusted texture detection parameters, the detection capability of the area with insufficient texture performance is optimized to obtain texture recognition optimization configuration.

[0200] Assume the following:

[0201] Complexity(t) is obtained by evaluating each region through image analysis algorithm;

[0202] μ(T) is assumed to be 0.5;

[0203] σ(T) is assumed to be 0.1.

[0204] The threshold of texture complexity is calculated according to the formula:

[0205] μ(T)-σ(T)=0.5-0.1=0.4

[0206] According to the threshold, any region t whose texture complexity is less than 0.4 is considered to be under-represented;

[0207] Through this process, all texture regions with complexity lower than 0.4 are identified and classified as T low .

[0208] Assume the following:

[0209] iP is assumed to be 1.0;

[0210] μ(T) is assumed to be 0.5;

[0211] AComplexity(T low ) is assumed to be 0.3.

[0212] Calculate the proportion of the difference in means:

[0213]

[0214] Apply this ratio to adjust the initial parameters:

[0215] AP=1.0·(1+0.4)=1.0·1.4=1.4

[0216] The new parameter AP is 1.4, which means that the original detection parameter is improved by 40% to enhance the algorithm's detection ability for areas with complexity below average.

[0217] See also Figure 6 , the matching steps of the newly input tampered virtual image sample are as follows:

[0218] S311: Based on the texture recognition optimization configuration, the newly input tampered virtual image sample is analyzed to extract key visual features. The feature extraction algorithm is used. The formula is:

[0219] F=w1·f1(x)+w2·f2(x)+w3·f3(x)

[0220] Get the feature vector F extracted from each sample, where f1, f2 and f3 represent the feature extraction functions of the difference type, w1, w2 and w3 are the weight parameters of the feature, which are used to weight and balance the influence of the feature, and x is the input tampered virtual image sample;

[0221] S312: Based on the extracted feature vector, compare it with the existing feature library of the model to determine the similarity, using the formula:

[0222]

[0223] Get the similarity score S, where F i is the i-th element in the eigenvector F, M i is the corresponding i-th element in the model feature library, and n is the number of elements in the feature vector;

[0224] S313: Based on the similarity score, evaluate whether the model needs to be updated and match the new tampering method. If the similarity score is lower than the threshold, the marked sample needs to be analyzed and the model is updated. The formula is:

[0225] Decision = S < threshold "Update": "No change"

[0226] Among them, Decision is the decision result and S is the similarity score.

[0227] Assume the following:

[0228] w1=0.5;

[0229] w2=0.3;

[0230] w3=0.2;

[0231] f1(x)=0.7;

[0232] f2(x)=0.5;

[0233] f3(x)=0.9.

[0234] calculate:

[0235] F=0.5·0.7+0.3·0.5+0.2·0.9

[0236] F=0.35+0.15+0.18

[0237] F=0.68

[0238] The comprehensive feature vector F of 0.68 indicates that a comprehensive score is obtained based on the given weights and extracted feature values, which is used in the subsequent matching process.

[0239] Assumed values:

[0240] Assume that F and M are both three-dimensional vectors F = [0.68, 0.75, 0.62], M = [0.65, 0.80, 0.60].

[0241] Calculation process:

[0242] molecular:

[0243] 0.68 0.65 + 0.75 0.80 + 0.62 0.60 = 0.442 + 0.600 + 0.372 = 1.414

[0244] Denominator:

[0245]

[0246] The obtained similarity score S is 0.9998, and the threshold is set to 1. Since 1 is very similar to the similarity score, it means that the model can effectively identify the sample and no update is required.

[0247] See also Figure 7 , the steps for model validation on the sample set are as follows:

[0248] S321: Perform model baseline verification to determine the basic response of the model to the current sample set using the formula:

[0249]

[0250] Get the weighted baseline verification result V init , where v i is the validation function for the i-th sample, is the i-th test sample, M is the current model, ω i is the weight given to the i-th sample, and n is the number of test samples;

[0251] S322: Based on the baseline validation results, optimize the model parameters using the formula:

[0252] P new =P old ×(1+γ·log(1+δ·V init ))

[0253] Get the adjusted new model parameter P new , where P old is the original model parameter, γ and δ are weight adjustment coefficients used to control the rate and influence of parameter adjustment, V init is the baseline verification result;

[0254] S323: Based on the new model parameters, perform model validation again to determine the optimization effect, using an iterative validation algorithm:

[0255]

[0256] Get the model verification result V final , and obtain the model adaptability configuration, where v j is the validation function for the jth sample, is the jth test sample, P new are the new model parameters and m is the total number of test samples.

[0257] Assume there are 3 samples, n=3;

[0258] The weights are ω1=0.5, ω2=0.3, ω3=0.2;

[0259] Assume v1=0.8, v2=0.6, v3=0.9.

[0260] Calculate the weighted score for each sample:

[0261] V init =0.5·0.8+0.3·0.6+0.2·0.9

[0262] V init =0.4+0.18+0.18

[0263] V init =0.76

[0264] The obtained V init It is 0.76, which reflects the weighted matching score of the model for these three samples.

[0265] Assumptions:

[0266] P old is 1.0;

[0267] γ is 0.05;

[0268] δ is 2.0.

[0269] Calculate the parameter adjustment ratio:

[0270] 1+γ·log(1+δ·V init )=1+0.05·log(1+2.0·0.76)

[0271] =1+0.05·log(2.52)

[0272] =1+0.05·0.90

[0273] =1+0.045

[0274] =1.045

[0275] Apply a proportional adjustment to the original parameters:

[0276] P new =1.0×1.045=1.045

[0277] The obtained P new It is 1.045, indicating that the model parameters have increased by 4.5% relative to the original values ​​to better fit the test samples.

[0278] Assumptions:

[0279] Using the same sample and score assumptions, m = 3;

[0280] v1=0.85, v2=0.65, v3=0.95.

[0281] Find the maximum validation result:

[0282] V final =max(0.85, 0.65, 0.95) = 0.95

[0283] The obtained V final It is 0.95, which means that under the adjusted parameters, the model's best response to the test samples is 95%, indicating that the optimization of the model effectively improves the performance.

[0284] See also Figure 8 , the steps for obtaining the optimized image detection results are as follows:

[0285] S411: Use the model adaptive configuration to analyze the feature differences between new and old data points and calculate the feature difference using the formula:

[0286]

[0287] The sum of feature differences ΔF is obtained, where n represents the number of data points. and are the i-th eigenvalues ​​of the new and old data points respectively;

[0288] S412: Based on the sum of feature differences, adjust the model processing weight to match feature changes, using the formula:

[0289] W new =W old ·e -α·ΔF

[0290] Get the new processing weight W new , where W old is the original treatment weight, α is the adjustment coefficient used to control the effect of feature differences on weight adjustment, and ΔF is the sum of feature differences;

[0291] S413: Based on the new processing weights, the image detection process is optimized, combined with the weight data, using the formula:

[0292] R optimized = detect(S,W new )

[0293] Get the optimized image detection result R optimized , where detect is the detection function, S is the image sample to be detected, and W new is the new processing weight.

[0294] Assume there are 3 feature points, that is, n = 3;

[0295] The eigenvalue of the new data point is f new = [0.9, 0.8, 0.7];

[0296] The eigenvalue of the old data point is f old =[0.6, 0.5, 0.8].

[0297] Compute the difference for each feature:

[0298] (0.9-0.6) 2 =0.09

[0299] (0.8-0.5) 2 =0.09

[0300] (0.7-0.8) 2 =0.09

[0301] Calculate the total feature variance:

[0302]

[0303] The ΔF obtained is 0.436, which represents the sum of the feature differences between the new and old data points. This value is used to adjust the model to better adapt to the changes in the data.

[0304] Assumptions:

[0305] W old =1.0;

[0306] α = 0.5;

[0307] ΔF is 0.436.

[0308] Calculate the weight adjustment factor:

[0309] e -0.5·0.436 ≈e -0.218 ≈0.804

[0310] Calculate new processing weights:

[0311] W new =1.0·0.804=0.804

[0312] New processing weight W new It is 0.804, which is lower than the original weight, indicating that the impact of the original weight is reduced when facing data changes to adapt to the new data characteristics;

[0313] Using the above W new The result is 0.804.

[0314] Apply the new weights to the detection algorithm, assuming that the detection function is a weighted sum:

[0315] R optimized =∑W new ·S

[0316] Assume S = [1,1,1]:

[0317] R optimized =0.804·(1+1+1)=2.412

[0318] R optimized The value of is 2.412, which indicates the response of the model to the image sample under the new weights, indicating that the optimization algorithm effectively adjusts the detection process to adapt to the characteristics of the new data.

[0319] The above are only preferred embodiments of the present invention and are not intended to limit the present invention in other forms. Any technician familiar with the profession may use the technical contents disclosed above to change or modify them into equivalent embodiments with equivalent changes and apply them to other fields. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the technical solution of the present invention still falls within the protection scope of the technical solution of the present invention.

Claims

1. A virtual image detection method based on artificial intelligence, characterized in that: The following steps are involved: Based on the input image data, a generative adversarial network is used to adjust the virtual image samples at the pixel level to match the training set standards, adjust the image contrast and brightness, evaluate the image edge sharpening effect, optimize the model's ability to recognize fake images, and obtain a preliminary image feature model; Based on the preliminary image feature model, for the virtual image area with insufficient recognition results, the model learning rate is adjusted to optimize the recognition performance of the target area, and the detail texture detection in the virtual image is adjusted to obtain the texture recognition optimization configuration; Based on the texture recognition optimization configuration, an online learning algorithm is used to adjust the model to match the newly input tampered virtual image samples, and the model parameters are iteratively updated to continuously verify the model on the sample set, thereby optimizing the response performance of the model to the new tampering means and obtaining the model adaptability configuration; By using the adaptive configuration of the model, an incremental learning algorithm is adopted to compare the feature differences between new and old data points, adjust the model processing weights, and optimize the image detection process according to the virtual image tampering trend to obtain optimized image detection results; The step of performing pixel-level adjustment on the virtual image sample is specifically as follows: Based on the input image data, a generative adversarial network is used to make preliminary pixel-level adjustments using the formula: , Generate a dataset of adjusted virtual image samples , where x is the pixel value of the original virtual image sample, is the pixel adjustment amount generated by the GAN network, is the adjustment intensity coefficient, which is used to control the amplitude of pixel adjustment. is the noise control term; Based on the adjusted virtual image sample data set, detail optimization is performed, including image texture and color, and color balance and texture enhancement algorithms are applied for processing, and the formula is: , Get texture and color enhanced image samples ,in, is the pixel value of the adjusted virtual image sample, H is the texture enhancement kernel, is the color balance coefficient, is the texture enhancement factor; Based on the texture and color enhanced image samples, pixel-level difference analysis is performed to compare the differences between the original virtual image samples and the adjusted image samples, using the formula: , The evaluation result D of the pixel-level adjustment effect is obtained, where: is the pixel value of the original virtual image sample, is a sample of the image after texture and color enhancement; The step of evaluating the image edge sharpening effect is specifically as follows: Based on the adjusted image contrast and brightness, an edge detection algorithm is used to perform a preliminary analysis on the sharpened image samples, and the Sobel operator is used to calculate the gradient intensity of the image using the formula: , Get the edge strength map G, where Represents the gradient of the image in the x direction, Represents the gradient of the image in the y direction, and are the adjustment factors for horizontal and vertical gradients, respectively; Based on the edge intensity map, the total edge response of the image is calculated using the formula: , Get the average edge response R, where is the edge strength of each pixel, n is the total number of pixels, is the weight of the edge pixel; Based on the average edge response, it is compared with the sharpening effect threshold: , Where R is the average edge response and T is the sharpening effect threshold; The steps for adjusting the model learning rate are specifically as follows: Based on the preliminary image feature model, the recognition confidence of each virtual image area by the analysis model is determined, and the area with confidence below the threshold is determined using the formula: , Get a list of regions with low confidence , where X is the region in the virtual image, x is a single region, is the model for region x is the model for region is the confidence threshold; Based on the list of regions with low confidence, the average confidence of the regions is calculated, and the learning rate is adjusted using the formula: , Get a new learning rate ,in, is the initial learning rate, yes The average confidence level, is the confidence threshold, is the adjustment factor, is the learning rate adjustment strength; Based on the new learning rate, retrain the model to optimize the recognition performance of the target area; The step of adjusting the detail texture detection in the virtual image is specifically as follows: The detailed texture in the virtual image is analyzed to automatically identify the area with poor texture performance, using the formula: , Get a list of areas where texture representation is insufficient , where T represents the texture area in the virtual image, is the texture complexity of region t, is the average value of the region, is the standard deviation of the region; Based on the list of insufficient texture representation areas, the recognition parameters of the texture detection algorithm are adjusted using the formula: , Get the adjusted texture detection parameter AP, where iP is the original texture detection parameter, yes The average texture complexity of is the average value of the region; Utilizing the adjusted texture detection parameters, the detection capability of the area with insufficient texture performance is optimized to obtain texture recognition optimization configuration; The matching steps of the newly input tampered virtual image sample are specifically as follows: Based on the texture recognition optimization configuration, the newly input tampered virtual image sample is analyzed to extract key visual features. The feature extraction algorithm is used, and the formula is: , Get the feature vector F extracted from each sample, where , and Represent the feature extraction functions of the difference types, , and is the weight parameter of the feature, which is used to weight and balance the influence of the feature, and x is the input tampered virtual image sample; Based on the extracted feature vector, the similarity is determined by comparing it with the existing feature library of the model, using the formula: , Get the similarity score S, where is the i-th element in the eigenvector F, is the corresponding i-th element in the model feature library, and n is the number of elements in the feature vector; Based on the similarity score, evaluate whether the model needs to be updated and match the new tampering method. If the similarity score is lower than the threshold, the marked sample needs to be analyzed and the model updated. The formula is: , in, is the decision result, S is the similarity score; The steps of performing model validation on the sample set are specifically as follows: Perform model baseline validation to determine the basic response of the model to the current sample set using the formula: , Get the weighted baseline verification results ,in, is the validation function for the i-th sample, is the i-th test sample, M is the current model, is the weight given to the i-th sample, and n is the number of test samples; Based on the baseline validation results, the model parameters were optimized using the formula: , Get the adjusted new model parameters ,in, are the original model parameters, and is the weight adjustment coefficient, which is used to control the rate and influence of parameter adjustment. is the baseline verification result; Based on the new model parameters, perform model validation again to determine the optimization effect, using an iterative validation algorithm: , Get model validation results , and obtain the model adaptability configuration, where is the validation function for the jth sample, is the jth test sample, is the new model parameter, m is the total number of test samples; The steps for obtaining the optimized image detection results are specifically as follows: Using the adaptive configuration of the model, the feature differences between the new and old data points are analyzed and the feature difference degree is calculated using the formula: , Get the sum of feature differences , where n represents the number of data points, and are the i-th eigenvalues ​​of the new and old data points respectively; Based on the sum of the feature differences, the model processing weights are adjusted to match the feature changes, using the formula: , Get new processing weight ,in, is the original processing weight, is the adjustment coefficient, which is used to control the impact of feature differences on weight adjustment. is the sum of characteristic differences; Based on the new processing weights, the image detection process is optimized, combined with the weight data, using the formula: , Get optimized image detection results ,in, is the detection function, S is the image sample to be detected, is the new processing weight.