A method for anomaly detection based on public space video

By combining adaptive convolutional networks and batch clustering loss, the problem of insufficient accuracy in video anomaly detection is solved. By using a cross-batch learning strategy to generate pseudo-labels, more efficient anomaly detection results are achieved.

CN116704396BActive Publication Date: 2025-12-23SHAANXI SCI TECH UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310427415.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-20
Publication Date
2025-12-23
Estimated Expiration
2043-04-20

AI Technical Summary

Technical Problem

Existing technologies for video anomaly detection suffer from insufficient accuracy, training strategies are affected by batch size, and knowledge learning is limited, especially under weak supervision conditions where efficient anomaly detection is difficult to achieve.

Method used

An adaptive convolutional network is used for feature extraction and internal relationship graph construction of video segments. Combined with batch clustering loss and cross-batch learning strategy, pseudo-labels are generated to improve the accuracy of anomaly detection.

Benefits of technology

By enhancing the intra-class compactness and inter-class dispersion of features, and utilizing pseudo-labels generated by batch clustering to guide the model in generating more accurate anomaly scores, the accuracy of video anomaly detection is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116704396B_ABST
    Figure CN116704396B_ABST
Patent Text Reader

Abstract

The application discloses an abnormality detection method based on public space video, comprising the following steps: step 1, dividing video segments based on time sequence according to obtained video data, and labeling the video segments obtained by division with an abnormality score, and forming a data set by combining multiple continuous video segments with corresponding labels; step 2, constructing an adaptive convolution network for video abnormality score evaluation, training the adaptive convolution network by using the data set, and obtaining an evaluation model for video abnormality score evaluation; step 3, inputting a batch of video segments containing abnormal videos and normal videos into the evaluation model, and obtaining the abnormality score of the video segments; and step 4, generating the abnormality score based on batch clustering. The method provided by the application can effectively improve the detection accuracy of abnormal videos.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of video monitoring, and particularly relates to an abnormality detection method based on public space video. BACKGROUND

[0002] An efficient and accurate video anomaly detection algorithm can maintain the safety and order of public space, therefore, video anomaly detection has extremely high practical value and broad development prospect. A weakly supervised video anomaly detection method uses weakly labeled data containing normal and abnormal to train the model, which is a more suitable anomaly detection method.

[0003] Most of the existing works regard weakly supervised anomaly detection as a multi-instance learning task:

[0004] The academic literature "Real-World Anomaly Detection in Surveillance Videos," in Proceedings of the IEEE conference on computer vision and pattern recognition, 2018, pp. 6479-6488. constructs a large-scale anomaly dataset and proposes a deep multi-instance learning ranking framework to detect anomalies.

[0005] The academic literature "Weakly supervised video anomaly detection via center-guided discriminative learning," in 2020IEEE International Conference on Multimedia and Expo, 2020: 1-6. introduces a k-max selection method instead of the maximum selection in the previous work.

[0006] The academic literature "Self-training multi-sequence learning with transformer for weakly supervised video anomaly detection," Proceedings of the AAAI, Virtual, vol. 24, 2022. no longer selects the instance with the highest anomaly score, but selects the sequence with the highest total anomaly score.

[0007] The academic literature "Multi-scale continuity-aware refinement network for weakly supervised video anomaly detection," in 2022IEEE International Conference on Multimedia and Expo, 2022, pp. 1-6 introduces the temporal continuity of multiple adjacent examples at different time scales.

[0008] The existing technical solutions have the following problems: (1) only the classification loss based on multi-instance learning is used, although the classification loss based on multi-instance learning ensures the class separability of learned features, but it is insufficient for accurate segment anomaly detection; (2) a small batch training strategy is used during training, and the ability of anomaly detection will be affected by the batch size; (3) in weakly supervised anomaly detection, because only video-level labels are available, the knowledge that the model can learn will be limited. SUMMARY

[0009] In order to solve the above problems, the present application provides an anomaly detection method based on public space video, which can effectively improve the detection accuracy of abnormal videos.

[0010] An anomaly detection method based on public space video, comprising:

[0011] Step 1, dividing the obtained video data into video segments based on time sequence, and labeling the video segments obtained by division with abnormal scores, and grouping multiple continuous video segments and corresponding labels to form a data set;

[0012] Step 2, constructing an adaptive convolutional network for video anomaly score evaluation, the adaptive convolutional network comprising a feature extraction module, a graph construction module and a graph convolution module, the feature extraction module being used to extract appearance and motion information in the video segment to construct corresponding spatio-temporal features, the graph construction module constructing an internal relationship graph between video segments according to input spatio-temporal features, and the graph convolution module comprising three graph convolution layers, used for analysis of spatio-temporal features and adjacency matrix in the internal relationship graph to output an abnormal score of the video segment;

[0013] Training the adaptive convolutional network using the data set to obtain an evaluation model for video anomaly score evaluation;

[0014] Step 3, inputting a batch of video segments containing abnormal videos and normal videos into the evaluation model to obtain an abnormal score of the video segment;

[0015] Meanwhile, the output result of a first layer graph convolution layer in the graph convolution module is extracted, the K-Means algorithm is used to perform batch clustering on the output result, and the class clusters are optimized based on the loss of batch clustering to obtain two class clusters containing abnormal videos and normal videos;

[0016] Step 4: According to the obtained abnormal score and the similarity score between the classes of the class clusters, pseudo labels of the video segments are generated, the abnormal score of the video segments with the pseudo labels is amplified, and the abnormal evaluation results of all videos are obtained.

[0017] The application enhances the intra-class compactness of normal features through the loss of batch clustering, thereby improving the inter-class dispersion of normal and abnormal features, and uses the pseudo labels generated by batch clustering to guide the main network to generate more accurate segment-level abnormal scores.

[0018] Specifically, the specific expression of the spatio-temporal feature is as follows:

[0019]

[0020] In the formula, f i,j represents the spatio-temporal feature of the jth segment of the video V i , F i has a dimension of T i ×D, T i is the number of segments contained in the video V i , and D represents the dimension of the feature.

[0021] Specifically, the internal relation graph constructs the global relation of all video segments based on the similarity of spatio-temporal features and the time sequence.

[0022] Specifically, the first two layers of the graph convolution layer are provided with a ReLU activation function and a dropout function, and the last layer is provided with a Sigmoid activation function.

[0023] Specifically, the specific process of using the K-Means algorithm to perform batch clustering on the output result is as follows:

[0024] When the output result is an abnormal video, the centers of the two class clusters are pushed away by using the loss of the corresponding clustering result;

[0025] When the output result is a normal video, the centers of the two class clusters are pulled together by using the loss of the corresponding clustering result.

[0026] Specifically, the loss of the clustering result has the following specific expression:

[0027]

[0028] where d = ||c1-c2||2 represents the distance between the cluster centers of two clusters, upper represents an upper bound, and b represents the batch size.

[0029] Preferably, a cross-batch learning strategy based on using the clustering results of the previous batch to guide the clustering of the current batch is introduced when using the K-Means algorithm, thereby improving the accuracy of the final clustering results.

[0030] Specifically, the specific process of the cross-batch learning strategy is as follows:

[0031] Step 3-1, constructing an abnormal video segment set C a and a normal video segment data set C n ;

[0032] Step 3-2, performing binary clustering on the data in C a to obtain cluster centers and and using them as the initial clustering centers when performing batch clustering of all abnormal video segments in each batch of the current epoch, and adding the two cluster centers obtained by performing binary batch clustering of all abnormal video segments in each batch of the current epoch to C a , to obtain

[0033] Step 3-3, performing binary clustering on the data in C n to obtain cluster centers and using them as the initial clustering centers when performing batch clustering of all normal video segments in each batch of the current epoch, and adding the two cluster centers obtained by performing binary batch clustering of all normal video segments in each batch of the current epoch to C n , to obtain m is the number of iterations in an epoch.

[0034] Specifically, the step 4 specifically includes the following steps:

[0035] calculating a first similarity score between the anomaly score and the class of the cluster, and simultaneously calculating a second similarity score between the anomaly score vector and the class of the opposite cluster;

[0036] based on the first similarity score and the second similarity score, obtaining the pseudo label of the corresponding video:

[0037]

[0038] wherein represents the class of the jth segment of the video V i , and represents the class of the video Vi S1 represents the first similarity score, and S2 represents the second similarity score;

[0039] In the abnormal video, if the pseudo label of the video segment is 1, the abnormal score of the video segment is expanded:

[0040] In the formula, S represents the original abnormal score, and s i,j S represents the expanded abnormal score, and a represents the expansion coefficient;

[0041] If the pseudo class label of the video segment is 0, the abnormal score of the video segment is unchanged, that is,

[0042] Compared with the prior art, the present application has the following beneficial effects:

[0043] (1) A loss based on batch clustering is proposed to enhance the intra-class compactness of normal features and the inter-class dispersion of normal and abnormal features.

[0044] (2) A cross-batch learning strategy is introduced during batch clustering, and the clustering results of the previous batch are introduced to guide the clustering of the current batch to produce more accurate clustering results.

[0045] (3) The pseudo label generated by batch clustering is used to guide the main network to generate more accurate segment-level abnormal scores. BRIEF DESCRIPTION OF DRAWINGS

[0046] Figure 1 The flowchart of the abnormality detection method provided in the embodiment is shown. DETAILED DESCRIPTION

[0047] The present application will be further described below in conjunction with the drawings and embodiments.

[0048] As Figure 1 shown, step 1: divide the video into non-overlapping time segments containing 16 consecutive frames, use T i to represent the number of segments, input it into the main network, and use the video-level label to train the main network to output the segment-level abnormal score of the video; the main network uses an adaptive graph convolutional network; the adaptive graph convolutional network is composed of a feature extraction module, a graph construction module and a graph convolutional module.

[0049] Step 1-1, select the pre-trained Inflated 3D (I3D) on the Kinetics dataset as the feature extraction network to extract the appearance and motion information of the video, and the spatiotemporal features F i of the video V i can be represented as:

[0050]

[0051] f i,j is the video V i spatio-temporal features of the jth segment, F i has dimension T i x D, T i is the video V i contains, and D denotes the dimension of the features.

[0052] Step 1-2: The graph construction module jointly constructs a data adaptive global graph from the similarity of the spatio-temporal features of the video segments and the proximity in time to better utilize the inherent correlation between the segments.

[0053] Step 1-3: The graph convolution module contains three graph convolution layers, each of which is followed by a ReLU activation function and a dropout function except for the last layer, which is followed by a Sigmoid activation function. For each video V i , the input layer receives the spatio-temporal features F i extracted from the feature extraction module and the adjacency matrix of the global graph constructed from the graph construction module. The output layer outputs the anomaly score of the video

[0054] Step 2, constructing an adaptive convolutional network for video anomaly score evaluation, the adaptive convolutional network includes a feature extraction module, a graph construction module, and a graph convolution module, the feature extraction module is used to extract appearance and motion information in video segments to construct corresponding spatio-temporal features, the graph construction module constructs the internal relationship graph between video segments according to the input spatio-temporal features, and the graph convolution module contains three graph convolution layers for analysis of spatio-temporal features and adjacency matrix in the internal relationship graph to output anomaly scores of video segments

[0055] Step 3: K-means-based batch clustering:

[0056] Batch clustering is proposed to provide supervision to enhance the discriminability of features. All normal videos in a batch are clustered into two classes by representing the network intermediate layer features from each video, because all normal video segments are in normal videos, so both clusters are normal video segments. We try to pull the centers of the two clusters to ensure the inter-class compactness of normal features. All abnormal videos in a batch are also clustered into two classes, because abnormal videos contain both abnormal video segments and normal video segments, so we assume that one cluster contains only normal video segments and the other cluster contains only abnormal video segments. We try to push the centers of the two clusters apart to achieve inter-class dispersion of normal features and abnormal features.

[0057] Specifically, for all abnormal videos in a batch, the K-means algorithm is used to cluster the standardized intermediate feature representation, which is the output of the first layer graph convolutional network, into two classes, and the centers of the two clusters are pushed away based on the batch clustering-based loss. At the same time, all normal videos in a batch are also clustered into two classes, and the centers of the two clusters are pulled together based on the batch clustering-based loss.

[0058] The batch clustering-based loss is as follows:

[0059]

[0060] where d = ‖c1-c2‖2 represents the distance between the cluster centers of the two classes, c1, c2 are the two cluster centers obtained after clustering all normal videos or abnormal videos (i.e. ) in a batch, upper is an upper bound to help the model be robust to different video data, and b is the batch size.

[0061] The final clustering result of the K-means algorithm depends largely on the selection of the initial clustering center. In order to better select the appropriate initial clustering center, the clustering result of the previous batch is introduced to provide guidance for the current batch clustering, so that the clustering result is more accurate, which will help the model training. That is, when batch clustering, C a and C n are constructed respectively in the iteration process to store the learned knowledge, and the stored information is used to provide guidance for the current batch clustering.

[0062] The specific process of the cross-batch learning strategy is as follows:

[0063] Step 3-1, construct the abnormal video segment set C a and the normal video segment data set C n ;

[0064] Step 3-2, binary cluster the data in C a to obtain clustering centers and , which are used as the initial clustering centers when batch clustering all abnormal video segments in each batch of the current epoch, and the two clustering centers obtained by binary batch clustering all abnormal video segments in each batch of the current epoch are added to C a , and

[0065] Step 3-3, binary cluster the data in C n to obtain clustering centers Use this as the initial cluster center for batch clustering of all normal video segments in each batch of the current epoch. Add the two cluster centers obtained from binary batch clustering of all normal video segments in each batch of the current epoch to C. n In, at the end of each epoch, we get m is the number of iterations in an epoch.

[0066] Step 4: Batch clustering guides the generation of outlier scores

[0067] For a normal video, since there are no anomalous events, each segment can be simply labeled as normal. However, for an anomalous video, both anomalous and normal events exist. We use batch clustering results to generate pseudo-labels for each segment of the anomalous video. During anomalous video clustering, all segments are divided into two clusters: one containing normal segments and the other containing anomalous segments. Therefore, we need to analyze which cluster contains the majority of normal video segments and which contains the majority of anomalous video segments to assign appropriate pseudo-labels. Here, pseudo-labels for video segments are generated using the similarity score between the anomalous score predicted by the main network and the cluster labels. If a video segment in an anomalous video has a pseudo-label of 1, this segment has a high probability of being an anomalous segment, so the anomalous score of segments with a pseudo-label of 1 in the anomalous video is amplified.

[0068] Calculate the first similarity score between the anomaly score and the category of the cluster, and simultaneously calculate the second similarity score between the anomaly score vector and the category of the opposite cluster;

[0069] Based on the first similarity score and the second similarity score, the pseudo-labels for the corresponding videos are calculated:

[0070]

[0071] In the formula, Indicates video V i The category of the j-th segment, Indicates video V i The opposite category of the j-th segment, S1 represents the first similarity score, and S2 represents the second similarity score;

[0072] In anomalous videos, if the pseudo-label of a video segment is 1, its anomalous score is increased:

[0073] In the formula, Indicates the original abnormal score, s i,j This represents the amplified outlier score, where α represents the amplification coefficient.

[0074] If the pseudo class of the video segment is 0, the video segment anomaly score is unchanged, that is

[0075] To demonstrate the effectiveness of the method provided by the embodiment, the UCF-Crime dataset and the ShanghaiTech dataset are tested.

[0076] The UCF-Crime dataset covers 13 real-world abnormal situations, including abuse, arrest, arson, attack, accident, burglary, explosion, fight, robbery, shooting, theft, shoplifting, and vandalism. The entire dataset contains 1900 unpruned long videos, of which 1610 videos with video-level labels are used for training, and the rest are used for testing.

[0077] The ShanghaiTech dataset contains a medium-sized campus surveillance dataset of 437 videos. In order to make it suitable for evaluating weakly supervised anomaly detection methods, the data is divided into two subsets: the training set contains 238 videos, and the test set contains 199 videos.

[0078] Referring to previous work, we use the area under the curve (AUC) of the frame-level receiver operating characteristic curve (ROC) as the evaluation criterion of the model, and the higher the AUC value, the better the detection effect of the model.

[0079] Feature extraction: First, the video is divided into non-overlapping time segments, each of which contains 16 video frames. Then, 2048-dimensional features are extracted from the "mix 5c" layer of the I3D feature extraction network pre-trained on the Kinetics dataset.

[0080] Video sampling: Since the dataset only has video-level labels, we need to process the entire video at a time. However, due to the limitation of GPU memory, it is not realistic to directly process a very long video. Therefore, T segments are uniformly extracted from the video to represent the entire video. By default, for UCF-Crime, T is set to 150, and for ShanghaiTech, T is set to 100.

[0081] Training details: The fully connected layer in the model has 512 nodes, and the graph convolutional network layer has 128, 32, and 1 nodes, respectively. The Adam optimizer is used for training, with a weight decay of 0.0005 and a learning rate of 0.0001. The batch size is 64, and each small batch is composed of 32 randomly selected normal and 32 abnormal video samples.

[0082] The proposed method is compared with the state-of-the-art methods on two datasets. The results on the UCF-Crime dataset are shown in Table 1.

[0083] Table 1. AUC results on UCF-Crime

[0084] Method Feature UCF-Crime Sultani et al. I3D RGB 76.92 Zhong et al. C3D RGB 81.08 AR_Net I3D RGB 78.96 SRF I3D RGB 79.54 Wu et al. I3D RGB 82.44 CLAWS C3D RGB 83.03 MIST I3D RGB 82.30 BN-SVP I3D RGB 83.39 MCR I3D RGB 81.0 MSLNet I3D RGB 85.30 Ours I3D RGB 85.87

[0085] The comparison results show that, using the same I3D-RGB features, our method outperforms the previous graph convolutional network based method, 4.79% higher than the method in the literature

J.-X. Zhong, N. Li, W. Kong, S. Liu, T. H. Li, and G. Li, “Graph convolutional label noise cleaner: Train a plug-and-play action classifier for anomaly detection,” in Proceedings of the IEEE conference on computer vision and pattern recognition, 2019, pp. 1237-1246.

P. Wu, J. Liu, Y. Shi, Y. Sun, F. Shao, Z. Wu, and Z. Yang, “Not only look, but also listen: Learning multimodal violence detection under weak supervision,” in Proc. Eur. Conf. Comput. Vis. Springer, 2020, pp. 322-339.

Zaheer, Muhammad Zaigham, et al. “A self-reasoning framework for anomaly detection using video-level labels.” IEEE Signal Processing Letters 27 (2020): 1705-1709.

Zaheer M Z, Mahmood A, Astrid M, et al. “Claws: Clustering assisted weakly supervised learning with normalcy suppression for anomalous event detection.” In Proceedings of European Conference on Computer Vision, 2020, pp. 358-376.

[0086] The frame-level AUC results of ShanghaiTech dataset are shown in Table 2.

[0087] Table 2. AUC results on ShanghaiTech

[0088] Method Feature ShanghaiTech Sultani et al. I3D RGB 86.30 Zhong et al. C3D RGB 76.44 AR_Net I3D RGB 85.38 SRF I3D RGB 84.17 CLAWS C3D RGB 89.67 MIST I3D RGB 94.83 BN-SVP I3D RGB 96.00 MCR I3D RGB 90.10 MSLNet I3D RGB 96.08 Ours I3D RGB 96.45

[0089] Compared with previous weakly supervised learning methods, our method achieves better performance. The performance of our method is 20.01% higher than the weakly supervised method proposed in the literature

J.-X. Zhong, N. Li, W. Kong, S. Liu, T. H. Li, and G. Li, “Graph convolutional label noise cleaner: Train a plug-and-play action classifier for anomaly detection,” in Proceedings of the IEEE conference on computer vision and pattern recognition, 2019, pp. 1237-1246.

Zaheer, Muhammad Zaigham, et al. “A self-reasoning framework for anomaly detection using video-level labels,” IEEE Signal Processing Letters 27 (2020): 1705-1709.

Zaheer M Z, Mahmood A, Astrid M, et al. “Claws: Clustering assisted weakly supervised learning with normalcy suppression for anomalous event detection,” in Proceedings of European Conference on Computer Vision, 2020, pp. 358-376.

[0090] An ablation study was conducted using a bottom-up approach to study the contribution of each part of the proposed method, and the results are shown in Table 3.

[0091] Table 3 Ablation study of the proposed method on UCF-Crime

[0092] Main network Batch clustering loss Cross-batch learning strategy Batch clustering guidance AUC (%) √ 84.67 √ √ 85.21 √ √ √ 85.56 √ √ √ √ 85.87

[0093] As can be seen from Table 3, on the UCF-Crime dataset, the performance of the main network reaches 84.67%, among which the addition based on the batch clustering loss makes the performance increase to 85.21%, and the increase of the cross-batch learning strategy further increases the performance to 85.56%, proving the effectiveness of the batch clustering loss and the cross-batch learning strategy. The addition of the batch clustering guidance increases the performance to 85.87%, proving that the pseudo labels generated by the batch clustering can guide the main network to predict the anomaly scores of the segments, and improve the performance of the model in anomaly detection.

[0094] The outputs of different network layers are selected for batch clustering to study their influence on the performance of the model. We select the outputs of the FC layer (FC), the first layer GCN (GCN-1), and the second layer GCN (GCN-2) respectively. The experimental results of using different network layer outputs for batch clustering on the UCF-Crime dataset are shown in Table 4.

[0095] Table 4 Influence of using different network layer outputs for batch clustering on UCF-Crime

[0096] Clustering layer AUC (%) FC 84.96 GCN-1 85.21 GCN-2 84.27

[0097] According to Table 4, the best result is obtained by using the output of the first layer GCN, which is 0.25% higher than the performance of using the FC layer, which may be because GCN-1 utilizes the temporal relationship between video segments. The performance of using the second layer GCN is 0.94% lower than that of GCN-1, because compared with GCN-2, GCN-1 contains more information due to its higher dimension.

[0098] Different cross-batch learning strategies are selected to study their influence on the performance of the model. The first method is the method mentioned in the text. The second method is to save the clustering centers obtained by clustering the previous batch as the initial value when clustering the current batch. The third method is to save the clustering centers obtained by clustering all the previous batches, and use the clustering centers obtained by clustering them as the initial value for the current batch clustering. The fourth method is to save the clustering centers of all batches in the previous epoch as clustering samples to participate in the clustering of each batch in the current epoch. As can be seen from Table 5, the proposed cross-batch learning strategies all improve the performance of the model, among which the first method has the best performance, which improves the performance of the model by 0.35%, and the fourth method is not very good, which only slightly improves the performance of the model.

[0099] Table 5: Impact of using different guiding strategies on UCF-Crime

[0100] Different strategies AUC way1 85.56 way2 85.42 way3 85.51 way4 85.34

Claims

1. A method for anomaly detection based on public space video, characterized in that, The application comprises the following steps: Step 1, dividing the obtained video data into video segments based on time sequence, and labeling the video segments obtained by division with abnormal scores, and grouping a plurality of continuous video segments and corresponding labels to form a data set; Step 2, constructing an adaptive convolutional network for video abnormal score evaluation, the adaptive convolutional network comprising a feature extraction module, a graph construction module and a graph convolution module, the feature extraction module being used to extract appearance and motion information in the video segments to construct corresponding spatio-temporal features, the graph construction module being used to construct an internal relation graph between the video segments according to the input spatio-temporal features, and the graph convolution module comprising three graph convolution layers, which are used to analyze the spatio-temporal features and the adjacency matrix in the internal relation graph to output the abnormal scores of the video segments; training the adaptive convolutional network with the data set to obtain an evaluation model for video abnormal score evaluation; Step 3, inputting a batch of video segments comprising abnormal videos and normal videos into the evaluation model to obtain the abnormal scores of the video segments; simultaneously extracting the output results of the first layer of the graph convolution module, performing batch clustering on the output results by using a K-Means algorithm, and optimizing the class clusters based on the loss of batch clustering to obtain two kinds of class clusters comprising abnormal videos and normal videos; Step 4, generating pseudo labels of the video segments according to the similarity scores between the obtained abnormal scores and the categories of the class clusters, and expanding the abnormal scores of the video segments with abnormal pseudo labels to obtain abnormal evaluation results of all videos, specifically comprising the following steps: calculating the first similarity scores between the abnormal scores and the categories of the class clusters, and calculating the second similarity scores between the abnormal score vectors and the categories of the opposite class clusters; Based on the first similarity score and the second similarity score, the pseudo label of the corresponding video is calculated: ; wherein, represents the category of the video represents the opposite category of the video represents the first similarity score, represents the second similarity score; in the abnormal video, if the pseudo label of the video segment is 1, the abnormal score of the video segment is enlarged: ; wherein, represents the original abnormal score, represents the enlarged abnormal score, represents the expansion coefficient; if the pseudo label of the video segment is 0, the abnormal score of the video segment is unchanged, i.e. .​​​​ 2.The public space video based anomaly detection method of claim 1, wherein, The specific expression of the spatio-temporal feature is as follows: ; in the formula, represents a video The spatio-temporal feature of the first segment, The dimension of the spatio-temporal feature is dimension, is the number of segments contained in the video , and represents the dimension of the feature. 3.The public space video based anomaly detection method of claim 1, wherein, the internal relation graph is used to construct the global relation of all video segments based on the similarity of spatio-temporal features and the time sequence. 4.The public space video based anomaly detection method of claim 1, wherein, The first two layers of the graph convolution layer are provided with a ReLU activation function and a dropout function, and the last layer is provided with a Sigmoid activation function. 5.The public space video based anomaly detection method of claim 1, wherein, The specific process of performing batch clustering on the output results by using the K-Means algorithm is as follows: when the output result is an abnormal video, the centers of the two kinds of class clusters are pushed away by using the loss of the corresponding clustering result; when the output result is a normal video, the centers of the two kinds of class clusters are pulled together by using the loss of the corresponding clustering result.

6. The public space video based anomaly detection method of claim 5, wherein, The loss of the clustering result is specifically expressed as follows: ; in the formula, denotes the distance between the clustering centers of two clusters, denotes an upper bound, denotes the batch size. 7.The public space video based anomaly detection method of claim 1, wherein, When the K-Means algorithm is used, a cross-batch learning strategy based on using the clustering results of the previous batch to guide the clustering of the current batch is introduced.

8. The public space video based anomaly detection method of claim 7, wherein, The specific process of the cross-batch learning strategy is as follows: Step 3-1, constructing an abnormal video segment set and a normal video segment data set ; Step 3-2, performing binary clustering on the data in to obtain clustering centers and , and taking the clustering centers as initial clustering centers when performing batch clustering on all abnormal video segments in each batch of the current epoch, and adding the two clustering centers obtained by performing binary batch clustering on all abnormal video segments in each batch of the current epoch to to obtain at the end of each epoch; Step 3-3, performing binary clustering on the data in to obtain clustering centers , , taking the clustering centers as initial clustering centers when performing batch clustering on all normal video segments in each batch of the current epoch, and adding the two clustering centers obtained by performing binary batch clustering on all normal video segments in each batch of the current epoch to to obtain at the end of each epoch. m is the number of iterations in an epoch.

Citation Information

Patent Citations

  • Anomaly detection method based on reconstruction and prediction

    CN113705490A

  • Clustering-assisted weak supervision video anomaly detection method and device

    CN113822155A