## 3 Methodology
### YOLOX-Based Object Detection  
Typically, object detection uses a two-stage approach, where detection box proposals are first generated through selective search or neural network algorithms, followed by classification refinement and detection box regression for each proposal. While this method can achieve higher detection accuracy, its slower speed limits its use in scenarios requiring real-time performance. In contrast, the single-stage object detection algorithm bypasses proposal generation and directly produces final detection results through neural networks, making it the mainstream approach in recent years due to its faster performance. YOLO [25] is a groundbreaking real-time object detection system that frames object detection as a single regression problem, predicting bounding boxes and class probabilities directly from the complete image in one evaluation. YOLOv7 [26] is the latest version, further enhanced in speed and accuracy, making it one of the best performing models in real-time detection, and it is currently the most commonly used variant for such tasks. The core concept of YOLO is to treat object detection as a regression problem, where the trained model outputs the coordinates of multiple bounding boxes for a given input image. Non-maximum suppression is then applied to select the bounding box with the highest probability, identifying the detected human body area for further processing. In this paper, we employ YOLOX [27], which introduces several innovative features and optimizations over previous YOLO versions, making it a strong contender in the field of real-time object detection. Additionally, it integrates several advanced techniques, including the SiLU activation function, a multi-scale feature pyramid network (FPN), a path aggregation network (PAN), and a decoupled inference head. This combination achieves high precision while maintaining real-time performance. The detailed architecture of YOLOX is shown in Figure 2.  
Figure 1: Illustration of the overall architecture of the proposed methods. Behavior monitoring is ultimately viewed as a classification task through the chain of human detection, pose estimation, and action recognition. The specific operation process is as follows: given the input image \(\mathcal{I}\), the YOLO algorithm divides the image into \(S\times S\) grids, with each grid cell responsible for detecting objects whose center falls within that cell. Each grid cell can predict up to \(K\) targets. If the number of object categories is \(C\), the neural network ultimately generates a tensor of size \(S\times S\times(K\times(C+5))\). For example, when \(S=7\), \(K=1\), \(C=20\), the final tensor generated by the network has dimensions \(7\times 7\times 25\). The first 21 channels of the tensor encode Pr(obj), which represents the probability that an object is present, as well as the probability distribution for each object category. The remaining 4 channels encode the coordinates of the bounding box. Each real detection box is assigned to the corresponding grid cell based on its center coordinates within the \(S\times S\) grid. Each grid cell has \(K\) predefined anchor boxes, and the intersection over union (IoU) between the real detection box and the anchor boxes is calculated. To balance the ratio of positive and negative samples, the IoU value is used to categorize samples into positive, negative, and ignored. Once the detection ground truth is constructed, the model is trained end-to-end. The loss function for object classification can be cross-entropy or focal loss, while the loss function for coordinate regression can be Smooth L1 loss, IoU loss, or similar. In the YOLO series of algorithms, since the training is based on the predicted bounding boxes, traditional L1 and L2 losses are not used. Instead, the generalized IoU loss function (GIoU Loss) is employed.