A coal mine underground roadway area-level inspection personnel retention detection method
Patent Information
- Application Number
- CN202611152974.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-10-27
AI Technical Summary
本发明所述的煤矿井下巷道区域级巡检人员滞留检测方法,通过深度学习模型与后处理校验相融合的双源识别机制,有效克服了井下低光照、高粉尘、高遮挡环境下单一检测模型漏检率高的问题,显著提升了巡检人员目标的检出率;在此基础上,通过基于当前帧图像质量与目标历史检测状态动态调整连续断帧数量阈值并结合运动预测与加权回溯关联的自适应容错机制,能够在检测模型短暂失效时维持目标跟踪与时长连续累计,从根源上解决了现有方案因频繁断帧导致时长统计中断、漏报率高的缺陷;进一步地,通过预配置适配井下巷道拓扑的时空约束规则,并采用时空初筛与特征相似度匹配相结合的二阶跨摄像头关联策略,有效过滤了不符合巷道通行逻辑的无效匹配对,克服了井下人员外观高度同质化导致的跨镜误匹配问题,显著提升了目标关联的准确率;在此基础上,基于全局唯一标识拼接多摄像头轨迹片段,实现了巡检人员在整条关联巷道、整个采区范围内的全域总停留时长统计,突破了单摄像头有效视野短的限制,消除了现有方案的管控盲区,同时通过针对不同风险等级区域预设差异化报警阈值与报警等级的分级报警机制,满足了煤矿井下分级安全管控的实际需求,最终实现了井下巡检人员滞留检测的全域覆盖、连续统计、精准关联与分级预警,有效提升了煤矿井下安全管控的可靠性与实用性。
Smart Images

Figure CN122990612A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of target detection technology, and in particular to a method for detecting the presence of personnel staying in underground coal mine roadways. Background Technology
[0002] As a vital energy sector, underground safety is a core aspect of coal mining, with the standardized operations of inspection personnel in high-risk areas (such as fully mechanized mining faces and tunneling faces) directly impacting safety management. Among related technologies, a comprehensive underground personnel safety management system has been constructed through the synergy of positioning systems (UWB / RFID), video surveillance, and personnel management systems. Specifically, this system encompasses key aspects such as personnel positioning, video monitoring, and alarm linkage, aiming to achieve personnel behavior monitoring and risk warning.
[0003] However, existing methods for detecting personnel presence underground rely on positioning tags or single cameras for independent detection, without considering extreme environments such as low light, high dust, severe obstruction, and the linear topology of tunnels. This can lead to problems such as insufficient positioning accuracy (error of 0.5-3 meters), frequent video misses (frame breaks causing interruptions in duration statistics), and mismatches between targets across cameras (homogeneous personnel appearances), thus affecting the accuracy and reliability of presence detection and failing to meet the high safety management requirements of underground coal mines. Summary of the Invention
[0004] Therefore, the technical problem to be solved by the present invention is to overcome the problems in the existing technology, such as the high rate of missed detection of personnel due to the extreme environment of low light, high dust and high obstruction in underground coal mines, the blind spots of regional control caused by the short effective field of view of a single camera, the inaccuracy of cross-camera target association due to the high homogeneity of personnel appearance, and the lack of spatiotemporal constraints and hierarchical alarm mechanisms adapted to the topology of underground roadways, so as to meet the requirements of high reliability hierarchical safety control in underground coal mines.
[0005] To solve the above-mentioned technical problems, the present invention provides a method for detecting the presence of personnel during regional inspections in underground coal mine roadways, comprising: The video streams captured by each camera in the associated roadway are processed frame by frame. The target of the inspection personnel wearing safety helmets is identified by combining deep learning model with post-processing verification, and a unique local identifier is assigned to each target. The threshold for the number of consecutive broken frames is dynamically adjusted based on the current frame image quality and the target's historical detection status. When the target is not detected temporarily, the tracking status is maintained through motion prediction, and when the target reappears, backtracking is performed through weighted matching to maintain the continuous accumulation of dwell time. The adjacency relationship, access attributes, and reasonable time range for the target to move between adjacent cameras are pre-configured for each camera in the associated roadway, forming a spatiotemporal constraint rule that adapts to the topology of the underground roadway. The appearance feature vector of each inspection personnel target is extracted by each camera node, and the target information is synchronized to the central node. The central node performs a preliminary screening of cross-camera target matching pairs according to the spatiotemporal constraint rules, and then calculates the feature similarity of the matching pairs that pass the preliminary screening. Matching pairs that meet the similarity threshold are determined to be the same target and are assigned a globally unique identifier. Based on the globally unique identifier, the trajectory segments of the target under all cameras in the associated lane are stitched together, and the total dwell time of the target in the associated lane is accumulated. When the total dwell time reaches the preset alarm threshold of the corresponding area, the corresponding level of dwell alarm is triggered and alarm information is output.
[0006] Preferably, the method of identifying the inspection personnel wearing safety helmets by combining deep learning models with post-processing verification includes: A deep learning object detection model is used to output personnel detection boxes and safety helmet detection boxes frame by frame, along with detection confidence scores. When the detection confidence output by the target detection model is lower than a preset threshold or no valid target is detected, post-processing verification is triggered. The post-processing verification includes: extracting the motion region through a background subtraction algorithm, performing color space transformation on the upper region of the motion region, and calculating the proportion of safety helmet color pixels through preset color range, saturation threshold and brightness threshold. When the proportion of safety helmet color pixels exceeds a preset ratio, a personnel detection box and a safety helmet detection box are generated and assigned a medium confidence level. The deep learning target detection model is fused with the detection results of the post-processing verification, and the valid inspection personnel targets are determined based on the fusion results.
[0007] Preferably, the step of dynamically adjusting the threshold for the number of consecutive broken frames based on the current frame image quality and the target's historical detection status, maintaining the tracking state through motion prediction when the target is temporarily not detected, and performing backtracking association through weighted matching when the target reappears to maintain the continuous accumulation of the dwell time includes: A target tracker is used to assign a unique local identifier to each valid inspection personnel target, and a motion prediction algorithm is used to predict the motion trajectory. A status dictionary is maintained for each target, which includes local identifier, historical trajectory, cumulative dwell time, number of consecutive frame breaks, historical detection confidence, historical helmet matching records, alleyway area attributes, and detection source. Based on the target's historical detection confidence, historical frame break frequency, and the current image's light intensity and dust concentration, the threshold for the number of consecutive frame breaks is dynamically adjusted. When the number of consecutive frame breaks of the target does not exceed the dynamically adjusted threshold, the effectiveness of the local identifier is maintained through motion prediction and the cumulative dwell time continues to increase. When the number of consecutive frame breaks of the target exceeds the dynamically adjusted threshold, it is determined that the target has temporarily left and the cumulative dwell time is locked to stop increasing. When a target is detected again after a frame break, the weighted comprehensive matching score between the newly detected target and the target that is temporarily away is calculated. When the weighted comprehensive matching score exceeds the preset backtracking threshold and the camera position where the newly detected target appears matches the pre-configured lane adjacency relationship with the camera position where the backtracked target disappeared, it is determined to be the same target and the duration of the frame break is added to the cumulative dwell time.
[0008] Preferably, the dynamic adjustment of the threshold for the number of consecutive frame breaks includes: A comprehensive image quality score is calculated based on the average pixel brightness, contrast, and edge strength of the current frame image. The lower the comprehensive image quality score, the worse the image quality. The dynamic threshold is calculated based on the base tolerance frame count, the overall image quality score, the target's historical frame break frequency, and a preset adjustment coefficient.
[0009] Preferably, the weighted comprehensive matching score is determined based on a weighted comprehensive value of positional overlap, appearance feature similarity, and helmet matching consistency, wherein the positional overlap is calculated based on the bounding box of the broken frame target in the current frame predicted by Kalman filtering and the detection box of the new target.
[0010] Preferably, the process of maintaining the tracking state through motion prediction further includes: when a person target is detected in a certain frame but no corresponding safety helmet is detected, querying the historical matching record of the safety helmet corresponding to the local identifier of the target; if at least two frames in the past preset number of frames have matched the safety helmet at the same time, then the valid inspection personnel determination is maintained and the cumulative dwell time is not interrupted.
[0011] Preferably, the pre-configured adjacency relationships, access attributes, and reasonable time range for the target to move between adjacent cameras within the associated alleyway include: Configure the adjacency relationship of each camera in the associated alley, the field of view coverage of the alley, and the one-way or two-way passage attributes of each alley. The adjacency relationship includes adjacent cameras with overlapping fields of view and long-distance continuous cameras with no overlapping fields of view but connected inspection paths. Configure the shortest and longest time thresholds for the target to move between adjacent cameras. For one-way passageways, only the spatiotemporal thresholds for one direction are configured. For long-distance connecting passageways, the spatiotemporal thresholds are preset based on the passageway length and the normal walking speed of the underground inspection personnel.
[0012] Preferably, the shortest duration threshold is determined based on the distance between cameras and the maximum walking speed of personnel, and the longest duration threshold is determined based on the distance between cameras, the minimum walking speed of personnel, and the preset inspection operation interference time; The method for determining whether cross-camera movement conforms to spatiotemporal logic is as follows: set the time difference between the departure time stamp of the target in the front camera and the entry time stamp in the rear camera. Only when the time difference is not less than the corresponding shortest duration threshold and not greater than the corresponding longest duration threshold, the cross-camera movement is determined to conform to spatiotemporal logic.
[0013] Preferably, the step of extracting the appearance feature vector of each inspection personnel target through each camera node and synchronizing the target information to the central node, and then using the central node to perform initial screening of cross-camera target matching pairs according to the spatiotemporal constraint rules, calculating the feature similarity of the matching pairs that pass the initial screening, determining matching pairs with similarity meeting the threshold as the same target, and assigning them a globally unique identifier, includes: By employing a lightweight re-identification model optimized for low-light conditions and homogeneous personnel appearance in underground coal mines at each edge camera node, a preset dimension appearance feature vector is extracted in real time for each valid inspection personnel target. The appearance feature vector integrates multi-dimensional features of safety helmet markings and reflective strips on work clothes. The target's local identifier, feature vector, timestamp, and location information are synchronized to the downhole central node through each edge camera node; The central node performs initial screening based on pre-configured lane topology and reasonable spatiotemporal thresholds to filter cross-camera target matching pairs that do not conform to lane passage logic and spatiotemporal movement logic. For target matching pairs that pass the initial screening, calculate the cosine similarity between feature vectors. When the cosine similarity is greater than or equal to the preset matching threshold, they are determined to be the same inspection personnel target. Assign a globally unique identifier to them and establish a mapping relationship between the global identifier and the local identifier of each camera.
[0014] Preferably, the method involves stitching together the target's trajectory segments from all cameras within the associated lane based on a globally unique identifier, accumulating the target's total dwell time within the associated lane, and triggering a corresponding level of loitering alarm when the total dwell time reaches a preset alarm threshold for the corresponding area, including: For each globally unique inspection personnel target, the cumulative dwell time of the target under each camera in the associated roadway and the reasonable movement time between adjacent cameras are combined and statistically analyzed to obtain the total dwell time in the associated roadway. The target is determined to have left the associated alley and the total dwell time is reset only when the target leaves the preset exit of the associated alley or disappears from the field of view of all cameras in the associated alley for a period of time exceeding the preset area departure threshold; Different alarm thresholds and alarm levels are preset for roadway areas with different risk levels. Lower alarm thresholds and higher alarm levels are set for high-risk areas, while higher alarm thresholds and lower alarm levels are set for low-risk areas. When the total dwell time of the target reaches the alarm threshold of the corresponding area, the corresponding level of alarm is triggered, and the alarm time, roadway area name, target global identifier, complete trajectory segment and real-time video are output simultaneously.
[0015] The technical solution of the present invention has the following advantages compared with the prior art: The method for detecting loitering personnel in underground coal mine roadways described in this invention effectively overcomes the problem of high false negative rates of single detection models in low-light, high-dust, and high-obstruction environments by employing a dual-source recognition mechanism that integrates deep learning models and post-processing verification. This significantly improves the detection rate of inspection personnel targets. Furthermore, by dynamically adjusting the threshold for the number of consecutive frame breaks based on the current frame image quality and the target's historical detection status, combined with an adaptive fault-tolerant mechanism that integrates motion prediction and weighted backtracking, the method can maintain target tracking and continuous duration accumulation even when the detection model experiences temporary failure. This fundamentally solves the shortcomings of existing solutions, such as interrupted duration statistics and high false negative rates due to frequent frame breaks. Moreover, by pre-configuring spatiotemporal constraint rules adapted to the underground roadway topology and employing a second-order method combining spatiotemporal initial screening and feature similarity matching, the method achieves this. The cross-camera association strategy effectively filters out invalid matching pairs that do not conform to the roadway passage logic, overcomes the problem of cross-camera mismatch caused by the high homogeneity of the appearance of underground personnel, and significantly improves the accuracy of target association. On this basis, by stitching together multi-camera trajectory segments based on globally unique identifiers, it realizes the statistics of the total dwell time of inspection personnel in the entire associated roadway and the entire mining area, breaking through the limitation of the short effective field of view of a single camera and eliminating the blind spots of the existing control scheme. At the same time, by setting differentiated alarm thresholds and alarm levels for areas with different risk levels, it meets the actual needs of graded safety control in coal mines. Ultimately, it achieves full coverage, continuous statistics, accurate association and graded early warning of the detection of the stay of underground inspection personnel, effectively improving the reliability and practicality of underground safety control in coal mines. Attached Figure Description
[0016] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings, wherein: Figure 1 This is a flowchart illustrating the implementation of a method for detecting the presence of personnel at the regional level in underground coal mine roadways, as provided by this invention. Figure 2 This is an overall flowchart of a method for detecting the presence of personnel in a coal mine underground roadway area according to an embodiment of the present invention. Figure 3 This is a schematic diagram of the single-camera end downhole adaptive tracking fault-tolerant processing flow according to an embodiment of the present invention; Figure 4This is a schematic diagram of the process of global correlation of cross-camera targets in an underground coal mine according to an embodiment of the present invention; Figure 5 This is an architectural block diagram of a coal mine underground roadway area-level inspection personnel lingering detection system according to an embodiment of the present invention. Detailed Implementation
[0017] The core of this invention is to provide a method for detecting the presence of inspection personnel in underground coal mine roadways at the regional level. This method effectively overcomes the problems in existing technologies, such as high missed detection rates due to the extreme underground environment, blind spots in regional control caused by the short field of view of a single camera, inaccurate cross-camera target association due to high homogeneity of appearance, and lack of spatiotemporal constraints and hierarchical alarm mechanisms adapted to the topology of underground roadways. It realizes continuous accumulation and hierarchical early warning of the entire presence time of inspection personnel in the entire associated roadway and the entire mining area, thus meeting the actual needs of high-reliability hierarchical safety control in underground coal mines.
[0018] To enable those skilled in the art to better understand the present invention, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] Please refer to Figure 1. Figure 1 The flowchart illustrates the implementation of a method for detecting the presence of patrol personnel in underground coal mine roadways, as provided by this invention. The specific operation steps are as follows: S101: Process the video streams collected by each camera in the associated roadway frame by frame, identify the inspection personnel wearing safety helmets by combining deep learning models with post-processing verification, and assign a unique local identifier to each target. The video streams captured by cameras in the associated tunnels are processed frame by frame. A combination of deep learning models and post-processing verification is used to identify inspection personnel wearing safety helmets, and each target is assigned a unique local identifier. The deep learning model serves as the primary detection method, outputting the bounding boxes and confidence scores for personnel and safety helmets. Post-processing verification acts as an auxiliary detection method, triggered when the deep learning model's confidence score is insufficient or it fails to detect a target. It generates supplementary detection results through motion region extraction and safety helmet color feature verification, thus effectively identifying targets even in harsh imaging environments such as low light and high dust levels. Each identified valid inspection personnel target is assigned a unique local identifier, and a dedicated state dictionary is maintained, containing information such as their historical trajectory, cumulative dwell time, number of consecutive frame breaks, and detection source.
[0020] S102: Based on the current frame image quality and the target's historical detection status, dynamically adjust the threshold for the number of consecutive broken frames. When the target is not detected temporarily, maintain the tracking status through motion prediction, and when the target reappears, perform backtracking association through weighted matching to maintain the continuous accumulation of dwell time. First, based on the image quality assessment results of the current frame (such as average pixel brightness, contrast, and edge strength) and the target's historical detection status (such as confidence of previous continuous detections and trajectory stability), the allowable threshold for the number of consecutive frame breaks is dynamically adjusted. When the target is not detected in the current frame, but the number of consecutive frame breaks does not exceed the dynamic threshold, the target's position in the current frame is predicted using a motion prediction algorithm (such as Kalman filtering), maintaining the validity of its local identifier and continuing to accumulate dwell time. Once the number of consecutive frame breaks exceeds the dynamic threshold, the target is determined to have temporarily left the field of view, its accumulated dwell time is locked, and the increment is paused. When the target is subsequently re-detected, a weighted comprehensive matching score is calculated between the newly detected target and all targets in the "temporarily left" state. This score integrates multi-dimensional information such as positional overlap (cross-union ratio), appearance feature similarity (cosine similarity), and helmet matching consistency. When the score exceeds the preset backtracking threshold and conforms to the lane adjacency relationship, it is determined to be the same target, and the duration during the frame break is added to the accumulated dwell time, restoring continuous statistics.
[0021] As one implementation method, the YOLO series model can be used for main detection, and an improved Gaussian mixture model background subtraction algorithm can be used to extract the motion region. The color of the safety helmet is verified by the yellow hue range, saturation and brightness thresholds in the HSV color space. The ByteTrack tracker is used for target tracking, and the threshold for the number of consecutive broken frames is dynamically adjusted based on the overall image quality score and the target's historical detection status. The weighted overall matching score can be set as a weighted sum of the position intersection-union ratio, the cosine similarity of appearance features and the safety helmet matching result.
[0022] This step significantly improves the robustness of target detection and the continuity of dwell time statistics in the extreme environment of underground coal mines through multi-source fusion identification, adaptive frame breakage fault tolerance and weighted backtracking correlation mechanism. It effectively avoids the problem of interruption of dwell time statistics caused by missed detection by the detection model and frame breakage, and fundamentally reduces the false alarm rate of dwell detection.
[0023] S103: Pre-configure the adjacency relationship, access attributes, and reasonable time range for the target to move between adjacent cameras in the associated roadway, forming a spatiotemporal constraint rule that adapts to the topology of the underground roadway. The system pre-configures the adjacency relationships, access attributes, and reasonable duration ranges for target movement between adjacent cameras within the associated tunnels, forming spatiotemporal constraint rules adapted to the underground tunnel topology. These rules provide prior filtering conditions for subsequent cross-camera target association, thereby excluding invalid matching pairs that do not conform to the tunnel access logic. Specifically, adjacency relationships include adjacent cameras with overlapping fields of view and long-distance consecutive cameras with no overlapping fields of view but connected inspection paths. Access attributes specify the one-way or two-way access characteristics of each tunnel. The reasonable duration range is defined by the shortest and longest duration thresholds for target movement between adjacent cameras, calculated based on tunnel distance and preset personnel movement speed parameters. As one implementation, the shortest duration threshold can be determined based on the distance between cameras and the maximum walking speed of personnel, while the longest duration threshold is determined based on this distance and the minimum walking speed of personnel, plus a preset inspection operation interference time. The spatiotemporal constraint determination rules further require that the time difference between a target leaving the field of view of one camera and entering the field of view of an adjacent camera must fall within the interval defined by the aforementioned shortest and longest duration thresholds in order to be considered a cross-camera movement that conforms to spatiotemporal logic. Through the above pre-configuration, a set of spatiotemporal constraint rules tightly coupled with the underground roadway topology is formed, providing an efficient and reliable initial screening basis for subsequent cross-camera target association.
[0024] This step provides a strong prior filtering mechanism for cross-camera target association by pre-configuring tunnel topology and spatiotemporal constraint rules. It can effectively exclude invalid matching pairs that do not conform to the underground passage logic, significantly improve association efficiency and accuracy, and lay the foundation for subsequent regional-level dwell time accumulation, ensuring the reliability and practicality of dwell time detection.
[0025] S104: Extract the appearance feature vector of each inspection personnel target through each camera node, and synchronize the target information to the central node. The central node performs a preliminary screening of cross-camera target matching pairs according to the spatiotemporal constraint rules. Then, calculate the feature similarity of the matching pairs that pass the preliminary screening. Matching pairs that meet the similarity threshold are determined to be the same target and assigned a globally unique identifier. Each camera node extracts the appearance feature vector of each inspection personnel target and synchronizes the target information to the central node. The central node performs an initial screening of cross-camera target matching pairs according to the spatiotemporal constraint rules. Then, it calculates the feature similarity of the matching pairs that pass the initial screening. Matching pairs with similarity meeting the threshold are determined to be the same target and assigned a globally unique identifier. Each camera node extracts the appearance feature vector of each inspection personnel target and synchronizes the corresponding local identifier, timestamp, location information, and feature vector and other structured information to the central node. The central node performs an initial screening of cross-camera target matching pairs based on the pre-configured spatiotemporal constraint rules formed by the adjacency relationship of each camera in the associated alleyway, the passage attributes, and the reasonable time range for the target to move between adjacent cameras. Invalid matching pairs that do not conform to the alleyway passage logic or spatiotemporal movement logic are filtered out. Subsequently, the similarity between the feature vectors of the matching pairs that pass the initial screening is calculated. When the similarity reaches a preset threshold, the two targets in the matching pair are determined to be the same inspection personnel, and a globally unique identifier is assigned to them. At the same time, a mapping relationship between the globally unique identifier and the local identifier of each camera is established. As one implementation method, the appearance feature vector can be extracted using a lightweight re-identification model that is finely tuned and optimized for low-light conditions and homogeneous personnel appearance in underground coal mines, and can integrate multi-dimensional features such as safety helmet markings and reflective strips on work clothes; the spatiotemporal constraint rules can preset a minimum and maximum duration threshold based on the tunnel length and personnel walking speed, and determine whether the target's actual departure and entry timestamps between adjacent cameras fall within the threshold range; the feature similarity can be calculated using cosine similarity.
[0026] By using spatiotemporal constraint rules to perform initial screening of cross-camera target matching pairs, a large number of invalid matches that do not conform to the logic of underground roadway passage can be effectively filtered out, reducing the computational burden and risk of mismatch in subsequent feature matching. Combined with feature similarity judgment, the accuracy of cross-camera target association can be further improved, providing a reliable globally unique identifier basis for subsequent regional-level dwell time accumulation.
[0027] S105: Based on the globally unique identifier, stitch together the trajectory segments of the target under all cameras in the associated lane, accumulate the total dwell time of the target in the associated lane, and when the total dwell time reaches the preset alarm threshold of the corresponding area, trigger the corresponding level of dwell alarm and output alarm information.
[0028] Based on the globally unique identifier, the trajectory segments of the target under all cameras in the associated alley are stitched together to accumulate the total dwell time of the target in the associated alley. When the total dwell time reaches the preset alarm threshold for the corresponding area, the corresponding level of dwelling alarm is triggered and alarm information is output. Based on the globally unique identifier, the trajectory segments of the target under all cameras in the associated alley are stitched together to construct the complete movement path of the target in the associated alley. On this basis, the total dwell time of the target in the associated alley is accumulated. This total dwell time includes not only the continuous dwell time of the target in the field of view of each camera, but also the reasonable time consumed by the target moving between adjacent cameras, thereby achieving accurate statistics on the target's total dwell time within the area. When it is determined that the target has left from the preset exit of the associated alley, or the time that the target has disappeared from the field of view of all cameras exceeds the preset area departure threshold, it is confirmed that the target has left the associated alley, and its total dwell time is reset. Differentiated dwelling alarm thresholds and alarm levels are preset for areas with different risk levels in the associated alley. When the total dwell time of a target reaches the preset alarm threshold for the corresponding area, a dwell time alarm of the corresponding level is triggered, and alarm information is output simultaneously. This alarm information includes at least the alarm time, area name, target global identifier, and a complete trajectory segment of the target. As one implementation method, the cumulative dwell time of the target under each camera in the associated roadway can be combined with the reasonable movement time between adjacent cameras to obtain the total dwell time. Higher alarm levels and lower alarm thresholds can be set for high-risk areas such as fully mechanized mining faces and tunneling faces, while lower alarm levels and higher alarm thresholds can be set for low-risk areas such as main haulage roadways, to achieve tiered control.
[0029] By using trajectory stitching based on globally unique identifiers and accumulating total dwell time at the regional level, the limitation of short field of view of a single camera is overcome, enabling full-area detection of the stay of inspection personnel in the entire associated roadway or the entire mining area, eliminating blind spots in control. At the same time, combined with a hierarchical alarm mechanism, it can adapt to the differentiated safety control needs of different risk levels in underground coal mines, improving the pertinence and practicality of alarms.
[0030] Figure 2 This is an overall flowchart of a method for detecting the presence of personnel during area-level inspections in underground coal mine roadways, according to an embodiment of the present invention. Figure 2As shown, the method comprises four core steps in sequence: Step 1 is single-camera target detection and underground adaptive tracking fault-tolerant processing, specifically including video stream input, safety helmet detection, valid inspection personnel determination, target tracking and local ID allocation, underground adaptive frame-breaking fault tolerance and safety helmet soft determination, and finally outputting local target information; Step 2 is cross-camera association topology and spatiotemporal constraint configuration in underground coal mine roadways, specifically including roadway topology configuration, camera adjacency relationship configuration, one-way / two-way passage attribute configuration and reasonable spatiotemporal threshold configuration, and finally outputting spatiotemporal constraint rules; Step 3 is global association and global ID allocation of cross-camera targets in underground coal mines, specifically including lightweight re-identification feature extraction, information synchronization, spatiotemporal constraint initial screening, feature similarity matching, same target determination, global unique ID allocation and establishment of global ID and local ID mapping; Step 4 is regional-level dwell time accumulation and graded alarm determination in underground coal mine roadways, specifically including multi-camera trajectory stitching, regional-level total dwell time accumulation, graded threshold determination, triggering graded alarm when the threshold is reached, continuing monitoring when the threshold is not reached, and resetting the duration after the target leaves.
[0031] Based on the above embodiments, in some embodiments, the method of identifying the inspection personnel wearing safety helmets by combining deep learning models with post-processing verification includes: A deep learning object detection model is used to output personnel detection boxes and safety helmet detection boxes frame by frame, along with detection confidence scores. When the detection confidence output by the target detection model is lower than a preset threshold or no valid target is detected, post-processing verification is triggered. The post-processing verification includes: extracting the motion region through a background subtraction algorithm, performing color space transformation on the upper region of the motion region, and calculating the proportion of safety helmet color pixels through preset color range, saturation threshold and brightness threshold. When the proportion of safety helmet color pixels exceeds a preset ratio, a personnel detection box and a safety helmet detection box are generated and assigned a medium confidence level. The deep learning target detection model is fused with the detection results of the post-processing verification, and the valid inspection personnel targets are determined based on the fusion results.
[0032] Based on the above embodiments, this embodiment provides a detailed description of the specific implementation of the "identification of inspection personnel wearing safety helmets by combining deep learning models with post-processing verification" in the method for detecting the presence of lingering personnel in regional inspection areas of underground coal mine roadways.
[0033] In this embodiment, this step is implemented in the following way. First, for the video streams collected by each camera in the associated roadway, the YOLO series target detection model is used to output the personnel detection box and the yellow safety helmet detection box frame by frame, along with their respective detection confidence scores.
[0034] When the detection confidence score output by the target detection model is lower than a preset threshold or no valid target is detected, post-processing verification is triggered. This post-processing verification includes the following: The post-processing module uses an improved Gaussian mixture model background subtraction algorithm to segment the foreground of the current frame, extracting the bounding rectangular regions of all moving targets as candidate personnel regions. Then, it performs an RGB-to-HSV color space transformation on the upper region of each candidate personnel region, and calculates the proportion of yellow pixels using preset yellow hue range, saturation threshold, and brightness threshold. When this proportion exceeds a preset ratio, a personnel detection box and a safety helmet detection box are generated and assigned a medium confidence score as a supplement to the deep learning model's missed detections.
[0035] In the result fusion stage, the deep learning object detection model is fused with the detection results of the post-processing verification, and the valid inspection personnel targets are determined based on the fusion result. If the deep learning object detection model has detected both a personnel bounding box and a safety helmet bounding box in the current frame and the intersection-union ratio (IU) meets the preset matching threshold, it is directly determined as a valid inspection personnel target; if the post-processing verification provides a personnel bounding box and a safety helmet bounding box pair that meets the conditions, it is also determined as a valid inspection personnel target; if both provide results, the one with higher confidence is preferred to avoid redundancy.
[0036] In one specific implementation, when the YOLO model's confidence level for detecting personnel or safety helmets is lower than a preset threshold of 0.5 or it fails to detect them at all, the post-processing module is automatically triggered. The post-processing module uses an improved Gaussian mixture model background subtraction algorithm for foreground segmentation. The preset yellow hue range is H∈[25°,35°], the saturation threshold S>0.4, the brightness threshold V>0.3, and the preset proportion of yellow pixels is 30%. After generating the detection boxes, a medium confidence level of 0.7 is assigned. During the fusion stage, if the YOLO model has detected both personnel and safety helmet boxes and the intersection-union ratio (IU / U) meets the preset matching threshold, it is directly determined. If the post-processing verification provides a matching personnel and safety helmet box pair, it is also determined as a valid inspection personnel target and marked as "post-processing supplementary detection" in the status dictionary. If both provide results, the YOLO result with a confidence level greater than 0.8 is prioritized; otherwise, the detection source with higher confidence is used.
[0037] Through the above specific implementation methods, this embodiment significantly improves the robustness of target detection by inspection personnel in the extreme environment of low light, high dust, and high obstruction in underground coal mines, effectively reduces the probability of target loss due to missed detection by the detection model, and provides a reliable detection basis for subsequent dwell time statistics.
[0038] Based on the above embodiments, in some embodiments, the step of dynamically adjusting the threshold for the number of consecutive broken frames based on the current frame image quality and the target's historical detection status, maintaining the tracking state through motion prediction when the target is temporarily not detected, and performing backtracking association through weighted matching when the target reappears to maintain the continuous accumulation of the dwell time includes: A target tracker is used to assign a unique local identifier to each valid inspection personnel target, and a motion prediction algorithm is used to predict the motion trajectory. A status dictionary is maintained for each target, which includes local identifier, historical trajectory, cumulative dwell time, number of consecutive frame breaks, historical detection confidence, historical helmet matching records, alleyway area attributes, and detection source. Based on the target's historical detection confidence, historical frame break frequency, and the current image's light intensity and dust concentration, the threshold for the number of consecutive frame breaks is dynamically adjusted. When the number of consecutive frame breaks of the target does not exceed the dynamically adjusted threshold, the effectiveness of the local identifier is maintained through motion prediction and the cumulative dwell time continues to increase. When the number of consecutive frame breaks of the target exceeds the dynamically adjusted threshold, it is determined that the target has temporarily left and the cumulative dwell time is locked to stop increasing. When a target is detected again after a frame break, the weighted comprehensive matching score between the newly detected target and the target that is temporarily away is calculated. When the weighted comprehensive matching score exceeds the preset backtracking threshold and the camera position where the newly detected target appears matches the pre-configured lane adjacency relationship with the camera position where the backtracked target disappeared, it is determined to be the same target and the duration of the frame break is added to the cumulative dwell time.
[0039] Based on the above embodiments, this embodiment describes in detail the specific implementation of the "dynamically adjusting the threshold of the number of consecutive broken frames based on the image quality of the current frame and the historical detection status of the target, maintaining the tracking status through motion prediction when the target is not detected temporarily, and performing backtracking association through weighted matching when the target reappears in order to maintain the continuous accumulation of the dwell time" in the method for detecting the dwell time of regional-level inspection personnel in coal mine roadways.
[0040] In this embodiment, this step is implemented in the following way. First, a target tracker is used to assign a unique local identifier to each valid inspection personnel target, and a motion prediction algorithm is used to predict the motion trajectory. A status dictionary is maintained for each target, which includes the local identifier, historical trajectory, cumulative dwell time, number of consecutive frame breaks, historical detection confidence, historical matching records of safety helmets, alleyway area attributes, and detection source.
[0041] Specifically, the ByteTrack tracker is used to assign a unique local identifier (local ID) to each valid inspection personnel target, and the Kalman filter algorithm is used to predict the target's movement trajectory. At the same time, a unique state dictionary is maintained for each target, which stores the target's local ID, historical trajectory, cumulative dwell time, number of consecutive frame breaks, historical detection confidence, historical safety helmet matching records, corresponding alleyway area attributes, and detection source.
[0042] The threshold for the number of consecutive frame breaks is dynamically adjusted based on the target's historical detection confidence, historical frame break frequency, and the current image's light intensity and dust concentration. When the number of consecutive frame breaks for the target does not exceed the dynamically adjusted threshold, the effectiveness of the local identifier is maintained through motion prediction, and the cumulative dwell time continues to increase; when the number of consecutive frame breaks for the target exceeds the dynamically adjusted threshold, it is determined that the target has temporarily left, and the cumulative dwell time is locked and stops increasing.
[0043] When a target is detected again after a frame break, a weighted comprehensive matching score is calculated between the newly detected target and the target that is temporarily away. When the weighted comprehensive matching score exceeds a preset backtracking threshold and the camera position where the newly detected target appears matches the pre-configured lane adjacency relationship with the camera position where the backtracked target disappeared, the target is determined to be the same target and the duration of the frame break is added to the cumulative dwell time.
[0044] In one specific implementation, an initial threshold for the number of consecutive frame breaks is preset, and an adaptive dynamic adjustment method is adopted. When the target is not detected in the current frame but the number of consecutive frame breaks does not exceed the currently dynamically adjusted threshold, the target's position in the current frame is predicted using a Kalman filter algorithm to maintain the validity of the target's local ID, and the cumulative dwell time continues to increase. When the number of consecutive frame breaks exceeds the currently dynamically adjusted threshold, it is determined that the target has temporarily left the current camera's field of view, the cumulative dwell time of the target is locked, and the increase of the dwell time is stopped. When the target is detected again after a frame break, the weighted comprehensive matching score S between the newly detected target and all targets in the "temporarily left" state is calculated, and the calculation formula is as follows:
[0045] in It is the bounding box of the broken frame target in the current frame predicted by Kalman filtering. It is the detection box for the new target. It is an appearance feature vector. The function returns 1 if the historical and new detections match, otherwise it returns 0. , , The weight is used as the threshold. When the overall score S exceeds the preset backtracking threshold, and the location of the newly detected target and the location of the camera where the backtracked target disappeared meet the pre-configured lane adjacency relationship, they are determined to be the same target. The duration of the frame break is added to the cumulative dwell time of the target to restore the duration statistics; otherwise, it is considered a new target.
[0046] Through the above specific implementation methods, this embodiment significantly improves the continuity of dwell time statistics in the extreme environment of underground coal mines, effectively reduces the false alarm rate caused by model missed detection or frame breaks, and provides reliable basic data for subsequent cross-camera association and regional dwell time detection.
[0047] Figure 3 This is a schematic diagram illustrating the process of single-camera end-to-well adaptive tracking fault-tolerant processing according to an embodiment of the present invention. Figure 3 As shown, the real-time video stream from the camera is processed frame-by-frame target detection, outputting personnel and safety helmet bounding boxes. Valid inspection personnel targets are determined through cross-validation and threshold matching. The ByteTrack tracker assigns a local ID and maintains a status dictionary. During real-time detection status judgment, if a target is detected, the system combines historical multi-frame records of the safety helmet to maintain the valid target determination, updates the trajectory, accumulates the dwell time, and clears the consecutive frame count. If no target is detected, the system enters the underground adaptive frame-breaking fault-tolerant processing stage. It checks whether the consecutive frame breaks exceed the dynamic threshold. If not, it predicts the position using Kalman filtering, maintains the local ID, and continues to accumulate the duration. If the threshold is exceeded, it determines that the target has temporarily left and locks the duration. Once the target is detected again after a frame break and the backtracking conditions are met, the frame break duration is recalculated and statistics are restored. Finally, the system outputs the local ID, trajectory, accumulated duration, re-identified features, and region attributes.
[0048] Furthermore, the dynamic adjustment of the threshold for the number of consecutive broken frames includes: A comprehensive image quality score is calculated based on the average pixel brightness, contrast, and edge strength of the current frame image. The lower the comprehensive image quality score, the worse the image quality. The dynamic threshold is calculated based on the base tolerance frame count, the overall image quality score, the target's historical frame break frequency, and a preset adjustment coefficient.
[0049] Based on the above embodiments, this embodiment provides a detailed description of the specific implementation of "dynamically adjusting the threshold for the number of consecutive broken frames" in the method for detecting the presence of personnel staying in regional inspection areas of underground coal mine roadways.
[0050] In this embodiment, this step is implemented as follows: First, an overall image quality score is calculated based on the average pixel brightness, contrast, and edge strength of the current frame image. A lower overall image quality score indicates worse image quality. Specifically, this no-reference image quality assessment method comprehensively measures the brightness level, contrast range, and edge sharpness of the current frame image, outputting an overall score ranging from 0 to 1 to characterize the overall quality of the current frame image.
[0051] Then, a dynamic threshold is calculated based on the base tolerance frame count, the overall image quality score, the target's historical frame break frequency, and a preset adjustment coefficient. Specifically, the lower the overall image quality score (i.e., the darker and blurrier the image), the higher the dynamic threshold; and the higher the target's historical frame break frequency, the higher the dynamic threshold. Through this adaptive adjustment mechanism, the system can tolerate more consecutive frame breaks under adverse imaging conditions, avoiding premature determination of target departure due to temporary failure of the detection model, thereby maintaining the continuity of duration statistics.
[0052] In one specific implementation, an overall image quality score Q is calculated based on the average pixel brightness L, contrast C, and edge intensity E of the current frame image. The value of Q ranges from 0 to 1, with a lower Q value indicating poorer image quality. According to the formula: Calculate the dynamic threshold.
[0053] in Based on the number of frames tolerated. and For adjustment coefficients, The historical frame drop frequency is the target. In practical applications, when the screen is well lit and the image is clear, the overall image quality score Q is close to 1, and the dynamic threshold is close to the basic tolerance frame number. When low light or high dust occurs underground, causing the image quality to deteriorate, the Q value decreases, the dynamic threshold increases accordingly, and the system can tolerate more consecutive frame drops, thus maintaining continuous tracking and duration accumulation of the target even in extreme environments.
[0054] Through the aforementioned adaptive dynamic adjustment mechanism, this embodiment enables the threshold for the number of consecutive frame breaks to change dynamically with the real-time downhole imaging conditions, maintaining response sensitivity under good lighting conditions and providing sufficient fault tolerance under adverse conditions, thus achieving a dynamic balance between detection accuracy and tracking continuity.
[0055] Furthermore, the weighted comprehensive matching score is determined based on the weighted comprehensive value of positional overlap, appearance feature similarity, and helmet matching consistency, wherein the positional overlap is calculated based on the bounding box of the broken frame target in the current frame predicted by Kalman filtering and the detection box of the new target.
[0056] Based on the above embodiments, this embodiment provides a detailed description of the specific composition and calculation method of the "weighted comprehensive matching score" in the method for detecting the presence of personnel staying in regional inspection areas of underground coal mine roadways.
[0057] In this embodiment, the weighted comprehensive matching score is determined based on a weighted comprehensive value of positional overlap, appearance feature similarity, and helmet matching consistency. Specifically, when a target is detected again after a frame break, the system needs to determine whether the newly detected target is the same person as a target that was previously in a "temporarily absent" state, and calculates a comprehensive matching score for this purpose. This score comprehensively evaluates the similarity between the two from three dimensions: First, positional overlap, which measures the degree of spatial overlap between the position of the newly detected target in the current frame and the predicted position of the target obtained based on motion prediction, reflecting the continuity and consistency of the target's movement; second, appearance feature similarity, which measures the similarity between the newly detected target and the historical target in terms of appearance visual features, reflecting the stability of the target's visual appearance; and third, helmet matching consistency, which measures whether the newly detected target and the historical target are consistent in terms of helmet detection results, reflecting the continuity of the target's key attribute identification. The scores of the three dimensions are weighted and summed according to preset weights to obtain the final comprehensive matching score. When the comprehensive matching score exceeds a preset backtracking threshold, the validity of the lane adjacency relationship is verified to determine whether they are the same target.
[0058] The positional overlap is calculated based on the bounding box of the target in the current frame predicted by the Kalman filter and the detection box of the new target. Specifically, the Kalman filter algorithm predicts the position and bounding box range of the target in the current frame based on the target's historical motion state (including position, velocity, etc.). The degree of overlap (e.g., Intersection over Union (IoU)) between the predicted bounding box and the actual detection box of the newly detected target in the current frame is the positional overlap. The higher the overlap, the more closely the position of the newly detected target matches the predicted position based on the historical motion trajectory, and the greater the probability that they are the same target.
[0059] In one specific implementation, the weighted composite matching score S is calculated using the following formula:
[0060] in It is the bounding box of the broken frame target in the current frame predicted by Kalman filtering. The detection bounding box of the new target is used, and the IoU function calculates the intersection-union ratio (IoU) of the two bounding boxes as the positional overlap. The CosSim function calculates the cosine similarity between the appearance feature vectors of the historical target and the new target as the appearance feature similarity. The function returns 1 if the historical and new detections match, otherwise 0, as a quantification value of the helmet matching consistency; , , The weights are used to control the contribution of the three dimensions to the overall score. In practical applications, positional overlap reflects the physical continuity of target movement, appearance feature similarity reflects the visual consistency of the target, and safety helmet matching consistency reflects the stable identification of the target's key attributes. These three complement and verify each other. For example, in scenarios where high dust levels underground cause blurred appearance features, the weights of positional overlap and safety helmet matching consistency can be relatively increased to compensate for the decrease in appearance feature distinguishability. In scenarios where people are densely packed and close to each other, the weights of appearance feature similarity and safety helmet matching consistency can be relatively increased to solve the confusion problem that can easily arise from relying solely on positional information. When the overall score S exceeds the preset backtracking threshold, after the validity verification of the roadway adjacency relationship is passed, it is determined to be the same target, and the duration of the frame break is added to the cumulative dwell time to restore the duration statistics.
[0061] Through the above three-dimensional weighted comprehensive matching mechanism, this embodiment makes full use of the complementary advantages of positional motion information, appearance visual information and safety helmet attribute identification information. In the complex scene of low light, high dust and dense personnel in coal mines, it significantly improves the accuracy of target backtracking association after frame breakage and effectively avoids duration statistics distortion caused by incorrect association.
[0062] Furthermore, the process of maintaining the tracking state through motion prediction also includes: when a person target is detected in a certain frame but no corresponding safety helmet is detected, querying the historical matching record of the safety helmet corresponding to the local identifier of the target; if at least two frames in the past preset number of frames have matched the safety helmet at the same time, then the valid inspection personnel determination is maintained and the cumulative dwell time is not interrupted.
[0063] Based on the above embodiments, this embodiment provides a detailed description of the specific implementation of the "safety helmet soft judgment mechanism" in the method for detecting the presence of personnel staying in underground roadways in coal mines.
[0064] In this embodiment, the process of maintaining the tracking state through motion prediction also includes a soft-determination mechanism for helmet detection. Specifically, in actual underground monitoring scenarios, due to factors such as low light, high dust, changes in target posture, or partial occlusion, the detection model may fail to detect the helmet worn by the personnel in some frames, but the personnel target itself may still be detected. If the personnel are directly determined as "non-inspection personnel" (i.e., not wearing a helmet), it will lead to the loss of effective inspection personnel targets or the interruption of duration statistics. To solve this problem, this embodiment introduces a soft-determination mechanism based on historical information.
[0065] The mechanism works as follows: when a personnel target is detected in a frame but no corresponding safety helmet is detected, the system does not immediately classify the target as an invalid inspection personnel. Instead, it queries the historical matching records of the safety helmet corresponding to the target's local identifier. If at least two frames in the past preset number of frames have simultaneously matched a safety helmet, the target's status as an invalid inspection personnel is maintained, and the statistics of accumulated dwell time are not interrupted. The core logic of this mechanism is that safety helmets, as standard equipment worn by underground inspection personnel, have strong temporal continuity and should not negate the target's valid identity due to occasional missed detections in a single frame or a few frames. By reviewing historical matching records, the system can make a reasonable judgment based on the target's long-term stable safety helmet wearing history even when the detection model temporarily fails, thereby maintaining the continuity of the dwell time statistics.
[0066] In one specific implementation, when a person is detected in a frame but no corresponding safety helmet is detected, the system queries the historical matching record of the safety helmet corresponding to the target's local ID. If at least 3 out of the past 10 frames have simultaneously matched a safety helmet, the target's status as a valid inspection personnel is maintained, and the duration statistics are not interrupted. In other words, the system maintains a sliding window of length N, recording whether the target is detected with both a person and a safety helmet in each frame within the window (i.e., whether it is determined to be a valid inspection personnel). When a frame shows a person detected but a safety helmet not detected, the system counts the number M frames in the past N frames where the target has been determined to be a valid inspection personnel. If M ≥ a preset threshold (e.g., M ≥ 2), the system considers the target to have a historically stable and valid inspection personnel status, and the failure to detect a safety helmet in the current frame is considered an occasional detection failure. Therefore, its status as a valid inspection personnel is maintained, and the cumulative dwell time continues to increase. Only when the number of consecutive frames without a safety helmet detected reaches a more serious level (e.g., the number of consecutive frame breaks exceeds a dynamically adjusted threshold) does the system determine that the target has left the field of view and lock the dwell time.
[0067] In a more specific implementation, N=10 and M=3 are set. This means that if at least 3 out of the past 10 frames have simultaneously matched a person and a safety helmet, then even if a person is detected but a safety helmet is not, the valid inspection personnel determination is maintained in the current frame, and the duration statistics are not interrupted. In another implementation, N=8 and M=2. This means that a soft determination is triggered when at least 2 out of the past 8 frames have simultaneously matched a person and a safety helmet. These parameters can be adaptively configured according to the lighting conditions and dust concentration in different areas underground. Areas with good lighting and low dust can be set with smaller N and M values for a more sensitive response; areas with poor lighting and high dust can be set with larger N and M values for greater fault tolerance.
[0068] Through the aforementioned soft-determination mechanism for safety helmets, this embodiment effectively avoids the problems of misjudging effective inspection personnel targets and interrupting duration statistics due to occasional missed detections by the safety helmet detection model. This significantly improves the robustness and continuity of dwell time statistics and further reduces the false alarm rate of dwell detection in extreme underground environments. This mechanism complements the aforementioned adaptive frame-breaking fault-tolerant mechanism—the former addresses the situation where "safety helmets are missed but personnel are detected," while the latter addresses the situation where "neither personnel nor safety helmets are detected." Together, they constitute a multi-fault-tolerant system at the single-camera end, comprehensively covering various detection failure modes in extreme imaging environments in coal mines.
[0069] Based on the above embodiments, in some embodiments, the pre-configured adjacency relationships, access attributes, and reasonable time range for the target to move between adjacent cameras within the associated alleyway include: Configure the adjacency relationship of each camera in the associated alley, the field of view coverage of the alley, and the one-way or two-way passage attributes of each alley. The adjacency relationship includes adjacent cameras with overlapping fields of view and long-distance continuous cameras with no overlapping fields of view but connected inspection paths. Configure the shortest and longest time thresholds for the target to move between adjacent cameras. For one-way passageways, only the spatiotemporal thresholds for one direction are configured. For long-distance connecting passageways, the spatiotemporal thresholds are preset based on the passageway length and the normal walking speed of the underground inspection personnel.
[0070] Furthermore, the shortest duration threshold is determined based on the distance between cameras and the maximum walking speed of personnel, while the longest duration threshold is determined based on the distance between cameras, the minimum walking speed of personnel, and a preset inspection operation interference time. The method for determining whether cross-camera movement conforms to spatiotemporal logic is as follows: set the time difference between the departure time stamp of the target in the front camera and the entry time stamp in the rear camera. Only when the time difference is not less than the corresponding shortest duration threshold and not greater than the corresponding longest duration threshold, the cross-camera movement is determined to conform to spatiotemporal logic.
[0071] Based on the above embodiments, this embodiment provides a detailed description of the specific implementation of the "pre-configuration of the adjacency relationship, passage attributes and reasonable time range for the target to move between adjacent cameras in the associated roadway area-level inspection personnel lingering detection method in coal mine underground roadways, forming a spatiotemporal constraint rule adapted to the underground roadway topology" and the corresponding spatiotemporal judgment logic.
[0072] In this embodiment, this step is implemented in the following way. First, based on the actual physical layout of the associated roadways to be inspected in the coal mine and the deployment location of the cameras, the topological relationship of each camera is pre-configured. Specifically, the adjacency relationship of each camera in the associated roadway, the roadway's field of view coverage, and the one-way or two-way passage attributes of each roadway are configured, covering all scenarios of underground roadways, including linear main roadways, branch roadways, fully mechanized mining faces, and tunneling faces; wherein, the adjacency relationship includes adjacent cameras with overlapping fields of view and long-distance continuous cameras with no overlapping fields of view but connected inspection paths, ensuring that all possible inspection paths are included in the topology configuration.
[0073] Secondly, based on the above topological relationship, the shortest and longest time thresholds for the target to move between adjacent cameras are configured. For one-way passageways, only the spatiotemporal thresholds in one direction are configured. For long-distance connecting passageways, the spatiotemporal thresholds are preset based on the passageway length and the normal walking speed of the underground inspection personnel.
[0074] In one specific implementation, the shortest duration threshold The threshold is determined based on the distance between cameras and the maximum walking speed of a person. Specifically, for movement from camera i to camera j, the shortest duration threshold is determined. ,in Let be the distance from camera i to camera j. Maximum walking speed for individuals; longest duration threshold. The calculation formula is determined based on the distance between cameras, the minimum walking speed of personnel, and the preset inspection operation interference time. ,in The minimum walking speed for people, This is a preset inspection operation interference time, used to account for brief stops that personnel may make during their journey due to equipment checks, data recording, etc. For one-way passageways, only the spatiotemporal thresholds in that direction of travel are configured; for long-distance connecting passageways, the spatiotemporal thresholds are preset based on the actual length of the passageway and the normal walking speed of the underground inspection personnel.
[0075] The method for determining whether cross-camera movement conforms to spatiotemporal logic is as follows: set the time difference between the departure time stamp of the target in the front camera and the entry time stamp in the rear camera. Only when the time difference is not less than the corresponding shortest duration threshold and not greater than the corresponding longest duration threshold, the cross-camera movement is determined to conform to spatiotemporal logic.
[0076] In one specific implementation, let the timestamp of the target leaving camera i be... The timestamp of camera j entering is Only if the inequality is satisfied If the movement across cameras is deemed to conform to spatiotemporal logic, the matching pair is retained for subsequent feature comparison; otherwise, it is directly filtered out, and invalid matches are excluded.
[0077] Through the above configuration and judgment, a strong prior filter based on the roadway topology is provided for cross-camera target association. This filter can filter out a large number of invalid matching pairs that do not conform to the underground passage logic, significantly reducing the false matching rate, while adapting to the differentiated management and control needs of roadways with different risk levels.
[0078] Based on the above embodiments, in some embodiments, the step of extracting the appearance feature vector of each inspection personnel target through each camera node, synchronizing the target information to the central node, and then having the central node perform initial screening of cross-camera target matching pairs according to the spatiotemporal constraint rules, calculating feature similarity for the matching pairs that pass the initial screening, determining matching pairs with similarity meeting a threshold as the same target, and assigning them a globally unique identifier, includes: By employing a lightweight re-identification model optimized for low-light conditions and homogeneous personnel appearance in underground coal mines at each edge camera node, a preset dimension appearance feature vector is extracted in real time for each valid inspection personnel target. The appearance feature vector integrates multi-dimensional features of safety helmet markings and reflective strips on work clothes. The target's local identifier, feature vector, timestamp, and location information are synchronized to the downhole central node through each edge camera node; The central node performs initial screening based on pre-configured lane topology and reasonable spatiotemporal thresholds to filter cross-camera target matching pairs that do not conform to lane passage logic and spatiotemporal movement logic. For target matching pairs that pass the initial screening, calculate the cosine similarity between feature vectors. When the cosine similarity is greater than or equal to the preset matching threshold, they are determined to be the same inspection personnel target. Assign a globally unique identifier to them and establish a mapping relationship between the global identifier and the local identifier of each camera.
[0079] Based on the above embodiments, this embodiment provides a detailed description of the specific implementation of the "method for detecting the presence of patrol personnel in underground roadways of coal mines" which involves "extracting the appearance feature vector of each patrol personnel target through each camera node, synchronizing the target information to the central node, using the central node to perform initial screening of cross-camera target matching pairs according to the spatiotemporal constraint rules, calculating the feature similarity of the matching pairs that pass the initial screening, determining matching pairs whose similarity meets the threshold as the same target, and assigning them a globally unique identifier".
[0080] In this embodiment, this step specifically achieves global association and allocation of globally unique identifiers for cross-camera targets in the following manner.
[0081] First, a lightweight re-identification model optimized for low-light conditions and homogeneous personnel appearance in coal mines is used at each edge camera node to extract a preset-dimensional appearance feature vector for each valid inspection personnel target in real time. This appearance feature vector integrates multi-dimensional features from safety helmet markings and reflective strips on workwear. Specifically, the safety helmet marking feature emphasizes the most prominent visual distinguishing element of underground personnel, while the reflective strip feature captures highly recognizable reflective information from the personnel's clothing. The combination of these two features enhances the distinguishing ability under conditions of highly homogeneous personnel appearance.
[0082] In one specific implementation, each edge camera node utilizes its built-in processing unit to employ a lightweight OSNet-Lite re-identification model, finely tuned and optimized for low-light conditions and homogeneous personnel appearances in underground coal mines, to extract a 128-dimensional appearance feature vector for each valid inspection personnel target in real time. This feature vector integrates multi-dimensional features from safety helmet markings and reflective strips on work clothes, with safety helmet features accounting for 50%, clothing texture for 40%, and other item features for 10%.
[0083] Secondly, the target's local identifier, feature vector, timestamp, and location information are synchronized to the downhole central node through each edge camera node. Each edge node transmits only a very small amount of structured information, resulting in a light communication burden.
[0084] Then, the central node performs an initial screening based on the pre-configured tunnel topology and reasonable spatiotemporal thresholds, filtering out cross-camera target matching pairs that do not conform to the tunnel passage logic and spatiotemporal movement logic. Specifically, the central node performs spatiotemporal logic verification on targets from different cameras based on the adjacency relationships, passage attributes, and shortest / longest duration thresholds configured in the aforementioned embodiments, retaining only matching pairs that conform to the underground tunnel passage logic for subsequent processing.
[0085] Finally, the cosine similarity between feature vectors of the target matching pairs that pass the initial screening is calculated. When the cosine similarity is greater than or equal to the preset matching threshold, they are determined to be the same inspection personnel target. A globally unique identifier is assigned to them and a mapping relationship between the global identifier and the local identifier of each camera is established.
[0086] In one specific implementation, the globally unique identifier has three states: active (meaning the target is within the current camera's field of view), dormant (meaning the target is within the frame-breaking tolerance period), and expired (meaning the target has left the area). When performing cross-camera target association, the central node prioritizes searching for matches in the target pool where the global identifier is in a dormant or active state. For a dormant target that is successfully associated with an active target from another camera, its global identifier state is updated to active, thereby achieving continuous cross-camera tracking.
[0087] By employing the aforementioned second-order association strategy, a coarse screening is first performed using spatiotemporal constraint rules adapted to the underground tunnel topology. Then, a lightweight feature matching optimized for underground scenarios is used to effectively filter out invalid matching pairs that do not conform to the underground passage logic. This significantly improves the accuracy and efficiency of cross-camera target association, providing a reliable global identification foundation for subsequent regional-level dwell time accumulation.
[0088] Figure 4 This is a schematic diagram illustrating the process of global target association across cameras in an underground coal mine, according to an embodiment of the present invention. Figure 4 As shown, multiple edge camera nodes perform target detection and tracking on their respective video streams, extract lightweight re-identification features, and synchronize local IDs, feature vectors, timestamps, and location information to the central node. The central node first imports pre-configured lane topology and spatiotemporal constraint rules, performs spatiotemporal initial screening on cross-camera target matching pairs, filtering out invalid matching pairs that do not conform to lane passage logic and spatiotemporal movement logic; then, it calculates the cosine similarity between feature vectors of the matching pairs that pass the initial screening for feature matching to determine whether they are the same target; for personnel determined to be the same target, it assigns a globally unique ID and establishes a mapping relationship between the global ID and the local IDs of each camera, finally outputting the global ID and the stitched complete trajectory segment.
[0089] Based on the above embodiments, in some embodiments, the step of stitching together the trajectory segments of the target under all cameras in the associated lane based on the globally unique identifier, accumulating the total dwell time of the target in the associated lane, and triggering a corresponding level of dwell alarm when the total dwell time reaches a preset alarm threshold for the corresponding area, includes: For each globally unique inspection personnel target, the cumulative dwell time of the target under each camera in the associated roadway and the reasonable movement time between adjacent cameras are combined and statistically analyzed to obtain the total dwell time in the associated roadway. The target is determined to have left the associated alley and the total dwell time is reset only when the target leaves the preset exit of the associated alley or disappears from the field of view of all cameras in the associated alley for a period of time exceeding the preset area departure threshold; Different alarm thresholds and alarm levels are preset for roadway areas with different risk levels. Lower alarm thresholds and higher alarm levels are set for high-risk areas, while higher alarm thresholds and lower alarm levels are set for low-risk areas. When the total dwell time of the target reaches the alarm threshold of the corresponding area, the corresponding level of alarm is triggered, and the alarm time, roadway area name, target global identifier, complete trajectory segment and real-time video are output simultaneously.
[0090] Based on the above embodiments, this embodiment provides a detailed description of the specific implementation of the "method for detecting the lingering of personnel in a regional-level inspection area of underground coal mine roadways" which involves "splitting the trajectory segments of the target under all cameras in the associated roadway based on a globally unique identifier, accumulating the total dwell time of the target in the associated roadway, and triggering a corresponding level of lingering alarm when the total dwell time reaches the preset alarm threshold of the corresponding area".
[0091] In this embodiment, this step is specifically implemented in the following manner.
[0092] First, for each globally uniquely identified inspection personnel target, the cumulative dwell time under each camera in the associated lane and the reasonable movement time between adjacent cameras are combined and statistically analyzed to obtain the total dwell time in the associated lane. Specifically, the central node maintains a global trajectory stitching module. This module uses the globally unique identifier as an index to read the historical detection records of the target under all cameras in the associated lane from the database, including the entry timestamp, exit timestamp, cumulative dwell time, and movement time difference between adjacent cameras for each camera. During stitching, the cumulative dwell time of the target under each camera in the associated lane is summed up, and the reasonable movement time of the target between adjacent cameras is also included in the statistics. The reasonable movement time refers to the time difference between the target leaving the field of view of one camera and entering the field of view of an adjacent camera. This time difference must meet the aforementioned pre-configured minimum and maximum time threshold constraints. Only when the time difference is within this reasonable range is the movement time included in the total dwell time. Through the above methods, the system has achieved accurate statistics on the time that inspection personnel spend in the entire associated alleyway, breaking through the limitation of the short field of view of a single camera.
[0093] Secondly, the system determines that a target has left the associated roadway and resets the total dwell time only when the target leaves through a preset exit of the associated roadway or disappears from the field of view of all cameras in the associated roadway for a period exceeding a preset area departure threshold. Specifically, the central node sets two departure determination conditions: first, when the target disappears from the field of view of a camera at a preset exit of the associated roadway and does not subsequently reappear in the field of view of any camera in the associated roadway within the preset area departure threshold time, the target is determined to have left the associated roadway; second, when the target disappears from the field of view of all cameras in the associated roadway for a period exceeding the preset area departure threshold, the target is also determined to have left the associated roadway. Once the target is determined to have left, the central node immediately resets the total dwell time corresponding to the globally unique identifier and updates its global identifier status to expired. This determination mechanism fully considers the structural characteristics of the topology of underground roadways in coal mines—inspection personnel must use specific exits to leave a certain associated area, and simply switching between the fields of view of different cameras should not be mistakenly judged as leaving.
[0094] Secondly, differentiated alarm thresholds and alarm levels are preset for roadway areas with different risk levels. High-risk areas are set with lower alarm thresholds and higher alarm levels, while low-risk areas are set with higher alarm thresholds and lower alarm levels. Specifically, the central node pre-stores differentiated alarm configurations for different risk levels within associated roadways. For high-risk areas such as fully mechanized mining faces and tunneling faces, where safety risks such as gas outbursts and roof collapses are significantly higher than in other areas, abnormal personnel stays in these areas require more timely warnings. Therefore, lower alarm thresholds (i.e., shorter allowed stay times) and higher alarm levels are set. For low-risk areas such as main haulage roadways and auxiliary haulage roadways, where the safety of normal passage and short stays is relatively high, higher alarm thresholds (i.e., longer allowed stay times) and lower alarm levels are set. Through this differentiated, tiered alarm strategy, the system can accurately configure alarm sensitivity according to the actual safety risk level of different areas, ensuring timely warnings for high-risk areas while avoiding excessive alarms in low-risk areas.
[0095] Finally, when the total dwell time of the target reaches the alarm threshold for the corresponding area, an alarm of the corresponding level is triggered, and the alarm time, roadway area name, target global identifier, complete trajectory segment, and real-time video footage are output simultaneously. Specifically, after the alarm is triggered, the alarm output module immediately generates an alarm record containing multi-dimensional information: the alarm time records the moment the alarm was triggered; the roadway area name identifies the specific location where the alarm occurred; the target global identifier uniquely points to the inspector involved; the complete trajectory segment includes the target's entry / exit timestamps, location coordinates, and movement path under all cameras in the associated roadway, which can completely present the target's entire activity trajectory during the alarm period; and the real-time video footage provides on-site video evidence at the time of the alarm. The above alarm information is simultaneously pushed to the coal mine underground safety monitoring system and personnel management platform, and different push methods can be selected according to the alarm level.
[0096] In one specific implementation, the total dwell time of the target under each camera in the associated roadway is combined with the reasonable movement time between adjacent cameras to obtain the total dwell time. For high-risk areas such as fully mechanized mining faces and tunneling faces, a first-level alarm threshold (e.g., 15 minutes) and a highest alarm level (Level 1 alarm) are preset; for low-risk areas such as main haulage roadways and auxiliary haulage roadways, a second-level alarm threshold (e.g., 30 minutes) and a normal alarm level (Level 2 alarm) are preset. The central node compares the current total dwell time with the alarm threshold corresponding to the target's area in real time. When the total dwell time reaches or exceeds the threshold, the corresponding level of alarm is immediately triggered. A Level 1 alarm triggers an audible and visual alarm and simultaneously sends an SMS notification to underground inspection dispatchers and surface control personnel; a Level 2 alarm only triggers an SMS notification. The alarm output module simultaneously outputs the alarm time, roadway area name, target global identifier, complete trajectory segment of the target in the associated roadway, and real-time video footage, and pushes the alarm information to the coal mine underground safety monitoring system and personnel management platform. The area departure threshold is preset to 30 minutes. That is, when the target disappears from the field of view of all cameras in the associated alley for more than 30 minutes, the system determines that it has left the associated area and resets the total stay time.
[0097] Through the above specific implementation methods, this invention achieves accurate stitching of multi-camera trajectories and continuous accumulation of total dwell time at the regional level based on a globally unique identifier. Combined with departure judgment rules based on roadway topology and differentiated hierarchical alarm strategies, it effectively eliminates blind spots in control caused by the short field of view of a single camera and adapts to the safety control requirements of different risk areas in underground coal mines, significantly improving the accuracy and practicality of dwell detection.
[0098] Figure 5 This is a block diagram of the architecture of a regional-level inspection personnel lingering detection system for underground coal mine roadways, according to an embodiment of the present invention. Figure 5As shown, the system, from bottom to top, includes: underground edge camera nodes, which use intrinsically safe network cameras for mining and integrate edge computing nodes to complete video acquisition and front-end target detection; a coal mine industrial Ethernet ring network, which serves as a transmission channel connecting the underground edge cameras and the central association module to achieve reliable transmission of target information, trajectory data, and control commands; and a central association module, deployed on a ground server, which internally includes a roadway topology and spatiotemporal constraint configuration unit, a cross-camera target spatiotemporal initial screening unit, a feature matching unit, a global ID allocation unit, a trajectory stitching and regional-level dwell time accumulation unit, as well as a target detection unit and a target tracking unit. The system comprises a single-camera target detection and tracking unit, an adaptive frame-breaking fault-tolerant unit, a safety helmet soft-determination unit, and a lightweight re-identification feature extraction unit. These units handle single-camera target detection and tracking with fault tolerance, as well as cross-camera target association, global ID allocation, multi-camera trajectory stitching, and regional total dwell time statistics. The alarm output module interfaces with the coal mine safety monitoring system, the dispatch center control platform, and underground / surface mobile terminals. Internally, it includes a tiered alarm determination unit, an alarm information output unit, and a message push unit. These units trigger tiered alarms based on regional risk levels and dwell time thresholds, outputting alarm information, target trajectories, and real-time video feeds, and pushing them to relevant control terminals. Arrows between the various levels indicate the data flow and interaction relationships.
[0099] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0100] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0101] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0102] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0103] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.
Claims
1. A method for detecting the presence of patrol personnel in underground coal mine roadways at the regional level, characterized in that, include: The video streams captured by each camera in the associated roadway are processed frame by frame. The target of the inspection personnel wearing safety helmets is identified by combining deep learning model with post-processing verification, and a unique local identifier is assigned to each target. The threshold for the number of consecutive broken frames is dynamically adjusted based on the current frame image quality and the target's historical detection status. When the target is not detected temporarily, the tracking status is maintained through motion prediction, and when the target reappears, backtracking is performed through weighted matching to maintain the continuous accumulation of dwell time. The adjacency relationship, access attributes, and reasonable time range for the target to move between adjacent cameras are pre-configured for each camera in the associated roadway, forming a spatiotemporal constraint rule that adapts to the topology of the underground roadway. The appearance feature vector of each inspection personnel target is extracted by each camera node, and the target information is synchronized to the central node. The central node performs a preliminary screening of cross-camera target matching pairs according to the spatiotemporal constraint rules, and then calculates the feature similarity of the matching pairs that pass the preliminary screening. Matching pairs that meet the similarity threshold are determined to be the same target and are assigned a globally unique identifier. Based on the globally unique identifier, the trajectory segments of the target under all cameras in the associated lane are stitched together, and the total dwell time of the target in the associated lane is accumulated. When the total dwell time reaches the preset alarm threshold of the corresponding area, the corresponding level of dwell alarm is triggered and alarm information is output.
2. The method as described in claim 1, characterized in that, The method of identifying inspection personnel wearing safety helmets by combining deep learning models with post-processing verification includes: A deep learning object detection model is used to output personnel detection boxes and safety helmet detection boxes frame by frame, along with detection confidence scores. When the detection confidence output by the target detection model is lower than a preset threshold or no valid target is detected, post-processing verification is triggered. The post-processing verification includes: extracting the motion region through a background subtraction algorithm, performing color space transformation on the upper region of the motion region, and calculating the proportion of safety helmet color pixels through preset color range, saturation threshold and brightness threshold. When the proportion of safety helmet color pixels exceeds a preset ratio, a personnel detection box and a safety helmet detection box are generated and assigned a medium confidence level. The deep learning target detection model is fused with the detection results of the post-processing verification, and the valid inspection personnel targets are determined based on the fusion results.
3. The method as described in claim 1, characterized in that, The method of dynamically adjusting the threshold for the number of consecutive broken frames based on the current frame image quality and the target's historical detection status, maintaining the tracking state through motion prediction when the target is temporarily not detected, and performing backtracking association through weighted matching when the target reappears to maintain the continuous accumulation of dwell time includes: A target tracker is used to assign a unique local identifier to each valid inspection personnel target, and a motion prediction algorithm is used to predict the motion trajectory. A status dictionary is maintained for each target, which includes local identifier, historical trajectory, cumulative dwell time, number of consecutive frame breaks, historical detection confidence, historical helmet matching records, alleyway area attributes, and detection source. Based on the target's historical detection confidence, historical frame break frequency, and the current image's light intensity and dust concentration, the threshold for the number of consecutive frame breaks is dynamically adjusted. When the number of consecutive frame breaks of the target does not exceed the dynamically adjusted threshold, the effectiveness of the local identifier is maintained through motion prediction and the cumulative dwell time continues to increase. When the number of consecutive frame breaks of the target exceeds the dynamically adjusted threshold, it is determined that the target has temporarily left and the cumulative dwell time is locked to stop increasing. When a target is detected again after a frame break, the weighted comprehensive matching score between the newly detected target and the target that is temporarily away is calculated. When the weighted comprehensive matching score exceeds the preset backtracking threshold and the camera position where the newly detected target appears matches the pre-configured lane adjacency relationship with the camera position where the backtracked target disappeared, it is determined to be the same target and the duration of the frame break is added to the cumulative dwell time.
4. The method as described in claim 3, characterized in that, The dynamic adjustment of the threshold for the number of consecutive broken frames includes: A comprehensive image quality score is calculated based on the average pixel brightness, contrast, and edge strength of the current frame image. The lower the comprehensive image quality score, the worse the image quality. The dynamic threshold is calculated based on the base tolerance frame count, the overall image quality score, the target's historical frame break frequency, and a preset adjustment coefficient.
5. The method as described in claim 3, characterized in that, The weighted composite matching score is determined based on a weighted composite value of positional overlap, appearance feature similarity, and helmet matching consistency, wherein the positional overlap is calculated based on the bounding box of the broken frame target in the current frame predicted by Kalman filtering and the detection box of the new target.
6. The method as described in claim 3, characterized in that, The process of maintaining the tracking state through motion prediction also includes: when a person target is detected in a certain frame but no corresponding safety helmet is detected, querying the historical matching record of the safety helmet corresponding to the local identifier of the target; if at least two frames in the past preset number of frames have matched the safety helmet at the same time, then the valid inspection personnel determination is maintained and the cumulative dwell time is not interrupted.
7. The method as described in claim 1, characterized in that, The pre-configured adjacency relationships, access attributes, and reasonable time range for target movement between adjacent cameras within the associated alleyway include: Configure the adjacency relationship of each camera in the associated alley, the field of view coverage of the alley, and the one-way or two-way passage attributes of each alley. The adjacency relationship includes adjacent cameras with overlapping fields of view and long-distance continuous cameras with no overlapping fields of view but connected inspection paths. Configure the shortest and longest time thresholds for the target to move between adjacent cameras. For one-way passageways, only the spatiotemporal thresholds for one direction are configured. For long-distance connecting passageways, the spatiotemporal thresholds are preset based on the passageway length and the normal walking speed of the underground inspection personnel.
8. The method as described in claim 7, characterized in that, The shortest duration threshold is determined based on the distance between cameras and the maximum walking speed of personnel, while the longest duration threshold is determined based on the distance between cameras, the minimum walking speed of personnel, and the preset inspection operation interference time. The method for determining whether cross-camera movement conforms to spatiotemporal logic is as follows: set the time difference between the departure time stamp of the target in the front camera and the entry time stamp in the rear camera. Only when the time difference is not less than the corresponding shortest duration threshold and not greater than the corresponding longest duration threshold, the cross-camera movement is determined to conform to spatiotemporal logic.
9. The method as described in claim 1, characterized in that, The process involves extracting the appearance feature vector of each inspection personnel target from each camera node and synchronizing the target information to the central node. The central node then performs initial screening of cross-camera target matching pairs based on the spatiotemporal constraint rules. Next, it calculates the feature similarity of the pre-screened matching pairs, classifies matching pairs with similarity thresholds as the same target, and assigns each pair a globally unique identifier. By employing a lightweight re-identification model optimized for low-light conditions and homogeneous personnel appearance in underground coal mines at each edge camera node, a preset dimension appearance feature vector is extracted in real time for each valid inspection personnel target. The appearance feature vector integrates multi-dimensional features of safety helmet markings and reflective strips on work clothes. The target's local identifier, feature vector, timestamp, and location information are synchronized to the downhole central node through each edge camera node; The central node performs initial screening based on pre-configured lane topology and reasonable spatiotemporal thresholds to filter cross-camera target matching pairs that do not conform to lane passage logic and spatiotemporal movement logic. For target matching pairs that pass the initial screening, calculate the cosine similarity between feature vectors. When the cosine similarity is greater than or equal to the preset matching threshold, they are determined to be the same inspection personnel target. Assign a globally unique identifier to them and establish a mapping relationship between the global identifier and the local identifier of each camera.
10. The method as described in claim 1, characterized in that, The system stitches together the target's trajectory segments from all cameras within the associated lane based on a globally unique identifier, accumulates the target's total dwell time within the associated lane, and triggers a corresponding level of loitering alarm when the total dwell time reaches a preset alarm threshold for the corresponding area, including: For each globally unique inspection personnel target, the cumulative dwell time of the target under each camera in the associated roadway and the reasonable movement time between adjacent cameras are combined and statistically analyzed to obtain the total dwell time in the associated roadway. The target is determined to have left the associated alleyway and the total dwell time is reset only when the target leaves the preset exit of the associated alleyway or disappears from the field of view of all cameras in the associated alleyway for a period of time exceeding the preset area departure threshold; Different alarm thresholds and alarm levels are preset for roadway areas with different risk levels. Lower alarm thresholds and higher alarm levels are set for high-risk areas, while higher alarm thresholds and lower alarm levels are set for low-risk areas. When the total dwell time of the target reaches the alarm threshold of the corresponding area, the corresponding level of alarm is triggered, and the alarm time, roadway area name, target global identifier, complete trajectory segment and real-time video are output simultaneously.