Personnel riding distance insufficiency detection method for removable overhead man-riding device
Through the passenger distance monitoring method based on the YOLOv5 detection model, the problem of personnel distance monitoring in underground transportation of coal mines is solved, efficient and accurate distance monitoring is achieved, and transportation safety and reliability are improved.
Patent Information
- Application Number
- CN202411879152.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-19
AI Technical Summary
The prior art is difficult to achieve accurate monitoring of passenger distances in underground transportation of coal mines, resulting in an increase in the risk of safety accidents.
Based on the YOLOv5 detection model, combined with image preprocessing, post-processing algorithms and improved object detection methods, an efficient and accurate method for monitoring distances of passengers was developed. This method realizes accurate detection and monitoring of passengers in complex underground environments by optimizing model structure, enhancing image processing, introducing joint training and real-time analysis technologies.
Accurate monitoring of the distance of passengers in the underground transportation environment is achieved, transportation safety and reliability are improved, and errors and inefficiency of manual monitoring are reduced.
Smart Images

Figure CN119785289A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the fields of coal mine safety engineering technology and artificial intelligence technology, and specifically relates to a method for detecting insufficient riding distance of a person on a detachable monkey car. Background Art
[0002] The detachable monkey cart is a tool widely used in underground transportation in coal mines, mainly for transporting personnel and materials. In the underground working environment of coal mines, the shaft space is narrow, and it is crucial to keep a safe distance between people riding the monkey cart. In recent years, with the expansion of coal mine production scale and the improvement of mechanization, the safety of underground transportation has received more and more attention.
[0003] According to the requirements of China's "Coal Mine Safety Regulations" and related policy documents, coal mining enterprises must take effective measures to ensure the transportation safety of underground personnel. The "Work Safety Law of the People's Republic of China" and the "Coal Mine Safety Regulations" clearly stipulate that coal mining enterprises should establish and improve the safety production responsibility system, strengthen the monitoring and management of underground transportation systems, and prevent safety accidents caused by insufficient riding distance for personnel.
[0004] In order to solve the problem of personnel distance monitoring in underground transportation, an automatic and accurate technology is urgently needed. In recent years, the existing personnel riding distance monitoring methods based on artificial intelligence and deep learning technology mainly rely on manual observation and management, which is not only inefficient but also prone to omissions. Manual monitoring not only requires high concentration of personnel, but also has the problem of inaccurate subjective judgment, and it is difficult to cope with the complex and changeable underground environment. In addition, with the development of automation and intelligentization of underground transportation systems in coal mines, traditional monitoring methods can no longer meet the needs of modern coal mine safety production. Summary of the invention
[0005] In order to solve the technical problems existing in the prior art, the present invention is based on the mainstream YOLOv5 detection model, and combines image preprocessing, post-processing algorithms and improved target detection methods to provide an efficient and accurate passenger distance monitoring method. This method achieves accurate detection and monitoring of passengers in complex underground environments by optimizing the model structure, enhancing image processing, and introducing joint training and real-time analysis technology, thereby effectively ensuring the safety and reliability of underground transportation.
[0006] To achieve the above purpose, the technical solution adopted by the present invention is: a method for detecting insufficient riding distance of a person on a detachable monkey car, and the specific steps are as follows:
[0007] Step S1, data set acquisition: In the data acquisition stage, it is first necessary to deploy high-quality and stable cameras at key locations of the underground transportation system, and ensure that the cameras can cover the areas that need to be monitored. The acquisition process should cover different time periods to ensure that effective static image data and dynamic video data can be collected under a variety of lighting and environmental conditions. In view of the special environment of coal mines, data acquisition should try to cover the scenes of different transportation systems, such as monkey cars with different operating speeds, different tunnels, and different time periods. When annotating the data, it is necessary to accurately mark the passengers in each frame of the image and record their position, size and other information. The annotation tool can choose a rectangular frame-based annotation form and annotate the specific status of the personnel (for example, different postures of monkey car passengers, etc.). In order to improve the quality of the data, it is recommended to check the images in real time during the acquisition process to ensure that each frame has sufficient clarity and availability to avoid annotation errors caused by image blur or occlusion.
[0008] Step S2, data preprocessing: Data preprocessing includes two key steps, denoising and data enhancement, to ensure the optimization of model training effect. First, denoising processing (such as Gaussian filtering, median filtering and bilateral filtering, etc.) significantly improves the clarity and detail of the image by reducing the noise in the image, especially avoiding the interference of strong light illumination generated when the headlights are directly shining on the camera. This step helps to eliminate the visual interference caused by strong light and ensure that the features of the passengers and the monkey car are clearer. Secondly, data enhancement technology increases the diversity of the data set by rotating, flipping, scaling and color changing the image. This technology can not only simulate various actual operation scenarios, but also improve the model's adaptability to different environmental changes. Through these preprocessing measures, the data quality and diversity are significantly improved, providing more accurate and rich input data for model training, thereby effectively improving the accuracy and robustness of target detection.
[0009] Step S3: Data labeling and splitting:
[0010] Data labeling and splitting are important steps to ensure the quality of model training and testing. The specific steps include:
[0011] Labeling tool selection: Use the professional labeling tool labelimg for image labeling. These tools support multiple labeling methods such as rectangular boxes and polygons, and provide an intuitive user interface for convenient and efficient labeling of targets in images.
[0012] Annotation quality control: Perform strict annotation quality checks to ensure the accuracy and consistency of annotations. Check whether each annotation box accurately covers the target area and correct any annotation errors or omissions to ensure the high quality of the dataset.
[0013] Data splitting: Split the labeled data set into training set, validation set, and test set in a ratio of 7:2:1. The training set is used for model training, the validation set is used for model tuning and parameter selection, and the test set is used for final performance evaluation to ensure that each data set can fully reflect various situations in actual applications.
[0014] Step S4: In terms of improving the YOLOv5 network structure, the target detection is further improved by introducing the Optimal Transport Assignment (OTA) algorithm and advanced loss functions (EIOU, SIOU and AlphaIOU). The OTA algorithm significantly improves the detection speed and accuracy by converting the distance between the target and the detection frame into a probability distribution and minimizing the Wasserstein distance between the two probability distributions. At the same time, the EIOU, SIOU and AlphaIOU loss functions optimize the match between the detection frame and the true frame, taking into account the rotation relationship, shape difference and overlap, further enhancing the robustness and accuracy of the model. Through these improvements, the detection performance of YOLOv5 in complex underground environments has been significantly improved, providing reliable technical support for the detection of insufficient distance between passengers.
[0015] Step S5, model training and tuning, includes determining the network structure and selecting appropriate training hyperparameters, such as learning rate, batch size, number of iterations, optimizer, and loss function. In this process, first select the appropriate YOLOv5 network structure, and adjust its number of layers, convolution kernel size, etc. according to the task requirements. Next, set the training hyperparameters, and select the optimal value through grid search and other methods to ensure efficiency and stability during the training process. Standard loss functions are used during training, such as confidence loss, bounding box regression loss, etc., and can be customized and improved according to actual needs. During the training process, the performance of the model's validation set is continuously monitored, the hyperparameters are fine-tuned to avoid overfitting, and the early stopping mechanism is used to improve the generalization ability of the model. Finally, through meticulous training and tuning, the accuracy and stability of the model in the target detection task are improved to ensure its application effect in the underground transportation environment of coal mines.
[0016] Step S6, post-processing of detection results The interval time and actual distance of the people riding the monkey car are calculated by identifying, screening and analyzing the people detected in each frame of the image. First, the target detection algorithm is used to mark the people who meet the fixed area and size range, and the time interval between adjacent people is continuously calculated. Then, the actual distance between people is estimated according to the speed of the monkey car, and compared with the preset safety threshold. If the distance is less than the threshold, the system will trigger an alarm to ensure the accuracy and safety of monitoring.
[0017] During the data set collection process in step S1, in order to ensure the comprehensiveness and adaptability of the data, images and video data of personnel under different lighting conditions, posture changes, distances, and monkey car driving speeds were collected. The collection scenes cover a variety of coal mine tunnel environments, and multi-angle, high-frame-rate cameras are used for synchronous collection to ensure that the dynamic changes of personnel under high-speed and low-speed driving conditions are captured. In addition, the data set also pays special attention to details such as personnel safety clothing and helmets, and collects images containing different personnel clothing and behaviors (such as standing, walking, sitting, etc.). In order to cope with the complex mine environment, a high dynamic range (HDR) camera is also used to capture images under extreme lighting conditions such as strong light and shadows to ensure that the model can adapt to different lighting and environmental conditions. The diversity and complexity of these data provide rich support for the training of subsequent models and improve the robustness and accuracy of the models.
[0018] In step S2, bilateral filtering is used for denoising. The specific denoising process is as follows:
[0019]
[0020] Where I(x) is the output image pixel value, I(x i ) is the pixel value of the input image, W p is the normalization coefficient, σ d Control space distance weight, σ r Control the weight of pixel value difference. The core of bilateral filtering is to consider both the spatial distance and pixel value difference of the image, so as to effectively remove noise while maintaining edge information.
[0021] In the process of image enhancement, histogram equalization is used to enhance the contrast of the image so that the grayscale distribution of the image is more uniform, as follows:
[0022]
[0023] Among them, S(i) is the grayscale after equalization, L is the number of grayscale levels, MN is the total number of pixels in the image, and h(j) is the number of pixels of grayscale level j. This formula improves the contrast of the image by redistributing the grayscale values of the image, thereby improving the visual effect of the image, especially for low-contrast images.
[0024] In step S4, the OTA (Optimal Transport Algorithm) algorithm is used to match the target box and the predicted box. The distance between the target box and the predicted box is converted into a probability distribution and matched using the Wasserstein distance. The specific process is described by the following formula:
[0025]
[0026] Among them, C ij represents the distance between the i-th target box and the j-th prediction box, T ij is the element of the matching matrix, Ψ is the set of all legal matching matrices, and the distance matrix C is transformed into probability distributions P and Q, where:
[0027]
[0028] Here τ is a temperature parameter, which is used to control the smoothness of the probability distribution. The algorithm calculates the minimum transportation cost between the target box and the prediction box, and finally obtains the matching result, thereby improving the matching accuracy.
[0029] Optimize loss function: Consider the angle difference between the target box and the predicted box, and improve the detection accuracy by optimizing the angle term. The formula is:
[0030]
[0031] Among them, w t ,h t are the width and height of the target box, w p ,h p is the width and height of the predicted box, and the angle difference term helps to optimize the orientation alignment of the box, thereby improving the accuracy of detection.
[0032] Introducing smooth terms to alleviate shape differences: The shape difference between the target box and the real box is alleviated by introducing a smooth term. The formula is as follows:
[0033]
[0034] This smoothing term helps reduce the difference in shape between the target box and the predicted box, allowing the model to better adapt to small changes between the target and predicted boxes.
[0035] Adjust parameter α to balance overlap: Balance the overlap between the predicted box and the true box by adjusting parameter α. The formula is:
[0036]
[0037] Among them, α is an adjustment parameter, and ∈ is a small constant used to prevent division by zero errors. This formula allows the model to adjust the emphasis on the overlapping part according to the characteristics of the actual task and dataset, thereby optimizing the detection results and further improving the detection accuracy.
[0038] This allows the model to adjust the emphasis on overlapping parts according to the characteristics of the actual task and dataset, thereby optimizing the detection results.
[0039] In step S6, the following steps are included:
[0040] Confidence screening: During the detection process, all detection boxes are first screened by applying a confidence threshold to ensure that only detection boxes with higher confidence are retained. This step uses a set threshold (such as 0.5 or 0.7) to remove boxes below the threshold, thereby reducing false detections and interference from redundant information. Through this screening process, the system can focus more on high-confidence targets and improve detection accuracy.
[0041] Uplink and downlink classification: To achieve accurate personnel classification, personnel are classified as uplink or downlink based on the position, size and preset area boundaries of the detection frame, and further combined with the actual uplink and downlink monitoring areas. This process is achieved by dividing the monitoring area into multiple sub-areas and setting size standards for each sub-area. For example, for a person detection frame in a specific area, if it is located in a designated uplink area and the size of the detection frame meets the prescribed size standard for uplink personnel, it is determined to be an uplink person, otherwise it is a downlink person. The innovation of this classification step is that the accuracy of personnel classification is ensured by adjusting the area and size standards in real time to adapt to the monitoring needs in different environments.
[0042] Interval time calculation: When calculating the time interval between adjacent frames, if the time information can be directly recorded in the video stream, the timestamp is directly read and used; otherwise, the time interval is calculated based on the number of interval frames and the frame rate. This method accurately estimates the time interval of each frame through the frame rate (for example, 30fps) and frame spacing, ensuring that the system can calculate the interval between people in real time and accurately, thereby providing reliable data input for subsequent distance estimation. Distance estimation: Based on the calculated interval time and the speed of the monkey car, the physical formula is used to estimate the actual distance between people riding the monkey car;
[0043] Distance estimation: Using the calculated time interval and the known speed of the monkey car (e.g. m / s), the actual distance between people is estimated using a physical formula. The specific formula is:
[0044] D=V*T
[0045] Among them, D is the actual distance between people, V is the speed of the monkey car, and T is the time interval between the two person detection frames; this formula can be used to calculate the relative distance between people, providing a basis for safety judgment.
[0046] Safety threshold judgment: After calculating the actual distance between people riding the monkey car, the system compares the distance with the preset safety threshold. If the distance is less than the safety threshold, the alarm system is triggered. The setting of this threshold is not only based on process requirements and safety standards, but can also be dynamically adjusted through the model according to actual conditions to adapt to the safety distance requirements between people in different working environments. When the distance is insufficient, the system will issue an alarm in real time to remind the operator to take timely measures to avoid potential safety risks.
[0047] The present invention fully combines artificial intelligence, deep learning and advanced image processing technology to build an efficient and intelligent monitoring system that can achieve accurate personnel monitoring in complex underground environments. By optimizing the YOLOv5 target detection model and combining advanced image preprocessing (such as denoising and enhancement technology) with post-processing algorithms, the system can effectively identify and measure the distance of passengers to ensure the accuracy and real-time nature of the data. The combination of real-time video stream processing and intelligent analysis technology enables the system to quickly capture and respond to potential dangers, greatly improving the early warning capability of potential safety hazards.
[0048] In underground environments, due to insufficient lighting, many obstructions, and complex postures of personnel, traditional safety monitoring methods often face high false alarm and missed alarm rates. The present invention can significantly improve the adaptability and robustness of the system in these complex environments through technical optimizations such as image enhancement, target frame screening, and uplink and downlink classification. In addition, the introduction of joint training and adaptive safety threshold adjustment methods enables the monitoring system to dynamically adjust monitoring parameters according to real-time data, ensuring efficient operation and accurate detection under different working conditions.
[0049] Through continuous optimization and innovation of the system, the present invention realizes the automation of the whole process from image acquisition to safety warning, significantly reduces manual intervention, and improves monitoring efficiency and response speed. Most importantly, the present invention can not only effectively identify and predict the problem of insufficient distance of passengers, but also issue early warnings in time when potential safety hazards are found, helping staff to take timely preventive measures to ensure the overall safety and reliability of the underground transportation system in coal mines. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is the overall flow chart of the present invention.
[0051] Figure 2 This is the overall flow chart of the OTA algorithm.
[0052] Figure 3 This is the post-processing logic diagram.
[0053] Figure 4 A schematic diagram of the actual scene.
[0054] Figure 5 This is a comparison chart of upstream and downstream personnel in the same area in an actual scenario. DETAILED DESCRIPTION
[0055] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0056] like Figure 1-5 As shown, a method for detecting insufficient riding distance of a person on a detachable monkey car is provided, and the specific steps are as follows:
[0057] Step S1: Dataset collection:
[0058] During the data set collection process, a large amount of image and video data including monkey car personnel and personnel in different safety clothing and helmets were collected. These data include images of personnel under various lighting conditions, different postures and different distances. In order to ensure the diversity and comprehensiveness of the data, the collection process covers different coal mine tunnels, different monitoring angles, and monkey car scenes of various travel speeds. At the same time, special consideration is given to the collection effect of the camera under different installation positions to ensure that the data set can truly reflect various situations in actual applications. Through multiple experiments, the data collection process was optimized to minimize the impact of light reflection, direct headlights, etc. on image quality, thus laying a solid foundation for subsequent data processing and model training.
[0059] Step S2: Data preprocessing:
[0060] In image processing and computer vision tasks, the quality of data directly affects the training effect and prediction accuracy of the model. Raw data usually contains various noises and undesirable conditions, such as camera oversensitization, low light environment, or uneven brightness in the image. These factors will interfere with the learning process of the model, causing the model to be sensitive to noise during training, thus affecting the final detection and classification performance. Therefore, preprocessing the data before model training to remove noise and enhance the quality of the image is a key step to improve the robustness and accuracy of the model.
[0061] The purpose of denoising is to reduce the interference information in the image, especially the influence of illumination changes or other noise in complex environments. The present invention uses bilateral filtering. Compared with Gaussian filtering, the advantage of bilateral filtering is that it can not only smooth the image, but also better preserve edge details. Bilateral filtering combines the spatial information and pixel value information of the image to perform filtering, which can effectively reduce the influence of strong light while avoiding blurring important edge details.
[0062]
[0063] Where I(x) is the output image pixel value, I(x i ) is the pixel value of the input image, W p is the normalization coefficient, σ d Control space distance weight, σ r Controls the weighting of pixel value differences.
[0064] The purpose of image enhancement is to improve the contrast and clarity of the image, making the key features more obvious, which is conducive to subsequent model training and target detection. Histogram equalization improves the contrast of the image by redistributing the grayscale values of the image, which is especially suitable for images with uneven lighting.
[0065]
[0066] Among them, S(i) is the grayscale after equalization, L is the number of grayscale levels, MN is the total number of pixels in the image, and h(j) is the number of pixels of grayscale level j.
[0067] Step S3: Data labeling and splitting:
[0068] In the data labeling and splitting stage, we first use professional labeling tools such as LabelImg to accurately label the target area in the image. LabelImg supports multiple labeling methods such as rectangular boxes and polygons. The operation interface is intuitive and can efficiently complete the labeling task.
[0069] The main rules for data annotation include: do not annotate targets that are too small and half-body targets (targets with only the head or feet), and export the annotation results in txt format. These rules help ensure the high quality of the dataset and avoid introducing unnecessary noise data in model training. The annotated dataset also needs to be randomly divided into training set, validation set, and test set in a ratio of 7:2:1. This random division method can effectively avoid the deviation that may be caused by sequential division, ensure that the data in the training set, validation set, and test set are representative, and thus improve the training effect and generalization ability of the model.
[0070] Step S4: Improve the YOLOv5 network structure:
[0071] In the scenario of target detection for underground coal mine transportation system, in order to improve the detection accuracy and efficiency of the system for people riding monkey cars, the present invention makes the following improvements to the YOLOv5 network structure:
[0072] Step S41: Introducing the Optimal Transport Assignment (OTA) algorithm
[0073] In underground transportation systems, target detection needs to deal with complex environmental factors, such as insufficient lighting, motion blur, etc. The traditional Hungarian algorithm may result in slow detection speed when dealing with these complex scenarios. The OTA algorithm introduces a new matching method between the target and the detection frame, which can significantly improve the detection speed while maintaining the detection accuracy.
[0074] The OTA algorithm avoids the high computational complexity of traditional algorithms by converting the distance between the target box and the predicted box into a probability distribution and matching them using the Wasserstein distance. The specific formula is:
[0075]
[0076] Among them, C ij represents the distance between the i-th target box and the j-th prediction box, T ij is the element of the matching matrix, and Ψ is the set of all legal matching matrices. The distance matrix C is transformed into probability distributions P and Q, where:
[0077]
[0078] Here τ is a temperature parameter that controls the smoothness of the probability distribution.
[0079] Step S42, optimizing the loss function:
[0080] In underground transportation systems, the angle of the target box may vary due to changes in camera position or lighting conditions. EIOU takes into account the angle difference between the target box and the predicted box and improves the detection accuracy by optimizing the angle term. The formula is:
[0081]
[0082] This helps to handle the detection of targets at different angles and improves the accuracy of the system in complex environments.
[0083] The target in the coal mine environment may have an irregular shape due to occlusion or perspective problems. SIOU alleviates the shape difference between the target box and the real box by introducing a smoothing term. The formula is:
[0084]
[0085] This processing method helps improve the detection capability of complex target shapes and ensures that the system can accurately identify people in practical applications.
[0086] In underground transportation systems, the degree of target overlap may vary depending on the distance or perspective. AlphaIOU balances the degree of overlap between the predicted box and the true box by adjusting the parameter α. The formula is:
[0087]
[0088] This allows the model to adjust the emphasis on overlapping parts according to the characteristics of the actual task and dataset, thereby optimizing the detection results.
[0089] Through these improvements, YOLOv5 can provide higher detection accuracy and faster processing speed in complex underground coal mine environments, ensuring real-time monitoring and safety of people riding monkey cars. These optimizations not only improve the performance of the model in practical applications, but also enhance the system's adaptability to various challenges.
[0090] Step S5: Model training and model optimization:
[0091] In the personnel detection task of underground transportation system in coal mines, model training and optimization are key steps to ensure the efficient operation of the system. During the training process, various hyperparameters are first set, including learning rate, learning rate decay parameter, number of iterations, batch size, and parameters to prevent overfitting. The reasonable setting of these hyperparameters is crucial to improving the training effect and performance stability of the model.
[0092] In order to improve detection accuracy and model robustness, the following improved loss functions are introduced during the training process:
[0093] EIOU (Efficient Intersection over Union): Based on the traditional IoU, an angle term is added, and the rotation relationship between the detection box and the real box is considered, thereby improving the detection ability of rotated objects.
[0094] SIOU (Smooth Intersection over Union): A smoothing term is added on the basis of IoU, aiming to alleviate the shape difference between the detection box and the real box and improve the detection accuracy of objects of various shapes.
[0095] AlphaIOU: An adjustable parameter α is introduced to optimize the overlap between the true box and the predicted box, so that the model can adapt to different detection requirements and enhance the ability to handle the relationship between the detection box and the true box.
[0096] When training the model, the above-mentioned improved loss function was used, and the training was carried out in combination with the set hyperparameters. The hyperparameters were fine-tuned according to the training and validation indicators to achieve the best results, which included adjusting hyperparameters such as learning rate and batch size, and continuously optimizing the model parameters according to the training curve and validation results. Through these steps, the model can accurately identify and locate people riding the monkey car in the underground transportation environment of the coal mine, thereby enhancing the safety and reliability of the system.
[0097] Step S6, post-processing of detection results and triggering of alarms;
[0098] In the post-processing stage of the detection results, the high-confidence detection frames are first screened out through the set confidence threshold to ensure that only accurate detection results are retained. After that, these detection frames are regionally screened, focusing on the detection frames within a fixed area; according to the size and position of the detection frames, people are divided into two categories: upward and downward; this process distinguishes by setting specific area boundaries and size ranges, thereby effectively classifying people in different directions.
[0099] The specific steps are as follows:
[0100] Confidence screening: In the output of the target detection algorithm, each detection box has a corresponding confidence score, which indicates the possibility that the detection box contains the target object (here, the person riding the monkey car). Set a confidence threshold, such as 0.7. If the confidence score of the detection box is higher than this threshold, the detection box is considered reliable and is retained; if it is lower than the threshold, the detection box is considered to be a false detection and is removed. Figure 3 In the example, when the model detects the target frame of the person riding the monkey car, it first performs a confidence judgment. If the confidence is greater than the threshold, it proceeds to the next step, otherwise the target frame is discarded.
[0101] Up and down classification: According to the actual situation of the underground monkey car, the up and down monitoring areas are pre-set. By judging the position and size of the detection frame in the image, it is determined whether the person is in the up or down state. Define the boundaries and size standards of the up and down area. For example, Figure 4 and Figure 5 In the figure, we can see that the underground scene is divided into different areas, and the direction of movement of the personnel is determined by the position of the target frame. If the detection frame is located in the upper area of the image (the green box is the upward area), the person is classified as an upward person; if it is located in the lower area (the red box is the downward area), it is classified as a downward person. Figure 2 In the process, when a target frame that passes the confidence screening appears, it will be further judged whether it is in the uplink and downlink areas, so as to determine the direction of movement of the person and divide the person into the uplink target frame and the downlink target frame.
[0102] Interval time calculation: In order to calculate the distance between people riding the monkey car, it is necessary to know the time interval between adjacent people in different frames. If the camera itself can record the exact time of each frame, then directly obtain the time difference between adjacent frames as the interval time. If the camera does not have this function, it is calculated based on the known frame rate (for example, 30 frames / second) and the number of interval frames. Assuming the frame rate is f, and the frame number difference between adjacent frames is n, the interval time t = n / f. Figure 3In the above example, for both the upstream target frame and the downstream target frame, the interval time between adjacent target frames needs to be calculated respectively for subsequent distance estimation.
[0103] Distance estimation: Given the speed v of the monkey car and the time interval t between adjacent people, the actual distance between people can be estimated based on the physical formula distance d = v × t. First determine the speed of the monkey car (which may be a fixed value measured and set in advance), then multiply it by the calculated time interval to get the distance between people. Figure 3 By calculating the interval time between adjacent target boxes and combining it with the speed of the monkey car, the actual distance between people riding the monkey car can be estimated.
[0104] Safety threshold judgment: Set a safety threshold. When the estimated distance between people is less than this threshold, it is considered that there is a safety hazard. Compare the calculated distance with the safety threshold (for example, 1 meter). If the distance is less than the safety threshold, the alarm system is triggered. Figure 3 When the calculated distance between people riding the monkey car is less than the safety threshold, an alarm signal will be triggered to notify relevant personnel to take measures to ensure the safety of the underground transportation environment.
[0105] Through such a comprehensive post-processing process, combined with image analysis and physical calculation, the dynamics of personnel in the underground transportation environment can be effectively and accurately monitored to ensure the safe and reliable operation of the system.
[0106] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims
1. A method for detecting insufficient riding distance of a person on a detachable monkey car, characterized in that: The specific steps are as follows: Step S1, data set collection: by deploying stable cameras and recording at different time periods, data collection is performed by selecting different areas and conditions in the underground transportation system, and data annotation records the position and size of passengers; Step S2, including denoising and data enhancement, wherein the denoising is to reduce the noise in the image, and the data enhancement is to perform normalization and standardization by rotating, flipping, scaling and color transformation operations on the image; Step S3: Data labeling and splitting: Labeling tool selection: Use the labelimg labeling tool to label images; Labeling quality control: Check whether each labeling box accurately covers the target area and correct labeling errors; Data splitting: Split the labeled data set into training set, validation set and test set in a ratio of 7:2:
1. The training set is used for model training, the validation set is used for model tuning and parameter selection, and the test set is used for final performance evaluation. Step S4, improving the YOLOv5 network structure: introducing the OTA algorithm and the advanced loss function. The OTA algorithm converts the distance between the target and the detection box into a probability distribution and minimizes the Wasserstein distance between the two probability distributions. The advanced loss function optimizes the match between the detection box and the true box. Step S5, determine the network structure and select training hyperparameters, select the YOLOv5 network structure, and adjust its number of layers and convolution kernel size according to task requirements, set the training hyperparameters, select the optimal value through grid search, and use the standard loss function during training; Step S6, post-processing of detection results and alarm triggering: Post-processing of detection results, by identifying, screening and analyzing the people detected in each frame of the image, the interval time and actual distance of the people riding the monkey car are calculated, the target detection algorithm is used to mark the people who meet the fixed area and size range, and the time interval between adjacent passengers is continuously calculated. The actual distance between people is estimated according to the speed of the monkey car and compared with the preset safety threshold. If the distance is less than the threshold, the system will trigger an alarm.
2. A method for detecting insufficient riding distance of a person on a detachable monkey car according to claim 1, characterized in that: During the data set collection process of step S1, image and video data of monkey car personnel and personnel in different safety clothing and helmets are collected. These data include images of personnel under various lighting conditions, in different postures and at different distances. The collection process covers different coal mine tunnels, different monitoring angles and monkey car scenes of various travel speeds.
3. A method for detecting insufficient riding distance of a person on a detachable monkey car according to claim 2, characterized in that: In step S2, bilateral filtering is used for denoising. The specific denoising process is as follows: Where I(x) is the output image pixel value, I(x i ) is the pixel value of the input image, W p is the normalization coefficient, σ d Control space distance weight, σ r Control pixel value difference weight; In the process of image enhancement, histogram equalization is used to enhance the contrast of the image. The specific process is as follows: Among them, S(i) is the grayscale after equalization, L is the number of grayscale levels, MN is the total number of pixels in the image, and h(j) is the number of pixels of grayscale level j.
4. A method for detecting insufficient riding distance of a person on a detachable monkey car according to claim 3, characterized in that: In step S4, for the matching of the target box and the predicted box, the OTA algorithm is used to convert the distance between the target box and the predicted box into a probability distribution, and the Wasserstein distance is used for matching. The specific process is described by the following formula: Among them, C ij represents the distance between the i-th target box and the j-th prediction box, T ij is the element of the matching matrix, Ψ is the set of all legal matching matrices, and the distance matrix C is transformed into probability distributions P and Q, where: τ is a temperature parameter used to control the smoothness of the probability distribution. The algorithm calculates the minimum transportation cost between the target box and the prediction box and finally obtains the matching result; Optimize the loss function: Introducing the angle difference term: Considering the angle difference between the target box and the predicted box, the detection accuracy is improved by optimizing the angle term. The specific formula is: Among them, w t is the width of the target box, h t is the height of the target box, w p is the width of the prediction box, h p is the height of the prediction box; Introducing smooth terms to alleviate shape differences: The shape difference between the target box and the real box is reduced by introducing a smooth term. The specific formula is as follows: Adjust parameter α to balance overlap: Balance the overlap between the predicted box and the true box by adjusting parameter α. The formula is: Among them, α is the adjustment parameter and ∈ is a small constant.
5. A method for detecting insufficient riding distance of a person on a detachable monkey car according to claim 4, characterized in that: In step S6, the following steps are included: Confidence screening: During the detection process, first apply the confidence threshold to screen all detection boxes, and use the set threshold to remove boxes below the threshold; Uplink and downlink classification: Based on the position, size and preset area boundaries of the detection frame, and further combined with the actual uplink and downlink monitoring areas, people are classified as uplink or downlink. This is achieved by dividing the monitoring area into multiple sub-areas and setting size standards for each sub-area; Interval time calculation: When calculating the time interval between adjacent frames, if the time information can be directly recorded in the video stream, the timestamp is directly read and used; otherwise, the time interval is calculated based on the number of interval frames and the frame rate, and the time interval of each frame is estimated by the frame rate and frame spacing to provide data input for subsequent distance estimation; Distance estimation: Based on the calculated interval time and the speed of the monkey car, the physical formula is used to estimate the actual distance between people riding the monkey car; Distance estimation: Using the calculated time interval and the known speed of the monkey car, the actual distance between people is estimated by a physical formula. The specific formula is: D=V*T Among them, D is the actual distance between people, V is the speed of the monkey car, and T is the time interval between the two person detection frames. The relative distance between people is calculated by this formula; Safety threshold judgment: After calculating the actual distance between people riding the monkey car, the system compares the distance with the preset safety threshold. If the distance is less than the safety threshold, the alarm system is triggered.
Citation Information
Patent Citations
Mine personnel target video tracking method based on YOLOv5-Deepsort algorithm and storage medium
CN116681724A
Pedestrian mask detection and safe distance early warning method based on deep learning
CN116682156A
Electronic fence early warning method based on target detection and target tracking
CN117037404A
Unmanned road pedestrian identification method based on improved YOLOv5 model
CN118609158A
Lane violation detection using convolutional neural networks
US11164014B1