## 3 Materials and Methods
### Proposed Fall Detection Algorithms  
Figure 6 shows a flow chart of the proposed fall detection algorithm. Firstly, images of x-y scatter and Doppler range plots of one object are acquired from the mmWave radar sensor. These images are then preprocessed using the HOG method, which extracts features by analyzing the gradient orientations within localized portions of the image. This preprocessing step is crucial for enhancing the quality of the data and making it suitable for further analysis. Following the preprocessing, the extracted features are fed into an LSTM network combined with a self-attention mechanism. This combination enables the model to dynamically adjust its focus based on the context, leading to more accurate and context-aware predictions. Once the features have been processed by the LSTM-Attention mechanism, they are used for classification. The classification step involves determining whether the activity depicted in the images is one of the four types of ADLs or a fall. This final step is critical for applications such as fall detection systems, where accurately identifying falls can help in providing timely assistance and improving safety.  
To find the best deep learning algorithm for detecting object falls using mmWave radar images, four potential algorithms must be compared and evaluated. Figure 7 shows four types of potential architectural models designed for fall detection. The first model, Raw-LSTM, begins by taking mmWave radar images as input. The two-dimensional (2D) image frames are first converted to grayscale to reduce complexity and focus on intensity features. Each grayscale image is then reshaped into a one-dimensional (1D) array. These 1D arrays are normalized by scaling pixel values to the range [0, 1]. The resulting normalized sequential data is fed into a series of LSTM layers, each equipped with dropout regularization to prevent overfitting and improve generalization. The output from the LSTM layers is then passed through dense layers with ReLU activation functions, followed by a final dense layer with a softmax activation function for classification. This model classifies activities into categories such as sitting, walking, lying, inactivity (ADLs), and three types of falls (backward, forward, sideways). The second model, Raw-LSTM-Attention, builds upon the Raw-LSTM model by incorporating a self-attention mechanism within the traditional attention framework. A self-attention mechanism is applied to the output of the second LSTM layer, allowing the model to focus on the most relevant parts of the input data of the LSTM. This focused information is then passed through dense layers with ReLU and softmax activation functions for classification. The self-attention mechanism enhances the model's ability to accurately classify activities by dynamically adjusting its focus based on the context. The third model, HOG-LSTM, also starts with mmWave radar images but includes an additional preprocessing step where HOG features are extracted. This involves generating HOG directions within localized portions of the image, normalizing these histograms, and building a window descriptor. The extracted HOG  
Figure 6: Flow chart of proposed fall detection algorithm.  
features are then classified using an SVM to generate feature vectors. These vectors are fed into LSTM layers with dropout, followed by dense layers with ReLU and softmax activation functions for final classification into the same activity categories as those used in the Raw-LSTM and Raw-LSTM-Attention models. The fourth model, HOG-LSTM-Attention, enhances the HOG-LSTM architecture by incorporating a self-attention mechanism to improve its ability to focus on relevant temporal features. Each of these models aims to improve the accuracy and reliability of fall detection by leveraging different preprocessing techniques and neural network architectures.  
Figure 7: The four types of potential architectural models for fall detection. (**a**) Raw-LSTM, (**b**) Raw-LSTM-Attention, (**c**) HOG-LSTM, and (**d**) HOG-LSTM-Attention.