Video data processing method and device, electronic equipment and storage medium

Through video data processing methods, target detection models and comprehensive prediction models are used to detect anomalies in document images, solving the problems of low efficiency and high cost of traditional manual review, and achieving efficient and accurate identification of document authenticity.

CN118628948APending Publication Date: 2024-09-10TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310258759.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-09
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

Traditional manual review methods are inefficient and costly in identifying document authenticity, and cannot effectively process large amounts of video data, resulting in increased work efficiency and labor costs.

Method used

Through the video data processing method, we obtain the video frame sequence, select key frame images, detect the coordinates of the document components, use the target detection model to perform anomaly detection, and combine the comprehensive prediction model to obtain the document detection results to achieve all-round detection of the document image and improve detection accuracy. sex and efficiency.

Benefits of technology

It improves the accuracy and efficiency of identifying the authenticity of document information, reduces the calculation volume and cost of manual review, and realizes automated video data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118628948A
    Figure CN118628948A
Patent Text Reader

Abstract

The invention discloses a video data processing method and device, electronic equipment and a storage medium, and the method comprises the steps: selecting a plurality of key frame images according to certificate image information in a video frame sequence, and selecting a target region which needs to be subjected to key detection according to the coordinate position information of different certificate assemblies in the key frame images, performing anomaly detection on the key frame images through a target detection model to obtain a first anomaly detection result, performing anomaly detection on target images in a target area in the key frame images through the target detection model to determine a second anomaly detection result, and finally obtaining a certificate detection result of the video frame sequence through a comprehensive prediction model; abnormal detection is carried out from the overall dimension and the local dimension, all-directional detection of the image is completed, and the accuracy of a detection result is improved; the key frame image is processed, the detection accuracy is guaranteed, meanwhile, the data calculation amount is reduced, the overall efficiency is improved, the labor cost is reduced, and the method can be widely applied to the technical field of computers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a video data processing method, device, electronic equipment and storage medium. Background Art

[0002] As online business processing becomes more and more popular in life, there are more and more scenarios for document authentication based on real-time video data. Documents are usually used to prove the identity of users, including but not limited to ID cards, passports, teacher certificates, employee certificates, etc. In various occasions where document authentication is used, it is usually necessary to identify the authenticity of the document to ensure information security.

[0003] Traditional technology usually uses manual review, which involves visually checking videos to determine whether the certificate has been tampered with. Manual review will increase the time required to review user data and reduce work efficiency. On the other hand, it will consume a lot of manpower and be costly. Summary of the invention

[0004] In view of this, embodiments of the present invention provide a video data processing method, device, electronic device and storage medium with high efficiency and low cost, so as to improve the accuracy of authenticity identification of certificate information in video data.

[0005] An aspect of an embodiment of the present invention provides a video data processing method, including:

[0006] Obtain a video frame sequence containing the document to be detected;

[0007] Selecting a plurality of key frame images from the video frame sequence according to the document image information of each frame image in the video frame sequence;

[0008] Obtaining coordinate position information of different certificate components in each key frame image, and selecting a target area according to the coordinate position information of the certificate components;

[0009] Performing anomaly detection on each key frame image through the target detection model to determine the abnormal area in the key frame image, and then determining the first anomaly detection result of the key frame image according to the overlapping information between the abnormal area and the target area;

[0010] Performing anomaly detection on a target image in a target area in each key frame image by using a target detection model to determine a second anomaly detection result of the target image;

[0011] According to the first anomaly detection result and the second anomaly detection result, a document detection result of the video frame sequence is obtained through a comprehensive prediction model.

[0012] Another aspect of the present invention provides a video data processing device, including:

[0013] The first module is used to obtain a video frame sequence containing the document to be detected;

[0014] The second module is used to select a plurality of key frame images from the video frame sequence according to the document image information of each frame image in the video frame sequence;

[0015] The third module is used to obtain the coordinate position information of different certificate components in each key frame image, and select the target area according to the coordinate position information of the certificate components;

[0016] The fourth module is used to perform anomaly detection on each key frame image through the target detection model, determine the abnormal area in the key frame image, and then determine the first anomaly detection result of the key frame image according to the overlapping information between the abnormal area and the target area;

[0017] A fifth module is used to perform anomaly detection on a target image in a target area in each key frame image by using a target detection model, and determine a second anomaly detection result of the target image;

[0018] The sixth module is used to obtain the document detection result of the video frame sequence through a comprehensive prediction model according to the first anomaly detection result and the second anomaly detection result.

[0019] Optionally, the first module is specifically used for:

[0020] Extracting multiple candidate video frames from the original video according to a preset time interval;

[0021] The coordinate information of each vertex of the certificate is detected from each candidate video frame through a lightweight convolutional neural network;

[0022] According to the coordinate information of each vertex, a video frame image containing the document to be detected is cropped from the candidate video frame;

[0023] The video frame images containing the certificate to be detected are combined to obtain a video frame sequence.

[0024] Optionally, the second module is specifically used for:

[0025] Obtaining document image information of each frame image in a video frame sequence; wherein the document image information includes at least one of the following: document rotation angle, illumination scene score, blur scene score, color cast information, and temporal position of the video frame;

[0026] According to the document image information, a feature vector corresponding to each frame image is constructed;

[0027] According to the feature vector corresponding to each frame image, the criticality information of each frame image is calculated through the logistic regression model;

[0028] The criticality information of each frame image is sorted, and a plurality of key frame images are selected from images with high criticality.

[0029] Optionally, the second module is further specifically used for:

[0030] Obtaining the relative angle between the document and the video camera;

[0031] Get the length of each side of the certificate in each frame image;

[0032] According to the relative angle, the rotation angle of the document is obtained by calculating the length ratio of each side in the document.

[0033] Optionally, the second module is further specifically used for:

[0034] Obtain feature vectors of multiple frames of sample images and true label information of the sample images;

[0035] Inputting the feature vector of the sample image into the first initial model to perform label prediction and obtain a label prediction result;

[0036] According to the comparison result between the label prediction result and the real label information, the model parameters in the first initial model are adjusted until the matching degree between the label prediction result output by the first initial model and the real label information meets the training requirements, thereby obtaining a logistic regression model.

[0037] Optionally, the target detection model includes a Transformer network model, and the fourth module is specifically used for:

[0038] Input the feature information of the key frame image into the Transformer network model to generate the abnormal area of ​​the key frame image;

[0039] The abnormal region is overlapped and compared with the target region. When there is a partial or complete overlap between the abnormal region and the target region, it is determined that the first abnormality detection result of the key frame image is an abnormal state.

[0040] Optionally, the fourth module is further specifically used for:

[0041] Generate RGB images and grayscale images of each key frame image;

[0042] Input the RGB image into the first branch network for feature extraction to obtain a first feature vector set;

[0043] After inputting the grayscale image into the restrictive convolution filter to extract edge features, the extracted edge features are input into the second branch network to extract features, thereby obtaining a second feature vector set;

[0044] The first feature vector set and the second feature vector set are input into the Transformer network model to determine the abnormal area corresponding to the key frame image detected as abnormal.

[0045] Optionally, the fourth module is further specifically used for:

[0046] Obtain sample feature information and the real detection frame corresponding to the sample feature information;

[0047] Input the sample feature information into the second initial model for network prediction to obtain a predicted detection box;

[0048] Calculate a first loss value of the second initial model according to the real detection frame and the predicted detection frame; wherein the first loss value is used to characterize the difference in geometric factors between the real detection frame and the predicted detection frame;

[0049] Calculate a second loss value of the predicted detection box according to the first loss value; wherein the second loss value is used to characterize the probability that the predicted detection box is the same as the real detection box;

[0050] A third loss value of the second initial model is calculated according to the second loss value, and model parameters of the second initial model are updated according to the third loss value to obtain a Transformer network model.

[0051] Optionally, the fourth module is further specifically used for:

[0052] Calculate the center point distance between the real detection box and the predicted detection box;

[0053] Calculate the width difference between the real detection box and the predicted detection box;

[0054] Calculate the length difference between the real detection box and the predicted detection box;

[0055] Get the minimum bounding rectangle of the real detection box and the predicted detection box;

[0056] Calculate the sum of the squares of the length and width of the minimum enclosing rectangle;

[0057] The first loss value of the second initial model is calculated based on the center point distance, width difference, length difference and sum of squares.

[0058] Optionally, the target area includes a face area and a number area, and the fifth module is specifically used for:

[0059] The Transformer network model is used to perform anomaly detection on the image in the face area or the number area in each key frame image to obtain a second anomaly detection result of the face area or the number area.

[0060] Optionally, the sixth module is specifically used for:

[0061] Constructing a first result feature according to the first anomaly detection result;

[0062] Constructing a second result feature according to the second anomaly detection result;

[0063] Concatenate the first result feature and the second result feature to obtain a concatenated feature;

[0064] Normalize the concatenated features to obtain input features;

[0065] The input features are fed into the comprehensive prediction model to generate document detection results for the video frame sequence.

[0066] Another aspect of an embodiment of the present invention provides an electronic device, including a processor and a memory;

[0067] The memory is used to store programs;

[0068] The processor executes the program to implement the above video data processing method.

[0069] Another aspect of the embodiment of the present invention provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the above-mentioned video data processing method.

[0070] The embodiment of the present invention also discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the above-mentioned video data processing method.

[0071] The embodiment of the present invention first selects multiple key frame images according to the document image information of each frame image in the acquired video frame sequence, and then selects the target area that needs to be focused on according to the coordinate position information of different document components in the key frame image, and then performs anomaly detection on each key frame image through the target detection model to obtain the first anomaly detection result of the key frame image, and performs anomaly detection on the target image in the target area in each key frame image through the target detection model to determine the second anomaly detection result of the target image, and finally obtains the document detection result of the video frame sequence through the comprehensive prediction model; the present invention starts from the two dimensions of the overall key frame image and the local target image, performs corresponding anomaly detection, can completely complete the all-round detection of the image, and improves the accuracy of the anomaly detection result; in addition, the present invention processes the key frame images in the video frame sequence, reduces the amount of data for image processing, and reduces the amount of computation in the processing process while using the key frame images to ensure the detection accuracy, thereby improving the overall efficiency of anomaly detection and reducing labor costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0073] Figure 1 A schematic diagram of an implementation environment of a video data processing method provided by an embodiment of the present invention;

[0074] Figure 2 A schematic diagram of a flow chart of a video data processing method provided by an embodiment of the present invention;

[0075] Figure 3 A schematic diagram of a process for obtaining a video frame sequence containing a document to be detected provided by an embodiment of the present invention;

[0076] Figure 4 A schematic diagram of a process of cropping a video frame image containing a document to be detected provided by an embodiment of the present invention;

[0077] Figure 5 A schematic diagram of a process for selecting multiple key frame images provided by an embodiment of the present invention;

[0078] Figure 6 A schematic diagram of a process for obtaining the rotation angle of a certificate provided by an embodiment of the present invention;

[0079] Figure 7 A flow chart of a training process of a logistic regression model provided by an embodiment of the present invention;

[0080] Figure 8 A schematic diagram of a process for determining a first abnormality detection result of a key frame image provided by an embodiment of the present invention;

[0081] Fig. 9 A schematic diagram of the structure of a Transformer network model provided by an embodiment of the present invention;

[0082] Fig.10 A schematic diagram of a process for generating an abnormal area of ​​a key frame image provided by an embodiment of the present invention;

[0083] Fig.11 A schematic diagram of another process of generating an abnormal area of ​​a key frame image provided by an embodiment of the present invention;

[0084] Fig.12A flowchart of a training process of a Transformer network model provided by an embodiment of the present invention;

[0085] Fig.13 A schematic diagram of a process for calculating a first loss value of a second initial model provided by an embodiment of the present invention;

[0086] Fig.14 A schematic diagram of a process for determining a second abnormality detection result of a target image provided by an embodiment of the present invention;

[0087] Fig.15 A schematic flow chart of a video data processing method according to a specific embodiment of the present invention;

[0088] Fig.16 A schematic diagram of the structure of a video data processing device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0089] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application 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 application and are not used to limit the present application.

[0090] First, the technical terms involved in the embodiments of the present invention are introduced:

[0091] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.

[0092] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0093] Computer Vision (CV) is a science that studies how to make machines "see". To put it more specifically, it refers to machine vision such as using cameras and computers to replace human eyes to identify and measure targets, and further perform graphic processing so that computer processing becomes an image that is more suitable for human eye observation or transmission to instrument detection. As a scientific discipline, computer vision studies related theories and technologies, and attempts to establish an artificial intelligence system that can obtain information from images or multi-dimensional data. Computer vision technology usually includes image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous positioning and map construction, and other technologies, as well as common biometric recognition technologies such as face recognition and fingerprint recognition.

[0094] Machine Learning (ML) is a multi-disciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and self-learning.

[0095] As online business processing becomes more and more popular in life, there are more and more scenarios for document authentication based on real-time video data. Documents are usually used to prove the identity of users, including but not limited to ID cards, passports, teacher certificates, employee certificates, etc. In various occasions where document authentication is used, it is usually necessary to identify the authenticity of the document to ensure information security.

[0096] Traditional technology usually uses manual review, which involves visually checking videos to determine whether the certificate has been tampered with. Manual review will increase the time required to review user data and reduce work efficiency. On the other hand, it will consume a lot of manpower and be costly.

[0097] Based on the above situation, an embodiment of the present invention provides a video data processing method, device, electronic device and storage medium. First, according to the document image information of each frame image in the acquired video frame sequence, multiple key frame images are selected, and then the target area that needs to be focused on is selected according to the coordinate position information of different document components in the key frame image. Then, anomaly detection is performed on each key frame image through a target detection model to obtain a first anomaly detection result of the key frame image, and anomaly detection is performed on the target image in the target area in each key frame image through the target detection model to determine a second anomaly detection result of the target image, and finally, the document detection result of the video frame sequence is obtained through a comprehensive prediction model; the present invention starts from the two dimensions of the overall key frame image and the local target image, performs corresponding anomaly detection, can completely complete the all-round detection of the image, and improves the accuracy of the anomaly detection result; in addition, the present invention processes the key frame images in the video frame sequence, reduces the amount of data for image processing, and reduces the amount of calculation in the processing process while using the key frame images to ensure the detection accuracy, thereby improving the overall efficiency of anomaly detection and reducing labor costs.

[0098] See also Figure 1 , Figure 1 A schematic diagram of an implementation environment provided for an embodiment of the present invention, the implementation environment includes a user terminal 110 and a server 120.

[0099] The user terminal 110 includes a video shooting device 111, and the video file containing the certificate 130 is shot by the video shooting device 111 of the user terminal 110, and the video file is sent to the server 120 by the user terminal 110. The user terminal 110 can be a smart phone, a tablet computer, a car user terminal, an e-book reader, smart glasses, a smart watch, a smart TV, an MP3 player (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Group Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Group Audio Layer 4), a laptop computer, a desktop computer, etc.

[0100] The server 120 authenticates the video file containing the certificate 130 sent by the user terminal 110 to confirm whether the certificate has been tampered with. In addition, the server 120 is also used to train models such as target detection models, comprehensive prediction models, and logistic regression models. The server 120 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0101] The user terminal 110 is connected to the server 120 via a wired or wireless communication network. It should be noted that the number of user terminals 110 can be determined according to the requirements of different implementation scenarios, and this embodiment does not specifically limit the number of user terminals 110.

[0102] It is understandable that the embodiment of the present invention can also be applied to another implementation environment, which includes a server 120. The server 120 is used to train models such as target detection models, comprehensive prediction models, and logistic regression models, and to authenticate video files to confirm whether the certificate contained in the video file has been tampered with.

[0103] Reference Figure 2 , Figure 2 A schematic diagram of a video data processing method according to an embodiment of the present invention is provided. The video data processing method may be Figure 1 The server 120 shown in the figure executes the video data processing method, which includes but is not limited to the following steps S100-S600:

[0104] S100: Acquire a video frame sequence containing a certificate to be detected.

[0105] Certificates refer to various identity documents, including but not limited to identity cards, passports, teacher certificates, employee certificates, etc.; certificates to be tested refer to identity documents that need to be further authenticated; video frame sequence refers to a video file formed by multiple frames of images arranged in chronological order; video frame sequence containing certificates to be tested refers to a video file formed by multiple frames of images mainly containing certificates to be tested arranged in chronological order.

[0106] In step S100 of an embodiment of the present invention, the operating object can record a video containing the document to be detected and the background content through a user terminal, and then send the recorded video to a server. The server performs preprocessing based on the received recorded video to obtain a video frame sequence containing the document to be detected; wherein the preprocessing method includes but is not limited to random sampling and cropping.

[0107] It should be noted that in the process of obtaining the video frame sequence in the embodiment of the present invention, in addition to extracting from the video recorded by the user terminal as mentioned above, it can also be extracted from the video obtained in real time by the user terminal in an application scenario where identity authentication is required, which is not limited here.

[0108] S200: Select multiple key frame images from the video frame sequence according to the document image information of each frame image in the video frame sequence.

[0109] Among them, the video frame sequence includes multiple frames of images, and the content displayed in each frame of the image is different. For example, during the video recording process, the first few frames of the video may only capture the relevant background content, and do not contain the document image. Therefore, this type of image cannot be used as an image for subsequent processing. Therefore, the purpose of step S200 of the embodiment of the present invention is to extract key frame images from the video sequence of many image frames for the subsequent image processing process. Document image information refers to the image attribute information of the document reflected in the frame image, including but not limited to the image quality and shooting time of the document. The image quality of the document includes but is not limited to the shape restoration, clarity and color restoration of the document. The key frame image refers to an image file whose document image information meets the preset requirements. For example, the clarity of the document appearing in the image meets the preset requirements, or the shape restoration of the document appearing in the image meets the preset requirements.

[0110] Specifically, the embodiment of the present invention first determines the document image information of each frame image in the video frame sequence, and then compares the document image information and the preset document image requirements, and selects multiple images that meet the preset document image requirements from the video frame sequence as key frame images. It should be noted that the document image information and the preset document image requirements are determined according to the actual application, and this embodiment does not impose specific restrictions. The number and method of key frame images selected from the video frame sequence are determined according to the actual application, and this embodiment does not impose specific restrictions; for example, the video frame sequence is divided into M time intervals, and a key frame image is selected from each time interval; illustratively, the time interval of the video frame sequence is divided into 3 segments, and one frame of image that meets the preset requirements is selected from each of the 3 time intervals to form 3 key frame images.

[0111] S300, obtaining coordinate position information of different certificate components in each key frame image, and selecting a target area according to the coordinate position information of the certificate components.

[0112] The coordinate position information of the certificate component refers to the coordinate position information of each vertex of the certificate component in the image, and the target area refers to a specific area in the image that contains the certificate component image. Specifically, the coordinate position information of different certificate components in each key frame image is detected by the position detection model, and then the area formed by the connecting line of two adjacent vertices in the determined coordinate position information is determined as the target area.

[0113] The specific model of the position detection model is determined according to the actual application, and this embodiment does not make any specific restrictions. The position detection model in this embodiment includes but is not limited to a convolutional neural network model (faster-rnn), a target detection model (SSD, Single Shot MultiBox Detector), a target detection algorithm (YOLO, You Only Look Once), etc.

[0114] S400, performing anomaly detection on each key frame image through a target detection model to determine an abnormal area in the key frame image, and then determining a first anomaly detection result of the key frame image based on overlapping information between the abnormal area and the target area.

[0115] Among them, when detecting the certificate in the image, in order to improve the detection efficiency, the embodiment of the present invention first finds the abnormal area from the key frame image, and then obtains the corresponding first abnormal detection result. It can be understood that when performing abnormal detection on the certificate image, the locations where the certificate is tampered or falsified usually appear in the certificate personal information, certificate head portrait or certificate anti-counterfeiting label and so on. Therefore, the abnormal detection is purposefully performed on the target area, so that the detection is more targeted and the efficiency of abnormal detection can be improved. The abnormal area indicates the area where the information may be tampered; the first abnormal detection result includes the abnormal area contained in the key frame image and whether each abnormal area is in an abnormal state. The target detection model is a model for predicting abnormal areas of an image. The trained target detection model can be used to predict abnormal areas of an image. The input of the target detection model is an image, and the output of the target detection model is the first abnormal detection result.

[0116] Specifically, step S400 of the embodiment of the present invention can input each key frame image into a trained target detection model. The trained target detection model determines the abnormal area according to the input image and the determined model parameters, and determines whether the abnormal area is in an abnormal state according to the overlapping information between the abnormal area and the target area; wherein, the more overlapping information between the abnormal area and the target area, the greater the possibility that the target area has been tampered with. It should be noted that the target detection model is determined according to the actual application, and this embodiment does not make specific restrictions. For example, the target detection model includes a Transformer network model.

[0117] S500: Perform anomaly detection on a target image in a target area in each key frame image by using a target detection model to determine a second anomaly detection result of the target image.

[0118] Among them, the target image of the target area refers to the regional image of the key information in the target area that can be used for document authenticity identification. The second abnormality detection result includes the target image area and whether the target image area is in an abnormal state. Similarly, if the trained target detection model is used to perform abnormality detection on the target image of the target area, the input of the target detection model is the image of the target area, and the output of the target detection model is the target image area of ​​the target area and whether the area is in an abnormal state.

[0119] Specifically, step S500 of the embodiment of the present invention can input the image of the target area into the target detection model. The trained target detection model determines the abnormal area of ​​the target area according to the input image of the target area and the determined model parameters, and determines whether the area of ​​the target image is in an abnormal state according to the overlapping information between the abnormal area of ​​the target area and the area corresponding to the target image; wherein, the more overlapping information between the abnormal area of ​​the target area and the area corresponding to the target image, the greater the possibility that the target image area of ​​the target area has been tampered with.

[0120] S600. According to the first anomaly detection result and the second anomaly detection result, obtain the document detection result of the video frame sequence through a comprehensive prediction model.

[0121] Among them, the certificate detection result includes any one of the certificate being tampered with and the certificate not being tampered with. The trained comprehensive prediction model is used to predict the certificate detection result of the video frame sequence based on the first anomaly detection result and the second anomaly detection result. The input of the comprehensive prediction model is the first anomaly detection result and the second anomaly detection result, and the output of the comprehensive prediction model is the certificate detection result of the video frame sequence. It should be noted that the sample data required for the training of the comprehensive prediction model includes positive sample data of real certificates whose certificate information has not been tampered with and negative sample data of fake certificates whose certificate information has been tampered with. The specific model structure of the comprehensive prediction model is determined according to the actual application, and this embodiment does not make specific restrictions. For example, the comprehensive prediction model includes a random forest model.

[0122] Optionally, see Figure 3 , step S100 includes but is not limited to steps S110-S140:

[0123] S110 . Extracting a plurality of candidate video frames from the original video according to a preset time interval.

[0124] In the embodiment of the present invention, the original video refers to the video file recorded and uploaded by the operation object through the user terminal. The original video includes all video frame files from the start time to the end time, and a frame image in the original video may include the certificate to be detected and other background content. The candidate video frame refers to the video frame that is used to cut out only the certificate to be detected in the later stage.

[0125] Exemplarily, in step S110, after receiving the original video uploaded by the user terminal, the server evenly extracts multiple video frames containing the certificate to be detected from the original video as candidate video frames at a preset time interval. Extracting multiple candidate video frames from the original video can reduce the amount of calculation and improve the calculation speed without affecting the detection result.

[0126] It should be noted that the preset time interval is determined according to the actual application, and this embodiment does not impose any specific restrictions. For example, the preset time interval is 1 second. The number of candidate video frames is determined according to the actual application, and this embodiment does not impose any specific restrictions. When the duration of the original video is determined, the preset time interval and the number of candidate video frames affect each other. The longer the preset time interval, the fewer the number of candidate video frames. In practical applications, you can first determine either the preset time interval or the number of candidate video frames, and then further determine the other one according to the duration of the original video; for example, first fix the number of candidate video frames to N, and then determine the time interval according to the duration of the original video and the N candidate video frames; or, first fix the time interval of the candidate video frames, and then determine the number of candidate video frames according to the time interval and the duration of the original video.

[0127] S120, detecting the coordinate information of each vertex of the certificate from each candidate video frame through a lightweight convolutional neural network.

[0128] It should be noted that, compared with heavyweight networks, lightweight convolutional neural networks refer to deep learning networks with fewer parameters, less computation, and shorter inference time. Lightweight convolutional neural networks include but are not limited to MobileNet, which is used as the backbone network and then connected to the detection head. The specific network structure of MobileNet is not restricted.

[0129] Exemplarily, the specific process of the embodiment of the present invention using the lightweight convolutional neural network MobileNet to detect vertex coordinate information is as follows: First, use the lightweight mobilenet network to extract network features from each candidate video frame. After each picture in the video frame passes through the CNN network, a feature map of size 25x19x4 is obtained, where 25x19 is the size of the output feature map, and 4 represents the heat map. Then, four heat maps are used to predict the four vertices of the document respectively. Each vertex is responsible for predicting the coordinate position of an object vertex. After the CNN network outputs the feature value, it is normalized and other post-processing operations are performed on the feature map to complete the output of the four vertex coordinate positions.

[0130] S130 . Cut out a video frame image containing the document to be detected from the candidate video frame according to the coordinate information of each vertex.

[0131] Specifically, in the embodiment of the present invention, the cropped video frame image only contains the document to be detected, and the background content in the candidate video frame is removed. Specifically, for each candidate video frame, the corresponding positions are determined from the candidate video frame according to the coordinate information of each vertex, and a closed area is constructed according to each position, and the closed area is cropped from the candidate video frame as the video frame image containing the document to be detected.

[0132] See also Figure 4 It is understandable that during the shooting of the original video, if the ID card is not directly in front of the camera of the user terminal, the image shape of the ID card in the candidate video frame will be deformed to a certain extent. In order to make the subsequent detection results more accurate, the video frame image that only contains the ID card to be detected after cropping can be transformed to make the image shape of the detected ID card closer to the real shape. Transformation processing includes but is not limited to perspective transformation. Perspective transformation (PerspectiveTransformation) refers to the condition that the perspective center, image point, and target point are collinear, and the image receiving surface (perspective surface) is rotated around the trace (perspective axis) by a certain angle according to the perspective rotation law, thereby destroying the original projection light beam and still keeping the projection geometry on the image receiving surface unchanged.

[0133] Compared with traditional target detection or image segmentation algorithms, this method uses the fact that the ID card is a rigid body and cannot be deformed. A lightweight convolutional neural network is used to detect multiple vertex coordinate information of the ID card, and the video frame image containing the ID card to be detected is cropped based on the multiple vertex coordinate information. This method has higher computational efficiency and accuracy. The server only needs milliseconds to process multiple video frames extracted from a video.

[0134] S140: Combine the video frame images containing the document to be detected to obtain a video frame sequence.

[0135] The video frame sequence refers to a sequence of images arranged in time sequence. Specifically, the video frame images containing the to-be-detected certificate are arranged and combined in time sequence to obtain a video frame sequence containing the to-be-detected certificate.

[0136] It is understandable that the embodiment of the present invention obtains the video frame sequence by combination. The above combination method can be arranged and combined in chronological order, or can be arranged and combined according to the memory size occupied by different frame images, or can be randomly combined, which is not limited here.

[0137] Optionally, see Figure 5 Step S200 includes but is not limited to steps S210-S240:

[0138] S210, obtaining the document image information of each frame image in the video frame sequence; wherein the document image information includes at least one of the following: document rotation angle, lighting scene score, blur scene score, color cast information, and time sequence position of the video frame.

[0139] Among them, the document rotation angle refers to the angle at which the document deviates from the specified center line in the image, the lighting scenario score refers to the score determined based on the lighting quality of the document image, the blur scenario score refers to the score determined based on the clarity or blurriness of the document image, the color deviation information refers to the score information determined based on the degree of color deviation of the document image, and the temporal position of the video frame refers to the temporal interval information of the video frame in the video frame sequence.

[0140] Specifically, step S210 of the embodiment of the present invention first determines the specific information content contained in the document image information, which may include one or more image information, and then calculates the score of each image information of each frame image in the video frame sequence. For example, the document image information includes five image information items, namely, the document rotation angle, the illumination scenario score, the blur scenario score, the color cast information, and the temporal position of the video frame, and each frame image in the video frame sequence includes an equal portion of the five image information items.

[0141] It should be noted that the specific calculation method of the document rotation angle, lighting scene score, blur scene score and color cast information is determined according to the actual application, and this embodiment does not impose any specific restrictions. For example, the document rotation angle can be calculated based on the coordinate information of each fixed point of the document, and the lighting scene score, blur scene score and color cast information can be obtained by constructing a lightweight classification model, training the classification model, and predicting it through the trained classification model.

[0142] S220, constructing a feature vector corresponding to each frame image according to the document image information.

[0143] The feature vector corresponding to the image refers to a one-dimensional vector composed of the document image information. The numerical value contained in the feature vector is determined by the document image information, and the order of multiple numerical values ​​corresponding to multiple document image information in the feature vector is determined according to preset requirements. Specifically, the specific numerical values ​​of one or more document image information determined for each frame of the image are combined into a corresponding feature vector in a preset order. For example, the document image information sequentially includes five image information items: the document rotation angle, the lighting scene score, the blur scene score, the color cast information, and the temporal position of the video frame. Then, the feature vector corresponding to each frame of the image constructed according to the document image information is (x1, x2, x3, x4, x5), where x1 represents the document rotation angle, x2 represents the lighting scene score, x3 represents the blur scene score, x4 represents the color cast information, and x5 represents the temporal position of the video frame.

[0144] It should be noted that, in order to facilitate calculation, the feature vectors corresponding to each frame image may be simplified, for example, the feature vectors corresponding to each frame image may be normalized.

[0145] S230 , obtaining criticality information of each frame image through calculation using a logistic regression model according to the feature vector corresponding to each frame image.

[0146] It should be noted that the logistic regression model is a commonly used prediction model, and a logistic regression model trained based on known data can be used for prediction. In this embodiment, the input of the logistic regression model is the feature vector corresponding to each frame of the image, and the output of the logistic regression model is the criticality information value. The criticality information characterizes the probability of the image being used for later authenticity identification.

[0147] Specifically, step S230 of the embodiment of the present invention first trains a logistic regression model based on known feature vectors of multiple frames of images and corresponding criticality information as sample data, and then inputs the feature vector corresponding to the image of the to-be-determined criticality information as prediction data into the trained logistic regression model to obtain the criticality information corresponding to the to-be-determined image. It should be noted that during the training and prediction process of the logistic regression model, the input data type and data sequence of the sample data and the prediction data are the same. For example, the sample data input data of the logistic regression model are, in sequence: sample document rotation angle, sample lighting scenario score, sample blur scenario score, sample color deviation information, and the temporal position of the sample video frame, and the test data input data of the logistic regression model are, in sequence: predicted document rotation angle, predicted lighting scenario score, predicted blur scenario score, predicted color deviation information, and the temporal position of the predicted video frame.

[0148] S240 , sorting the criticality information of each frame image, and selecting a plurality of key frame images from images with high criticality.

[0149] Specifically, the sorting method includes arranging in descending order or ascending order. Taking descending order as an example, the critical information values ​​of two frames of images are obtained at random, and the one with the larger critical information value is arranged in the front, and the one with the smaller critical information value is arranged in the back. Then, the other critical information values ​​are compared with the front value in turn. If the other critical information value is larger, it is arranged in the front, otherwise, it is arranged in the back; select the images corresponding to the first several critical information arranged in descending order as key frame images. Similarly, if the critical information of each frame image is arranged in ascending order, the specific method of selecting multiple key frame images is deduced accordingly.

[0150] It should be noted that the number of key frame images selected in the embodiment of the present invention is determined according to the actual application, and this embodiment does not impose any specific restrictions. The more key frame images selected, the more accurate the result of the document authenticity identification, and at the same time, the amount of calculation will increase accordingly.

[0151] In this embodiment, based on the image feature vector and logistic regression model that characterize the quality characteristics of the video frame, images with high criticality are found from multiple frames as key frame images, and the key frame images are used for subsequent authenticity detection of documents, thereby improving the prediction accuracy of subsequent document detection results.

[0152] Optionally, see Figure 6 Step S210 includes but is not limited to steps S211-S213:

[0153] S211: Obtain the relative angle between the certificate and the video shooting device.

[0154] The relative angle refers to the angle between the ID card and the video camera in a specific scene, and different specific scenes correspond to different relative angles. For example, according to the projection law of three-dimensional space to a plane, the relative angle between the ID card and the video camera is defined as 0 degrees, and the relative angle between the ID card and the video camera is defined as 90 degrees.

[0155] S212: Obtain the length of each side of the certificate in each frame image.

[0156] Specifically, the coordinate information of each vertex of the certificate in each frame image can be detected by a lightweight convolutional neural network. The lengths of the two vertices can be calculated based on the coordinate information of the two vertices and the distance calculation formula. The lengths of each side of the certificate in the frame image can be calculated by separately calculating the coordinate information of two adjacent vertices.

[0157] S213. According to the relative angle, the rotation angle of the document is obtained by calculating the ratio of the lengths of the sides in the document.

[0158] The side length ratio refers to the proportional relationship between the side lengths or side length relationship formulas, and the rotation angle of the document refers to the angle of deflection of the document relative to the defined 0 degree. It should be noted that for relative angles defined in different scenarios, the side length ratio relationship formula used to calculate the rotation angle of the document is different.

[0159] Specifically, the embodiment of the present invention first determines the relative angle defined in a specific application scenario, then determines the side length proportional relationship formula used to calculate the rotation angle of the certificate according to the application scenario of the relative angle, and calculates the rotation angle of the certificate according to the lengths of each side in the certificate and the side length proportional relationship formula.

[0160] In the following example, the relative angle between the ID card and the video camera device is defined as 0 degrees, and the ID card is a quadrilateral. The calculation formula for the rotation angle of the ID card is as follows:

[0161]

[0162] Among them, y represents the rotation angle of the document, h1 represents the length of the first side, h2 represents the length of the second side, w1 represents the length of the third side, w2 represents the length of the fourth side, the first side is parallel to the second side, the third side is parallel to the fourth side, and the max operation is to find the maximum value in the brackets.

[0163] Optionally, see Figure 7 The training process of the logistic regression model in step S230 includes but is not limited to steps S231-S233:

[0164] S231, obtaining feature vectors of multiple frames of sample images and true label information of the sample images.

[0165] The sample image refers to an image for which the feature vector and the real label information have been determined and used for model training, and the real label information of the sample image refers to the real criticality information of the sample image. It should be noted that the multiple frames of sample images include images with higher real criticality information and images with lower real criticality information.

[0166] Specifically, the embodiment of the present invention selects images with higher real criticality information and images with lower real criticality information in a preset proportion as sample images from several frames of images with known feature vectors and real label information, and obtains feature vectors corresponding to the sample images. For example, from several frames of images with known feature vectors and real label information, 80% of images with higher real criticality information and 20% of images with lower real criticality information are selected, and the feature vectors corresponding to the sample images are obtained, including any one or more of the sample document rotation angle, sample lighting scenario score, sample blur scenario score, sample color deviation information, and the temporal position of the sample video frame.

[0167] S232: Input the feature vector of the sample image into the first initial model to perform label prediction to obtain a label prediction result.

[0168] The first initial model refers to a logistic regression model whose model parameters are initial values, and the label prediction result refers to the predicted label information obtained by inputting the feature vector of the sample image into the current first initial model. Specifically, the embodiment of the present invention inputs the feature vector of the sample image of a determined type and order into the first initial model, and the first initial model obtains the label prediction result based on the current model parameters.

[0169] S233. According to the comparison result between the label prediction result and the real label information, the model parameters in the first initial model are adjusted until the matching degree between the label prediction result output by the first initial model and the real label information meets the training requirements, thereby obtaining a logistic regression model.

[0170] When the feature vector of the same sample image is input, the first initial model with different model parameters may output different label prediction results. Therefore, the output label prediction result can be changed by adjusting the model parameters in the first initial model. The matching degree between the label prediction result and the real label information represents the prediction accuracy of the first initial model. The higher the matching degree, the higher the prediction accuracy.

[0171] Specifically, an embodiment of the present invention compares multiple label prediction results of multiple frame images with the corresponding real label information respectively, determines whether the prediction result of each label matches the corresponding real label information, and determines the degree of matching according to the number of matches and mismatches. If the degree of matching does not meet the training requirements, continue to adjust and update the model parameters in the first initial model and determine the updated degree of matching until the degree of matching between the label prediction results and the real label information meets the training requirements, and the first initial model of the corresponding model parameters is determined as a logistic regression model.

[0172] In this embodiment, the first initial model formula of the logistic regression model is as follows:

[0173]

[0174] Among them, x represents the feature vector of the image, ω represents the model parameters to be learned in training, and y represents the 0 / 1 label of whether the prediction result of the image is correct or not. If the prediction is correct, the label is 1, otherwise it is 0.

[0175] Optionally, see Figure 8 , the target detection model includes a Transformer network model, and step S400 includes but is not limited to steps S410-S420:

[0176] S410, inputting feature information of the key frame image into the Transformer network model to generate abnormal regions of the key frame image.

[0177] The feature information of the key frame image refers to the image attribute information extracted from the key frame image. The Transformer network model is used to predict the abnormal area of ​​the key frame image based on the feature information of the input key frame image and the determined model parameters. The input of the Transformer network model is the feature information of the key frame image, and the output of the Transformer network model is the abnormal area of ​​the key frame image.

[0178] Specifically, the embodiment of the present invention first extracts feature information of the key frame image, and then inputs the feature information into a trained Transformer network model. The trained Transformer network model processes the feature information through an internal model based on the feature information of the input key frame image, and outputs the abnormal area.

[0179] In a specific embodiment, the specific structure of the Transformer network model is shown in Fig. 9 , the Transformer network is stacked with N layers of encoders (for example, 6 layers) and M layers of decoders (for example, 6 layers), and finally the prediction head of the model is composed of a feedforward neural network to output the final detection box category and bounding box; among them, the multi-head attention mechanism structure adopts an attention mechanism with L heads (for example, 8 heads), residual connection and normalization represent residual connection to prevent network degradation, normalization represents layer standardization, which is used to normalize the activation values ​​of each layer, and the feedforward neural network is a fully connected layer.

[0180] Among them, the input of the encoder includes the feature vector information of the image features and the spatial position encoding information generated by the spatial position encoding. The position of the feature vector information of the image features is limited by the spatial position encoding information. The attention mechanism integrates the artistic conception of the image into the feature vector information of the image features to help learn the dependencies between the various parts of the image. The calculation of the attention mechanism introduces three vectors: V (Value), K (Key) and Q (Query). These three vectors are the results of multiplying the feature vector of the input image features with the set Wq, Wk, and Wv matrices. The corresponding Wq, Wk, and Wv matrices are randomly initialized and continuously optimized through model learning. The Query vector represents the vector that will be queried and calculated later, the Key vector represents the vector that will be queried and calculated later, and the Value vector represents the current actual feature; the Query vector of each part of the image is calculated by the inner product with the Key vector of the entire sequence word. The larger the inner product, the closer the relationship between the two parts. The greater the correlation between the two parts; the constant obtained by the inner product is divided by the square root of the matrix dimension, and then normalized by the softmax function to obtain the corresponding score, which indicates the correlation between the current part and each part of the entire image; the scores calculated for each part and all parts in the image are used as weights and weighted cumulative calculations are performed with the Value vector corresponding to each part to obtain the output Z of the current part; in actual application, in order to improve the calculation rate of the model, it is often calculated in the form of a matrix. The model optimizes the weight parameters of the Wq, Wk, and Wv matrices through training, and then performs weighted calculations with the Wv matrix through the softmax function. The multi-head attention mechanism extracts different features through multiple sets of Query, Key, and Value matrices, and then concatenates the extracted feature vectors to obtain the final output feature vector. For example, 8 sets of Query, Key, and Value matrices are used for feature extraction to obtain 8 input feature matrices Z. The vector calculated by the encoder output maintains the same format as the starting input vector. Therefore, the output of the encoder can still be used as the input sequence of the next layer of encoder for calculation again. The encoding layers are stacked many times and feature vectors are continuously extracted to form the encoder end of the Transformer model. Due to the feature extraction of multiple layers of attention mechanism, in order to retain the original features and ensure that the vector output by the encoder contains the original features, a residual connection is designed in the model. The initial input vector is added to the output vector calculated by the attention mechanism without any transformation, and then normalized as its output vector.

[0181] The decoder input includes object queries, which represent the image features to be predicted. The encoder converts the feature vector output from the top layer into K and V matrices through the calculation of the multi-layer attention mechanism and passes them to the decoder part. Together with the output Q matrix of the multi-head attention production layer in the decoder, it is input and output to the next multi-attention mechanism for calculation. The image feature vector output by the last layer of the decoder is input into two feedforward neural networks to map the detection category and bounding box.

[0182] S420: Perform an overlap comparison between the abnormal region and the target region, and when there is a partial or complete overlap between the abnormal region and the target region, determine that the first abnormality detection result of the key frame image is an abnormal state.

[0183] The abnormal state indicates that there is a possibility that the document has been tampered with. Specifically, firstly, the determined abnormal area and target area are extracted from the key frame image, and it is found whether there are identical parts between the abnormal area and the target area to complete the overlapping comparison. If the abnormal area and the target area are partially identical, then there is partial overlap between the abnormal area and the target area. If the abnormal area and the target area are completely identical, then there is complete overlap between the abnormal area and the target area. When there is partial or complete overlap between the abnormal area and the target area, the first abnormality detection result of the key frame image is determined to be an abnormal state, otherwise the first abnormality detection result of the key frame image is determined to be a normal state.

[0184] Optionally, see Fig.10 Step S410 includes but is not limited to steps S411-S414:

[0185] S411, generating an RGB image and a grayscale image for each key frame image.

[0186] RGB images refer to images formed by the colors of three channels: red, green, and blue. Grayscale images refer to images composed of one color channel and multiple levels of color between white and black. ID cards are generally in color, so key frame images are generally also color images. The color image of the ID card is converted into an RGB image and a grayscale image using a color conversion method. It should be noted that if the color image of the ID card is an RGB image, it is only necessary to convert the RGB image into a grayscale image.

[0187] S412: Input the RGB image into the first branch network for feature extraction to obtain a first feature vector set.

[0188] The first feature vector set represents the image attribute feature set of the RGB image of the key frame, the first branch network is used to extract the first feature vector set of the RGB image, the input data of the first branch network is the RGB image, and the output data of the first branch network is the first feature vector set. The structure of the first branch network is determined according to the actual application, and this embodiment does not make specific restrictions. In a specific embodiment, referring to Table 1, the first branch network is composed of 4 ResNet blocks, and the detailed network structure of each block is shown in Table 1. The meaning of each item in the network structure column is: [convolution kernel size, number of convolution kernels] x the number of repeated layers of the structure in brackets, and the first branch network structure is formed by stacking 4 blocks; wherein, ResNet block#1 represents the first residual block, ResNet block#2 represents the second residual block, ResNet block#3 represents the third residual block, and ResNet block#4 represents the fourth residual block.

[0189] Table 1

[0190]

[0191] S413, after inputting the grayscale image into a restrictive convolution filter to extract edge features, the extracted edge features are input into a second branch network to extract features, thereby obtaining a second feature vector set.

[0192] The restrictive convolution filter is used to extract the edge features of the grayscale image of the certificate. The input of the restrictive convolution filter is the grayscale image, and the output of the restrictive convolution filter is the edge feature vector. Compared with the traditional edge operator (such as the sobel operator), the convolution structure of the restrictive convolution filter combines the operating characteristics of the edge detection operator. At the same time, it has learnable parameters and can more effectively extract the edge features of the tampered object.

[0193] In a specific embodiment, the restrictive convolution filter expression is:

[0194]

[0195] Among them, ω k represents the kth restrictive convolution kernel, (0,0) represents the coordinates of the center point of the restrictive convolution kernel, that is, the value at the center point of the convolution kernel is -1, and the sum of the values ​​at other points is 1, and (m,n) represents the coordinates of other points.

[0196] The second feature vector set represents the image attribute feature set of the grayscale image of the key frame. The second branch network is used to extract the second feature vector set. The input of the second branch network is the edge feature vector output by the restrictive convolution filter. The output of the second branch network is the second feature vector set.

[0197] It should be noted that the structures of the first branch network and the second branch network may be the same or different. Fig.11 In a specific embodiment, the first branch network and the second branch network have the same structure, wherein the main branch network represents the first branch network, and the noise branch network represents the combination of the restrictive convolution filter and the second branch network. Integrating the transformer into the tampering detection task, the self-attention mechanism can better learn the feature information of the main branch and the noise branch. At the same time, compared with the algorithm based on Anchor or feature map detection, it can pay more attention to the context information on the entire image, and has less post-processing process.

[0198] S414: Input the first feature vector set and the second feature vector set into the Transformer network model to determine the abnormal area corresponding to the key frame image detected as abnormal.

[0199] The trained Transformer network model is used to predict whether there are abnormalities in each component area in the key frame image area. The input of the Transformer network model is the first feature vector set and the second feature vector set, and the output of the Transformer network model is each component area and the corresponding abnormality detection result of the area.

[0200] See also Fig.11 In a specific embodiment, the first feature vector set output by the first branch network and the second feature vector set output by the second branch network are combined into a high-dimensional feature sequence, and the high-dimensional feature sequence is input into the Transformer network model, and after the prediction head, the category result of whether the detection is abnormal and the detection box result of the corresponding area are output.

[0201] Optionally, see Fig.12 When the target detection model is a Transformer network model, the training process of the target detection model in step S400 includes but is not limited to steps S401-S405:

[0202] S401, obtaining sample feature information and a real detection frame corresponding to the sample feature information.

[0203] The sample feature information refers to feature information extracted from the sample image, and the real detection frame corresponding to the sample feature information represents a specific region frame determined based on the sample image. Specifically, the sample feature information is extracted based on the sample image, and the real detection frame is determined based on the sample image.

[0204] S402: Input the sample feature information into the second initial model for network prediction to obtain a predicted detection box.

[0205] The second initial model refers to a detection box prediction model whose model parameters are initial values, and the predicted detection box refers to a number of detection boxes predicted by the second initial model according to the input and output sample feature information. The input of the second initial model includes the sample feature information, and the output of the second initial model includes the predicted detection box. Specifically, the sample feature information is input into the second initial model to obtain the predicted detection box output by the second initial model.

[0206] S403. Calculate a first loss value of the second initial model according to the real detection box and the predicted detection box; wherein the first loss value is used to characterize the difference in geometric factors between the real detection box and the predicted detection box.

[0207] Specifically, the distance between the borders can be defined according to the physical meaning of the borders, and a first loss function can be designed to calculate the first loss value. The first loss function is determined according to the actual application, and this embodiment does not make specific restrictions. For example, the first loss function is designed according to four independent vertices, or the first loss function is designed according to four associated vertices and side length designs, or the first loss function is designed according to four associated vertices, side length designs and non-overlapping areas, or the first loss function is designed according to overlapping areas, center point distances, and aspect ratios.

[0208] S404. Calculate a second loss value of the predicted detection box according to the first loss value; wherein the second loss value is used to characterize the probability that the predicted detection box is the same as the real detection box.

[0209] Specifically, the second loss value is calculated according to the second loss function, and the calculation formula of the second loss function is as follows:

[0210] L box =IOU γ L EIoU

[0211] Among them, L box represents the second loss value, IOU represents the IOU value between the real detection box and the predicted detection box, γ represents the introduced parameter (used to help the network better learn difficult samples), L EIOU Indicates the first loss value. γ is determined according to actual application and is not specifically set in this embodiment. For example, γ takes a value of 0.5.

[0212] S405. Calculate a third loss value of the second initial model according to the second loss value, and update the model parameters of the second initial model according to the third loss value to obtain a Transformer network model.

[0213] Specifically, the third loss value can be determined according to the third loss function, and the calculation formula of the third loss function is as follows:

[0214]

[0215] Among them, y represents the real detection box, Represents the predicted detection box output by the second initial model. For a certain real detection box, among all the predicted detection boxes output by the second initial model, the Hungarian algorithm is used to match the predicted detection box that is most similar to the real detection box to calculate the loss value. In the above formula, N represents N real detection boxes. represents the index of the predicted detection box output by the second initial model matched by the i-th real detection box using the Hungarian algorithm, C i represents the category index of the i-th true detection box, so Represents the predicted detection box of the second initial model prediction output corresponding to the i-th real detection box in C i The probability value of the category, Φ represents the true category corresponding to the i-th true detection box, It is to calculate the loss value of the predicted detection box that does not belong to the true label. According to the second loss value L box Sure.

[0216] Optionally, see Fig.13 Step S403 includes but is not limited to steps S4031-S4036:

[0217] S4031. Calculate the center point distance between the real detection frame and the predicted detection frame.

[0218] The center point distance between the real detection frame and the predicted detection frame represents the Euclidean distance between the center of the real detection frame and the center of the predicted detection frame. The center point distance between the real detection frame and the predicted detection frame can be calculated according to the Euclidean distance formula. Specifically, firstly, the first center coordinate of the real detection frame is determined according to the coordinate of the real detection frame, and the second center coordinate of the predicted detection frame is determined according to the coordinate of the predicted detection frame, and then the center point distance between the real detection frame and the predicted detection frame is calculated according to the first center coordinate, the second center coordinate and the Euclidean distance formula.

[0219] S4032: Calculate the width difference between the real detection box and the predicted detection box.

[0220] The real detection frame and the predicted detection frame include a quadrilateral frame, and the quadrilateral frame includes two pairs of relatively parallel sides, one pair of which is the width and the other pair of which is the length. For example, the shorter of the two pairs of sides is set as the width, and the longer of the two pairs of sides is set as the length. The width difference between the real detection frame and the predicted detection frame refers to the difference between the width of the real detection frame and the width of the predicted detection frame. Specifically, the shorter side length is first calculated according to the coordinates of the real detection frame to determine the first width of the real detection frame, and the shorter side length is calculated according to the coordinates of the predicted detection frame to determine the second width of the predicted detection frame, and then the difference between the first width and the second width is used as the width difference between the real detection frame and the predicted detection frame.

[0221] S4033. Calculate the length difference between the real detection frame and the predicted detection frame.

[0222] The length difference between the real detection frame and the predicted detection frame refers to the difference between the length of the real detection frame and the length of the predicted detection frame. If one pair of side lengths of the real detection frame or the predicted detection frame is set as the width, the other pair of side lengths of the real detection frame or the predicted detection frame is set as the length. Specifically, firstly, the longer side length is calculated according to the coordinates of the real detection frame to determine the first length of the real detection frame, and the longer side length is calculated according to the coordinates of the predicted detection frame to determine the second length of the predicted detection frame, and the difference between the first length and the second length is used as the length difference between the real detection frame and the predicted detection frame.

[0223] S4034: Obtain the minimum bounding rectangle of the real detection box and the predicted detection box.

[0224] The minimum bounding rectangle of the real detection frame and the predicted detection frame refers to the minimum rectangle that can contain the real detection frame and the predicted detection frame. Specifically, first determine the coordinates of each vertex of the real detection frame and the predicted detection frame, remove the coordinates of the vertices in the overlapping area of ​​the real detection frame and the predicted detection frame, then select any 4 vertices from the remaining vertices to form multiple smaller bounding rectangles, and select the minimum bounding rectangle from the multiple smaller bounding rectangles.

[0225] S4035. Calculate the sum of the squares of the length and width of the minimum circumscribed rectangle.

[0226] Specifically, first determine the length and width of the minimum enclosing rectangle according to the coordinates of each vertex of the minimum enclosing rectangle, then calculate the square of the length of the minimum enclosing rectangle and the square of the width of the minimum enclosing rectangle, and add the square of the length of the minimum enclosing rectangle and the square of the width of the minimum enclosing rectangle to obtain the sum of the squares of the length and width of the minimum enclosing rectangle.

[0227] S4036. Calculate the first loss value of the second initial model according to the center point distance, width difference, length difference and sum of squares.

[0228] Specifically, the calculation formula of the first loss value is as follows:

[0229]

[0230] Among them, L EIOU represents the first loss value, IOU represents the IOU value between the real detection box and the predicted detection box, ρ 2 (b,b gt ) represents the center point distance between the real detection box and the predicted detection box, ρ 2 (w,w gt ) represents the width difference between the real detection box and the predicted detection box, ρ 2 (h,h gt ) represents the length difference between the real detection box and the predicted detection box, c 2 Represents the sum of the squares of the length and width of the minimum bounding rectangle of the real detection box and the predicted detection box. Represents the square of the width of the minimum bounding rectangle of the real detection box and the predicted detection box. Represents the square of the length of the minimum circumscribed rectangle. Compared with the traditional target frame detection, this embodiment can pay more attention to the overlapping area, center point distance and aspect ratio of the detection frame, and the detection result is more accurate.

[0231] Optionally, the target area includes a face area and a number area, and step S500 includes but is not limited to step S510:

[0232] S510, performing anomaly detection on the image in the face region or the number region in each key frame image through the Transformer network model to obtain a second anomaly detection result of the face region or the number region. In addition, the anomaly detection results of multiple target regions such as the face region and the number region can also be used as the second anomaly detection result.

[0233] Specifically, first, images of the face area or the number area are respectively captured from the key frame image, and then the images of the face area or the number area are input as target images into the trained Transformer network model, and the second anomaly detection result of the face area or the number area is obtained from the output of the Transformer network model.

[0234] The embodiment of the present invention takes the face area and the number area as the document area of ​​focus, and performs targeted identification on the area, which can further enhance the recall rate of tampered documents and further reduce risks. It should be noted that the target area includes but is not limited to the face area and the number area.

[0235] Optionally, see Fig.14 Step S600 includes but is not limited to steps S610-S650:

[0236] S610: Construct a first result feature according to the first abnormality detection result.

[0237] The first result feature refers to a feature value sequence formed by each element in the first anomaly detection result in a preset order. Specifically, the first anomaly detection result is arranged in the time sequence of multiple key frame images, and the first anomaly detection result in the arranged order is used as the first result feature. For example, the number of key frame images is N, and the first result feature constructed according to the first anomaly detection result is recorded as: {a1, a2, …, a N}.

[0238] S620: Construct a second result feature according to the second abnormality detection result.

[0239] The second result feature refers to a feature value sequence formed by each element in the second anomaly detection result in a preset order. Specifically, the anomaly detection results of multiple key frame images of each target image in the target area are arranged in time order, and the second anomaly detection results in the arranged order are used as the second result feature. For example, the number of key frame images is N, and the second result feature corresponding to the target area is the face area is recorded as: {b1, b2, …, b N}, the second result feature corresponding to the target area being the ID card number area is recorded as: {c1,c2,…,c N}.

[0240] S630: Concatenate the first result feature and the second result feature to obtain a concatenated feature.

[0241] Specifically, the first result feature and several second result features are connected end to end in a specific order to form a spliced ​​feature. For example, the number of key frame images is N, and the first result feature is recorded as: {a1, a2, …, a N}, the second result feature is recorded as: {b1,b2,…,b N} and {c1,c2,…,c N}, the first result feature and the second result feature are concatenated to obtain the concatenated feature: {a1, a2, …, a N ,b1,b2,…,b N ,c1,c2,…,c N}.

[0242] S640: Normalize the concatenated features to obtain input features.

[0243] Normalization is a way to simplify calculations, that is, to transform dimensioned expressions into dimensionless expressions, which become scalars, so that the absolute values ​​of the physical system values ​​become relative values, which can simplify calculations and reduce the values. Input features refer to the normalized feature value sequence used to input into the subsequent comprehensive prediction model.

[0244] S650: Input the input features into the comprehensive prediction model to generate the document detection results of the video frame sequence.

[0245] It should be noted that during the training of the comprehensive prediction model, the input data in the training sample data is the normalized sample input features, and the labels corresponding to the training sample data include 0 and 1, where 0 indicates that the document has been tampered with, and 1 indicates that the document has not been tampered with.

[0246] The input features are input into the trained comprehensive prediction model. If the prediction result output by the comprehensive prediction model is 1, it means that the certificate has not been tampered with; if the prediction result output by the comprehensive prediction model is 0, it means that the certificate has been tampered with.

[0247] Compared with directly using a voting method or a weighted summation method to output the final authentication result, this embodiment can better utilize the output features of each authentication point to achieve higher output accuracy, thereby improving the effectiveness of the entire system.

[0248] See also Fig.15 , the following is a specific embodiment to illustrate the specific video data processing process, the processing process is executed in the server, and the ID card is taken as an example.

[0249] S1. After receiving the video file sent by the user terminal, the server selects a fixed number N of video frames at equal intervals from the video frame sequence of the video file as candidate video frames, and crops the ID area in these candidate video frames according to the coordinate information to obtain a video frame sequence containing only the ID area: {T1, T2, T3...TN}.

[0250] S2. Select frames from the cropped video frame sequence, and select a video frame with the best quality and rotation angle that meets the requirements as the key frame by calculating the document rotation angle and shooting quality of each frame image in M ​​different time intervals in the cropped video frame sequence, and obtain a key frame image sequence: {T1, T2...TM}. For example, the time interval is divided into 3 segments, and one frame is selected from each of the 3 video frame sequences.

[0251] S3. For the M key frame images, they are processed by the target detection model respectively:

[0252] S3.1. Locate the coordinate positions of each component of the ID card in each key frame image (for example, the coordinate positions of the ID card portrait and ID card number), and define the target area (i.e., the area that needs to be paid attention to whether it has been tampered with) according to the positions of each component.

[0253] S3.2. Use the target detection model to detect the M key frames respectively. If tampering is detected on the document and the tampering location is in the target area, the authentication result corresponding to the frame image is a fake certificate, otherwise it is a genuine certificate. The target detection model will also output the authentication score as the first detection result.

[0254] S3.3. Use the component positions detected in step S3.1 to cut out the components that need to be focused on (for example, the face area and the ID number area), and then use the target detection model to perform authentication judgment on each key area and obtain the authentication result and authentication score as the second detection result.

[0255] S4. After summarizing the first detection result and the second detection result of each key frame image as basic features, input them into the comprehensive prediction model, and output the final authentication result.

[0256] See also Fig.16 , Fig.16 FIG. 1 is a schematic diagram of the structure of a video data processing device provided in an embodiment of the present invention. The video data processing device 1600 may be Figure 1 The server 120 shown specifically includes:

[0257] The first module 1601 is used to obtain a video frame sequence containing a document to be detected;

[0258] The second module 1602 is used to select a plurality of key frame images from the video frame sequence according to the document image information of each frame image in the video frame sequence;

[0259] The third module 1603 is used to obtain the coordinate position information of different certificate components in each key frame image, and select the target area according to the coordinate position information of the certificate components;

[0260] The fourth module 1604 is used to perform anomaly detection on each key frame image through the target detection model, determine the abnormal area in the key frame image, and then determine the first anomaly detection result of the key frame image according to the overlapping information between the abnormal area and the target area;

[0261] The fifth module 1605 is used to perform anomaly detection on the target image in the target area in each key frame image through the target detection model to determine a second anomaly detection result of the target image;

[0262] The sixth module 1606 is used to obtain the document detection result of the video frame sequence through the comprehensive prediction model according to the first abnormality detection result and the second abnormality detection result.

[0263] Another aspect of an embodiment of the present invention provides an electronic device, including a processor and a memory;

[0264] The memory is used to store programs;

[0265] The processor executes the program to achieve Figure 2-3 , Figure 5-8 , Fig.10 , Figure 12-14 The video data processing method shown in FIG.

[0266] Another aspect of the present invention provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the following Figure 2-3 , Figure 5-8 , Fig.10 , Figure 12-14 etc. video data processing methods.

[0267] The embodiment of the present invention also discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device performs the following steps: Figure 2-3 , Figure 5-8 , Fig.10 , Figure 12-14 etc. video data processing methods.

[0268] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.

[0269] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features described may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in separate physical devices or software modules. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions, and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional skills of the engineer. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.

[0270] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0271] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0272] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0273] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0274] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0275] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

[0276] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the described embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.

Claims

1. A video data processing method, It is characterized in that include: Obtain a video frame sequence containing the document to be detected; Selecting a plurality of key frame images from the video frame sequence according to the document image information of each frame image in the video frame sequence; Acquire the coordinate position information of different certificate components in each of the key frame images, and select the target area according to the coordinate position information of the certificate components; Performing anomaly detection on each of the key frame images through a target detection model to determine an abnormal region in the key frame image, and then determining a first anomaly detection result of the key frame image according to overlapping information between the abnormal region and the target region; Performing anomaly detection on a target image in the target area in each of the key frame images by using the target detection model to determine a second anomaly detection result of the target image; According to the first anomaly detection result and the second anomaly detection result, the document detection result of the video frame sequence is obtained through a comprehensive prediction model.

2. A video data processing method according to claim 1, It is characterized in that The step of obtaining a video frame sequence containing the certificate to be detected includes: Extracting multiple candidate video frames from the original video according to a preset time interval; Detecting coordinate information of each vertex of the certificate from each candidate video frame by using a lightweight convolutional neural network; According to the coordinate information of each vertex, a video frame image containing the certificate to be detected is cut out from the candidate video frame; The video frame images containing the certificate to be detected are combined to obtain the video frame sequence.

3. A video data processing method according to claim 1, It is characterized in that The selecting a plurality of key frame images from the video frame sequence according to the certificate image information of each frame image in the video frame sequence comprises: Acquire the document image information of each frame image in the video frame sequence; wherein the document image information includes at least one of the following: document rotation angle, lighting scene score, blur scene score, color cast information and time sequence position of the video frame; Constructing a feature vector corresponding to each frame image according to the document image information; According to the feature vector corresponding to each frame image, criticality information of each frame image is calculated by a logistic regression model; The criticality information of each frame image is sorted, and a plurality of key frame images are selected from images with high criticality.

4. A video data processing method according to claim 3, It is characterized in that In the step of obtaining the certificate image information of each frame image in the video frame sequence, the process of obtaining the certificate rotation angle includes: Obtaining the relative angle between the document and the video camera; Get the length of each side of the certificate in each frame image; According to the relative angle, the rotation angle of the document is obtained by calculating the ratio of the lengths of the sides in the document.

5. A video data processing method according to claim 3, It is characterized in that In the step of calculating the criticality information of each frame image through a logistic regression model according to the feature vector corresponding to each frame image, the training process of the logistic regression model includes: Obtaining feature vectors of multiple frames of sample images and true label information of the sample images; Inputting the feature vector of the sample image into the first initial model to perform label prediction to obtain a label prediction result; According to the comparison result between the label prediction result and the real label information, the model parameters in the first initial model are adjusted until the matching degree between the label prediction result output by the first initial model and the real label information meets the training requirements, thereby obtaining the logistic regression model.

6. A video data processing method according to claim 1, It is characterized in that The target detection model includes a Transformer network model. The target detection model is used to perform anomaly detection on each of the key frame images to determine an abnormal area in the key frame image, and then determine a first abnormality detection result of the key frame image according to overlapping information between the abnormal area and the target area, including: Inputting feature information of the key frame image into the Transformer network model to generate an abnormal region of the key frame image; The abnormal region is overlapped and compared with the target region, and when there is a partial or complete overlap between the abnormal region and the target region, it is determined that the first abnormality detection result of the key frame image is an abnormal state.

7. A video data processing method according to claim 6, It is characterized in that The step of inputting the feature information of the key frame image into the Transformer network model to generate an abnormal region of the key frame image includes: Generate an RGB image and a grayscale image of each key frame image; Inputting the RGB image into a first branch network for feature extraction to obtain a first feature vector set; After inputting the grayscale image into a restrictive convolution filter to extract edge features, the extracted edge features are input into a second branch network to extract features, thereby obtaining a second feature vector set; The first feature vector set and the second feature vector set are input into the Transformer network model to determine an abnormal area corresponding to when the key frame image is detected as abnormal.

8. A video data processing method according to claim 6 or 7, It is characterized in that The training process of the Transformer network model includes: Obtaining sample feature information and a real detection frame corresponding to the sample feature information; Inputting the sample feature information into a second initial model for network prediction to obtain a predicted detection box; Calculating a first loss value of the second initial model according to the real detection box and the predicted detection box; wherein the first loss value is used to characterize the difference in geometric factors between the real detection box and the predicted detection box; Calculating a second loss value of the predicted detection box according to the first loss value; wherein the second loss value is used to characterize the probability that the predicted detection box is the same as the real detection box; A third loss value of the second initial model is calculated according to the second loss value, and model parameters of the second initial model are updated according to the third loss value to obtain the Transformer network model.

9. A video data processing method according to claim 8, It is characterized in that The calculating a first loss value of the second initial model according to the real detection box and the predicted detection box includes: Calculating the distance between the center points of the real detection frame and the predicted detection frame; Calculating a width difference between the real detection frame and the predicted detection frame; Calculating the length difference between the real detection frame and the predicted detection frame; Obtaining the minimum bounding rectangle of the real detection frame and the predicted detection frame; Calculate the sum of the squares of the length and width of the minimum circumscribed rectangle; A first loss value of the second initial model is calculated based on the center point distance, the width difference, the length difference and the sum of squares.

10. A video data processing method according to claim 1, It is characterized in that The target area includes a face area and a number area, and performing abnormality detection on a target image in each of the key frame images in the target area by using the target detection model to determine a second abnormality detection result of the target image includes: Anomaly detection is performed on the image in the face area or the number area in each of the key frame images through the Transformer network model to obtain a second anomaly detection result of the face area or the number area.

11. A video data processing method according to claim 1, It is characterized in that The step of obtaining the document detection result of the video frame sequence through a comprehensive prediction model according to the first abnormality detection result and the second abnormality detection result includes: Constructing a first result feature according to the first anomaly detection result; Constructing a second result feature according to the second anomaly detection result; Splicing the first result feature and the second result feature to obtain a spliced ​​feature; Normalizing the splicing features to obtain input features; The input features are input into the comprehensive prediction model to generate a document detection result for the video frame sequence.

12. A video data processing device, It is characterized in that include: The first module is used to obtain a video frame sequence containing the document to be detected; The second module is used to select a plurality of key frame images from the video frame sequence according to the document image information of each frame image in the video frame sequence; The third module is used to obtain the coordinate position information of different certificate components in each of the key frame images, and select the target area according to the coordinate position information of the certificate components; A fourth module is used to perform anomaly detection on each of the key frame images through a target detection model, determine an abnormal area in the key frame image, and then determine a first abnormality detection result of the key frame image according to overlapping information between the abnormal area and the target area; A fifth module is used to perform anomaly detection on a target image in the target area in each of the key frame images by using the target detection model to determine a second anomaly detection result of the target image; The sixth module is used to obtain the document detection result of the video frame sequence through a comprehensive prediction model according to the first anomaly detection result and the second anomaly detection result.

13. An electronic device, It is characterized in that including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method according to any one of claims 1 to 11.

14. A computer-readable storage medium, It is characterized in that The storage medium stores a program, and the program is executed by a processor to implement the method according to any one of claims 1 to 11.

15. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.

Citation Information

Cited By

  • Target detection method and device

    CN121214405A