Mine worker violation target detection method, system and device and storage medium

By embedding the EMA attention module and self-attention mechanism detection head in the YOLOv8 model, the problem of poor target detection effect of YOLOv8 in complex mine environments is solved, and higher detection accuracy and adaptability are achieved.

CN119479064AActive Publication Date: 2025-02-18QUZHOU UNIV

Patent Information

Application Number
CN202411511282.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-02-18
Estimated Expiration
2044-10-28

AI Technical Summary

Technical Problem

YOLOv8 has poor target detection effect in complex mine environments, especially in scenarios with insufficient light and severe interference.

Method used

The EMA attention module is embedded after the three C2f modules of the original YOLOv8 model backbone network, and the self-attention mechanism dynamic object detection head DyHead replaces the detection head of the original network to form an improved YOLOv8 model.

Benefits of technology

By introducing EMA attention mechanism and self-attention mechanism, the improved YOLOv8 model improves feature extraction ability under insufficient light conditions, enhances adaptability to target scale changes, improves the accuracy of detection results, and avoids tiny target feature information Lost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119479064A_ABST
    Figure CN119479064A_ABST
Patent Text Reader

Abstract

The invention provides a mine worker violation target detection method, system and device and a storage medium, and belongs to the field of image recognition and processing. For the problem of large scale change of a target under a mine, a multi-layer EMA attention mechanism is added to a backbone network based on an original YOLO8 model, and the adaptive capacity of the model to scale change and the feature extraction capacity are enhanced. Secondly, a uniform self-attention mechanism detection head DyHead is introduced to replace an original detection head, and the feature expression ability of the detection head is improved; the average precision on a self-built data set and a public data set VOC2012 is improved, and the generalization ability is very high. Compared with other models, the method has higher detection precision while having lower model complexity, and is more suitable for target detection in a complex environment under a mine.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of image recognition and processing, and specifically relates to a method, system, equipment and storage medium for detecting illegal targets of mine workers. Background Art

[0002] In recent years, China's mining industry has achieved remarkable development in scale. The scale of mines is not only reflected in the number and production capacity of mines, but also in the scale and production capacity of individual mines. With the advancement of technology and the improvement of management, many mines have achieved large-scale and intensive production, further improving production capacity and efficiency. The coal mining process has basically achieved mechanization and automation, but most mines still require miners to assist in mining. The issue of mine safety has also become particularly important. Mine accidents often occur deep underground, making rescue difficult and challenging the safety of rescuers. In addition, mine accidents not only cause casualties and property losses, but may also cause environmental pollution, social unrest and other problems. Mine accidents have occurred in different types of mines, such as coal mines, metal mines, and non-metallic mines, and they have been repeatedly banned, forming a problem faced by the entire industry.

[0003] Mine accidents are often caused by a combination of factors, including natural factors such as geological structure and gas outburst, as well as human factors such as operational errors and improper management. Among them, illegal production by mine workers is the easiest to prevent. If errors are reduced in the mine workers, major accidents can be avoided directly or indirectly. Therefore, improving the real-time and accuracy of target detection of illegal production by mine workers and being able to work with regulatory authorities to reduce the probability of mine accidents in terms of human factors are issues that all mine units need to focus on. Real-time detection of underground personnel is an effective means to avoid safety accidents. However, there are problems such as uneven lighting and serious interference from coal dust in the underground working environment, which makes it impossible for staff to effectively monitor the surveillance video in multiple scenes for a long time. Therefore, it is necessary to use target detection algorithms to supervise the daily production of mine workers.

[0004] The implementation of mine worker safety detection is mainly based on the target detection algorithm of video images. The target detection algorithm is divided into two categories: traditional machine learning and deep neural network. Traditional machine learning algorithms have low pertinence, high time complexity, and window redundancy; and the manually designed features have poor robustness and weak generalization ability, resulting in the gradual replacement of traditional machine learning algorithms by deep learning algorithms. The region-based deep convolutional neural network R-CNN introduced the convolutional neural network (CNN) method into target detection, which improved the detection performance of the model. The subsequent Fast R-CNN and Faster R-CNN greatly improved the efficiency of detection. Fast R-CNN improved R-CNN by sending the entire image into the convolutional network to extract features, and then extracting the feature representation of the candidate region through the RoI pooling layer on the feature map, and finally performing classification and bounding box regression through the fully connected layer. As two-stage detection algorithms, these two algorithms usually perform well in accuracy, but because they require two independent stages, they are slow. Then, single-stage detection algorithms represented by YOLO and SSD were proposed, which solved the problem of slow speed of the two-stage detection algorithm and enabled it to be applied to scenes with high real-time requirements. However, the detection accuracy and performance were still poor in scenes with poor light and severe interference. Therefore, the above-mentioned various algorithm models still have drawbacks when performing detection in complex environments of mines. Summary of the invention

[0005] In order to solve the problem that YOLOv8 has poor target detection effect in the complex environment of a mine, the present invention provides a mine worker violation target detection method, system, device and storage medium.

[0006] In order to achieve the above object, the present invention provides the following technical solutions:

[0007] A method for detecting illegal mining workers, comprising the following steps:

[0008] The EMA attention modules are respectively embedded after the three C2f modules of the original YOLOv8 model backbone network, and the dynamic target detection head DyHead with self-attention mechanism is introduced to replace the detection head of the original network to form an improved YOLOv8 model; the improved YOLOv8 model is trained to obtain a target detection model for identifying illegal behaviors of mine workers;

[0009] Get pictures of mine workers working in the mine;

[0010] The acquired image is input into the target detection model. After extracting the features of the image from the bottom layer to the high layer through the backbone network, the attention mechanism focuses on the important features. The image is convolved and downsampled to extract feature maps containing semantic information at different levels. The feature maps are sent to the DyHead detection head after feature fusion through the PAN-FPN structure, and the target violation detection results are generated through the DyHead detection head.

[0011] Preferably, the method further comprises obtaining a data set by adopting a self-built underground personnel detection data set and a target detection data set PASCAL VOC2012, wherein the self-built underground personnel detection data set is specifically: obtaining a plurality of mine operation pictures by a camera in a constructed mine operation simulation scene; the target detection data set PASCAL VOC2012 contains a plurality of object images, which contain annotations of the category, position and size information of the objects; and selecting data in the data set as a training set in proportion;

[0012] The improved YOLOv8 model is trained using the data of the training set.

[0013] Preferably, the target violation detection result determines whether the mine worker's behavior is in violation through a bounding box and a category label, specifically: marking the location information of the violation in the image through the bounding box; and outputting the worker's violation type through the category label.

[0014] Preferably, the processing process of the DyHead detection head specifically includes the following steps:

[0015] The input vector obtained from Neck is sent to three perception-enhanced attention modules. The three perception-enhanced modules obtain enhanced outputs through three attentions applied at different positions, specifically:

[0016] W(F)=π C (π S (π L (F)·F)·F)·F;

[0017] Among them, F represents the input feature, π C , π S , π L Represent the channel dimension, spatial dimension and scale dimension respectively; according to the semantic importance of different scales, the features of different scales are dynamically fused and operated on the input L dimension, specifically:

[0018]

[0019] Among them, f is a linear function composed of 1×1 convolutional layers, and the activation function is hard-sigmoid; Indicates a global average pooling operation on the feature map F. By summing the spatial dimension and channel dimension of the feature map, the global average information of the feature map is obtained. S represents the spatial dimension, that is, the height and width of the feature map, and C represents the number of channels.

[0020] Use deformable convolution to sparsely learn attention and aggregate different levels of features at the same spatial position, specifically:

[0021]

[0022] Among them, L represents the number of positions in the spatial dimension, that is, the number of pixels in the feature map. Indicates the normalization of the spatial dimension; l represents a specific spatial position index in the feature map; W l,k is the spatial weighting term, which indicates the weight of the eigenvalue at a specific spatial position l and offset k; K is the number of sparse sampling positions; p k +Δp k is the position moved by the self-learned spatial offset, Δp k Learned by deformable convolution, focusing on ambiguous areas; Δm k Represents the position Δp k The importance of self-learning;

[0023] The switch controls whether the hyperparameter learns the activation threshold to automatically choose to open or close the channel to adapt to different tasks. Specifically:

[0024] π C (F)·F=max(α 1 (F)·F c +β 1 (F),α 2 (F)·F c +β 2 (F));

[0025] Among them, max() is a hyperparameter function to learn the threshold of activating channel; F c is the feature split at the cth channel; α is the weighting coefficient related to the input feature F; β is an offset term, a learnable parameter related to the input feature F.

[0026] Preferably, the evaluation indicators of the improved YOLOv8 model include detection accuracy and model complexity. The detection accuracy is measured by the accuracy P, recall R and average accuracy mAP of the model; the model complexity is measured by the number of model parameters and the amount of model calculation.

[0027] The present invention also provides a mine worker violation target detection system, which specifically includes:

[0028] A model building module is used to embed EMA attention modules after the three C2f modules of the original YOLOv8 model backbone network, and introduce the dynamic target detection head DyHead with self-attention mechanism to replace the detection head of the original network to form an improved YOLOv8 model; the improved YOLOv8 model is trained to obtain a target detection model for identifying illegal behaviors of mine workers.

[0029] The data acquisition module is used to obtain pictures of the working scenes of mine workers.

[0030] The target detection module is used to input the acquired image into the target detection model, extract the features of the image from the bottom layer to the high layer through the backbone network, and then focus on the important features through the attention mechanism; perform convolution and downsampling operations on the image to extract feature maps containing semantic information at different levels; and send the feature maps to the DyHead detection head after feature fusion through the PAN-FPN structure, and generate target violation detection results through the DyHead detection head.

[0031] The present invention also provides a computer device, including a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps described in the method for detecting illegal targets of mine workers.

[0032] The present invention also provides a computer-readable storage medium, on which a computer program is stored, characterized in that when the computer program is loaded by a processor, it can execute the steps described in the method for detecting illegal targets of mine workers.

[0033] The method for detecting illegal mine workers provided by the present invention has the following beneficial effects:

[0034] The present invention proposes an underground target detection algorithm based on improved YOLO8, which introduces EMA attention mechanism layers after the three C2f modules of the backbone network, enhances the model's feature extraction capability under insufficient light conditions, and is more adaptable to changes in the scale of underground targets. The unified self-attention mechanism detection head DyHead is used to replace the detection head in the original YOLO8 model. After EMA attention processing and then DyHead detection head, the model can improve the positioning accuracy of the target and avoid losing the feature information of small targets. Therefore, the target detection model obtained after training based on the improved YOLO8 model improves the accuracy of target detection results in complex environments in mines compared to other algorithm models, detects illegal production of mine workers, and prevents mine operation accidents. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the embodiment of the present invention and its design scheme, the following briefly introduces the drawings required for this embodiment. The drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0036] Figure 1 The present invention is a flow chart of a method for detecting illegal mine workers.

[0037] Figure 2 It is the EMA structure diagram of the present invention.

[0038] Figure 3 This is a structural diagram of the DyHead of the present invention.

[0039] Figure 4 This is the network structure diagram of the improved YOLO8 model of the present invention. DETAILED DESCRIPTION

[0040] In order to enable those skilled in the art to better understand the technical solution of the present invention and implement it, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the scope of protection of the present invention.

[0041] Example

[0042] The present invention provides a method for detecting illegal targets of mine workers, such as Figure 1 The flowchart of a method for detecting illegal targets of mine workers is shown, including:

[0043] S1. Use the self-built underground personnel detection dataset and the PASCAL VOC2012 public dataset to obtain the dataset, and select the data in the dataset as the training set in proportion.

[0044] The self-built underground personnel detection dataset is as follows: Use Hikvision vertical camera DS-2DC 4423IW-D to shoot personnel in the built scene. Raise the lens to simulate the angle of a real surveillance camera, and walk around the scene to simulate the real change of target scale. At the same time, reduce the lighting of the scene to simulate the low-light conditions in a real mine. Then divide the video into pictures by frame, and use the LabelImg tool to annotate the illegal targets. The self-built dataset contains 5 violation categories and a total of 3,000 pictures, including 2,100 training set images, 300 validation set images, and 600 test set images.

[0045] PASCAL VOC2012 public dataset is a well-known public dataset in the field of computer vision. It contains 20 common object categories, such as cars, people, airplanes, etc., as well as some less common categories, such as chairs, birds, bottles, etc. Each image contains annotation information such as the category, position and size of the object. The format of the dataset uses XML files to describe the image and its annotation information. Considering that this dataset is similar to the self-built dataset, this dataset tests the generalization performance of the proposed algorithm model and increases the authenticity of the data.

[0046] S2. Use the training set to train the improved YOLOv8 model to obtain the target detection model. YOLOv8 itself consists of three parts: Backbone, Neck and Head. The Backbone is composed of multiple Conv, C2f and SPPF modules connected in sequence, which are used to extract features from the input image. Conv is a basic convolutional layer, and the C2f module is the main module for learning residual features. The Neck part is generally a simple bidirectional fusion PAN structure, which integrates high semantic information and high-resolution information by fusing high-level features and low-level features. The Head part consists of multiple detection heads, because Backbone and Neck can only extract and fuse features, and cannot complete the positioning task. This requires the Head to decouple the feature information fused by the Neck to obtain the category and position of the target object.

[0047] The present invention embeds EMA attention modules after the three C2f modules of the backbone network of the original YOLOv8 model. The EMA attention module contains a parallel substructure of a CA block, and extracts the attention weight descriptor of the grouped feature map through three parallel routes. Two parallel paths are on the 1x1 branch, and the third path is on the 3x3 branch. In the 1x1 branch, two 1D global average pooling operations are used to encode the channel along two spatial directions respectively. In the 3x3 branch, only one 3x3 kernel is stacked to capture multi-scale feature representation. The output feature map in each group is calculated as a set of two generated spatial attention weight values. Finally, the Sigmoid function is used to increase the original feature extraction network from 10 layers to 13 layers, and the network model is optimized. The model's perception ability of targets of different scales is improved, so that the model does not lose the feature information of small targets, and the feature extraction ability of the model is improved.

[0048] Then, the self-attention mechanism dynamic target detection head DyHead is introduced to replace the detection head of the original network. The DyHead detection head obtains the input vector (L, S, C) from Neck and sends it to the three perception-enhanced attention modules. The three perception-enhanced modules obtain enhanced outputs through three attentions applied at different positions, specifically:

[0049] W(F)=π C (π S (π L (F)·F)·F)·F;

[0050] Among them, F represents the input feature, π C π S π L Represent the channel dimension, spatial dimension and scale dimension respectively. Enhanced spatial perception introduces scale-aware attention and dynamically fuses features of different scales according to the semantic importance of different scales on the input L dimension. Specifically:

[0051]

[0052] Among them, f is a linear function composed of 1×1 convolutional layers, and the activation function is hard-sigmoid; It represents a global average pooling operation on the feature map F. By summing the spatial dimension and channel dimension of the feature map, the global average information of the feature map is obtained. S represents the spatial dimension, that is, the height and width of the feature map, and C represents the number of channels.

[0053] Enhanced spatial perception uses deformable convolution to make attention learning sparse, and then aggregates different levels of elements at the same spatial position, as shown in formula (3):

[0054]

[0055] Among them, L represents the number of positions in the spatial dimension, that is, the number of pixels in the feature map. Indicates the normalization of the spatial dimension; l represents a specific spatial position index in the feature map; W l,k is the spatial weighted term, which indicates the weight of the eigenvalue at a specific spatial position l and offset k; K is the number of sparse sampling positions, p k +Δp k is the position moved by the self-learned spatial offset, Δp k Learned by deformable convolution, focusing on the ambiguous area, Δm k Represents the position Δp k The importance of self-learning.

[0056] Enhanced task awareness controls whether the hyperparameter learns the activation threshold to automatically choose to open or close the channel to adapt to different tasks, as shown in formula (4):

[0057] π C (F)·F=max(α 1 (F)·F c+β 1 (F),α 2 (F)·F c +β 2 (F));

[0058] Among them, max() is a hyperparameter function to learn the threshold of activating channel, F c is the feature split at the cth channel; α is the weighting coefficient related to the input feature F; β is an offset term, a learnable parameter related to the input feature F.

[0059] S3. Input the image of the mine operation scene into the target detection model to obtain the target behavior detection result in the mine. The target behavior detection result determines whether the mine worker's behavior is illegal through the bounding box and category label. Specifically, the location information of the illegal behavior in the image is marked by the bounding box, and the category label is used to output the type of illegal behavior of the worker.

[0060] S4. The main evaluation indicators for model detection accuracy are detection accuracy and model complexity. The detection accuracy is mainly reflected by the model's accuracy P (precision), recall R (recall) and average accuracy mAP (mean average precision). The model complexity of the algorithm is reflected by the number of model parameters and the amount of model calculation. The larger the value, the higher the model complexity.

[0061] The accuracy rate can be used to evaluate the accuracy of model detection, which is defined as the ratio of correctly predicted positives to all predicted positives. The recall rate can be used to evaluate the comprehensiveness of model detection, expressed as the ratio of correctly predicted positives to all actual positives. mAP is one of the most important model performance evaluation indicators in the field of target detection. It is used to measure the detection accuracy and comprehensiveness of the model in multiple categories. The present invention uses mAP@0.5 when the IOU threshold is 0.5 as the main evaluation indicator. Assuming that the number of positive and negative samples with true prediction results are TP and FP respectively, and the number of positive samples with false prediction results is FN, the calculation formulas for the accuracy rate P, recall rate R, and average accuracy rate mAP can be obtained as follows:

[0062]

[0063] The model complexity of the algorithm is reflected by the number of model parameters and the amount of model calculation. The larger the value, the higher the model complexity.

[0064] The mine target detection algorithm based on improved YOLOv8n proposed in the present invention introduces the EMA attention mechanism layer in the backbone network to enhance the feature extraction capability of the model. The detection head of the original network is replaced by a unified self-attention mechanism detection head DyHead, while enhancing the scale, space and task perception capabilities of the model and improving the feature expression capability of the detection head. Not only is the complexity lower, but also the detection accuracy is higher. Compared with other models, the model of the present invention is more suitable for underground mine target detection.

[0065] In order to verify the effectiveness and rationality of the method for improving the YOLOv8n network model in the present invention, an ablation experiment was conducted on a self-built data set to compare the impact of each module on the model, as shown in Table 1. At the same time, in order to enhance the reliability and authenticity of the data, the same experiment was also conducted on the VOC2012 public data set, as shown in Table 2.

[0066] Table 1 Ablation experiments on self-built datasets

[0067]

[0068] Table 2 Ablation experiments on VOC2012

[0069]

[0070] From the results in Table 1 and Table 2, we can see that, on the self-built dataset, adding EMA and DyHead respectively can improve the detection accuracy by 1.1% and 2.3% respectively. After adding the two improvements, the detection accuracy of the model is improved by up to 3.2%. On the public dataset VOC2012, adding EMA and DyHead respectively can improve the detection accuracy by 1.4% and 1.5% respectively. After adding the two improvements, the detection accuracy of the model is improved by 2.0%. Therefore, compared with the original model, the model improvement of the present invention not only improves the model detection capability, but also has good generalization performance.

[0071] In order to further evaluate the performance of the present invention in underground target detection, the model of the present invention is compared with the YOLOv3-tiny, YOLOv5n, and YOLOv7-tiny models on a self-built data set. As shown in Table 3, the model of the present invention has better performance for underground target detection, although it is more complex than the original YOLOv5n and YOLOv8n models. Compared with YOLOv3-tiny and YOLOv7-tiny, not only is the model complexity lower, but it also has higher detection accuracy. Compared with other mainstream algorithms, it is more satisfactory for underground target detection.

[0072] Table 3 Comparison with other mainstream algorithms

[0073]

[0074] The present invention also provides a mine worker violation target detection system, which specifically includes:

[0075] A model building module is used to embed EMA attention modules after the three C2f modules of the original YOLOv8 model backbone network, and introduce the dynamic target detection head DyHead with self-attention mechanism to replace the detection head of the original network to form an improved YOLOv8 model; the improved YOLOv8 model is trained to obtain a target detection model for identifying illegal behaviors of mine workers.

[0076] The data acquisition module is used to obtain pictures of the working scenes of mine workers.

[0077] The target detection module is used to input the acquired image into the target detection model, extract the features of the image from the bottom to the high level through the backbone network, and then focus on the important features through the attention mechanism; perform convolution and downsampling operations on the image to extract feature maps containing semantic information at different levels; and send the feature maps to the DyHead detection head after feature fusion through the PAN-FPN structure, and generate the target violation detection results through the DyHead detection head.

[0078] Each module in the above-mentioned mine worker violation target detection system can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.

[0079] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps in an embodiment of a method for detecting illegal targets of mine workers. The specific implementation method can be found in the method embodiment, which will not be repeated here.

[0080] Furthermore, the present invention also provides a non-temporary computer-readable storage medium containing instructions, and a computer program is stored on the storage medium. For example, a memory containing instructions, the above instructions can be executed by a processor of a computer device to complete the above method. For example, a non-temporary computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. When the computer program is executed by the processor, the steps in an embodiment of a method for detecting illegal targets of mine workers can be implemented. The specific implementation method can be found in the method embodiment, which will not be repeated here.

[0081] It will be appreciated by those skilled in the art that embodiments of the present invention may provide methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented 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.

[0082] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as a combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0083] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0084] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0085] It should be pointed out that the specific implementation methods described above can enable those skilled in the art to understand the invention more comprehensively, but do not limit the invention in any way. Therefore, although the invention has been described in detail in this specification and embodiments, those skilled in the art should understand that the invention can still be modified or replaced by equivalents; and all technical solutions and improvements that do not deviate from the spirit and scope of the invention are included in the protection scope of the patent for the invention. Any figure mark in the claims should not be regarded as limiting the claims involved. Any simple change or equivalent replacement of the technical solution that can be obviously obtained by any technician familiar with the field within the technical scope disclosed in the present invention belongs to the protection scope of the present invention.

Claims

1. A method for detecting illegal behaviors of mine workers, characterized in that: The following steps are involved: The EMA attention modules are respectively embedded after the three C2f modules of the original YOLOv8 model backbone network, and the dynamic target detection head DyHead with self-attention mechanism is introduced to replace the detection head of the original network to form an improved YOLOv8 model; the improved YOLOv8 model is trained to obtain a target detection model for identifying illegal behaviors of mine workers; Get pictures of mine workers working in the mine; The acquired image is input into the target detection model, and after extracting the features of the image from the bottom layer to the high layer through the backbone network, the important features are focused on through the attention mechanism; Convolution and downsampling operations are performed on the image to extract feature maps containing semantic information at different levels; the feature maps are sent to the DyHead detection head after feature fusion through the PAN-FPN structure, and the target violation detection result is generated through the DyHead detection head.

2. A method for detecting illegal behaviors of mine workers according to claim 1, characterized in that: The method also includes obtaining a data set by using a self-built underground personnel detection data set and a target detection data set PASCAL VOC2012. Specifically, the self-built underground personnel detection data set is: obtaining multiple pictures of mine operations through a camera in a constructed mine operation simulation scene; the target detection data set PASCAL VOC2012 has multiple object images, which include annotations of the category, position and size information of the objects; and selecting data in the data set as a training set in proportion; The improved YOLOv8 model is trained using the data of the training set.

3. A method for detecting illegal behaviors of mine workers according to claim 1, characterized in that: The target violation detection result determines whether the mine worker's behavior is in violation of the law through a bounding box and a category label. Specifically, the position information of the violation in the image is marked through the bounding box; and the type of the worker's violation is output through the category label.

4. A method for detecting illegal mining workers according to claim 1, characterized in that: The processing process of the DyHead detection head specifically includes the following steps: The input vector obtained from Neck is sent to three perception-enhanced attention modules. The three perception-enhanced modules obtain enhanced outputs through three attentions applied at different positions, specifically: W(F)=π C (p S (p L (F)·F)·F)·F; Among them, F represents the input feature, π C , π S , π L They represent the channel dimension, spatial dimension, and scale dimension respectively; according to the semantic importance of different scales, the features of different scales are dynamically fused and operated on the input L dimension, specifically: Among them, f is a linear function composed of 1×1 convolutional layers, and the activation function is hard-sigmoid; Indicates a global average pooling operation on the feature map F. By summing the spatial dimension and channel dimension of the feature map, the global average information of the feature map is obtained. S represents the spatial dimension, that is, the height and width of the feature map, and C represents the number of channels. Use deformable convolution to sparse attention learning and aggregate different levels of elements at the same spatial position, specifically: Among them, L represents the number of positions in the spatial dimension, that is, the number of pixels in the feature map. Indicates the normalization of the spatial dimension; l represents a specific spatial position index in the feature map; W l,k is the spatial weighting term, which indicates the weight of the eigenvalue at a specific spatial position l and offset k; K is the number of sparse sampling positions; p k +Δp k is the position moved by the self-learned spatial offset, Δp k Learned by deformable convolution, focusing on ambiguous areas; Δm k Represents the position Δp k The importance of self-learning; The switch controls whether the hyperparameter learns the activation threshold to automatically choose to open or close the channel to adapt to different tasks. Specifically: p C (F)·F=max(α 1 (F)·F c +b 1 (F),a 2 (F)·F c +b 2 (F)); Among them, max() is a hyperparameter function to learn the threshold of activating channel; F c is the feature split at the cth channel; α is the weighting coefficient related to the input feature F; β is an offset term, a learnable parameter related to the input feature F.

5. A method for detecting illegal behaviors of mine workers according to claim 1, characterized in that: The evaluation indicators of the improved YOLOv8 model include detection accuracy and model complexity. The detection accuracy is measured by the model's accuracy P, recall R and average accuracy mAP; the model complexity is measured by the number of model parameters and the amount of model calculation.

6. A mine worker violation target detection system, characterized in that: include: A model building module is used to embed EMA attention modules after the three C2f modules of the original YOLOv8 model backbone network, and introduce a self-attention mechanism dynamic target detection head DyHead to replace the detection head of the original network to form an improved YOLOv8 model; the improved YOLOv8 model is trained to obtain a target detection model for identifying illegal behaviors of mine workers; A data acquisition module is used to obtain pictures of the working scenes of mine workers; The target detection module is used to input the acquired image into the target detection model, extract the features of the image from the bottom layer to the high layer through the backbone network, and focus on the important features through the attention mechanism; Convolution and downsampling operations are performed on the image to extract feature maps containing semantic information at different levels; the feature maps are sent to the DyHead detection head after feature fusion through the PAN-FPN structure, and the target violation detection result is generated through the DyHead detection head.

7. A computer device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is loaded into a processor, it can execute the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • YOLO-based deep learning industrial field production working area violation detection method

    CN114913606A

  • Rapid and high-accuracy unmanned aerial vehicle aerial photography target detection method

    CN117876905A

  • Enteroscope polyp real-time detection method, system and model training method

    CN118134887A

  • Contextual visual-based SAR target detection method and apparatus, and storage medium

    US20230184927A1

Cited By

  • A dynamic target detection method, system and medium

    CN119785164A

  • Energy storage power station operation and maintenance safety monitoring method and system based on computer vision

    CN120088868A

  • Well site operation intelligent identification method and device

    CN120747875A