A system for capturing spatial and temporal features of videos using CNNs filters
The CNNs filter system captures the spatial and temporal characteristics of the video to achieve in-depth analysis of complex events, solves the problem that the existing video analysis system can only identify simple events, and improves the accuracy of the analysis results.
Patent Information
- Application Number
- CN202410612994.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-17
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2044-05-17
AI Technical Summary
The existing video analysis system can only identify simple passenger flow information, cannot analyze complex events, and cannot meet the increasingly diverse intelligent analysis needs.
A system that uses CNNs filters to capture video spatial and temporal features is designed, including a video input preprocessing module, a spatial feature capture module, a temporal feature capture module and a feature fusion classification module. The video features are extracted through convolution processing and pooling processing. Spatial and temporal features are fused to classify video information.
By performing dual spatial and temporal feature analysis on video frame information, events can be identified more accurately, noise can be eliminated and key information retained, improving the accuracy of analysis results.
Smart Images

Figure CN118214922B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electronic digital data processing, and in particular to a system for capturing spatial and temporal features of videos using CNNs filters. Background Art
[0002] Whether in public or private places, webcams are becoming more and more popular, and people's demand for intelligent analysis of videos is also increasing. However, existing video analysis can only identify simple events and cannot meet people's increasingly diverse needs. Therefore, a system is needed to perform complex and in-depth analysis of videos.
[0003] The foregoing discussion of the background art is intended only to facilitate an understanding of the present invention. This discussion does not acknowledge or admit that any of the material referred to is part of the common general knowledge.
[0004] Now many video analysis systems have been developed. After a lot of searching and reference, it is found that the existing video analysis systems are such as the system disclosed in the publication number CN112333434B. These systems generally include data source, media resource conversion module, video analysis module, business management module and B / S client. The data source includes security monitoring camera, which is used to provide high-definition real-time video stream, video recording files and pictures. The media resource conversion module is connected to the data source. The media resource conversion module includes protocol conversion module, device interconnection module, media forwarding module and security control module. However, this system can only analyze simple passenger flow information, and cannot analyze more complex events, so it has few application occasions. Summary of the invention
[0005] The purpose of the present invention is to propose a system for capturing video spatial and temporal features using CNNs filters in response to the existing deficiencies.
[0006] The present invention adopts the following technical solution:
[0007] A system for capturing spatial and temporal features of a video using a CNNs filter, comprising a video input preprocessing module, a spatial feature capturing module, a temporal feature capturing module and a feature fusion classification module;
[0008] The video input preprocessing module is used to input video information and preprocess the video information, the spatial feature capture module is used to capture the spatial feature information of the video, the temporal feature capture module is used to capture the temporal feature information of the video, and the feature fusion classification module is used to fuse the spatial feature and the temporal feature and judge and classify the video information;
[0009] The video input preprocessing module includes a video receiving and storing unit, a video decoding unit and a format standardization unit. The video receiving and storing unit is used to receive and store the input video file, the video decoding unit is used to decode the video file frame by frame into image data, and the format standardization unit is used to standardize the format of the image data;
[0010] The spatial feature capture module includes a spatial convolution unit and an activation output unit, wherein the spatial convolution unit is used to perform convolution processing on a single frame image, and the activation output unit is used to perform nonlinear activation processing on the convolution result;
[0011] The temporal feature capture module includes a temporal convolution unit and a pooling output unit, wherein the temporal convolution unit is used to perform convolution processing on image information of consecutive frames, and the pooling output unit is used to perform pooling processing on the convolution results;
[0012] The feature fusion classification module includes a feature fusion unit and a classifier unit, wherein the feature fusion unit is used to fuse the spatial feature information and the temporal feature information, and the classifier unit classifies the video based on the fusion result;
[0013] Further, the spatial convolution unit includes a convolution kernel information register, a window sliding controller and a convolution calculation processor, wherein the convolution kernel information register is used to store various types of convolution kernel data information, the window sliding controller is used to control the sliding of the window and intercept the area information from the image, and the convolution calculation processor is used to perform convolution calculation processing on the convolution kernel and the area information;
[0014] Furthermore, the temporal convolution unit includes a frame information statistics processor, a time window processor and a one-dimensional convolution processor, wherein the frame information statistics processor is used to perform statistics on pixel information in the image, the time window processor is used to obtain statistical information of continuous frames, and the one-dimensional convolution processor is used to perform convolution processing on the statistical results in the window;
[0015] Furthermore, the feature fusion unit includes a fusion control processor and a fusion calculation processor, wherein the fusion control processor is used to select matrix information to be fused, and the fusion calculation processor is used to perform calculation processing on the selected matrix information;
[0016] The fusion control processor selects the spatial matrix information corresponding to a frame of information , take the time sub-matrix corresponding to the frame information as B0, and obtain the sub-matrices before and after B0, which are recorded as B -T , ..., B -1 , B1, ..., B T , where T is the fusion radius;
[0017] The fusion calculation processor calculates the fusion element value Fu according to the following formula: i :
[0018] ;
[0019] The fusion vector is formed by the fusion element values, Fu i is the value of the i-th element in the fusion vector;
[0020] Furthermore, the classifier unit includes a classification feature register and a feature proofreading processor, wherein the classification feature register is used to store standard fusion vector information of each classification item, and the feature proofreading processor is used to compare the standard fusion vector with the calculated fusion vector and select the corresponding classification item based on the comparison result.
[0021] The beneficial effects achieved by the present invention are:
[0022] This system performs dual feature analysis on the spatial and temporal features of the video frame information to obtain the corresponding feature matrices, then performs "T"-shaped fusion on the matrices and compares the fusion results with the event features to identify the events. When processing the feature matrix, the convolution processing method is used to better eliminate noise and retain key information, making the final analysis results more accurate.
[0023] To further understand the features and technical contents of the present invention, please refer to the following detailed description and drawings of the present invention. However, the drawings provided are only for reference and description and are not intended to limit the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a schematic diagram of the overall structural framework of the present invention;
[0025] Figure 2 This is a schematic diagram of the video input preprocessing module of the present invention;
[0026] Figure 3 This is a schematic diagram of the spatial feature capture module of the present invention;
[0027] Figure 4 This is a schematic diagram of the time feature capture module of the present invention;
[0028] Figure 5 This is a schematic diagram of the feature fusion classification module of the present invention. DETAILED DESCRIPTION
[0029] The following is an explanation of the embodiments of the present invention through specific embodiments. Those skilled in the art can understand the advantages and effects of the present invention from the contents disclosed in this specification. The present invention can be implemented or applied through other different specific embodiments, and the details in this specification can also be modified and changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. In addition, the drawings of the present invention are only simple schematic illustrations and are not depicted according to actual sizes. It is stated in advance. The following embodiments will further explain the relevant technical contents of the present invention in detail, but the disclosed contents are not intended to limit the scope of protection of the present invention.
[0030] Embodiment 1: This embodiment provides a system for capturing spatial and temporal features of a video using CNNs filters, combined with Figure 1 , including a video input preprocessing module, a spatial feature capture module, a temporal feature capture module and a feature fusion classification module;
[0031] The video input preprocessing module is used to input video information and preprocess the video information, the spatial feature capture module is used to capture the spatial feature information of the video, the temporal feature capture module is used to capture the temporal feature information of the video, and the feature fusion classification module is used to fuse the spatial feature and the temporal feature and judge and classify the video information;
[0032] The video input preprocessing module includes a video receiving and storing unit, a video decoding unit and a format standardization unit. The video receiving and storing unit is used to receive and store the input video file, the video decoding unit is used to decode the video file frame by frame into image data, and the format standardization unit is used to standardize the format of the image data;
[0033] The spatial feature capture module includes a spatial convolution unit and an activation output unit, wherein the spatial convolution unit is used to perform convolution processing on a single frame image, and the activation output unit is used to perform nonlinear activation processing on the convolution result;
[0034] The temporal feature capture module includes a temporal convolution unit and a pooling output unit, wherein the temporal convolution unit is used to perform convolution processing on image information of consecutive frames, and the pooling output unit is used to perform pooling processing on the convolution results;
[0035] The feature fusion classification module includes a feature fusion unit and a classifier unit, wherein the feature fusion unit is used to fuse the spatial feature information and the temporal feature information, and the classifier unit classifies the video based on the fusion result;
[0036] The spatial convolution unit includes a convolution kernel information register, a window sliding controller and a convolution calculation processor, wherein the convolution kernel information register is used to store various types of convolution kernel data information, the window sliding controller is used to control the sliding of the window and intercept the region information from the image, and the convolution calculation processor is used to perform convolution calculation processing on the convolution kernel and the region information;
[0037] The temporal convolution unit includes a frame information statistics processor, a time window processor and a one-dimensional convolution processor, wherein the frame information statistics processor is used to perform statistics on pixel information in an image, the time window processor is used to obtain statistical information of continuous frames, and the one-dimensional convolution processor is used to perform convolution processing on the statistical results in the window;
[0038] The feature fusion unit includes a fusion control processor and a fusion calculation processor, wherein the fusion control processor is used to select matrix information to be fused, and the fusion calculation processor is used to perform calculation processing on the selected matrix information;
[0039] The fusion control processor selects the spatial matrix information corresponding to a frame of information , take the time sub-matrix corresponding to the frame information as B0, and obtain the sub-matrices before and after B0, which are recorded as B -T , ..., B -1 , B1, ..., B T , where T is the fusion radius;
[0040] The fusion calculation processor calculates the fusion element value Fu according to the following formula: i :
[0041] ;
[0042] The fusion vector is formed by the fusion element values, Fu i is the value of the i-th element in the fusion vector;
[0043] The classifier unit includes a classification feature register and a feature proofreading processor, wherein the classification feature register is used to store standard fusion vector information of each classification item, and the feature proofreading processor is used to compare the standard fusion vector with the calculated fusion vector and select the corresponding classification item based on the comparison result.
[0044] Embodiment 2: This embodiment includes all the contents of Embodiment 1, and provides a system for capturing spatial and temporal features of a video using a CNNs filter, including a video input preprocessing module, a spatial feature capture module, a temporal feature capture module, and a feature fusion classification module;
[0045] The video input preprocessing module is used to input video information and preprocess the video information, the spatial feature capture module is used to capture the spatial feature information of the video, the temporal feature capture module is used to capture the temporal feature information of the video, and the feature fusion classification module is used to fuse the spatial feature and the temporal feature and judge and classify the video information;
[0046] Combination Figure 2 The video input preprocessing module includes a video receiving and storing unit, a video decoding unit and a format standardization unit. The video receiving and storing unit is used to receive and store the input video file, the video decoding unit is used to decode the video file frame by frame into image data, and the format standardization unit is used to standardize the format of the image data;
[0047] Combination Figure 3 , the spatial feature capture module includes a spatial convolution unit and an activation output unit, the spatial convolution unit is used to perform convolution processing on a single frame image, and the activation output unit is used to perform nonlinear activation processing on the convolution result;
[0048] Combination Figure 4 The temporal feature capture module includes a temporal convolution unit and a pooling output unit, wherein the temporal convolution unit is used to perform convolution processing on image information of consecutive frames, and the pooling output unit is used to perform pooling processing on the convolution results;
[0049] Combination Figure 5 The feature fusion classification module includes a feature fusion unit and a classifier unit, wherein the feature fusion unit is used to fuse the spatial feature information and the temporal feature information, and the classifier unit classifies the video based on the fusion result;
[0050] The video decoding unit includes a format parsing processor, a decoding recovery processor and a cache control processor, wherein the format parsing processor is used to parse the format information of the video file, the decoding recovery processor decodes the video file based on the format information and recovers the image information in a single frame form, and the cache control processor is used to store the decoded image information and control the storage state;
[0051] The format standardization unit includes a size control processor, a color conversion processor, a data type processor and a pixel specification processor, wherein the size control processor is used to process the frame image into a uniform size, the color conversion processor is used to convert the color of the frame image into a uniform expression form, the data type processor is used to convert the type of the image data into a uniform floating point type, and the pixel specification processor is used to standardize the pixels of the frame image into a uniform range;
[0052] The spatial convolution unit includes a convolution kernel information register, a window sliding controller and a convolution calculation processor, wherein the convolution kernel information register is used to store various types of convolution kernel data information, the window sliding controller is used to control the sliding of the window and intercept the region information from the image, and the convolution calculation processor is used to perform convolution calculation processing on the convolution kernel and the region information;
[0053] The parameters set in the window sliding controller include a window size and a step size. The window sliding controller slides the window based on the step size and obtains an image area within the window. The size of the obtained image area is consistent with the window size, and the window size corresponds to the side length of the corresponding convolution kernel.
[0054] The convolution calculation processor calculates the convolution value Vc according to the following formula:
[0055] ;
[0056] Among them, a ij is the element value of the i-th row and j-th column in the convolution kernel, x ij is the pixel value of the i-th row and j-th column in the image area, and n is the side length of the convolution kernel;
[0057] The activation output unit includes an activation function selection processor and an execution output processor, wherein the activation function selection processor is used to store activation function information and select an activation function for processing a convolution value, and the execution output processor is used to execute the activation function and output spatial features;
[0058] The activation function's processing formula for the convolution value is:
[0059] ;
[0060] Among them, v0 is the activation threshold, Vc' is the convolution value after activation;
[0061] The matrix formed by multiple convolution values of the same convolution kernel is a single feature. Multiple single features constitute spatial features. The spatial features of a frame of image data are expressed as Indicates that, A i Represents the matrix corresponding to the i-th convolution kernel;
[0062] The temporal convolution unit includes a frame information statistics processor, a time window processor and a one-dimensional convolution processor, wherein the frame information statistics processor is used to perform statistics on pixel information in an image, the time window processor is used to obtain statistical information of continuous frames, and the one-dimensional convolution processor is used to perform convolution processing on the statistical results in the window;
[0063] The one-dimensional convolution processor calculates the one-dimensional convolution value Vo according to the following formula:
[0064] ;
[0065] Among them, m is the length of the one-dimensional convolution kernel, b i is the i-th element value of the one-dimensional convolution kernel, p i is the pixel statistics of the i-th frame in the window;
[0066] The one-dimensional convolution values output by the temporal convolution unit constitute a matrix B, and the data group of each row in the matrix B is the one-dimensional convolution value of the corresponding pixel statistics item under different windows;
[0067] The pooling output unit includes a data pooling processor and a matrix segmentation processor, wherein the data pooling processor is used to perform screening processing on the elements in the matrix B, and the matrix segmentation processor is used to segment the matrix B into a plurality of sub-matrices;
[0068] The data pooling processor calculates the pooling index Vp of each column of data in the matrix B according to the following formula:
[0069] ;
[0070] in, is the mean of the corresponding column data, is the standard deviation of the corresponding column data;
[0071] The data pooling processor selects u columns of data with the smallest pooling index from each k columns of data and deletes them from the matrix B. is the deletion ratio;
[0072] The matrix segmentation processor segments the matrix B into time sub-matrices by every ku columns;
[0073] The feature fusion unit includes a fusion control processor and a fusion calculation processor, wherein the fusion control processor is used to select matrix information to be fused, and the fusion calculation processor is used to perform calculation processing on the selected matrix information;
[0074] The fusion control processor selects the spatial matrix information corresponding to a frame of information , take the time sub-matrix corresponding to the frame information as B0, and obtain the sub-matrices before and after B0, which are recorded as B -T , ..., B -1 , B1, ..., B T , where T is the fusion radius;
[0075] The fusion calculation processor calculates the fusion element value Fu according to the following formula: i :
[0076] ;
[0077] The fusion vector is formed by the fusion element values, Fu i is the value of the i-th element in the fusion vector;
[0078] The classifier unit includes a classification feature register and a feature check processor, wherein the classification feature register is used to store standard fusion vector information of each classification item, and the feature check processor is used to compare the standard fusion vector with the calculated fusion vector and select the corresponding classification item based on the comparison result;
[0079] The i and j appearing in the above text are both ordinal numbers used to indicate serial numbers.
[0080] The contents disclosed above are only preferred feasible embodiments of the present invention, and do not limit the protection scope of the present invention. Therefore, all equivalent technical changes made using the contents of the present invention specification and drawings are included in the protection scope of the present invention. In addition, the elements therein can be updated as technology develops.
Claims
1. A system for capturing spatial and temporal features of videos using CNNs filters, characterized in that: It includes a video input preprocessing module, a spatial feature capture module, a temporal feature capture module and a feature fusion classification module; The video input preprocessing module is used to input video information and preprocess the video information, the spatial feature capture module is used to capture the spatial feature information of the video, the temporal feature capture module is used to capture the temporal feature information of the video, and the feature fusion classification module is used to fuse the spatial feature and the temporal feature and judge and classify the video information; The video input preprocessing module includes a video receiving and storing unit, a video decoding unit and a format standardization unit. The video receiving and storing unit is used to receive and store the input video file, the video decoding unit is used to decode the video file frame by frame into image data, and the format standardization unit is used to standardize the format of the image data; The spatial feature capture module includes a spatial convolution unit and an activation output unit, wherein the spatial convolution unit is used to perform convolution processing on the single-frame image data after the normalization processing, and the activation output unit is used to perform nonlinear activation processing on the convolution result; The temporal feature capture module includes a temporal convolution unit and a pooling output unit, wherein the temporal convolution unit is used to perform convolution processing on the image data of the continuous frames after the normalization processing, and the pooling output unit is used to perform pooling processing on the convolution results; The feature fusion classification module includes a feature fusion unit and a classifier unit, wherein the feature fusion unit is used to fuse the spatial feature information and the temporal feature information, and the classifier unit classifies the video based on the fusion result; The spatial convolution unit includes a convolution kernel information register, a window sliding controller and a convolution calculation processor, wherein the convolution kernel information register is used to store various types of convolution kernel data information, the window sliding controller is used to control the sliding of the window and intercept the region information from the image, and the convolution calculation processor is used to perform convolution calculation processing on the convolution kernel and the region information; The parameters set in the window sliding controller include a window size and a step size. The window sliding controller slides the window based on the step size and obtains an image area within the window. The size of the obtained image area is consistent with the window size, and the window size corresponds to the side length of the corresponding convolution kernel. The convolution calculation processor calculates the convolution value Vc according to the following formula: ; Among them, a ij is the element value of the i-th row and j-th column in the convolution kernel, x ij is the pixel value of the i-th row and j-th column in the image area, and n is the side length of the convolution kernel; The activation output unit includes an activation function selection processor and an execution output processor, wherein the activation function selection processor is used to store activation function information and select an activation function for processing a convolution value, and the execution output processor is used to execute the activation function and output spatial features; The activation function's processing formula for the convolution value is: ; Among them, v0 is the activation threshold, Vc' is the convolution value after activation; The matrix formed by multiple activated convolution values of the same convolution kernel is a single feature. Multiple single features constitute spatial features. The spatial features of a frame of image data are expressed as Indicates The matrix corresponding to the convolution kernel; The temporal convolution unit includes a frame information statistics processor, a time window processor and a one-dimensional convolution processor, wherein the frame information statistics processor is used to perform statistics on pixel information in an image, the time window processor is used to obtain statistical information of continuous frames, and the one-dimensional convolution processor is used to perform convolution processing on the statistical results in the window; The feature fusion unit includes a fusion control processor and a fusion calculation processor, wherein the fusion control processor is used to select matrix information to be fused, and the fusion calculation processor is used to perform calculation processing on the selected matrix information; The fusion control processor selects the spatial matrix information corresponding to a frame of information , take the time sub-matrix corresponding to the frame information as B0, and obtain the sub-matrices before and after B0, which are recorded as B -T , ..., B -1 , B1, ..., B T , where T is the fusion radius; The fusion calculation processor calculates the fusion element value Fu according to the following formula: i’ : ; The fusion vector is formed by the fusion element values, Fu i’ is the value of the i'th element in the fusion vector; The one-dimensional convolution values output by the temporal convolution unit constitute a matrix B, and the data group of each row in the matrix B is the one-dimensional convolution value of the corresponding pixel statistics item under different windows; The pooling output unit includes a data pooling processor and a matrix segmentation processor, wherein the data pooling processor is used to perform screening processing on the elements in the matrix B, and the matrix segmentation processor is used to segment the matrix B into a plurality of sub-matrices; The data pooling processor calculates the pooling index Vp of each column of data in the matrix B according to the following formula: ; in, is the mean of the corresponding column data, is the standard deviation of the corresponding column data; The data pooling processor selects u columns of data with the smallest pooling index from each k columns of data and deletes them from the matrix B. To delete the ratio; The matrix segmentation processor segments the matrix B into time sub-matrices by ku columns.
2. A system for capturing spatial and temporal features of a video using a CNNs filter as claimed in claim 1, characterized in that: The classifier unit includes a classification feature register and a feature proofreading processor, wherein the classification feature register is used to store standard fusion vector information of each classification item, and the feature proofreading processor is used to compare the standard fusion vector with the calculated fusion vector and select the corresponding classification item based on the comparison result.
Citation Information
Patent Citations
An intelligent video analysis system
CN112333434B
Video classification method, device and equipment and computer readable storage medium
CN111859023A
