## 2 Literature Review
Additionally, AI technologies can help improve safety by detecting potentially hazardous behaviors or situations, such as passengers who may be obstructing doors, failingto follow safety protocols, or engaging in disruptive activities. Real-time alerts can be generated to inform bus drivers or transit operators about these issues, allowing for prompt intervention and ensuring a safer experience for all passengers [22]. Another important application of AI in public transportation is its ability to facilitate predictive analysis. By analyzing historical video data, AI systems can predict future passenger behavior, helping transportation authorities optimize bus schedules, allocate resources more effectively, and even improve the design of vehicles or stations to better meet the needs of passengers. For instance, AI can predict when a bus is likely to experience overcrowding, enabling transit authorities to adjust service frequencies or send additional buses during high-demand periods. Moreover, the use of video and AI technologies can support the development of more efficient transportation systems by providing insights into passenger preferences and habits [23]. Understanding how passengers move through a bus, how long they spend in particular areas, and where congestion typically occurs can help design better boarding processes, improve the placement of doors or seating, and reduce the overall time spent at each stop. In the broader context of smart cities and connected transport systems, the combination of video and AI technologies allows for a more data-driven approach to urban planning. These tools enable continuous monitoring of transit networks, which can lead to ongoing improvements based on real-time data, ensuring that public transportation is more responsive to passenger needs and can adapt more quickly to changing circumstances [24; 25]. In conclusion, the use of video and AI technologies in public transportation not only enhances operational efficiency and safety but also provides invaluable insights into passenger behavior. By enabling the analysis of complex interactions like boarding and alighting, these technologies contribute to the development of more efficient, responsive, and passenger-friendly transit systems. Recent studies have explored deep learning techniques for posture and activity recognition, including convolutional neural networks (CNNs) for spatial feature extraction, recurrent neural networks (RNNs) such as LSTMs for temporal modeling, and graph convolutional networks (GCNs) applied to skeletal structures. These methods offer high accuracy but often require large annotated datasets and high computational resources. Our study, by contrast, uses a classical model, Random Forest, as a robust baseline to validate pose-based recognition pipelines in uncontrolled, real-world public transport scenarios--an essential step before deploying more advanced models in future work. The Random Forest (RF) algorithm is a supervised ensemble learning method composed of multiple decision trees. Each tree is trained on a random subset of the dataset and a random subset of the input features (a technique known as \"bagging\"). During inference, each tree casts a vote for the predicted class, and the final prediction is made by majority voting. This ensemble mechanism improves generalization, reduces overfitting, and increases robustness to noise. Figure 2 illustrates the Random Forest algorithm. Each input sample is processed through multiple decision trees trained on random subsets of the data. The final predicted class is obtained by majority voting among the outputs of all trees. This ensemble approach increases robustness, reduces overfitting, and improves generalization in noisy environments. Mathematically, each tree in the forest splits the feature space by optimizing a criterion such as the Gini impurity or entropy, recursively partitioning the data until a stopping condition is met (e.g., minimum number of samples per leaf).