A method, apparatus, device, and storage medium for detecting AI-generated videos.

By leveraging the collaborative work of frame extraction, feature extraction, and decision fusion layers in the target video detection model, the challenge of detecting AI-generated videos in complex dynamic scenarios has been solved, achieving efficient and accurate video authenticity assessment.

CN121564810BActive Publication Date: 2026-05-05北京云一科技有限公司 +1
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
北京云一科技有限公司
Filing Date
2026-01-23
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing AI-generated video detection technologies struggle to meet users' needs for video authenticity detection in complex and dynamic scenarios, especially in situations with frequent camera cuts in news reports and dynamic interactions during speeches.

Method used

The target video detection model acquires video frames through a frame extraction layer, determines the differences between adjacent pixels through a feature extraction layer, analyzes pixel features through a frame prediction layer, and comprehensively judges the authenticity of the video through a decision fusion layer, thereby achieving efficient detection of AI-generated videos.

Benefits of technology

It achieves efficient and accurate detection in complex and dynamic scenarios, meeting users' needs for rapid confirmation of video authenticity and quick viewing of creative results, and improving the system's usability and scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121564810B_ABST
    Figure CN121564810B_ABST
Patent Text Reader

Abstract

This application discloses an AI-generated video detection method, apparatus, device, and storage medium, relating to the field of artificial intelligence, and applied to a terminal device equipped with a target video detection model. The method includes: acquiring target video frames of a video to be detected using the frame extraction layer of the target video detection model; determining the target pixel features corresponding to each target video frame by partitioning the target video frames using the feature extraction layer of the target video detection model; inputting the target pixel features corresponding to each target video frame into the frame prediction layer of the target video detection model to determine the target prediction probability corresponding to each target video frame; and determining the target confidence level of the video to be detected based on the target prediction probabilities corresponding to each target video frame in the video to be detected using the decision fusion layer of the target video detection model, and identifying the video to be detected as an AI-generated video when the target confidence level is greater than a preset confidence threshold, thereby outputting the corresponding target detection result. This application achieves efficient detection of AI-generated videos.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence, and in particular to an AI-generated video detection method, apparatus, device, and storage medium. Background Technology

[0002] Current AI-generated video detection technology has significant limitations. Most existing detection methods rely on traditional facial feature analysis, which falls short when faced with complex and dynamic scenes, such as frequent camera cuts in news reports or dynamic interactions during speeches. Furthermore, it overlooks the generalizability of real-world videos across multiple domains, making it difficult to meet users' needs for video authenticity detection in various scenarios. Summary of the Invention

[0003] In view of this, the purpose of this invention is to provide a method, apparatus, device, and storage medium for detecting AI-generated videos, capable of achieving efficient detection of AI-generated videos. The specific solution is as follows:

[0004] In a first aspect, this application discloses an AI-generated video detection method, applied to a terminal device equipped with a target video detection model, comprising:

[0005] The video to be detected is acquired, and the frame extraction layer of the target video detection model is used to process the video to be detected based on a preset sampling frequency to obtain the target video frame.

[0006] The feature extraction layer partition of the target video detection model is used to determine the target pixel differences between adjacent pixels in the target video frame, so as to determine the target pixel features corresponding to the target video frame based on the target pixel differences corresponding to each target video frame.

[0007] The target pixel features corresponding to each target video frame are input into the frame prediction layer of the target video detection model, so as to use the target neural network of the frame prediction layer to analyze the target pixel features of the target video frame to determine the target prediction probability corresponding to the target video frame; the target prediction probability is the probability that the target video frame is an AI-generated image;

[0008] The decision fusion layer of the target video detection model determines the target confidence level of the target video based on the target prediction probability corresponding to each target video frame in the target video to be detected. When the target confidence level is greater than a preset confidence threshold, the target video to be detected is identified as an AI-generated video, and the corresponding target detection result is output.

[0009] Optionally, determining the target pixel differences between adjacent pixels in the target video frame using the feature extraction layer partitioning of the target video detection model includes:

[0010] The feature extraction layer of the target video detection model is used to determine the feature map corresponding to the target video frame, and the target grid region corresponding to the feature map is determined.

[0011] The adjacent pixels in each of the target grid regions are processed to determine the target pixel differences between adjacent pixels in the target video frame.

[0012] Optionally, the step of using the target neural network of the frame prediction layer to analyze the target pixel features of the target video frame to determine the target prediction probability corresponding to the target video frame includes:

[0013] The target neural network of the frame prediction layer is used to analyze the target pixel features of the target video frame based on the target difference pattern in order to determine the target prediction probability corresponding to the target video frame;

[0014] The target difference pattern is the pixel feature difference pattern between the pre-acquired real image and the AI-generated image.

[0015] Optionally, the AI-generated video detection method further includes:

[0016] The first target interface of the target video detection model is used to call the target video generation model to obtain the target AI-generated video, and the second target interface of the target video detection model is used to obtain the target real video, so as to construct a target video set using the target AI-generated video and the target real video, and to train the target neural network using the target video set.

[0017] Optionally, acquiring the video to be detected includes:

[0018] Obtain the target video set, and determine each target video in the target video set as the video to be detected;

[0019] Accordingly, the step of using the target neural network of the frame prediction layer to analyze the target pixel features of the target video frame to determine the target prediction probability corresponding to the target video frame includes:

[0020] The target pixel features of the target video frame are analyzed using the target binary classifier in the target neural network of the frame prediction layer to determine the target prediction probability corresponding to the target video frame, and the prediction label corresponding to the target video frame is determined based on a preset probability threshold.

[0021] Based on the predicted labels corresponding to all the target video frames of the video to be detected, the proportion of correctly predicted frames corresponding to the video to be detected is determined. When the proportion of correctly predicted frames is lower than the target proportion, the target parameters of the target binary classifier are adjusted using the target loss function, and the process jumps to the step of using the target binary classifier in the target neural network of the frame prediction layer to analyze the target pixel features of the target video frame to determine the target prediction probability corresponding to the target video frame.

[0022] Optionally, the target loss function is a weighted cross-entropy loss function.

[0023] Optionally, the AI-generated video detection method further includes:

[0024] The proportion of correctly classified videos is determined based on the target detection results corresponding to all the target videos, and the area under the target curve of the target video detection model is determined by adjusting the preset confidence threshold; wherein, the area under the target curve includes a first area under the curve and a second area under the curve; the first area under the curve is the area under the curve of the true positive rate, and the second area under the curve is the area under the curve of the false positive rate;

[0025] The accuracy evaluation result of the target video detection model is determined based on the proportion of correctly classified videos and the area under the target curve. The target video detection model is then updated based on the accuracy evaluation result to perform AI-generated video detection using the updated target video detection model.

[0026] Secondly, this application discloses an AI-generated video detection device, applied to a terminal device equipped with a target video detection model, comprising:

[0027] The video frame extraction module is used to acquire the video to be detected and to process the video to be detected using the frame extraction layer of the target video detection model based on a preset sampling frequency to acquire the target video frame.

[0028] The feature extraction module is used to determine the target pixel differences between adjacent pixels in the target video frame by using the feature extraction layer partition of the target video detection model, so as to determine the target pixel features corresponding to the target video frame based on the target pixel differences corresponding to the target video frame.

[0029] The frame prediction result acquisition module is used to input the target pixel features corresponding to each target video frame into the frame prediction layer of the target video detection model, so as to use the target neural network of the frame prediction layer to analyze the target pixel features of the target video frame to determine the target prediction probability corresponding to the target video frame; the target prediction probability is the probability that the target video frame is an AI-generated image;

[0030] The video detection result output module is used to determine the target confidence level of the video to be detected based on the target prediction probability corresponding to each target video frame in the video to be detected by the decision fusion layer of the target video detection model, and to determine the video to be detected as an AI-generated video when the target confidence level is greater than a preset confidence threshold, so as to output the corresponding target detection result.

[0031] Thirdly, this application discloses an electronic device, including:

[0032] Memory, used to store computer programs;

[0033] A processor is used to execute the computer program to implement the aforementioned AI-generated video detection method.

[0034] Fourthly, this application discloses a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the aforementioned AI-generated video detection method.

[0035] In this application, when performing AI-generated video detection, a terminal device equipped with a target video detection model acquires a video to be detected. The frame extraction layer of the target video detection model processes the video to be detected based on a preset sampling frequency to obtain target video frames. The feature extraction layer of the target video detection model partitions and determines the target pixel differences between adjacent pixels in the target video frames, thereby determining the target pixel features corresponding to each target video frame based on these differences. The target pixel features corresponding to each target video frame are input to the frame prediction layer of the target video detection model, and the target neural network of the frame prediction layer analyzes the target pixel features of the target video frames to determine the target prediction probability corresponding to the target video frame. The target prediction probability is the probability that the target video frame is an AI-generated image. The decision fusion layer of the target video detection model determines the target confidence level corresponding to the video to be detected based on the target prediction probabilities corresponding to each target video frame in the video to be detected. When the target confidence level is greater than a preset confidence threshold, the video to be detected is determined to be an AI-generated video, and the corresponding target detection result is output. As can be seen, in this embodiment, when identifying whether a video to be detected is an AI-generated video, the target video frame corresponding to the video to be detected is first determined. Then, the target video detection model is used to partition and determine the target pixel differences between adjacent pixels in the target video frame. Based on all the target pixel differences corresponding to the target video frame, target pixel features that can characterize whether the target video frame is an AI-generated image are determined. The frame prediction layer of the target video detection model obtains the frame-level target prediction probability corresponding to the target video frame based on the target pixel features. Next, the decision fusion layer of the target video detection model determines the video-level target confidence corresponding to the video to be detected based on the target prediction probabilities corresponding to each target video frame. Based on the comprehensive analysis of the target confidence, the final target detection result is output, realizing efficient detection of AI-generated videos. The various layers of the target video detection model cooperate closely and are highly integrated, ensuring the efficiency and accuracy of the entire detection process. Attached Figure Description

[0036] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0037] Figure 1 This is a flowchart of an AI-generated video detection method disclosed in this application;

[0038] Figure 2This is a schematic diagram of the architecture of an AI-generated video detection system disclosed in this application;

[0039] Figure 3 This is a schematic diagram of a specific AI-generated video detection method disclosed in this application;

[0040] Figure 4 This is a schematic diagram of a specific target pixel feature extraction process disclosed in this application;

[0041] Figure 5 This diagram illustrates the accuracy of different AI-generated video detection methods disclosed in this application in detecting AI-generated videos and real videos on the Chameleon dataset.

[0042] Figure 6 This is a schematic diagram of the ROC curves corresponding to the various AI-generated video detection models disclosed in this application;

[0043] Figure 7 This is a schematic diagram of the structure of an AI-generated video detection device disclosed in this application;

[0044] Figure 8 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation

[0045] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0046] Current AI-generated video detection technologies have significant limitations. Most existing detection methods rely on traditional facial feature analysis, which struggles with complex and dynamic scenes, such as frequent camera cuts in news reports or dynamic interactions during speeches. Furthermore, these methods neglect the generalizability of real-world videos across multiple domains, failing to meet users' needs for video authenticity verification in various scenarios. To address these technical issues, this application discloses an AI-generated video detection method capable of efficiently detecting AI-generated videos.

[0047] See Figure 1 As shown, this embodiment of the invention discloses an AI-generated video detection method, applied to a terminal device equipped with a target video detection model, including:

[0048] Step S11: Obtain the video to be detected, and process the video to be detected using the frame extraction layer of the target video detection model based on a preset sampling frequency to obtain the target video frame.

[0049] In this embodiment, the first target interface of the target video detection model can be used to call the target video generation model to obtain target AI-generated videos, and the second target interface of the target video detection model can be used to obtain target real videos. A target video set is then constructed using the target AI-generated videos and the target real videos, and the target neural network is trained using the target video set. In other words, this embodiment can create AI-generated videos by calling the first target interface of the target video detection model, generating video content that conforms to semantic logic as the target AI-generated videos. The obtained target AI-generated videos can be used together with target real videos to construct a target video set. Then, according to user needs, each target video in the target video set can be identified as a video to be detected, and the target video detection model can be used to analyze these videos to train and optimize the target video detection model. In a specific implementation, the architecture of the AI-generated video detection system constructed based on the target video detection model disclosed in this embodiment is as follows: Figure 2 As shown. The system supports uploading common video formats. After a user uploads a video, the system automatically performs detection and promptly displays clear detection results to the user, meeting the user's need for quick confirmation of video authenticity. The task center allows users to easily obtain relevant information for various tasks. Users can obtain clear video detection results here and check whether the detected video is AI-generated, meeting the user's need for quick confirmation of video authenticity. For text-generated video tasks, the task center not only displays the task completion progress, but also allows users to directly view the generated video content, corresponding prompts, and keywords in the task center after the video is generated, intuitively evaluating whether the generated effect meets expectations, meeting the user's need for quick viewing of creative results. At the same time, the open API improves the system's availability and scalability, and can also be used to restrict system call permissions for different users. For example, identity restrictions can be implemented using appid, requiring users to provide authentication information such as AppID to ensure that only authorized users can access the API and implement the corresponding system call functions, thereby meeting users' personalized business needs.

[0050] In this embodiment, the target video detection model supports the analysis of videos in common video formats. For example... Figure 3 As shown, after acquiring the video to be detected, the target video detection model extracts multiple frames with the same resolution from the video to be detected as target video frames through its frame extraction layer. In one specific implementation, for the input video to be detected... The detector first extracts the video into a sequence of frames. From the video... The frame sequence is extracted at a fixed preset sampling rate r (e.g., r = 2 frames per second):

[0051] ;

[0052] in, This represents the t-th frame of the video, with a resolution of . . The total duration of the video is represented by , and k is the total number of frames in the video. The frame extraction layer converts the continuous video stream into a discrete frame sequence as the target video frames for subsequent feature extraction and computation.

[0053] Step S12: Use the feature extraction layer partition of the target video detection model to determine the target pixel difference between adjacent pixels in the target video frame, so as to determine the target pixel feature corresponding to the target video frame based on the target pixel difference corresponding to each target video frame.

[0054] In this embodiment, as Figure 4 As shown, the target pixel difference between adjacent pixels in a target video frame is determined by partitioning the feature extraction layer of the target video detection model. Specifically, this can include: determining the feature map corresponding to the target video frame using the feature extraction layer of the target video detection model, and determining each target grid region corresponding to the feature map; processing the adjacent pixels in each target grid region to determine the target pixel difference between adjacent pixels in the target video frame.

[0055] Understandably, given the widespread use of upsampling operations in current image generation techniques such as Generative Adversarial Networks (GANs) and diffusion models, this embodiment starts with the generator's structure near the output end, utilizing neighboring pixel relationships to analyze the forgery features of AI-generated videos. This structure includes an upsampling layer `up` and... A convolutional layer (conv) with an activation function. Assume... As input to the generator, the input feature mapping of its generated structure is used. (here) , These are the width and height of the frame image, respectively. After processing by upsampling and convolutional layers (number of channels), the target video frame of the video to be detected, initially obtained in this embodiment, is output. The specific calculation is as follows:

[0056] ;

[0057] in It's the upsampled feature map. (This refers to the video frame...) and feature mapping Divided into The size is The grid, respectively using and express and The grid set, and Represent and The first in Each grid. In practical applications, the upsampling factor of most generators... The upsampling operation generates In this context, elements exhibit strong correlations. For example, when upsampling is performed using nearest neighbor interpolation, All elements share the same value. This characteristic mainly stems from the effect of the upsampling layer. At the same time, the convolution function remains fixed during inference and has translation invariance, which allows this correlation to be preserved in the generated image. This correlation is an important manifestation of upsampling forgery.

[0058] In this embodiment, in order to accurately represent the forgery trace features (i.e., target pixel features) of video frames, it can be based on To calculate the relationship between neighboring pixels. Let... ,like Figure 4 As shown, the relationship between neighboring pixels (i.e., the difference between adjacent pixels in the target video frame) is calculated using the following formula:

[0059] ;

[0060] in yes elements, That is The relationship between neighboring pixels. Through this subtraction operation, this embodiment can effectively capture the relative relationships between pixels. In actual calculations, Available from Choose any element to set , . All grids in each frame of the image When combined, these elements form the neighboring pixel relationship features (i.e., target pixel features) of the image frame.

[0061] Step S13: Input the target pixel features corresponding to each target video frame into the frame prediction layer of the target video detection model, so as to use the target neural network of the frame prediction layer to analyze the target pixel features of the target video frame to determine the target prediction probability corresponding to the target video frame; the target prediction probability is the probability that the target video frame is an AI-generated image.

[0062] In this embodiment, after obtaining the target pixel features corresponding to each target video frame, the target pixel features corresponding to each target video frame are input into the frame prediction layer of the target video detection model. The target neural network of the frame prediction layer is then used to analyze the target pixel features of the target video frames to determine the target prediction probability corresponding to the target video frames. This includes: using the target neural network of the frame prediction layer to analyze the target pixel features of the target video frames based on target difference patterns to determine the target prediction probability corresponding to the target video frames; wherein, the target difference pattern is the pixel feature difference pattern between the pre-acquired real image and the AI-generated image. In a specific implementation, the target neural network may include a target binary classifier built based on a deep neural network, which takes the target pixel features corresponding to the target video frames as input data and feeds them into a binary classifier (i.e., the target binary classifier) ​​that has been trained with a large number of labeled samples. This is used to predict the realism of a target video frame. During training, it learns the difference patterns in neighboring pixel relationships between real images and AI-generated images. Through calculations and processing within the classifier, it finally outputs a numerical value, which is the predicted probability that the frame was generated by AI (i.e., the target prediction probability). Specifically, a threshold is set. ,when At that time, the binary classifier determines that the frame is an AI-generated video frame, that is... ;when When this happens, the frame is determined to be a real video frame, that is... By analyzing the neighboring pixel relationship features of each frame of an image using a binary classifier, it is possible to determine whether a video frame was generated by AI.

[0063] Step S14: Using the decision fusion layer of the target video detection model, determine the target confidence level of the target video based on the target prediction probability corresponding to each target video frame in the target video to be detected, and when the target confidence level is greater than a preset confidence threshold, determine the target video to be detected as an AI-generated video, so as to output the corresponding target detection result.

[0064] In this embodiment, to integrate the frame-by-frame prediction results obtained in the aforementioned process into a video-level authenticity judgment, a probability-average-based decision fusion strategy can be adopted. The decision fusion layer of the target video detection model determines the target confidence level of the video to be detected based on the target prediction probability corresponding to each target video frame in the video to be detected. When the target confidence level is greater than a preset confidence threshold, the video to be detected is identified as an AI-generated video, and the corresponding target detection result is output. This strategy achieves the final video-level classification by quantifying the AI ​​generation confidence level of each frame in the video and combining it with a preset threshold.

[0065] In one specific implementation, assume the video to be detected After frame extraction, the result is... Frame, the target prediction probability corresponding to each frame is ( The decision fusion module first calculates the average probability of all frames:

[0066] ;

[0067] in, Indicates video The average AI generation probability of all frames in the video can be used as the overall forgery confidence (i.e., the target confidence) of the video. A decision threshold (i.e., a pre-set confidence threshold) is then set. Compare the average probability with:

[0068] ;

[0069] like Greater than or equal to If the prediction result is 1, it means the video is generated by AI; otherwise, it is a real video.

[0070] In this embodiment, if the video to be detected is a video from the target video set used to train the target neural network, the target pixel features of the target video frame are analyzed using the target neural network of the frame prediction layer to determine the target prediction probability corresponding to the target video frame. Specifically, this may include: analyzing the target pixel features of the target video frame using the target binary classifier in the target neural network of the frame prediction layer to determine the target prediction probability corresponding to the target video frame, and determining the prediction label corresponding to the target video frame based on a preset probability threshold; determining the proportion of correctly predicted frames corresponding to the video to be detected based on the prediction labels corresponding to all target video frames of the video to be detected, and when the proportion of correctly predicted frames is lower than the target proportion, adjusting the target parameters of the target binary classifier using the target loss function, and then jumping to the step of analyzing the target pixel features of the target video frame using the target binary classifier in the target neural network of the frame prediction layer to determine the target prediction probability corresponding to the target video frame. The target loss function is the weighted cross-entropy loss function.

[0071] In one specific implementation, this embodiment considers a set of real-world videos and AI-generated videos sampled from different sources, respectively denoted as: and ,in This indicates the number of videos. The goal of the target video detection model is to output a label for each video. and ,in This indicates that the video was generated by AI. This represents real-world videos. The training dataset (i.e., the target video set) can utilize the self-constructed Chameleon dataset, which features diverse scenes and characteristics. Data sources include various public platforms, covering a wide range of video content such as news broadcasts, public speeches, and product recommendations. Acquisition can be achieved by first filtering videos from these platforms that meet specific requirements, then subjecting them to rigorous preprocessing, including segmenting the videos into 5-second segments using FFmpeg, manually filtering based on scene and domain diversity criteria, and finally generating metadata for the filtered videos. In one specific implementation, the target video set contains 600 real videos and 600 AI-generated videos, totaling 1200 video samples. To provide sufficient support for model training, validation, and evaluation, the dataset can be divided into training, validation, and test sets in a 6:2:2 ratio. Specifically, the training set contains 720 samples (60% of the total) for model parameter learning; the validation set contains 240 samples (20% of the total) for model selection and hyperparameter tuning; and the test set also contains 240 samples (20% of the total) for final evaluation of the model's generalization ability. The ratio of real video to AI-generated video datasets remains 1:1 for each category. Chameleon incorporates complex features from real-world scenes, such as camera transitions, dynamic character interactions, and background changes, fully supporting the training needs of full-scene video detection models.

[0072] When training the target binary classifier, the neighboring pixel relationship features of each frame are used. Input target binary classifier To predict its authenticity, the parameters of the binary classifier are optimized by minimizing the target loss function. The objective loss function is the weighted cross-entropy loss function, which can be expressed as:

[0073] ;

[0074] in Indicates the first The probability that a frame is judged to be generated by AI. It is the threshold for judgment. and These are learnable weights. Indicates the first The true label of each frame. Specifically, each frame of the video. It is marked as 0 or 1, where 0 and 1 represent real-world video ( ) or AI-generated video ( ).

[0075] After completing frame-level prediction, we input the prediction results into the fusion decision output module, which summarizes them into a video-level authenticity determination. The confidence probability of the video is calculated by determining the proportion of correctly predicted frames in the video.

[0076] ;

[0077] in Indicates the first The correct prediction rate, or confidence probability, for all frames in a video. This is an indicator function that returns 1 if the condition in parentheses is true, and 0 otherwise. It represents the confidence probability of the entire video. Exceeding the confidence threshold At that time, AI-generated videos will be labeled as 1, and real-world videos will be labeled as 0, as shown below:

[0078] ;

[0079] Meanwhile, for the detection of real videos, the following are available:

[0080] ;

[0081] When the prediction probability of the entire video Exceeding the confidence threshold When the confidence threshold is set correctly, AI-generated videos will be labeled as 1, and real videos will be labeled as 0. Otherwise, AI-generated and real videos will be incorrectly labeled as 0 and 1 respectively. During training, the confidence threshold can be adjusted. In addition, the parameters of the binary classifier are optimized to improve the accuracy of video-level decision-making, enabling the model to more accurately distinguish between real videos and AI-generated videos.

[0082] In this implementation, the proportion of correctly classified videos can be determined based on the target detection results corresponding to all target videos, and the area under the target curve of the target video detection model can be determined by adjusting the preset confidence threshold. The area under the target curve includes the first area under the curve and the second area under the curve. The first area under the curve is the area under the curve of the true positive rate, and the second area under the curve is the area under the curve of the false positive rate. Then, the accuracy evaluation result of the target video detection model is determined based on the proportion of correctly classified videos and the area under the target curve, and the target video detection model is updated based on the accuracy evaluation result so as to use the updated target video detection model for AI-generated video detection.

[0083] In one specific implementation, accuracy (ACC) is used to evaluate the proportion of videos correctly classified in the test set:

[0084] ;

[0085] Where TP represents the number of correctly identified generated videos, TN represents the number of correctly identified real videos, FP represents the number of real videos that were misclassified as generated videos, and FN represents the number of generated videos that were misclassified as real videos.

[0086] The target area under the curve, also known as the area under the ROC curve (AUC), is determined by evaluating all possible thresholds. The area under the curves for true positive rate (TPR) and false positive rate (FPR) measures the overall discriminative ability of the model.

[0087] ;

[0088] It should be noted that this embodiment also demonstrates the superiority of the proposed AI-generated video detection method by comparing its performance with video detection methods based on deep learning and LVMs on the dataset. Specifically, the two deep learning methods used for comparison are FreqNet and BNet. To evaluate the ability of current large-scale AI generation models for AI-generated video detection, four advanced LVM models were selected: GPT-4V, GPT-4o, Claude 3.5, and Gemini-1.5-flash. Specific test prompts were designed for these models, with the following prompts: "Analyze the given image and determine whether it contains generated artifacts. Answer strictly in the following format: 1) Answer 'yes' or 'no', indicating whether artifacts exist. 2) If answer 'yes,' please describe in detail the specific location of the artifacts (e.g., facial areas, background, edges, etc.) and the characteristics of the artifacts (e.g., blurring, unnatural textures, inconsistent lighting, deformation, etc.)." The comparative experimental results are as follows: Figure 5 As shown.

[0089] Figure 5 This paper presents the accuracy of different methods in detecting AI-generated and real videos on the Chameleon dataset at different confidence thresholds. The numbers marked with squares represent the best performance among deep learning methods, while the numbers marked with ellipses represent the best performance among LVMs. Through analysis... Figure 5 It can be seen that when the confidence threshold is increased from acc@0.6 to acc@1.0, the accuracy of all models decreases. This phenomenon indicates that as the threshold increases... The increased confidence threshold significantly increases the difficulty of accurate prediction. Under different thresholds, the AI-generated video detection method proposed in this embodiment performs best, consistently maintaining a high accuracy rate and demonstrating a significant advantage. This performance surpasses FreqNet and BNet, which also perform well in this task. In contrast, LVM models such as Claude3.5, Gemini-1.5-Flash, GPT-4o, and GPT-4V perform poorly overall, with GPT-4V exhibiting the lowest accuracy. At high confidence thresholds, the accuracy of these models drops sharply, highlighting the challenge of achieving complete detection under high confidence conditions.

[0090] Figure 6 The ROC curves of different models for detecting AI-generated videos are shown. Through analysis... Figure 6 As can be seen, the method proposed in this embodiment achieves the highest AUC score (0.8748), followed closely by FreqNet (0.8605) and BNet (0.8364), demonstrating strong detection capabilities. In contrast, GPT-4V (0.7332) and GPT-4o (0.6488) perform moderately, possessing some predictive ability but low reliability. Claude3.5 (0.5466) and Gemini-1.5-flash (0.5067) perform very poorly, approaching random guessing, making them unsuitable for AI-generated video detection tasks.

[0091] As can be seen, in this embodiment, when identifying whether a video to be detected is an AI-generated video, the target video frame corresponding to the video to be detected is first determined. Then, the target video detection model is used to partition and determine the target pixel differences between adjacent pixels in the target video frame. Based on all the target pixel differences corresponding to the target video frame, target pixel features that can characterize whether the target video frame is an AI-generated image are determined. The frame prediction layer of the target video detection model obtains the frame-level target prediction probability corresponding to the target video frame based on the target pixel features. Next, the decision fusion layer of the target video detection model determines the video-level target confidence corresponding to the video to be detected based on the target prediction probabilities corresponding to each target video frame. Based on the comprehensive analysis of the target confidence, the final target detection result is output, realizing efficient detection of AI-generated videos. The various layers of the target video detection model cooperate closely and are highly integrated, ensuring the efficiency and accuracy of the entire detection process.

[0092] See Figure 7 As shown, this application discloses an AI-generated video detection device, applied to a terminal device equipped with a target video detection model, comprising:

[0093] The video frame extraction module 11 is used to acquire the video to be detected and to process the video to be detected using the frame extraction layer of the target video detection model based on a preset sampling frequency to acquire the target video frame.

[0094] Feature extraction module 12 is used to determine the target pixel difference between adjacent pixels in the target video frame by using the feature extraction layer partition of the target video detection model, so as to determine the target pixel feature corresponding to the target video frame based on the target pixel difference corresponding to each target video frame;

[0095] The frame prediction result acquisition module 13 is used to input the target pixel features corresponding to each target video frame into the frame prediction layer of the target video detection model, so as to use the target neural network of the frame prediction layer to analyze the target pixel features of the target video frame to determine the target prediction probability corresponding to the target video frame; the target prediction probability is the probability that the target video frame is an AI-generated image;

[0096] The video detection result output module 14 is used to determine the target confidence level of the video to be detected based on the target prediction probability corresponding to each target video frame in the video to be detected by the decision fusion layer of the target video detection model, and to determine the video to be detected as an AI-generated video when the target confidence level is greater than a preset confidence threshold, so as to output the corresponding target detection result.

[0097] As can be seen, in this embodiment, when identifying whether a video to be detected is an AI-generated video, the target video frame corresponding to the video to be detected is first determined. Then, the target video detection model is used to partition and determine the target pixel differences between adjacent pixels in the target video frame. Based on all the target pixel differences corresponding to the target video frame, target pixel features that can characterize whether the target video frame is an AI-generated image are determined. The frame prediction layer of the target video detection model obtains the frame-level target prediction probability corresponding to the target video frame based on the target pixel features. Next, the decision fusion layer of the target video detection model determines the video-level target confidence corresponding to the video to be detected based on the target prediction probabilities corresponding to each target video frame. Based on the comprehensive analysis of the target confidence, the final target detection result is output, realizing efficient detection of AI-generated videos. The various layers of the target video detection model cooperate closely and are highly integrated, ensuring the efficiency and accuracy of the entire detection process.

[0098] In one specific embodiment, the feature extraction module 12 may include:

[0099] The grid determination unit is used to determine the feature map corresponding to the target video frame using the feature extraction layer of the target video detection model, and to determine each target grid region corresponding to the feature map;

[0100] A pixel difference determination unit is used to process adjacent pixels in each of the target grid regions to determine the target pixel difference between adjacent pixels in the target video frame.

[0101] In one specific embodiment, the frame prediction result acquisition module 13 may specifically include:

[0102] The prediction probability determination unit is used to analyze the target pixel features of the target video frame based on the target difference pattern using the target neural network of the frame prediction layer, so as to determine the target prediction probability corresponding to the target video frame.

[0103] The target difference pattern is the pixel feature difference pattern between the pre-acquired real image and the AI-generated image.

[0104] In one specific embodiment, the device may further include:

[0105] The neural network training module is used to call the target video generation model using the first target interface of the target video detection model to obtain the target AI-generated video, and to obtain the target real video using the second target interface of the target video detection model, so as to construct a target video set using the target AI-generated video and the target real video, and to train the target neural network using the target video set.

[0106] In one specific embodiment, the video frame extraction module 11 may include:

[0107] A video determination unit is used to acquire the target video set and determine each target video in the target video set as a video to be detected;

[0108] Accordingly, the frame prediction result acquisition module 13 may specifically include:

[0109] The prediction label determination unit is used to analyze the target pixel features of the target video frame using the target binary classifier in the target neural network of the frame prediction layer to determine the target prediction probability corresponding to the target video frame, and to determine the prediction label corresponding to the target video frame based on a preset probability threshold.

[0110] The parameter adjustment unit is used to determine the proportion of correctly predicted frames corresponding to the target video based on the predicted labels corresponding to all the target video frames of the target video to be detected, and when the proportion of correctly predicted frames is lower than the target frame proportion, adjust the target parameters of the target binary classifier using the target loss function, and jump to the step of using the target binary classifier in the target neural network of the frame prediction layer to analyze the target pixel features of the target video frame to determine the target prediction probability corresponding to the target video frame.

[0111] In one specific embodiment, the device may further include:

[0112] The area determination module is used to determine the proportion of correctly classified videos based on the target detection results corresponding to all the target videos, and to determine the area under the target curve of the target video detection model by adjusting the preset confidence threshold; wherein, the area under the target curve includes a first area under the curve and a second area under the curve; the first area under the curve is the area under the true positive rate curve, and the second area under the curve is the area under the false positive rate curve;

[0113] The model update module is used to determine the accuracy evaluation result of the target video detection model based on the proportion of correctly classified videos and the area under the target curve, and to update the target video detection model based on the accuracy evaluation result, so as to use the updated target video detection model to perform AI-generated video detection.

[0114] Furthermore, embodiments of this application also disclose an electronic device, Figure 8 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.

[0115] Figure 8 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the AI-generated video detection method disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0116] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0117] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk, or optical disk, etc. The resources stored thereon can include an operating system 221, computer programs 222, etc., and the storage method can be temporary storage or permanent storage.

[0118] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the AI-generated video detection method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program capable of performing other specific tasks.

[0119] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned disclosed AI-generated video detection method. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0120] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0121] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0122] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

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

[0124] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for detecting AI-generated videos, characterized in that, Applied to terminal devices equipped with target video detection models, including: The video to be detected is acquired, and the frame extraction layer of the target video detection model is used to process the video to be detected based on a preset sampling frequency to obtain the target video frame. The feature extraction layer partition of the target video detection model is used to determine the target pixel differences between adjacent pixels in the target video frame, so as to determine the target pixel features corresponding to the target video frame based on the target pixel differences corresponding to each target video frame. The target pixel features corresponding to each target video frame are input into the frame prediction layer of the target video detection model, so as to use the target neural network of the frame prediction layer to analyze the target pixel features of the target video frame to determine the target prediction probability corresponding to the target video frame; the target prediction probability is the probability that the target video frame is an AI-generated image; The decision fusion layer of the target video detection model determines the target confidence level of the target video based on the target prediction probability corresponding to each target video frame in the target video to be detected. When the target confidence level is greater than a preset confidence threshold, the target video to be detected is identified as an AI-generated video, and the corresponding target detection result is output. The process of determining the target pixel differences between adjacent pixels in the target video frame by partitioning the feature extraction layer of the target video detection model, and determining the target pixel features corresponding to the target video frame based on the target pixel differences corresponding to each target video frame, includes: Starting with the structure of the generator near the input end, the neighboring pixel relationship features of the AI-generated video are analyzed using neighboring pixel relationships; the structure includes an upsampling layer and... The analysis process includes: convolutional layers (conv); Will As input to the generator, Generate the input feature mapping of the structure After processing by the upsampling layer and the convolutional layer, the target video frame of the initially obtained video to be detected is output. The specific calculation is as follows: ; in , These are the width and height of the frame image, respectively. For the number of channels, It is the feature map after upsampling; video frames and feature mapping Divided into The size is The grid, respectively using and express and The grid set, and Represent and The first in One grid; based on Calculate the relationship between neighboring pixels. ,in The relationship between neighboring pixels is calculated using the following formula: ; in yes elements, for The relationship between neighboring pixels; All grids in each frame of the image These features, when combined, constitute the neighboring pixel relationship characteristics of the image frame.

2. The AI-generated video detection method according to claim 1, characterized in that, The step of determining the target pixel difference between adjacent pixels in the target video frame by partitioning the feature extraction layer of the target video detection model includes: The feature extraction layer of the target video detection model is used to determine the feature map corresponding to the target video frame, and the target grid region corresponding to the feature map is determined. The adjacent pixels in each of the target grid regions are processed to determine the target pixel differences between adjacent pixels in the target video frame.

3. The AI-generated video detection method according to claim 1, characterized in that, The step of analyzing the target pixel features of the target video frame using the target neural network of the frame prediction layer to determine the target prediction probability corresponding to the target video frame includes: The target neural network of the frame prediction layer is used to analyze the target pixel features of the target video frame based on the target difference pattern in order to determine the target prediction probability corresponding to the target video frame; The target difference pattern is the pixel feature difference pattern between the pre-acquired real image and the AI-generated image.

4. The AI-generated video detection method according to claim 1, characterized in that, Also includes: The first target interface of the target video detection model is used to call the target video generation model to obtain the target AI-generated video, and the second target interface of the target video detection model is used to obtain the target real video, so as to construct a target video set using the target AI-generated video and the target real video, and to train the target neural network using the target video set.

5. The AI-generated video detection method according to claim 4, characterized in that, The acquisition of the video to be detected includes: Obtain the target video set, and determine each target video in the target video set as the video to be detected; Accordingly, the step of using the target neural network of the frame prediction layer to analyze the target pixel features of the target video frame to determine the target prediction probability corresponding to the target video frame includes: The target pixel features of the target video frame are analyzed using the target binary classifier in the target neural network of the frame prediction layer to determine the target prediction probability corresponding to the target video frame, and the prediction label corresponding to the target video frame is determined based on a preset probability threshold. Based on the predicted labels corresponding to all the target video frames of the video to be detected, the proportion of correctly predicted frames corresponding to the video to be detected is determined. When the proportion of correctly predicted frames is lower than the target proportion, the target parameters of the target binary classifier are adjusted using the target loss function, and the process jumps to the step of using the target binary classifier in the target neural network of the frame prediction layer to analyze the target pixel features of the target video frame to determine the target prediction probability corresponding to the target video frame.

6. The AI-generated video detection method according to claim 5, characterized in that, The target loss function is the weighted cross-entropy loss function.

7. The AI-generated video detection method according to claim 5, characterized in that, Also includes: The proportion of correctly classified videos is determined based on the target detection results corresponding to all the target videos, and the area under the target curve of the target video detection model is determined by adjusting the preset confidence threshold; wherein, the area under the target curve includes a first area under the curve and a second area under the curve; the first area under the curve is the area under the curve of the true positive rate, and the second area under the curve is the area under the curve of the false positive rate; The accuracy evaluation result of the target video detection model is determined based on the proportion of correctly classified videos and the area under the target curve. The target video detection model is then updated based on the accuracy evaluation result to perform AI-generated video detection using the updated target video detection model.

8. An AI-generated video detection device, characterized in that, Applied to terminal devices equipped with target video detection models, including: The video frame extraction module is used to acquire the video to be detected and to process the video to be detected using the frame extraction layer of the target video detection model based on a preset sampling frequency to acquire the target video frame. The feature extraction module is used to determine the target pixel differences between adjacent pixels in the target video frame by using the feature extraction layer partition of the target video detection model, so as to determine the target pixel features corresponding to the target video frame based on the target pixel differences corresponding to the target video frame. The frame prediction result acquisition module is used to input the target pixel features corresponding to each target video frame into the frame prediction layer of the target video detection model, so as to use the target neural network of the frame prediction layer to analyze the target pixel features of the target video frame to determine the target prediction probability corresponding to the target video frame; the target prediction probability is the probability that the target video frame is an AI-generated image; The video detection result output module is used to determine the target confidence level of the video to be detected based on the target prediction probability corresponding to each target video frame in the video to be detected by the decision fusion layer of the target video detection model, and when the target confidence level is greater than a preset confidence threshold, the video to be detected is determined to be an AI-generated video, so as to output the corresponding target detection result. Specifically, the feature extraction module is used for: Starting with the structure of the generator near the input end, the neighboring pixel relationship features of the AI-generated video are analyzed using neighboring pixel relationships; the structure includes an upsampling layer and... The analysis process includes: convolutional layers (conv); Will As input to the generator, Generate the input feature mapping of the structure After processing by the upsampling layer and the convolutional layer, the target video frame of the initially obtained video to be detected is output. The specific calculation is as follows: ; in , These are the width and height of the frame image, respectively. For the number of channels, It is the feature map after upsampling; video frames and feature mapping Divided into The size is The grid, respectively using and express and The grid set, and Represent and The first in One grid; based on Calculate the relationship between neighboring pixels. ,in The relationship between neighboring pixels is calculated using the following formula: ; in yes elements, for The relationship between neighboring pixels; All grids in each frame of the image These features, when combined, constitute the neighboring pixel relationship characteristics of the image frame.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the AI-generated video detection method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, Used to store a computer program, wherein the computer program, when executed by a processor, implements the AI-generated video detection method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Image forgery detection method, system and device based on pixel difference perception

    CN120355949A