A vehicle behavior recognition method based on attention network
By using the dual-stream convolutional network and CBAM* attention unit in the vehicle behavior recognition model, the spatial and temporal features in the video are extracted and fused, and the problem of poor extraction of feature of small-target vehicles is solved, which improves the recognition accuracy and reduces misjudgment.
Patent Information
- Application Number
- CN202211149044.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-21
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2042-09-21
AI Technical Summary
The existing vehicle behavior recognition model is poor in extracting small-target vehicle features, resulting in low recognition accuracy and difficulty in effectively integrating the spatio-temporal features in the video.
The dual-stream convolution network is used to combine the CBAM* attention unit, and the features of video frame images and optical flow images are extracted respectively through the spatial feature extraction network and the temporal feature extraction network, and the features are fused through the spatiotemporal feature fusion network, and the attention mechanism is used to give different weights to the features.
Effectively extract and integrate the spatio-temporal features in vehicle behavior, improve the recognition accuracy of small-target vehicles and reduce the chance of misjudgment.
Smart Images

Figure CN115497059B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and more specifically to a vehicle behavior recognition method based on an attention network. Background Art
[0002] Vehicle behavior recognition is one of the important functions of the Intelligent Transportation System (ITS), which aims to determine the category of vehicle behavior through computer vision algorithms. Due to the excellent performance of deep neural networks in feature extraction and time series modeling, vehicle behavior recognition methods based on deep learning technology have become a current research hotspot. In vehicle behavior recognition tasks, vehicles often appear as small target objects, so the feature extraction of moving small target vehicles has become a challenge for vehicle behavior recognition tasks. The International Society for Optical Engineering defines objects with a target area of less than 80 pixels in a 256x256 image as small target objects. To address this problem, researchers have proposed three methods: feature pyramid method, super-resolution enhancement technology, and attention mechanism. Since the extraction effect of moving small target features using only feature pyramid method or super-resolution enhancement technology is not good, many researchers have adopted the method of embedding lightweight attention mechanism to improve this problem, thereby improving vehicle recognition accuracy.
[0003] Temporal features and spatial features belong to different feature expression spaces in the video. Both play an important role in behavior recognition. Ignoring any of the above dimensional features will result in errors in the judgment of vehicle behavior recognition, increasing the difficulty of behavior modeling. When the target vehicle occupies a small part of the video screen, traditional vehicle behavior recognition models often find it difficult to accurately extract the effective features of such vehicles. Instead, they introduce redundant features that are irrelevant to the judgment of the behavior category, resulting in inaccurate final judgment results of the network.
[0004] In view of the above problems, the present invention adopts a dual-stream convolutional network to take video frame images and stacked optical flow images as input, and proposes a vehicle behavior recognition network based on the attention mechanism in combination with the attention unit, and uses feature splicing technology to perform feature fusion to ensure that the vehicle behavior recognition network simultaneously uses the spatiotemporal features in the video for modeling. The innovative CBAM* attention unit of the present invention can not only prompt the network model to strengthen the features of useful information and suppress useless features in the effective part of the picture, but also has the function of channel attention. The temporal flow feature extraction network of the present invention takes the optical flow map stack as input, and takes each optical flow map as a channel, so that the vehicle recognition network starts from the global information and selects important features between channels. Summary of the invention
[0005] In view of this, the present invention provides a vehicle behavior recognition method based on an attention network, and the purpose of the present invention is to extract and fuse the spatiotemporal features in the video through a two-stream convolutional network. The vehicle behavior recognition problem is transformed into a classification problem in deep learning, and the spatiotemporal information in the traffic video is used to represent the high-level semantic information of the vehicle behavior; the key motion features of small target vehicles are enhanced, and redundant information is removed, so as to effectively avoid the loss of feature information of small target vehicles and reduce the probability of the network model misjudging the vehicle behavior.
[0006] In order to achieve the above object, the present invention adopts the following technical solution:
[0007] A vehicle behavior recognition method based on an attention network, wherein the attention network adopts a dual-stream convolutional network structure, and the vehicle behavior recognition method specifically includes the following steps:
[0008] Input the video to be recognized into the attention network, where the attention network includes: a spatial feature extraction network, a temporal feature extraction network, and a spatiotemporal feature fusion network, and the video to be recognized includes a video frame image and an optical flow image;
[0009] The input video frame image is subjected to feature extraction through a spatial feature extraction network, and spatial features are output;
[0010] The input optical flow image is subjected to feature extraction through the temporal feature extraction network, and the temporal features are output;
[0011] The spatial and temporal features are fused through the spatiotemporal feature fusion network, and the vehicle behavior category is determined.
[0012] Optionally, the spatial feature extraction network includes: a convolution layer, a maximum pooling layer, a feature extraction layer, and an average pooling layer.
[0013] Optional, spatial feature extraction network calculation formula:
[0014] s1=Maxpool(conv 7*7 (S)
[0015] s2=layer(s1)
[0016] s3=layer(s2)
[0017] s4=layer(s3)
[0018] s5=layer(s4)
[0019] out spatial =Avgpool(s5);
[0020] Where: S represents the input video frame image data, conv7*7 represents a convolution layer with a convolution kernel of 7, Maxpool represents a maximum pooling layer, s1 represents the intermediate feature vector of the first spatial stream, s2 represents the intermediate feature vector of the second spatial stream, s3 represents the intermediate feature vector of the third spatial stream, s4 represents the intermediate feature vector of the fourth spatial stream, s5 represents the intermediate feature vector of the fifth spatial stream, layer represents a feature extraction layer, Avgpool represents an average pooling layer, out spatial Represents the output result of the spatial stream network.
[0021] Optionally, the temporal feature extraction network includes: a convolution layer, a maximum pooling layer, a feature extraction layer, an attention unit layer, and an average pooling layer.
[0022] Optional, temporal feature extraction network calculation formula:
[0023]
[0024] Where: T represents the input optical flow image data, conv 7*7 represents a convolutional layer with a convolution kernel of 7, t1 represents the intermediate feature vector of the first time stream, t2 represents the intermediate feature vector of the second time stream, t3 represents the intermediate feature vector of the third time stream, t4 represents the intermediate feature vector of the fourth time stream, t5 represents the intermediate feature vector of the fifth time stream, t6 represents the intermediate feature vector of the sixth time stream, t7 represents the intermediate feature vector of the seventh time stream, CBAM* represents the attention unit, Maxpool represents the maximum pooling layer, layer represents the feature extraction layer, Avgpool represents the average pooling layer, out temporal Represents the output result of the time stream network.
[0025] Optionally, the feature extraction layer includes a basic block.
[0026] Optionally, the basic blocks include convolutional layers, batch normalization layers, and non-linear activation layers.
[0027] Optionally, the attention unit includes: a convolutional layer, a non-linear activation layer, an average pooling layer, and a maximum pooling layer.
[0028] Optionally, the principle formula of the attention unit layer is as follows:
[0029] MLP = conv(Relu(conv(X)))
[0030] A c =σ(MLP(Avgpool(X))+(MLP(Maxpool(X)))
[0031]
[0032] A s=σ(conv([Avgpool(X'),Maxpool(X')]))
[0033]
[0034] Where: conv represents the convolutional layer, Relu is the nonlinear activation function, MLP represents the multi-layer perceptron unit, Avgpool represents the average pooling layer, Maxpool represents the maximum pooling layer, σ represents the Sigmoid function, X' represents the attention intermediate vector, A c represents the channel attention feature vector, A s represents the spatial attention feature vector, Indicates element-by-element multiplication calculation, Out cbam Represents the output features of the attention unit.
[0035] Optionally, the spatiotemporal feature fusion network includes a concatenation operation layer and a logistic regression layer.
[0036] It can be seen from the above technical solutions that, compared with the prior art, the present invention discloses a vehicle behavior recognition method based on an attention network, which can achieve the following beneficial effects:
[0037] 1. The CBAM* attention unit is embedded in the network for weighted transformation, and different attention weights are given to the small target vehicles in the foreground and the traffic background features. This method effectively integrates the spatiotemporal features, solves the problem that the existing vehicle behavior recognition model cannot extract the features of small target vehicles during training, and thus improves the accuracy of the vehicle behavior recognition system.
[0038] 2. The present invention adopts a two-stream convolutional network to take video frame images and stacked optical flow images as input, and innovatively proposes a vehicle behavior recognition network based on the attention mechanism in combination with the attention unit. It uses feature splicing technology to perform feature fusion, ensuring that the vehicle behavior recognition network simultaneously uses the spatiotemporal features in the video for modeling. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0040] Figure 1 The accompanying drawing is a flow chart of a vehicle behavior recognition method based on an attention network of the present invention;
[0041] Figure 2The accompanying drawing is a diagram of the architecture of the attention network of the present invention;
[0042] Figure 3 The accompanying drawing is a schematic diagram of the architecture of the CBAM* attention unit of the present invention. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0044] like Figure 1 , Figure 2 As shown, the embodiment of the present invention discloses a vehicle behavior recognition method based on an attention network, and the vehicle behavior recognition method specifically includes the following steps:
[0045] Input the video to be recognized into the attention network, where the attention network includes: a spatial feature extraction network, a temporal feature extraction network, and a spatiotemporal feature fusion network, and the video to be recognized includes a video frame image and an optical flow image;
[0046] The input video frame image is subjected to feature extraction through a spatial feature extraction network, and spatial features are output;
[0047] The input optical flow image is subjected to feature extraction through the temporal feature extraction network, and the temporal features are output;
[0048] The spatial and temporal features are fused through the spatiotemporal feature fusion network, and the vehicle behavior category is determined.
[0049] Furthermore, the spatial feature extraction network includes: a convolutional layer, a maximum pooling layer, a feature extraction layer, and an average pooling layer.
[0050] Furthermore, the spatial feature extraction network calculation formula is:
[0051] s1=Maxpool(conv 7*7 (S)
[0052] s2=layer(s1)
[0053] s3=layer(s2)
[0054] s4=layer(s3)
[0055] s5=layer(s4)
[0056] out spatial=Avgpool(s5);
[0057] Where: S represents the input video frame image data, conv 7*7 represents a convolution layer with a convolution kernel of 7, Maxpool represents a maximum pooling layer, s1 represents the intermediate feature vector of the first spatial stream, s2 represents the intermediate feature vector of the second spatial stream, s3 represents the intermediate feature vector of the third spatial stream, s4 represents the intermediate feature vector of the fourth spatial stream, s5 represents the intermediate feature vector of the fifth spatial stream, layer represents a feature extraction layer, Avgpool represents average pooling, out spatial Represents the output result of the spatial stream network.
[0058] Furthermore, the temporal feature extraction network includes: a convolutional layer, a maximum pooling layer, a feature extraction layer, an attention unit layer, and an average pooling layer.
[0059] Furthermore, the time feature extraction network calculation formula is:
[0060]
[0061] Where: T represents the input optical flow image data, conv 7*7 represents a convolutional layer with a convolution kernel of 7, t1 represents the intermediate feature vector of the first time stream, t2 represents the intermediate feature vector of the second time stream, t3 represents the intermediate feature vector of the third time stream, t4 represents the intermediate feature vector of the fourth time stream, t5 represents the intermediate feature vector of the fifth time stream, t6 represents the intermediate feature vector of the sixth time stream, t7 represents the intermediate feature vector of the seventh time stream, CBAM* represents the attention unit, Maxpool represents the maximum pooling layer, layer represents the feature extraction layer, Avgpool represents the average pooling layer, out temporal Represents the output result of the time stream network.
[0062] Furthermore, Maxpool(3x3) represents a maximum pooling operation with a stride of 3, and Avgpool(3x3) represents an average pooling operation with a stride of 3.
[0063] Furthermore, the feature extraction layer includes basic blocks.
[0064] Furthermore, the formula of the feature extraction layer is as follows:
[0065] layer=BasicBlock(BasicBlock(X))
[0066] Where: X represents the intermediate feature vector, BasicBlock represents the basic block.
[0067] Furthermore, the basic blocks include convolutional layers, batch normalization layers, and non-linear activation layers.
[0068] Furthermore, the basic block calculation formula is as follows:
[0069] x1=conv 3*3 (X)
[0070] x2=Bn(x1)
[0071] x3=Relu(x2)
[0072] x4=Bn(conv 3*3 (x3))
[0073]
[0074] x6 = Relu(x5);
[0075] Where X represents the intermediate feature vector of the basic block input, conv 3*3 Indicates a convolution operation with a convolution kernel size of 3, conv 1*1 represents a convolution operation with a convolution kernel size of 1, x i Represents the intermediate feature vector, Relu represents the nonlinear activation function, Bn represents the batch normalization layer (Batch Normalization) calculation, Represents a concatenation operation.
[0076] Furthermore, the attention unit includes: convolution layer, non-linear activation layer, average pooling layer, and maximum pooling layer.
[0077] Furthermore, the principle formula of the attention unit layer is as follows:
[0078] MLP = conv(Relu(conv(X)))
[0079] A c =σ(MLP(Avgpool(X))+(MLP(Maxpool(X)))
[0080]
[0081] A s =σ(conv([Avgpool(X'),Maxpool(X')]))
[0082]
[0083] Where: conv represents convolution operation, Relu is a nonlinear activation function, MLP represents a multi-layer perceptron unit, Avgpool represents an average pooling layer, Maxpool represents a maximum pooling operation, σ represents a Sigmoid function, X' represents an intermediate attention vector, and A crepresents the channel attention feature vector, A s represents the spatial attention feature vector, Indicates element-by-element multiplication calculation, Out cbam Represents the output features of the attention unit.
[0084] Furthermore, the attention mechanism is used to perform weighted transformation, assigning different attention weights to the small target vehicles in the foreground and the traffic background features.
[0085] Furthermore, the spatiotemporal feature fusion network includes a concatenation operation layer and a logistic regression layer.
[0086] Furthermore, the spatial features and temporal features are concatenated based on the concatenation operation and then normalized using a logistic regression layer to obtain the category of vehicle behavior;
[0087] The spatiotemporal feature fusion network formula is as follows:
[0088]
[0089] Where: c n Represents the category of vehicle behavior, SoftMax logistic regression layer, Represents a concatenation operation.
[0090] In a specific embodiment, the present invention also discloses another form of a vehicle behavior recognition method based on an attention network, the specific contents of which are as follows:
[0091] Embedding the CBAM* attention unit in the internal structure of the two-stream convolutional network prompts the model to learn the key features of small target vehicles; and improves the internal structure of the spatiotemporal feature extraction network.
[0092] The spatial feature extraction network calculation formula consists of sub-formulas (1)-(6). The spatial feature extraction network calculation formula is as follows:
[0093] s1=Maxpool(conv 7*7 (S)) (1)
[0094] s2=BasicBlock(BasicBlock(s1)) (2)
[0095] s3=BasicBlock(BasicBlock(s2)) (3)
[0096] s4=BasicBlock(BasicBlock(s3)) (4)
[0097] s5=BasicBlock(BasicBlock(s4)) (5)
[0098] out spatial =Avgpool(s5) (6)
[0099] Where: S represents the input video frame data, BasicBlock represents the basic block of the feature extraction unit, and s i represents the intermediate eigenvector, where s i The i in is used to distinguish the number of layers, Maxpool represents the maximum pooling operation, and Avgpool represents the average pooling operation.
[0100] The calculation formula of the time feature extraction network is composed of sub-formulas (7)-(14). The specific calculation formula of the time feature extraction network is as follows:
[0101] t1=CBAM*(conv 7*7 (T)) (7)
[0102] t2=Maxpool(t1) (8)
[0103] t3=BasicBlock(BasicBlock(t2)) (9)
[0104] t4=BasicBlock(BasicBlock(t3)) (10)
[0105] t5=BasicBlock(BasicBlock(t4)) (11)
[0106] t6=BasicBlock(BasicBlock(t5)) (12)
[0107] t7=CBAM*(t6) (13)
[0108] out temporal =Avgpool(t7) (14)
[0109] Where: T represents the input optical flow image data, CBAM* represents the attention unit, Maxpool represents the maximum pooling operation, BasicBlock represents the basic block of the feature extraction unit, Avgpool represents the average pooling operation, t i represents the intermediate eigenvector, where t i The i in the code is used to distinguish the number of layers, out temporal Represents the output result of the time stream network.
[0110] The calculation formula of the basic block BasicBlock of the feature extraction unit is composed of sub-formulas (15)-(20). The calculation formula of the basic block BasicBlock of the feature extraction unit is as follows:
[0111] x1=conv 3*3 (X) (15)
[0112] x2=Bn(x1) (16)
[0113] x3=Relu(x2) (17)
[0114] x4=Bn(conv 3*3 (x3)) (18)
[0115]
[0116] x6=Relu(x5) (20)
[0117] Where: X represents the input vector, x i represents the intermediate eigenvector, where x i The i in is used to distinguish the number of layers, conv n*n represents a convolution operation with a convolution kernel size of n, and Bn represents Batch Normalization calculation. Represents a concatenation operation.
[0118] Further, in Figure 2 In this case, out' represents x5 and out represents x6.
[0119] The calculation formula of the CBAM* attention unit is composed of sub-formulas (21)-(25). The calculation formula of the CBAM* attention unit is as follows:
[0120] MLP=conv(Relu(conv(X))) (21)
[0121] A c =σ(MLP(Avgpool(X))+(MLP(Maxpool(X))) (22)
[0122]
[0123] A s =σ(conv([Avgpool(X'),Maxpool(X')])) (24)
[0124]
[0125] Where: conv represents convolution operation, Avgpool represents average pooling operation, Maxpool represents maximum pooling operation, σ represents Sigmoid function, A c represents the channel attention feature vector, A s represents the spatial attention feature vector, where Indicates element-by-element multiplication calculation, Out cbam Represents the features output by the CBAM* attention unit transformation.
[0126] The calculation formula for spatiotemporal feature fusion is as follows:
[0127]
[0128] Where: c n Represents the category of vehicle behavior, SoftMax represents the classification function, Indicates concatenation operation, out temporal Represents the output vector of the temporal feature extraction network, out spatial Represents the output vector of the spatial feature extraction network.
[0129] like Figure 2 As shown, the architecture of the attention network of the vehicle behavior recognition method based on the attention network designed by the method of the present invention can be specifically described as follows:
[0130] Input a section of traffic video data, perform data preprocessing, and obtain video frame images and optical flow images;
[0131] The video frames and optical flow images are sent to the spatiotemporal feature extraction network to obtain and fuse the video temporal features and spatial features. The overall calculation process is as follows:
[0132] s=S(X s )
[0133] t=T(X t )
[0134]
[0135] Where: X s Represents the input video frame image data, X t represents the input optical flow image data, S represents the spatial feature extraction network, T represents the temporal feature extraction network, s represents the output vector of the spatial feature extraction network, t represents the output vector of the temporal feature extraction network, represents the concatenation operation, c n Represents the vehicle behavior category.
[0136] like Figure 3 As shown, the CBAM* attention unit of the present invention is specifically described as follows:
[0137] The calculation process of the multi-layer perceptron layer pair in the CBAM attention unit is as follows:
[0138] MLP = conv(Relu(conv(X)));
[0139] Where: conv represents convolution operation, MLP represents multi-layer perceptron layer, and X represents input data.
[0140] The calculation process of the channel attention layer and spatial attention layer in the CBAM* attention unit is as follows:
[0141] A c =σ(MLP(Avgpool(X))+(MLP(Maxpool(X)))
[0142]
[0143] A s =σ(conv([Avgpool(X'),Maxpool(X')]))
[0144]
[0145] Where: Avgpool represents the average pooling operation, Maxpool represents the maximum pooling operation, σ represents the Sigmoid function, A c represents the channel attention feature vector, A s represents the spatial attention feature vector, where Indicates element-by-element multiplication calculation, Out cbam Represents the features output by the CBAM* attention unit transformation;
[0146] The specific description of the TSAN model parameter updating algorithm of the present invention is shown in Table 1.
[0147] Table 1
[0148]
[0149] This invention describes the specific implementation steps of a vehicle behavior recognition method based on an attention network in combination with a specific case:
[0150] (1) Given a piece of traffic video data V;
[0151] (2) Next, the video data is preprocessed to obtain video frame images s = [s1, s2, s3, ...] and optical flow images t = [t1, t2, t3, ...];
[0152] (3) Send s and t to the two-stream convolutional network for feature extraction to obtain out with time information temporal and spatial information features out spatial ,pass The feature fusion operation is performed to obtain the final vehicle behavior category c n .
[0153] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0154] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A vehicle behavior recognition method based on attention network, characterized in that: The attention network adopts a two-stream convolutional network structure. The vehicle behavior recognition method specifically includes the following steps: Input the video to be recognized into the attention network, where the attention network includes: a spatial feature extraction network, a temporal feature extraction network, and a spatiotemporal feature fusion network, and the video to be recognized includes a video frame image and an optical flow image; The input video frame image is subjected to feature extraction through a spatial feature extraction network, and spatial features are output; The input optical flow image is subjected to feature extraction through the temporal feature extraction network, and the temporal features are output; The spatial and temporal features are fused through the spatiotemporal feature fusion network, and the vehicle behavior category is determined; The spatial feature extraction network includes: convolution layer, maximum pooling layer, feature extraction layer, and average pooling layer; Spatial feature extraction network calculation formula: s1=Maxpool(conv 7*7 (S)) s2=layer(s1) s3=layer(s2) s4=layer(s3) s5=layer(s4) out spatial =Avgpool(s5); Where: S represents the input video frame image data, conv 7*7 represents a convolution layer with a convolution kernel of 7, Maxpool represents a maximum pooling layer, s1 represents the intermediate feature vector of the first spatial stream, s2 represents the intermediate feature vector of the second spatial stream, s3 represents the intermediate feature vector of the third spatial stream, s4 represents the intermediate feature vector of the fourth spatial stream, s5 represents the intermediate feature vector of the fifth spatial stream, layer represents a feature extraction layer, Avgpool represents average pooling, out spatial Represents the output result of the spatial stream network; The temporal feature extraction network includes: convolution layer, maximum pooling layer, feature extraction layer, attention unit layer, and average pooling layer; Temporal feature extraction network calculation formula: Where: T represents the input optical flow image data, conv 7*7 represents a convolutional layer with a convolution kernel of 7, t1 represents the intermediate feature vector of the first time stream, t2 represents the intermediate feature vector of the second time stream, t3 represents the intermediate feature vector of the third time stream, t4 represents the intermediate feature vector of the fourth time stream, t5 represents the intermediate feature vector of the fifth time stream, t6 represents the intermediate feature vector of the sixth time stream, t7 represents the intermediate feature vector of the seventh time stream, CBAM* represents the attention unit, Maxpool represents the maximum pooling layer, layer represents the feature extraction layer, Avgpool represents the average pooling layer, out temporal Represents the output result of the time stream network.
2. A vehicle behavior recognition method based on attention network according to claim 1, characterized in that: The feature extraction layer includes basic blocks.
3. A vehicle behavior recognition method based on attention network according to claim 2, characterized in that: The basic blocks include convolutional layers, batch normalization layers, and non-linear activation layers.
4. A vehicle behavior recognition method based on attention network according to claim 1, characterized in that: The attention unit includes: convolution layer, non-linear activation layer, average pooling layer, and maximum pooling layer.
5. A vehicle behavior recognition method based on attention network according to claim 4, characterized in that: The principle formula of the attention unit layer is as follows: MLP = conv(Relu(conv(X))) A c =σ(MLP(Avgpool(X))+(MLP(Maxpool(X))) A s =σ(conv([Avgpool(X'),Maxpool(X')])) Where: conv represents the convolutional layer, Relu is the nonlinear activation function, MLP represents the multi-layer perceptron unit, Avgpool represents the average pooling layer, Maxpool represents the maximum pooling layer, σ represents the Sigmoid function, X' represents the attention intermediate vector, A c represents the channel attention feature vector, A s represents the spatial attention feature vector, Indicates element-by-element multiplication calculation, Out cbam Represents the output features of the attention unit.
6. A vehicle behavior recognition method based on attention network according to claim 1, characterized in that: The spatiotemporal feature fusion network includes a concatenation operation layer and a logistic regression layer.
Citation Information
Patent Citations
Dynamic expression recognition method and system based on attention mechanism between space-time streams
CN112800894A