Lightweight Video Anomaly Detection Method and System Based on Information Gated Compression
Through information gating compression technology, high-value features are screened using CLIP-ViT model and dynamic gating weights, the problems of feature redundancy and high model complexity in video anomaly detection are solved, and efficient and lightweight video anomaly detection is achieved.
Patent Information
- Application Number
- CN202510400087.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-04-01
AI Technical Summary
The existing video anomaly detection methods have problems such as feature redundant calculation, high model complexity, large parameters and limited generalization capabilities, resulting in insufficient detection accuracy and real-time performance.
Using information gating compression technology, high-dimensional semantic features are extracted using the CLIP-ViT model, L2 norm, energy characteristics and mean characteristics are calculated, combined with dynamic gating weights and attention mechanisms, high-value characteristics are screened, and lightweight classification is performed.
It significantly improves detection accuracy and real-timeness, reduces model complexity, improves computing efficiency, and enhances the model's generalization ability of cross-scene data.
Smart Images

Figure CN119904788B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision and video analysis, and particularly to a lightweight video anomaly detection method and system based on information gating compression. Background Art
[0002] Video anomaly detection aims to identify abnormal behaviors or events in videos and is a core technology in intelligent security and industrial automation. The current mainstream methods mainly include two categories. One is the two-branch architecture, which captures detailed and contextual information through local and global branches respectively (such as HF2-VAD), but the feature interaction between branches is complex, and the computational cost grows quadratically with the video length. The other is the diffusion model, which reconstructs the normal pattern based on the generative adversarial idea (such as AnoDiff), requires stacking multiple layers of networks to fit the data distribution, has a large number of parameters, and is unstable during training.
[0003] The existing methods have the following core problems: First, in terms of blind feature processing, all input features are calculated without discrimination, resulting in more than 70% of the features being redundant or noisy; second, the structure is complex and inefficient, relying on deep networks (such as ResNet-50) or multi-head attention, and the number of model parameters exceeds 10M; third, the generalization ability is limited, and the interference of noisy features reduces the migration performance of the model in cross-scene data (such as UCF-Crime → ShanghaiTech) by 12% - 15%. Summary of the Invention
[0004] In view of the above situation, the main purpose of the present invention is to propose a lightweight video anomaly detection method and system based on information gating compression to solve the above technical problems.
[0005] The present invention proposes a lightweight video anomaly detection method based on information gating compression, and the method includes the following steps:
[0006] Step 1: Split the videos in the video sequence into a static image sequence at a certain rate;
[0007] Perform bilinear interpolation scaling processing on each frame image in the static image sequence to obtain the scaled static image;
[0008] Input the scaled static image into the CLIP-ViT model for semantic feature extraction operation to obtain a high-dimensional semantic feature vector;
[0009] Step 2: Calculate the L2 norm, energy feature vector, and mean feature vector using the high-dimensional semantic feature;
[0010] Concatenate the L2 norm, energy feature vector, mean feature vector, and high-dimensional semantic feature vector to obtain an enhanced feature vector;
[0011] Obtain dynamic gating weights using enhanced feature vectors;
[0012] Step 3: Normalize the L2 norm to obtain the normalized L2 norm;
[0013] Construct a feature relationship matrix through the normalized L2 norm, and obtain a value judgment matrix using the feature relationship matrix and dynamic gating weights;
[0014] Based on the video sequence length, calculate to obtain a dynamic mask;
[0015] Perform linear projection layer processing on the enhanced feature vectors to obtain query vectors, key vectors, and value vectors;
[0016] Utilize the query vectors, key vectors, and value vectors, combine with the value judgment matrix and the dynamic mask, and perform attention calculation to obtain the final feature vectors;
[0017] Step 4: Input the final feature vectors into a classification network to obtain the final anomaly scores;
[0018] Obtain the detection results through the final anomaly scores.
[0019] The present invention also proposes a lightweight video anomaly detection system based on information gating compression, and the system includes:
[0020] A preprocessing module for:
[0021] Perform bilinear interpolation scaling processing on each frame of the static image sequence to obtain the scaled static image;
[0022] Input the scaled static image into the CLIP-ViT model for semantic feature extraction operations to obtain high-dimensional semantic feature vectors;
[0023] A gating weight module for:
[0024] Calculate the L2 norm, energy feature vectors, and mean feature vectors using the high-dimensional semantic features;
[0025] Concatenate the L2 norm, energy feature vectors, mean feature vectors, and high-dimensional semantic feature vectors to obtain enhanced feature vectors;
[0026] Obtain dynamic gating weights using the enhanced feature vectors;
[0027] A final feature output module for:
[0028] Normalize the L2 norm to obtain the normalized L2 norm;
[0029] Construct a feature relationship matrix through the normalized L2 norm, and obtain a value judgment matrix by using the feature relationship matrix and the dynamic gating weight;
[0030] Based on the length of the video sequence, calculate to obtain a dynamic mask;
[0031] Perform linear projection layer processing on the enhanced feature vector to obtain a query vector, a key vector, and a value vector;
[0032] Use the query vector, the key vector, and the value vector, combine the value judgment matrix and the dynamic mask, and perform attention calculation to obtain the final feature vector;
[0033] The result output module is used for:
[0034] Input the final feature vector into the classification network to obtain the final anomaly score;
[0035] Obtain the detection result through the final anomaly score.
[0036] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0037] 1. The present invention significantly improves the detection accuracy and real-time performance while reducing the model complexity by dynamically managing feature flow and computing resource allocation;
[0038] 2. The present invention adaptively weights or truncates non-critical feature flows by introducing an attention mechanism and an amplitude-based gating strategy, guiding the model to focus on effective information;
[0039] 3. The present invention adopts a lightweight classification network to hierarchically compress the feature dimension and combines residual connections to improve the gradient propagation efficiency.
[0040] The additional aspects and advantages of the present invention will be partially given in the following description, partially become obvious from the following description, or be understood through the embodiments of the present invention. Brief Description of the Drawings
[0041] Figure 1 It is a flowchart of the lightweight video anomaly detection method based on information gating compression proposed by the present invention;
[0042] Figure 2 It is a performance comparison diagram between the present invention and the prior art;
[0043] Figure 3 It is a schematic diagram of the overall framework of the lightweight video anomaly detection system based on information gating compression proposed by the present invention. Detailed Embodiments
[0044] Embodiments of the present invention will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the accompanying drawings are exemplary and are only used to explain the present invention and should not be construed as a limitation of the present invention.
[0045] Referring to the following description and drawings, these and other aspects of the embodiments of the present invention will become clear. In these descriptions and drawings, some specific embodiments of the embodiments of the present invention are specifically disclosed to represent some ways of implementing the principles of the embodiments of the present invention, but it should be understood that the scope of the embodiments of the present invention is not limited by this.
[0046] Please refer to Figure 1 , an embodiment of the present invention proposes a lightweight video anomaly detection method based on information gating compression, and the method includes the following steps:
[0047] Step 1: Split the videos in the video sequence into a static image sequence at a certain rate;
[0048] Perform bilinear interpolation scaling processing on each frame image in the static image sequence to obtain the scaled static image;
[0049] Input the scaled static image into the CLIP-ViT model for semantic feature extraction operation to obtain a high-dimensional semantic feature vector;
[0050] In step 1, input the scaled static image into the CLIP-ViT model for semantic feature extraction operation to obtain a high-dimensional semantic feature vector, and the relational expression existing in the corresponding process is:
[0051] ;
[0052] Where represents the operation of size adjustment, represents the total number of frames, represents the index of the frame number, represents the th high-dimensional semantic feature vector of the frame, represents the th static image of the frame, represents being processed by the CLIP-ViT model.
[0053] Furthermore, in order to unify the sizes of the images after video segmentation, the video is segmented into frames, adjusted to 224x224 pixels, and the pixel values are normalized to [-1, 1] to ensure the consistency and usability of the data and prepare for subsequent model processing;
[0054] Moreover, the CLIP-ViT model divides an image into multiple image patches of a fixed size, performs linear projection on each image patch, maps the linearly projected image patches to a low-dimensional space, and then adds positional encoding to retain the spatial position information of the image patches.
[0055] Step 2: Calculate the L2 norm, energy feature vector, and mean feature vector using the high-dimensional semantic features;
[0056] Concatenate the L2 norm, energy feature vector, mean feature vector, and high-dimensional semantic feature vector to obtain an enhanced feature vector;
[0057] Obtain dynamic gating weights using the enhanced feature vector;
[0058] In Step 2, when concatenating the L2 norm, energy feature vector, mean feature vector, and high-dimensional semantic feature vector to obtain an enhanced feature vector, the relationship in the corresponding process is:
[0059] ;
[0060] Where, represents the enhanced feature vector of the th frame, represents the th dimension of the high-dimensional semantic feature vector of the th frame, represents the dimension index;
[0061] Obtain dynamic gating weights using the enhanced feature vector. The specific steps are as follows:
[0062] Generate an inter-frame similarity matrix by calculating the exponentially decaying Manhattan distance using the enhanced feature vector. The relationship in the corresponding process is:
[0063] ;
[0064] Where, represents the inter-frame similarity matrix, represents the index of the number of frames, represents the enhanced feature vector of the th frame;
[0065] Use the inter-frame similarity matrix to adjust the screening threshold through learnable parameters to generate dynamic gating weights. The relationship in the corresponding process is:
[0066] ;
[0067] Where, represents the dynamic gating weight, represents after being processed by the Sigmoid function, represents the learnable parameters, Indicates that it has been processed by expected value operation.
[0068] Furthermore, three complementary statistics are introduced based on the 512-dimensional high-dimensional semantic feature vector: L2 norm, energy feature and mean feature. The L2 norm calculates the Euclidean distance between feature vectors to characterize their overall strength; the energy feature is the sum of squares of each dimension to reflect the activity of the feature; and the mean feature provides information about the distribution center of the feature.
[0069] Step 3, normalizing the L2 norm to obtain a normalized L2 norm;
[0070] The feature relationship matrix is constructed through the normalized L2 norm, and the value judgment matrix is obtained using the feature relationship matrix and dynamic gating weights;
[0071] Based on the length of the video sequence, a dynamic mask is obtained by calculation;
[0072] Perform linear projection on the enhanced feature vector to obtain the query vector, key vector and value vector;
[0073] Using the query vector, key vector and value vector, combined with the value judgment matrix and dynamic mask, the final feature vector is obtained through attention calculation;
[0074] In step 3, the L2 norm is normalized to obtain the normalized L2 norm. The relationship between the corresponding process is:
[0075] ;
[0076] in, After normalization, The L2 norm of the frame, Indicates The L2 norm of the frame, represents the set of L2 norms of all eigenvectors, Represents a very small positive number;
[0077] The feature relationship matrix is constructed through the normalized L2 norm, and the value judgment matrix is obtained by using the feature relationship matrix and dynamic gating weights. The specific steps are as follows:
[0078] The normalized L2 norm is used to construct the feature relationship matrix, and the relationship between the corresponding process is:
[0079] ;
[0080] in, represents the feature relationship matrix, Indicates the L2 norm of the frame after normalization, where represents an adjustable hyperparameter;
[0081] The value judgment matrix is obtained by using the feature relationship matrix and the dynamic gating weight, and the relational expression existing in the corresponding process is:
[0082] ;
[0083] Among them, represents the value judgment matrix, represents the dynamic gating weight;
[0084] Based on the length of the video sequence, a dynamic mask is calculated through the following specific steps:
[0085] The dynamic window size is calculated through the length of the video sequence, and the relational expression existing in the corresponding process is:
[0086] ;
[0087] Among them, represents the dynamic window size, represents the length of the video sequence;
[0088] Based on the dynamic window size, the start index and end index of the dynamic window are calculated, and the relational expression existing in the corresponding process is:
[0089] ;
[0090] Among them, represents the start index of the dynamic window, represents the technical index of the dynamic window, represents the maximum length of the current batch of video sequences, represents the time step;
[0091] The dynamic mask is generated according to the start index and end index of the dynamic window, and the relational expression existing in the corresponding process is:
[0092] ;
[0093] Among them, represents the dynamic mask, represents the index of the time step in the video sequence;
[0094] Using the query vector, key vector and value vector, combined with the value judgment matrix and the dynamic mask, the final feature vector is obtained through attention calculation, and the specific steps are as follows:
[0095] Through attention calculation based on query vectors, key vectors, dynamic masks, and value judgment matrices, value-aware attention weights and high-value-aware attention weights are obtained. The relational expressions for the corresponding processes are as follows:
[0096] ;
[0097] Among them, represents the attention score, represents the query vector, represents the transpose of the key vector, represents the dimension of the key vector, represents the value-aware attention weight, represents the high-value-aware attention weight, represents element-wise multiplication, represents the dynamic mask, represents the supplementary matrix of the original value information;
[0098] Using the value-aware attention weight and the high-value-aware attention weight, combined with the value vector, the final feature vector is obtained. The relational expressions for the corresponding processes are as follows:
[0099] ;
[0100] Among them, represents the feature output calculated through the value-aware attention weight, represents the learnable parameter, represents the feature output calculated through the high-value-aware attention weight, represents the fused feature, represents the value vector, represents the operation of feature normalization, represents the operation of linear transformation, represents the final feature vector.
[0101] Furthermore, in order to eliminate the influence of the absolute value of the feature amplitude and normalize the feature value evaluation result to the interval [0, 1], the L2 norm is normalized;
[0102] By calculating the difference of the L2 norms between feature vectors and constructing a feature relationship matrix to capture the differences and uniqueness among features.
[0103] Furthermore, in this step, the dynamic gating weight is a dynamic threshold used to adaptively screen high-value feature relationships. In code implementation, the dynamic gating weight can be set to the mean of the feature relationship matrix plus the standard deviation.
[0104] The dynamic gating weights are used to adaptively define high-value criteria according to the feature relationship matrix, and the high-value feature relationships are preliminarily screened through comparison operations. Subsequently, the learnable parameters control the Sigmoid gating to further gently adjust the strictness of value selection, so as to achieve dynamic and learnable enhancement of high-value feature relationships, making the finally output information more discriminative and laying a foundation for subsequent value-aware attention calculation.
[0105] Furthermore, in this step, the dynamic masking mechanism can dynamically adjust the size of the calculation window according to the length of the video sequence, so as to achieve dynamic calculation.
[0106] Furthermore, in order to ensure the most basic context information capture ability, the present invention sets the minimum window of the dynamic window to 1.
[0107] Step 4: Input the final feature vector into the classification network to obtain the final anomaly score;
[0108] Obtain the detection result through the final anomaly score;
[0109] In step 4, when the final feature vector is input into the classification network to obtain the final anomaly score, the existing relationship in the corresponding process is:
[0110] ;
[0111] Among them, represents the final anomaly score, , , and all represent weight matrices, represents being processed by the GELU activation function.
[0112] Furthermore, the classification network in this step adopts a four-layer fully connected structure, and each layer uses the GELU activation function and random inactivation (Dropout) regularization to prevent overfitting;
[0113] And the network input is a 515-dimensional enhanced feature, and after being compressed layer by layer with 512, 256, 128, and 64 dimensions, the final anomaly score is output. Subsequently, the final anomaly score is normalized to the [0, 1] interval through the Sigmoid function.
[0114] To verify the effectiveness of the present invention (OURS), please refer to Figure 2 , and by comparing the performance data with the existing inventions, it shows that the present invention is superior to the existing methods in both detection accuracy and calculation efficiency.
[0115] Among them, the dataset 1 (SH-AUC) used contains 437 videos of 13 types of scenarios, covering abnormal times of general degree. The dataset 2 (UCF-AUC) used contains 1900 long videos, covering more complex abnormal types, to ensure the reliability of the model's prosperous ability evaluation.
[0116] Please refer to Figure 3 , the embodiment of the present invention also provides a lightweight video anomaly detection system based on information gating compression. The system includes:
[0117] A preprocessing module for:
[0118] Performing bilinear interpolation scaling processing on each frame of the static image sequence to obtain the scaled static image;
[0119] Inputting the scaled static image into the CLIP-ViT model for semantic feature extraction operation to obtain a high-dimensional semantic feature vector;
[0120] A gating weight module for:
[0121] Calculating the L2 norm, energy feature vector, and mean feature vector using the high-dimensional semantic features;
[0122] Concatenating the L2 norm, energy feature vector, mean feature vector, and high-dimensional semantic feature vector to obtain an enhanced feature vector;
[0123] Obtaining dynamic gating weights using the enhanced feature vector;
[0124] A final feature output module for:
[0125] Normalizing the L2 norm to obtain the normalized L2 norm;
[0126] Constructing a feature relationship matrix through the normalized L2 norm, and obtaining a value judgment matrix using the feature relationship matrix and dynamic gating weights;
[0127] Calculating a dynamic mask based on the video sequence length;
[0128] Performing linear projection layer processing on the enhanced feature vector to obtain a query vector, a key vector, and a value vector;
[0129] Using the query vector, key vector, and value vector, combining the value judgment matrix and dynamic mask, and performing attention calculation to obtain the final feature vector;
[0130] A result output module for:
[0131] Inputting the final feature vector into a classification network to obtain the final anomaly score;
[0132] The detection result is obtained through the final anomaly score.
[0133] It should be understood that each part of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits with logic gate circuits for implementing logic functions on data signals, application specific integrated circuits with appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
[0134] In the description of this specification, the description referring to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0135] The above-described embodiments merely represent several implementation manners of the present invention, and the description thereof is relatively specific and detailed, but should not be construed as a limitation on the scope of the patent of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the appended claims.
Claims
1. A lightweight video anomaly detection method based on information gating compression, characterized in that The method includes the following steps: Step 1: Split the videos in the video sequence into a static image sequence at a certain rate; Perform bilinear interpolation scaling on each frame image in the static image sequence to obtain the scaled static images; Input the scaled static images into the CLIP-ViT model for semantic feature extraction operations to obtain high-dimensional semantic feature vectors; Step 2: Calculate the L2 norm, energy feature vectors, and mean feature vectors using the high-dimensional semantic features; Concatenate the L2 norm, energy feature vectors, mean feature vectors, and high-dimensional semantic feature vectors to obtain enhanced feature vectors; Obtain dynamic gating weights using the enhanced feature vectors; Step 3: Normalize the L2 norm to obtain the normalized L2 norm; Construct a feature relationship matrix using the normalized L2 norm, and obtain a value judgment matrix using the feature relationship matrix and dynamic gating weights; Based on the length of the video sequence, calculate to obtain a dynamic mask; Perform linear projection layer processing on the enhanced feature vectors to obtain query vectors, key vectors, and value vectors; Use the query vectors, key vectors, and value vectors, combine with the value judgment matrix and dynamic mask, and perform attention calculation to obtain the final feature vectors; Step 4: Input the final feature vectors into a classification network to obtain the final anomaly scores; Obtain the detection results through the final anomaly scores.
2. The lightweight video anomaly detection method based on information gating compression according to claim 1, wherein In the said Step 1, input the scaled static images into the CLIP-ViT model for semantic feature extraction operations to obtain high-dimensional semantic feature vectors, and the relational formula existing in the corresponding process is: ; Among them, represents performing a size adjustment operation, represents the total number of frames, represents the index of the frame number, represents the high-dimensional semantic feature vector of the th static image of the frame, represents being processed by the CLIP-ViT model.
3. The lightweight video anomaly detection method based on information gating compression according to claim 2, characterized in that In the said Step 2, concatenate the L2 norm, energy feature vectors, mean feature vectors, and high-dimensional semantic feature vectors to obtain enhanced feature vectors, and the relational formula existing in the corresponding process is: ; Among them, represents the enhanced feature vector of the th frame, and represents the th dimension of the high-dimensional semantic feature vector of the th frame, where represents the dimension index. It should be noted that the original text seems a bit unclear in its logical structure and expression. The above translation tries to make sense of it as accurately as possible while following the rules. If there are any further clarifications or corrections needed for the original text, it will help in obtaining a more precise translation.
4. The lightweight video anomaly detection method based on information gating compression according to claim 3, wherein, In the said Step 2, obtain dynamic gating weights using the enhanced feature vectors, and the specific steps are as follows: Generate an inter-frame similarity matrix using the enhanced feature vectors through exponentially decaying Manhattan distance calculation, and the relational formula existing in the corresponding process is: ; Among them, represents the inter-frame similarity matrix, represents the index of the number of frames, represents the enhanced feature vector of the frame; Use the inter-frame similarity matrix to adjust the screening threshold through learnable parameters to generate dynamic gating weights, and the relational formula existing in the corresponding process is: ; Among them, represents the dynamic gating weight, represents being processed by the Sigmoid function, represents the learnable parameter, represents being processed by the expected value operation.
5. The lightweight video anomaly detection method based on information gating compression according to claim 4, characterized in that, In the said Step 3, normalize the L2 norm to obtain the normalized L2 norm, and the relational formula existing in the corresponding process is: ; in, After normalization, The L2 norm of the frame, Indicates The L2 norm of the frame, represents the set of L2 norms of all eigenvectors, Represents a very small positive number.
6. The lightweight video anomaly detection method based on information gating compression according to claim 5, wherein In the said Step 3, construct a feature relationship matrix using the normalized L2 norm, and obtain a value judgment matrix using the feature relationship matrix and dynamic gating weights, and the specific steps are as follows: Construct a feature relationship matrix using the normalized L2 norm, and the relational formula existing in the corresponding process is: ; Among them, represents the feature relationship matrix, represents the L2 norm of the th frame after normalization, represents an adjustable hyperparameter; Obtain a value judgment matrix using the feature relationship matrix and dynamic gating weights, and the relational formula existing in the corresponding process is: ; Among them, represents the value judgment matrix, represents the dynamic gating weight.
7. The lightweight video anomaly detection method based on information gating compression according to claim 6, wherein In the said Step 3, based on the length of the video sequence, calculate to obtain a dynamic mask, and the specific steps are as follows: Calculate the dynamic window size through the length of the video sequence, and the relational formula existing in the corresponding process is: ; Among them, represents the dynamic window size, represents the length of the video sequence; Calculate the start index and end index of the dynamic window based on the dynamic window size, and the relational formula existing in the corresponding process is: ; Among them, represents the starting index of the dynamic window, represents the technical index of the dynamic window, represents the maximum length of the current batch of video sequences, represents the time step; Generate a dynamic mask according to the start index and end index of the dynamic window, and the relational formula existing in the corresponding process is: ; Among them, represents a dynamic mask, represents the index of the time step in the video sequence.
8. The lightweight video anomaly detection method based on information gating compression according to claim 7, wherein In step 3, using the query vector, key vector, and value vector, combined with the value judgment matrix and dynamic mask, through attention calculation, to obtain the final feature vector. The specific steps are as follows: Based on the query vector, key vector, dynamic mask, and value judgment matrix, through attention calculation, obtain the value-aware attention weight and high-value-aware attention weight. The corresponding relationship in the process is: ; Among them, represents the attention score, represents the query vector, represents the transpose of the key vector, represents the dimension of the key vector, represents the value-aware attention weight, represents the high-value-aware attention weight, represents element-wise multiplication, represents the dynamic mask, represents the supplementary matrix of the original value information; Using the value-aware attention weight and high-value-aware attention weight, combined with the value vector, to obtain the final feature vector. The corresponding relationship in the process is: ; Among them, represents the feature output obtained by calculating the value-aware attention weight, represents the learnable parameter, represents the feature output obtained by calculating the high-value-aware attention weight, represents the fused feature, represents the value vector, represents after the feature normalization operation, represents after the linear transformation operation, represents the final feature vector.
9. The lightweight video anomaly detection method based on information-gated compression according to claim 8, wherein, In step 4, input the final feature vector into the classification network to obtain the final anomaly score. The corresponding relationship in the process is: ; Among them, represents the final anomaly score, , , and all represent weight matrices, represents being processed by the GELU activation function.
10. A lightweight video anomaly detection system based on information gating compression, characterized in that, The system applies any one of the lightweight video anomaly detection methods based on information gating compression in claims 1 to 9. The system includes: A preprocessing module for: Perform bilinear interpolation scaling on each frame of the static image sequence to obtain the scaled static image; Input the scaled static image into the CLIP-ViT model for semantic feature extraction operation to obtain a high-dimensional semantic feature vector; A gating weight module for: Calculate the L2 norm, energy feature vector, and mean feature vector using the high-dimensional semantic feature; Concatenate the L2 norm, energy feature vector, mean feature vector, and high-dimensional semantic feature vector to obtain an enhanced feature vector; Obtain the dynamic gating weight using the enhanced feature vector; A final feature output module for: Normalize the L2 norm to obtain the normalized L2 norm; Construct a feature relationship matrix through the normalized L2 norm, and obtain the value judgment matrix using the feature relationship matrix and dynamic gating weight; Based on the video sequence length, calculate to obtain the dynamic mask; Perform linear projection layer processing on the enhanced feature vector to obtain the query vector, key vector, and value vector; Using the query vector, key vector, and value vector, combined with the value judgment matrix and dynamic mask, through attention calculation, to obtain the final feature vector; A result output module for: Input the final feature vector into the classification network to obtain the final anomaly score; Obtain the detection result through the final anomaly score.
Citation Information
Patent Citations
Abnormal behavior detection method based on improved pseudo three-dimensional residual neural network
CN110263728A
Fire fighting lane occupation abnormal object detection method based on inter-frame difference method
CN110298837A