## 5 Implementation of the Study  
### Implementation Result  
In practice, a customized dataset was trained by including objects created through a process that was augmented by rotation and occlusion operations. The objects comprised a worker, a machine, a control box, a toolbox, a tool, and a product, which were utilized to perform object detection. Subsequently, the collected data were divided into training data of 75% and testing data of 25%. In this particular context, the model was intended to enhance the previous model [15; 16] by adding a dataset and layers. For a more detailed explanation, Figure 3a depicts the model specifically detecting each object in the frames: a worker, a machine, a toolbox, and a tool; Figure 3b depicts a worker, a machine, a control box, and two toolboxes displayed using bbox and segmentation masks. In addition, the results signify high accuracy and fast recognition based on normal conditions. Moreover, pose classification was performed using LSTM. In the process, a network was built that consisted of three LSTM layers and three dense layers, which therefore, produced an output layer that consisted of seven neurons representing dynamic poses or human behavior: standing, walking, touching, holding, bending, sitting, and squatting. Due to direct connections between the current and previous cells, the earlier-generated information was directly applied to predict target poses; thus, crossing multiple units was unnecessary. The long-range information persisted up to the stage of predicting  
Figure 3: Examples of object detection: (**a**) bbox and segmentation result of a worker, machine, toolbox, and tool; (**b**) bbox and segmentation result of a worker, machine, control box, and two toolboxes. Figure 2: Examples of normal and anomalous worker behavior: (**a**) a working is standing, (**b**) a worker is touching the control box, (**c**) a worker is holding a tool, (**d**) a worker is sitting in front of a machine, (**e**) a worker is sitting/slipping, and (**f**) a worker is standing behind a machine (unseen). the last pose. In addition, enhanced information was employed due to direct use of the previous and last hidden states to predict the current pose. In this model, the previous LSTM cells, including the last cells, were directly connected to the current cells, where the attention mechanism integrated information in different hidden states. For a more precise description, the training and testing processes are presented in Figure 4.  
Table 1 illustrates the hyperparameters for training the model. These parameters are obtained from continuous training of the model that produced the expected results. The model was tested on a video sequence to ensure each worker pose was accurately detected, as illustrated in Figure 5.  
Turning to another aspect, a worker behavior description algorithm was created to present the worker behavior derived from video images in the form of descriptive texts. In this practice, the logic was based on the worker's position relative to the coordinates of each object and the pose label within each frame. Each behavior was classified as normal or anomalous based on the given object position and pose label. Afterward, descriptive texts were created according to the attained results from human pose estimations and detection on the objects nearest to the worker. In this case, simple description texts were composed of a subject (\"(\"a\") + (\"worker\") + to be + verb + adverb (\"in front of\") + particle + object\"). \begin{table}
\begin{tabular}{c c} \hline \hline
**Hyperparameter** & **Values** \\ \hline Hidden layer and number of neurons & LSTM 128, LSTM 64, LSTM 64, \\ (Three LSTM layers and three dense layers) & Dense 64, Dense 32, Dense 32 \\ Activation function input and hidden layer & Relu \\ Activation function output & Softmax \\ Dropout & No \\ Regularization & No \\ Optimizer & Adam \\ Bach size & 32 \\ Number of epochs & 100 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Hyperparameters of the study. Figure 4: Pose classification.