Tracking-by-detection is a popular paradigm for Multi-Object Tracking (MOT), but the problems of unstable tracking and frequent ID transitions still occur due to the low illumination, point light sources, and high dust in the underground coal mine space. In this respect, this paper proposes a Dark-SORT personnel tracking algorithm for downhole environment characteristics. First, a video image enhancement method is designed to enhance the video image quality and improve the localization accuracy of the detector for the dim and unevenly distributed light environment in the well. Second, an Adaptive Discrete-weighted Attention Module (ADAM) is designed, which consists of an Enhanced Discrete Channel Attention (EDCA) module and an Adaptive Discrete Spatial Attention (ADSA) module. EDCA enables the network to capture richer information at different scales by adaptively processing different channels according to their importance and feature scales. The ADSA approach enhances the linkage between different locations within the same region, combines different pooling strategies to highlight important regions, and reduces the focus on overexposed regions. Finally, the OC-SORT tracking algorithm is introduced to solve the error accumulation problem based on the motion model and incorporate the appearance feature information to improve the stability of target tracking. We conducted a comparison test on the self-built dataset MINE-MOT, and the HOTA, MOTA, DetA, AssA, IDF1, AssRe, and FPS metrics of the Dark-SORT tracking algorithm based on the YOLOv7 target detection model were 67.4, 92.6, 80.3, 46.8, 61.7, 65.7 and 23, respectively, which was the best in terms of accuracy and stability of all the models involved in the test.INDEX TERMS Attention mechanism, computer vision, target detection, target tracking, image enhancement.