# Research on CNN-BiLSTM Fall Detection Algorithm Based on Improved Attention Mechanism
## 3 Materials and Methods
### Construction of Fall Detection Model  
#### 3.3.1. CBAM-IAM-CNN-BiLSTM Network Structure  
A deep neural network model (the CBAM-IAM-CNN-BiLSTM model) using the CNN and bidirectional LSTM (BiLSTM), which integrates the improved CBAM attention mechanism, is proposed in this paper to classify human daily activities and fall behaviors to improve the accuracy of fall detection. In this model, the collected acceleration and angular velocity data are first sent to a CNN and bidirectional LSTM, respectively. The CNN is used to extract deep features of data; the LSTM is used to analyze temporal dependencies between data. The CBAM can extract meaningful content and important information from data, and then the spatial and temporal features of the human body movement data are fused and finally classified and identified. The overall structure of the model is shown in Figure 6.  
The CBAM-IAM-CNN-BiLSTM model mainly consists of the following seven parts:  
1. The input layer: This accepts data from the triaxial accelerometer and triaxial angular velocity meter and inputs them into the convolution layer and bidirectional LSTM layer, respectively.
2. The convolution layer: This accepts data from the input layer and performs a convolution operation. The size of the convolution kernel in the layer is 5 \(\times\) 5 \(\times\) 3, and each unit is activated according to the equation's rectified linear unit (ReLU) activation function after convolution.
3. The attention mechanism: For the feature map generated by the convolutional neural network, the convolutional block attention module (CBAM) infers the attention map in two independent dimensions (channel and space), in turn, and then multiplies the  
Figure 6: Schematic diagram of the CBAM-IAM-CNN-BiLSTM model.  
attention map by the input feature map for adaptive feature optimization. In this paper, the CBAMs are added in different positions of the model and improved in order to better extract the features of the human body's daily behaviors and falling behaviors. Please refer to Section 3.3.2 for details.
* The pool layer: The maximum pooling method is used for sub-sampling, which further reduces the dimension of the information extracted from the convolution layer, reduces the model size and computation burden and improves the robustness of the extracted features. The size of the kernel in the layer is 2 \(\times\) 2, the strides are two and the same padding is used to make the output size the same as the input size.
* The bidirectional LSTM layer: This is composed of two layers of recurrent neural networks with the same inputs but different information transmission directions in two layers. The final prediction result is jointly determined by the forward layer and the reverse layer.
* The dropout layer: This is added after the dense and bidirectional LSTM layers. During the training process, the neural network training unit is removed from the network according to a certain probability to prevent the model from over-fitting and improve the generalization ability of the model.
* The output layer: Feature fusion is realized through splicing the feature vectors processed by convolution and the feature vectors processed by the bidirectional LSTM network. Then, the connection between all nodes of this layer and all corresponding nodes in the upper layer is realized via the dense layer, to synthesize the previously extracted features to obtain a specific value and, further, to obtain the final classification result according to the softmax classifier.