Construction site safety helmet identification method and system

By enhancing scene enhancement, feature extraction, channel pruning and multi-scale feature fusion of construction site safety helmet recognition system, the learning model is optimized, and the problem of unsatisfactory safety helmet recognition effect in the existing technology is solved, and the accurate identification and robustness of small goals and overlapping goals are achieved.

CN113989726BActive Publication Date: 2025-04-25YICHANG WTAU ELECTRONICS EQUIP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111323460.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-09
Publication Date
2025-04-25
Estimated Expiration
2041-11-09

AI Technical Summary

Technical Problem

In the prior art, the safety helmet recognition effect is not ideal, especially in the detection effect of small targets and overlapping targets, and the algorithm is not robust enough.

Method used

By acquiring the image information collected in real time, after scene enhancement, the network extracts features using the backbone feature extraction, and the neck network is optimized through channel pruning technology and multi-scale features fusion, and finally make predictions based on the output results.

Benefits of technology

The detection effect of small targets and overlapping targets is improved, the robustness of the algorithm is enhanced, and the accurate identification of workers' safety helmets in construction sites is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113989726B_ABST
    Figure CN113989726B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for identifying safety helmets at construction sites, the method comprising: acquiring real-time collected image information, and performing scene enhancement on the image information; extracting features of the image information by a backbone feature extraction network for training a learning model; using channel pruning technology on the learning model; performing multi-scale feature fusion on a feature fusion neck network of different scales to optimize the learning model; and making predictions based on the output results of the learning model. The present invention performs scene enhancement on the image information in the data set, extracts features from the image information by a backbone feature extraction network, trains the learning model, performs channel pruning on the learning model, and fuses features of different scales, thereby optimizing the learning model, predicting whether a safety helmet is worn in the image based on the learning model, and achieving rapid recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of deep learning technology, and in particular to a method and system for identifying safety helmets at construction sites. Background Art

[0002] As a personal head protection product, the hard hat can effectively prevent and reduce the injuries to the human head caused by falling objects or falling from the operator during production operations. Wearing hard hats is a necessary safety measure for construction workers at road construction sites, which can ensure the personal safety of construction workers to a certain extent. It is of great significance to detect and count people wearing hard hats of various colors at road construction sites. By counting construction workers wearing hard hats of different colors entering and leaving the construction site, it is convenient to realize the reasonable allocation of resources and effectively manage personnel; it can also issue warnings in time to workers who do not wear hard hats, which can ensure the safety of construction workers to a certain extent.

[0003] Traditional construction site supervision systems are mostly implemented by specialized engineering management personnel, but such construction site supervision systems require a lot of manpower, and due to personal negligence and other unavoidable factors, it is difficult to achieve widespread implementation of safety regulations, and have significant defects such as low reliability, long response delay, high cost and inconvenient management. At present, the patent application with publication number CN112802059A discloses "a safety helmet detection and tracking method based on YOLOV3 network and kcf tracking algorithm". According to the detection and tracking method, repeated detection of the same target can be avoided, but the detection efficiency needs to be improved, and the detection effect of occluded or overlapping small targets is not ideal. Summary of the invention

[0004] In view of the deficiencies in the prior art, the present invention provides a method and system for identifying a safety helmet at a construction site, so as to solve the technical problem that the safety helmet identification effect in the related art is not ideal.

[0005] In one aspect, the present invention provides a method for identifying a hard hat at a construction site, comprising:

[0006] Acquire image information collected in real time, and perform scene enhancement on the image information;

[0007] The backbone feature extraction network extracts features of the image information for training a learning model;

[0008] applying a channel pruning technique to the learning model;

[0009] Performing multi-scale feature fusion on the feature fusion neck network of different scales to optimize the learning model;

[0010] Predictions are made based on the output of the learned model.

[0011] Optionally, before acquiring and detecting the image information collected in real time, the method further includes:

[0012] The processing end obtains the surveillance video;

[0013] Performing frame extraction processing on the surveillance video to obtain a pre-recognition image of the object frame in the surveillance video;

[0014] Rename the pre-identified images according to the monitoring device;

[0015] According to image scale normalization and image standardization, the pre-recognized image is preprocessed to obtain image information for network input.

[0016] Optionally, after making the prediction, it also includes: the processing end makes a judgment based on the prediction result. If it is detected that the workers on the construction site are wearing safety helmets correctly, the processing end does not make any prompts; otherwise, it immediately sends a signal to the monitoring room and simultaneously sends a signal to the corresponding monitor to prompt the workers to wear safety helmets.

[0017] Optionally, performing scene enhancement on the image information includes:

[0018] The image information is classified into a training set, and small and medium-sized objects in the image information randomly extracted from the training set are cut and randomly scaled, and then pasted to any position of another image information to construct a new enhanced scene.

[0019] Optionally, a YoLov5 backbone network is used, wherein the YoLov5 backbone network first performs 3×3 depthwise separable convolution, then uses 1×1 convolution to reduce the dimension, performs 3×3 depthwise separable convolution after the dimension reduction, then uses 1×1 convolution to increase the dimension again, and finally connects the result with the input; wherein the calculation formula is as follows:

[0020]

[0021] Among them, F represents the input tensor, G represents the output tensor, Φ i,d , Φ i,p They represent the i-th 1×1 convolution and 3×3 depth-wise separable convolution respectively.

[0022] Optionally, the channel pruning technology is used for the learning model, including performing sparse training on the network on the learning model, performing L1 regularization training on the batch normalization layer to achieve sparsity, sorting the parameters, setting the pruning rate, and pruning the channels less than the pruning rate; wherein the loss function expression of the sparse training is as follows:

[0023]

[0024] Among them, (x, y) is the input and output of the training data, the first item is the total loss function of the convolutional layer training, l is the loss function of the current convolutional layer training, f(x, w) is the prediction result of the sample, w is the weight vector, and in the latter item, γ is the scaling factor of the BN layer. The network is sparse by changing the initial value of γ and training γ. g(γ) is the loss function of the scaling factor, r is the BN layer, and Г is the total number of BN layers.

[0025] Optionally, the feature fusion neck network of different scales performs multi-scale feature fusion, including assigning different weights to each input feature layer, upsampling the features of different scales for two-layer fusion, and then downsampling for three-layer fusion, and the final calculation result enters the next cycle for series connection; wherein, the function expression of adding different weight feature fusion is as follows:

[0026]

[0027] ω i ≥0 is a learnable weight, and ε is a number less than 1.

[0028] Optionally, making a prediction according to the output result of the learning model includes:

[0029] According to the characteristics of the learning model, the prediction layer connects the accessed image information to the prediction network and the bounding box prediction network respectively. The prediction network and the bounding box prediction network share the characteristics of the learning model. The prediction network predicts the type and position of the target according to the image information, and the bounding box prediction network is used to improve the accuracy.

[0030] Optionally, the process of the bounding box prediction network adopts k-means clustering, and the k-means clustering process includes:

[0031] S1, randomly select k samples from the sample as the initial center;

[0032] S2, calculate sample x i The distance to k centers;

[0033] S3, determine x based on the nearest Zhongxin i Category of;

[0034] S4, recalculate the centers of k categories;

[0035] S5, repeat S3 and S4 until the category center point no longer changes;

[0036] Among them, the objective function of the sample and the center is:

[0037] distance = 1-IOU(box, center)

[0038] Where distance represents distance, box represents sample, center represents center point, and IOU is the intersection-over-union ratio of the bounding box of the cluster center and the bounding box of the sample.

[0039] In another aspect, the present invention provides a construction site safety helmet identification system, comprising:

[0040] An enhancement module, used for performing scene enhancement on image information;

[0041] A backbone feature extraction network module, used to extract features of the image information and generate a learning model;

[0042] A pruning module, used for performing sparse training, pruning and retraining the learning model, and optimizing the learning model;

[0043] A fusion module, used to fuse features of different scales to better utilize the features of the image information;

[0044] The prediction network module is divided into a prediction network module and a bounding box network module. The prediction network module and the bounding box network module share feature network weights for making predictions.

[0045] Compared with the prior art, the present invention has the following beneficial effects:

[0046] The technology of the present invention is mainly used to solve the problem of identifying whether a helmet is worn or not, while improving the recognition effect.

[0047] First, the image information in the dataset is scene enhanced, the backbone feature extraction network extracts features from the image information, the learning model is trained, and the channel pruning is performed on the learning model. Features of different scales are fused to optimize the learning model, improve the detection effect of small targets and overlapping targets, and make the algorithm more robust. According to the learning model, it is predicted whether a helmet is worn in the image, thereby achieving accurate recognition of the helmets of workers on construction sites. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 It is a schematic diagram of the process of the present invention;

[0049] Figure 2 It is a schematic diagram of the occlusion processing method of the present invention;

[0050] Figure 3 It is a schematic diagram of the channel pruning technology process of the present invention;

[0051] Figure 4 A schematic diagram of a process for fusing features of different sizes according to the present invention;

[0052] Figure 5 It is a flow chart of cross-scale connection and weighted feature fusion of the feature network module on level 4 of the present invention.

[0053] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and beneficial effects of the present invention more clearly understood, the technical solution of the present invention is further described 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 used to limit the present invention.

[0055] See also Figure 1 On the one hand, the present invention provides a method for identifying a safety helmet at a construction site, comprising:

[0056] Acquire image information collected in real time, and perform scene enhancement on the image information;

[0057] The backbone feature extraction network extracts features of the image information for training a learning model;

[0058] applying a channel pruning technique to the learning model;

[0059] Performing multi-scale feature fusion on the feature fusion neck network of different scales to optimize the learning model;

[0060] Predictions are made based on the output of the learned model.

[0061] In this embodiment, the image information in the data set is firstly subjected to scene enhancement, the backbone feature extraction network performs feature extraction on the image information, the learning model is trained, and the channel pruning of the learning model is performed to fuse features of different scales, thereby improving the detection effect of small targets and overlapping targets, and making the algorithm more robust, thereby optimizing the learning model, and predicting whether a helmet is worn in the image based on the learning model to achieve rapid recognition.

[0062] Optionally, before acquiring and detecting the image information collected in real time, the method further includes:

[0063] The processing end obtains the surveillance video;

[0064] Performing frame extraction processing on the surveillance video to obtain a pre-recognition image of the object frame in the surveillance video;

[0065] Rename the pre-identified images according to the monitoring device;

[0066] According to image scale normalization and image standardization, the pre-recognized image is preprocessed to obtain image information for network input.

[0067] In this embodiment, the acquired video surveillance is framed at a rate of 25 frames per second, and the framed images are renamed to correspond to the monitoring equipment. The images are normalized to obtain standard images of the same mode and the input data are processed in the same way to complete the preprocessing of the data.

[0068] Optionally, after making the prediction, it also includes: the processing end makes a judgment based on the prediction result. If it is detected that the workers on the construction site are wearing safety helmets correctly, the processing end does not make any prompts; otherwise, it immediately sends a signal to the monitoring room and simultaneously sends a signal to the corresponding monitor to prompt the workers to wear safety helmets.

[0069] In this embodiment, the processing end makes a judgment based on the prediction results obtained by the learning model to monitor whether the workers on the construction site are wearing safety helmets.

[0070] Optionally, performing scene enhancement on the image information includes:

[0071] The image information is classified into a training set, and small and medium-sized objects in the image information randomly extracted from the training set are cut and randomly scaled, and then pasted to any position of another image information to construct a new enhanced scene.

[0072] In this embodiment, the data in the training set are defined according to the size of the area for targets of different sizes, and are divided into three types: large, medium, and small targets, where the targets are divided into two categories: those without a helmet and those with a helmet, and are labeled with 0 and 1 respectively;

[0073] Suppose the number of images in the training set is N, and the i-th image is x i , where i = 1, 2, 3, ..., N, For x i The jth target of the medium-sized target, d∈{s,m,l}, s,m,l represent small, medium and large-scale targets respectively. is x i The label of the jth object of d equal-scale objects in the image. a is the source scene image to be enhanced (the source scene image is the image that has completed the preprocessing mentioned above), x b To randomly extract images containing detection targets from the training data set X, where x a There are t targets to be detected in the image, which are x b There are k small targets inside, which are There are q targets in the game, which are x b Small and medium-sized targets within Copy and paste into scene xa and perform α on the pasted target i times random scaling, α∈[0.5, 1], that is, the midpoint target after scaling is The detection targets of the enhanced scene are:

[0074]

[0075] The pasting position is randomly selected in the source scene image, but it is necessary to ensure that the target after pasting cannot exceed the range of the original image;

[0076] In order to control the intensity of scene enhancement, some pictures are selected as source scene images with probability p in each Mini-Batch (sample) of model training, and the original pictures are replaced after scene enhancement. The calculation formula of the number of pictures after scene enhancement is as follows:

[0077] SUM=D×BS×p

[0078] Among them, SUM is the number of images after data enhancement, D is the number of training iterations, BS is the batch size of each iteration, and p is the enhancement strength, that is, the weight, a number between 0 and 1;

[0079] See also Figure 2 At the same time, in order to ensure the accuracy of detection, after adding a new target to the source scene image, the image needs to be occluded. The occlusion processing method assumes that B is the target in the foreground image and A is the target in the source scene image.

[0080] In the first type of occlusion, B is occluded at the four corners of A. In order to maintain the integrity of the bounding box, this annotation box is not processed;

[0081] The second type of occlusion is that the area of ​​B is smaller than that of target A, and B occludes the edge of A. The third type of occlusion is that the area of ​​B is larger than that of target A, and B occludes the edge of A. In the second and third types of occlusion, B partially and completely occludes the four edges of A respectively. In order to retain the individual integrity of the larger target among the two, the occluded part of the smaller target is deleted;

[0082] In the fourth type of occlusion, B completely blocks A, and A is not displayed in the enhanced scene, so target B is discarded; when the area of ​​B is smaller than that of target A, it can simulate the normal occlusion of the target in reality, so target B is retained.

[0083] The robustness of the model is improved through the aforementioned large-scale training.

[0084] Optionally, the improved backbone feature extraction network includes:

[0085] The backbone network of YoLov5 is used. The backbone network of YoLov5 first performs 3×3 depth-separable convolution, then uses 1×1 convolution to reduce the dimension, performs 3×3 depth-separable convolution after the dimension reduction, and then uses 1×1 convolution to increase the dimension again, and finally connects the result with the input; wherein, the calculation formula is as follows:

[0086]

[0087] Among them, F represents the input tensor, G represents the output tensor, Φ i,d , Φ i,p They represent the i-th 1×1 convolution and 3×3 depth-wise separable convolution respectively.

[0088] In this embodiment, a convolutional neural network is established, wherein the aforementioned result is G, the input is F, and the It is a 3×3 depth-wise separable convolution, and then a 1×1 convolution dimension reduction operation is used. This network structure allows more spatial information to be passed into the neural network, so that the depth-wise separable convolution can perform richer feature extraction.

[0089] Optionally, the channel pruning technology is used for the learning model, including performing sparse training on the network on the learning model, performing L1 regularization training on the batch normalization layer to achieve sparsity, sorting the parameters, setting the pruning rate, and pruning the channels less than the pruning rate; wherein the loss function expression of the sparse training is as follows:

[0090]

[0091] Among them, (x, y) is the input and output of the training data, the first item is the total loss function of the convolutional layer training, l is the loss function of the current convolutional layer training, f(x, w) is the prediction result of the sample, w is the weight vector, and in the latter item, γ is the scaling factor of the BN layer. The network is sparse by changing the initial value of γ and training γ. g(γ) is the loss function of the scaling factor, r is the BN layer, and Г is the total number of BN layers.

[0092] See also Figure 3In this embodiment, L1 regularization is used for sparseness, so g(γ) = |γ|. λ is used to balance the losses of the previous and next two items. After sparse training, the network will become denser, and then through pruning, a smaller network will be obtained, and it will be judged whether it meets the performance requirements. If it does not meet the requirements, the sparse training will continue, otherwise the sparse training will be terminated. At the same time, the network performance has not decreased, and even becomes better. In addition, the BatchNormalization (BN) layer is sparsely trained, and then sorted according to the absolute value of the weight; a certain pruning rate is set, and channels less than the set value are pruned. If the absolute value of the weights of all channels in a layer of the network is less than the set threshold, all channels in this layer will be pruned, so that the network structure is destroyed. For the above situation, a layer of channels with the largest absolute value of the retained weight is selected to ensure the integrity of the network structure.

[0093] Optionally, the step of performing multi-scale feature fusion on the feature fusion neck network of different scales includes:

[0094] Different weights are assigned to each input feature layer, and features of different scales are upsampled for two-layer fusion, and then downsampled for three-layer fusion. The final calculation result enters the next cycle for concatenation; the function expression of adding different weight feature fusion is as follows:

[0095]

[0096] ω i ≥0 is a learnable weight, and ε is a number less than 1.

[0097] See also Figure 4 In this embodiment, in order to further improve the accuracy, features of different sizes are fused. Among them, the receptive field of the high-level network is relatively large and the semantic representation ability is strong, but the resolution of the feature map is low and the ability to represent the collective information is weak (lack of spatial geometric feature details); the receptive field of the low-level network is relatively small, and the geometric detail information representation ability is strong. Although the resolution is high, the semantic information representation ability is weak, so these features need to be added together for detection. In each layer of the network, upsampling is first performed to fuse P1 and P2, and then downsampling is performed to fuse P3, P4, and P5, and P3, P4, and P5 are connected in series with P3, P4, and P5 of other network layers (with different weights).

[0098] See also Figure 5 , where the process of cross-scale connection and weighted feature fusion of the feature network module on level 4 is taken as an example:

[0099]

[0100] Among them, ω is the weight, P is the fused feature, and Pin is the input feature, P out is the output feature, P td is the middle layer in the top-down feature fusion process, ω1 represents the P4 The weight of P5 is The weight of ω′1 indicates that P4 is The weight of ω′2 represents right The weight of ω′3 represents right Conv represents convolution, and Resize represents the scale of the feature layer.

[0101] Optionally, making a prediction according to the output result of the learning model includes:

[0102] According to the characteristics of the learning model, the prediction layer connects the accessed image information to the prediction network and the bounding box prediction network respectively. The prediction network and the bounding box prediction network share the characteristics of the learning model. The prediction network predicts the type and position of the target according to the image information, and the bounding box prediction network is used to improve the accuracy.

[0103] In this embodiment, the feature prediction network and the bounding box prediction network share the features of the learning model. The picture is divided into S×S grids. When judging whether the image has the features to be identified, the prediction network is first used to judge whether all the grids in the image have the features of the learning model. If not, no reaction is performed. Otherwise, the bounding box prediction network is entered for judgment.

[0104] Optionally, the process of the bounding box prediction network adopts k-means clustering, and the k-means clustering process includes:

[0105] S1, randomly select k samples from the sample as the initial center;

[0106] S2, calculate sample x i The distance to k centers;

[0107] S3, determine x based on the nearest Zhongxin i Category of;

[0108] S4, recalculate the centers of k categories;

[0109] S5, repeat S3 and S4 until the category center point no longer changes;

[0110] Among them, the objective function of the sample and the center is:

[0111] distance = 1-IOU(box, center)

[0112] Where distance represents distance, box represents sample, center represents center point, and IOU is the intersection-over-union ratio of the bounding box of the cluster center and the bounding box of the sample.

[0113] In this embodiment, the k-means clustering algorithm is used to randomly extract samples (grids) from the image, and several samples are used as the initial center point to determine the sample type closest to the center point. The above steps are repeated until the center point of the category no longer changes. Finally, the aspect ratios obtained by clustering can reflect the shape characteristics of the target in the data set. Therefore, the optimization goal is to make the intersection-over-union ratio (IOU) between the sample and the cluster center as large as possible, that is, the objective function:

[0114] distance = 1-IOU(box, center)

[0115] In another aspect, the present invention provides a construction site safety helmet identification system, comprising:

[0116] An enhancement module, used for performing scene enhancement on image information;

[0117] A backbone feature extraction network module, used to extract features of the image information and generate a learning model;

[0118] A pruning module, used for performing sparse training, pruning and retraining the learning model, and optimizing the learning model;

[0119] A fusion module, used to fuse features of different scales to better utilize the features of the image information;

[0120] The prediction network module is divided into a prediction network module and a bounding box network module. The prediction network module and the bounding box network module share feature network weights for making predictions.

[0121] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution of the present invention, which should be included in the scope of the claims of the present invention.

Claims

1. A method for identifying a hard hat at a construction site, characterized in that: include: Acquire image information collected in real time, and perform scene enhancement on the image information; The backbone feature extraction network extracts features of the image information for training a learning model; applying a channel pruning technique to the learning model; Performing multi-scale feature fusion on the feature fusion neck network of different scales to optimize the learning model; making predictions based on outputs of the learning model; The performing scene enhancement on the image information comprises: The image information is classified into a training set, and small and medium-sized objects in the image information randomly extracted from the training set are cut, randomly scaled, and pasted to any position of another image information to construct a new enhanced scene; The data in the training set are defined into targets of different sizes according to their area sizes, and divided into three types: large, medium, and small targets, where the targets are divided into two categories: those without helmets and those with helmets, and are labeled with 0 and 1 respectively; Suppose the number of images in the training set is N, and the i-th image is x i , where i = 1, 2, 3, ..., N, For x i The jth target of the medium-sized target, d∈{s,m,l}, s,m,l represent small, medium and large-scale targets respectively. is x i The label of the jth object of d equal-scale objects in the image; x a is the source scene image to be enhanced, the source scene image is the image that has completed the preprocessing, x b To randomly extract images containing detection targets from the training data set X, where x a There are t targets to be detected in the image, which are x b There are k small targets inside, which are There are q targets in the game, which are x b Small and medium-sized targets within Copy and paste into scene x a and perform α on the pasted target i times random scaling, α∈[0.5, 1], that is, the midpoint target after scaling is The detection targets of the enhanced scene are: The pasting position is randomly selected in the source scene image, but it is necessary to ensure that the target after pasting cannot exceed the range of the original image; In order to control the intensity of scene enhancement, some pictures are selected as source scene images with probability p in each Mini-Batch sample of model training, and the original pictures are replaced after scene enhancement. The calculation formula for the number of pictures after scene enhancement is as follows: SUM=D×BS×p Among them, SUM is the number of images after data enhancement, D is the number of training iterations, BS is the BatchSize of each iteration, and p is the enhancement strength, that is, the weight, a number between 0 and 1; After adding a new target to the source scene image, the image needs to be occluded. The occlusion processing method assumes that B is the target in the foreground image and A is the target in the source scene image. In the first type of occlusion, B is occluded at the four corners of A. In order to maintain the integrity of the bounding box, this annotation box is not processed; The second type of occlusion is that the area of ​​B is smaller than that of target A, and B occludes the edge of A. The third type of occlusion is that the area of ​​B is larger than that of target A, and B occludes the edge of A. In the second and third types of occlusion, B partially and completely occludes the four edges of A respectively. In order to retain the individual integrity of the larger target among the two, the occluded part of the smaller target is deleted; In the fourth type of occlusion situation, B completely blocks A, A is not displayed in the enhanced scene, and target B is discarded; when the area of ​​B is smaller than that of target A, it can simulate the normal occlusion of targets in reality and retain target B.

2. The construction site safety helmet identification method according to claim 1, characterized in that: Before acquiring the image information collected in real time, the method further includes: The processing end obtains the surveillance video; Performing frame extraction processing on the surveillance video to obtain a pre-recognition image of the object frame in the surveillance video; Rename the pre-identified images according to the monitoring device; According to image scale normalization and image standardization, the pre-recognized image is preprocessed to obtain image information for network input.

3. The method for identifying a safety helmet at a construction site according to claim 1, characterized in that: After making the prediction, it also includes: the processing end makes a judgment based on the prediction result. If it is detected that the workers in the construction site are wearing the safety helmet correctly, the processing end does not make any prompts. Otherwise, it immediately sends a signal to the monitoring room and simultaneously sends a signal to the corresponding monitor to prompt the workers to wear safety helmets.

4. The construction site safety helmet identification method according to claim 1, characterized in that: The backbone feature extraction network comprises: The backbone network of YoLov5 is used. The backbone network of YoLov5 first performs 3×3 depth-separable convolution, then uses 1×1 convolution to reduce the dimension, performs 3×3 depth-separable convolution after the dimension reduction, and then uses 1×1 convolution to increase the dimension again, and finally connects the result with the input; wherein, the calculation formula is as follows: Among them, F represents the input tensor, G represents the output tensor, Φ i,d , Φ i,p They represent the i-th 1×1 convolution and 3×3 depth-wise separable convolution respectively.

5. The construction site safety helmet identification method according to claim 1, characterized in that: The using of a channel pruning technique on the learning model comprises: The network is sparsely trained on the learning model, the batch normalization layer is L1 regularized to achieve sparseness, the parameters are sorted, the pruning rate is set, and the channels less than the pruning rate are pruned; wherein the loss function expression of the sparse training is as follows: Among them, (x, y) is the input and output of the training data, the first item is the total loss function of the convolutional layer training, l is the loss function of the current convolutional layer training, f(x, w) is the prediction result of the sample, w is the weight vector, and in the latter item, γ is the scaling factor of the BN layer. The network is sparse by changing the initial value of γ and training γ. g(γ) is the loss function of the scaling factor, r is the BN layer, and Г is the total number of BN layers.

6. The method for identifying a safety helmet at a construction site according to claim 1, characterized in that: The multi-scale feature fusion of the feature fusion neck network of different scales includes: Different weights are assigned to each input feature layer, and features of different scales are upsampled for two-layer fusion, and then downsampled for three-layer fusion. The final calculation result enters the next cycle for concatenation; the function expression of adding different weight feature fusion is as follows: ω i ≥0 is a learnable weight and ε is a number less than 1.

7. The method for identifying a safety helmet at a construction site according to claim 1, characterized in that: The making a prediction according to the output result of the learning model comprises: According to the characteristics of the learning model, the prediction layer connects the accessed image information to the prediction network and the bounding box prediction network respectively. The prediction network and the bounding box prediction network share the characteristics of the learning model. The prediction network predicts the type and position of the target according to the image information, and the bounding box prediction network is used to improve the accuracy.

8. The method for identifying a safety helmet at a construction site according to claim 7, characterized in that: The process of the bounding box prediction network adopts k-means clustering, and the k-means clustering process includes: S1, randomly select k samples from the sample as the initial center; S2, calculate sample x i The distance to k centers; S3, determine x based on the nearest Zhongxin i Category of; S4, recalculate the centers of k categories; S5, repeat S3 and S4 until the category center point no longer changes; Among them, the objective function of the sample and the center is: distance=1-IOU(box, center) Where distance represents distance, box represents sample, center represents center point, and IOU is the intersection-over-union ratio of the bounding box of the cluster center and the bounding box of the sample.

9. Construction site helmet identification system, characterized by: include: An enhancement module, used for performing scene enhancement on image information; A backbone feature extraction network module, used to extract features of the image information and generate a learning model; A pruning module, used for performing sparse training, pruning and retraining the learning model, and optimizing the learning model; A fusion module, used to fuse features of different scales to better utilize the features of the image information; A prediction network module, which is divided into a prediction network module and a bounding box network module, wherein the prediction network module and the bounding box network module share feature network weights for making predictions; The performing scene enhancement on the image information comprises: The image information is classified into a training set, and small and medium-sized objects in the image information randomly extracted from the training set are cut, randomly scaled, and pasted to any position of another image information to construct a new enhanced scene; The data in the training set are defined into targets of different sizes according to their area sizes, and divided into three types: large, medium, and small targets, where the targets are divided into two categories: those without helmets and those with helmets, and are labeled with 0 and 1 respectively; Suppose the number of images in the training set is N, and the i-th image is x i , where i = 1, 2, 3, ..., N, For x i The jth target of the medium-sized target, d∈{s,m,l}, s,m,l represent small, medium and large-scale targets respectively. is x i The label of the jth object of d equal-scale objects in the image; x a is the source scene image to be enhanced, the source scene image is the image that has completed the preprocessing, x b To randomly extract images containing detection targets from the training data set X, where x a There are t targets to be detected in the image, which are x b There are k small targets inside, which are There are q targets in the game, which are x b Small and medium-sized targets within Copy and paste into scene x a and perform α on the pasted target i times random scaling, α∈[0.5, 1], that is, the midpoint target after scaling is The detection targets of the enhanced scene are: The pasting position is randomly selected in the source scene image, but it is necessary to ensure that the target after pasting cannot exceed the range of the original image; In order to control the intensity of scene enhancement, some pictures are selected as source scene images with probability p in each Mini-Batch sample of model training, and the original pictures are replaced after scene enhancement. The calculation formula for the number of pictures after scene enhancement is as follows: SUM=D×BS×p Among them, SUM is the number of images after data enhancement, D is the number of training iterations, BS is the BatchSize of each iteration, and p is the enhancement strength, that is, the weight, a number between 0 and 1; After adding a new target to the source scene image, the image needs to be occluded. The occlusion processing method assumes that B is the target in the foreground image and A is the target in the source scene image. In the first type of occlusion, B is occluded at the four corners of A. In order to maintain the integrity of the bounding box, this annotation box is not processed; The second type of occlusion is that the area of ​​B is smaller than that of target A, and B occludes the edge of A. The third type of occlusion is that the area of ​​B is larger than that of target A, and B occludes the edge of A. In the second and third types of occlusion, B partially and completely occludes the four edges of A respectively. In order to retain the individual integrity of the larger target among the two, the occluded part of the smaller target is deleted; In the fourth type of occlusion situation, B completely blocks A, A is not displayed in the enhanced scene, and target B is discarded; when the area of ​​B is smaller than that of target A, it can simulate the normal occlusion of targets in reality and retain target B.

Citation Information

Patent Citations

  • Safety helmet detecting and tracking method based on YOLOV3 network and kcf tracking algorithm

    CN112802059A