# Sports Deep Learning Method Based on Cognitive Human Behavior Recognition

Authors: Xiwei Liu
Journal: Computational Intelligence and Neuroscience
 (2022)

---

## Abstract

An in-depth learning-based approach is designed to develop the ability to recognize human behavior on the move. We introduce 3D residual structures and create 3D residual models. In order to get the most out of the data relationship of several consecutive frames, this study introduces 3D techniques for assigning different values to the existing frames. Experiments show that both structures improve recognition performance. For the 3D residual model, 3D attention model, and 3D attention residual model, this study proposes two model fusion strategies: average and weighted. Among them, the weighted fusion is to give a higher fusion proportion to the high accuracy model by using the model weight calculation method designed in this study. The experimental results show that the additive fusion strategy based on feature contribution has an obvious improvement effect on the test results of the two benchmark datasets, with an increase of more than 2% points, including an increase of 2.69% on HMDB51. The effect of splicing and fusion strategy has also increased by more than 1% point, including 1.34% on UCF101 dataset and about 1.9% on HMDB51. It is proven that deep learning can effectively recognize human behavior in sports.


---

## Body

## 1. Introduction

Vision has always been the most important and intuitive way for human beings to obtain external information. According to relevant statistics, 80% of human beings obtain information through vision [1]. With the rising quality of image sensors such as cameras and the falling price, image sensors have been deployed and applied on a large scale, resulting in a large amount of information every day. Simply relying on the eyes to obtain the required information can no longer meet people’s requirements for new information and knowledge. In addition, with the improvement of computer computing speed, the further enhancement of computing power, and the continuous development of image processing algorithms, computer vision technology came into being. Relying on computers or other embedded platforms, computer vision technology uses image processing, machine learning, and deep learning technologies to process images such as specific target detection and recognition, image cutting, and image understanding so as to realize automatic analysis and intelligent processing of visual information in images and extract the information we are interested in. In recent years, computer vision technology has been favored by more [2]. It is the most active and important direction at present. As a popular field of computer vision, video-based human behavior recognition aims to study and understand human behavior in the video, including individual behavior, the interaction between people, interaction between people and environment, and automatically recognize the behavior in video or picture sequence. Video-based human behavior has a wide application prospect in human-computer interaction, intelligent monitoring, video search, and behavior analysis.


### 1.1. Human-Computer Interaction

Implicit human-computer interaction system is the trend of human-computer interaction in the future. The computer captures the user’s behavior through sensors such as cameras, automatically analyzes the user’s intention, and further provides services for users without additional user participation. Now, gesture recognition has been preliminarily applied in TV and game console. Samsung, Hisense, Konka, and other TV manufacturers have launched TV products with gesture recognition, which can realize the basic functions of channel switching, selection confirmation, mobile zoom, and so on. In terms of game consoles, Xbox, a game console of Microsoft, is more famous [3]. Xbox realizes the functions of gesture recognition and action expression recognition through the external 3D somatosensory camera Kinect. Users can control the characters in the game only through body movements, which undoubtedly deepens the user’s sense of immersion. In the future, the direction of human-computer interaction must be simple, casual, and natural, and get rid of the complex interactive interface, and the basis of all this is to enable the machine to understand human behavior.


### 1.2. Intelligent Monitoring System

With the development of human social activities, the safety of the public is challenged, and the monitoring system becomes more and more important [4]. The traditional monitoring system relies on manpower to monitor people’s behavior in the video, which not only needs to spend a high labor cost but also cannot deal with the massive video. In order to overcome the limitation of human resources, intelligent monitoring technology came into being. Intelligent surveillance systems (ISSs) apply computer vision technology, pattern recognition, and artificial intelligence technology to automatically identify abnormal behaviors in the video, so as to provide early warning for emergencies or help deal with large-scale emergencies. For example, the intelligent monitoring system of stations and airports can automatically identify suspicious behaviors such as “deliberately detained goods” or “disturbing public security,” and warn of possible terrorist attacks in advance.


### 1.3. Video Content-Based Search

Due to the development of video compression, high-capacity digital storage, high-speed mobile Internet, and the wide application of digital cameras, a large number of videos are uploaded in the Internet every day, and video has increasingly become an important part of Internet content. Traditional video search is based on artificial labels or text descriptions, which not only requires high labor cost but also affects the accuracy due to certain subjective components. Content-based video search, which obtains Video Tags by intelligently analyzing the behavior content in video, is undoubtedly a simple and efficient search technology in the face of massive video [5].


### 1.4. Behavior Analysis

Behavior analysis is a technology of intelligent analysis of human behavior, which can be applied to sports training. Through intelligent analysis of athletes’ training videos, scientific and intuitive guidance can be given. In addition, it can also be used in gymnastics, diving, and other events with subjective judgment. Through multiangle analysis, the contestants’ actions are judged and scored, so as to assist the referee to make an objective and fair judgment. Behavior analysis can also give early warning of possible suicide, violence, or other bad behaviors by analyzing people’s recent behavior. In recent years, computer vision technology has achieved great development. Fingerprint recognition, face recognition, and other technologies have been relatively mature and have been applied on a large scale. However, at present, the application of behavior recognition is limited to gesture recognition and some simple limb recognition [6].


## 1.1. Human-Computer Interaction

Implicit human-computer interaction system is the trend of human-computer interaction in the future. The computer captures the user’s behavior through sensors such as cameras, automatically analyzes the user’s intention, and further provides services for users without additional user participation. Now, gesture recognition has been preliminarily applied in TV and game console. Samsung, Hisense, Konka, and other TV manufacturers have launched TV products with gesture recognition, which can realize the basic functions of channel switching, selection confirmation, mobile zoom, and so on. In terms of game consoles, Xbox, a game console of Microsoft, is more famous [3]. Xbox realizes the functions of gesture recognition and action expression recognition through the external 3D somatosensory camera Kinect. Users can control the characters in the game only through body movements, which undoubtedly deepens the user’s sense of immersion. In the future, the direction of human-computer interaction must be simple, casual, and natural, and get rid of the complex interactive interface, and the basis of all this is to enable the machine to understand human behavior.


## 1.2. Intelligent Monitoring System

With the development of human social activities, the safety of the public is challenged, and the monitoring system becomes more and more important [4]. The traditional monitoring system relies on manpower to monitor people’s behavior in the video, which not only needs to spend a high labor cost but also cannot deal with the massive video. In order to overcome the limitation of human resources, intelligent monitoring technology came into being. Intelligent surveillance systems (ISSs) apply computer vision technology, pattern recognition, and artificial intelligence technology to automatically identify abnormal behaviors in the video, so as to provide early warning for emergencies or help deal with large-scale emergencies. For example, the intelligent monitoring system of stations and airports can automatically identify suspicious behaviors such as “deliberately detained goods” or “disturbing public security,” and warn of possible terrorist attacks in advance.


## 1.3. Video Content-Based Search

Due to the development of video compression, high-capacity digital storage, high-speed mobile Internet, and the wide application of digital cameras, a large number of videos are uploaded in the Internet every day, and video has increasingly become an important part of Internet content. Traditional video search is based on artificial labels or text descriptions, which not only requires high labor cost but also affects the accuracy due to certain subjective components. Content-based video search, which obtains Video Tags by intelligently analyzing the behavior content in video, is undoubtedly a simple and efficient search technology in the face of massive video [5].


## 1.4. Behavior Analysis

Behavior analysis is a technology of intelligent analysis of human behavior, which can be applied to sports training. Through intelligent analysis of athletes’ training videos, scientific and intuitive guidance can be given. In addition, it can also be used in gymnastics, diving, and other events with subjective judgment. Through multiangle analysis, the contestants’ actions are judged and scored, so as to assist the referee to make an objective and fair judgment. Behavior analysis can also give early warning of possible suicide, violence, or other bad behaviors by analyzing people’s recent behavior. In recent years, computer vision technology has achieved great development. Fingerprint recognition, face recognition, and other technologies have been relatively mature and have been applied on a large scale. However, at present, the application of behavior recognition is limited to gesture recognition and some simple limb recognition [6].


## 2. Literature Review

In the field of human behavior recognition, various domestic scientific institutions have also carried out various activities on human behavior recognition and achieved some results in related fields. The Key Laboratory of Pattern Recognition in China applies human behavior recognition technology to the training of national diving team members and realizes the modeling and tracking of human behavior. It can be seen from the current situation that scholars at home and abroad have never stopped to explore the field of human behavior recognition for many years.After consulting the relevant common methods used to identify video human behavior, the core steps of the traditional behavior recognition process are summarized as shown in Figure1.Figure 1
Traditional human behavior recognition process.Among them, global feature extraction is carried out for the whole human body region of interest. Generally, human contour information, human silhouette information, or optical flow trajectory information are used for description. For example, Mekruksavanich and Jitpattanakul proposed using a star skeleton to extract human contour features [7] and Jia obtained 3D spatiotemporal volume (STV) to represent human behavior characteristics through the silhouette features of continuous video frames [8]; Gao et al. took the comprehensive features obtained by fusing 3D spatiotemporal volume and optical flow information as the global features of behavior. When extracting local features, only the points or blocks of interest in human behavior are extracted [9]. Referring to the method of extracting the local features of a single static image, Zheng et al. proposed to extend the 2D-Harris corner detection to 3D-Harris corner detection, and this kind of algorithm extends the 2D feature point detection to the similar work in the 3D feature point detection; another method to describe local features is the word bag method, which mainly uses the behavior feature word frequency histogram to describe the behavior feature. Behavior recognition refers to the use of behavior features to accurately distinguish different human behaviors from video scenes. Firstly, the behavior features are extracted from the given continuous frames, and then the obtained feature sequence is transformed into a set of static templates. Finally, the recognition results are obtained by matching the template of the test sample with the prestored “real” template [10]. Sun et al. proposed to save complete behavior information by using two templates: motion energy images (Mei) representing the occurrence of the behavior in some parts, and motion history images (MHI) representing the location and time sequence of behavior, and then, the Mahalanobis distance between the behavior to be predicted and the known behavior template for behavior matching is calculated, and finally, the recognition result is obtained [11]. Wang et al. used the optical flow feature of a video sequence to realize template matching, but the optical flow is easily affected by noise, so the effect of this method is limited [12]. Liu et al. used the word bag model to realize the task of recognizing human behavior, and both achieved the expected recognition results. This kind of method mainly describes the semantic characteristics of behavior based on behavior characteristics [13]. When the description is insufficient, the recognition results are often unsatisfactory. Huang and Zhang believe that in the temporal space-time coding map, if the arrangement order of bone joint points in each frame is different, different results will be obtained. For example, in picture recognition, if the positions of pixels are randomly disturbed, the recognition accuracy will be greatly reduced [14]. So, they designed a transformation module, which can learn the optimal arrangement of bone joint points in each frame. In addition to using the arrangement of original joint points as the feature vector of each frame, some methods use the geometric features between bone joint points as the frame-level feature vector of each frame. Liu et al. first selected key joint points in five parts of the limbs and trunk of the human skeleton and then calculated the geometric vectors between these key joint points. All geometric vectors are spliced together as frame-level feature vectors [15]. Wang et al. projected human bone points into three orthogonal planes and calculated the distance between each pair of joint points in XY, YZ, and XZ planes as the frame-level feature vector [16]. This method can effectively reduce the dependence of data on shooting angles. Amin et al. first selected four bone key points, and then calculated the geometric vector between all other bone joint points and the four key joint points in the cylindrical coordinate system as the frame-level feature vector [17].In order to improve human behavior recognition in sports, a method based on deep learning is proposed. This paper introduces the 3D residual structure and designs the 3D residual model. In order to better capture the correlation features between continuous multiframe data, this study introduces the 3D attention mechanism to capture this global correlation feature by assigning different attention values to adjacent frames. Experiments show that both structures improve the recognition performance. For the 3D residual model, 3D attention model, and 3D attention residual model, this paper proposes two model fusion strategies: average and weighted. Among them, the weighted fusion is to give a higher fusion proportion to the high accuracy model by using the model weight calculation method designed in this paper.


## 3. Recognition Algorithm Based on Depth

### 3.1. Foundation of Deep Learning

#### 3.1.1. Neuron and Perceptron Model

Due to the special memory and information processing mechanism of neurons, in 1943, psychologist MC CULLOCH and mathematician Pitts referred to the structure of biological neurons and abstracted the basic unit structure of the deep neural network: the neuron model. Its structure is shown in Figure2. It can be seen from the figure that a basic neuron model is composed of input, operation, and output.①
Input: refers to the original data input or the result from the output of the previous neuronx1,x2,…,xn②
Operation: it is the calculation module of neurons. It consists of two parts. First, apply the “multiplication and summation”Σ corresponding to the weight w1,w2,…,wn to the input x1,x2,…,xn, then “add bias” bj, and finally, add the “nonlinear” operation f (also known as the activation function) to the summation result. The specific calculation formula is(1)yj=∑i=1nwixi+bj.③
Output: that is, the output resultyj produced by the neuron can be used as the input of the next neuron.Figure 2
Structure diagram of the basic neuron model.Because the learning ability of a single neuron is limited, it is not widely used. So, Rosenblatt proposed the perceptron model based on the basic neuron model in 1958, which is composed of multiple neuron monomers. The specific structure is shown in Figure3. Although it can automatically adjust the weight parameters according to the error of training data, it is still a simple binary classification model, which cannot solve many nonlinear-related problems in reality [18].Figure 3
Structure diagram of the multilayer perceptron model.As can be seen from Figure3, a perceptron model is composed of input layer, hidden layer, and output layer, and the neurons between each layer are connected by full connection. Assuming that the number of neurons in the input layer is x1 and the number of neurons in the hidden layer is x2, there are x2x1 possible connection modes between the input layer and the hidden layer, as shown in the following equation.(2)Ci:i+1=xi+1xi,where xi represents the number of neurons in layer i, and Ci:i+1 represents the total number of connections from layer i to layer i + 1.


#### 3.1.2. Activation Function

The activation function is also called excitation function. Its emergence is mainly to introduce nonlinear operation to the neural network and enhance the expression ability of the model in complex environments and data. At present, sigmoid, tanh, and ReLU functions are commonly used in deep neural networks. ReLU function is one of the most used activation functions in CNN, and it is also used in the activation layer in this study..①
Sigmoid activation function is also called “S-shaped” curve. Its mathematical expression is shown in the following equation, and the function image is shown in Figure4.(3)fx=11+−e−x.As can be seen from Figure4, the sigmoid function can convert any value into the value in the [0, 1] interval, so that each output value of the neuron can be treated as an activation probability value, and the data are compressed to a certain extent. However, it can also be found from Figure 4 that there is a saturation region in the sigmoid function, that is, when the number is largely positive or negative, its gradient will become zero, thus inhibiting the update of neuron parameters; at the same time, the output of sigmoid is not zero means, which leads to the subsequent neurons taking the signal of nonzero means as the input, which affects the convergence speed of the model [19].②
Tanh function is also called “tangent function.” Its mathematical expression is shown in the following equation, and the function image is shown in Figure5.(4)fx=ex−e−xex+e−x.As can be seen from Figure5, the tanh function is similar to sigmoid function. Although it satisfies the characteristics of zero means and is symmetrical about the origin, it still does not solve the problem of the disappearance of the gradient in the positive infinite or negative infinite region, and there is also the problem of time-consuming power operation.③
ReLU function, also known as “modified linear unit,” whose mathematical expression is shown in equation (5), and the function image is shown in Figure 6.(5)fx=max0,x.Figure 4
Schematic diagram of the sigmoid function.Figure 5
Schematic diagram of the tanh function.Figure 6
Schematic diagram of the ReLu function.It is found in Figure6 that the ReLU function directly outputs positive numbers as is and sets negative numbers to 0. Therefore, compared with tanh and sigmoid, its convergence speed is faster, and the gradient will not disappear in the positive interval. However, it can also be seen from the figure that when ReLU function is x < 0, the gradient is directly 0, that is, the gradient disappears. In order to solve the problem of the disappearance of the negative interval gradient, a modified bias can be added to the representation of ReLU function in the negative interval, so as to avoid this problem [20].


#### 3.1.3. Loss Function

The loss function is used to estimate the difference between the predicted valuey^ and the real value y of the model (J represents loss). The smaller the value of the loss function, the better the robustness of the model. Common loss functions include mean absolute error (MAE) loss function, mean square error (MSE) loss function, hinge loss function, and cross-entropy (CE) loss function. CE is the most commonly used loss function in CNN and also the loss measurement function used in this paper.①
Mae loss function, also known asL1 loss function, takes the absolute error between the predicted value and the real value as the distance. The mathematical expression is shown in the following equation.(6)JMAE=1N∑i=1Nyi−y^i.②
MSE loss function, also known asL2 loss function or Euclidean distance, takes the sum of squares of errors as the distance. It is the most commonly used loss function in regression tasks, and the basic form is shown in the following equation.(7)JMAE=1N∑i=1Nyi−y^i2.The difference between Mae and MSE is mainly reflected in two aspects. (1) MSE can converge faster than Mae: by deriving equations (6) and (7) , it can be found that when the gradient decreases, the gradient of MSE loss is −y^i, while the gradient of MAE loss is ±1. Therefore, the gradient of MSE will change with the error, while the gradient of MAE remains at 1, which is not conducive to the training of the model. (2) Mae has better robustness, which is mainly reflected in the processing of outliers. This is because MSE adopts squared operation for errors, resulting in excessive errors of outliers.③
Hinge loss function is a two-classification loss function, which is suitable for the classification of maximum margin, so it is often used in the SVM model. The calculation of Hinge loss is shown in the following equation.(8)JHinge=∑i=1Nmax0,1−yiy^i.Wherey^i∈−1,1 , the value of yi is ±1, indicating the positive and negative samples in the two categories.④
CE loss function is one of the most used loss functions in CNN classification tasks. According to the requirements of classification tasks, it can be divided into two categories and multiple categories, which are collectively referred to as CE loss function. The difference in information between them can be expressed by cross-entropy, as shown in the following equation.(9)Hp,q=∑pxlog1qx=−∑pxlogqx.In the binary classification problem, the sigmoid function (equations (2) and (3)) is often used to process the output of CNN, map it to the probability value between [0, 1], and then calculate its loss. Therefore, this loss function is also called sigmoid loss, as shown in equation.(10)JCE=Jsigmoid=−∑i=1Nyilogy^i+1−yilog1−y^i.Multiclassification is an extension of two classification tasks. Different from the two classifications, its true valuey is a one hot vector. At the same time, the output mapping of CNN model is changed from the original sigmoid function to Softmax function (see equation (11)). Softmax function maps the output of each dimension to the probability value between [0, 1], ensures that the sum of the output of all dimensions is 1, and then calculates its CE loss. Combine equations (9) and (11) to obtain the Softmax loss function, as shown in equation (12).(11)Sxi=exi∑j=1Nexi.(12)LCE=Lsoftmax=−1N∑i=1Nlogehi∑j=1Cehi.


### 3.2. Deep Neural Network

The convolution neural network (CNN) is a kind of the deep neural network, which is generally composed of one or more convolution layers, pooling layers, and full connection layers. The corresponding model generally includes an input layer and output layer [21].


#### 3.2.1. Input Layer

In the task of human behavior recognition based on the video, it generally refers to the input of single or multiple continuous picture data or the feature matrix of the middle layer.


#### 3.2.2. Convolution Layer

The convolution layer is an important part of the CNN structure. It is used for feature extraction. It has two characteristics: local perception and parameter sharing. Local sensing means that the input image block uses a convolution kernel with a specified size for feature extraction.The convolution operation is the core of the convolution layer. According to the number of convolution cores, it can be divided into single-channel convolution and multichannel convolution. Among them, single-channel convolution refers to the use of a single convolution kernel for feature extraction to obtain a single feature matrix; multichannel convolution uses multiple convolution check input matrices to extract features to obtain a multidimensional output feature matrix, and the number of feature matrices generated is equal to the number of convolution cores. Multichannel convolution is commonly used for feature extraction.


#### 3.2.3. Pool Layer

The role of the pool layer mainly includes three aspects.Reduce the dimension of data and reduce redundant information; it can improve the scale invariance and rotation invariance of the model and prevent overfitting of the model. Common pooling operations include maximum pooling and average pooling.Maximum pooling refers to taking the maximum value of the feature points in the neighborhood window and retaining more texture information. The specific calculation formula is shown in the following equation.(13)C^ji=maxxj:j+wi:i+h.The specific calculation formula is shown in the following formula.(14)C¯ji=meanxj:j+wi:i+h,where x∈Rt×k is the input characteristic matrix, parameters h and W, respectively, represent the size of the pooling window, and xj:j+wi:i+h represents the submatrix in the corresponding window of the input matrix.


#### 3.2.4. Full Connection Layer

The full connection layer mainly converts the characteristic matrix output by the convolution layer or pool layer into a 1D characteristic vector and then transmits it to the output layer. Its essence is equivalent to a linear spatial transformation of the characteristic graph. Assuming that the input characteristic matrix received by the full connection layer isX∈Rm and the output result after conversion is Y∈Rn, the conversion formula is shown in the following formula.(15)Y=fWfX+bf,where Wf∈Rm×n is the weight, bf∈Rn is the offset, and f is the activation function.


#### 3.2.5. Output Layer

Receive the 1D feature vector output by full connection, and then use Softmax classifier to complete the mapping from eigenvalue to probability. If the category of the classification task isK, Softmax maps the input Y∈Rn to K (0, 1) real numbers and ensures that their sum is 1, as shown in equation (17). Assuming that the output is P∈Rk, the mapping expression is shown in the following equation.(16)P=SoftmaxWsY+bs.(17)∑i=1kPi=1,where Ws∈Rn×k is the weight and bs∈Rk is the offset.


### 3.3. On Human Behavior Recognition Based on 3D Attention Mechanism

In video-based human behavior recognition, because the processed input is generally a sequence of images with multiple consecutive frames, compared with the input recognition of a single picture, there may be a certain relationship between multiple consecutive frames in addition to the characteristics of the behavior itself.For the calculation of similarity, the embedded Gaussian function is adopted in this paper, which is a simple extension based on the ordinary Gaussian function. Equation (18) is the definition of ordinary Gaussian function and equation (19) is the definition of embedded Gaussian function.(18)Gxi,xj=exiTxj.(19)Gendxi,xj=eθxiTϕxj,where i represents the output position, j represents all possible positions associated with i, x represents the received input, and xiTxj represents the point multiplication operation, which is used to calculate the similarity between the corresponding positions xi and xj, θxi=Wθxi,ϕxj=Wϕxj;


### 3.4. On Human Behavior Recognition Based on 3D Residual and Attention Mechanism Fusion

#### 3.4.1. AR3D_V1

The deep feature extraction module of AR3D_ V1 model uses the fusion strategy 1 to fuse the 3D attention mechanism at the identity transformation connection of 3D residual structure, so as to achieve the effect of fusion of residual features and attention features. The corresponding specific structure is shown in Figure7.Figure 7
Structural diagram of AR3D_ V1 deep feature extraction module.As can be seen from Figure7, the AR3D_ V1 deep feature extraction structure is divided into two branches: the volume integral branch, like the 3D residual structure, extracts the deep features by alternating convolution operation and normalization operation; and the identity connection operation changes from the way of directly adding the input to the result of the convolution output to the way of first obtaining the feature X′ assigned with the attention mechanism through a 3D attention module, and then adding X′ to the result of the convolution output. Therefore, this structure can also be called a kind of 3D residual structure [22].Assuming that the input received by the module isx, it successively extracts the features through two branches, then adds the features, and finally, obtains the final result y through ReLu function, as given in the following equations.(20)x′=Ax.(21)y=f2f1wconvx+bconv+x′,where A represents the attention feature extraction operation, wconv∈Rx×y×z is the convolution kernel parameter, bconv∈R is the offset value, f1 and f2 are the ReLu activation function, and the subscript represents different positions.


#### 3.4.2. AR3D_V2

The corresponding deep feature extraction module of the AR3D_V2 model is fused by strategy 2. The specific structure is shown in Figure8.Figure 8
Structural diagram of AR3D_V2 deep feature extraction module.Through Figure8, it is found that AR3D_V2 deep feature extraction structure adopts the strategy of parallel fusion, that is, after the 3D attention module directly acts on the 3D residual structure, the deep features obtained by the 3D residual structure are extracted. Compared with the structure corresponding to AR3D_1 model, the deep feature extraction module of AR3D_V2 does not change the identity transformation connection operation of the residual structure, but makes them exist in a sequential way and extracts the deep behavior features.It is assumed that the input feature map received by the module isx (this paper is the output of the 3D shallow feature extraction module), and then the corresponding residual feature xres is output through the 3D residual module, as shown in equation (22). Then, through the 3D attention mechanism module, the attention mechanism is allocated to xres to obtain the final output feature y, as shown in equation (23).(22)xres=fwresx+bres,where wres∈Rx×y×z represents the convolution kernel parameter in the 3D residual module, bres∈R is the corresponding offset value, and f is the corresponding activation function (ReLu function in this study).(23)y=Axres,where A represents the attention feature extraction operation, and the attention module only assigns attention weight to all features in the xres feature map without changing the dimension of the feature or other information. This is mainly determined by the nature of the 3D attention module itself. Therefore, the module can also be embedded into 3DCNN with any structure.


## 3.1. Foundation of Deep Learning

### 3.1.1. Neuron and Perceptron Model

Due to the special memory and information processing mechanism of neurons, in 1943, psychologist MC CULLOCH and mathematician Pitts referred to the structure of biological neurons and abstracted the basic unit structure of the deep neural network: the neuron model. Its structure is shown in Figure2. It can be seen from the figure that a basic neuron model is composed of input, operation, and output.①
Input: refers to the original data input or the result from the output of the previous neuronx1,x2,…,xn②
Operation: it is the calculation module of neurons. It consists of two parts. First, apply the “multiplication and summation”Σ corresponding to the weight w1,w2,…,wn to the input x1,x2,…,xn, then “add bias” bj, and finally, add the “nonlinear” operation f (also known as the activation function) to the summation result. The specific calculation formula is(1)yj=∑i=1nwixi+bj.③
Output: that is, the output resultyj produced by the neuron can be used as the input of the next neuron.Figure 2
Structure diagram of the basic neuron model.Because the learning ability of a single neuron is limited, it is not widely used. So, Rosenblatt proposed the perceptron model based on the basic neuron model in 1958, which is composed of multiple neuron monomers. The specific structure is shown in Figure3. Although it can automatically adjust the weight parameters according to the error of training data, it is still a simple binary classification model, which cannot solve many nonlinear-related problems in reality [18].Figure 3
Structure diagram of the multilayer perceptron model.As can be seen from Figure3, a perceptron model is composed of input layer, hidden layer, and output layer, and the neurons between each layer are connected by full connection. Assuming that the number of neurons in the input layer is x1 and the number of neurons in the hidden layer is x2, there are x2x1 possible connection modes between the input layer and the hidden layer, as shown in the following equation.(2)Ci:i+1=xi+1xi,where xi represents the number of neurons in layer i, and Ci:i+1 represents the total number of connections from layer i to layer i + 1.


### 3.1.2. Activation Function

The activation function is also called excitation function. Its emergence is mainly to introduce nonlinear operation to the neural network and enhance the expression ability of the model in complex environments and data. At present, sigmoid, tanh, and ReLU functions are commonly used in deep neural networks. ReLU function is one of the most used activation functions in CNN, and it is also used in the activation layer in this study..①
Sigmoid activation function is also called “S-shaped” curve. Its mathematical expression is shown in the following equation, and the function image is shown in Figure4.(3)fx=11+−e−x.As can be seen from Figure4, the sigmoid function can convert any value into the value in the [0, 1] interval, so that each output value of the neuron can be treated as an activation probability value, and the data are compressed to a certain extent. However, it can also be found from Figure 4 that there is a saturation region in the sigmoid function, that is, when the number is largely positive or negative, its gradient will become zero, thus inhibiting the update of neuron parameters; at the same time, the output of sigmoid is not zero means, which leads to the subsequent neurons taking the signal of nonzero means as the input, which affects the convergence speed of the model [19].②
Tanh function is also called “tangent function.” Its mathematical expression is shown in the following equation, and the function image is shown in Figure5.(4)fx=ex−e−xex+e−x.As can be seen from Figure5, the tanh function is similar to sigmoid function. Although it satisfies the characteristics of zero means and is symmetrical about the origin, it still does not solve the problem of the disappearance of the gradient in the positive infinite or negative infinite region, and there is also the problem of time-consuming power operation.③
ReLU function, also known as “modified linear unit,” whose mathematical expression is shown in equation (5), and the function image is shown in Figure 6.(5)fx=max0,x.Figure 4
Schematic diagram of the sigmoid function.Figure 5
Schematic diagram of the tanh function.Figure 6
Schematic diagram of the ReLu function.It is found in Figure6 that the ReLU function directly outputs positive numbers as is and sets negative numbers to 0. Therefore, compared with tanh and sigmoid, its convergence speed is faster, and the gradient will not disappear in the positive interval. However, it can also be seen from the figure that when ReLU function is x < 0, the gradient is directly 0, that is, the gradient disappears. In order to solve the problem of the disappearance of the negative interval gradient, a modified bias can be added to the representation of ReLU function in the negative interval, so as to avoid this problem [20].


### 3.1.3. Loss Function

The loss function is used to estimate the difference between the predicted valuey^ and the real value y of the model (J represents loss). The smaller the value of the loss function, the better the robustness of the model. Common loss functions include mean absolute error (MAE) loss function, mean square error (MSE) loss function, hinge loss function, and cross-entropy (CE) loss function. CE is the most commonly used loss function in CNN and also the loss measurement function used in this paper.①
Mae loss function, also known asL1 loss function, takes the absolute error between the predicted value and the real value as the distance. The mathematical expression is shown in the following equation.(6)JMAE=1N∑i=1Nyi−y^i.②
MSE loss function, also known asL2 loss function or Euclidean distance, takes the sum of squares of errors as the distance. It is the most commonly used loss function in regression tasks, and the basic form is shown in the following equation.(7)JMAE=1N∑i=1Nyi−y^i2.The difference between Mae and MSE is mainly reflected in two aspects. (1) MSE can converge faster than Mae: by deriving equations (6) and (7) , it can be found that when the gradient decreases, the gradient of MSE loss is −y^i, while the gradient of MAE loss is ±1. Therefore, the gradient of MSE will change with the error, while the gradient of MAE remains at 1, which is not conducive to the training of the model. (2) Mae has better robustness, which is mainly reflected in the processing of outliers. This is because MSE adopts squared operation for errors, resulting in excessive errors of outliers.③
Hinge loss function is a two-classification loss function, which is suitable for the classification of maximum margin, so it is often used in the SVM model. The calculation of Hinge loss is shown in the following equation.(8)JHinge=∑i=1Nmax0,1−yiy^i.Wherey^i∈−1,1 , the value of yi is ±1, indicating the positive and negative samples in the two categories.④
CE loss function is one of the most used loss functions in CNN classification tasks. According to the requirements of classification tasks, it can be divided into two categories and multiple categories, which are collectively referred to as CE loss function. The difference in information between them can be expressed by cross-entropy, as shown in the following equation.(9)Hp,q=∑pxlog1qx=−∑pxlogqx.In the binary classification problem, the sigmoid function (equations (2) and (3)) is often used to process the output of CNN, map it to the probability value between [0, 1], and then calculate its loss. Therefore, this loss function is also called sigmoid loss, as shown in equation.(10)JCE=Jsigmoid=−∑i=1Nyilogy^i+1−yilog1−y^i.Multiclassification is an extension of two classification tasks. Different from the two classifications, its true valuey is a one hot vector. At the same time, the output mapping of CNN model is changed from the original sigmoid function to Softmax function (see equation (11)). Softmax function maps the output of each dimension to the probability value between [0, 1], ensures that the sum of the output of all dimensions is 1, and then calculates its CE loss. Combine equations (9) and (11) to obtain the Softmax loss function, as shown in equation (12).(11)Sxi=exi∑j=1Nexi.(12)LCE=Lsoftmax=−1N∑i=1Nlogehi∑j=1Cehi.


## 3.1.1. Neuron and Perceptron Model

Due to the special memory and information processing mechanism of neurons, in 1943, psychologist MC CULLOCH and mathematician Pitts referred to the structure of biological neurons and abstracted the basic unit structure of the deep neural network: the neuron model. Its structure is shown in Figure2. It can be seen from the figure that a basic neuron model is composed of input, operation, and output.①
Input: refers to the original data input or the result from the output of the previous neuronx1,x2,…,xn②
Operation: it is the calculation module of neurons. It consists of two parts. First, apply the “multiplication and summation”Σ corresponding to the weight w1,w2,…,wn to the input x1,x2,…,xn, then “add bias” bj, and finally, add the “nonlinear” operation f (also known as the activation function) to the summation result. The specific calculation formula is(1)yj=∑i=1nwixi+bj.③
Output: that is, the output resultyj produced by the neuron can be used as the input of the next neuron.Figure 2
Structure diagram of the basic neuron model.Because the learning ability of a single neuron is limited, it is not widely used. So, Rosenblatt proposed the perceptron model based on the basic neuron model in 1958, which is composed of multiple neuron monomers. The specific structure is shown in Figure3. Although it can automatically adjust the weight parameters according to the error of training data, it is still a simple binary classification model, which cannot solve many nonlinear-related problems in reality [18].Figure 3
Structure diagram of the multilayer perceptron model.As can be seen from Figure3, a perceptron model is composed of input layer, hidden layer, and output layer, and the neurons between each layer are connected by full connection. Assuming that the number of neurons in the input layer is x1 and the number of neurons in the hidden layer is x2, there are x2x1 possible connection modes between the input layer and the hidden layer, as shown in the following equation.(2)Ci:i+1=xi+1xi,where xi represents the number of neurons in layer i, and Ci:i+1 represents the total number of connections from layer i to layer i + 1.


## 3.1.2. Activation Function

The activation function is also called excitation function. Its emergence is mainly to introduce nonlinear operation to the neural network and enhance the expression ability of the model in complex environments and data. At present, sigmoid, tanh, and ReLU functions are commonly used in deep neural networks. ReLU function is one of the most used activation functions in CNN, and it is also used in the activation layer in this study..①
Sigmoid activation function is also called “S-shaped” curve. Its mathematical expression is shown in the following equation, and the function image is shown in Figure4.(3)fx=11+−e−x.As can be seen from Figure4, the sigmoid function can convert any value into the value in the [0, 1] interval, so that each output value of the neuron can be treated as an activation probability value, and the data are compressed to a certain extent. However, it can also be found from Figure 4 that there is a saturation region in the sigmoid function, that is, when the number is largely positive or negative, its gradient will become zero, thus inhibiting the update of neuron parameters; at the same time, the output of sigmoid is not zero means, which leads to the subsequent neurons taking the signal of nonzero means as the input, which affects the convergence speed of the model [19].②
Tanh function is also called “tangent function.” Its mathematical expression is shown in the following equation, and the function image is shown in Figure5.(4)fx=ex−e−xex+e−x.As can be seen from Figure5, the tanh function is similar to sigmoid function. Although it satisfies the characteristics of zero means and is symmetrical about the origin, it still does not solve the problem of the disappearance of the gradient in the positive infinite or negative infinite region, and there is also the problem of time-consuming power operation.③
ReLU function, also known as “modified linear unit,” whose mathematical expression is shown in equation (5), and the function image is shown in Figure 6.(5)fx=max0,x.Figure 4
Schematic diagram of the sigmoid function.Figure 5
Schematic diagram of the tanh function.Figure 6
Schematic diagram of the ReLu function.It is found in Figure6 that the ReLU function directly outputs positive numbers as is and sets negative numbers to 0. Therefore, compared with tanh and sigmoid, its convergence speed is faster, and the gradient will not disappear in the positive interval. However, it can also be seen from the figure that when ReLU function is x < 0, the gradient is directly 0, that is, the gradient disappears. In order to solve the problem of the disappearance of the negative interval gradient, a modified bias can be added to the representation of ReLU function in the negative interval, so as to avoid this problem [20].


## 3.1.3. Loss Function

The loss function is used to estimate the difference between the predicted valuey^ and the real value y of the model (J represents loss). The smaller the value of the loss function, the better the robustness of the model. Common loss functions include mean absolute error (MAE) loss function, mean square error (MSE) loss function, hinge loss function, and cross-entropy (CE) loss function. CE is the most commonly used loss function in CNN and also the loss measurement function used in this paper.①
Mae loss function, also known asL1 loss function, takes the absolute error between the predicted value and the real value as the distance. The mathematical expression is shown in the following equation.(6)JMAE=1N∑i=1Nyi−y^i.②
MSE loss function, also known asL2 loss function or Euclidean distance, takes the sum of squares of errors as the distance. It is the most commonly used loss function in regression tasks, and the basic form is shown in the following equation.(7)JMAE=1N∑i=1Nyi−y^i2.The difference between Mae and MSE is mainly reflected in two aspects. (1) MSE can converge faster than Mae: by deriving equations (6) and (7) , it can be found that when the gradient decreases, the gradient of MSE loss is −y^i, while the gradient of MAE loss is ±1. Therefore, the gradient of MSE will change with the error, while the gradient of MAE remains at 1, which is not conducive to the training of the model. (2) Mae has better robustness, which is mainly reflected in the processing of outliers. This is because MSE adopts squared operation for errors, resulting in excessive errors of outliers.③
Hinge loss function is a two-classification loss function, which is suitable for the classification of maximum margin, so it is often used in the SVM model. The calculation of Hinge loss is shown in the following equation.(8)JHinge=∑i=1Nmax0,1−yiy^i.Wherey^i∈−1,1 , the value of yi is ±1, indicating the positive and negative samples in the two categories.④
CE loss function is one of the most used loss functions in CNN classification tasks. According to the requirements of classification tasks, it can be divided into two categories and multiple categories, which are collectively referred to as CE loss function. The difference in information between them can be expressed by cross-entropy, as shown in the following equation.(9)Hp,q=∑pxlog1qx=−∑pxlogqx.In the binary classification problem, the sigmoid function (equations (2) and (3)) is often used to process the output of CNN, map it to the probability value between [0, 1], and then calculate its loss. Therefore, this loss function is also called sigmoid loss, as shown in equation.(10)JCE=Jsigmoid=−∑i=1Nyilogy^i+1−yilog1−y^i.Multiclassification is an extension of two classification tasks. Different from the two classifications, its true valuey is a one hot vector. At the same time, the output mapping of CNN model is changed from the original sigmoid function to Softmax function (see equation (11)). Softmax function maps the output of each dimension to the probability value between [0, 1], ensures that the sum of the output of all dimensions is 1, and then calculates its CE loss. Combine equations (9) and (11) to obtain the Softmax loss function, as shown in equation (12).(11)Sxi=exi∑j=1Nexi.(12)LCE=Lsoftmax=−1N∑i=1Nlogehi∑j=1Cehi.


## 3.2. Deep Neural Network

The convolution neural network (CNN) is a kind of the deep neural network, which is generally composed of one or more convolution layers, pooling layers, and full connection layers. The corresponding model generally includes an input layer and output layer [21].


### 3.2.1. Input Layer

In the task of human behavior recognition based on the video, it generally refers to the input of single or multiple continuous picture data or the feature matrix of the middle layer.


### 3.2.2. Convolution Layer

The convolution layer is an important part of the CNN structure. It is used for feature extraction. It has two characteristics: local perception and parameter sharing. Local sensing means that the input image block uses a convolution kernel with a specified size for feature extraction.The convolution operation is the core of the convolution layer. According to the number of convolution cores, it can be divided into single-channel convolution and multichannel convolution. Among them, single-channel convolution refers to the use of a single convolution kernel for feature extraction to obtain a single feature matrix; multichannel convolution uses multiple convolution check input matrices to extract features to obtain a multidimensional output feature matrix, and the number of feature matrices generated is equal to the number of convolution cores. Multichannel convolution is commonly used for feature extraction.


### 3.2.3. Pool Layer

The role of the pool layer mainly includes three aspects.Reduce the dimension of data and reduce redundant information; it can improve the scale invariance and rotation invariance of the model and prevent overfitting of the model. Common pooling operations include maximum pooling and average pooling.Maximum pooling refers to taking the maximum value of the feature points in the neighborhood window and retaining more texture information. The specific calculation formula is shown in the following equation.(13)C^ji=maxxj:j+wi:i+h.The specific calculation formula is shown in the following formula.(14)C¯ji=meanxj:j+wi:i+h,where x∈Rt×k is the input characteristic matrix, parameters h and W, respectively, represent the size of the pooling window, and xj:j+wi:i+h represents the submatrix in the corresponding window of the input matrix.


### 3.2.4. Full Connection Layer

The full connection layer mainly converts the characteristic matrix output by the convolution layer or pool layer into a 1D characteristic vector and then transmits it to the output layer. Its essence is equivalent to a linear spatial transformation of the characteristic graph. Assuming that the input characteristic matrix received by the full connection layer isX∈Rm and the output result after conversion is Y∈Rn, the conversion formula is shown in the following formula.(15)Y=fWfX+bf,where Wf∈Rm×n is the weight, bf∈Rn is the offset, and f is the activation function.


### 3.2.5. Output Layer

Receive the 1D feature vector output by full connection, and then use Softmax classifier to complete the mapping from eigenvalue to probability. If the category of the classification task isK, Softmax maps the input Y∈Rn to K (0, 1) real numbers and ensures that their sum is 1, as shown in equation (17). Assuming that the output is P∈Rk, the mapping expression is shown in the following equation.(16)P=SoftmaxWsY+bs.(17)∑i=1kPi=1,where Ws∈Rn×k is the weight and bs∈Rk is the offset.


## 3.2.1. Input Layer

In the task of human behavior recognition based on the video, it generally refers to the input of single or multiple continuous picture data or the feature matrix of the middle layer.


## 3.2.2. Convolution Layer

The convolution layer is an important part of the CNN structure. It is used for feature extraction. It has two characteristics: local perception and parameter sharing. Local sensing means that the input image block uses a convolution kernel with a specified size for feature extraction.The convolution operation is the core of the convolution layer. According to the number of convolution cores, it can be divided into single-channel convolution and multichannel convolution. Among them, single-channel convolution refers to the use of a single convolution kernel for feature extraction to obtain a single feature matrix; multichannel convolution uses multiple convolution check input matrices to extract features to obtain a multidimensional output feature matrix, and the number of feature matrices generated is equal to the number of convolution cores. Multichannel convolution is commonly used for feature extraction.


## 3.2.3. Pool Layer

The role of the pool layer mainly includes three aspects.Reduce the dimension of data and reduce redundant information; it can improve the scale invariance and rotation invariance of the model and prevent overfitting of the model. Common pooling operations include maximum pooling and average pooling.Maximum pooling refers to taking the maximum value of the feature points in the neighborhood window and retaining more texture information. The specific calculation formula is shown in the following equation.(13)C^ji=maxxj:j+wi:i+h.The specific calculation formula is shown in the following formula.(14)C¯ji=meanxj:j+wi:i+h,where x∈Rt×k is the input characteristic matrix, parameters h and W, respectively, represent the size of the pooling window, and xj:j+wi:i+h represents the submatrix in the corresponding window of the input matrix.


## 3.2.4. Full Connection Layer

The full connection layer mainly converts the characteristic matrix output by the convolution layer or pool layer into a 1D characteristic vector and then transmits it to the output layer. Its essence is equivalent to a linear spatial transformation of the characteristic graph. Assuming that the input characteristic matrix received by the full connection layer isX∈Rm and the output result after conversion is Y∈Rn, the conversion formula is shown in the following formula.(15)Y=fWfX+bf,where Wf∈Rm×n is the weight, bf∈Rn is the offset, and f is the activation function.


## 3.2.5. Output Layer

Receive the 1D feature vector output by full connection, and then use Softmax classifier to complete the mapping from eigenvalue to probability. If the category of the classification task isK, Softmax maps the input Y∈Rn to K (0, 1) real numbers and ensures that their sum is 1, as shown in equation (17). Assuming that the output is P∈Rk, the mapping expression is shown in the following equation.(16)P=SoftmaxWsY+bs.(17)∑i=1kPi=1,where Ws∈Rn×k is the weight and bs∈Rk is the offset.


## 3.3. On Human Behavior Recognition Based on 3D Attention Mechanism

In video-based human behavior recognition, because the processed input is generally a sequence of images with multiple consecutive frames, compared with the input recognition of a single picture, there may be a certain relationship between multiple consecutive frames in addition to the characteristics of the behavior itself.For the calculation of similarity, the embedded Gaussian function is adopted in this paper, which is a simple extension based on the ordinary Gaussian function. Equation (18) is the definition of ordinary Gaussian function and equation (19) is the definition of embedded Gaussian function.(18)Gxi,xj=exiTxj.(19)Gendxi,xj=eθxiTϕxj,where i represents the output position, j represents all possible positions associated with i, x represents the received input, and xiTxj represents the point multiplication operation, which is used to calculate the similarity between the corresponding positions xi and xj, θxi=Wθxi,ϕxj=Wϕxj;


## 3.4. On Human Behavior Recognition Based on 3D Residual and Attention Mechanism Fusion

### 3.4.1. AR3D_V1

The deep feature extraction module of AR3D_ V1 model uses the fusion strategy 1 to fuse the 3D attention mechanism at the identity transformation connection of 3D residual structure, so as to achieve the effect of fusion of residual features and attention features. The corresponding specific structure is shown in Figure7.Figure 7
Structural diagram of AR3D_ V1 deep feature extraction module.As can be seen from Figure7, the AR3D_ V1 deep feature extraction structure is divided into two branches: the volume integral branch, like the 3D residual structure, extracts the deep features by alternating convolution operation and normalization operation; and the identity connection operation changes from the way of directly adding the input to the result of the convolution output to the way of first obtaining the feature X′ assigned with the attention mechanism through a 3D attention module, and then adding X′ to the result of the convolution output. Therefore, this structure can also be called a kind of 3D residual structure [22].Assuming that the input received by the module isx, it successively extracts the features through two branches, then adds the features, and finally, obtains the final result y through ReLu function, as given in the following equations.(20)x′=Ax.(21)y=f2f1wconvx+bconv+x′,where A represents the attention feature extraction operation, wconv∈Rx×y×z is the convolution kernel parameter, bconv∈R is the offset value, f1 and f2 are the ReLu activation function, and the subscript represents different positions.


### 3.4.2. AR3D_V2

The corresponding deep feature extraction module of the AR3D_V2 model is fused by strategy 2. The specific structure is shown in Figure8.Figure 8
Structural diagram of AR3D_V2 deep feature extraction module.Through Figure8, it is found that AR3D_V2 deep feature extraction structure adopts the strategy of parallel fusion, that is, after the 3D attention module directly acts on the 3D residual structure, the deep features obtained by the 3D residual structure are extracted. Compared with the structure corresponding to AR3D_1 model, the deep feature extraction module of AR3D_V2 does not change the identity transformation connection operation of the residual structure, but makes them exist in a sequential way and extracts the deep behavior features.It is assumed that the input feature map received by the module isx (this paper is the output of the 3D shallow feature extraction module), and then the corresponding residual feature xres is output through the 3D residual module, as shown in equation (22). Then, through the 3D attention mechanism module, the attention mechanism is allocated to xres to obtain the final output feature y, as shown in equation (23).(22)xres=fwresx+bres,where wres∈Rx×y×z represents the convolution kernel parameter in the 3D residual module, bres∈R is the corresponding offset value, and f is the corresponding activation function (ReLu function in this study).(23)y=Axres,where A represents the attention feature extraction operation, and the attention module only assigns attention weight to all features in the xres feature map without changing the dimension of the feature or other information. This is mainly determined by the nature of the 3D attention module itself. Therefore, the module can also be embedded into 3DCNN with any structure.


## 3.4.1. AR3D_V1

The deep feature extraction module of AR3D_ V1 model uses the fusion strategy 1 to fuse the 3D attention mechanism at the identity transformation connection of 3D residual structure, so as to achieve the effect of fusion of residual features and attention features. The corresponding specific structure is shown in Figure7.Figure 7
Structural diagram of AR3D_ V1 deep feature extraction module.As can be seen from Figure7, the AR3D_ V1 deep feature extraction structure is divided into two branches: the volume integral branch, like the 3D residual structure, extracts the deep features by alternating convolution operation and normalization operation; and the identity connection operation changes from the way of directly adding the input to the result of the convolution output to the way of first obtaining the feature X′ assigned with the attention mechanism through a 3D attention module, and then adding X′ to the result of the convolution output. Therefore, this structure can also be called a kind of 3D residual structure [22].Assuming that the input received by the module isx, it successively extracts the features through two branches, then adds the features, and finally, obtains the final result y through ReLu function, as given in the following equations.(20)x′=Ax.(21)y=f2f1wconvx+bconv+x′,where A represents the attention feature extraction operation, wconv∈Rx×y×z is the convolution kernel parameter, bconv∈R is the offset value, f1 and f2 are the ReLu activation function, and the subscript represents different positions.


## 3.4.2. AR3D_V2

The corresponding deep feature extraction module of the AR3D_V2 model is fused by strategy 2. The specific structure is shown in Figure8.Figure 8
Structural diagram of AR3D_V2 deep feature extraction module.Through Figure8, it is found that AR3D_V2 deep feature extraction structure adopts the strategy of parallel fusion, that is, after the 3D attention module directly acts on the 3D residual structure, the deep features obtained by the 3D residual structure are extracted. Compared with the structure corresponding to AR3D_1 model, the deep feature extraction module of AR3D_V2 does not change the identity transformation connection operation of the residual structure, but makes them exist in a sequential way and extracts the deep behavior features.It is assumed that the input feature map received by the module isx (this paper is the output of the 3D shallow feature extraction module), and then the corresponding residual feature xres is output through the 3D residual module, as shown in equation (22). Then, through the 3D attention mechanism module, the attention mechanism is allocated to xres to obtain the final output feature y, as shown in equation (23).(22)xres=fwresx+bres,where wres∈Rx×y×z represents the convolution kernel parameter in the 3D residual module, bres∈R is the corresponding offset value, and f is the corresponding activation function (ReLu function in this study).(23)y=Axres,where A represents the attention feature extraction operation, and the attention module only assigns attention weight to all features in the xres feature map without changing the dimension of the feature or other information. This is mainly determined by the nature of the 3D attention module itself. Therefore, the module can also be embedded into 3DCNN with any structure.


## 4. Experimental Results and Analysis

The default format for this sentence is 16 consecutive RGB images. Large images are cut to 112 × 112 and the minimum batch size is set to 25. The standard dropout is CE dropout, specifically the “softmax_cross_entry_with_logits_v2” API provided by TensorFlow; the initial value is 0.001, the speed is adjusted by exponential decomposition, i.e., the decomposition coefficient is set to 0.1, and the decomposition step is set to 2000; the optimizer is “Adam”; and the early station was set to 10. The discrepancies of all the standard comparisons in this sentence were set by default in the old script and would be fair and accurate of comparative experiments.Because this study is based on the recognition of human activities in deep learning, the comparisons used in this section are all in-depth studies [23, 24]. Comparison models can be divided into two categories: simple models and other models. Designers, such as 3D Conv Net and C3d, refer to the measurement models provided in this document to improve the performance of the design [25, 26]. Among them, 3D Conv Net first proposed the concept of 3D conversion; C3D is the classic model of 3D CNN in the field of human behavior; and the design model for decomposing shallow features in this sentence includes part of its design [27, 28]. Therefore, this article should be chosen as a benchmark. The other models are mostly of some of the details and models mentioned in the design of the models in depth, including the evolutionary models that have been completed in recent years. In particular, it has the classic two-thread telephone network; Res3D and P3D-A to 3D section; video LSTMs that use listening techniques to identify human activity; I3D to 3D CNN collection; and human modeling is recognized as 2D and 3D rotations. A 3D running model (ResNet-18) connects the parts and monitors. Table 1 provides the comparison models.Table 1
Summary of comparative model information.
The model nameThe dimensionPut forward the timeCategory3D-ConvNet3D20133D CNNC3D3D20153D CNNTwo-stream2D20152D CNNVideoLSTM2D2016LSTM + attentionRes3D3D20173D ResNetP3D-A3D20173D ResNetI3D3D20183D CNNMiCT-Net2D, 3D20182D CNN + 3D CNN3D RAN (ResNet-18)3D20193D ResNet + attentionIt can be seen from Table1 that the compared models basically cover the applications of 2D and 3D convolutional neural networks, cyclic neural networks (LSTM), residual networks and attention mechanisms, and their corresponding time span is also large, from the earliest 2013 to the latest 2019 [29, 30]. Therefore, this paper has certain pertinence and representativeness in the selection of the comparison model.Predefined in this section: Strategy 1 means feature addition fusion; and Strategy 2 is feature stitching and fusion. The symbol “+” indicates the improvement of the recognition accuracy of the model after feature fusion compared with the baseline experiment. The test results of two shallow feature fusion strategies on UCF101 and HMDB51 datasets are shown in Figures9 and 10.Figure 9
Results of shallow feature fusion on UCF101.Figure 10
Results of shallow feature fusion on HMDB51.It can be seen from Figures9 and 10 that the performance of the model after shallow feature fusion is improved to varying degrees, and the improvement of the additive fusion strategy is greater than that of the splicing fusion strategy. Among them, on the UCF101 dataset, strategy 1 increased by 0.54%; and strategy 2 is slightly lower than strategy 1, with an increase of only 0.35%. On the HMDB51 dataset, the increase in strategy 1 is 0.63%, twice that of strategy 2. At the same time, it is found from Figures 9 and 10 that the promotion range of each strategy on the two benchmark data sets are relatively close, especially strategy 2, which is 0.35% on UCF101 and 0.31% on HMDB51. This also shows that the two fusion strategies can use different data sets and have good migration and generalization. The main reason for this analysis is that shallow features and deep features are different granularity representations of the same type. When the addition method is adopted, it can make up for the shortcomings of each other to a certain extent, so as to achieve “learning from each other” and give full play to the optimal performance representation; On the contrary, strategy 2 only splices the two on the channel dimension of features, which can be regarded as a simple listing of features. For the same type of features, it cannot achieve real integration, so the overall range of improvement is less than the strategy of additive integration.The experimental results of the first mock exam include two parts: a single modal shallow feature classification accuracy test and optical flow feature fusion experiment. The first mock exam of shallow modal feature classification is mainly used to calculate the contribution of two modal characteristics of RGB and optical (flow). The results of the experiment are shown in Figure11. Predefined in this section, Strategy 1 represents additive fusion based on feature contribution and Strategy 2 represents splicing and fusion. The symbol “+” indicates the improvement of the recognition accuracy of the model after optical flow feature fusion compared with the benchmark experiment.Figure 11
Classification accuracy of single modal shallow features.As can be seen from Figure11, the shallow feature classification effect of RGB and optical flow on the benchmark data set is still different. Among them, the classification effect of the optical flow feature is generally better than RGB feature. On the two data sets of UCF101 and HMDB51, the classification recognition rate based on the optical flow feature is about 2.5% higher than that of the RGB feature. This paper analyzes that this is because optical flow retains more operation characteristic information of the behavior and suppresses the influence of background factors on the behavior itself, so it obtains a relatively high recognition accuracy.Since the single classification effect of these two modes of data has different performance, when using the additive fusion strategy, we cannot simply add the two directly but should fuse according to their respective contribution (this paper measures the contribution with accuracy). In Chapter4, an additive fusion strategy based on feature contribution degree is proposed. First, the feature contribution degree of the results obtained in Figure 11 is calculated by using the formula in this paper, and then the feature additive fusion is carried out. The fused results are shown in Figure 12. Figure 12 also contains the results of the splicing fusion strategy.Figure 12
Results of optical flow feature fusion on UCF101 and HMDB51.It can be seen from Figure12 that the test results of the additive fusion strategy based on feature contribution have improved significantly on the two benchmark data sets, with an increase of more than 2 percentage points, including an increase of 2.69% on HMDB51. The effect of splicing and fusion strategy has also increased by more than 1 percentage point, including 1.34% on UCF101 data set and about 1.9% on HMDB51. At the same time, it can be seen from Figure 12 that the increase in strategy 1 is almost twice that of strategy 2, which also proves that the additive fusion strategy based on feature contribution proposed in this paper is effective and more suitable for multimodal feature fusion than the splicing fusion strategy.


## 5. Conclusion

In this study, 3D rotation is used to decompose objects in space-time. At the same time, the R3D model was proposed in this paper due to the lack of large 3D CNN disadvantages and the difficulty of training. The design feature module is divided into two sections: 3D shallow feature layer and the 3D depth layer. The models of the prototype were compared with the C3D models; the structure that decomposes the subsurface energy uses residual energy to form a 3D residual module. Experiments have shown that the accuracy of the R3D model is 87.89% and 50.27%, respectively, between UCF101 and HMDB51, which have a higher level of performance improvement compared to the 3D model and other models. Recognize human behavior based on 3D residuals and interactions. Providing the performance of age-old 3D models for the realization of human art and these concepts create a human-to-human experience and ar3d_v2 to unravies deep commercial real estate. Experiments have shown that the performance of the smelting model is improved at several levels compared to a single sample, for which AR3D_V2 has the best performance.



---

*Source: 2913507-2022-08-12.xml*