Video detection method, device, equipment, readable storage medium and program product

By acquiring and analyzing feature sequences in game videos, using deep learning and computer vision technology to determine abnormal videos, and deduplication processing, the problem of low accuracy of video abnormality detection in the prior art is solved, and the detection accuracy and reporting are improved efficiency.

CN116524386BActive Publication Date: 2024-09-06TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210071155.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-21
Publication Date
2024-09-06
Estimated Expiration
2042-01-21

AI Technical Summary

Technical Problem

The prior art has low accuracy in video anomaly detection, especially in game video processing. Due to the sparse data volume and incomplete features, existing solutions are limited.

Method used

By obtaining the feature sequence of the video to be detected, the relationship between objects in the video is characterized, and using long-term memory neural networks and depth estimation, semantic segmentation models and other technologies, abnormal videos are determined and deduplication is performed to improve detection accuracy.

Benefits of technology

The accuracy of video abnormality detection is improved, and the repetition rate of abnormal video content is reduced through deduplication processing, thereby improving the efficiency of abnormal reporting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116524386B
    Figure CN116524386B
Patent Text Reader

Abstract

The embodiment of the present application provides a video detection method, device, equipment, readable storage medium and program product, which relates to the field of artificial intelligence. The method includes: obtaining a feature sequence of each video to be detected in a video set to be detected, and the feature sequence of each video to be detected is used to characterize the relationship between at least two objects in each video to be detected; based on the feature sequence of each video to be detected in the video set to be detected, at least two abnormal videos are determined from the video set to be detected; at least two abnormal videos are deduplicated to determine an abnormal video set, and the abnormal types of each abnormal video in the abnormal video set are different. The method performs video anomaly detection based on the relationship between at least two objects in the video to be detected, thereby improving the accuracy of detecting video anomalies, and by deduplicating abnormal videos with similar content, the content of the pushed abnormal video has a lower repetition rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a video detection method, device, equipment, readable storage medium and program product. Background Art

[0002] In recent years, computer vision technology has developed rapidly, but in terms of video processing, due to the high difficulty of video processing technology, video processing technology has progressed slowly, especially in video anomaly detection. In the game scenario, since the data does not come from the real world, the amount of data is scarce, and the data features are not necessarily perfect, there are only a handful of solutions for game video anomaly detection. In the existing technology, game hosts or users record game videos and submit game anomaly videos. The quality of the videos obtained in this way is uneven, resulting in low accuracy in detecting video anomalies. Summary of the invention

[0003] In view of the shortcomings of existing methods, the present application proposes a video detection method, device, equipment, computer-readable storage medium and computer program product to solve the problem of how to improve the accuracy of detecting video anomalies.

[0004] In a first aspect, the present application provides a video detection method, comprising:

[0005] Acquire a feature sequence of each video to be detected in the set of videos to be detected, where the feature sequence of each video to be detected is used to characterize the relationship between at least two objects in each video to be detected;

[0006] Based on the feature sequence of each video to be detected in the video set to be detected, determining at least two abnormal videos from the video set to be detected;

[0007] At least two abnormal videos are deduplicated to determine an abnormal video set, wherein abnormal types of the abnormal videos in the abnormal video set are different from each other.

[0008] In one embodiment, obtaining a feature sequence of each video to be detected in the set of videos to be detected includes:

[0009] Perform median filtering on each video frame in the video to be detected to obtain a first video frame after noise removal;

[0010] Performing size correction processing on the first video frame to obtain a corrected second video frame;

[0011] Based on the second video frame, a feature sequence of video frames in each video to be detected is determined, wherein the feature sequence of the video frames includes an index of the video frame, a distance between objects in the video frame, an absolute pitch angle corresponding to the video frame, a horizontal angle corresponding to the video frame, a size of each object in the video frame, and at least one of a recognition score of each object in the video frame.

[0012] In one embodiment, determining the absolute pitch angle corresponding to the video frame based on the second video frame includes:

[0013] Inputting the second video frame into a preset image depth estimation function to perform depth estimation processing to obtain a depth map corresponding to the second video frame;

[0014] Inputting the second video frame into a preset semantic segmentation model to perform semantic segmentation processing to obtain a mask for identifying the ground corresponding to the second video frame;

[0015] Based on the depth map and the mask identifying the ground, the absolute pitch angle corresponding to the video frame is determined.

[0016] In one embodiment, determining the horizontal angle corresponding to the video frame based on the second video frame includes:

[0017] Based on the depth map, the mask identifying the ground, and the distance between objects in the video frame, the horizontal angle corresponding to the video frame is determined.

[0018] In one embodiment, determining the size of each object in the video frame based on the second video frame includes:

[0019] Inputting the second video frame into a preset instance segmentation model to perform instance segmentation processing to obtain a set of boxes corresponding to the second video frame;

[0020] Based on the box set, determine the coordinates of the box of each object in the video frame;

[0021] Based on the coordinates of the boxes of the objects in the video frames, the sizes of the objects in the video frames are determined.

[0022] In one embodiment, the second video frame is input into a preset instance segmentation model to perform instance segmentation processing to obtain a score set corresponding to the second video frame;

[0023] Determining a recognition score of each object in the video frame based on the second video frame includes:

[0024] Based on the score set corresponding to the second video frame, a recognition score of each object in the video frame is determined.

[0025] In one embodiment, based on the feature sequence of each video to be detected in the video set to be detected, determining at least two abnormal videos from the video set to be detected includes:

[0026] Inputting the feature sequence of the video frame in each video to be detected into the sequence generation layer included in the preset long short-term memory neural network, performing compression processing, and obtaining a multidimensional vector corresponding to the feature sequence of the video frame;

[0027] Inputting the multidimensional vector into the fully connected layer included in the long short-term memory neural network to convert the multidimensional vector into a two-dimensional vector;

[0028] Input the two-dimensional vector into an output layer of the long short-term memory neural network to determine a probability value corresponding to the two-dimensional vector;

[0029] If the probability value corresponding to the two-dimensional vector is a preset abnormality indicator, each video to be detected is determined to be an initial abnormal video;

[0030] A statistical test is performed on at least two initial abnormal videos. If the at least two initial abnormal videos meet a preset abnormal determination condition, the to-be-detected video corresponding to the at least two initial abnormal videos is determined as an abnormal video.

[0031] In one embodiment, performing deduplication processing on at least two abnormal videos to determine an abnormal video set includes:

[0032] For each abnormal video, determine a two-dimensional feature embedding vector of each abnormal video;

[0033] If the Euclidean distance between the two-dimensional feature embedding vectors of any two abnormal videos in at least two abnormal videos is less than a preset distance threshold, it is determined that the abnormality types between any two abnormal videos are the same;

[0034] One of any two abnormal videos with the same abnormal type is filtered out, and the other abnormal video of any two abnormal videos is assigned to the abnormal video set.

[0035] In a second aspect, the present application provides a video detection device, comprising:

[0036] A first processing module is used to obtain a feature sequence of each video to be detected in the set of videos to be detected, where the feature sequence of each video to be detected is used to characterize the relationship between at least two objects in each video to be detected;

[0037] A second processing module is used to determine at least two abnormal videos from the set of videos to be detected based on the feature sequence of each video to be detected in the set of videos to be detected;

[0038] The third processing module is used to perform deduplication processing on at least two abnormal videos to determine an abnormal video set, wherein the abnormal types of the abnormal videos in the abnormal video set are different from each other.

[0039] In a third aspect, the present application provides an electronic device, including: a processor, a memory, and a bus;

[0040] A bus, used to connect the processor and memory;

[0041] A memory, used for storing operation instructions;

[0042] The processor is used to execute the video detection method of the first aspect of the present application by calling an operation instruction.

[0043] In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, and the computer program is used to execute the video detection method of the first aspect of the present application.

[0044] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the steps of the video detection method in the first aspect of the present application when the computer program is executed by a processor.

[0045] The technical solution provided in the embodiments of the present application has at least the following beneficial effects:

[0046] The feature sequence of each video to be detected in the video set to be detected is obtained, and the feature sequence of each video to be detected is used to characterize the relationship between at least two objects in each video to be detected; based on the feature sequence of each video to be detected in the video set to be detected, at least two abnormal videos are determined from the video set to be detected; thus, based on the relationship between at least two objects in the video to be detected, video anomaly detection is performed, thereby improving the accuracy of detecting video anomalies. At least two abnormal videos are deduplicated to determine an abnormal video set, and the abnormal types of each abnormal video in the abnormal video set are different from each other; thus, by deduplicating abnormal videos with similar contents, the content of the pushed abnormal videos has a lower repetition rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in describing the embodiments of the present application are briefly introduced below.

[0048] Figure 1 A schematic diagram of the architecture of a video detection system provided in an embodiment of the present application;

[0049] Figure 2 A schematic diagram of a flow chart of a video detection method provided in an embodiment of the present application;

[0050] Figure 3 A schematic diagram of video detection provided in an embodiment of the present application;

[0051] Figure 4 A schematic diagram of a flow chart of another video detection method provided in an embodiment of the present application;

[0052] Figure 5 A schematic diagram of video detection provided in an embodiment of the present application;

[0053] Figure 6 A schematic diagram of an abnormal sample provided in an embodiment of the present application;

[0054] Figure 7 A schematic diagram of an abnormal sample provided in an embodiment of the present application;

[0055] Figure 8 A schematic diagram of video detection provided in an embodiment of the present application;

[0056] Fig. 9 A schematic diagram of the structure of a video detection device provided in an embodiment of the present application;

[0057] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0058] The embodiments of the present application are described below in conjunction with the drawings in the present application. It should be understood that the implementation methods described below in conjunction with the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions of the embodiments of the present application.

[0059] It will be understood by those skilled in the art that, unless specifically stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the terms "including" and "comprising" used in the embodiments of the present application refer to that the corresponding features can be implemented as the presented features, information, data, steps, operations, elements and / or components, but do not exclude the implementation as other features, information, data, steps, operations, elements, components and / or combinations thereof supported by the technical field. It should be understood that when we say that an element is "connected" or "coupled" to another element, the one element may be directly connected or coupled to the other element, or it may refer to that the one element and the other element establish a connection relationship through an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein indicates at least one of the items defined by the term, for example, "A and / or B" indicates that it is implemented as "A", or implemented as "B", or implemented as "A and B".

[0060] It can be understood that in the specific implementation of this application, data related to video detection is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0061] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0062] The embodiment of the present application is a video detection method provided by a video detection system, and the video detection method involves the fields of artificial intelligence and cloud technology. For example, the video detection involved in the embodiment of the present application can use artificial intelligence to realize the recognition of abnormal videos; for another example, the video detection involved in the embodiment of the present application can use cloud technology to obtain the feature sequence of each video to be detected in the set of videos to be detected from the cloud.

[0063] Cloud computing is a computing model that distributes computing tasks on a resource pool composed of a large number of computers, allowing various application systems to obtain computing power, storage space and information services as needed. The network that provides resources is called a "cloud". From the user's perspective, the resources in the "cloud" are infinitely scalable and can be obtained at any time, used on demand, expanded at any time, and paid for by use.

[0064] As a provider of basic cloud computing capabilities, a cloud computing resource pool (referred to as a cloud platform, generally referred to as an IaaS (Infrastructure as a Service) platform) will be established, and various types of virtual resources will be deployed in the resource pool for external customers to choose to use. The cloud computing resource pool mainly includes: computing devices (virtualized machines, including operating systems), storage devices, and network devices.

[0065] According to the logical function division, the PaaS (Platform as a Service) layer can be deployed on the IaaS (Infrastructure as a Service) layer, and the SaaS (Software as a Service) layer can be deployed on the PaaS layer. SaaS can also be deployed directly on IaaS. PaaS is a platform for software operation, such as databases, web containers, etc. SaaS is a variety of business software, such as web portals, SMS mass senders, etc. Generally speaking, SaaS and PaaS are upper layers relative to IaaS.

[0066] The so-called artificial intelligence cloud service is generally also called AIaaS (AIas a Service, Chinese for "AI as a Service"). This is the current mainstream service mode of artificial intelligence platforms. Specifically, the AIaaS platform will split several common AI services and provide independent or packaged services in the cloud. This service model is similar to opening an AI theme mall: all developers can access and use one or more artificial intelligence services provided by the platform through API interfaces. Some senior developers can also use the AI ​​framework and AI infrastructure provided by the platform to deploy and operate their own cloud artificial intelligence services.

[0067] 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.

[0068] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. Basic artificial intelligence technologies generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operating / interactive systems, mechatronics and other technologies. Artificial intelligence software technologies mainly include computer vision technology, speech processing technology, natural language processing technology, as well as machine learning / deep learning, autonomous driving, smart transportation and other major directions.

[0069] Computer Vision Technology (CV) Computer vision 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, automatic driving, smart transportation and other technologies.

[0070] 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.

[0071] In order to better understand and illustrate the solutions of the embodiments of the present application, some technical terms involved in the embodiments of the present application are briefly explained below.

[0072] Yolact: This model uses a simple fully convolutional model to achieve fast instance segmentation.

[0073] BTS: This model uses scale pyramid and LocalPlanarGuidence (local plane guidance layer) to achieve depth map prediction.

[0074] MITSemseg: Short for MaskRCNN model, which is used for semantic segmentation.

[0075] Embedding: Embedding can be called manifold embedding or feature vector embedding; it reduces the dimension of a high-dimensional, discrete vector to a low-dimensional semantic space and keeps it in the low-dimensional space as much as possible.

[0076] TSNE: t-SNE algorithm, t-SNE (t-distributed Stochastic Neighbor Embedding) is an algorithm for reducing the dimensionality of high-dimensional vectors and outputs a two-dimensional feature embedding vector.

[0077] Median filtering: Median filtering is a nonlinear smoothing technique that sets the grayscale value of each pixel to the median of all the pixel grayscale values ​​in a certain neighborhood window of the point; it replaces the value of a point in a digital image or digital sequence with the median of the values ​​of all the points in a neighborhood of the point, so that the surrounding pixel values ​​are close to the true value, thereby eliminating isolated noise points. In image processing, median filtering is often used to protect edge information and is a classic method for smoothing noise.

[0078] Median test: Median test is one of the non-parametric tests, which is a hypothesis test that infers whether there is a significant difference between two randomly sampled samples. The principle of median test is: if the two samples are taken from the same population, the number of data of the two samples above (or below) the median in the unified sorting should not be significantly different; if the two samples are taken from different populations, there is a significant difference.

[0079] Proximity algorithm: K-Nearest Neighbor (KNN) classification algorithm is one of the simplest methods in data mining classification technology; the so-called K nearest neighbors means K nearest neighbors, which means that each sample can be represented by its closest K neighboring values; the nearest neighbor algorithm is a method of classifying each record in a data set.

[0080] Principal component analysis: Principal component analysis (PCA) is a linear dimensionality reduction method that is widely used in image processing, face recognition, data compression, signal denoising and other fields.

[0081] Random projection: Random projection is a nonlinear dimensionality reduction that maps a point set in a high-dimensional Euclidean space to a relative distance in a low-dimensional space and maintains the relative distance within a certain error range.

[0082] RGB: The RGB color model is a color standard in the industry. Various colors are obtained by changing the three color channels of red (R), green (G), and blue (B) and superimposing them on each other. RGB represents the colors of the three channels of red, green, and blue.

[0083] The solution provided in the embodiments of the present application relates to artificial intelligence. The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0084] The solution provided in the embodiments of the present application can be applied to any application scenario in the field of artificial intelligence that requires video detection.

[0085] In order to better understand the solution provided by the embodiment of the present application, the solution is described below in conjunction with a specific application scenario.

[0086] In one embodiment, Figure 1 FIG. 1 shows a schematic diagram of the architecture of a video detection system applicable to an embodiment of the present application. It can be understood that the video detection method provided in the embodiment of the present application can be applied to but not limited to the following applications: Figure 1 In the application scenario shown.

[0087] In this example, Figure 1 As shown, the architecture of the video detection system in this example may include but is not limited to a server 10 and a terminal 20; wherein the server 10 may call an object relationship extraction and calculation module 111, an abnormality discrimination module 112, an abnormality deduplication module 113 and an abnormality text report generation module 114 in the server 10; the terminal 20 and the server 10 may interact through a network. The terminal 20 transmits each video to be detected in the video set to be detected to the server 10; the server 10 obtains a feature sequence of each video to be detected in the video set to be detected by calling the object relationship extraction and calculation module 111, and the feature sequence of each video to be detected is used to characterize the relationship between at least two objects in each video to be detected; the server 10 determines at least two abnormal videos from the video set to be detected based on the feature sequence of each video to be detected in the video set to be detected by calling the abnormality discrimination module 112; the server 10 performs deduplication processing on at least two abnormal videos by calling the abnormality deduplication module 113 to determine an abnormal video set, and the abnormal types of each abnormal video in the abnormal video set are different from each other; the server 10 generates an abnormal report based on the abnormal video set by calling the abnormality text report generation module 114.

[0088] It is understandable that the above is only an example and this embodiment is not limited here.

[0089] Among them, the terminal can be a smart phone (such as Android phone, iOS phone, etc.), a mobile phone simulator, a tablet computer, a laptop computer, a digital broadcast receiver, a MID (Mobile Internet Devices), a PDA (Personal Digital Assistant), a vehicle terminal (such as a vehicle navigation terminal), a smart speaker, a smart watch, etc. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server or server cluster 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. The above-mentioned network may include but is not limited to: wired network, wireless network, wherein the wired network includes: local area network, metropolitan area network and wide area network, and the wireless network includes: Bluetooth, Wi-Fi and other networks that realize wireless communication. The specific can also be determined based on the actual application scenario requirements, and is not limited here.

[0090] See also Figure 2 , Figure 2The flowchart of a video detection method provided by an embodiment of the present application is shown, wherein the method can be executed by any electronic device, such as a server. As an optional implementation, the method can be executed by a server. For the convenience of description, in the description of some optional embodiments below, the server will be used as an example to illustrate the execution subject of the method. Figure 2 As shown, the video detection method provided in the embodiment of the present application includes the following steps:

[0091] S201, obtaining a feature sequence of each video to be detected in a set of videos to be detected, where the feature sequence of each video to be detected is used to characterize a relationship between at least two objects in each video to be detected.

[0092] Specifically, the video to be detected can be represented as a tensor I 1:N , where N is the number of frames of the video matrix to be detected, I 1:N ∈R H×W×C×N , H, W, C represent the height, width and number of channels respectively, R represents the real number set, R H×W×C×N Represents a H×W×C×N dimensional tensor. The feature sequence of the video to be detected can be the feature sequence of each video frame (image frame) in the video to be detected, and the feature sequence of each video frame can be used to characterize the relationship between at least two objects (objects) in each video frame; for example, the two objects in a video frame are a person and a car, and the feature sequence of the video frame can be used to characterize the relationship between the person and the car.

[0093] S202: Determine at least two abnormal videos from the set of videos to be detected based on a feature sequence of each video to be detected in the set of videos to be detected.

[0094] Specifically, the feature sequence of the video to be detected may be the feature sequence of each video frame in the video to be detected. When a video frame in the video to be detected is determined to be abnormal based on the feature sequence of the video frame, the video to be detected may be determined to be an abnormal video.

[0095] S203, performing deduplication processing on at least two abnormal videos to determine an abnormal video set, wherein abnormal types of the abnormal videos in the abnormal video set are different from each other.

[0096] Specifically, when it is determined that the abnormal types between two abnormal videos are the same, one of the two abnormal videos is screened out, and the other abnormal video of the two abnormal videos is assigned to the abnormal video set.

[0097] In an embodiment of the present application, a feature sequence of each video to be detected in a set of videos to be detected is obtained, and the feature sequence of each video to be detected is used to characterize the relationship between at least two objects in each video to be detected; based on the feature sequence of each video to be detected in the set of videos to be detected, at least two abnormal videos are determined from the set of videos to be detected; thus, based on the relationship between at least two objects in the video to be detected, video anomaly detection is performed, thereby improving the accuracy of detecting video anomalies. At least two abnormal videos are deduplicated to determine an abnormal video set, and the abnormal types of each abnormal video in the abnormal video set are different from each other; thus, by deduplicating abnormal videos with similar content, the content of the pushed abnormal videos has a lower repetition rate.

[0098] In one embodiment, obtaining a feature sequence of each video to be detected in a set of videos to be detected includes steps A1-A3:

[0099] Step A1: median filter each video frame in the video to be detected to obtain a first video frame after noise is removed.

[0100] Specifically, median filtering is performed on each video frame in the video to be detected, thereby filtering out noise and obtaining a first video frame after noise removal. The calculation formula (1) is as follows:

[0101]

[0102] Among them, x, y represent the horizontal coordinate and the vertical coordinate respectively, l1 represents the horizontal coordinate change value, l2 represents the vertical coordinate change value, h represents the window size value, and Z represents an integer set. For points at the edge of the video frame, only the points within the image border range need to be filtered.

[0103] Step A2: Perform size correction processing on the first video frame to obtain a corrected second video frame.

[0104] Specifically, for the first video frame Perform size correction (rectification) processing; for example, you can define the transformation Make the second video frame Among them, the second video frame Represents an RGB image with a length of 480 dimensions, a width of 640 dimensions, and 3 channels.

[0105] Step A3, based on the second video frame, determine the feature sequence of the video frames in each video to be detected, the feature sequence of the video frames includes the index of the video frame, the distance between objects in the video frame, the absolute pitch angle corresponding to the video frame, the horizontal angle corresponding to the video frame, the size of each object in the video frame, and at least one of the recognition scores of each object in the video frame.

[0106] In one embodiment, the characteristic sequence of the video frame can be expressed as block i Indicates, for example, block i As shown below:

[0107] block i =index i ,d i,(person,car) ,θ i ,φ i ,S person,i ,S car,i ,Score person,i ,Score car,i )

[0108] Among them, the kth video (including M k The relationship between two objects (such as people, cars, etc.) in a frame can be represented by a sequence of blocks, denoted as index i Represents the index of the i-th video frame; d i,(person,car) represents the distance between the person and the car in the i-th video frame; θ i Indicates the absolute pitch angle; φ i Indicates the horizontal angle; S person,i Indicates the size of the person in the i-th frame; S car,i Indicates the size of the car in the i-th frame; Score person,i Represents the recognition score of the person in the i-th frame; Score car,i Represents the recognition score of the car in the i-th frame.

[0109] In one embodiment, based on the second video frame, determining the absolute pitch angle corresponding to the video frame includes steps B1-B3:

[0110] Step B1: input the second video frame into a preset image depth estimation function, perform depth estimation processing, and obtain a depth map corresponding to the second video frame.

[0111] Specifically, through BTS (Big to Small, image depth estimation function), the second video frame is estimated The depth map D i ∈R 480×640 , D i The calculation formula (2) is as follows:

[0112]

[0113] Step B2: input the second video frame into a preset semantic segmentation model to perform semantic segmentation processing to obtain a mask for identifying the ground corresponding to the second video frame.

[0114] Specifically, in order to calculate the horizontal angle and pitch angle in the spherical coordinate system, it is necessary to calculate the plane where the ground is located; due to the irregularity of the ground, the boundary of the ground can be calculated by the semantic segmentation model MITSemseg (ResNet), as shown in formula (3):

[0115]

[0116] Among them, the input of the semantic segmentation model is the second video frame The output of the semantic segmentation model is a mask that identifies the ground. floor .

[0117] Step B3, determining the absolute pitch angle corresponding to the video frame based on the depth map and the mask for identifying the ground.

[0118] Specifically, the absolute pitch angle is the complementary angle of the pitch angle in the spherical coordinate system. In the continuous image space Ω, there is an angle α between the slope direction vector of each pixel on the ground and the vector perpendicular to the image. The average angle α can be obtained by averaging the angles The calculation formula (4) is as follows:

[0119]

[0120] Under the discretization condition, The calculation formula (5) is as follows:

[0121] Average Angle

[0122] Combining the angle ψ between the target object (the object in the video frame) and the direction perpendicular to the image, the absolute pitch angle θ can be obtained, as shown in formula (6):

[0123]

[0124] Among them, D i (x, y) represents the value of the pixel at (x, y) on the i-th depth map (representing the depth); Mask floor Indicates the mask for identifying the ground. floor (·,y) indicates the vertical coordinate is; arctg: indicates the inverse tangent function; Le indicates the left end point of the vertical coordinate interval; Re indicates the right end point of the vertical coordinate interval; y0 indicates the same interval integer value in [Le,Re]; #: indicates the number of values ​​1, #Mask_{floor}(·,y) represents the length of the ground with the vertical coordinate y; Δ i Represents the differential value of the i-th image in the x direction at the position (x0, y0).

[0125] In one embodiment, determining the horizontal angle corresponding to the video frame based on the second video frame includes:

[0126] Based on the depth map, the mask identifying the ground, and the distance between objects in the video frame, the horizontal angle corresponding to the video frame is determined.

[0127] Specifically, according to the relationship of cone geometry in the image, we can get the ground (spherical surface S 3 Homeomorphic to R 3 ) is the horizontal angle φ of the horizontal plane, as shown in formula (7):

[0128]

[0129] Among them, d represents the distance between objects in the video frame, and the average angle It can be calculated by formula (4) or formula (5).

[0130] In one embodiment, determining the size of each object in the video frame based on the second video frame includes:

[0131] Inputting the second video frame into a preset instance segmentation model to perform instance segmentation processing to obtain a set of boxes corresponding to the second video frame;

[0132] Based on the box set, determine the coordinates of the box of each object in the video frame;

[0133] Based on the coordinates of the boxes of the objects in the video frames, the sizes of the objects in the video frames are determined.

[0134] In one embodiment, the box set Set is calculated by the instance segmentation model Yolact Box , score set Set Score and mask set Set Mask , as shown in formula (8):

[0135]

[0136] Among them, Set Box Represents a set of boxes, each of which contains a possible target object in the image (video frame); Set Score Represents a score set. Each score value in the score set represents the recognition score value of the object in each box. The higher the score, the more likely the model believes that the object belongs to the category it discriminates. Mask Represents a mask set, each mask in the mask set represents the mask of an object recognized by the model in the image (video frame). Represents the second video frame.

[0137] In one embodiment, according to the distance calculation formula of Euclidean space, a calculation formula for the relative distance between two objects in a video frame can be obtained, the two objects being, for example, a person and a car.

[0138] In one embodiment, in Set Box In the figure, we can find the coordinates of the boxes of the person and the car. The coordinates of the box of the person are set to (x person,1 ,y person,1 ) and (x person,2 ,y person,2 ), the coordinates of the car box are set to (x car,1 ,y car,1 ) and (x car,2 ,y car,2 ), then the calculation formulas for the coordinates of the center of the person and the center of the car are shown in formula (9) and formula (10) respectively:

[0139] (x person,center ,y person,center )=[(x person,1 ,y person,1 )+(x person,2 ,y person,2 )] / 2 Formula (9)

[0140] (x car,center ,y car,center )=[(x car,1 ,y car,1 )+(x car,2 ,y car,2 )] / 2 formula (10)

[0141] Correspondingly, the calculation formulas for measuring the size of a person and a car are shown in formula (11) and formula (12) respectively:

[0142] S person =(x person,2 -x person,1 )(y person,2 -y person,1 ) Formula (11)

[0143] S car =(x car,2 -x car,1 )(y car,2 -y car,1 ) Formula (12)

[0144] In one embodiment, the second video frame is input into a preset instance segmentation model to perform instance segmentation processing to obtain a score set corresponding to the second video frame;

[0145] Determining a recognition score of each object in the video frame based on the second video frame includes:

[0146] Based on the score set corresponding to the second video frame, a recognition score of each object in the video frame is determined.

[0147] Specifically, the second video frame can be calculated by formula (8): The corresponding score set Set Score .

[0148] In one embodiment, based on the feature sequence of each video to be detected in the video set to be detected, determining at least two abnormal videos from the video set to be detected includes:

[0149] Inputting the feature sequence of the video frame in each video to be detected into the sequence generation layer included in the preset long short-term memory neural network, performing compression processing, and obtaining a multidimensional vector corresponding to the feature sequence of the video frame;

[0150] Inputting the multidimensional vector into the fully connected layer included in the long short-term memory neural network to convert the multidimensional vector into a two-dimensional vector;

[0151] Input the two-dimensional vector into an output layer of the long short-term memory neural network to determine a probability value corresponding to the two-dimensional vector;

[0152] If the probability value corresponding to the two-dimensional vector is a preset abnormality indicator, each video to be detected is determined to be an initial abnormal video;

[0153] A statistical test is performed on at least two initial abnormal videos. If the at least two initial abnormal videos meet a preset abnormal determination condition, the video to be detected corresponding to the at least two initial abnormal videos is determined as an abnormal video.

[0154] In one embodiment, each video will have a corresponding Considering The variable length feature of the video can be used to identify video anomalies through a joint method of statistical test and spatiotemporal graph recurrent neural network, including steps C1-C2:

[0155] Step C1, video abnormality identification is performed through long short-term memory neural network.

[0156] Specifically, for two objects, a special LSTM (Long Short-Term Memory) is constructed to input This structure compresses the temporal and spatial information of the video into a 150-dimensional vector (a multi-dimensional vector such as a 150-dimensional vector), and then determines whether it is abnormal based on this. The structure of the LSTM is as follows: Figure 3 As shown. In LSTM, Each element in each block of the sequence is sequentially input into the Series Generation layer of the LSTM to generate a 150-dimensional vector sequence. Then, it passes through the fully connected layer and the Softmax layer (output layer) to obtain the final abnormality indicator J. k =0or1. Among them, represents a block sequence set, M k Represents the number of frames of the kth video; LSTM softmax represents the LSTM neural network (Long Short-Term Memory Neural Network) with softmax as the last layer, J k An indicator indicating whether the value is abnormal (0 or 1).

[0157] Step C2, checking the abnormal video (initial abnormal video) identified in step C1 through statistical testing. If it is determined to be an abnormal video, the abnormal video will undergo subsequent deduplication processing and an abnormal report will be generated; if it is determined to be a normal video, the video will be screened out.

[0158] Specifically, statistical tests are used to recheck samples that LSTM identifies as abnormal (initial abnormal videos). Statistical tests are performed by performing a median test between the feature distribution of normal videos and the feature distribution of the samples to be tested, and the p-value is determined with a confidence level of 95%. The null hypothesis is H0: μ0 = μ1, and the alternative hypothesis is H1: μ0 ≠ μ1, then The calculation formula (13) is as follows:

[0159]

[0160] Where P represents the distribution function of the standard normal distribution; Represents the average number of normal block sequence samples; Represents the average number of abnormal block sequence samples; represents the variance of the normal block sequence samples; represents the variance of the abnormal block sequence sample; z represents a normally distributed random variable; represents the joint total variance, n1, n2 are the degrees of freedom of the corresponding distribution. If the median of the test sample is less than 0.05, the median of the test sample is considered inconsistent with that of the normal sample, and the sample is considered abnormal; otherwise, the characteristic distribution of the test sample is considered consistent with that of the normal sample, and the sample is considered normal. When the sample is determined to be normal by combining the judgment of step C1 and step C2, the sample will not participate in the subsequent deduplication processing and abnormal report generation.

[0161] In one embodiment, complex relationships between multiple objects can be considered. Abstracted graph sequence in, Represents the set of graph models for each frame in the kth video, G i represents the graph model of the i-th frame, V i is the set of points in the graph model, E i It is a set of edges in a graph model. Each point represents an object or a feature of an object. If the points in the graph represent objects, then the spatial distance between points, relative angles, and the category, score, color, etc. of the object can all be used as discriminant features. If the points represent the features of an object (such as a person's hands, feet, face, etc., a car's wheels, doors, lights, etc.), a connected subgraph can be used as a graph representation of the object itself (such as a person, car, etc.). By extracting the Laplace matrix of the high-dimensional graph and inputting it into the spatiotemporal graph sequence model, abnormal video discrimination, deduplication processing, and abnormal report generation can be completed.

[0162] In one embodiment, performing deduplication processing on at least two abnormal videos to determine an abnormal video set includes:

[0163] For each abnormal video, determine a two-dimensional feature embedding vector of each abnormal video;

[0164] If the Euclidean distance between the two-dimensional feature embedding vectors of any two abnormal videos in at least two abnormal videos is less than a preset distance threshold, it is determined that the abnormality types between any two abnormal videos are the same;

[0165] One of any two abnormal videos with the same abnormal type is filtered out, and the other abnormal video of any two abnormal videos is assigned to the abnormal video set.

[0166] In one embodiment, in order to improve the efficiency of pushing abnormal reports, it is necessary to perform deduplication processing on abnormal videos. Figure 3 The SeriesGeneration layer of the LSTM in , the corresponding 150-dimensional vector V can be obtained from the i-th video i , V i The calculation formula (14) is as follows:

[0167]

[0168] Among them, LSTM SeriesGeneration Indicates the input of the i-th video LSTM that generates 150-dimensional vectors.

[0169] The 150-dimensional vector is reduced in dimension by using embedding technology, such as t-SNE (t-distributed Stochastic Neighbor Embedding). Assume that the two video tensors are and The 150-dimensional vectors calculated by LSTM are V1 and V2. The two-dimensional embedding vector (two-dimensional feature embedding vector) can be calculated by t-SNE, as shown in formula (15):

[0170]

[0171] After obtaining the two-dimensional embedding vectors V1 and V2 by calculation through formula (15), the Euclidean distance between vectors V1 and V2 can be calculated, and the threshold method can be used to determine whether the distance between sample points is close (the content type is consistent, that is, the anomaly type between the two anomaly videos is the same). In the embedding space, the Euclidean distance distance (E1, E2) between two points E1 and E2 is calculated by formula (16) as follows:

[0172]

[0173] Among them, E 1,x Indicates the horizontal coordinate of the first point; E 2,x Indicates the horizontal coordinate of the second point; E 1,y Indicates the vertical coordinate of the first point; E 2,y Indicates the ordinate of the second point.

[0174] It should be noted that the threshold method is based on the Euclidean distance distribution between points in the two-dimensional embedding space. If the distance between E1 and E2 is less than a certain threshold M (distance threshold), then the anomalies associated with the two videos are considered to be consistent; otherwise, the contents (anomaly types) of the two videos are considered to be different. After statistics on the training data, the threshold can be estimated so that the content types that are consistent in the training data set are controlled within the threshold range as much as possible, while the content inconsistency is controlled outside the threshold range.

[0175] In one embodiment, the deduplication process is mainly local manifold embedding, and many dimensionality reduction methods can be used, such as linear dimensionality reduction, which can be PCA (Principal Component Analysis), etc., and nonlinear dimensionality reduction, which can be RandomProjection, etc. The deduplication process can be performed by manually setting a threshold, or by using methods such as KNN (K-NearestNeighbor, neighbor algorithm) to determine whether samples overlap or have a large similarity.

[0176] In one embodiment, in order to improve the efficiency of video anomaly repair, the anomaly report pushed to the operator needs to reflect the content of the abnormal video in a concise and efficient manner. Generate text keywords based on the text title introduction, and then judge the abnormal indicators (the distance between objects in the video frame, the absolute pitch angle corresponding to the video frame, the horizontal angle corresponding to the video frame, the size of each object in the video frame, the recognition score of each object in the video frame, etc.) in the abnormal sample (abnormal video) according to statistical tests as the text summary part, and finally generate an abnormal report (abnormal text report). The abnormal report template is shown in Table 1, and the objects in Table 1 represent objects.

[0177] Table 1: Exception Report Template

[0178]

[0179] The application of the embodiments of the present application has at least the following beneficial effects:

[0180] Based on the relationship between at least two objects in the video to be detected, video anomaly detection is performed, thereby improving the accuracy of detecting video anomalies; by deduplicating abnormal videos with similar content, the content of the pushed abnormal videos has a lower repetition rate, thereby improving the efficiency of pushing abnormal reports.

[0181] In order to better understand the method provided in the embodiment of the present application, the scheme of the embodiment of the present application is further explained below with reference to examples of specific application scenarios.

[0182] In one embodiment, the application scenario of video detection can be game video detection. Based on abnormal game videos posted by game anchors on major video websites, effective abnormal videos with non-repetitive content and corresponding text summary reports can be pushed to operators with high quality.

[0183] See also Figure 4 , Figure 4The flowchart of a video detection method provided by an embodiment of the present application is shown, wherein the method can be executed by any electronic device, such as a server. As an optional implementation, the method can be executed by a server. For the convenience of description, in the description of some optional embodiments below, the server will be used as an example to illustrate the execution subject of the method. Figure 4 As shown, the video detection method provided in the embodiment of the present application includes the following steps:

[0184] S401, performing median filtering on each video frame in the game video to be detected to obtain a first video frame after noise is removed.

[0185] S402: Perform size correction processing on the first video frame to obtain a corrected second video frame.

[0186] S403, based on the second video frame, determining a feature sequence of each video frame in the game video to be detected, where the feature sequence of the video frame is used to characterize the relationship between at least two objects in the video frame.

[0187] Specifically, the feature sequence of the video frame includes the index of the video frame, the distance between objects in the video frame, the absolute pitch angle corresponding to the video frame, the horizontal angle corresponding to the video frame, the size of each object in the video frame, and the recognition score of each object in the video frame.

[0188] S404, inputting the feature sequence of the video frames in each game video to be tested into the long short-term memory neural network to determine a plurality of initial abnormal game videos.

[0189] S405, performing statistical tests on the multiple initial abnormal game videos to determine at least two abnormal game videos.

[0190] S406: De-duplicate at least two abnormal game videos to determine an abnormal game video set, wherein the abnormal types of the abnormal game videos in the abnormal game video set are different from each other.

[0191] S407, based on the abnormal game video collection, determine an abnormal text report, and push the abnormal text report to the operation personnel.

[0192] The application of the embodiments of the present application has at least the following beneficial effects:

[0193] Based on the relationship between at least two objects in the game video to be detected, video anomaly detection is performed, thereby improving the accuracy of detecting game video anomalies; by deduplicating abnormal game videos with similar content, the content of the pushed abnormal game videos has a lower repetition rate, thereby improving the efficiency of pushing abnormal text reports.

[0194] In one embodiment, according to the manual strategy, the relative size S person / S car and θ as video features, calculate the difference between the distribution of normal samples (normal videos) and abnormal samples (abnormal videos), for example, the number of normal sample features is 1077, and the number of abnormal sample features is 2869. The results obtained by the median test of normal samples and abnormal samples are shown in Table 2:

[0195] Table 2: Median test table of important index distribution of normal samples and abnormal samples

[0196]

[0197] Through LSTM training, the classification accuracy of 9 normal videos and 10 abnormal videos reached 84.2%, which shows that steps C1-C2 are effective.

[0198] In one embodiment, based on 19 samples (9 normal videos and 10 abnormal videos) in the test data set, the following can be obtained through t-SNE: Figure 5 The two-dimensional graph shown is a two-dimensional scatter plot of 19 samples after t-SNE dimension reduction. Figure 5 As shown in the figure, the small dots come from normal samples, that is, 9 small dots represent 9 normal videos; the large dots come from abnormal samples, that is, 10 large dots represent 10 abnormal videos. When the sample contents are completely different, the distance between the low-dimensional sample vectors obtained by t-SNE is approximately uniform.

[0199] The two abnormal samples are Figure 6 The "separation of people and vehicles" content shown and Figure 7 The two abnormal samples show that the person is in an abnormal position in the car when the person is driving. For these two abnormal samples with almost the same content, the low-dimensional data points obtained by t-SNE dimensionality reduction are as follows: Figure 8 As shown, Figure 8 It is a two-dimensional scatter plot of abnormal samples (normal samples that affect the judgment have been removed), where the large dots represent ordinary abnormal samples, and the small dots represent the two abnormal samples with the "separation of people and vehicles" content. The two-dimensional distance table of each abnormal sample and a "separation of people and vehicles" abnormal sample under t-SNE is shown in Table 3:

[0200] Table 3: Two-dimensional distance table between each abnormal sample and a "person-vehicle separation" abnormal sample under t-SNE

[0201] sample 1 2 3 4 5 6 7 8 9 distance* 13.81 34.48 10.93 22.46 14.94 21.01 20.66 37.51 38.46

[0202] Here, distance* refers to the t-SNE two-dimensional distance between each abnormal sample and a "person-vehicle separation" abnormal sample; sample 1 is another "person-vehicle separation" abnormal sample. For samples with similar video content (such as these two "person-vehicle separation" abnormal samples), the semantic distance is shorter than other videos with different content types.

[0203] In one embodiment, four abnormal videos that are identified as abnormal and obtained after deduplication are used as test samples, and the generated abnormality report is shown in Table 4:

[0204] Table 4: Abnormal Report

[0205]

[0206]

[0207] Among them, scale can represent the size, such as the size of a person, the size of a car, the relative size of a person and a car, etc.

[0208] The embodiment of the present application also provides a video detection device. The structural diagram of the video detection device is as follows: Fig. 9 As shown, the video detection device 60 includes a first processing module 601 , a second processing module 602 and a third processing module 603 .

[0209] The first processing module 601 is used to obtain a feature sequence of each video to be detected in the set of videos to be detected, where the feature sequence of each video to be detected is used to characterize the relationship between at least two objects in each video to be detected;

[0210] A second processing module 602 is used to determine at least two abnormal videos from the set of videos to be detected based on the feature sequence of each video to be detected in the set of videos to be detected;

[0211] The third processing module 603 is used to perform deduplication processing on at least two abnormal videos to determine an abnormal video set, in which the abnormal types of the abnormal videos in the abnormal video set are different from each other.

[0212] In one embodiment, the first processing module 601 is specifically configured to:

[0213] Perform median filtering on each video frame in the video to be detected to obtain a first video frame after noise removal;

[0214] Performing size correction processing on the first video frame to obtain a corrected second video frame;

[0215] Based on the second video frame, a feature sequence of video frames in each video to be detected is determined, wherein the feature sequence of the video frames includes an index of the video frame, a distance between objects in the video frame, an absolute pitch angle corresponding to the video frame, a horizontal angle corresponding to the video frame, a size of each object in the video frame, and at least one of a recognition score of each object in the video frame.

[0216] In one embodiment, the first processing module 601 is specifically configured to:

[0217] Inputting the second video frame into a preset image depth estimation function to perform depth estimation processing to obtain a depth map corresponding to the second video frame;

[0218] Inputting the second video frame into a preset semantic segmentation model to perform semantic segmentation processing to obtain a mask for identifying the ground corresponding to the second video frame;

[0219] Based on the depth map and the mask identifying the ground, the absolute pitch angle corresponding to the video frame is determined.

[0220] In one embodiment, the first processing module 601 is specifically configured to:

[0221] Based on the depth map, the mask identifying the ground, and the distance between objects in the video frame, the horizontal angle corresponding to the video frame is determined.

[0222] In one embodiment, the first processing module 601 is specifically configured to:

[0223] Inputting the second video frame into a preset instance segmentation model to perform instance segmentation processing to obtain a set of boxes corresponding to the second video frame;

[0224] Based on the box set, determine the coordinates of the box of each object in the video frame;

[0225] Based on the coordinates of the boxes of the objects in the video frames, the sizes of the objects in the video frames are determined.

[0226] In one embodiment, the first processing module 601 is further configured to:

[0227] Inputting the second video frame into a preset instance segmentation model to perform instance segmentation processing to obtain a score set corresponding to the second video frame;

[0228] Determining a recognition score of each object in the video frame based on the second video frame includes:

[0229] Based on the score set corresponding to the second video frame, a recognition score of each object in the video frame is determined.

[0230] In one embodiment, the second processing module 602 is specifically configured to:

[0231] Inputting the feature sequence of the video frame in each video to be detected into the sequence generation layer included in the preset long short-term memory neural network, performing compression processing, and obtaining a multidimensional vector corresponding to the feature sequence of the video frame;

[0232] Inputting the multidimensional vector into the fully connected layer included in the long short-term memory neural network to convert the multidimensional vector into a two-dimensional vector;

[0233] Input the two-dimensional vector into an output layer of the long short-term memory neural network to determine a probability value corresponding to the two-dimensional vector;

[0234] If the probability value corresponding to the two-dimensional vector is a preset abnormality indicator, each video to be detected is determined to be an initial abnormal video;

[0235] A statistical test is performed on at least two initial abnormal videos. If the at least two initial abnormal videos meet a preset abnormal determination condition, the video to be detected corresponding to the at least two initial abnormal videos is determined as an abnormal video.

[0236] In one embodiment, the third processing module 603 is specifically configured to:

[0237] For each abnormal video, determine a two-dimensional feature embedding vector of each abnormal video;

[0238] If the Euclidean distance between the two-dimensional feature embedding vectors of any two abnormal videos in at least two abnormal videos is less than a preset distance threshold, it is determined that the abnormality types between any two abnormal videos are the same;

[0239] One of any two abnormal videos with the same abnormal type is filtered out, and the other abnormal video of any two abnormal videos is assigned to the abnormal video set.

[0240] The application of the embodiments of the present application has at least the following beneficial effects:

[0241] The feature sequence of each video to be detected in the video set to be detected is obtained, and the feature sequence of each video to be detected is used to characterize the relationship between at least two objects in each video to be detected; based on the feature sequence of each video to be detected in the video set to be detected, at least two abnormal videos are determined from the video set to be detected; thus, based on the relationship between at least two objects in the video to be detected, video anomaly detection is performed, thereby improving the accuracy of detecting video anomalies. At least two abnormal videos are deduplicated to determine an abnormal video set, and the abnormal types of each abnormal video in the abnormal video set are different from each other; thus, by deduplicating abnormal videos with similar contents, the content of the pushed abnormal videos has a lower repetition rate.

[0242] The present application also provides an electronic device. The structural diagram of the electronic device is as follows: Fig.10 As shown, Fig.10 The electronic device 4000 shown includes: a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, such as through a bus 4002. Optionally, the electronic device 4000 may also include a transceiver 4004, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present application.

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

[0244] The bus 4002 may include a path to transmit information between the above components. The bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 4002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.10 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0245] The memory 4003 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium that can be used to carry or store computer programs and can be read by a computer, without limitation herein.

[0246] The memory 4003 is used to store the computer program for executing the embodiment of the present application, and the execution is controlled by the processor 4001. The processor 4001 is used to execute the computer program stored in the memory 4003 to implement the steps shown in the above method embodiment.

[0247] Among them, electronic equipment includes but is not limited to: servers, etc.

[0248] The application of the embodiments of the present application has at least the following beneficial effects:

[0249] The feature sequence of each video to be detected in the video set to be detected is obtained, and the feature sequence of each video to be detected is used to characterize the relationship between at least two objects in each video to be detected; based on the feature sequence of each video to be detected in the video set to be detected, at least two abnormal videos are determined from the video set to be detected; thus, based on the relationship between at least two objects in the video to be detected, video anomaly detection is performed, thereby improving the accuracy of detecting video anomalies. At least two abnormal videos are deduplicated to determine an abnormal video set, and the abnormal types of each abnormal video in the abnormal video set are different from each other; thus, by deduplicating abnormal videos with similar contents, the content of the pushed abnormal videos has a lower repetition rate.

[0250] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps and corresponding contents of the aforementioned method embodiment can be implemented.

[0251] The embodiment of the present application also provides a computer program product, including a computer program, which can implement the steps and corresponding contents of the aforementioned method embodiment when executed by a processor.

[0252] Based on the same principle as the method provided in the embodiment of the present application, the embodiment of the present application further provides a computer program product or a computer program, which includes a computer instruction, and the computer instruction is stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method provided in any optional embodiment of the present application.

[0253] It should be understood that, although each operation step is indicated by arrows in the flowchart of the embodiment of the present application, the implementation order of these steps is not limited to the order indicated by the arrows. Unless clearly stated herein, in some implementation scenarios of the embodiment of the present application, the implementation steps in each flowchart can be performed in other orders according to demand. In addition, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on actual implementation scenarios. Some or all of these sub-steps or stages may be executed at the same time, and each sub-step or stage in these sub-steps or stages may also be executed at different times respectively. In different scenarios of execution time, the execution order of these sub-steps or stages may be flexibly configured according to demand, and the embodiment of the present application does not limit this.

[0254] The above is only an optional implementation method for some implementation scenarios of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the technical concept of the solution of the present application, other similar implementation methods based on the technical ideas of the present application are also within the protection scope of the embodiments of the present application.

Claims

1. A video detection method, characterized in that: include: Acquire a feature sequence of each video to be detected in the set of videos to be detected, wherein the feature sequence of each video to be detected is used to characterize the relationship between at least two objects in each video to be detected; Based on the feature sequence of each video to be detected in the video set to be detected, determining at least two abnormal videos from the video set to be detected; Deduplication processing is performed on the at least two abnormal videos to determine an abnormal video set, wherein the abnormal types of the abnormal videos in the abnormal video set are different from each other; The step of obtaining a feature sequence of each video to be detected in the set of videos to be detected includes: Perform median filtering on each video frame in the video to be detected to obtain a first video frame after noise removal; Performing size correction processing on the first video frame to obtain a corrected second video frame; Based on the second video frame, determine a feature sequence of the video frames in each video to be detected, the feature sequence of the video frames including an index of the video frame, a distance between objects in the video frame, an absolute pitch angle corresponding to the video frame, a horizontal angle corresponding to the video frame, a size of each object in the video frame, and at least one of a recognition score of each object in the video frame.

2. The method according to claim 1, characterized in that Determining, based on the second video frame, an absolute pitch angle corresponding to the video frame, includes: Inputting the second video frame into a preset image depth estimation function to perform depth estimation processing to obtain a depth map corresponding to the second video frame; Inputting the second video frame into a preset semantic segmentation model to perform semantic segmentation processing to obtain a mask for identifying the ground corresponding to the second video frame; Based on the depth map and the mask for identifying the ground, an absolute pitch angle corresponding to the video frame is determined.

3. The method according to claim 2, characterized in that Determining a horizontal angle corresponding to the video frame based on the second video frame includes: Based on the depth map, the mask for identifying the ground, and the distances between objects in the video frame, a horizontal angle corresponding to the video frame is determined.

4. The method according to claim 1, characterized in that Determining the size of each object in the video frame based on the second video frame includes: Inputting the second video frame into a preset instance segmentation model to perform instance segmentation processing to obtain a set of boxes corresponding to the second video frame; Based on the set of boxes, determining coordinates of boxes of each object in the video frame; Based on the coordinates of the boxes of the objects in the video frame, the sizes of the objects in the video frame are determined.

5. The method according to claim 4, characterized in that Also includes: Inputting the second video frame into a preset instance segmentation model to perform instance segmentation processing to obtain a score set corresponding to the second video frame; Determining, based on the second video frame, a recognition score of each object in the video frame, includes: Based on the score set corresponding to the second video frame, a recognition score of each object in the video frame is determined.

6. The method according to claim 1, characterized in that The determining at least two abnormal videos from the set of videos to be detected based on the feature sequence of each video to be detected in the set of videos to be detected comprises: Inputting the feature sequence of the video frame in each video to be detected into the sequence generation layer included in the preset long short-term memory neural network, performing compression processing, and obtaining a multidimensional vector corresponding to the feature sequence of the video frame; Inputting the multidimensional vector into a fully connected layer included in the long short-term memory neural network to convert the multidimensional vector into a two-dimensional vector; Inputting the two-dimensional vector into an output layer of the long short-term memory neural network to determine a probability value corresponding to the two-dimensional vector; If the probability value corresponding to the two-dimensional vector is a preset abnormality indicator, each of the to-be-detected videos is determined to be an initial abnormal video; A statistical test is performed on at least two initial abnormal videos. If the at least two initial abnormal videos meet a preset abnormal determination condition, the video to be detected corresponding to the at least two initial abnormal videos is determined as an abnormal video.

7. The method according to claim 1, characterized in that The step of performing deduplication processing on the at least two abnormal videos to determine an abnormal video set includes: For each abnormal video, determining a two-dimensional feature embedding vector of each abnormal video; If the Euclidean distance between the two-dimensional feature embedding vectors of any two abnormal videos among the at least two abnormal videos is less than a preset distance threshold, it is determined that the abnormality types between the any two abnormal videos are the same; One abnormal video among any two abnormal videos with the same abnormal type is screened out, and the other abnormal video among the any two abnormal videos is assigned to the abnormal video set.

8. A video detection device, characterized in that: include: A first processing module is used to obtain a feature sequence of each video to be detected in the set of videos to be detected, wherein the feature sequence of each video to be detected is used to characterize the relationship between at least two objects in each video to be detected; A second processing module, configured to determine at least two abnormal videos from the set of videos to be detected based on a feature sequence of each video to be detected in the set of videos to be detected; A third processing module is used to perform deduplication processing on the at least two abnormal videos to determine an abnormal video set, wherein the abnormal types of the abnormal videos in the abnormal video set are different from each other; The first processing module is specifically used for: Perform median filtering on each video frame in the video to be detected to obtain a first video frame after noise removal; Performing size correction processing on the first video frame to obtain a corrected second video frame; Based on the second video frame, determine a feature sequence of the video frames in each video to be detected, the feature sequence of the video frames including an index of the video frame, a distance between objects in the video frame, an absolute pitch angle corresponding to the video frame, a horizontal angle corresponding to the video frame, a size of each object in the video frame, and at least one of a recognition score of each object in the video frame.

9. The video detection device according to claim 8, characterized in that: The first processing module is specifically used for: Inputting the second video frame into a preset image depth estimation function to perform depth estimation processing to obtain a depth map corresponding to the second video frame; Inputting the second video frame into a preset semantic segmentation model to perform semantic segmentation processing to obtain a mask for identifying the ground corresponding to the second video frame; Based on the depth map and the mask for identifying the ground, an absolute pitch angle corresponding to the video frame is determined.

10. The video detection device according to claim 9, characterized in that: The first processing module is specifically used for: Based on the depth map, the mask for identifying the ground, and the distances between objects in the video frame, a horizontal angle corresponding to the video frame is determined.

11. The video detection device according to claim 8, characterized in that: The first processing module is specifically used for: Inputting the second video frame into a preset instance segmentation model to perform instance segmentation processing to obtain a set of boxes corresponding to the second video frame; Based on the set of boxes, determining coordinates of boxes of each object in the video frame; Based on the coordinates of the boxes of the objects in the video frame, the sizes of the objects in the video frame are determined.

12. The video detection device according to claim 11, characterized in that: The first processing module is further used for: Inputting the second video frame into a preset instance segmentation model to perform instance segmentation processing to obtain a score set corresponding to the second video frame; Determining, based on the second video frame, a recognition score of each object in the video frame, includes: Based on the score set corresponding to the second video frame, a recognition score of each object in the video frame is determined.

13. The video detection device according to claim 8, characterized in that: The second processing module is specifically used for: Inputting the feature sequence of the video frame in each video to be detected into the sequence generation layer included in the preset long short-term memory neural network, performing compression processing, and obtaining a multidimensional vector corresponding to the feature sequence of the video frame; Inputting the multidimensional vector into a fully connected layer included in the long short-term memory neural network to convert the multidimensional vector into a two-dimensional vector; Inputting the two-dimensional vector into an output layer of the long short-term memory neural network to determine a probability value corresponding to the two-dimensional vector; If the probability value corresponding to the two-dimensional vector is a preset abnormality indicator, each of the to-be-detected videos is determined to be an initial abnormal video; A statistical test is performed on at least two initial abnormal videos. If the at least two initial abnormal videos meet a preset abnormal determination condition, the video to be detected corresponding to the at least two initial abnormal videos is determined as an abnormal video.

14. The video detection device according to claim 8, characterized in that: The third processing module is specifically used for: For each abnormal video, determining a two-dimensional feature embedding vector of each abnormal video; If the Euclidean distance between the two-dimensional feature embedding vectors of any two abnormal videos among the at least two abnormal videos is less than a preset distance threshold, it is determined that the abnormality types between the any two abnormal videos are the same; One abnormal video among any two abnormal videos with the same abnormal type is screened out, and the other abnormal video among the any two abnormal videos is assigned to the abnormal video set.

15. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 7.

16. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

17. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.