## 2 Materials and Methods
### Detector Improvements  
YOLOX represents the latest advancement in the YOLO [16] series of object detection algorithms, inheriting the family's hallmark of balancing speed and accuracy while enhancing detection performance through innovative technologies. Especially in distinguished in real-time object detection, YOLOX has achieved unprecedented performance levels on multiple standard datasets through optimization and innovation. Consequently, this study selected YOLOX as the detector component and improved it. This choice was motivated by YOLOX's ability to deliver high-speed, accurate detections, critical for applications requiring real-time processing and analysis. The enhancements aimed to tailor the YOLOX model to better suit specific requirements and challenges, especially in handling the complexities of panoramic image data, thereby maximizing the efficiency and effectiveness of object detection tasks. This study enhanced the tracking accuracy for small-scale targets by adding a detection layer specifically designed for small objects. Moreover, to address the challenges posed by low-light conditions in complex environments, this study incorporated the Polarized Self-Attention (PSA) mechanism during the detection phase, aiming to capture the features of targets more effectively, thereby significantly boosting tracking performance. These key technological innovations optimized algorithms' performance under challenging conditions and significantly increased their value and applicability in real-world scenarios. Introducing a dedicated layer for small-scale object detection allows for a finer recognition of the details often missed by conventional layers, making the proposed solution particularly effective in scenarios where such targets are prevalent. By enhancing the model's ability to focus on relevant features even in poor lighting, the PSA mechanism ensured that the improved algorithm remained robust and reliable, further extending its usability across a broader range of applications. The improved YOLOX structure is shown in Figure 3; the parts in red are the parts that have improved. When the input image dimensions were 640 \(\times\) 640 \(\times\) 3, the optimized YOLOX network first utilized the backbone network (CSPDarknet) for feature extraction. It then enhanced the feature maps processed by the CSP module of the backbone network using the Polarized Self-Attention (PSA) mechanism. Following this, the PANet network performed feature fusion on the feature maps of sizes 160 \(\times\) 160, 80 \(\times\) 80, 40 \(\times\) 40, and 20 \(\times\) 20 produced by the backbone network. Finally, YoloHead predicted the object categories and performed position regression (decoupled head) on the fused scales of feature maps (corresponding to the 4\(\times\), 8\(\times\), 16\(\times\), and 32\(\times\) downsampled feature maps of the original input image). Specifically, this dedicated layer for detecting small targets deeply analyzes and learns from the high-resolution features within the input image, effectively extracting detailed information about small-scale targets. Combined with the existing multi-scale feature fusion mechanism of the YOLOX_s model, this layer enhances the model's responsiveness to small targets and maintains the efficient detection of medium- and large-scale targets, thereby further improving the model's overall performance in Multi-Object Tracking tasks. This comprehensive approach ensures that the model is well-equipped to handle the challenges of detecting and tracking objects of different sizes across diverse scenarios. In the design of the small object detection layer, a dense structure of small convolutional kernels was adopted to capture the fine details of small-sized objects more precisely. This layer was positioned early in the network to act directly on high-resolution feature maps. This is crucial because high-resolution feature maps contain a wealth of raw detail information essential for recognizing small objects in the early stages of image processing.