A video anomaly detection method and device, electronic equipment and storage medium

By using a meta-learning-based model to detect anomalies in videos, this technology addresses the issue of inaccurate detection results in multiple scenarios, achieving higher accuracy and inclusiveness, and promptly notifying users of abnormal events in videos.

CN115802028BActive Publication Date: 2026-03-27AGRICULTURAL BANK OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-03
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing video anomaly detection methods are based on training with normal samples, resulting in inaccurate detection results in multiple scenarios and making them unsuitable for video anomaly detection in various situations.

Method used

An anomaly detection is performed on the video using a meta-learning model. The target video is received and input into a pre-trained meta-learning model to generate prompts to notify the user of abnormal events in the video.

Benefits of technology

It improves the accuracy and inclusiveness of video anomaly detection, enabling timely alerts to users of abnormal events in videos and enhancing the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115802028B_ABST
    Figure CN115802028B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a video anomaly detection method and device, electronic equipment and storage medium. The method comprises: receiving a target video sent by a shooting device; inputting the target video into a pre-trained meta-learning model to obtain target output information of the target video; when it is determined that the target video has an abnormal event based on the target output information, generating prompt information based on the abnormal event and sending the prompt information to a user. The method of the embodiments of the present application can quickly and accurately determine whether there is an abnormal event in the target video by using the pre-trained meta-learning model, thereby improving the accuracy of the video anomaly detection result. When the target video has an abnormal event, the user can be reminded in time that the target video has an abnormal event, thereby improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the field of computer vision, and particularly relate to a video anomaly detection method and device, electronic equipment and storage medium. BACKGROUND

[0002] Video anomaly detection is an important technology in the field of computer vision, and has been widely used in people's daily life. Video anomaly detection can enable computers to intelligently detect monitoring videos and the like, and detect whether there is an anomaly in real-time video data.

[0003] The basic idea of the existing video anomaly detection method is to use a convolutional neural network as an encoding and decoding module, to use a reconstruction loss as a loss function, and to learn model parameters on a normal sample training set. Since the model of this method is trained based on normal samples, it cannot be applied to video anomaly detection in various scenarios, and the result obtained when facing multi-scenario video anomaly detection is not accurate enough. SUMMARY

[0004] The present application provides a video anomaly detection method, device, electronic equipment and storage medium, which can use a meta-learning-based model to detect video anomalies, improve the accuracy of video anomaly detection results and the inclusiveness of the video anomaly detection method.

[0005] In a first aspect, embodiments of the present application provide a video anomaly detection method, which comprises:

[0006] receiving a target video sent by a shooting device;

[0007] inputting the target video into a pre-trained meta-learning model to obtain target output information of the target video;

[0008] When it is determined that the target video has an abnormal event based on the target output information, generating prompt information based on the abnormal event and sending the prompt information to a user.

[0009] In a second aspect, embodiments of the present application also provide a video anomaly detection device, which comprises:

[0010] a receiving module configured to receive a target video sent by a shooting device;

[0011] an input module configured to input the target video into a pre-trained meta-learning model to obtain target output information of the target video;

[0012] The prompting module is used to generate prompting information based on the abnormal event when it is determined that there is an abnormal event in the target video based on the target output information, and send the prompting information to the user.

[0013] Thirdly, embodiments of the present invention also provide an electronic device, the electronic device comprising:

[0014] One or more processors;

[0015] Memory, used to store one or more programs;

[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the video anomaly detection method provided in any embodiment of the present invention.

[0017] Fourthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the video anomaly detection method as provided in any embodiment of the present invention.

[0018] In this embodiment of the invention, a target video sent by a shooting device is received; the target video is input into a pre-trained meta-learning model to obtain target output information of the target video; when an abnormal event is determined to exist in the target video based on the target output information, a prompt message is generated based on the abnormal event and sent to the user. That is, in this embodiment of the invention, a pre-trained meta-learning model can be used to determine whether there are abnormal events in the target video, improving the accuracy of video anomaly detection results and the inclusiveness of the video anomaly detection method. When an abnormal event exists in the target video, the user can be promptly notified, improving the user experience. Attached Figure Description

[0019] Figure 1 This is a flowchart of the video anomaly detection method provided in an embodiment of the present invention;

[0020] Figure 2 This is a flowchart of the training method for the meta-learning model provided in this embodiment of the invention;

[0021] Figure 3 This is a schematic diagram of the video anomaly detection device provided in an embodiment of the present invention;

[0022] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0023] The application will be described in further detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are intended to be merely illustrative of the application and not limiting thereof. It should also be noted that, for the purpose of clarity, only those structures related to the application are shown in the drawings.

[0024] Figure 1 is a flowchart of a video anomaly detection method provided by an embodiment of the application. The method of the embodiment can use a model based on meta-learning to detect anomalies in videos, improving the accuracy of video anomaly detection results and the inclusiveness of the video anomaly detection method. The method can be performed by a video anomaly detection device in an embodiment of the application, which can be integrated in an electronic device, which can be a server. The method can be implemented in software and / or hardware. The video anomaly detection method provided by the embodiment specifically includes the following steps:

[0025] Step 101, receiving a target video sent by a shooting device.

[0026] The target video is a video sent by a shooting device that needs to be detected for video anomalies. Video anomaly detection is a specific task in the field of computer vision scene analysis, which detects abnormal events that may exist in a video according to the visual content in the video clip. An abnormal event is an event that is different from a normal event, i.e., an event that does not exist in the training process. The shooting device can be a monitoring camera or the like. In actual applications, when it is necessary to understand whether there are abnormal events in the target video, the shooting device can send the target video captured in real time to the server, and the server can receive the target video sent by the shooting device.

[0027] Step 102, inputting the target video into a pre-trained meta-learning model to obtain target output information of the target video.

[0028] The meta-learning is a model training method of deep learning. Deep learning is a method of processing raw information through multiple layers of networks to learn the internal laws and representation levels of data. The information obtained in the deep learning process is very helpful for the interpretation of some data such as text, images and sound. Deep learning can enable machines to have analysis and learning capabilities like humans. The model training method based on meta-learning can train the model through multiple tasks after initializing the parameters, so that the model has the best performance on new tasks. The model training method of meta-learning can learn to adapt to new scenarios from a small amount of data through one or a few gradient updates. The meta-learning model is trained based on meta-learning and is used to determine whether the target video has abnormal events. The target output information is the information output by the meta-learning model based on the target video. In an embodiment of the present application, the training of the meta-learning model includes the following steps A1-A2:

[0029] Step A1: If the meta-learning model does not meet the preset convergence condition, extract a sample from the scene video sample library as a current sample.

[0030] The convergence condition is a condition preset according to an experimental environment and specific requirements. The scene video sample library includes videos of at least one scene. The scene video sample library stores videos of multiple scenes. Each sample in the scene video sample library includes a set of continuous video frames. When the meta-learning model meets the convergence condition, it means that the meta-learning model can be used to detect whether an abnormal event exists in the target video. When the meta-learning model does not meet the convergence condition, it means that the meta-learning model still needs to be optimized through training until the meta-learning model meets the preset convergence condition.

[0031] Step A2: Train the meta-learning model using the current sample, and repeat the above operation until the meta-learning model meets the convergence condition.

[0032] The current sample is a sample randomly selected from the scene video sample library. The sample label is the set of continuous video frames corresponding to the current sample in an ideal state. Specifically, after obtaining the scene video sample library, a set of continuous video frames is extracted from the scene video sample library as the current sample, and the next set of continuous video frames of the current sample is determined from the scene video sample library as the sample label. The current sample is input into the untrained meta-learning model to obtain the next set of continuous video frames of the continuous video frames output by the meta-learning model after receiving the continuous video frames corresponding to the sample label after calculation and learning. The loss function is calculated according to the continuous video frames output by the meta-learning model and the sample label, and the model parameters of the meta-learning model are adjusted according to the calculation result of the loss function until the meta-learning model meets the convergence condition.

[0033] The autoencoder is a deep learning network structure including an encoder and a decoder, takes the reconstruction loss as the loss function, and learns the model parameters on the normal sample training set. In an optional implementation, in the meta-learning model training stage, the video anomaly detection algorithm based on the autoencoder is used as the learning target of the meta-learning model, and then the model parameters of the deep learning model are trained using the meta-learning method.

[0034] The meta-learning model is trained by the above method, so that the meta-learning model can adapt to the task in the new scene from a small amount of data in the new task through one or a few gradient updates, thereby improving the applicability of the meta-learning model.

[0035] Step 103: When it is determined that the target video has an abnormal event based on the target output information, generate prompt information based on the abnormal event, and send the prompt information to the user.

[0036] The target output information is information output by the meta-learning model after the target video is input into the trained meta-learning model. The abnormal event is an event that is different from the normal event and does not exist in the training process. The prompt information is information for prompting the user that the abnormal event exists in the target video.

[0037] Specifically, after obtaining the target video, the server inputs the target video into the trained meta-learning model, and the meta-learning model processes the target video to detect whether an abnormal event exists in the target video. When the target video contains an abnormal event, the server can generate prompt information according to the abnormal event in the target video to prompt the user. In the embodiment of the scheme, optionally, the prompt information is displayed through a display device and / or played through a voice broadcaster.

[0038] The display device includes a central display screen, a monitoring display screen, and the like. Specifically, when the server determines that the target video contains abnormal information, the target video is synchronously displayed on the display device, and the prompt information can be displayed for the user on the display device, and the prompt information can also be played for the user through the voice broadcaster. For example, if a vehicle breaks through a barrier in a monitoring video of an underground garage, the server can display a red text of "Attention! Abnormal, please handle as soon as possible" on the monitoring display screen after determining that the target video contains an abnormal event, and the voice broadcaster can synchronously play a voice prompt sound of "Attention! Abnormal, please handle as soon as possible".

[0039] The scheme of the embodiment of the application receives the target video sent by the shooting device, inputs the target video into the pre-trained meta-learning model to obtain the target output information of the target video, generates prompt information based on the abnormal event when it is determined that the target video contains an abnormal event based on the target output information, and sends the prompt information to the user. The technical scheme of the embodiment can use the pre-trained meta-learning model to determine whether an abnormal event exists in the target video, improve the accuracy of the video abnormality detection result, and improve the inclusiveness of the video abnormality detection method. When the target video contains an abnormal event, the user can be timely reminded, and the user experience is improved.

[0040] Figure 2 is a flowchart of the training method of the meta-learning model provided by the embodiment of the application, as shown in Figure 2 The method mainly includes the following steps:

[0041] Step 201, a group of continuous video frames are selected as a current sample from a scene video sample library.

[0042] Wherein, the current sample is a continuous video frame extracted from the scene video sample library. The sample label is the ideal state, and the continuous video frame corresponding to the current sample. The scene video sample library stores videos of various scenes. For example, it is assumed that the scene video sample library includes continuous video frames of multiple scenes, one of which corresponds to N (N time) continuous video frames L1, L2, L3……L N The continuous video frames L1, L2, L3……L t before time t are selected from the continuous video frames of the scene as the current sample.

[0043] Step 202, determining the next set of continuous video frames of the current sample as the sample label corresponding to the current sample.

[0044] Wherein, the duration of the continuous video of the sample label is less than the duration of the continuous video of the current sample. After determining the current sample, the next one or more video frames of the last video frame in the current sample are used as the sample label. For example, the current sample is the continuous video frame L1, L2, L3……L t , then the corresponding sample label can be L t+1 . Of course, the sample label can also be L t , and the continuous video frames after time t.

[0045] In the above steps, the video frames corresponding to different scenes can be used to train the meta-learning model, and the target scene is tested in the test phase. The meta-learning model can adapt to the task in the new scene from a small amount of data in the new task through one or a few gradient updates, thereby improving the efficiency of the meta-learning model in processing video frames in the new scene.

[0046] Step 203, inputting the continuous video frame corresponding to the current sample into the meta-learning model.

[0047] Specifically, after determining the current sample, the continuous video frame corresponding to the current sample is input into the meta-learning model. In an optional embodiment, the meta-learning model is denoted as f θ (I 1:t )→I t+1 , f θ (I 1:t ) represents the output of the meta-learning model, θ represents the model parameters of the meta-learning model, I 1:t represents the video frame I1, I2, I3……I t corresponding to the current sample. I t+1 represents the video frame at time t+1. The definition of meta-learning in the video anomaly detection algorithm is that the meta-training phase includes N scenes: S1, S2, S3……S NFor a given scenario S i A corresponding task can be constructed. in, Indicates task T i The training and validation sets are provided. The task includes scenario S. i Medium-length continuous video frames of length t+1: I1, I2, I3...I t ,I t+1 The first t frames are used as input x (the current sample), and the last frame is used as output y. Then x = I1, I2, I3...I t y = I t+1 Furthermore, the meta-learning model is obtained as f θ :x→y.

[0048] Step 204: Obtain the next set of consecutive video frames corresponding to the current sample from the meta-learning model output, and use this set of consecutive video frames as the output information of the meta-learning model.

[0049] Specifically, after inputting the current sample into the meta-learning model, the meta-learning model can process the consecutive video frames corresponding to the current sample, predict and output the next set of consecutive video frames for the current sample. For example, the video sample library includes consecutive video frames S of a certain scene. i S i It includes consecutive video frames of length t+1: I1, I2, I3...I t ,I t+1 The current samples are I1, I2, I3...I t After the current sample is input into the meta-learning model, the meta-learning model can process the current sample and output its predicted I. t+1 '.

[0050] Step 205: Calculate the loss function of the meta-learning model based on the output information and sample labels, and adjust the model parameters in the meta-learning model based on the loss function.

[0051] The loss function is a function that maps the values ​​of a random event or its related random variables to non-negative real numbers to represent the "risk" or "loss" of that random event. Model parameters are configuration variables within the model.

[0052] In one alternative implementation, it is assumed that the video sample library includes T i From a set of consecutive video frames, K samples and their labels are randomly selected from a video sample library as the training set. Then D tr ={(x1,y1), (x2,y2)……(x k ,y k), x is a sample, y is a sample label, and D tr Further, K samples and sample labels are randomly generated as a validation set Meta-learning model f θ The initial model parameter of : x→y is θ. The model parameter is updated by using a loss function as shown in equation (1):

[0053]

[0054] Where θ i is the model parameter after the i-th update, and α is a hyperparameter of the meta-learning model, is a loss function, and the loss function is shown in equation (2):

[0055]

[0056] Where f θ (x j ) is the video frame predicted by the meta-learning model, y j is a sample label. L(·) represents a function of intensity, gradient, and color difference. The validation set Further determine the complexity of the meta-learning model, and adjust the model parameter according to the loss function calculated by the validation set. The loss function calculated by the validation set is shown in equation (3):

[0057]

[0058] Where θ i is the updated model parameter. The training target of the meta-learning model is to reduce the "gap" between the output information of the meta-learning model and the sample label, and the loss function can calculate this "gap". Therefore, the goal of the meta-learning model can be converted to minimize the loss function, and the minimization of the loss function is shown in equation (4):

[0059]

[0060] Where i represents the i-th sample, and M represents the total number of samples. After calculating the loss function of the meta-learning model by the output information of the meta-learning model and the sample label, the model parameter is updated according to the calculation result of the loss function, and thus the optimized meta-learning model can be obtained.

[0061] After adjusting the model parameters of the meta-learning model, the adjusted meta-learning model can be tested by using the validation set, and whether the meta-learning model meets the use standard is determined according to the test result. In the embodiment of the present scheme, after adjusting the model parameters of the meta-learning model, determining whether the adjusted meta-learning model meets the use standard includes the following steps B1-B3:

[0062] Step B1: Model testing is performed on the adjusted meta-learning model to obtain a test result of the model testing.

[0063] The model testing is used to test the performance of the finally selected optimal model by using the test set. The test result can reflect whether the meta-learning model meets the use standard. In an optional implementation, a new scene S new is selected, K samples are randomly selected, formula (3) is applied to the new scene S new , and the updated model parameters θ' are obtained through adaptation of the K samples. Then, θ' is applied to the new scene S new . In this way, the model can be tested to obtain a test result of the model testing.

[0064] Step B2: Determine whether the meta-learning model meets the use standard based on the test result.

[0065] The use standard is predefined according to specific requirements and experimental environment. The use standard can be a model evaluation standard. For example, the meta-learning model is tested, an AUC curve or an ROC curve is generated according to the test result, and whether the meta-learning model meets the use standard is determined according to the generated AUC curve or ROC curve.

[0066] Step B3: When the meta-learning model does not meet the use standard, the meta-learning model is adjusted until the meta-learning model meets the use standard.

[0067] Specifically, when the meta-learning model does not meet the use standard, it indicates that the meta-learning model cannot accurately determine whether there is an abnormal event in the video, and the meta-learning model needs to be continuously trained and optimized. When the meta-learning model meets the use standard, it indicates that the meta-learning model can accurately determine whether there is an abnormal event in the video, and it can be determined that the meta-learning model is a trained meta-learning model.

[0068] In the above steps, the meta-learning model can be tested by using the validation set, and the meta-learning model can be further processed according to the test result, thereby improving the accuracy of the output information of the meta-learning model.

[0069] The training method of the meta-learning model provided in the embodiment of the present application can select a group of continuous video frames as a current sample from a scene video sample library, determine a next group of continuous video frames of the current sample as a sample label corresponding to the current sample, input the continuous video frames corresponding to the current sample to the meta-learning model, obtain the next group of continuous video frames corresponding to the current sample output by the meta-learning model, calculate a loss function of the meta-learning model based on the output information of the meta-learning model and the sample label, and adjust model parameters in the meta-learning model based on the loss function. The method for training the meta-learning model in the embodiment can enable the meta-learning model to adapt to a task in a new scene from a small amount of data in a new task through one or a few times of gradient update, improve the applicability of the meta-learning model and the efficiency of processing data, and further improve the accuracy of a video anomaly detection result.

[0070] Figure 3 is a structural schematic diagram of a video anomaly detection device provided in the embodiment of the present application. The embodiment of the present application provides a video anomaly detection device, which comprises:

[0071] The receiving module 301 is configured to receive a target video sent by a shooting device.

[0072] The input module 302 is configured to input the target video to a pre-trained meta-learning model to obtain target output information of the target video.

[0073] The prompting module 303 is configured to generate prompt information based on an abnormal event when it is determined that the target video has the abnormal event based on the target output information, and send the prompt information to a user.

[0074] Optionally, before receiving the target video sent by the shooting device, the input module 302 is specifically configured to: if the meta-learning model does not satisfy a pre-set convergence condition, extract a sample as a current sample from a scene video sample library; wherein the scene video sample library comprises videos of at least one scene.

[0075] The meta-learning model is trained using the current sample, and the above operation is repeatedly performed until the meta-learning model satisfies the convergence condition.

[0076] Optionally, the input module 302 is further configured to: determine a sample label corresponding to the current sample.

[0077] The current sample is input to the meta-learning model to obtain output information of the meta-learning model.

[0078] A loss function of the meta-learning model is calculated based on the output information of the meta-learning model and the sample label, and model parameters in the meta-learning model are adjusted based on the loss function.

[0079] Optionally, the input module 302 is further configured to construct a corresponding graph data structure based on the current sample.

[0080] select a group of continuous video frames from the scene video sample library as a current sample;

[0081] determine the next group of continuous video frames of the current sample as a sample label corresponding to the current sample; wherein the time length of the continuous video of the sample label is less than the time length of the continuous video of the current sample.

[0082] Optionally, the input module 302 is further configured to input the continuous video frames corresponding to the current sample to the meta-learning model.

[0083] obtain the next group of continuous video frames corresponding to the current sample output by the meta-learning model.

[0084] Optionally, after adjusting the model parameters in the meta-learning model based on the loss function, the input module 302 is further configured to perform model testing on the adjusted meta-learning model to obtain a test result of the model testing.

[0085] determine whether the meta-learning model meets the use standard based on the test result.

[0086] When the meta-learning model does not meet the use standard, the meta-learning model is adjusted until the meta-learning model meets the use standard.

[0087] Optionally, the prompt module 303 is further configured to send the prompt information to the user, including: displaying the prompt information through a display device and / or playing the prompt information through a voice broadcaster.

[0088] The video anomaly detection device provided in the embodiments of the present application can execute the video anomaly detection method provided in any of the embodiments of the present application, and has the corresponding function modules and beneficial effects of the execution method.

[0089] Figure 4 is a structural schematic diagram of an electronic device provided by the embodiments of the present application, for reference Figure 4 which shows a structural schematic diagram of a computer system 12 of an electronic device suitable for implementing the embodiments of the present application. Figure 4 The electronic device shown is only an example, and should not bring any limitation to the functions and use range of the embodiments of the present application. The components of the electronic device 12 can include but are not limited to one or more processors or processing units 16, system memory 28, bus 18 connecting different system components including system memory 28 and processing unit 16.

[0090] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0091] Electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by electronic device 12, including volatile and non-volatile media, removable and non-removable media.

[0092] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (… Figure 4 Not shown; usually referred to as a "hard drive"). Although Figure 4 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.

[0093] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include—but are not limited to—an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of the present invention.

[0094] The electronic device 12 can also communicate with one or more external devices 14 such as a keyboard, a pointing device, a display 24, etc.; other devices that enable a user to interact with the electronic device 12; and / or any devices (e.g., a networking module, a Figure 4 Other hardware and / or software modules that can be incorporated in electronic device 12, not shown in FIG. 1, include but are not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc.

[0095] The processing unit 16 performs various functions applications and video anomaly detection by running programs stored in the system memory 28, such as implementing a method for video anomaly detection provided by an embodiment of the present application: receiving a target video sent by a shooting device; inputting the target video into a pre-trained meta-learning model to obtain target output information of the target video; when determining that the target video has an abnormal event based on the target output information, generating prompt information based on the abnormal event and sending the prompt information to a user.

[0096] This invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements a video anomaly detection method as provided in all embodiments of this invention: receiving a target video sent by a shooting device; inputting the target video into a pre-trained meta-learning model to obtain target output information of the target video; when an anomaly event is determined to exist in the target video based on the target output information, generating a prompt message based on the anomaly event, and sending the prompt message to a user. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of a computer-readable storage medium include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.

[0097] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0098] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0099] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0100] It should be noted that the above-mentioned embodiments illustrate rather than limit the application, and that those skilled in the art will be able to design many alternative embodiments without departing from the scope of the application. The word "comprising" does not exclude the presence of elements or steps other than those listed and the word "a" or "an" preceding the usage of an element does not exclude the presence of a plurality of such elements. It is anticipated that, depending on the specific design choices made for a given embodiment, the application can be implemented in a variety of ways, all of which are intended to fall within the scope of the present application as defined by the subjoined claims.

Claims

1. A method of video anomaly detection, the method comprising: The method comprises: If the meta-learning model does not meet the preset convergence condition, a set of continuous video frames are selected from a scene video sample library as a current sample; wherein the scene video sample library includes videos of at least one scene; a next set of continuous video frames of the current sample is determined as a sample label corresponding to the current sample; wherein the time length of the continuous video of the sample label is less than the time length of the continuous video of the current sample; the meta-learning model is f θ : x→y; x=I1, I2, I3……I t , y=I t+1 ; I t+1 represents a video frame at t+1 time; I t represents a video frame at t time; θ represents a model parameter of the meta-learning model; inputting a continuous video frame corresponding to the current sample into the meta-learning model; obtaining a next set of continuous video frames corresponding to the current sample output by the meta-learning model, and taking the continuous video frame as output information of the meta-learning model; calculating a loss function of the meta-learning model based on the output information of the meta-learning model and the sample label, and adjusting the model parameters in the meta-learning model based on the loss function; repeat the above operation until the meta-learning model meets the convergence condition; receiving a target video sent by a shooting device; inputting the target video into the pre-trained meta-learning model to obtain target output information of the target video; when it is determined based on the target output information that the target video has an abnormal event, generating prompt information based on the abnormal event and sending the prompt information to a user.

2. The method of claim 1, wherein, After adjusting the model parameters in the meta-learning model based on the loss function, the method further comprises: performing model testing on the adjusted meta-learning model to obtain a test result of the model testing; determining whether the meta-learning model meets a use standard based on the test result; when the meta-learning model does not meet the use standard, adjusting the meta-learning model until the meta-learning model meets the use standard.

3. The method of claim 1, wherein, sending the prompt information to the user comprises: displaying the prompt information through a display device and / or playing the prompt information through a voice player.

4. A video anomaly detection apparatus characterized by comprising: The device comprises: The receiving module is configured to: if the meta-learning model does not satisfy the preset convergence condition, select a set of continuous video frames from a scene video sample library as a current sample; wherein the scene video sample library comprises videos of at least one scene; determine a next set of continuous video frames of the current sample as a sample label corresponding to the current sample; wherein a time length of the continuous video of the sample label is less than a time length of the continuous video of the current sample; and the meta-learning model is f θ : x→y; x=I1, I2, I3...I t , y=I t+1 ; I t+1 represents a video frame at t+1 time; I t represents a video frame at t time; and θ represents model parameters of the meta-learning model. inputting a continuous video frame corresponding to the current sample into the meta-learning model; obtaining a next set of continuous video frames corresponding to the current sample output by the meta-learning model, and taking the continuous video frame as output information of the meta-learning model; calculating a loss function of the meta-learning model based on the output information of the meta-learning model and the sample label, and adjusting the model parameters in the meta-learning model based on the loss function; repeat the above operation until the meta-learning model meets the convergence condition; receiving a target video sent by a shooting device; an input module configured to input the target video into the pre-trained meta-learning model to obtain target output information of the target video; a prompt module configured to, when it is determined based on the target output information that the target video has an abnormal event, generate prompt information based on the abnormal event and send the prompt information to a user.

5. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the video anomaly detection method of any one of claims 1-3 when executing the program.

6. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the video anomaly detection method of any one of claims 1-3.

Citation Information

Patent Citations

  • Abnormal behavior supervision method and device based on action recognition and storage medium

    CN113052029A