Video detection method and system based on memory enhancement and conditional variation self-encoding network

Through the video detection method based on memory enhancement and conditional variational autoencoding network, the spatiotemporal features of the video frame sequence are extracted and a hybrid network model is constructed, which solves the problem of low recognition accuracy of video surveillance systems in abnormal behavior detection in the existing technology. Efficient abnormal event detection is achieved.

CN118570697APending Publication Date: 2024-08-30SHAANXI UNIV OF SCI & TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410640976.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-22
Publication Date
2024-08-30

Smart Images

  • Figure CN118570697A
    Figure CN118570697A
Patent Text Reader

Abstract

The invention provides a video detection method and system based on memory enhancement and a conditional variation self-encoding network, and the method comprises the following steps: collecting all video frame sequence data, and extracting spatial-temporal features in the sequence; extracting target features by adopting a bounding box extraction mode based on the spatial-temporal features, memorizing a normal behavior mode through a memory matrix, and constructing a memory enhanced auto-encoder network; based on the memory enhanced auto-encoder network and the optical flow sequence in the target features, obtaining potential mapping from the optical flow sequence to hidden variables through variational inference learning, and constructing a conditional variational auto-encoder network; splicing feature maps corresponding to the normal behavior modes obtained by the memory enhancement auto-encoder network and the conditional variation auto-encoder network to form a hybrid network model, and training the hybrid network model by using normal video samples to obtain a video detection model; according to the invention, the problem of low recognition accuracy of video anomaly detection in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of deep learning applications, and specifically relates to a video detection method and system based on memory enhancement and conditional variational autoencoder network. Background Art

[0002] With the reduction of the deployment cost of surveillance cameras, the application of video surveillance has been widely expanded to different scenarios. These surveillance cameras continue to generate a wealth of surveillance videos. However, the existing video surveillance equipment is limited by the performance of the chip and can generally only complete basic functions such as recording and storage. It lacks the ability to analyze and understand the video content. In practical applications, the identification of abnormal behavior still relies to a large extent on manual observation and judgment. The video anomaly detection system based on various surveillance equipment in public places is designed to detect and identify these abnormal events from continuous surveillance video streams to provide timely alarms or notifications to help monitoring personnel respond quickly and take appropriate measures. However, manual review of videos will inevitably lead to problems such as fatigue, distraction and omissions, and the abnormal events themselves are subjective and ambiguous, resulting in high misjudgment and omission rates. With the deepening of urbanization and the improvement of the infrastructure of the monitoring system, the method of manually reviewing surveillance videos can no longer meet the needs of video anomaly detection tasks in real life.

[0003] Unlike general classification tasks, in real-world anomaly detection datasets, due to the rarity, diversity, and contingency of abnormal events, positive samples (i.e., anomalies) are far less than negative samples, and it is very difficult or costly to collect labeled data containing abnormal events. Due to the lack of predetermined categories and sufficient data labels for abnormal events, it is difficult to train the model using supervised machine learning algorithms. Therefore, video anomaly detection algorithms based on unsupervised learning have scientific value and practical significance. When dealing with the problem of video abnormal behavior detection, two major technical challenges are usually encountered. One is how to extract high-level semantic features from video frame sequences, and the other is how to build a sentiment classification model to achieve better classification results. Different video anomaly detection methods have been continuously proposed in recent years, and the classification effect has also been gradually improved. However, in order to further improve the performance of anomaly recognition, there are still some important issues that need to be studied in depth: one is how to model the normal features in the surveillance video and represent the features so that they have more obvious correlation and discriminability in the time domain and frequency domain; the other is how to build an effective deep model to mine deeper sentiment-related features from the input video frame sequence to improve the ability of video anomaly detection. Summary of the invention

[0004] In view of the problems existing in the prior art, the present invention provides a video detection method and system based on memory enhancement and conditional variational autoencoder network, so as to solve the problem of low recognition accuracy of video anomaly detection in the prior related technology.

[0005] The present invention is achieved through the following technical solutions:

[0006] A video detection method based on memory enhancement and conditional variational autoencoder network, comprising the following steps:

[0007] Collect all video frame sequence data and extract spatiotemporal features in the sequence;

[0008] Based on the spatiotemporal features, the target features are extracted by bounding box extraction, and the normal behavior patterns are memorized by the memory matrix to construct a memory-enhanced autoencoder network.

[0009] Based on the memory-enhanced autoencoder network and the optical flow sequence in the target feature, the potential mapping from the optical flow sequence to the latent variable is obtained through variational inference learning, and a conditional variational autoencoder network is constructed;

[0010] The feature maps corresponding to the normal behavior patterns obtained by the memory-enhanced autoencoder network and the conditional variational autoencoder network are spliced ​​to form a hybrid network model. The hybrid network model is trained with normal video samples to obtain a video detection model.

[0011] Furthermore, the process of collecting all video frame sequence data and extracting the spatiotemporal features in the sequence is as follows:

[0012] The collected video frame sequence data is subjected to feature extraction from the spatial dimension and channel dimension to obtain spatiotemporal features.

[0013] Furthermore, the normal video sample is:

[0014] The video that only includes normal pedestrians is called a normal video sample, otherwise, it is called an abnormal video sample.

[0015] Further, the memory-enhanced autoencoder network includes a memory matrix composed of a plurality of memory slot vectors, and the memory matrix is ​​used to represent a normal pattern in the video;

[0016] The memory-enhanced autoencoder network uses an attention-based addressing operation to retrieve highly correlated items in the memory module and reconstruct high-dimensional features through the highly correlated items;

[0017] During the reconstruction process, the memory-augmented autoencoder network only uses a limited number of normal patterns stored in the memory matrix for feature reconstruction.

[0018] Furthermore, for the memory slot that needs to be updated during the training process, a query whose distance to the memory slot is less than a preset threshold is selected to update the memory slot, and the vector parameter of the memory slot is re-normalized;

[0019] For the loss function in the training phase, compactness loss function and separation loss function are used.

[0020] Furthermore, the conditional variational autoencoder network includes a first encoder, a second encoder and a decoder, wherein the first encoder is used to encode the optical flow sequence to obtain features in the form of probability distribution, and the second encoder is used to concatenate and encode the video frame sequence data and the optical flow sequence to obtain the posterior distribution;

[0021] During the training process, normal random sampling is performed from the posterior distribution, and the sample is concatenated with the optical flow sequence encoded by the first encoder and then sent to the decoder to obtain the predicted future frame.

[0022] Furthermore, a skip connection unit is provided between the second encoder and the decoder.

[0023] A video detection system based on memory enhancement and conditional variational autoencoder, comprising:

[0024] The preprocessing unit is configured as follows:

[0025] Used to collect all video frame sequence data and extract spatiotemporal features in the sequence;

[0026] The first model building unit is configured to:

[0027] It is used to extract target features by bounding box extraction based on spatiotemporal features, and to memorize normal behavior patterns through a memory matrix to construct a memory-enhanced autoencoder network;

[0028] The second model building unit is configured to:

[0029] It is used to construct a conditional variational autoencoder network based on a memory-enhanced autoencoder network and an optical flow sequence in the target feature, and obtain the potential mapping from the optical flow sequence to the latent variable through variational inference learning;

[0030] Output unit, configured as:

[0031] It is used to splice the feature maps corresponding to the normal behavior patterns obtained by the memory-enhanced autoencoder network and the conditional variational autoencoder network to form a hybrid network model, and use normal video samples to train the hybrid network model to obtain a video detection model.

[0032] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of a video detection method based on memory enhancement and conditional variational autoencoder network are implemented.

[0033] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of a video detection method based on memory enhancement and conditional variational autoencoder network are implemented.

[0034] Compared with the prior art, the present invention has the following beneficial technical effects:

[0035] The present invention provides a video detection method and system based on memory enhancement and conditional variational autoencoder network, comprising the following steps: collecting all video frame sequence data and extracting spatiotemporal features in the sequence; extracting target features by using a bounding box extraction method based on the spatiotemporal features, memorizing normal behavior patterns through a memory matrix, and constructing a memory enhancement autoencoder network; based on the memory enhancement autoencoder network and the optical flow sequence in the target feature, obtaining a potential mapping of the optical flow sequence to a hidden variable through variational inference learning to construct a conditional variational autoencoder network; splicing feature maps corresponding to the normal behavior patterns obtained by the memory enhancement autoencoder network and the conditional variational autoencoder network to form a hybrid network model, and training the hybrid network model with normal video samples to obtain a video detection model; the present application compensates for information loss caused by memory through a reconstruction process of the memory enhancement autoencoder network, captures the correlation between the optical flow and the video frame through the conditional variational autoencoder network, and conducts comparative experiments on Ped2, Avenue and SHTech data sets, and the abnormal event detection accuracy reaches 98.1%, 90.6% and 78.6% respectively, proving that the video detection model achieves a relatively strong abnormality detection capability. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 A flow chart of a video detection method based on memory enhancement and conditional variational autoencoder network according to an embodiment of the present disclosure is shown;

[0037] Figure 2 A structural diagram of a video detection method based on memory enhancement and conditional variational autoencoder network according to an embodiment of the present disclosure is shown;

[0038] Figure 3 A general framework diagram of anomaly detection performed by a memory-enhanced autoencoder network according to an embodiment of the present disclosure is shown; Figure 4 A flow chart of a mechanism for updating a memory slot using a challenge according to an embodiment of the present disclosure is shown;

[0039] Figure 5 The automatic encoder structure of the memory-enhanced autoencoder network of the embodiment of the present disclosure is shown;

[0040] Figure 6 The structure diagram of the autoencoder of the memory-enhanced autoencoder network with skip connections according to an embodiment of the present disclosure is shown;

[0041] Figure 7 The future frame prediction based on the conditional variational autoencoder network of the embodiment of the present disclosure is shown;

[0042] Figure 8 The frame-level AUC values ​​% of different methods of the embodiments of the present disclosure on the Ped2, Avenue, and SHTech datasets are shown;

[0043] Fig. 9 The auxiliary effect of the conditional variational autoencoder network of the embodiment of the present disclosure on the memory enhancement autoencoder network is shown. DETAILED DESCRIPTION

[0044] The present invention is further described in detail below in conjunction with specific embodiments, which are intended to explain the present invention rather than to limit it.

[0045] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0046] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0047] Figure 1 and Figure 2 A flow chart of a video detection method based on memory enhancement and conditional variational autoencoder network in an embodiment of the present disclosure is shown, comprising the following steps:

[0048] Collect all video frame sequence data and extract spatiotemporal features in the sequence;

[0049] Based on the spatiotemporal features, the target features are extracted by bounding box extraction, and the normal behavior patterns are memorized by the memory matrix to construct a memory-enhanced autoencoder network.

[0050] Based on the memory-enhanced autoencoder network and the optical flow sequence in the target feature, the conditional variational autoencoder network is constructed by learning the potential mapping from the optical flow sequence to the latent variable through variational inference;

[0051] The feature maps corresponding to the normal behavior patterns obtained by the memory-enhanced autoencoder network and the conditional variational autoencoder network are spliced ​​to form a hybrid network model. The hybrid network model is trained with normal video samples to obtain a video detection model.

[0052] Preferably, in the disclosed embodiment, the process of collecting all video frame sequence data and extracting spatiotemporal features in the sequence is:

[0053] The collected video frame sequence data is subjected to feature extraction from the spatial dimension and channel dimension to obtain spatiotemporal features.

[0054] Preferably, in the embodiment of the present disclosure, the normal video sample is:

[0055] A video that only includes normal pedestrians is a normal video sample, otherwise it is called an abnormal video sample. Specifically, the content of the abnormal video sample includes the circulation of non-pedestrian entities, such as the driving of motor vehicles, or abnormal pedestrian movement patterns, such as skateboarding, fighting, etc.

[0056] Preferably, in an embodiment of the present disclosure, the memory-enhanced autoencoder network includes a memory matrix composed of a plurality of memory slot vectors, and the memory matrix is ​​used to characterize a normal mode in a video;

[0057] The memory-enhanced autoencoder network retrieves items with high correlation in the memory module based on the addressing operation of the attention mechanism, and reconstructs high-dimensional features through the items with high correlation;

[0058] During the reconstruction process, the memory-augmented autoencoder network only uses a limited number of normal patterns stored in the memory matrix for feature reconstruction.

[0059] Furthermore, for the memory slot that needs to be updated during the training process, a query whose distance to the memory slot is less than a preset threshold is selected to update the memory slot, and the vector parameter of the memory slot is re-normalized;

[0060] For the loss function in the training phase, compactness loss function and separation loss function are used.

[0061] Preferably, in an embodiment of the present disclosure, the conditional variational autoencoder network includes a first encoder, a second encoder and a decoder, wherein the first encoder is used to encode the optical flow sequence to obtain features in the form of probability distribution, and the second encoder is used to concatenate and encode the video frame sequence data and the optical flow sequence to obtain the posterior distribution;

[0062] During the training process, normal random sampling is performed from the posterior distribution, and the optical flow sequence encoded by the first encoder of the sample is concatenated and sent to the decoder to obtain the predicted future frame.

[0063] Furthermore, a skip connection unit is provided between the second encoder and the decoder.

[0064] The present invention provides an embodiment:

[0065] The present invention provides a method for learning and extracting deep time-frequency correlation features from the original surveillance video frame sequences on the public data sets Ped2, Avenue, and SHTech, and realizing frame-level anomaly score calculation to achieve better video anomaly detection effects. The memory-enhanced autoencoder network adopts a multi-layer structure with jump connections in the model structure, and improves the update method of the memory matrix, which can more accurately memorize the normal mode in the video sequence and produce a larger reconstruction error for abnormal inputs, such as Figure 3 As shown in the figure, the conditional variational autoencoder network takes the RGB frame reconstructed by the memory-enhanced autoencoder network as input and takes the optical flow as a condition to further enhance the abnormal score of the frame where the abnormal event is located. Compared with the existing method, a better classification accuracy is obtained, including the following steps:

[0066] Construct a memory-enhanced autoencoder network, which consists of an encoder, a decoder, and a memory module. The memory module retrieves items with high correlation in the memory storage unit through an addressing operation based on the attention mechanism, and then reconstructs high-dimensional features through these items. During the training process, for the update of the memory slot in the memory module, the query with a distance less than a certain threshold is selected to update the slot, and the compactness loss and the separation loss are introduced to obtain more compact features while preventing the problem of compactness loss being overcorrected in the later stage of training. Add jump connections between different layers of the encoder and decoder, and add memory modules between the jump connections.

[0067] Construct a conditional variational autoencoder network, including two encoders and one decoder. The first encoder encodes the optical flow to obtain features in the form of probability distribution, and the second encoder encodes the concatenation of the video frame sequence and the optical flow to obtain the posterior distribution; during the training process, normal random sampling is performed from the posterior distribution, and the optical flow sequence encoded by the first encoder of the sample is concatenated and sent to the decoder to obtain the predicted future frame. In addition, this module will also add a jump connection between the second encoder and the decoder to prevent model collapse;

[0068] In this embodiment, experiments are conducted based on video frame sequences collected from public data sets Ped2, Avenue, and SHTech, where:

[0069] (1) Ped2 consists of 16 training videos and 12 test videos, and the resolution of each video frame is 360*240. The normal video sample data for training only contains walking pedestrians, while the abnormal events in the abnormal video samples are due to the circulation of non-pedestrian entities or abnormal pedestrian movement patterns.

[0070] (2) CUHK Avenue includes 16 training videos and 21 testing videos collected from a fixed scene, with a total of 47 abnormal events such as running, throwing bags, etc.

[0071] (3) SHTech is a very challenging dataset in the field of video anomaly detection. It contains videos of 13 scenes with complex lighting conditions and camera angles. The total number of frames for training and testing reaches 274K and 42K respectively. There are 130 abnormal events in the test set, including chasing and fighting and vehicle driving in.

[0072] The structure of the memory-enhanced autoencoder network in the present invention is as follows: Figure 4 As shown in Figure 2, the network stores the encoded features of all normal samples in the memory matrix. Figure 4 In the equation, ω is the correlation coefficient between the encoding feature of the current input and the memory matrix M. is the correlation coefficient after hard compression. Hard compression can force the model to take fewer memory items to reconstruct the encoded feature z.

[0073] The memory module in the memory-enhanced autoencoder network generates output by multiplying the weight vector with the memory matrix M:

[0074]

[0075] Where ω is a row vector whose elements are non-negative and sum to 1, ω i is an element of ω. The weight vector is obtained according to the input z, and N is the number of rows of the memory matrix.

[0076] During the training and testing of the memory-augmented autoencoder network, the correlation coefficient ω is calculated by the approximation between z and M:

[0077]

[0078] where d(z,m i ) represents the feature z and the i-th item m of the memory matrix i The similarity measure of is calculated as follows:

[0079]

[0080] The memory module retrieves the item stored in M ​​that is closest to feature z from the memory matrix M to reconstruct the feature In order to suppress the model's reconstruction of abnormal inputs, the correlation coefficient ω is constrained, and the weight coefficients below the sparse threshold λ are set to 0 for hard compression;

[0081]

[0082] Because ω is not a continuous function, error back propagation cannot be achieved during training. A continuous RELU activation function is used to construct a new constraint coefficient:

[0083]

[0084] In the formula, ε is a very small positive number, generally taken as 0.0001.

[0085] Next, during the training of the memory-enhanced autoencoder network, for each memory slot, select a query whose distance to it is less than τ, and let the subscript set of the query corresponding to the mth memory slot be By the following formula:

[0086]

[0087] Update the memory slot, such as Figure 5 As shown in the formula, f represents L2 regularization, Represents the matching degree between the query and the slot, that is, the weight of each query during update. The calculation method is similar to the above formula, as shown below:

[0088]

[0089] These weights are then renormalized:

[0090]

[0091] By using a weighted average of these challenges instead of simply adding them together, the impact of the challenges closest to the slot can be better reflected.

[0092] For the loss function in the training phase, in order to make the memory slots representing the same question more compact, a compactness loss is introduced:

[0093]

[0094] At the same time, in order to prevent the loss of compactness from making the representation memory slots tend to be homogeneous, the separation loss is also introduced:

[0095]

[0096] Accordingly, for the calculation of the frame-level anomaly score in the test phase, in addition to the quality of frame reconstruction, it is also based on the feature compactness index of the query and the nearest memory slot (i.e., the L2 distance between the two):

[0097]

[0098] Furthermore, skip connections are added between different layers of the encoder and decoder, and memory modules are added between the skip connections, such as Figure 6 As shown in the figure, the purpose of doing this is, on the one hand, to allow the original information of the encoder to be directly passed to the decoder, providing more information for the memory modules at different levels, so as to better remember the normal mode; on the other hand, the decoder obtains higher-level encoding features. Although it has been filtered by the attention mechanism in the memory module, the decoding network can decode the input more easily; however, when the data of the outermost encoder is jumped to the decoder of the outermost layer of the input, the outermost encoded information will mask the influence of the inner layer information, which is equivalent to not adding any memory module, resulting in the failure of the model to converge. Therefore, only jump connections are added between the two inner layers.

[0099] Next, construct the conditional variational autoencoder in the present invention, such as Figure 7 As shown, the network includes a first encoder E θ and the first encoder F φ , a decoder D ψ , where E θ The optical flow y 1:t Encoded as E θ (y 1:t ), thereby learning the prior distribution p(z|y 1:t ). Enter F φ The one is x 1:t With y 1:t The concatenation of φ (x 1:t ,y 1:t ), thereby learning the posterior distribution q(z|x 1:t ,y 1:t );

[0100] During training, from the posterior distribution q(z|x 1:t ,y 1:t ) and compare it with the condition E θ (y 1:t ) are concatenated and sent to the decoder D ψ , we get the predicted future frame In addition, the network will also be in F φ and D ψ Skip connections are added between them to help predict future frames.

[0101] The loss function of the traditional variational autoencoder generally includes KL divergence and prediction error, which are defined as follows:

[0102]

[0103] In order to make the reconstructed image sharper, the gradient error is added on this basis:

[0104]

[0105] During the training process, the processed video frame sequence data is input into the memory-enhanced autoencoder network and the conditional variational autoencoder network respectively. After the obtained feature maps are spliced, they are passed through a convolution layer to obtain the fused normal mode feature map. After upsampling, the reconstructed frame of the original video frame size is obtained. The difference between the reconstructed frame and the original frame is used as the error loss function. After several training rounds (generally more than 1000 rounds), the network training is completed. Using the trained network, the anomaly score of the input video frame sequence can be calculated to achieve the purpose of anomaly detection.

[0106] Depend on Figure 8 It can be seen intuitively that the method proposed in this invention has an effect on the task of video anomaly detection. Fig. 9 It can be seen that the conditional variational autoencoder network's feature extraction of optical flow sequences has an auxiliary effect on the performance of the memory-enhanced autoencoder network in memorizing normal behavior patterns. Figure 8 and Fig. 9 The results verify the effectiveness of the memory-enhanced autoencoder network and the conditional variational autoencoder network.

[0107] The present invention provides a video detection system based on memory enhancement and conditional variational autoencoder, comprising:

[0108] The preprocessing unit is configured as follows:

[0109] Used to collect all video frame sequence data and extract spatiotemporal features in the sequence;

[0110] The first model building unit is configured to:

[0111] It is used to extract target features by bounding box extraction based on spatiotemporal features, and to memorize normal behavior patterns through a memory matrix to construct a memory-enhanced autoencoder network;

[0112] The second model building unit is configured to:

[0113] It is used to extract the optical flow sequence in the spatiotemporal features, and construct a conditional variational autoencoder network by learning the potential mapping from the optical flow sequence to the latent variable through variational inference;

[0114] Output unit, configured as:

[0115] It is used to splice the feature maps corresponding to the normal behavior patterns obtained by the memory-enhanced autoencoder network and the conditional variational autoencoder network to form a hybrid network model, and use normal video samples to train the hybrid network model to obtain a video detection model.

[0116] In another embodiment of the present invention, a computer device is provided, the computer device including a processor and a memory, the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc., which are the computing core and control core of the terminal, which are suitable for implementing one or more instructions, and are specifically suitable for loading and executing one or more instructions in the computer storage medium to implement the corresponding method flow or corresponding function; the processor described in the embodiment of the present invention can be used for the operation of a video detection method based on memory enhancement and conditional variational autoencoder network.

[0117] In another embodiment of the present invention, the present invention also provides a storage medium, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device for storing programs and data. It can be understood that the computer-readable storage medium here can include both built-in storage media in the computer device and, of course, extended storage media supported by the computer device. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of the above-mentioned embodiment of a video detection method based on memory enhancement and conditional variational autoencoder network.

[0118] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0119] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0120] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0121] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0122] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A video detection method based on memory enhancement and conditional variational autoencoder network, It is characterized in that The following steps are involved: Collect all video frame sequence data and extract spatiotemporal features in the sequence; Based on the spatiotemporal features, the target features are extracted by bounding box extraction, and the normal behavior patterns are memorized by the memory matrix to construct a memory-enhanced autoencoder network. Based on the memory-enhanced autoencoder network and the optical flow sequence in the target feature, the potential mapping from the optical flow sequence to the latent variable is obtained through variational inference learning, and a conditional variational autoencoder network is constructed; The feature maps corresponding to the normal behavior patterns obtained by the memory-enhanced autoencoder network and the conditional variational autoencoder network are spliced ​​to form a hybrid network model. The hybrid network model is trained with normal video samples to obtain a video detection model.

2. According to claim 1, a video detection method based on memory enhancement and conditional variational autoencoder network, It is characterized in that The process of collecting all video frame sequence data and extracting the spatiotemporal features in the sequence is as follows: The collected video frame sequence data is subjected to feature extraction from the spatial dimension and channel dimension to obtain spatiotemporal features.

3. According to claim 1, a video detection method based on memory enhancement and conditional variational autoencoder network, It is characterized in that The normal video sample is: The video that only includes normal pedestrians is called a normal video sample, otherwise, it is called an abnormal video sample.

4. According to claim 1, a video detection method based on memory enhancement and conditional variational autoencoder network, It is characterized in that The memory-enhanced autoencoder network includes a memory matrix composed of a plurality of memory slot vectors, wherein the memory matrix is ​​used to represent a normal pattern in a video; The memory-enhanced autoencoder network uses an attention-based addressing operation to retrieve highly correlated items in the memory module and reconstruct high-dimensional features through the highly correlated items; During the reconstruction process, the memory-augmented autoencoder network only uses a limited number of normal patterns stored in the memory matrix for feature reconstruction.

5. According to claim 4, a video detection method based on memory enhancement and conditional variational autoencoder network, It is characterized in that For the memory slot that needs to be updated during the training process, select a query whose distance to the memory slot is less than a preset threshold to update the memory slot, and re-normalize the memory slot vector parameter; For the loss function in the training phase, compactness loss function and separation loss function are used.

6. According to claim 1, a video detection method based on memory enhancement and conditional variational autoencoder network, It is characterized in that The conditional variational autoencoder network includes a first encoder, a second encoder and a decoder, wherein the first encoder is used to encode the optical flow sequence to obtain features in the form of probability distribution, and the second encoder is used to concatenate and encode the video frame sequence data and the optical flow sequence to obtain a posterior distribution; During the training process, normal random sampling is performed from the posterior distribution, and the sample is concatenated with the optical flow sequence encoded by the first encoder and then sent to the decoder to obtain the predicted future frame.

7. According to claim 6, a video detection method based on memory enhancement and conditional variational autoencoder network, It is characterized in that A skip connection unit is provided between the second encoder and the decoder.

8. A video detection system based on memory enhancement and conditional variational autoencoder, It is characterized in that A video detection method based on memory enhancement and conditional variational autoencoder network according to any one of claims 1 to 7, comprising: The preprocessing unit is configured as follows: Used to collect all video frame sequence data and extract the temporal and spatial features in the sequence; The first model building unit is configured to: It is used to extract target features by bounding box extraction based on spatiotemporal features, and to memorize normal behavior patterns through a memory matrix to construct a memory-enhanced autoencoder network; The second model building unit is configured to: It is used to construct a conditional variational autoencoder network based on a memory-enhanced autoencoder network and an optical flow sequence in the target feature, and obtain the potential mapping from the optical flow sequence to the latent variable through variational inference learning; Output unit, configured as: It is used to splice the feature maps corresponding to the normal behavior patterns obtained by the memory-enhanced autoencoder network and the conditional variational autoencoder network to form a hybrid network model, and use normal video samples to train the hybrid network model to obtain a video detection model.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the steps of a video detection method based on memory enhancement and conditional variational autoencoder network as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the steps of a video detection method based on memory enhancement and conditional variational autoencoder network as described in any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Video anomaly detection method based on infrared visible light image feature fusion

    CN120997733A