Safety protection equipment wearing detection and identification method

By applying the YOLOv8 algorithm in the detection of security protection equipment, combined with innovative network architecture and attention mechanism, the problems of inefficiency and error-prone traditional manual inspection methods are solved, and more efficient and accurate wear detection and recognition of security protection equipment are achieved.

CN120070846AInactive Publication Date: 2025-05-30LANZHOU JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411971625.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-05-30
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional manual inspection methods are inefficient and error-prone in ensuring that staff wear appropriate personal protective equipment, especially in large-scale and rapidly changing work environments.

Method used

The YOLOv8 algorithm is adopted, combining innovative network architecture, data augmentation technology, multi-task learning framework and attention mechanism to carry out wear detection and recognition of security protection equipment. Specific steps include picture annotation, denoising and contrast enhancement preprocessing, introduction of deformable convolution and attention mechanisms, and combining loss functions to improve the accuracy of bounding box prediction.

Benefits of technology

Through an automated inspection system, the errors of manual inspection are avoided, the efficiency and accuracy of safety supervision are improved, and it is suitable for large-scale and rapidly changing working environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120070846A_ABST
    Figure CN120070846A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing and target detection, and discloses a safety protection equipment wearing detection and identification method. According to the method, pictures of wearing of the safety protection equipment are collected, the pictures are labeled, original parameter data are input, the collected pictures are subjected to denoising and contrast enhancement preprocessing, data parameters are set to be epoch of 300, imgse of 640 and batch of 6, other data are the same as the initial data, deformable convolution is introduced, a weighting mechanism is introduced in calculation of an offset matrix, and the safety protection equipment is obtained. A SimAM attention mechanism is introduced to improve the perceptual ability of a network to an image, background noise is reduced, information of three dimensions of space, channels and features is fused to generate a 3D weight, the 3D weight is spread downwards in the form of an energy function, a Focal-EIoU loss function is introduced, and a Focal Loss function and an EIoU Loss function are combined to improve the accuracy of bounding box prediction in a target detection task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing and target detection, and specifically to a method for detecting and identifying the wearing of safety protection equipment. Background Technique

[0002] At various industrial and construction sites, ensuring that workers wear appropriate personal protective equipment is crucial for preventing work injuries and improving operational safety. However, traditional manual inspection methods are not only inefficient but also prone to errors, especially in large-scale and rapidly changing work environments. To improve the efficiency and accuracy of safety supervision, automated personal protective equipment detection systems have emerged. As a leading algorithm in the field of target detection, the YOLO series algorithms have shown great potential in the detection of safety protection equipment with their fast detection speed and high accuracy. With the introduction of YOLOv8, we have the opportunity to further enhance the performance of this system and achieve more accurate and reliable detection and identification of the wearing of safety protection equipment.

[0003] YOLOv8 significantly improves the detection performance of the model in complex scenarios by introducing innovative network architectures and optimization strategies. Combining advanced data augmentation techniques and multi-task learning frameworks, YOLOv8 can simultaneously perform equipment classification and localization, providing more comprehensive information for safety supervision. Through transfer learning and fine-tuning on specific datasets, YOLOv8 can quickly adapt to different detection tasks and achieve precise identification of specific types of safety protection equipment. In addition, the introduction of attention mechanisms, such as SimAM, further enhances the model's ability to identify key wearing areas and improves the accuracy of detection. Summary of the Invention

[0004] (I) Technical Problems to be Solved Aiming at the deficiencies of the prior art, the present invention provides a method for detecting and identifying the wearing of safety protection equipment, which includes collecting pictures of the wearing of safety protection equipment, annotating such pictures, inputting original parameter data, preprocessing the collected pictures by denoising and enhancing contrast, setting the data parameters to 300, 640, 6, and other data being the same as the initial ones. Introducing deformable convolution, introducing a weighting mechanism in the calculation of the offset matrix, introducing an attention mechanism to enhance the network's perception ability of images, reducing background noise, fusing information in the three dimensions of space, channel, and feature to generate 3D weights and propagating them downward in the form of an energy function, introducing a loss function, which combines function and A function for improving the accuracy of bounding box prediction in object detection tasks. By applying the above method, the problem of error-prone manual safety inspection methods is avoided. In large-scale and rapidly changing working environments, the efficiency and accuracy of safety supervision are improved, etc., and the above problems are solved.

[0005] (2) Technical solution To achieve the above object, the present invention provides the following technical solution: A method for detecting and identifying the wearing of safety protection equipment, comprising the following steps: S1. Collect pictures of the wearing of safety protection equipment and label such pictures; S2. Input the original parameter data and perform preprocessing of denoising and enhancing contrast on the collected pictures; S3. Set the data parameters to 300, 640, 6, and other data remains the same as the initial; S4. Introduce deformable convolution and introduce a weighting mechanism in the calculation of the offset matrix; S5. Introduce The attention mechanism to enhance the network's perception ability of images, reduce background noise, fuse the information in the three dimensions of space, channel and feature to generate 3D weights and propagate downward in the form of an energy function; S6. Introduce The loss function, which combines function and function, for improving the accuracy of bounding box prediction in object detection tasks.

[0006] Preferably, in S1, by using the image annotation tool LabelMe, manually draw a bounding box for the safety protection equipment in each picture and mark the category.

[0007] Preferably, in S2, the collected pictures are denoised by the image denoising formula, and the formula is as follows:

[0008] In the formula, represents the denoised image, represents the standard deviation of the Gaussian distribution, represents the original collected image, and represents the integral symbol.

[0009] Preferably, in S2, the contrast of the collected pictures is enhanced by the histogram equalization formula, and the formula is as follows:

[0010] In the formula, represents the cumulative probability of the grayscale value under the condition of, represents the ratio of the number of pixels with grayscale value in the image to the total number of pixels in the image.

[0011] Preferably, in the said S5 The formula for calculating the mean of all neurons in the attention mechanism channel is as follows:

[0012] In the formula, represents the mean of all neurons in the attention mechanism channel, represents the total number of neurons on this channel, represents the exponent in the spatial dimension, represents the neurons in the channel.

[0013] Preferably, in the said S5 The formula for calculating the variance of all neurons in the attention mechanism channel is as follows:

[0014] In the formula, represents the variance of all neurons in the attention mechanism channel, represents the total number of neurons on this channel, represents the exponent in the spatial dimension, represents the neurons in the channel, represents the mean of all neurons in the attention mechanism channel.

[0015] Preferably, in the said S5 The minimum energy function of the attention mechanism is as follows:

[0016] In the formula, represents the energy function of the neuron, represents the variance of all neurons in the attention mechanism channel, represents the total number of neurons on this channel, represents the exponent in the spatial dimension, represents the neurons in the channel, represents the mean of all neurons in the attention mechanism channel, represents the adjustment coefficient.

[0017] Preferably, in S6, the following is used The formula is as follows:

[0018] In the formula, represents the probability that the model predicts a positive class, represents the balance factor, represents the adjustment factor.

[0019] Preferably, in S6 The formula is as follows:

[0020] In the formula, represents the hyperparameter that controls the intensity of the effect.

[0021] Preferably, in S6 By integrating and the final loss function is obtained, and the formula is as follows:

[0022] In the formula, represents the final loss function obtained by integrating and represents the intersection over union, represents loss, represents the hyperparameter that controls the intensity of the effect.

[0023] Compared with the prior art, the present invention provides a method for detecting and identifying the wearing of safety protection equipment, having the following beneficial effects: The present invention collects pictures of the wearing of safety protection equipment, annotates such pictures, inputs the original parameter data, preprocesses the collected pictures by denoising and enhancing the contrast, sets the data parameters to to be 300, to be 640, to be 6, and other data remain the same as the initial ones. The deformable convolution is introduced, a weighted mechanism is introduced in the calculation of the offset matrix, the attention mechanism is introduced to improve the network's perception ability of images, reduce background noise, fuse the information in the three dimensions of space, channel and feature to generate 3D weights and propagate them downward in the form of an energy function, and the loss function is introduced, which combines Function and A function for improving the accuracy of bounding box prediction in object detection tasks. By applying the above method, the problem of error-prone manual safety inspection methods is avoided, and the efficiency and accuracy of safety supervision are improved in large-scale and rapidly changing working environments. Brief Description of the Drawings

[0024] Figure 1 It is a schematic diagram of the method steps of the present invention; Figure 2 is the efficiency diagram of the helmet model; Figure 3 It is the efficiency diagram of the mask model; Figure 4 It is the efficiency diagram of the protective clothing model; Figure 5 It is a comparison diagram of the detection results of each algorithm on the mask dataset. Detailed Embodiment

[0025] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0026] Aiming at the problem that in the detection of the wearing of safety protection equipment, the traditional manual inspection method is not only inefficient but also error-prone, especially in large-scale and rapidly changing working environments, the efficiency and accuracy of safety supervision are relatively low. For this reason, a method for detecting and identifying the wearing of safety protection equipment is proposed. Please refer to Figure 1 , and this method includes the following steps: S1. Collect pictures of the wearing of safety protection equipment and label such pictures; By using the image annotation tool LabelMe, the safety protection equipment in each picture can be labeled efficiently and accurately. The polygon tool, rectangle tool, etc. are used to draw bounding boxes to accurately frame the targets of each safety protection equipment, such as safety helmets, safety shoes, protective gloves, etc. While drawing the bounding boxes, corresponding category labels also need to be assigned to each equipment, which is convenient for subsequent data analysis and model training. The intuitive interface of LabelMe allows users to quickly adjust the shape and size of the bounding boxes to ensure the accuracy of the annotation. In addition, after the annotation is completed, the user can export the annotation results in a standard format for subsequent data processing and the training of deep learning models; S2. Input the original parameter data and perform preprocessing of denoising and enhancing the contrast on the collected pictures; The formula for image denoising is as follows:

[0027] The denoised image is easier to extract key features such as edges and corners, which is crucial for subsequent object detection and recognition tasks. Because clear features help improve the accuracy and robustness of the algorithm. In the formula, represents the denoised image, represents the standard deviation of the Gaussian distribution, represents the original acquired image, and represents the integral symbol. Denoising can reduce redundant information in the input image, thereby reducing the computational burden of subsequent processing, analysis, or model training and improving the processing speed; The formula for enhancing contrast is as follows:

[0028] Enhancing contrast can make important details in the image more prominent, thereby improving the human eye's recognition ability of the image. This is particularly important in the detection of security protection equipment because high contrast makes device features more obvious. In the formula, represents the cumulative probability of the gray value in the case of, represents the ratio of the number of pixels with gray value in the image to the total number of pixels in the image. The enhanced image helps image processing algorithms such as edge detection and image segmentation better identify and extract key information, which is very important for subsequent automated decision-making and analysis; S3. Set the data parameters to to be 300, to be 640, to be 6, and other data remains the same as the initial; S4. Introduce deformable convolution and introduce a weighting mechanism in the calculation of the offset matrix; Specifically, a weighting mechanism is introduced in the calculation of the offset matrix, which allows the model to apply different degrees of offsets according to the importance of features. This method enhances the detection ability of target features; S5. Introduce the attention mechanism to enhance the network's perception ability of the image, reduce background noise, and fuse information in the three dimensions of space, channel, and feature to generate 3D weights and propagate them downward in the form of an energy function; To further enhance the network's perception ability of the image and reduce the influence of background noise, Attention mechanism. The benefit of this mechanism is that it can improve the detection accuracy of the model by enabling the model to focus on the key parts of the input data, strengthening valuable information, and reducing the interference of unimportant or irrelevant information, thereby enhancing the recognition of the target and the model's ability to identify and process key gradient features in the image. The attention mechanism is a three-dimensional attention mechanism that fuses information in the three dimensions of space, channel, and feature to generate 3D weights and propagates them downward in the form of an energy function, where: The minimum energy function of the attention mechanism is as follows:

[0029]

[0030]

[0031] In the above formula, represents the energy function of the neuron, represents the variance of all neurons in the attention mechanism channel, represents the total number of neurons on this channel, represents the exponent in the spatial dimension, represents the neuron in the channel, represents the mean of all neurons in the attention mechanism channel, represents the adjustment coefficient; S6. Introduce the loss function, which combines function and function and is used to improve the accuracy of bounding box prediction in the object detection task; is designed to solve the problem of class imbalance. Especially in the classification branch of object detection, it makes the model training pay more attention to difficult-to-classify samples by reducing the weights of easy-to-classify samples and increasing the weights of difficult-to-classify samples. The formula is as follows:

[0032] In the formula, represents the probability that the model predicts as the positive class, represents the balance factor, represents the adjustment factor; is An improvement that takes into account the overlap area, center point distance, and aspect ratio consistency between the predicted bounding box and the ground truth bounding box. The core idea is to improve the accuracy and efficiency of bounding box regression. Combine the solution to class imbalance and the improvement of bounding box regression to improve the performance of the object detection model. The formula of

[0033] In the formula, represents the hyperparameter that controls the effect strength. By integrating and the final loss function is obtained, and the formula is as follows:

[0034] In the formula, represents the final loss function that integrates and IoU represents the intersection over union, represents the loss, represents the hyperparameter that controls the effect strength. To obtain the experimental results, model validation is carried out, and accuracy, recall, and mean average precision are used for detecting performance evaluation. Figure 3 1. Design ablation experiments: Since the algorithm is for a dataset with complex image backgrounds and diverse postures, variable convolutions and SimAM attention mechanisms are introduced based on this model. Finally, Focal-CLOU is used as the loss function. In this paper, ablation experiments are carried out to compare the impact of each module on the algorithm and compare the model efficiency of the training results of the helmet dataset, mask dataset, and protective clothing dataset. As Figure 3 shown, A represents the algorithm that adds variable convolutions to the YOLOv8 network, and B and C represent the algorithms that sequentially add the SimAM attention mechanism and the Focal-CLOU loss function on the basis of A. From Figure 2 it can be seen that for the helmet dataset, the accuracy of the improved YOLOv8 model has increased by 1.8%, and the mAP has increased by 1.4%. FromFigure 3 It can be seen that for the mask dataset, the accuracy of the improved YOLOv8 model has increased by 4%, and the mAP is basically stable; From Figure 4 it can be seen that for the mask dataset, the recall rate of the improved YOLOv8 model has increased by 3.5% and the mAP has increased by 1.7%; 2. Comparative experiment: This algorithm is improved based on the YOLOv8n model, aiming to verify its excellent performance in object detection through experiments. For comparison, under consistent experimental conditions, the performance of this improved model is compared with current popular object detection algorithms. The results are shown in Figure 5. Analyzing Figure 5 the data, it can be found that the detection accuracies of the YOLOV5n and YOLOv5s models are insufficient and cannot meet the requirements of real-time mask detection in complex and changeable environments. Although the YOLOv3, YOLOv3-sp, and YOLOv5l models have relatively high detection accuracies, their model structures are complex and the computational costs are high, making them not suitable for applications on devices with limited computing resources. In contrast, the improved YOLOv8 model proposed in this paper not only has improved detection accuracy and precision, with its mAP@.5 reaching 99% and P% reaching 97.8%, but is also more suitable for deployment on resource-constrained devices, effectively meeting the requirements of real-time mask detection in complex environments, avoiding the problem of easy errors in manual safety inspection methods, and improving the efficiency and accuracy of safety supervision in large-scale and rapidly changing working environments.

[0035] Although the embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for detecting and identifying wearing of safety protection equipment, characterized in that: The following steps are involved: S1. Collect pictures of people wearing safety protection equipment and label them; S2, input the original parameter data, and perform denoising and contrast enhancement preprocessing on the collected images; S3. Set the data parameters to is 300, is 640, is 6, and the other data are the same as the initial; S4, introduce deformable convolution and introduce weighting mechanism in the calculation of offset matrix; S5. Introduction The attention mechanism improves the network's perception of images, reduces background noise, and fuses information in three dimensions: space, channel, and feature to generate 3D weights and propagate downward in the form of an energy function. S6. Introduction The loss function combines Functions and Function to improve the accuracy of bounding box prediction in object detection tasks.

2. A method for detecting and identifying wearing of safety protection equipment according to claim 1, characterized in that: The S1 uses the image annotation tool LabelMe to manually draw a bounding box for the safety protection equipment in each picture and mark the category.

3. A method for detecting and identifying wearing of safety protection equipment according to claim 2, characterized in that: The S2 denoises the collected image using an image denoising formula, which is as follows: ; In the formula, represents the denoised image, represents the standard deviation of the Gaussian distribution, represents the original acquired image, and Represents the integral symbol.

4. A method for detecting and identifying wearing of safety protection equipment according to claim 3, characterized in that: The S2 performs contrast enhancement on the collected image through a histogram equalization formula, and the formula is as follows: ; In the formula, Indicated in gray value In the case of, the cumulative probability of the gray value, Indicates that the gray value in the image is The ratio of the number of pixels in the image to the total number of pixels in the image.

5. A method for detecting and identifying wearing of safety protection equipment according to claim 4, characterized in that: The S5 The formula for calculating the mean of all neurons in a channel by the attention mechanism is as follows: ; In the formula, express The mean of all neurons in the attention mechanism channel, represents the total number of neurons on this channel, represents the exponent in the spatial dimension, represents neurons in a channel.

6. A method for detecting and identifying wearing of safety protection equipment according to claim 5, characterized in that: The S5 The formula for calculating the variance of all neurons in the channel by the attention mechanism is as follows: ; In the formula, express The variance of all neurons in the attention mechanism channel, represents the total number of neurons on this channel, represents the exponent in the spatial dimension, represents the neurons in the channel, express The mean of all neurons in the attention mechanism channel.

7. A method for detecting and identifying wearing of safety protection equipment according to claim 6, characterized in that: The S5 The minimum energy function of the attention mechanism is as follows: ; In the formula, represents the energy function of a neuron, express The variance of all neurons in the attention mechanism channel, represents the total number of neurons on this channel, represents the exponent in the spatial dimension, represents the neurons in the channel, express The mean of all neurons in the attention mechanism channel, Represents the adjustment factor.

8. A method for detecting and identifying wearing of safety protection equipment according to claim 7, characterized in that: The S6 uses The formula is as follows: ; In the formula, represents the probability that the model predicts the positive category, represents the balance factor, Represents the adjustment factor.

9. The method for detecting and identifying wearing of safety protection equipment according to claim 1, characterized in that: The S6 The formula is as follows: ; In the formula, Indicates control A hyperparameter for the strength of the effect.

10. A method for detecting and identifying wearing of safety protection equipment according to claim 9, characterized in that: The S6 By integrating and The final loss function is obtained, and the formula is as follows: ; In the formula, Indicates integration and The final loss function is represents the intersection-and-union ratio, express loss, Indicates control A hyperparameter for the strength of the effect.