Power grid operator safety helmet wearing detection method and device, computer equipment, readable storage medium and program product
By employing methods such as cross-scale small target feature extraction, deep feature fusion, and feature enhancement, the accuracy problem of traditional deep learning models in detecting safety helmet wearing in power grid operation sites has been solved, achieving higher detection accuracy and adaptability.
Patent Information
- Application Number
- CN202511334484.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-18
- Publication Date
- 2026-01-20
- Estimated Expiration
- 2045-09-18
AI Technical Summary
Traditional deep learning models struggle to effectively identify helmet wearing in power grid operations, especially under conditions of small targets, occlusion, complex backgrounds, and changing lighting, where detection accuracy declines.
By employing a cross-scale small target feature extraction module, a deep feature extraction module, and a feature enhancement module, combined with various types of dilated convolution continuous operations and parallel operations, the accuracy of helmet wearing detection is improved through cross-scale feature extraction, deep feature fusion, and feature enhancement.
The helmet wearing detection model has improved its adaptability and detection accuracy in complex scenarios, suppressed background noise and irrelevant information, and improved detection accuracy.
Smart Images

Figure CN120823453B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of power grid operation safety management, and in particular to a power grid operator safety helmet wearing detection method and device, computer equipment, computer readable storage medium and computer program product. BACKGROUND
[0002] With the rapid development of the power industry and the increasing complexity of power grid operation environment, ensuring the safety of power grid operators has become a critical task. In the power grid operation site, the standard wearing of safety helmets is an important measure to prevent high-altitude falling, object striking and other safety accidents.
[0003] At present, the picture of the power grid operation site can be analyzed according to the deep learning model to identify whether the operator has worn the safety helmet. However, in the actual power grid operation scene, the safety helmet is a small target. The traditional deep learning model is prone to miss detection or false detection when dealing with small targets, resulting in a decrease in the detection accuracy of safety helmet wearing; in the construction site environment, the safety helmet may be partially blocked by other objects, or in a complex background (such as the presence of various mechanical equipment, diverse worker clothing, etc.) similar to the environment color, resulting in a decrease in the detection accuracy of safety helmet wearing; in the outdoor construction site, the lighting conditions often change a lot (such as strong light, shadow, night monitoring), and the deep learning model is not robust enough to changes in lighting, resulting in a decrease in the detection accuracy of safety helmet wearing. SUMMARY
[0004] Therefore, it is necessary to provide a power grid operator safety helmet wearing detection method, device, computer equipment, computer readable storage medium and computer program product in view of the above technical problems.
[0005] In a first aspect, the present application provides a power grid operator safety helmet wearing detection method, comprising:
[0006] According to the cross-scale small target feature extraction module of the safety helmet wearing detection model and the power grid operator image, a cross-scale feature map of the power grid operator image is obtained;
[0007] According to the deep feature extraction module of the safety helmet wearing detection model and the cross-scale feature map, a deep feature map is obtained; the deep feature extraction module is constructed according to a plurality of types of continuous operation of the hole convolution combined with a plurality of types of hole convolution parallel operation;
[0008] According to the feature enhancement module of the safety helmet wearing detection model and the deep feature map, an enhanced feature map is obtained; the feature enhancement module is constructed according to the hole convolution parallel operation combined with the pooling parallel operation;
[0009] According to the classifier module of the safety helmet wearing detection model, the enhanced feature map is subjected to binary classification prediction to obtain a safety helmet wearing detection result of the power grid worker image.
[0010] In one of the embodiments, the cross-scale small target feature extraction module of the safety helmet wearing detection model and the power grid worker image are used to obtain a cross-scale feature map of the power grid worker image, including:
[0011] According to the convolution layer in the cross-scale small target feature extraction module of the safety helmet wearing detection model, the power grid worker image is subjected to convolution, normalization and activation function processing operations in sequence to obtain a first shallow layer feature map;
[0012] According to the residual block in the cross-scale small target feature extraction module, the first shallow layer feature map is subjected to convolution, normalization and activation function processing operations in sequence to obtain a second shallow layer feature map;
[0013] According to the mixed parallel extraction block in the cross-scale small target feature extraction module, the second shallow layer feature map is subjected to parallel processing operations to obtain a first cross-scale intermediate feature map;
[0014] According to the residual block in the cross-scale small target feature extraction module, the first cross-scale intermediate feature map is subjected to convolution, normalization and activation function processing operations in sequence to obtain a second cross-scale intermediate feature map;
[0015] According to the residual block in the cross-scale small target feature extraction module, the second cross-scale intermediate feature map is subjected to convolution, normalization and activation function processing operations in sequence to obtain a third cross-scale intermediate feature map;
[0016] The third cross-scale intermediate feature map is taken as the cross-scale feature map of the power grid worker image.
[0017] In one of the embodiments, the mixed parallel extraction block in the cross-scale small target feature extraction module is used to perform parallel processing operations on the second shallow layer feature map to obtain a first cross-scale intermediate feature map, including:
[0018] According to the mixed parallel extraction block in the cross-scale small target feature extraction module, the second shallow layer feature map is subjected to a first convolution operation to obtain a first cross-scale intermediate sub-feature map;
[0019] According to the mixed parallel extraction block in the cross-scale small target feature extraction module, the second shallow layer feature map is subjected to a hole convolution operation to obtain a second cross-scale intermediate sub-feature map;
[0020] According to the mixed parallel extraction block in the cross-scale small target feature extraction module, the second shallow layer feature map is subjected to a second convolution operation to obtain a third cross-scale intermediate sub-feature map;
[0021] The first cross-scale intermediate sub-feature map, the second cross-scale intermediate sub-feature map and the third cross-scale intermediate sub-feature map are connected and fused in the channel dimension, and a first convolution operation is performed on the fusion result to obtain a first cross-scale intermediate feature map.
[0022] In one of the embodiments, the deep feature extraction module according to the safety helmet wearing detection model and the cross-scale feature map obtain a deep feature map, including:
[0023] The convolution block in the deep feature extraction module according to the safety helmet wearing detection model performs a convolution operation on the cross-scale feature map, and the channel attention and position information of the cross-scale feature map are combined and processed according to the coordinate attention mechanism in the deep feature extraction module to obtain a first deep intermediate feature map.
[0024] The multi-type dilated convolution cross-scale feature fusion sub-module in the deep feature extraction module performs multi-type dilated convolution continuous operation and multi-type dilated convolution parallel operation on the first deep intermediate feature map to obtain a second deep intermediate feature map.
[0025] The second deep intermediate feature map and a second shallow intermediate feature map are connected and fused in the channel dimension to obtain a third deep intermediate feature map as a deep feature map; the second shallow intermediate feature map is obtained according to the cross-scale small target feature extraction module of the power grid worker image and the safety helmet wearing detection model.
[0026] In one of the embodiments, the multi-type dilated convolution cross-scale feature fusion sub-module in the deep feature extraction module performs multi-type dilated convolution continuous operation and multi-type dilated convolution parallel operation on the first deep intermediate feature map to obtain a second deep intermediate feature map, including:
[0027] The multi-type dilated convolution cross-scale feature fusion sub-module in the deep feature extraction module performs a first-type dilated convolution operation on the first deep intermediate feature map, and performs normalization and activation function processing operation to obtain a first deep intermediate sub-feature map.
[0028] The multi-type dilated convolution cross-scale feature fusion sub-module in the deep feature extraction module performs a second-type dilated convolution operation on the first deep intermediate sub-feature map, and performs normalization and activation function processing operation to obtain a second deep intermediate sub-feature map.
[0029] According to the multi-type hole convolution cross-scale feature fusion submodule in the deep feature extraction module, the second deep layer intermediate feature map is subjected to a third type of hole convolution operation, and normalization and activation function processing operations are performed to obtain a third deep layer intermediate feature map;
[0030] According to the multi-type hole convolution cross-scale feature fusion submodule in the deep feature extraction module, the third deep layer intermediate feature map is subjected to a fourth type of hole convolution operation and a fifth type of hole convolution operation in parallel, and the parallel processing results are connected and fused in the channel dimension to obtain a second deep layer intermediate feature map.
[0031] In one of the embodiments, the enhanced feature map is obtained according to the feature enhancement module of the safety hat wearing detection model and the deep layer feature map, including:
[0032] According to the feature enhancement module of the safety hat wearing detection model, a bilinear remodeling adjustment operation is performed on the deep layer feature map to obtain a first enhanced intermediate feature map.
[0033] According to the feature enhancement module of the safety hat wearing detection model, a bilinear remodeling adjustment operation is performed on the deep layer feature map to obtain a first enhanced intermediate feature map.
[0034] According to the feature enhancement module of the safety hat wearing detection model, a bilinear remodeling adjustment operation is performed on the deep layer feature map to obtain a first enhanced intermediate feature map.
[0035] According to the feature enhancement module of the safety hat wearing detection model, a bilinear remodeling adjustment operation is performed on the deep layer feature map to obtain a first enhanced intermediate feature map.
[0036] According to the feature enhancement module of the safety hat wearing detection model, a bilinear remodeling adjustment operation is performed on the deep layer feature map to obtain a first enhanced intermediate feature map.
[0037] The fifth enhanced intermediate feature map is subjected to a one-dimensional convolution operation and an activation function processing operation to obtain a sixth enhanced intermediate feature map as an enhanced feature map.
[0038] In a second aspect, the present application also provides a safety hat wearing detection device for power grid workers, including:
[0039] The cross-scale feature map acquisition module is configured to obtain a cross-scale feature map of the power grid worker image according to the cross-scale small target feature extraction module of the safety hat wearing detection model and the power grid worker image.
[0040] The deep feature map acquisition module is configured to obtain a deep feature map according to a deep feature extraction module of the safety helmet wearing detection model and the cross-scale feature map; the deep feature extraction module is constructed according to a plurality of types of serial operations of a hollow convolution combined with a plurality of types of parallel operations of a hollow convolution.
[0041] The enhanced feature map acquisition module is configured to obtain an enhanced feature map according to a feature enhancement module of the safety helmet wearing detection model and the deep feature map; the feature enhancement module is constructed according to a parallel operation of a hollow convolution combined with a parallel operation of a pooling.
[0042] The detection result acquisition module is configured to perform binary classification prediction on the enhanced feature map according to a classifier module of the safety helmet wearing detection model, and obtain a safety helmet wearing detection result of the power grid worker image.
[0043] In a third aspect, the present application further provides a computer device. The computer device comprises a memory and a processor, the memory stores a computer program, and the processor executes the above method.
[0044] In a fourth aspect, the present application further provides a computer readable storage medium. The computer readable storage medium stores a computer program, and the computer program is executed by a processor to execute the above method.
[0045] In a fifth aspect, the present application further provides a computer program product. The computer program product comprises a computer program, and the computer program is executed by a processor to execute the above method.
[0046] The aforementioned method, device, computer equipment, computer-readable storage medium, and computer program product for detecting the wearing of safety helmets by power grid workers obtain a cross-scale feature map of the power grid worker image based on the cross-scale small target feature extraction module of the safety helmet wearing detection model and the image of the power grid worker; obtain a deep feature map based on the deep feature extraction module of the safety helmet wearing detection model and the cross-scale feature map; the deep feature extraction module is constructed based on a combination of continuous and parallel operations of multiple types of dilated convolution; obtain an enhanced feature map based on the feature enhancement module of the safety helmet wearing detection model and the deep feature map; the feature enhancement module is constructed based on a combination of parallel dilated convolution operations and parallel pooling operations; and perform binary classification prediction on the enhanced feature map based on the classifier module of the safety helmet wearing detection model to obtain the safety helmet wearing detection result of the power grid worker image. The deep feature extraction module of this application combines multiple types of dilated convolution continuous operations with multiple types of dilated convolution parallel operations. This not only identifies low-level features such as the basic shape or color of the safety helmet, but also better captures the changes of the safety helmet under different scenes and lighting conditions, improving the adaptability of the safety helmet wearing detection model to complex scenes, thereby improving the detection accuracy of safety helmet wearing. The feature enhancement module of this application combines dilated convolution parallel operations with pooling parallel operations to suppress background noise and irrelevant information in the deep feature map, improving the expressive power of the safety helmet features, thereby improving the detection accuracy of safety helmet wearing. Attached Figure Description
[0047] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0048] Figure 1 This is an application environment diagram of the safety helmet wearing detection method for power grid workers in one embodiment;
[0049] Figure 2 This is a flowchart illustrating a method for detecting the wearing of safety helmets by power grid workers in one embodiment;
[0050] Figure 3 This is a schematic diagram of the structure of a multi-scale feature fusion submodule with multiple types of dilated convolutions in one embodiment;
[0051] Figure 4 This is a schematic diagram of the safety helmet detection algorithm in one embodiment;
[0052] Figure 5 This is a flowchart illustrating the helmet detection algorithm in one embodiment;
[0053] Figure 6 Flowchart of the safety helmet wearing detection method for power grid workers in another embodiment;
[0054] Figure 7 Structural diagram of the safety helmet feature enhancement sub-module in one embodiment;
[0055] Figure 8 Structural block diagram of the safety helmet wearing detection device for power grid workers in one embodiment;
[0056] Figure 9 Internal structure diagram of the computer device in one embodiment. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application will be further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0058] The safety helmet wearing detection method for power grid workers provided by the embodiments of the present application can be applied in the application environment as shown in Figure 1 . Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data required to be processed by the server 104. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers. The terminal 102 can input the power grid worker image into the safety helmet wearing detection model to obtain the safety helmet wearing detection result of the power grid worker image. Among them, the terminal 102 can be but not limited to various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The server 104 can be a stand-alone physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0059] In one exemplary embodiment, as shown in Figure 2 , a safety helmet wearing detection method for power grid workers is provided. Taking the terminal 102 in Figure 1 as an example, the method includes the following steps S201 to S204. Among them:
[0060] Step S201, obtaining the cross-scale feature map of the power grid worker image according to the cross-scale small target feature extraction module of the safety helmet wearing detection model and the power grid worker image.
[0061] The safety helmet wearing detection model can detect whether a power grid construction worker in a power grid operation site personnel image wears a safety helmet. The power grid operation site personnel image can be input into the safety helmet wearing detection model to obtain a safety helmet wearing detection result of the power grid operation personnel image. The safety helmet wearing detection model includes a cross-scale small target feature extraction module, a deep feature extraction module, a feature enhancement module, and a classifier module.
[0062] The image of the power grid operation personnel performing live work in the power grid operation site can be collected as the power grid operation personnel image.
[0063] The cross-scale small target feature extraction module can be used to process feature information in different scale ranges while maintaining high small target perception ability, which can ensure high accuracy in identifying small targets such as safety helmets in complex scenes.
[0064] The power grid operation personnel image can be input into the cross-scale small target feature extraction module of the safety helmet wearing detection model to obtain a cross-scale feature map of the power grid operation personnel image.
[0065] In step S202, a deep feature map is obtained according to the deep feature extraction module of the safety helmet wearing detection model and the cross-scale feature map. The deep feature extraction module is constructed according to a plurality of types of continuous operations of the atrous convolution combined with a plurality of types of parallel operations of the atrous convolution.
[0066] The deep feature extraction module is constructed according to a plurality of types of continuous operations of the atrous convolution combined with a plurality of types of parallel operations of the atrous convolution, which can be used to extract deep feature information of the safety helmet in each frame of the cross-scale feature map, and combine the shallow features collected by the cross-scale small target feature extraction module to perform multi-level feature fusion to obtain the deep feature map.
[0067] The cross-scale feature map can be input into the deep feature extraction module of the safety helmet wearing detection model to obtain the deep feature map.
[0068] In step S203, an enhanced feature map is obtained according to the feature enhancement module of the safety helmet wearing detection model and the deep feature map. The feature enhancement module is constructed according to the parallel operation of the atrous convolution combined with the parallel operation of the pooling.
[0069] The feature enhancement module is constructed according to the parallel operation of the atrous convolution combined with the parallel operation of the pooling, which can be used to enhance the deep features of the safety helmet to obtain the enhanced feature map.
[0070] The enhanced feature map can be input into the feature enhancement module of the safety helmet wearing detection model to obtain the enhanced feature map.
[0071] In step S204, the enhanced feature map is subjected to binary classification prediction according to the classifier module of the safety helmet wearing detection model, to obtain the safety helmet wearing detection result of the power grid worker image.
[0072] The binary logistic regression algorithm can be used as the classifier module.
[0073] The safety helmet wearing detection result can include no wearing of the safety helmet or wearing of the safety helmet.
[0074] The enhanced feature map can be input into the classifier module of the safety helmet wearing detection model, subjected to binary classification prediction, and classified into the safety helmet wearing detection result of the power grid worker image as no wearing of the safety helmet or wearing of the safety helmet.
[0075] In the above safety helmet wearing detection method for the power grid worker, the deep feature extraction module can not only recognize low-level features such as the basic shape or color of the safety helmet, but also better capture the changes of the safety helmet in different scenes and under different illuminations, improve the adaptability of the safety helmet wearing detection model to complex scenes, and thus improve the detection accuracy of the safety helmet wearing.
[0076] In one of the embodiments, the cross-scale feature map of the power grid worker image is obtained according to the cross-scale small target feature extraction module of the safety helmet wearing detection model and the power grid worker image, and the specific steps are as follows: the power grid worker image is subjected to convolution, normalization and activation function processing operations in sequence according to the convolution layer in the cross-scale small target feature extraction module of the safety helmet wearing detection model, to obtain a first shallow feature map; the first shallow feature map is subjected to convolution, normalization and activation function processing operations in sequence according to the residual block in the cross-scale small target feature extraction module, to obtain a second shallow feature map; the second shallow feature map is subjected to parallel processing operations according to the mixed parallel extraction block in the cross-scale small target feature extraction module, to obtain a first cross-scale intermediate feature map; the first cross-scale intermediate feature map is subjected to convolution, normalization and activation function processing operations in sequence according to the residual block in the cross-scale small target feature extraction module, to obtain a second cross-scale intermediate feature map; the second cross-scale intermediate feature map is subjected to convolution, normalization and activation function processing operations in sequence according to the residual block in the cross-scale small target feature extraction module, to obtain a third cross-scale intermediate feature map; and the third cross-scale intermediate feature map is taken as the cross-scale feature map of the power grid worker image.
[0077] The image of the power grid worker can be sequentially subjected to convolution, normalization and activation function processing operations according to the convolution layer in the cross-scale small target feature extraction module of the safety helmet wearing detection model, to obtain a first shallow feature map F1. The convolution layer can be Darknetconv2D_BN_Mish, which is composed of a convolution layer (Darknetconv2D), a batch normalization layer (Batch Normalization, BN) and a Mish activation function.
[0078] The first shallow feature map can be sequentially subjected to convolution, normalization and activation function processing operations according to the residual block in the cross-scale small target feature extraction module, to obtain a second shallow feature map F2. The residual block can be Resblock_body, which usually contains multiple convolution layers, batch normalization layers and activation function layers (such as Leaky ReLU), which are combined in a specific way to form a residual block.
[0079] The second shallow feature map F2 can be subjected to parallel processing operations according to the mixed parallel extraction block in the cross-scale small target feature extraction module, to obtain a first cross-scale intermediate feature map F3. The first cross-scale intermediate feature map F3 can be sequentially subjected to convolution, normalization and activation function processing operations according to the residual block in the cross-scale small target feature extraction module, to obtain a second cross-scale intermediate feature map F4; the second cross-scale intermediate feature map F4 can be sequentially subjected to convolution, normalization and activation function processing operations according to the residual block in the cross-scale small target feature extraction module, to obtain a third cross-scale intermediate feature map F5; and the third cross-scale intermediate feature map F5 can be taken as a cross-scale feature map of the image of the power grid worker.
[0080] In this embodiment, the cross-scale small target feature extraction module of the safety helmet wearing detection model extracts feature information of different scale ranges of the image of the power grid worker, and maintains high small target perception ability, which can accurately identify small targets such as safety helmets in complex scenes, thereby improving the detection accuracy of safety helmet wearing.
[0081] In one of the embodiments, according to the mixed parallel extraction block in the cross-scale small target feature extraction module, the second shallow feature map is subjected to parallel processing operations to obtain the first cross-scale intermediate feature map, and the specific steps are as follows: according to the mixed parallel extraction block in the cross-scale small target feature extraction module, the second shallow feature map is subjected to first convolution operation to obtain the first cross-scale intermediate sub-feature map; according to the mixed parallel extraction block in the cross-scale small target feature extraction module, the second shallow feature map is subjected to the dilated convolution operation to obtain the second cross-scale intermediate sub-feature map; according to the mixed parallel extraction block in the cross-scale small target feature extraction module, the second shallow feature map is subjected to the second convolution operation to obtain the third cross-scale intermediate sub-feature map; the first cross-scale intermediate sub-feature map, the second cross-scale intermediate sub-feature map and the third cross-scale intermediate sub-feature map are connected and fused in the channel dimension, and the fusion result is subjected to the first convolution operation to obtain the first cross-scale intermediate feature map.
[0082] The second shallow feature map F2 can be subjected to the first convolution operation according to the mixed parallel extraction block in the cross-scale small target feature extraction module to obtain the first cross-scale intermediate sub-feature map F2_1, wherein the convolution kernel corresponding to the first convolution operation is a convolution kernel with a size of 3x3; the second shallow feature map F2 can be subjected to the dilated convolution operation according to the mixed parallel extraction block in the cross-scale small target feature extraction module to obtain the second cross-scale intermediate sub-feature map F2_2, wherein the dilated convolution kernel corresponding to the dilated convolution operation is a dilated convolution with a size of 3x3 and a dilated rate of 5; the second shallow feature map F2 can be subjected to the second convolution operation according to the mixed parallel extraction block in the cross-scale small target feature extraction module to obtain the third cross-scale intermediate sub-feature map F2_3, wherein the convolution kernel corresponding to the second convolution operation is a convolution kernel with a size of 3x3 and 15x15; the above first convolution operation, dilated convolution operation and second convolution operation are performed in parallel.
[0083] The first cross-scale intermediate sub-feature map F2_1, the second cross-scale intermediate sub-feature map F2_2 and the third cross-scale intermediate sub-feature map F2_3 can be connected and fused in the channel dimension, and a convolution kernel with a size of 3x3 is used to perform the first convolution operation on the fusion result to adjust the number of channels to obtain the first cross-scale intermediate feature map F3.
[0084] In this embodiment, according to the mixed parallel extraction block in the cross-scale small target feature extraction module, the second shallow feature map is subjected to the first convolution operation, the dilated convolution operation and the second convolution operation in parallel to obtain the first cross-scale intermediate feature map. The feature information of different scale ranges of the power grid worker image can be processed, and a high small target perception ability can be maintained, and the small target such as the safety helmet can be accurately identified in a complex scene, thereby improving the detection precision of the safety helmet wearing.
[0085] In one of the embodiments, according to the deep feature extraction module and the cross-scale feature map of the safety helmet wearing detection model, a deep feature map is obtained, and the specific steps are as follows: according to the convolution block in the deep feature extraction module of the safety helmet wearing detection model, the cross-scale feature map is subjected to convolution operation, and according to the coordinate attention mechanism in the deep feature extraction module, the channel attention and position information of the cross-scale feature map are combined and processed to obtain a first deep intermediate feature map; according to the multi-type dilated convolution cross-scale feature fusion sub-module in the deep feature extraction module, the first deep intermediate feature map is subjected to multi-type dilated convolution continuous operation and multi-type dilated convolution parallel operation to obtain a second deep intermediate feature map; the second deep intermediate feature map and the second shallow feature map are connected and fused in the channel dimension to obtain a third deep intermediate feature map as the deep feature map; the second shallow feature map is obtained according to the power grid worker image and the cross-scale small target feature extraction module of the safety helmet wearing detection model.
[0086] According to the convolution block in the deep feature extraction module of the safety helmet wearing detection model, the cross-scale feature map F5 can be subjected to convolution operation, and according to the coordinate attention mechanism in the deep feature extraction module, the channel attention and position information of the cross-scale feature map can be combined and processed, and then the size of the feature map can be adjusted through bilinear operation to obtain a first deep intermediate feature map F6. The convolution block can be CBM (Conv+Batch Normalization+Mish), which is composed of three parts of convolution layer (Conv), batch normalization layer (Batch Normalization, BN) and Mish activation function; the coordinate attention mechanism (Coordinate Attention, CA) can more accurately capture the key features in the cross-scale feature map by combining the channel attention and the position information, and can improve the sensitivity of the safety helmet wearing detection model to spatial details.
[0087] According to the multi-type dilated convolution cross-scale feature fusion sub-module (Multi-type Dilated convolution Cross-Scale feature fusion sub-Module, MDCSM) in the deep feature extraction module as shown in Figure 3 , the first deep intermediate feature map F6 can be subjected to multi-type dilated convolution continuous operation and multi-type dilated convolution parallel operation to obtain a second deep intermediate feature map F7.
[0088] The second deep intermediate feature map F7 can be resized according to the bilinear reshaping operation, and the second deep intermediate feature map F7 and the second shallow feature map F2 can be connected and fused in the channel dimension to obtain a third deep intermediate feature map F8 as a deep feature map; wherein the second shallow feature map is obtained according to the cross-scale small target feature extraction module of the power grid operator image and safety helmet wearing detection model.
[0089] In this embodiment, the deep feature map is obtained according to the deep feature extraction module and the cross-scale feature map of the safety helmet wearing detection model. The deep feature information of the safety helmet in the feature map can be extracted, and the shallow features collected by the cross-scale small target feature extraction module are combined for multi-level feature fusion, thereby improving the detection accuracy of safety helmet wearing.
[0090] In one of the embodiments, according to the multi-type dilated convolution cross-scale feature fusion sub-module in the deep feature extraction module, the first deep intermediate feature map is subjected to multi-type dilated convolution continuous operation and multi-type dilated convolution parallel operation to obtain a second deep intermediate feature map, and the specific steps are as follows: according to the multi-type dilated convolution cross-scale feature fusion sub-module in the deep feature extraction module, the first deep intermediate feature map is subjected to a first-type dilated convolution operation, and is subjected to normalization and activation function processing operation to obtain a first deep intermediate sub-feature map; according to the multi-type dilated convolution cross-scale feature fusion sub-module in the deep feature extraction module, the first deep intermediate sub-feature map is subjected to a second-type dilated convolution operation, and is subjected to normalization and activation function processing operation to obtain a second deep intermediate sub-feature map; according to the multi-type dilated convolution cross-scale feature fusion sub-module in the deep feature extraction module, the second deep intermediate sub-feature map is subjected to a third-type dilated convolution operation, and is subjected to normalization and activation function processing operation to obtain a third deep intermediate sub-feature map; according to the multi-type dilated convolution cross-scale feature fusion sub-module in the deep feature extraction module, the third deep intermediate sub-feature map is subjected to a fourth-type dilated convolution operation and a fifth-type dilated convolution operation in parallel, and the parallel processing results are connected and fused in the channel dimension to obtain the second deep intermediate feature map.
[0091] According to the multi-type cavity convolution cross-scale feature fusion sub-module in the deep feature extraction module, a first-type cavity convolution operation is performed on the first deep intermediate feature map F6 using a convolution kernel with a size of 3x3 and a cavity rate of 1, and normalization and activation function processing operations are performed to obtain a first deep intermediate sub-feature map F6_1; according to the multi-type cavity convolution cross-scale feature fusion sub-module in the deep feature extraction module, a second-type cavity convolution operation is performed on the first deep intermediate sub-feature map F6_1 using a convolution kernel with a size of 3x3 and a cavity rate of 2, and normalization and activation function processing operations are performed to obtain a second deep intermediate sub-feature map F6_2; according to the multi-type cavity convolution cross-scale feature fusion sub-module in the deep feature extraction module, a third-type cavity convolution operation is performed on the second deep intermediate sub-feature map F6_2 using a convolution kernel with a size of 3x3 and a cavity rate of 3, and normalization and activation function processing operations are performed to obtain a third deep intermediate sub-feature map F6_3.
[0092] According to the multi-type cavity convolution cross-scale feature fusion sub-module in the deep feature extraction module, a fourth-type cavity convolution operation and a fifth-type cavity convolution operation are performed on the third deep intermediate sub-feature map F6_3 in parallel, and the parallel processing results are connected and fused in the channel dimension to obtain a second deep intermediate feature map F7. The fourth-type cavity convolution operation uses a convolution kernel with a size of 3x3 and a cavity rate of 4, and the fifth-type cavity convolution operation uses a convolution kernel with a size of 3x3 and a cavity rate of 5.
[0093] In this embodiment, according to the multi-type cavity convolution cross-scale feature fusion sub-module in the deep feature extraction module, multi-type cavity convolution continuous operations and multi-type cavity convolution parallel operations are performed on the first deep intermediate feature map to obtain a second deep intermediate feature map. Not only can the basic shape or color and other low-level features of the safety helmet be recognized, but also the changes of the safety helmet in different scenes and under different lighting conditions can be better captured, the adaptability of the safety helmet wearing detection model to complex scenes is improved, and thus the detection precision of the safety helmet wearing is improved.
[0094] In one of the embodiments, the enhanced feature map is obtained according to the feature enhancement module and the deep feature map of the safety helmet wearing detection model, and the specific steps are as follows: according to the feature enhancement module of the safety helmet wearing detection model, the deep feature map is subjected to a bilinear remodeling adjustment operation to obtain a first enhanced intermediate feature map; according to the feature enhancement module of the safety helmet wearing detection model, the first enhanced intermediate feature map is subjected to convolution, normalization and activation function processing operations in sequence to obtain a second enhanced intermediate feature map; according to the feature enhancement module of the safety helmet wearing detection model, the second enhanced intermediate feature map is subjected to convolution, normalization and activation function processing operations in sequence to obtain a third enhanced intermediate feature map; according to the feature enhancement module of the safety helmet wearing detection model, the third enhanced intermediate feature map is subjected to a convolution operation to obtain a fourth enhanced intermediate feature map; according to the feature enhancement module of the safety helmet wearing detection model, the fourth enhanced intermediate feature map is subjected to a parallel operation of atrous convolution and a parallel operation of pooling, and the results of the pooling operation are connected and fused in the channel dimension to obtain a fifth enhanced intermediate feature map; the fifth enhanced intermediate feature map is subjected to a one-dimensional convolution operation and an activation function processing operation to obtain a sixth enhanced intermediate feature map as the enhanced feature map.
[0095] According to the feature enhancement module of the safety helmet wearing detection model, the deep feature map F8 is subjected to a bilinear remodeling adjustment operation to obtain a first enhanced intermediate feature map F9; according to the feature enhancement module of the safety helmet wearing detection model, the first enhanced intermediate feature map F9 is subjected to a convolution, normalization and rectified linear unit (ReLU) processing operation to obtain a second enhanced intermediate feature map F9_1, wherein the convolution operation uses a convolution kernel with a size of 3x3.
[0096] According to the feature enhancement module of the safety helmet wearing detection model, the second enhanced intermediate feature map F9_1 is subjected to a convolution, normalization and rectified linear unit (ReLU) processing operation to obtain a third enhanced intermediate feature map F10, wherein the convolution operation uses a convolution kernel with a size of 3x3.
[0097] According to the feature enhancement module of the safety helmet wearing detection model, the third enhanced intermediate feature map F10 is subjected to convolution operation to obtain a fourth enhanced intermediate feature map F10_1; according to the feature enhancement module of the safety helmet wearing detection model, the fourth enhanced intermediate feature map is subjected to parallel operations of a dilated convolution and a pooling, specifically, the fourth enhanced intermediate feature map F10_1 is subjected to convolution operation by using two parallel dilated convolution kernels, and then is subjected to pooling operation respectively, wherein the size of the dilated convolution is 3*3 and the hole rate is 3. The parallel pooling operation is composed of maximum pooling and average pooling, the results of the pooling operation are connected and fused in the channel dimension to obtain a fifth enhanced intermediate feature map F11, wherein the fifth enhanced intermediate feature map F11 is a one-dimensional vector with a length of C; the fifth enhanced intermediate feature map F11 is subjected to one-dimensional convolution operation and S-type (Sigmoid) activation function processing operation to obtain a sixth enhanced intermediate feature map F12 as an enhanced feature map, wherein the size of the enhanced feature map is 416*416 pixels and the number of channels is 3.
[0098] The formula for processing the third enhanced intermediate feature map F10 to obtain the sixth enhanced intermediate feature map F12 is shown in formula (1).
[0099] (1)
[0100] wherein, represents average pooling, represents maximum pooling; represents convolution operation with a filter size of 3*3, represents dilated convolution operation with a filter size of 3*3, represents one-dimensional convolution with a convolution kernel size of ; represents Sigmoid activation function.
[0101] wherein, is a one-dimensional convolution with a kernel size of k to generate channel weights, and C1D adaptively adjusts the convolution kernel size through formula (2) as follows:
[0102] (2)
[0103] wherein, []odd represents the nearest odd number of parameters, represents the number of channels of the input feature map, and are hyperparameters.
[0104] In this embodiment, according to the feature enhancement module of the safety helmet wearing detection model, the deep feature map is subjected to a parallel operation of a dilated convolution and a parallel operation of a pooling, to obtain an enhanced feature map. Background noise and irrelevant information in the deep feature map can be suppressed, and the expression ability of the safety helmet feature can be improved, thereby improving the detection accuracy of the safety helmet wearing.
[0105] In order to better understand the above method, one application embodiment of the safety helmet wearing detection method for power grid workers in the present application is described in detail below.
[0106] With the rapid development of the power industry and the increasing complexity of power grid operation environment, ensuring the safety of power grid workers has become a crucial task. In the power grid operation site, the standard wearing of safety helmets is an important measure to prevent high-altitude falling, object striking and other safety accidents. However, the traditional manual inspection method not only has low efficiency, but also has the problem of poor reliability of inspection results, which is difficult to meet the needs of modern power grid operation safety management.
[0107] In recent years, the rapid development of deep learning technology has provided new technical means for power grid operation safety management. As an important branch of artificial intelligence, deep learning can automatically learn and extract features from a large amount of data by simulating the structure and function of the human brain neural network, and then realize complex image recognition, target detection and other tasks. In the aspect of safety helmet wearing detection, the deep learning model can analyze the picture data of the power grid operation site and accurately identify whether the worker has worn a safety helmet.
[0108] In summary, the safety helmet wearing detection method for power grid workers based on deep learning has significant technical advantages and application prospects, which can significantly improve the intelligent level and efficiency of power grid operation safety management, thereby providing strong support for the safety production and sustainable development of the power industry.
[0109] However, the traditional safety helmet wearing detection method based on deep learning has the following problems:
[0110] (1) Difficulty in detecting small targets: In actual scenarios, safety helmets are a type of small target. Traditional deep learning models are prone to miss detection or false detection when dealing with small targets, especially in long-distance, low-quality site monitoring, where the detection effect is more easily affected.
[0111] (2) Occlusion and complex background: In the construction site environment, safety helmets may be partially occluded by other objects, or similar to the environment color in complex background (such as the presence of various mechanical equipment, diverse worker clothing, etc.), resulting in a decrease in detection accuracy.
[0112] (3) Light and environmental changes: In outdoor work sites, light conditions often vary greatly (such as strong light, shadow, night monitoring), and the detection performance of deep learning models under different light conditions is inconsistent, and traditional deep learning models lack robustness to light changes.
[0113] Based on the above problems, the embodiment provides a power grid worker safety helmet wearing detection method for detecting whether a power grid worker wears a safety helmet in a power grid worker image.
[0114] In the power grid worker safety helmet wearing detection method provided by the embodiment, a safety helmet detection algorithm (Helmet Wearing Detection Network, HWD-Net) is used to train a safety helmet wearing detection model. The cross-scale small target feature extraction module in the safety helmet detection algorithm is used to process feature information in different scale ranges while maintaining high small target perception ability, which can ensure that small targets such as safety helmets can still be accurately identified in complex scenes; the deep feature extraction module in the safety helmet detection algorithm is used to extract deep feature information of safety helmets in each frame of picture, and the shallow features collected by the cross-scale small target feature extraction module are combined for multi-level feature fusion. Deep features contain more semantic information, which can not only identify basic shapes or colors and other low-level features, but also better capture changes of safety helmets in different scenes and under different light conditions, thereby improving the adaptability to complex scenes; the feature enhancement module in the safety helmet detection algorithm is used to enhance the deep features of the safety helmet. The feature enhancement module can focus on safety helmet-related features and suppress background noise or irrelevant information in the image, thereby improving the expression ability of the features, which enables the safety helmet wearing detection model to accurately detect safety helmets even in complex backgrounds.
[0115] The structure of the safety helmet detection algorithm is as shown in Figure 4 The flow of the safety helmet detection algorithm is as shown in Figure 5 The flowchart of the technical solution provided by the embodiment is as shown in Figure 6
[0116] S1 collects and pre-processes power grid worker picture data:
[0117] In actual power grid operations, a worker safety helmet wearing dataset is collected. In the worker safety helmet wearing dataset, a certain number of negative samples are created by simulating the situation of workers without wearing safety helmets, the number of positive and negative samples is balanced, and the constructed dataset is labeled. The worker safety helmet wearing dataset includes worker safety helmet images and corresponding image labels. The image data labels include two categories: "wearing a safety helmet" and "not wearing a safety helmet".
[0118] S1.1 Dataset Collection: In actual power grid operations, a camera device is used to capture the power grid operation scene. Ensure that the collected images cover different operation personnel safety helmet wearing states, including wearing safety helmets and not wearing safety helmets. 3000 operation personnel safety helmet images of different scenes can be collected to ensure the diversity and representativeness of the data.
[0119] S1.2 Negative Sample Creation: In order to increase the accuracy of the model in identifying the safety helmet wearing of the operation personnel, the embodiment introduces negative samples. By simulating the situation of operation personnel without wearing safety helmets, a certain number of negative samples are created, some irrelevant human image is collected, and the image is partially blocked to simulate the situation of identifying the safety helmet not worn.
[0120] S1.3 Dataset Annotation: For each collected image, the operation personnel head is annotated using an annotation tool. The annotated information includes the accurate position of the operation personnel safety helmet. The position annotation of the operation personnel safety helmet adopts the form of a rectangular frame, which distinguishes different states of the operation personnel wearing safety helmets.
[0121] S1.4 Label Generation: Generate a label file for each image. The label file includes the position information of the operation personnel head and its state classification.
[0122] S1.5 Data Preprocessing: Preprocess the collected images, including image size adjustment, image enhancement, etc. Ensure the quality of the images suitable for model training.
[0123] S1.6 Dataset Saving: Store the processed images and corresponding label files in a unified dataset. The dataset can be divided into training set, validation set and test set in proportion for different stages of the model.
[0124] S1.7 The size of the operation personnel safety helmet image in the operation personnel safety helmet wearing dataset is 416x416 pixels, and the number of channels is 3.
[0125] S2. Construct a safety helmet detection algorithm:
[0126] When the safety helmet detection algorithm detects the operation personnel safety helmet picture preprocessed by S1, it is divided into four steps: extracting the cross-scale features of the safety helmet, obtaining the deep features of the safety helmet, enhancing the features of the safety helmet in the power grid operation personnel image, and classifying the operation personnel safety helmet wearing. The four steps correspond to the four modules in the safety helmet detection algorithm: cross-scale small target feature extraction module, deep feature extraction module, feature enhancement module and classifier module.
[0127] S2.1 Extract the cross-scale features of the safety helmet:
[0128] The task of extracting the cross-scale feature of the safety helmet is completed by the cross-scale small target feature extraction module in the safety helmet detection algorithm. The construction process of the cross-scale small target feature extraction module is as follows:
[0129] S2.1.1 input the work personnel safety helmet image in the work personnel safety helmet data set into the cross-scale small target feature extraction module. First, the convolution, normalization and activation function processing are performed by the convolution layer (Darknetconv2D_BN_Mish) in the cross-scale small target feature extraction module, and the first cap shallow feature map F1 is obtained. Then, the residual block (Resblock_body) in the cross-scale small target feature extraction module is processed to obtain the second shallow feature map F2.
[0130] S2.1.2 input the second shallow feature map F2 into the mixed parallel extraction block in the cross-scale small target feature extraction module. The mixed parallel extraction block is composed of two convolution kernels with sizes of 3×3 and 15×15 and a 3×3 size and 5 rate of empty rate of empty convolution. The 3×3 convolution kernel is used to process the second shallow feature map F2 to obtain the first cross-scale intermediate sub-feature map F2_1. The 3×3 size and 5 rate of empty rate of empty convolution are used to process the second shallow feature map F2 to obtain the second cross-scale intermediate sub-feature map F2_2. The 15×15 convolution kernel is used to process F2 to obtain the third cross-scale intermediate sub-feature map F2_3.
[0131] S2.1.3 connect the first cross-scale intermediate sub-feature map F2_1, the second cross-scale intermediate sub-feature map F2_2 and the third cross-scale intermediate sub-feature map F2_3 and fuse them in the channel dimension (i.e. the Concat operation in the above formula), and then use a 3×3 convolution kernel to perform convolution operation on the result after fusion to adjust the number of channels and obtain the first cross-scale intermediate feature map F3. Figure 4
[0132] S2.1.3 use the residual block (Resblock_body) in the cross-scale small target feature extraction module to process the first cross-scale intermediate feature map F3 to obtain the second cross-scale intermediate feature map F4, and then use another residual block (Resblock_body) to process the second cross-scale intermediate feature map F4 to obtain the third cross-scale intermediate feature map F5 as the cross-scale feature map.
[0133] DarknetConv2D_BN_Mish is a common neural network module, usually used in the field of image processing, especially in Convolutional Neural Networks (CNN). DarknetConv2D_BN_Mish consists of three parts: a convolutional layer (DarknetConv2D), a batch normalization layer (Batch Normalization, BN), and a Mish activation function. Resblock_body is a convolutional block, usually containing multiple convolutional layers, batch normalization layers (Batch Normalization, BN), and activation function layers (Leaky ReLU), which are combined in a specific way to form a residual block. The residual block implements residual learning by connecting one or more layers directly to the output of the convolutional layer (called "skip connection" or "shortcut"). Concat channel dimension concatenation refers to concatenating two or more feature maps with the same spatial dimensions (height and width) in the channel dimension to generate a new feature map. This new feature map has the same spatial dimensions as the input feature map, but the number of channels is the sum of the number of channels of all input feature maps.
[0134] S2.2 Obtain deep features of the safety helmet:
[0135] The task of obtaining deep features of the safety helmet is completed by the deep feature extraction module in the safety helmet detection algorithm. The construction process of the deep feature extraction module is as follows:
[0136] S2.2.1 Input the cross-scale feature map F5 into the deep feature extraction module, first perform convolution operation by the convolution block (Conv+Batch Normalization+Mish, CBM), then perform coordinate attention mechanism (Coordinate Attention, CA) processing, and then adjust the size of the feature map by bilinear operation to obtain the first deep feature map F6.
[0137] S2.2.2 Process the first deep feature map F6 using a multi-type dilated convolution cross-scale feature fusion sub-module (Multi-type Dilatedconvolution Cross-Scale feature fusion sub-Module, MDCSM). The structure of the multi-type dilated convolution cross-scale feature fusion sub-module is as shown in Figure 3
[0138] After inputting the first deep feature map F6 into the multi-category hollow convolution cross-scale feature fusion sub-module, first, a convolution kernel with a size of 3x3 and a hollow rate of 1 is used to perform convolution operation on the first deep feature map F6, and then normalization (i.e. Norm operation in Figure 3 ) and ReLU activation function processing are performed to obtain the first deep intermediate sub-feature map F6_1; then, a convolution kernel with a size of 3x3 and a hollow rate of 2 is used to perform convolution operation on the first deep intermediate sub-feature map F6_1, and normalization and ReLU activation function processing are performed to obtain the second deep intermediate sub-feature map F6_2; then, a convolution kernel with a size of 3x3 and a hollow rate of 3 is used to perform convolution operation on the second deep intermediate sub-feature map F6_2, and normalization and ReLU activation function processing are performed to obtain the third deep intermediate sub-feature map F6_3; finally, a convolution kernel with a size of 3x3 and a hollow rate of 4 and a convolution kernel with a size of 3x3 and a hollow rate of 5 are used to perform parallel convolution operation on the third deep intermediate sub-feature map F6_3, and then connection and fusion in the channel dimension (i.e. Concat operation in Figure 3 ) are performed to obtain the second deep intermediate feature map F7.
[0139] S2.2.3 applies a bilinear reshaping operation to resize the second deep intermediate feature map F7, and then connects and fuses in the channel dimension (i.e. Concat operation in Figure 3 ) with the second shallow feature map F2 output from the cross-scale small target feature extraction module to obtain the third deep intermediate feature map F8.
[0140] where CBM (Conv + BatchNorm + Mish) is a convolution block commonly used in convolutional neural networks in deep learning. Coordinate Attention (CA) is a mechanism used to enhance the performance of neural network models, particularly in computer vision tasks. This mechanism combines channel attention and positional information to more accurately capture key features in images and improve the model's sensitivity to spatial details.
[0141] S2.3 Enhancing safety helmet features in power grid operation images:
[0142] The task of enhancing safety helmet features in power grid operation images is completed by the feature enhancement module in the safety helmet detection algorithm. The construction process of the feature enhancement module is as follows:
[0143] S2.3.1 After inputting the third deep intermediate feature map F8 into the feature enhancement module, first, the size of the third deep intermediate feature map F8 is adjusted by using bilinear reshaping to obtain a first enhanced intermediate feature map F9, then a convolution operation is performed on the first enhanced intermediate feature map F9 using a convolution kernel with a size of 3x3, and then normalization (i.e. BN operation in Figure 4 ) and RELU activation function processing are performed to obtain a second enhanced intermediate feature map F9_1; then, a convolution operation is performed on the second enhanced intermediate feature map F9_1 using a convolution kernel with a size of 3x3, and normalization (i.e. BN operation in Figure 4 ) and ReLU activation function processing are performed to obtain a third enhanced intermediate feature map F10, and the third enhanced intermediate feature map F10 is input into the helmet feature enhancement sub-module for processing.
[0144] where normalization BN: refers to a technique for normalizing input data for each mini-batch during the training process of a neural network. It reduces internal covariate shift by normalizing input data to a distribution with a mean of 0 and a variance of 1 (or close to this distribution), thereby speeding up the training of neural networks and improving their performance. ReLU (Rectified Linear Unit) activation function is a commonly used nonlinear activation function in deep learning.
[0145] The structure of the helmet feature enhancement sub-module (HFEB) is as follows Figure 7
[0146] After inputting the third enhanced intermediate feature map F10 into the helmet feature enhancement sub-module, first, a convolution operation is performed on the third enhanced intermediate feature map F10 using a convolution kernel with a size of 3x3 to obtain a fourth enhanced intermediate feature map F10_1, then two parallel dilated convolution kernels are used to perform convolution operations on the fourth enhanced intermediate feature map F10_1, and then pooling operations are performed, where the dilated convolution has a size of 3x3 and a dilated rate of 3. The parallel pooling operations consist of maximum pooling (i.e. Max pool in Figure 7 ) and average pooling (i.e. Avg Pool in Figure 7 ), the results of the convolution kernel pooling operations are connected and fused in the channel dimension (Concat operation in Figure 7 ), to obtain a one-dimensional vector with a length of C as a fifth enhanced intermediate feature map F11; then, a one-dimensional convolution (i.e. Figure 7 The fifth enhanced intermediate feature map F11 is subjected to a convolution operation by the Conv1D in the fifth enhancement layer, and is subjected to a Sigmoid activation function to obtain a sixth enhanced intermediate feature map F12 as an enhanced feature map, wherein the enhanced feature map has a size of 416x416 pixels and a channel number of 3.
[0147] The third enhanced intermediate feature map F10 is processed to obtain the sixth enhanced intermediate feature map F12, and the formula is shown in formula (1).
[0148] (1)
[0149] wherein, represents average pooling, represents maximum pooling; represents a convolution operation with a filter size of 3x3, represents a dilated convolution operation with a filter size of 3x3, represents a one-dimensional convolution with a convolution kernel size of represents a Sigmoid activation function.
[0150] wherein, is a one-dimensional convolution with a kernel size of k to generate channel weights, and the convolution kernel size of C1D is adaptively adjusted by formula (2) as follows:
[0151] (2)
[0152] wherein, []odd represents the nearest odd number of the parameter, represents the channel number of the input feature map, and are hyperparameters.
[0153] S2.4 Classifier module:
[0154] The technical scheme provided in the embodiment uses a binary logistic regression algorithm as a classifier in the staff safety helmet classification stage, inputs the enhanced feature map with deep network features into the classifier module, then performs binary classification prediction, classifies no safety helmet and safety helmet, and completes the classification prediction.
[0155] wherein the binary logistic regression is a statistical model used for classification and predictive analysis, and is usually used for classification and predictive analysis.
[0156] Specifically, the workman safety helmet original image pre-processed by S1 has a size of 416x416 pixels and a channel number of 3. The workman safety helmet original image is input into the cross-scale small target feature extraction module. First, after being processed by Darknetconv2D_BN_Mish for convolution, BN normalization and Mish activation function, a first shallow feature map F1 is obtained, which has a size of 416x416 pixels and a channel number of 32. Then, Resblock_body is used to process the first shallow feature map F1 to obtain a second shallow feature map F2, which has a size of 208x208 pixels and a channel number of 64. The second shallow feature map F2 is input into the merged row extraction block. The second shallow feature map F2 is processed by a 3x3 convolution kernel to obtain a first cross-scale intermediate sub-feature map F2_1; the second shallow feature map F2 is processed by a 3x3 convolution kernel with a hole rate of 5 to obtain a second cross-scale intermediate sub-feature map F2_2; and the second shallow feature map F2 is processed by a 15x15 convolution kernel to obtain a third cross-scale intermediate sub-feature map F2_3. The first cross-scale intermediate sub-feature map F2_1, the second cross-scale intermediate sub-feature map F2_2 and the third cross-scale intermediate sub-feature map F2_3 all have a size of 208x208 pixels and a channel number of 64. The first cross-scale intermediate sub-feature map F2_1, the second cross-scale intermediate sub-feature map F2_2 and the third cross-scale intermediate sub-feature map F2_3 are connected and fused in the channel dimension (i.e. the Concat operation in Figure 4 After that, a 3x3 convolution kernel is used for convolution operation to adjust the channel number, and a first cross-scale intermediate feature map F3 is obtained, which has a size of 208x208 pixels and a channel number of 64. The first cross-scale intermediate feature map F3 is processed by Resblock_body to obtain a second cross-scale intermediate feature map F4, which has a size of 52x52 pixels and a channel number of 256. Then, another Resblock_body is used to process the second cross-scale intermediate feature map F4 to obtain a third cross-scale intermediate feature map F5, which has a size of 26x26 pixels and a channel number of 512.
[0157] Then, the third cross-scale intermediate feature map F5 is input into the deep feature extraction module. First, the CBM is used to perform convolution operation on the third cross-scale intermediate feature map F5, and then the CA attention module is processed. Then, the size of the feature map is adjusted through the bilinear operation to obtain the first deep intermediate feature map F6, which has a size of 52x52 pixels and a channel number of 256. The first deep intermediate feature map F6 is input into the multi-category dilated convolution cross-scale feature fusion sub-module. The multi-category dilated convolution cross-scale feature fusion sub-module is used to process the first deep intermediate feature map F6 to obtain the second deep intermediate feature map F7, which has a size of 52x52 pixels and a channel number of 256. The second deep intermediate feature map F7 is first bilinearly reshaped, and then connected with the second shallow feature map F2 output from the cross-scale small target feature extraction module and fused in the channel dimension (i.e. the Concat operation in the above formula), to obtain the third deep intermediate feature map F8, which has a size of 208x208 pixels and a channel number of 64. Figure 4
[0158] After inputting F8 into the feature enhancement module, first, the bilinear reshaping is used to adjust the size of F8 to obtain the first enhanced intermediate feature map F9, which has a size of 416x416 pixels and a channel number of 32. Then, a convolution kernel with a size of 3x3 is used to perform convolution operation on the first enhanced intermediate feature map F9, followed by BN normalization and RELU activation function processing. Finally, a convolution kernel with a size of 3x3, BN and RELU activation function are applied to process the result of the previous step to obtain the third enhanced intermediate feature map F10, which has a size of 416x416 pixels and a channel number of 32. Then, the third enhanced intermediate feature map F10 is input into the safety helmet feature enhancement sub-module for processing to obtain the fifth enhanced intermediate feature map F11, which has a size of 416x416 pixels and a channel number of 3.
[0159] S3 divides the work personnel safety helmet wearing dataset:
[0160] The work personnel safety helmet wearing dataset constructed in S1 is divided into a training set, a validation set and a test set according to a certain proportion.
[0161] For example, the division proportion of the work personnel safety helmet wearing dataset (training set: validation set: test set) can be 70%: 15%: 15%. The training set accounts for 70% of the total number of the work personnel safety helmet wearing dataset, i.e. 2100 work personnel safety helmet dataset pictures. The validation set and the test set each account for 15% of the total number of the work personnel safety helmet wearing dataset, i.e. 450 work personnel safety helmet wearing dataset pictures.
[0162] S4 model training and verification:
[0163] The safety helmet detection algorithm is trained, and the parameters of each layer are updated to obtain a safety helmet wearing detection model. All neural network parameters are initialized, and safety helmet detection algorithm related hyperparameters are set, including: training rounds, batch size, optimizer selection, learning rate size, and total iteration number.
[0164] The safety helmet detection algorithm is trained for 100 epochs. The weight decay coefficient is set to 0.05, the learning rate is set to 0.0000001, the batch size is set to 4, the number of iterations for the first 50 epochs is 217, the number of iterations for the last 50 epochs is 292, and the total number of iterations is 25450. Each round starts with Mosaic data augmentation, and the resolution of the input image is uniformly adjusted to 512x512 pixels. After initializing the parameters, the training set and validation set of the safety helmet wearing dataset of the workers divided by S3 are divided into multiple batches, and each batch of worker safety helmet wearing dataset is input into the safety helmet detection algorithm for training to obtain the training loss value loss. When the entire worker safety helmet data is trained for one round (in the actual training process, there may be multiple rounds), the validation set of the worker safety helmet wearing dataset is input into the safety helmet detection algorithm according to the batch, and the corresponding batch loss value batch_loss is obtained. During training and validation, the safety helmet detection algorithm will automatically learn and adjust the parameters according to the loss and batch_loss each time. When the training process is performed for one or more rounds until the batch_loss value converges, the safety helmet detection algorithm training is completed, and the safety helmet wearing detection model is obtained.
[0165] Application of S5 model:
[0166] The trained safety helmet wearing detection model is applied to detect the images of power grid workers to automatically detect the safety helmet wearing situation of power grid workers.
[0167] In actual engineering applications, the collected images of power grid workers are input into the safety helmet wearing detection model, and then the safety helmet wearing detection model detects the images of power grid workers to obtain the safety helmet wearing detection result of the power grid workers, and outputs the safety helmet wearing detection result on the image of the power grid worker, including whether the power grid worker wears a safety helmet or not.
[0168] The improvement points of the technical solutions provided in this embodiment are as follows:
[0169] (1) Parallelly use ordinary convolution and dilated convolution to extract the features of safety helmets, and based on this, a hybrid parallel extraction block is constructed. The hybrid parallel extraction block is applied to the cross-scale small target feature extraction module, and a plurality of continuous convolution and normalization operations are added to ensure that the safety helmet and other small targets can still be accurately identified in complex scenes.
[0170] (2) The CBM, CA and a variety of dilated convolution cross-scale feature fusion sub-modules (MDCSM) are combined to extract the features of safety helmets. The multi-type dilated convolution cross-scale feature fusion sub-module (MDCSM) can not only identify basic shape or color and other low-level features, but also better capture the changes of safety helmets in different scenes and under different light conditions, thereby improving the adaptability to complex scenes.
[0171] (3) The feature enhancement sub-module (HFEB) combines dilated convolution and parallel pooling to suppress background noise and irrelevant information in the image, thereby improving the expression ability of the features, improving the detection performance under different light conditions, and improving the robustness of the detection results under light changes, so that the model can still accurately detect safety helmets in complex backgrounds.
[0172] The beneficial effects of the technical solutions provided in this embodiment are:
[0173] (1) The cross-scale small target feature extraction module can process feature information of different scale ranges while maintaining the perception ability of small targets, ensuring that safety helmets and other small targets can still be accurately identified in complex scenes.
[0174] (2) The deep feature extraction module is used to extract deep feature information of safety helmets in each frame of picture, and combines the shallow features collected by the multi-scale feature extraction module to perform multi-level feature fusion. Deep features contain more semantic information, and the deep feature extraction module can not only identify basic shape or color and other low-level features, but also better capture the changes of safety helmets in different scenes and under different light conditions, thereby improving the adaptability to complex scenes.
[0175] (3) The feature enhancement module is used to enhance the features of safety helmets extracted by the cross-scale small target feature extraction module and the deep feature extraction module. The feature enhancement module can focus on the features related to safety helmets, suppress background noise and irrelevant information in the image, thereby improving the expression ability of the features, so that the model can still accurately detect safety helmets in complex backgrounds.
[0176] It should be understood that although the steps in the flowcharts involved in the embodiments described above are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the embodiments described above can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be alternately executed with at least some of the other steps or steps or stages in other steps.
[0177] Based on the same inventive concept, the embodiments of the present application also provide a power grid worker safety helmet wearing detection device for implementing the power grid worker safety helmet wearing detection method described above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more power grid worker safety helmet wearing detection device embodiments provided below can refer to the limitations of the power grid worker safety helmet wearing detection method described above, and will not be repeated here.
[0178] In one exemplary embodiment, as shown in Figure 8 A power grid worker safety helmet wearing detection device is provided, wherein:
[0179] The cross-scale feature map acquisition module 801 is configured to obtain a cross-scale feature map of the power grid worker image according to a cross-scale small target feature extraction module of the safety helmet wearing detection model and the power grid worker image.
[0180] The deep feature map acquisition module 802 is configured to obtain a deep feature map according to a deep feature extraction module of the safety helmet wearing detection model and the cross-scale feature map; the deep feature extraction module is constructed according to a plurality of types of continuous operations of the atrous convolution combined with a plurality of types of parallel operations of the atrous convolution.
[0181] The enhanced feature map acquisition module 803 is configured to obtain an enhanced feature map according to a feature enhancement module of the safety helmet wearing detection model and the deep feature map; the feature enhancement module is constructed according to a parallel operation of the atrous convolution combined with a parallel operation of the pooling.
[0182] The detection result acquisition module 804 is configured to perform binary classification prediction on the enhanced feature map according to a classifier module of the safety helmet wearing detection model to obtain a safety helmet wearing detection result of the power grid worker image.
[0183] In one of the embodiments, the cross-scale feature map acquisition module 801 is further configured to: perform, in sequence, convolution, normalization, and activation function processing operations on the power grid worker image according to a convolution layer in a cross-scale small target feature extraction module of the safety helmet wearing detection model, to obtain a first shallow layer feature map; perform, in sequence, convolution, normalization, and activation function processing operations on the first shallow layer feature map according to a residual block in the cross-scale small target feature extraction module, to obtain a second shallow layer feature map; perform parallel processing operations on the second shallow layer feature map according to a mixed parallel extraction block in the cross-scale small target feature extraction module, to obtain a first cross-scale intermediate feature map; perform, in sequence, convolution, normalization, and activation function processing operations on the first cross-scale intermediate feature map according to the residual block in the cross-scale small target feature extraction module, to obtain a second cross-scale intermediate feature map; perform, in sequence, convolution, normalization, and activation function processing operations on the second cross-scale intermediate feature map according to the residual block in the cross-scale small target feature extraction module, to obtain a third cross-scale intermediate feature map; and take the third cross-scale intermediate feature map as the cross-scale feature map of the power grid worker image.
[0184] In one of the embodiments, the cross-scale feature map acquisition module 801 is further configured to: perform, on the second shallow layer feature map, a first convolution operation according to a mixed parallel extraction block in the cross-scale small target feature extraction module, to obtain a first cross-scale intermediate sub-feature map; perform, on the second shallow layer feature map, a dilated convolution operation according to the mixed parallel extraction block in the cross-scale small target feature extraction module, to obtain a second cross-scale intermediate sub-feature map; perform, on the second shallow layer feature map, a second convolution operation according to the mixed parallel extraction block in the cross-scale small target feature extraction module, to obtain a third cross-scale intermediate sub-feature map; connect the first cross-scale intermediate sub-feature map, the second cross-scale intermediate sub-feature map, and the third cross-scale intermediate sub-feature map, fuse them in a channel dimension, and perform a first convolution operation on the fusion result, to obtain a first cross-scale intermediate feature map.
[0185] In one of the embodiments, the deep feature map acquisition module 802 is further configured to: perform convolution operation on the cross-scale feature map according to a convolution block in a deep feature extraction module of the safety helmet wearing detection model, and combine processing of channel attention and position information of the cross-scale feature map according to a coordinate attention mechanism in the deep feature extraction module to obtain a first deep intermediate feature map; perform multi-type dilated convolution continuous operation and multi-type dilated convolution parallel operation on the first deep intermediate feature map according to a multi-type dilated convolution cross-scale feature fusion sub-module in the deep feature extraction module to obtain a second deep intermediate feature map; and connect and fuse the second deep intermediate feature map and a second shallow feature map in a channel dimension to obtain a third deep intermediate feature map as a deep feature map, wherein the second shallow feature map is obtained according to the power grid worker image and a cross-scale small target feature extraction module of the safety helmet wearing detection model.
[0186] In one of the embodiments, the deep feature map acquisition module 802 is further configured to: perform first-type dilated convolution operation on the first deep intermediate feature map according to a multi-type dilated convolution cross-scale feature fusion sub-module in the deep feature extraction module, and perform normalization and activation function processing operation to obtain a first deep intermediate sub-feature map; perform second-type dilated convolution operation on the first deep intermediate sub-feature map according to the multi-type dilated convolution cross-scale feature fusion sub-module in the deep feature extraction module, and perform normalization and activation function processing operation to obtain a second deep intermediate sub-feature map; perform third-type dilated convolution operation on the second deep intermediate sub-feature map according to the multi-type dilated convolution cross-scale feature fusion sub-module in the deep feature extraction module, and perform normalization and activation function processing operation to obtain a third deep intermediate sub-feature map; perform fourth-type dilated convolution operation and fifth-type dilated convolution operation on the third deep intermediate sub-feature map in parallel according to the multi-type dilated convolution cross-scale feature fusion sub-module in the deep feature extraction module, and connect and fuse parallel processing results in a channel dimension to obtain a second deep intermediate feature map.
[0187] In one of the embodiments, the enhanced feature map acquisition module 803 is further configured to: perform a bilinear remodeling adjustment operation on the deep feature map according to the feature enhancement module of the safety helmet wearing detection model to obtain a first enhanced intermediate feature map; perform convolution, normalization and activation function processing operations on the first enhanced intermediate feature map in sequence according to the feature enhancement module of the safety helmet wearing detection model to obtain a second enhanced intermediate feature map; perform convolution, normalization and activation function processing operations on the second enhanced intermediate feature map in sequence according to the feature enhancement module of the safety helmet wearing detection model to obtain a third enhanced intermediate feature map; perform a convolution operation on the third enhanced intermediate feature map according to the feature enhancement module of the safety helmet wearing detection model to obtain a fourth enhanced intermediate feature map; perform a parallel operation of a hole convolution and a pooling on the fourth enhanced intermediate feature map according to the feature enhancement module of the safety helmet wearing detection model, and connect and fuse the results of the pooling operation in the channel dimension to obtain a fifth enhanced intermediate feature map; and perform a one-dimensional convolution operation and an activation function processing operation on the fifth enhanced intermediate feature map to obtain a sixth enhanced intermediate feature map as the enhanced feature map.
[0188] The above-mentioned various modules in the power grid worker safety helmet wearing detection device can be realized by software, hardware, or a combination thereof. The above-mentioned various modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to the above-mentioned various modules.
[0189] In one exemplary embodiment, a computer device, which can be a server, is provided, and an internal structure diagram of the computer device can be as shown in Figure 9 The computer device includes a processor, a memory, an input / output interface (I / O), and a communication interface. The processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The database of the computer device is configured to store data of the embodiments of the power grid worker safety helmet wearing detection method. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to communicate with external terminals through network connection. The computer program is executed by the processor to implement a power grid worker safety helmet wearing detection method.
[0190] Those skilled in the art can understand that,Figure 9 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0191] In an embodiment, a computer device is also provided, including a memory and a processor, the memory storing a computer program, and the processor implementing the steps in the above method embodiments when executing the computer program.
[0192] In an embodiment, a computer readable storage medium is provided, storing a computer program, and the computer program implements the steps in the above method embodiments when executed by a processor.
[0193] In an embodiment, a computer program product is provided, including a computer program, and the computer program implements the steps in the above method embodiments when executed by a processor.
[0194] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant regulations.
[0195] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. The volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., without being limited thereto.
[0196] The technical features of the above embodiments can be combined in any manner. To make the description concise, all possible combinations of the technical features in the above embodiments are not described, but as long as the combinations of the technical features do not exist, they should be considered as the scope of the present application.
[0197] The above-described embodiments are merely illustrative of several embodiments of the present application, and the description is relatively specific and detailed, but should not be understood as a limitation on the scope of the patent. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.
Claims
1. A method for detecting the wearing of a safety cap by a power grid worker, characterized by, The method comprises: According to the cross-scale small target feature extraction module of the safety helmet wearing detection model and the power grid worker image, a cross-scale feature map of the power grid worker image is obtained; According to the convolution block in the deep feature extraction module of the safety helmet wearing detection model, the cross-scale feature map is subjected to convolution operation, and according to the coordinate attention mechanism in the deep feature extraction module, the channel attention and position information of the cross-scale feature map are combined and processed to obtain a first deep intermediate feature map; According to the multi-class hollow convolution cross-scale feature fusion submodule in the deep feature extraction module, the first deep intermediate feature map is subjected to multi-class hollow convolution continuous operation and multi-class hollow convolution parallel operation to obtain a second deep intermediate feature map; The second deep intermediate feature map and the second shallow feature map are connected and fused in the channel dimension to obtain a third deep intermediate feature map as a deep feature map; the second shallow feature map is obtained according to the power grid worker image and the cross-scale small target feature extraction module of the safety helmet wearing detection model; According to the feature enhancement module of the safety helmet wearing detection model and the deep feature map, an enhanced feature map is obtained; the feature enhancement module is constructed according to the hollow convolution parallel operation combined with the pooling parallel operation; According to the classifier module of the safety helmet wearing detection model, the enhanced feature map is subjected to binary classification prediction to obtain a safety helmet wearing detection result of the power grid worker image.
2. The method of claim 1, wherein, According to the cross-scale small target feature extraction module of the safety helmet wearing detection model and the power grid worker image, a cross-scale feature map of the power grid worker image is obtained, comprising: According to the convolution layer in the cross-scale small target feature extraction module of the safety helmet wearing detection model, the power grid worker image is subjected to convolution, normalization and activation function processing operations in sequence to obtain a first shallow feature map; According to the residual block in the cross-scale small target feature extraction module, the first shallow feature map is subjected to convolution, normalization and activation function processing operations in sequence to obtain a second shallow feature map; According to the mixed parallel extraction block in the cross-scale small target feature extraction module, the second shallow feature map is subjected to parallel processing operation to obtain a first cross-scale intermediate feature map; According to the residual block in the cross-scale small target feature extraction module, the first cross-scale intermediate feature map is subjected to convolution, normalization and activation function processing operations in sequence to obtain a second cross-scale intermediate feature map; According to the residual block in the cross-scale small target feature extraction module, the second cross-scale intermediate feature map is subjected to convolution, normalization and activation function processing operations in sequence to obtain a third cross-scale intermediate feature map; The third cross-scale intermediate feature map is taken as the cross-scale feature map of the power grid worker image.
3. The method of claim 2, wherein, According to the mixed parallel extraction block in the cross-scale small target feature extraction module, the second shallow feature map is subjected to parallel processing operation to obtain a first cross-scale intermediate feature map, comprising: According to the mixed parallel extraction block in the cross-scale small target feature extraction module, the second shallow feature map is subjected to first convolution operation to obtain a first cross-scale intermediate sub-feature map; According to the mixed parallel extraction block in the cross-scale small target feature extraction module, the second shallow feature map is subjected to a hole convolution operation to obtain a second cross-scale intermediate sub-feature map; According to the mixed parallel extraction block in the cross-scale small target feature extraction module, the second shallow feature map is subjected to a second convolution operation to obtain a third cross-scale intermediate sub-feature map; The first cross-scale intermediate sub-feature map, the second cross-scale intermediate sub-feature map and the third cross-scale intermediate sub-feature map are connected and fused in the channel dimension, and the fusion result is subjected to a first convolution operation to obtain a first cross-scale intermediate feature map.
4. The method of claim 1, wherein, According to the multi-type hole convolution cross-scale feature fusion submodule in the deep feature extraction module, the first deep intermediate feature map is subjected to multi-type hole convolution continuous operation and multi-type hole convolution parallel operation to obtain a second deep intermediate feature map, including: According to the multi-type hole convolution cross-scale feature fusion submodule in the deep feature extraction module, the first deep intermediate feature map is subjected to a first type hole convolution operation, and is subjected to normalization and activation function processing operation to obtain a first deep intermediate sub-feature map; According to the multi-type hole convolution cross-scale feature fusion submodule in the deep feature extraction module, the first deep intermediate sub-feature map is subjected to a second type hole convolution operation, and is subjected to normalization and activation function processing operation to obtain a second deep intermediate sub-feature map; According to the multi-type hole convolution cross-scale feature fusion submodule in the deep feature extraction module, the second deep intermediate sub-feature map is subjected to a third type hole convolution operation, and is subjected to normalization and activation function processing operation to obtain a third deep intermediate sub-feature map; According to the multi-type hole convolution cross-scale feature fusion submodule in the deep feature extraction module, the third deep intermediate sub-feature map is subjected to a fourth type hole convolution operation and a fifth type hole convolution operation in parallel, and the parallel processing results are connected and fused in the channel dimension to obtain a second deep intermediate feature map.
5. The method according to any one of claims 1 to 4, characterized in that, According to the feature enhancement module of the safety hat wearing detection model and the deep feature map, an enhanced feature map is obtained, including: According to the feature enhancement module of the safety hat wearing detection model, the deep feature map is subjected to a bilinear remodeling adjustment operation to obtain a first enhanced intermediate feature map; According to the feature enhancement module of the safety hat wearing detection model, the first enhanced intermediate feature map is sequentially subjected to convolution, normalization and activation function processing operation to obtain a second enhanced intermediate feature map; According to the feature enhancement module of the safety hat wearing detection model, the second enhanced intermediate feature map is sequentially subjected to convolution, normalization and activation function processing operation to obtain a third enhanced intermediate feature map; According to the feature enhancement module of the safety hat wearing detection model, the third enhanced intermediate feature map is subjected to a convolution operation to obtain a fourth enhanced intermediate feature map; According to the feature enhancement module of the safety hat wearing detection model, the fourth enhanced intermediate feature map is subjected to hole convolution parallel operation and pooling parallel operation, and the results of the pooling operation are connected and fused in the channel dimension to obtain a fifth enhanced intermediate feature map; The fifth enhanced intermediate feature map is subjected to one-dimensional convolution operation and activation function processing operation to obtain a sixth enhanced intermediate feature map as an enhanced feature map.
6. A power grid worker safety hat wearing detection device, characterized in that, The device comprises: The cross-scale feature map acquisition module is configured to acquire a cross-scale feature map of the power grid worker image according to a cross-scale small target feature extraction module of the safety helmet wearing detection model. The deep layer feature map acquisition module is configured to: perform convolution operation on the cross-scale feature map according to a convolution block in a deep layer feature extraction module of the safety helmet wearing detection model, and combine channel attention and position information of the cross-scale feature map according to a coordinate attention mechanism in the deep layer feature extraction module to obtain a first deep layer intermediate feature map; perform multi-type hollow convolution continuous operation and multi-type hollow convolution parallel operation on the first deep layer intermediate feature map according to a multi-type hollow convolution cross-scale feature fusion submodule in the deep layer feature extraction module to obtain a second deep layer intermediate feature map; and connect and fuse the second deep layer intermediate feature map and a second shallow layer feature map in a channel dimension to obtain a third deep layer intermediate feature map as a deep layer feature map; the second shallow layer feature map is obtained according to the power grid worker image and the cross-scale small target feature extraction module of the safety helmet wearing detection model. The enhanced feature map acquisition module is configured to obtain an enhanced feature map according to a feature enhancement module of the safety helmet wearing detection model and the deep layer feature map; the feature enhancement module is constructed according to combination of the hollow convolution parallel operation and the pooling parallel operation. The detection result acquisition module is configured to perform two-class prediction on the enhanced feature map according to a classifier module of the safety helmet wearing detection model to obtain a safety helmet wearing detection result of the power grid worker image.
7. The apparatus of claim 6, wherein, The cross-scale feature map acquisition module is further configured to: perform convolution, normalization and activation function processing operation on the power grid worker image in sequence according to a convolution layer in the cross-scale small target feature extraction module of the safety helmet wearing detection model to obtain a first shallow layer feature map; perform convolution, normalization and activation function processing operation on the first shallow layer feature map in sequence according to a residual block in the cross-scale small target feature extraction module to obtain a second shallow layer feature map; perform parallel processing operation on the second shallow layer feature map according to a mixed parallel extraction block in the cross-scale small target feature extraction module to obtain a first cross-scale intermediate feature map; perform convolution, normalization and activation function processing operation on the first cross-scale intermediate feature map in sequence according to the residual block in the cross-scale small target feature extraction module to obtain a second cross-scale intermediate feature map; perform convolution, normalization and activation function processing operation on the second cross-scale intermediate feature map in sequence according to the residual block in the cross-scale small target feature extraction module to obtain a third cross-scale intermediate feature map; and take the third cross-scale intermediate feature map as the cross-scale feature map of the power grid worker image.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, The processor executes the computer program to implement the steps of the method in any one of claims 1 to 5.
9. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program, which when executed by a processor, implements the steps of the method of any one of claims 1 to 5.
10. A computer program product comprising a computer program, characterized in that, The computer program, which when executed by a processor, implements the steps of the method of any one of claims 1 to 5.
Citation Information
Patent Citations
Safety belt wearing identification and detection method for various high-altitude operation construction sites
CN112990232A
Industrial pointer type instrument reading identification system based on deep learning
CN119360394A