Method, system, and medium for power transmission and transformation engineering violation identification based on deep learning
By using deep learning methods and attention fusion structures to create a violation identification model, the problems of poor applicability and insufficient robustness of traditional algorithms are solved, and high-precision violation identification is achieved in power transmission and transformation projects.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-28
- Publication Date
- 2026-04-07
AI Technical Summary
In the current technology for identifying violations at power transmission and transformation construction sites, traditional algorithm feature design requires manual design, which has poor applicability, insufficient robustness, difficulty in adapting to changes in the scene, and reduced detection accuracy.
Using deep learning methods, a violation recognition neural network is constructed by collecting a dataset of violation samples. Sample augmentation is performed using rotation and translation methods, and spatial attention and channel attention structures are introduced to train a violation recognition model. The model outputs the violation type after inputting an image.
It improves the classification robustness and accuracy of violation detection. The model has a simple structure, is easy to deploy, and can accurately identify violations in complex construction scenarios.
Smart Images

Figure CN115359414B_ABST
Abstract
Description
Technical Field
[0001] This invention proposes a method, system, and medium for identifying violations in power transmission and transformation projects based on deep learning, belonging to the field of image recognition technology. Background Technology
[0002] For power transmission and transformation construction sites that are numerous, widespread, and large-scale, the traditional method of relying on on-site inspections by supervisors is no longer sufficient to meet the requirements of on-site safety management. With the continuous development and maturation of artificial intelligence technology, the use of front-end monitoring cameras at construction sites, incorporating deep learning image recognition algorithms, can intelligently identify and promptly alert workers to violations. This effectively reduces the incidence of violations and ensures construction safety.
[0003] Currently, traditional algorithms for identifying violations at construction sites generally fall into two categories: deep learning methods and traditional methods. Deep learning methods extract image features of violations from the original image, enabling end-to-end training and inference, resulting in simple and fast direct detection algorithms. Traditional methods typically involve three steps: human region detection, violation feature extraction, and violation identification. Common algorithms include motion detection-based background modeling, machine learning algorithms based on manual features and traditional classification, and deep learning algorithms based on convolutional neural networks. Deep learning methods can automatically learn features with more hierarchical expressive power, significantly improving the overall performance of violation detection algorithms.
[0004] Traditional algorithms have the following disadvantages: (1) Feature design often requires manual design, and feature extraction methods need to be designed separately for each type of violation, resulting in poor applicability; (2) Traditional algorithms have poor robustness, and the detection accuracy of the algorithm will decrease once the violation behavior scenario changes. Summary of the Invention
[0005] This invention proposes a deep learning-based method for identifying violations in power transmission and transformation projects. First, a violation identification sample dataset is collected, and a violation identification neural network is constructed. During training, the input image is split into small image patches, which are then input into the neural network as linear embedding sequences. The parameters of the violation identification network model are trained through supervised learning. In application, by inputting an image to be identified, the type of violation for that image is output.
[0006] Compared with traditional traffic violation detection methods, the deep learning method used in this invention can automatically extract image features based on data, thereby improving classification robustness.
[0007] Compared to conventional deep convolutional models, the model structure of this invention is simple, with highly reusable modules and easy deployment. Furthermore, this invention introduces spatial attention and channel attention structures into the attention fusion module, enhancing image feature extraction capabilities. The processing and analysis of each feature map can detect targets of different sizes, effectively improving violation detection accuracy.
[0008] A method for identifying violations in power transmission and transformation projects based on deep learning, the method comprising:
[0009] Step 1: Collect sample images of violations in power transmission and transformation projects, and divide the sample images of violations into M categories, where M represents the number of violation types, and N sample images for each category;
[0010] Step 2: Perform sample enhancement on the violation sample image using rotation and translation to obtain the enhanced violation sample image;
[0011] Step 3: Construct a network model using the enhanced violation sample images;
[0012] Step 4: Input the images collected at the power transmission and transformation project site into the network model for violation identification and obtain the violation type corresponding to the image.
[0013] Furthermore, the construction of the network model using the enhanced violation sample image described in step 1 includes:
[0014] Step 301: Obtain the output feature c corresponding to the enhanced violation sample image using the enhanced violation sample image. i ;
[0015] Step 302: The output feature c i Feature fusion is performed to obtain a fused parameter sequence, which is then incorporated into a post-processing module for further processing. The fused parameter sequence is as follows:
[0016] C = [c1, c2, ..., c k ]
[0017] Where C represents the fused features; c1……c k Indicates output features;
[0018] Step 303: Train the model using softmax on the violation sample set to obtain violation recognition parameters.
[0019] Further, step 301 involves obtaining the output feature c corresponding to the enhanced violation sample image from the enhanced violation sample image. i ,include:
[0020] Step 3011: Divide the enhanced violation sample image into K image blocks, and obtain linear image features f for each image block through a linear projection equation. i Where i represents the image block number;
[0021] Step 3012: Transfer the linear image features f i The input is fed into the encoder to obtain the linear image features f. i The corresponding output feature c i .
[0022] Furthermore, the post-processing module includes a fully connected layer one, a normalization processing module, and a fully connected layer two; wherein, the signal output terminal of the fully connected layer one is connected to the signal input terminal of the normalization processing module; and the signal output terminal of the normalization processing module is connected to the signal input terminal of the fully connected layer two.
[0023] Furthermore, the encoder includes a first normalization processing module, a multi-attention fusion module, a first adder, a second normalization processing module, a first fully connected layer, a third normalization processing module, a second fully connected layer, and a second adder; the signal input terminals and signal output terminals of the first normalization processing module, the multi-attention fusion module, the first adder, the second normalization processing module, the first fully connected layer, the third normalization processing module, the second fully connected layer, and the second adder are sequentially connected.
[0024] Furthermore, the normalization formula for the encoder is as follows:
[0025]
[0026] Where μ and σ represent the mean and standard deviation, respectively, and x represents the output feature.
[0027] Furthermore, the multi-attention fusion module includes two attention structures: spatial attention and channel attention.
[0028] Furthermore, the operation of the multi-attention fusion module includes:
[0029] The first step is to apply global average pooling to the input features;
[0030]
[0031] Among them, H p X represents the global average pooling function; C (i, j) represents the value of the input value's C channel at position (i, j);
[0032] The second step, in the spatial attention branch, processes the pooled features through convolutional layers and the sigmoid activation function to obtain the SA as follows:
[0033]
[0034] Where δ represents the sigmoid activation function, Conv represents the convolutional layer, and g c F represents the output of global average pooling. c It is the input of the multi-attention fusion module.
[0035] The third step, in the channel attention branch, is to process the pooled features through a convolutional layer, ReLU, another convolutional layer, and a sigmoid activation function to obtain the CA as follows:
[0036] CA=σ(Conv(δ(Conv(g c ))))
[0037] Where δ represents the sigmoid activation function, Conv represents the convolutional layer, and g c This represents the output of global average pooling;
[0038] Step 4: Fuse the two attention mechanisms to obtain the fused parameters F as follows:
[0039]
[0040] Step 5: Obtain the output feature F by performing convolution on the fused parameters F. out as follows:
[0041] F out =Conv(F)
[0042] Among them, F out This indicates the output features.
[0043] A deep learning-based system for identifying violations in power transmission and transformation projects, the system comprising:
[0044] The data acquisition module is used to collect sample images of violations in power transmission and transformation projects, and divide the sample images of violations into M categories, where M represents the number of violation types, and N sample images for each category.
[0045] The enhancement module is used to enhance the violation sample image by rotation and translation to obtain the enhanced violation sample image.
[0046] The training module is used to build a network model using the enhanced violation sample images. During model training, the input image is split into small image patches and input into the neural network with a linear embedding sequence. The parameters of the violation recognition network model are trained through supervised learning.
[0047] The identification module is used to input images collected at the site of the power transmission and transformation project into the network model for violation identification and to obtain the violation type corresponding to the image.
[0048] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the above methods.
[0049] Beneficial effects of this invention:
[0050] This invention proposes a deep learning-based method for identifying traffic violations. During training, the input violation image is divided into K small image patches, which are then linearly embedded into the violation identification neural network. Spatial attention and channel attention structures are introduced into the network modules to enhance the feature extraction capability of the K image patches. In application, the image is input into the trained model, which then outputs the violation type. Compared with existing violation detection methods, this invention features a simpler network model, highly reusable modules, and ease of implementation. Furthermore, it can accurately identify personnel violations in complex construction scenarios of power transmission and transformation projects with high accuracy. Attached Figure Description
[0051] Figure 1 This is a flowchart of the method described in this invention;
[0052] Figure 2 This is a schematic diagram of the editor structure described in this invention;
[0053] Figure 3 This is a schematic diagram of the multi-attention fusion module structure of the present invention;
[0054] Figure 4 This is a schematic diagram of the post-processing module structure of the present invention. Detailed Implementation
[0055] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0056] This embodiment proposes a method for identifying violations in power transmission and transformation projects based on deep learning, such as... Figure 1 As shown, the method includes:
[0057] Step 1: Collect sample images of violations in power transmission and transformation projects, and divide the sample images of violations into M categories, where M represents the number of violation types, and N sample images for each category;
[0058] Step 2: Perform sample enhancement on the violation sample image using rotation and translation to obtain the enhanced violation sample image;
[0059] Step 3: Construct a network model using the enhanced violation sample images;
[0060] Step 4: Input the images collected at the power transmission and transformation project site into the network model for violation identification and obtain the violation type corresponding to the image.
[0061] Step 1, which involves constructing a network model using the enhanced violation sample images, includes:
[0062] Step 301: Obtain the output feature c corresponding to the enhanced violation sample image using the enhanced violation sample image. i ;
[0063] Step 302: The output feature c i Feature fusion is performed to obtain a fused parameter sequence, which is then incorporated into a post-processing module for further processing. The fused parameter sequence is as follows:
[0064] C = [c1, c2, ..., c k Where C represents the fused features; c1……c k Indicates output features;
[0065] Step 303: Train the model using softmax on the violation sample set to obtain violation recognition parameters.
[0066] In step 301, the output feature c corresponding to the enhanced violation sample image is obtained from the enhanced violation sample image. i ,include:
[0067] Step 3011: Divide the enhanced violation sample image into K image blocks, and obtain linear image features f for each image block through a linear projection equation. i Where i represents the image block number;
[0068] Step 3012: Transfer the linear image features f i The input is fed into the encoder to obtain the linear image features f. i The corresponding output feature c i Specifically, such as Figure 2As shown, the encoder includes a first normalization processing module, a multi-attention fusion module, a first adder, a second normalization processing module, a first fully connected layer, a third normalization processing module, a second fully connected layer, and a second adder; the signal input terminals and signal output terminals of the first normalization processing module, the multi-attention fusion module, the first adder, the second normalization processing module, the first fully connected layer, the third normalization processing module, the second fully connected layer, and the second adder are connected sequentially.
[0069] The normalization formula for the encoder is as follows:
[0070]
[0071] Where μ and σ represent the mean and standard deviation, respectively, and x represents the output feature.
[0072] On the other hand, the multi-attention fusion module includes two attention structures: spatial attention and channel attention. The specific structure of the multi-attention module is as follows: Figure 3 As shown.
[0073] The operation of the multi-attention fusion module includes:
[0074] The first step is to apply global average pooling to the input features;
[0075]
[0076] Among them, H p X represents the global average pooling function; C (i, j) represents the value of the input value's C channel at position (i, j);
[0077] The second step, in the spatial attention branch, processes the pooled features through convolutional layers and the sigmoid activation function to obtain the SA as follows:
[0078]
[0079] Where δ represents the sigmoid activation function, Conv represents the convolutional layer, and g c F represents the output of global average pooling. c It is the input of the multi-attention fusion module.
[0080] The third step, in the channel attention branch, is to process the pooled features through a convolutional layer, ReLU, another convolutional layer, and a sigmoid activation function to obtain the CA as follows:
[0081] CA=σ(Conv(δ(Conv(g c ))))
[0082] Where δ represents the sigmoid activation function, Conv represents the convolutional layer, and g c This represents the output of global average pooling;
[0083] Step 4: Fuse the two attention mechanisms to obtain the fused parameters F as follows:
[0084]
[0085] Step 5: Obtain the output feature F by performing convolution on the fused parameters F. out as follows:
[0086] F out =Conv(F)
[0087] Among them, F out This indicates the output features.
[0088] Meanwhile, the post-processing module includes a fully connected layer one, a normalization processing module, and a fully connected layer two; wherein, the signal output terminal of the fully connected layer one is connected to the signal input terminal of the normalization processing module; and the signal output terminal of the normalization processing module is connected to the signal input terminal of the fully connected layer two. The specific structure of the post-processing module is as follows: Figure 4 As shown.
[0089] This invention proposes a deep learning-based method for identifying violations in power transmission and transformation projects. During training, the input violation image is divided into K small image patches, which are then linearly embedded into the violation identification neural network. Spatial attention and channel attention structures are introduced into the network modules to enhance the feature extraction capability of the K image patches. In application, the image is input into the trained model, which then outputs the violation type. Compared with existing violation detection methods, this invention features a simpler network model, highly reusable modules, and ease of implementation. Furthermore, it can accurately identify personnel violations in complex construction scenarios of power transmission and transformation projects with high accuracy.
[0090] One embodiment of the present invention provides a system for identifying violations in power transmission and transformation projects based on deep learning, the system comprising:
[0091] The data acquisition module is used to collect sample images of violations in power transmission and transformation projects, and divide the sample images of violations into M categories, where M represents the number of violation types, and N sample images for each category.
[0092] The enhancement module is used to enhance the violation sample image by rotation and translation to obtain the enhanced violation sample image.
[0093] The training module is used to build a network model using the enhanced violation sample images. During model training, the input image is split into small image patches and input into the neural network with a linear embedding sequence. The parameters of the violation recognition network model are trained through supervised learning.
[0094] An identification module is used to input images collected at the construction site of power transmission and transformation projects into the network model for violation identification, and to obtain the violation type corresponding to the image. A computer-readable storage medium.
[0095] The present invention proposes a deep learning-based system for identifying violations in power transmission and transformation projects. During training, the input violation image is divided into K small image patches, which are then linearly embedded into the violation identification neural network. Spatial attention and channel attention structures are introduced into the network modules to enhance the feature extraction capability of the K image patches. In application, the image is input into the trained model, which then outputs the violation type. Compared with existing violation detection methods, the network model of this invention is simple, the modules are highly reusable, easy to implement, and can accurately identify personnel violations in complex construction scenarios of power transmission and transformation projects with high accuracy.
[0096] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the above methods.
[0097] The computer-readable storage medium may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof. The program code for performing the operations of this invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code may be executed entirely on a user computing device, partially on a user device, as a standalone software package, partially on a user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing devices can be connected to user computing devices via any type of network, including local area networks (LANs) or wide area networks (WANs), or they can be connected to external computing devices (e.g., via the Internet using an Internet service provider).
[0098] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method for identifying violations in power transmission and transformation projects based on deep learning, characterized in that, The method includes: Step 1: Collect sample images of violations in power transmission and transformation projects, and divide the sample images of violations into M categories, where M represents the number of violation types, and N sample images for each category; Step 2: Perform sample enhancement on the violation sample image using rotation and translation to obtain the enhanced violation sample image; Step 3: Construct a network model using the enhanced violation sample images. During model training, the input image is split into small image patches and input into the neural network with a linear embedding sequence. The parameters of the violation recognition network model are trained through supervised learning. Step 4: Input the images collected at the power transmission and transformation project site into the network model for violation identification and obtain the violation type corresponding to the image; Step 3, which involves constructing a network model using the enhanced violation sample images, includes: Step 301: Obtain the output feature c corresponding to the enhanced violation sample image using the enhanced violation sample image. i ; Step 302: The output feature c i Feature fusion is performed to obtain a fused parameter sequence, which is then incorporated into a post-processing module for further processing. The fused parameter sequence is as follows: C=[c1,c2,…,c k ]; Where C represents the fused features; c1……c k Indicates output features; Step 303: Train the model using softmax on the set of violation samples to obtain violation recognition parameters; The encoder includes a first normalization processing module, a multi-attention fusion module, a first adder, a second normalization processing module, a first fully connected layer, a third normalization processing module, a second fully connected layer, and a second adder; the signal input terminals and signal output terminals of the first normalization processing module, the multi-attention fusion module, the first adder, the second normalization processing module, the first fully connected layer, the third normalization processing module, the second fully connected layer, and the second adder are connected sequentially. The operation of the multi-attention fusion module includes: The first step is to apply global average pooling to the input features; Among them, H p X represents the global average pooling function; C (i, j) represents the value of the input value's C channel at position (i, j); The second step, in the spatial attention branch, processes the pooled features through convolutional layers and the sigmoid activation function to obtain the SA as follows: Where δ represents the sigmoid activation function, Conv represents the convolutional layer, and g c F represents the output of global average pooling. c It is the input of the multi-attention fusion module. The third step, in the channel attention branch, is to process the pooled features through a convolutional layer, ReLU, another convolutional layer, and a sigmoid activation function to obtain the CA as follows: CA=σ(Conv(δ(Conv(g c )))); Where δ represents the sigmoid activation function, Conv represents the convolutional layer, and g c This represents the output of global average pooling; Step 4: Fuse the two attention mechanisms to obtain the fused parameters F as follows: F = [CA,SA]; Step 5: Obtain the output feature F by performing convolution on the fused parameters F. out as follows: F out =Conv(F); Among them, F out This indicates the output features.
2. The method according to claim 1, characterized in that, Step 301 involves obtaining the output feature c corresponding to the enhanced violation sample image from the enhanced violation sample image. i ,include: Step 3011: Divide the enhanced violation sample image into K image blocks, and obtain linear image features f for each image block through a linear projection equation. i Where i represents the image block number; Step 3012: Transfer the linear image features f i The input is fed into the encoder to obtain the linear image features f. i The corresponding output feature c i .
3. The method according to claim 1, characterized in that, The post-processing module includes a fully connected layer one, a normalization processing module, and a fully connected layer two; wherein, the signal output terminal of the fully connected layer one is connected to the signal input terminal of the normalization processing module; and the signal output terminal of the normalization processing module is connected to the signal input terminal of the fully connected layer two.
4. The method according to claim 1, characterized in that, The normalization formula for the encoder is as follows: Where μ and σ represent the mean and standard deviation, respectively, and x represents the output feature.
5. The method according to claim 4, characterized in that, The multi-attention fusion module includes two attention structures: spatial attention and channel attention.
6. A system for identifying violations in power transmission and transformation projects based on deep learning, characterized in that, The system includes: The data acquisition module is used to collect sample images of violations in power transmission and transformation projects, and divide the sample images of violations into M categories, where M represents the number of violation types, and N sample images for each category. The enhancement module is used to enhance the violation sample image by rotation and translation to obtain the enhanced violation sample image. The training module is used to build a network model using the enhanced violation sample images. During model training, the input image is split into small image patches and input into the neural network with a linear embedding sequence. The parameters of the violation recognition network model are trained through supervised learning. The identification module is used to input images collected at the construction site of the power transmission and transformation project into the network model for violation identification and to obtain the violation type corresponding to the image. The network model constructed using the enhanced violation sample images in the training module includes: The output feature c corresponding to the enhanced violation sample image is obtained through the enhanced violation sample image. i ; The output feature c i Feature fusion is performed to obtain a fused parameter sequence, which is then incorporated into a post-processing module for further processing. The fused parameter sequence is as follows: C=[c1,c2,…,c k ]; Where C represents the fused features; c1……c k Indicates output features; The model will be trained using softmax on the aforementioned violation sample set to obtain violation recognition parameters. The encoder includes a first normalization processing module, a multi-attention fusion module, a first adder, a second normalization processing module, a first fully connected layer, a third normalization processing module, a second fully connected layer, and a second adder; the signal input terminals and signal output terminals of the first normalization processing module, the multi-attention fusion module, the first adder, the second normalization processing module, the first fully connected layer, the third normalization processing module, the second fully connected layer, and the second adder are connected sequentially. The operation of the multi-attention fusion module includes: The first step is to apply global average pooling to the input features; Among them, H p X represents the global average pooling function; C (i, j) represents the value of the input value's C channel at position (i, j); The second step, in the spatial attention branch, processes the pooled features through convolutional layers and the sigmoid activation function to obtain the SA as follows: Where δ represents the sigmoid activation function, Conv represents the convolutional layer, and g c F represents the output of global average pooling. c It is the input of the multi-attention fusion module. The third step, in the channel attention branch, is to process the pooled features through a convolutional layer, ReLU, another convolutional layer, and a sigmoid activation function to obtain the CA as follows: CA=σ(Conv(δ(Conv(g c )))); Where δ represents the sigmoid activation function, Conv represents the convolutional layer, and g c This represents the output of global average pooling; Step 4: Fuse the two attention mechanisms to obtain the fused parameters F as follows: F = [CA,SA]; Step 5: Obtain the output feature F by performing convolution on the fused parameters F. out as follows: F out =Conv(F); Among them, F out This indicates the output features.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of any one of claims 1-5.
Citation Information
Patent Citations
Engineering field personnel behavior early warning method and system based on artificial intelligence
CN112418717A
Target detection method and system based on global feature perception
CN113673420A