Operation site safety identification method and management and control instrument
By building a safety identification model on the job site and using the feature fusion network and attention mechanism, the problem of inaccurate multi-scale target identification on the power distribution site is solved, high-precision safety identification and accident prevention are achieved, and the stability and safety of the power system are improved.
Patent Information
- Application Number
- CN202510426361.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2025-08-12
AI Technical Summary
The prior art is difficult to accurately identify multi-scale targets at the power distribution operation site, resulting in insufficient safety identification and missed detection, which cannot meet the needs of fast response and high-precision safety management.
Build a safety identification model on the job site, including the input layer, backbone network, feature fusion network and output layer, use the feature fusion network for cross-scale connection and context information weighting operations, combine the attention mechanism and the C3STR module to improve feature extraction capabilities and identify the location and category information of the target in the image.
It has improved the accuracy of identifying targets on the distribution operation site, reduced the possibility of accidents, enhanced safety guarantees, promoted safety technology innovation, and provided support for the improvement of the operation and maintenance management level of the State Grid.
Smart Images

Figure CN120472384A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power operation risk management and control, and in particular to an operation site safety method and a control instrument. Background Art
[0002] With the rapid development of the national power grid and the increasing complexity of power systems, safety issues in distribution network operations are becoming increasingly prominent. Distribution network operations involve extensive outdoor work, including equipment maintenance, troubleshooting, and line installation. The operating environment is complex and dynamic, posing high safety risks. Traditional operational safety management models rely primarily on manual supervision and fixed monitoring equipment, which largely fail to meet the requirements for rapid response and high-precision safety management.
[0003] The current focus on identifying safety issues in operations is to extract key skeletal points of power workers from video streams and utilize deep neural networks to perceive their posture in multi-person scenarios, enabling real-time detection and identification of violations. However, the distribution work environment is complex, and safety identification requires not only monitoring personnel attire and behavior but also the status of distribution boxes and defects in poles in the work area. This is compounded by the multi-scale variations in target features, such as shape, size, and color, of people, materials, and equipment. Commonly used deep learning algorithms are prone to false detections and missed detections, resulting in inadequate safety identification for the work site. Summary of the Invention
[0004] The purpose of the present invention is to provide a work site safety identification method and control instrument, which can accurately identify the location and category information of the target in the image, thereby reducing the possibility of accidents and improving the safety of the power distribution work site.
[0005] In order to achieve the above object, the present invention is implemented through the following technical solutions:
[0006] A work site safety identification method, comprising:
[0007] Acquire a data set, the data set including images of personnel and equipment at a power distribution operation site;
[0008] Constructing a work site safety identification model and training it using the data set to obtain the trained work site safety identification model; the work site safety identification model includes an input layer, a backbone network, a feature fusion network, and an output layer connected in sequence;
[0009] Using the trained work site safety recognition model to identify a target image of a power distribution work site to obtain the clothing, behavior, or status of a person or equipment in the target image; and
[0010] It is determined whether there are any operational safety hazards based on the clothing, behavior of the personnel or the status of the equipment in the target image, and an alarm is issued when there are any operational safety hazards.
[0011] Optionally, the backbone network is used for feature extraction, and the backbone network includes a plurality of feature extraction modules connected in sequence; each of the feature extraction modules includes a convolution layer, a batch normalization layer, an attention mechanism module, and an activation function connected in sequence; and the sizes of the convolution kernels of the plurality of feature extraction modules decrease in sequence;
[0012] The feature fusion network is used to perform cross-scale connection and context information weighting operations on the feature map output by the backbone network, and the feature fusion network includes multiple feature fusion modules connected in sequence; each feature fusion module includes a CBS module, a Concat layer and a C3STR module connected in sequence.
[0013] Optionally, the multiple feature extraction modules in the backbone network are recorded as a first feature extraction module, a second feature extraction module, ..., an N-2th feature extraction module, an N-1th feature extraction module, and an Nth feature extraction module; wherein N is the total number of the feature extraction modules, and N is an integer, N≥3;
[0014] The step of the feature fusion network performing cross-scale connection and context information weighting operations on the feature map output by the backbone network includes:
[0015] The feature map F output by the Nth feature extraction module N Use 1×1 convolution to adjust the number of channels and get the feature map P N , and the feature map P N The number of channels is the feature map F output by the N-1 feature extraction module N-1 1 / n times the number of channels, where n is an integer and n≥2;
[0016] For feature map P N After n times upsampling, the feature map F output by the N-1 feature extraction module is obtained. N-1 Perform feature fusion and use cross-stage local network to extract features to obtain feature map P N-1 ;
[0017] For feature map P N-1 After n times upsampling, the feature map F output by the N-2 feature extraction module is obtained. N-2 Perform feature fusion and use cross-stage local network to extract features to obtain feature map P N-2 ;
[0018] For feature map P N After n times upsampling and feature map P N-1Perform feature fusion to obtain the mapping map M N-1 ;
[0019] The feature map P N-2 and mapping graph M N-1 As the input stream, it is quickly normalized and fused, and the cross-stage local network is used to extract features to obtain the feature map T N-2 And output to the output layer;
[0020] The feature map P N-1 , Mapping M N-1 and feature map T N-2 As the input stream, it is quickly normalized and fused, and the cross-stage local network is used to extract features to obtain the feature map T N-1 And output to the output layer;
[0021] The feature map P N and feature map T N-1 As the input stream, it is quickly normalized and fused, and the cross-stage local network is used to extract features to obtain the feature map T N And output to the output layer, so that the output layer according to the feature map T N-2 、T N-1 and T N Output the recognition results.
[0022] Optionally, the feature map T N-2 The calculation formula is:
[0023]
[0024] Among them, Conv represents the convolution operation; ω1 represents the feature map P N-2 For feature map T N-2 The weight of ω2 represents the mapping graph M N-1 For feature map T N-2 The weights of ω1 and ω2 are learned and determined by the model during the training process; Resize represents upsampling or downsampling operation, Resize(M N-1 ) represents the mapping graph M N-1 Upsampling or downsampling is performed; ε is a parameter and the value of ε is 0.0001;
[0025] Feature map T N-1 The calculation formula is:
[0026]
[0027] Among them, Conv represents the convolution operation; ω3 represents the feature map P N-1 For feature map T N-1 The weight of ω4 represents the mapping graph M N-1 For feature map TN-1 The weight of ω5 represents the feature map T N-2 For feature map T N-1 The weights of ω3, ω4 and ω5 are learned and determined by the model during the training process; Resize(T N-2 ) represents the feature map T N-2 Perform upsampling or downsampling;
[0028] Feature map T N The calculation formula is:
[0029]
[0030] Among them, Conv represents the convolution operation; ω6 represents the feature map P N For feature map T N The weight of ω7 represents the feature map T N-1 For feature map T N The weights of ω6 and ω7 are learned and determined by the model during training; Resize(T N-1 ) represents the feature map T N-1 Perform upsampling or downsampling.
[0031] Optionally, a Focus module is connected between the input layer and the feature extraction module adjacent thereto, and a C3 module is connected between two adjacent feature extraction modules.
[0032] Optionally, an SPP module is connected between the feature fusion network and the adjacent feature extraction module.
[0033] Optionally, the step of using the data set to train the work site safety identification model includes:
[0034] The data set is annotated using a labeling box to obtain an annotated data set; and the clothing and behavior of the personnel, the state of the distribution box door, the defects on the pole and the defects on the wire are selected in the labeling box;
[0035] The labeled data set is divided into a training set and a validation set according to a preset ratio; the training set is used to train the work site safety recognition model, and the validation set is used to evaluate the accuracy of the trained work site safety recognition model.
[0036] On the other hand, the present invention also provides a work site safety identification and control device, comprising:
[0037] A camera is used to capture target images at the power distribution operation site;
[0038] An edge computing device is connected to the camera; and the edge computing device includes a processor and a memory, the memory storing the trained work site safety recognition model as described above, and when the trained work site safety recognition model is executed by the processor, the target image is recognized to obtain the clothing, behavior or equipment status of the person in the target image, and an alarm is issued when there is a safety hazard in the work.
[0039] Optionally, the edge computing device is also connected to a cloud platform to send the clothing, behavior or device status of the person in the target image to the cloud platform.
[0040] On the other hand, the present invention also provides a readable storage medium, in which the trained work site safety recognition model as described above is stored. When the trained work site safety recognition model is executed by a processor, the target image is recognized.
[0041] Compared with the prior art, the present invention has at least one of the following advantages:
[0042] The present invention utilizes the feature fusion network to perform cross-scale connection and context information weighting operations on the feature maps output by the backbone network, and performs effective cross-connection and context information interaction in the top-down and bottom-up multi-scale feature fusion process, which can effectively improve the feature extraction capability of the target in the image, thereby ensuring the recognition accuracy of the target in the image.
[0043] The present invention adds an attention mechanism module ECA to the backbone network of the work site safety identification model. By avoiding reducing the channel dimension to learn effective channel attention, the redundant information of the subsequent fully connected layer is reduced, and the position and category information of the target in the image are more accurately identified, thereby reducing the possibility of accidents and improving the safety of the distribution work site.
[0044] In the present invention, the corresponding weight information of the input stream (i.e., the importance of learning different features) is taken into account during the process of rapid normalization and fusion of the input feature map (i.e., input stream). This can not only effectively fuse the feature maps of inputs with different resolutions, but also consider the contribution of each input feature map to the output, thereby improving feature fusion efficiency and accuracy.
[0045] The present invention introduces the C3STR module in the process of feature fusion to enhance the global perception capability of small targets, improve the detection capability of targets of different scales at the power distribution operation site, and further ensure the recognition accuracy of targets.
[0046] This invention not only effectively reduces safety risks in distribution network operations and improves the safety of operators, but also promotes innovation in safety technologies and provides strong technical support for improving the operation and maintenance management of the State Grid. This ensures the stable operation and reliability of the power system and the sustainable development of the national economy and society. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 This is a flow chart of a work site safety identification method provided by one embodiment of the present invention;
[0048] Figure 2 The personnel image and equipment image collected in a work site safety identification method provided by an embodiment of the present invention;
[0049] Figure 3 This is a structural diagram of a work site safety identification model provided by one embodiment of the present invention;
[0050] Figure 4 1 is a schematic structural diagram of an ECA module in a work site safety identification model provided by one embodiment of the present invention;
[0051] Figure 5 This is a schematic diagram of a feature fusion network in a work site safety identification model provided by one embodiment of the present invention performing cross-scale connection and context information weighting operations on feature maps output by a backbone network;
[0052] Figure 6 1 is a schematic structural diagram of a C3STR module in a work site safety identification model provided by one embodiment of the present invention;
[0053] Figure 7 This is a schematic diagram of labeling a data set in a work site safety identification method provided by an embodiment of the present invention;
[0054] Figure 8 4 is a diagram showing the recognition results of the trained work site safety recognition model in one embodiment of the present invention. DETAILED DESCRIPTION
[0055] The following is a further detailed description of a work site safety identification method and control device proposed by the present invention in conjunction with the accompanying drawings and specific embodiments. According to the following description, the advantages and features of the present invention will be clearer. It should be noted that the drawings are in a very simplified form and use non-precise proportions, which are only used to conveniently and clearly assist in explaining the purpose of the embodiments of the present invention. In order to make the purposes, features and advantages of the present invention more obvious and easy to understand, please refer to the accompanying drawings. It should be noted that the structures, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification, so that people familiar with this technology can understand and read them, and are not used to limit the implementation conditions of the present invention, so they have no technical significance. Any modification of the structure, change in the proportional relationship or adjustment of the size should still fall within the scope of the technical content disclosed by the present invention without affecting the efficacy and purpose that can be achieved by the present invention.
[0056] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0057] Combined with attachment Figures 1 to 8 As shown, this embodiment provides a work site safety identification method, including: step S1, obtaining a data set, the data set including images of personnel and equipment at the power distribution work site. Step S2, constructing a work site safety identification model, and using the data set to train the work site safety identification model to obtain the trained work site safety identification model. Step S3, using the trained work site safety identification model to identify the target image of the power distribution work site, to obtain the clothing of the personnel, the behavior of the personnel, or the status of the equipment in the target image (for example, not wearing a mask and marking the position, the electric pole has a defect and marking the position, etc.), and use it as the identification result. And step S4, judging whether there is a work safety hazard based on the clothing of the personnel, the behavior of the personnel, or the status of the equipment in the target image, and issuing an alarm when there is a work safety hazard.
[0058] Specifically, in step S1, the personnel image and the equipment image (such as Figure 2 ) to construct the dataset for training and testing the model, thereby providing strong data support for model establishment. Optionally, the personnel images include images of personnel clothing and personnel behavior; and the equipment images include images of distribution boxes, poles, and wires in the work area, etc., but the present invention is not limited to this.
[0059] Specifically, if Figure 3 As shown, the work site safety recognition model includes an input layer, a backbone network, a feature fusion network, and an output layer connected in sequence; wherein, the input layer is used to input an image, the backbone network is used to extract features from the input image and output a feature map, the feature fusion network is used to perform cross-scale connection and context information weighting operations on the feature map output by the backbone network and output a new feature map, and the output layer is used to output the recognition result of the image based on the feature map output by the feature fusion network. More specifically, as Figure 3 As shown, the backbone network includes multiple feature extraction modules CECA connected in sequence; each feature extraction module CECA includes a convolution layer Conv, a batch normalization layer BN (Batch Normalization), an attention mechanism module ECA (Efficient Channel Attention) and an activation function SiLU (Sigmoid Linear Unit) connected in sequence; and the sizes of the convolution kernels of the multiple feature extraction modules CECA decrease in sequence to gradually extract local features or finer features.
[0060] In this embodiment, the attention mechanism (i.e., attention mechanism module ECA) is added to the feature extraction module CECA of the backbone network, which can learn effective channel attention by avoiding reducing the channel dimension, thereby reducing the redundant information of the subsequent fully connected layer (i.e., the convolution layer Conv in the output layer), more accurately identifying the location and category information of the target in the image, and thus obtaining more accurate recognition results. Figure 4As shown in Figure 1, the principle of the attention mechanism module ECA is as follows: First, the W×H×C feature map (width W, height H, number of channels C) output by the feature extraction module CECA after processing by the convolution layer Conv and the batch normalization layer BN is used as input. Global average pooling (GAP) is applied to the W×H×C feature map as input to obtain channel weights, resulting in a 1×1×C feature map (width 1, height 1, number of channels C), which takes into account the most important knowledge of each channel. Then, a fast one-dimensional convolution with k parameters is used to capture local cross-channel interaction information, and a new 1×1×C feature map is output through a sigmoid layer. Finally, the new 1×1×C feature map is element-wise multiplied with the W×H×C feature map as input to obtain an updated W×H×C feature map, which is then used as the input of the activation function SiLU in the feature extraction module CECA. Where k represents the convolution kernel size, k=3.
[0061] Please continue to refer to Figure 3 A Focus module is connected between the input layer and the adjacent feature extraction module CECA; the Focus module is used to slice the input image to reduce the resolution of the input image and increase the number of channels to four times the original, thereby reducing the computational complexity of subsequent convolution operations. Figure 3 As shown, the Focus module includes a slice layer, a concatenation layer connected to the slice layer, and a CBS module connected to the concatenation layer; the CBS module includes a convolution layer Conv, a batch normalization layer BN, and an activation function SiLU connected in sequence.
[0062] Please continue to refer to Figure 3 , a C3 module is connected between two adjacent feature extraction modules CECA; the C3 module fuses shallow details and deep semantic information through cross-stage feature splitting and residual connection, providing lightweight and highly expressive features for subsequent multi-branch feature dynamic splicing (Concat). Figure 3 As shown, the C3 module includes a first branch consisting of a CBS module and a Bottleneck module, a second branch consisting of a CBS module, a concatenation layer connected to the first and second branches, a CBS module connected to the concatenation layer, a batch normalization layer BN connected to the CBS module, and an activation function SiLU connected to the batch normalization layer BN. Specifically, the Bottleneck module includes two connected CBS modules and an add layer that performs element-by-element addition of the input of the previous CBS module and the output of the next CBS module.
[0063] Please continue to refer to Figure 3 The feature fusion network includes multiple feature fusion modules connected in sequence; each of the feature fusion modules includes a CBS module, a Concat layer and a C3STR module connected in sequence.
[0064] Specifically, the multiple feature extraction modules CECA in the backbone network are recorded as the first feature extraction module, the second feature extraction module, ..., the N-2th feature extraction module, the N-1th feature extraction module, and the Nth feature extraction module; wherein N is the total number of the feature extraction modules CECA, and N is an integer, N≥3.
[0065] It is understandable that if Figure 5 As shown in the figure, when N is 5, feature maps F1, F2, F3, F4, and F5 of different sizes are extracted after multiple convolution downsampling operations in the backbone network; wherein F1 is the feature map output by the first feature extraction module, F2 is the feature map output by the second feature extraction module, F3 is the feature map output by the third feature extraction module (i.e., the N-2th feature extraction module), F4 is the feature map output by the fourth feature extraction module (i.e., the N-1th feature extraction module), and F5 is the feature map output by the fifth feature extraction module (i.e., the Nth feature extraction module).
[0066] Specifically, if Figure 5 As shown, the steps of performing cross-scale connection and context information weighting operations on the feature map output by the backbone network by the feature fusion network include:
[0067] Step S21: The feature map F output by the Nth feature extraction module N Use 1×1 convolution to adjust the number of channels and get the feature map P N ; and the feature map P N The number of channels is the feature map F output by the N-1 feature extraction module N-1 1 / n times the number of channels, where n is an integer and n≥2 (for example, n is 2);
[0068] Step S22: feature map P N After n times upsampling, the feature map F output by the N-1 feature extraction module is obtained. N-1 Perform feature fusion and use Cross Stage Partial Network (CSPNet) for feature extraction to obtain the feature map P N-1 ; It can be understood that the feature map P N The size and number of channels after n-fold upsampling are similar to the feature map F N-1 The size and number of channels are the same;
[0069] Step S23: feature map PN-1 After n times upsampling, the feature map F output by the N-2 feature extraction module is obtained. N-2 Perform feature fusion and use a cross-stage local network for feature extraction to obtain the feature map P N-2 ; It can be understood that the feature map P N-1 The size and number of channels after n-fold upsampling are similar to the feature map F N-2 The size and number of channels are the same; optionally, in steps S22 and S23, 3×3 convolution is used to perform n-fold upsampling;
[0070] Step S24: feature map P N After n times upsampling and feature map P N-1 Perform feature fusion to obtain the mapping map M N-1 ; That is, select M N-1 As the feature map P N-1 and P N The mapping graph is upsampled by 3×3 convolution to achieve cross-scale connection; it can be understood that the feature map P N The size and number of channels after n-fold upsampling are the same as the feature map P N-1 The size and number of channels are the same;
[0071] Step S25: The feature map P N-2 and mapping graph M N-1 As the input stream, it is quickly normalized and fused, and the cross-stage local network is used to extract features to obtain the feature map T N-2 And output to the output layer;
[0072] Step S26: The feature map P N-1 , Mapping M N-1 and feature map T N-2 As the input stream, it is quickly normalized and fused, and the cross-stage local network is used to extract features to obtain the feature map T N-1 And output to the output layer;
[0073] Step S27: The feature map P N and feature map T N-1 As the input stream, it is quickly normalized and fused, and the cross-stage local network is used to extract features to obtain the feature map T N And output to the output layer, so that the output layer according to the feature map T N-2 、T N-1 and T N Output the recognition result. Optionally, Figure 3 As shown, the output layer includes the feature map T N-2 、T N-1 and T NThe three convolutional layers Conv that perform convolution processing and the NMS (Non-Maximum Suppression) layer connected to the three convolutional layers Conv; the NMS layer is a commonly used technology in target detection, mainly used to remove redundant detection boxes to ensure that each target has only one detection box, thereby obtaining accurate recognition results.
[0074] In this embodiment, if Figure 5 As shown in the figure, the cross-scale connection and context information weighting operation of the feature map output by the backbone network using the feature fusion network is mainly divided into four parts: the top-down process (i.e., steps S21 to S23), the cross-scale connection (i.e., the feature map P in step S24), N Perform n-fold upsampling to obtain the mapping map M N-1 In step S25, the map M N-1 As the feature map T N-2 Input stream, step S26 will feature map P N-1 As the feature map T N-1 The input stream), context information weighting (i.e., fast normalization fusion of the input stream in steps S25, S26, and S27) and the bottom-up process (i.e., the feature map T in step S26) N-2 As the feature map T N-1 Input stream, step S27, feature map T N-1 As the feature map T N input stream).
[0075] like Figure 5As shown in FIG, when the size of the input image is 640×640, N is 5 and n is 2, the size of the feature map F1 is 320×320, the size of the feature map F2 is 160×160, the size of the feature map F3 is 80×80, the size of the feature map F4 is 40×40, and the size of the feature map F5 is 20×20; the sizes of the feature maps P3, P4 and P5 are 80×80, 40×40 and 20×20 respectively; and the sizes of the feature maps T3, T4 and T5 are 80×80, 40×40 and 20×20 respectively. In this case, the bottom-up process is as follows: in step S26, the feature map T3 is downsampled by n times using 3×3 convolution, and then weighted stacked with the mapping map M4 and the feature map P4 to achieve fast normalization fusion. The fused feature map is subjected to a 3×3 convolution operation to eliminate the aliasing effect, and a cross-stage local network is used for feature extraction. At this time, the feature map T4 is obtained, and the size of the feature map T4 is 40×40 and the number of channels is 512. In step S27, the feature map T4 is downsampled by n times using 3×3 convolution, and then weighted stacked with the feature map P5 to achieve fast normalization fusion. The fused feature map is subjected to a 3×3 convolution operation to eliminate the aliasing effect, and a cross-stage local network is used for feature extraction. At this time, the feature map T5 is obtained, and the size of the feature map T5 is 20×20 and the number of channels is 1024.
[0076] In this embodiment, the fast normalization fusion method has fast training speed and high efficiency, and the calculation formula is:
[0077]
[0078] Where: O represents the feature map output after fast normalization fusion; X i Indicates the feature map that needs to be fused; ω i Represents the feature map X i The weight of the output feature map; ε is a parameter and ε≤0.0001, optionally, ε takes a value of 0.0001.
[0079] Specifically, the feature map T N-2 The calculation formula is:
[0080]
[0081] Among them, Conv represents the convolution operation; ω1 represents the feature map P N-2 For feature map T N-2 The weight of ω2 represents the mapping graph M N-1 For feature map T N-2 The weights of ω1 and ω2 are learned and determined by the model during the training process; Resize represents upsampling or downsampling operation, Resize(M N-1 ) represents the mapping graph MN-1 Upsampling or downsampling is performed, and the mapping map M N-1 The size and number of channels after upsampling or downsampling are the same as the feature map P N-2 The size of is the same as the number of channels; ε is a parameter and its value is 0.0001; Figure 5 In the embodiment shown, the mapping diagram M N-1 Perform upsampling.
[0082] Feature map T N-1 The calculation formula is:
[0083]
[0084] Among them, Conv represents the convolution operation; ω3 represents the feature map P N-1 For feature map T N-1 The weight of ω4 represents the mapping graph M N-1 For feature map T N-1 The weight of ω5 represents the feature map T N-2 For feature map T N-1 The weights of ω3, ω4 and ω5 are learned and determined by the model during the training process; Resize(T N-2 ) represents the feature map T N-2 Upsampling or downsampling is performed; and the feature map T N-2 The size and number of channels after upsampling or downsampling are the same as the feature map P N-1 or Map M N-1 The size and number of channels are the same; Figure 5 In the embodiment shown, the feature map T N-2 Perform downsampling.
[0085] Feature map T N The calculation formula is:
[0086]
[0087] Among them, Conv represents the convolution operation; ω6 represents the feature map P N For feature map T N The weight of ω7 represents the feature map T N-1 For feature map T N The weights of ω6 and ω7 are learned and determined by the model during training; Resize(T N-1 ) represents the feature map T N-1 Upsampling or downsampling is performed, and the feature map T N-1 The size and number of channels after upsampling or downsampling are the same as the feature map P N The size and number of channels are the same; Figure 5 In the embodiment shown, the feature map T N-1Perform downsampling.
[0088] From the above, it can be seen that this embodiment performs cross-scale connection and context information weighting operations in the feature pyramid, that is, performs effective cross-connection and context information interaction in the top-down and bottom-up multi-scale feature fusion process, which can effectively improve the feature extraction capability of the target in the image, thereby ensuring the recognition accuracy of the target in the image. Furthermore, in the process of fast normalization and fusion of the input feature map (i.e., input stream), the corresponding weight information of the input stream (i.e., the importance of learning different features) is taken into account, so that the feature maps of the input with different resolutions can be effectively fused, and the contribution of each input feature map to the output can be taken into account, thereby improving the efficiency and accuracy of feature fusion.
[0089] In addition, as the network structure deepens, after multiple convolution operations, most of the target feature information that the distribution operation site detection object should have is lost in the high-level feature map. Therefore, this embodiment draws on the idea of SwinTransformer in feature fusion, embeds it into the convolution block, uses the C3STR structure as an auxiliary module, introduces some discrete parameters of Transformer, and uses the window self-attention module to enhance the semantic information and feature representation of small targets. Figure 6 As shown, the C3STR module includes a third branch consisting of a CBS module and a Swin Transformer Block (STB) module, a fourth branch consisting of a CBS module, a concatenation (Concat) layer connected to the third branch and the fourth branch, a CBS module connected to the concatenation layer, a batch normalization layer BN connected to the CBS module, and an activation function SiLU connected to the batch normalization layer BN. The Swin Transformer Block (STB) module is composed of a paired window multi-head self-attention module (window multi-head self-attention, W-MSA), a sliding window multi-head self-attention module (shifted window multi-head self-attention, SW-MSA) and a multi-layer perceptron (multi-layer perceptron, MLP), and a residual connection is used inside each module. The local window size is 7, and the embedding dimension of the hidden layer of the multi-layer perceptron is 4. The calculation process of the multi-head self-attention mechanism is as follows:
[0090]
[0091] Where: Attention represents attention; SoftMax represents the normalized exponential function; Q, K, and V are the query, key, and value matrices, respectively; d is the number of channels in the input feature map; and B is the relative position deviation. Introducing B can significantly improve performance.
[0092] Compared to the traditional Transformer's multi-head self-attention module, the C3STR module divides the computational area within each window into local windows to enable cross-window information exchange, reducing computational complexity and network computation. In this embodiment, the C3STR module is introduced during feature fusion to enhance the global perception of small objects and improve the detection of objects of different scales at power distribution sites.
[0093] Please continue to refer to Figure 3 The feature fusion network is connected to the adjacent feature extraction module CECA with an SPP (Spatial Pyramid Pooling) module. The SPP module performs pooling operations on feature maps at different scales, fuses multi-scale feature information, and generates a fixed-dimensional feature representation, thereby enhancing the model's adaptability to multi-scale targets. Figure 3 As shown, the SPP module includes a CBS module, a maximum pooling layer, a concatenation layer and a CBS module connected in sequence.
[0094] Please continue to refer to Figure 1 In step S2, the step of using the data set to train the work site safety identification model includes:
[0095] The data set is annotated using a labeling box to obtain an annotated data set; and the clothing and behavior of the personnel, the state of the distribution box door, the defects on the pole and the defects on the wire are selected in the labeling box;
[0096] The labeled data set is divided into a training set and a validation set according to a preset ratio; the training set is used to train the work site safety recognition model, and the validation set is used to evaluate the accuracy of the trained work site safety recognition model.
[0097] Specifically, if Figure 7 As shown, the dataset is annotated using a labeling box, in which the personnel's clothing (such as a safety helmet, insulating gloves, a mask, and a safety rope) and behavior (such as a working posture) are selected, the status of the distribution box door (open or closed), defects on the pole (such as cracks), and defects on the wire (such as breakage and kite hanging).
[0098] In this embodiment, 70% of the data in the labeled dataset is divided into a training set for the learning and training process of the work site safety identification model, and the remaining 30% of the data is divided into a validation set, which is mainly used to verify and evaluate the performance of the model during the training process, so as to ensure the effectiveness and generalization ability of the model.
[0099] In step S3, a target image of the power distribution operation site is obtained, and the target image is recognized using the trained operation site safety recognition model, and the recognition result is as follows: Figure 8 shown.
[0100] In step S4, if any operational safety hazard is found from the recognition result, i.e., the clothing of the personnel, the behavior of the personnel, or the status of the equipment in the target image (for example, not wearing insulating gloves, cracks on the poles, etc.), an alarm is issued to remind on-site staff to take corresponding preventive measures.
[0101] Based on the same inventive concept, this embodiment also provides a work site safety identification and control instrument, including: a camera and an edge computing device. The camera is used to capture a target image of a power distribution work site. The edge computing device is connected to the camera; and the edge computing device includes a processor and a memory, and the memory stores the trained work site safety identification model as described above. When the trained work site safety identification model is executed by the processor, the target image is identified to obtain the clothing, behavior or equipment status of the person in the target image, and an alarm is issued when there is a safety hazard in the work.
[0102] It is understandable that the edge computing device is also connected to the cloud platform to send the clothing, behavior or device status of the person in the target image to the cloud platform.
[0103] Specifically, in this embodiment, the work site safety identification and control instrument integrates a visible light camera, an edge computing device (i.e., an edge AI device), a battery module, a communication module (5G or 4G), a network interface, and a USB interface. It is also equipped with a battery charging interface and a camera power supply interface. All of these functional components are integrated into a portable instrument box for easy portability and deployment. At the same time, considering the complexity and diversity of the power construction environment, the instrument box is made of shockproof and waterproof materials to adapt to the needs of different work scenarios, thereby ensuring the portability and durability of the work site safety identification and control instrument, but the present invention is not limited to this.
[0104] In this embodiment, the worksite safety identification and control device can monitor the location of onsite workers, ensuring their behavior complies with safety regulations and preventing unsafe behaviors. When a potential worksite safety risk is detected, the device can issue a real-time alarm, prompting onsite workers to take appropriate preventative measures.
[0105] The work site safety identification and control instrument has the function of information docking with the background cloud platform, which can not only upload real-time data on site, but also realize remote monitoring of the safety status of power facilities, timely detect and deal with problems.
[0106] Specifically, in this embodiment, when deploying the trained worksite safety identification model on the edge computing device, it is necessary to perform quantization optimization using TensorRT to achieve efficient GPU inference performance. The specific process includes environment preparation, model preparation, and inference optimization.
[0107] (1) Environment preparation: Install PyTorch and torchvision. Select the appropriate PyTorch version for installation based on the CUDA version of the edge device.
[0108] (2) Model preparation: The first step is quantization-aware training, which can be implemented through the PyTorch quantization toolbox: including adding a quantizer module, calibrating the model, and fine-tuning the model. The trained work site safety recognition model is quantized through TensorRT to reduce the model size and improve inference performance. Specifically:
[0109] 1) Software quantization: Add a quantizer module to the neural network to simulate the quantization effect.
[0110] 2) Calibration dataset: Obtain the scale value of the quantization module through the calibration dataset (such as the COCO dataset).
[0111] 3) Quantization parameter adjustment: Use the calibrated scale values to fine-tune the model to improve performance.
[0112] The quantified work site safety identification model is then converted into a format suitable for the TensorRT inference engine to improve deployment efficiency.
[0113] (3) Inference optimization: Deploy and optimize the converted model to run efficiently on the GPU. This is achieved through hardware acceleration via the Deep Learning Accelerator (DLA) of the edge computing device.
[0114] Based on the same inventive concept, this embodiment also provides a readable storage medium, which stores the trained work site safety recognition model as described above. When the trained work site safety recognition model is executed by the processor, the target image is recognized.
[0115] Although the present invention has been described in detail through the above preferred embodiments, it should be understood that the above description is not intended to limit the present invention. After reading the above description, various modifications and substitutions of the present invention will become apparent to those skilled in the art. Therefore, the scope of protection of the present invention should be defined by the appended claims.
Claims
1. A method for identifying safety at a work site, characterized in that: include: Acquire a data set, the data set including images of personnel and equipment at a power distribution operation site; Constructing a work site safety identification model and training it using the data set to obtain the trained work site safety identification model; the work site safety identification model includes an input layer, a backbone network, a feature fusion network, and an output layer connected in sequence; Using the trained work site safety recognition model to identify a target image of the power distribution work site to obtain the clothing, behavior, or status of the personnel in the target image; as well as It is determined whether there are any operational safety hazards based on the clothing, behavior of the personnel or the status of the equipment in the target image, and an alarm is issued when there are any operational safety hazards.
2. The work site safety identification method according to claim 1, characterized in that: The backbone network is used for feature extraction, and the backbone network includes a plurality of feature extraction modules connected in sequence; each of the feature extraction modules includes a convolution layer, a batch normalization layer, an attention mechanism module, and an activation function connected in sequence; and the sizes of the convolution kernels of the plurality of feature extraction modules decrease in sequence; The feature fusion network is used to perform cross-scale connection and context information weighting operations on the feature map output by the backbone network, and the feature fusion network includes multiple feature fusion modules connected in sequence; each feature fusion module includes a CBS module, a Concat layer and a C3STR module connected in sequence.
3. The work site safety identification method according to claim 2, characterized in that: The multiple feature extraction modules in the backbone network are recorded as a first feature extraction module, a second feature extraction module, ..., an N-2th feature extraction module, an N-1th feature extraction module, and an Nth feature extraction module; wherein N is the total number of the feature extraction modules, and N is an integer, N≥3; The step of the feature fusion network performing cross-scale connection and context information weighting operations on the feature map output by the backbone network includes: The feature map F output by the Nth feature extraction module N Use 1×1 convolution to adjust the number of channels and get the feature map P N , and the feature map P N The number of channels is the feature map F output by the N-1 feature extraction module N-1 1 / n times the number of channels, where n is an integer and n≥2; For feature map P N After n times upsampling, the feature map F output by the N-1 feature extraction module is obtained. N-1 Perform feature fusion and use cross-stage local network to extract features to obtain feature map P N-1 ; For feature map P N-1 After n times upsampling, the feature map F output by the N-2 feature extraction module is obtained. N-2 Perform feature fusion and use cross-stage local network to extract features to obtain feature map P N-2 ; For feature map P N After n times upsampling and feature map P N-1 Perform feature fusion to obtain the mapping map M N-1 ; The feature map P N-2 and mapping graph M N-1 As the input stream, it is quickly normalized and fused, and the cross-stage local network is used to extract features to obtain the feature map T N-2 And output to the output layer; The feature map P N-1 , Mapping M N-1 and feature map T N-2 As the input stream, it is quickly normalized and fused, and the cross-stage local network is used to extract features to obtain the feature map T N-1 And output to the output layer; The feature map P N and feature map T N-1 As the input stream, it is quickly normalized and fused, and the cross-stage local network is used to extract features to obtain the feature map T N And output to the output layer, so that the output layer according to the feature map T N-2 、T N-1 and T N Output the recognition results.
4. The work site safety identification method according to claim 3, characterized in that: Feature map T N-2 The calculation formula is: Among them, Conv represents the convolution operation; ω1 represents the feature map P N-2 For feature map T N-2 The weight of ω2 represents the mapping graph M N-1 For feature map T N-2 The weights of ω1 and ω2 are determined during model training; Resize represents upsampling or downsampling operations, Resize(M N-1 ) represents the mapping graph M N-1 Upsampling or downsampling is performed; ε is a parameter and the value of ε is 0.0001; Feature map T N-1 The calculation formula is: Among them, Conv represents the convolution operation; ω3 represents the feature map P N-1 For feature map T N-1 The weight of ω4 represents the mapping graph M N-1 For feature map T N-1 The weight of ω5 represents the feature map T N-2 For feature map T N-1 The weight of Resize(T N-2 ) represents the feature map T N-2 Perform upsampling or downsampling; Feature map T N The calculation formula is: Among them, Conv represents the convolution operation; ω6 represents the feature map P N For feature map T N The weight of ω7 represents the feature map T N-1 For feature map T N The weight of Resize(T N-1 ) represents the feature map T N-1 Perform upsampling or downsampling.
5. The work site safety identification method according to claim 1, characterized in that: A Focus module is connected between the input layer and the adjacent feature extraction module, and a C3 module is connected between two adjacent feature extraction modules.
6. The work site safety identification method according to claim 2, characterized in that: An SPP module is connected between the feature fusion network and the adjacent feature extraction module.
7. The work site safety identification method according to claim 1, characterized in that: The step of using the data set to train the work site safety recognition model includes: The data set is annotated using a labeling box to obtain an annotated data set; and the clothing and behavior of the personnel, the state of the distribution box door, the defects on the pole and the defects on the wire are selected in the labeling box; The labeled data set is divided into a training set and a validation set according to a preset ratio; the training set is used to train the work site safety recognition model, and the validation set is used to evaluate the accuracy of the trained work site safety recognition model.
8. A work site safety identification and control instrument, characterized in that: include: A camera is used to capture target images at the power distribution operation site; An edge computing device is connected to the camera; and the edge computing device includes a processor and a memory, the memory storing the trained work site safety recognition model according to any one of claims 1 to 7, and when the trained work site safety recognition model is executed by the processor, the target image is recognized to obtain the clothing, behavior or equipment status of the person in the target image, and an alarm is issued when there is a safety hazard in the work.
9. The work site safety identification and control device according to claim 8, characterized in that: The edge computing device is also connected to a cloud platform to send the clothing, behavior or device status of the person in the target image to the cloud platform.
10. A readable storage medium, characterized in that: The readable storage medium stores the trained work site safety recognition model according to any one of claims 1 to 7. When the trained work site safety recognition model is executed by a processor, the target image is recognized.
Citation Information
Cited By
Operation site safety supervision method based on multi-target tracking
CN121121661A