A method for identifying hidden dangers of foreign objects on transmission towers based on deep learning
By building and training a deep learning model, combined with the Inner-Focaler-EIoU loss function and feature extraction module, the problem of low recognition accuracy in foreign object identification in transmission poles and towers is solved, and more efficient and accurate foreign object detection is achieved.
Patent Information
- Application Number
- CN202410741672.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-06-11
AI Technical Summary
The existing technology has low recognition accuracy in foreign object identification in transmission poles and towers, and is prone to missed detections and wrong detections. Moreover, the traditional model is too general and has not been improved for foreign object targets, making it difficult to effectively monitor and remove foreign object hazards on transmission poles and towers.
Construct a deep learning-based foreign object hazard identification method for transmission poles and towers, including constructing an original data set of foreign objects for transmission poles and preprocessing, training a deep learning-based foreign object hazard identification model for transmission poles, and using the Inner-Focaler-EIoU loss function to optimize bounding box predictions. Design IWConv and CB-SFE modules to improve feature extraction and detection capabilities.
It improves the accuracy and robustness of foreign object identification in transmission pole towers, reduces the sensitivity of the model to images, enhances the detection ability of irregular or complex foreign object features, and improves the generalization of the model under various scales and position changes. ability.
Smart Images

Figure CN118314442B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of foreign object hidden danger identification, and in particular relates to a method for identifying foreign object hidden dangers of transmission towers based on deep learning. Background Art
[0002] Transmission lines are a vital component of the power system, responsible for transmitting the electricity generated by power stations to various distribution networks. The safe operation of transmission towers directly affects the stability of the entire power grid and the reliability of power supply. Foreign objects such as honeycombs, kites, balloons and plastic sheets often attach to transmission towers due to natural or human factors. These foreign objects may not only cause physical damage to the transmission lines, but also cause serious safety accidents such as short circuits and power outages. Therefore, monitoring and timely removal of these foreign objects are necessary measures to ensure the safety of power transmission.
[0003] Although traditional inspection methods (such as manual inspection or helicopter-based visual inspection) can detect foreign objects on transmission towers to a certain extent, these methods are often time-consuming, costly and inefficient. In addition, manual inspections are difficult to cover vast and remote areas, and inspections in severe weather conditions are even more difficult, posing greater safety risks.
[0004] In recent years, with the rapid development of artificial intelligence technology, especially the breakthrough of deep learning in the field of image recognition, a new solution has been provided for the monitoring of foreign objects on transmission towers. By using high-resolution cameras to continuously monitor transmission lines and using deep learning models to automatically identify foreign objects in images, this method can significantly improve the efficiency and accuracy of monitoring. In addition, compared with traditional methods, the monitoring system based on deep learning has lower operating costs and better adaptability, and can continue to operate stably in various weather conditions. Summary of the invention
[0005] In order to solve the problems that the conventional algorithms used in the prior art have low recognition accuracy, are prone to missed detection and false detection, and the model is the same as other application scenarios, is too general, and has not been further improved for foreign body targets, the present invention provides a method for identifying foreign body hazards on transmission towers based on deep learning, including:
[0006] Constructing the original data set of foreign objects on transmission towers and performing preprocessing to obtain the processed data set of foreign objects on transmission towers;
[0007] Constructing a transmission tower foreign body hazard identification model based on deep learning, training the transmission tower foreign body hazard identification model based on the processed transmission tower foreign body data set, and obtaining a trained transmission tower foreign body hazard identification model;
[0008] Based on the trained transmission tower foreign body hazard identification model, foreign bodies in the transmission tower are identified to obtain an identification result.
[0009] Preferably, the process of constructing the original data set of foreign matter on the transmission tower and performing preprocessing includes:
[0010] Collect image data of foreign objects on transmission towers by field photography, manually annotate the collected image data, use annotation tools to select the location of foreign objects and annotate them with labels, and then export an XML label file; the XML label file includes the label name and annotation frame information of the target foreign object;
[0011] The manually annotated transmission tower foreign body image data are cropped to the same size, and then data enhancement is performed to obtain the data-enhanced transmission tower foreign body dataset, which is then divided into training set, validation set and test set in a ratio of 8:1:1.
[0012] Preferably, in the process of training the transmission tower foreign body hazard recognition model based on the processed transmission tower foreign body dataset, the Inner-Focaler-EIoU loss function is used to simultaneously optimize the position, size, confidence and category prediction accuracy of the bounding box;
[0013] The Inner-Focaler-EIoU loss function is Based on the loss function, different regression samples are focused by linear interval mapping to obtain Loss function;
[0014] In the Based on the loss function, the scale factor ratio control is used to generate auxiliary bounding boxes of different scales to calculate the loss, and the Loss function;
[0015] Said The loss function is defined as follows:
[0016]
[0017] in, The calculation is as follows:
[0018]
[0019]
[0020]
[0021]
[0022]
[0023]
[0024]
[0025] Among them, the center points of the real box and the inner real box are express; Indicates the center point of the anchor and internal anchors; and Represent the width and height of the real box respectively; and Represent the width and height of the anchor box respectively; is the scale factor;
[0026] Said The loss function is defined as follows:
[0027]
[0028] Among them, the linear interval mapping method is used to reconstruct loss, allowing to improve the marginal regression, obtaining ;
[0029]
[0030] set up and Two thresholds, , by adjusting and The value of Focus on different regression samples; when Less than a lower threshold hour, is 0; when Greater than an upper threshold hour, is 1; and when In and In between, is a basis A function whose value increases linearly;
[0031] The loss function is defined as follows:
[0032]
[0033] in, It represents the intersection-over-union ratio of the predicted box and the true box, that is, , and Represent the predicted box and the true box respectively; and Represent the center points of the predicted box and the true box respectively; Represents the Euclidean distance between two points; and Represent the width and height of the smallest bounding box composed of the predicted box and the true box respectively; represents the diagonal of the minimum bounding box; and Represent the width and height of the real box respectively; and Represent the width and height of the prediction box respectively.
[0034] Preferably, the process of identifying foreign objects in the transmission tower based on the trained transmission tower foreign object hazard identification model includes:
[0035] Transmission tower foreign body image The input to the transmission tower foreign body hazard identification model first passes through the Conv_BN_SiLU module with a convolution kernel size of 3×3 and a step size of 2 to obtain the transmission tower foreign body feature map ;
[0036] The transmission tower foreign body characteristic map Input the convolution kernel size of 3×3 and the step size of 2 into the IWConv module to obtain the transmission tower foreign body feature map ;
[0037] The transmission tower foreign body characteristic map Input into the CB-SFE module to obtain the characteristic map of foreign matter on the transmission tower ;
[0038] Then stack the IWConv module and CB-SFE module three times in sequence to obtain the transmission tower foreign body feature map , Characteristics of foreign matter on transmission towers , Characteristics of foreign matter on transmission towers , Characteristics of foreign matter on transmission towers , Characteristics of foreign matter on transmission towers , Characteristics of foreign matter on transmission towers ;
[0039] The transmission tower foreign body characteristic map Input into the SPPF module to obtain the characteristic map of foreign matter on the transmission tower ; The transmission tower foreign body characteristic diagram Upsampling is performed to obtain the characteristic map of foreign matter on the transmission tower ;
[0040] The transmission tower foreign body characteristic map And the characteristic diagram of foreign matter on the transmission tower Perform Concat operation to obtain the characteristic map of foreign matter on the transmission tower ;
[0041] The transmission tower foreign body characteristic map Input into the CB-SFE module to obtain the characteristic map of foreign matter on the transmission tower ;
[0042] The characteristic diagram of foreign matter on the transmission tower Upsampling is performed to obtain the characteristic map of foreign matter on the transmission tower ;
[0043] The transmission tower foreign body characteristic map And the characteristic diagram of foreign matter on the transmission tower Perform Concat operation to obtain the characteristic map of foreign matter on the transmission tower ;
[0044] The transmission tower foreign body characteristic map Input into the CB-SFE module to obtain the characteristic map of foreign matter on the transmission tower ;
[0045] The transmission tower foreign body characteristic map Input the convolution kernel size of 3×3 and the step size of 2 into the IWConv module to obtain the transmission tower foreign body feature map ;
[0046] The transmission tower foreign body characteristic map And the characteristic diagram of foreign matter on the transmission tower Perform Concat operation to obtain the characteristic map of foreign matter on the transmission tower ;
[0047] The transmission tower foreign body characteristic map Input into the CB-SFE module to obtain the characteristic map of foreign matter on the transmission tower ;
[0048] The transmission tower foreign body characteristic map Input the convolution kernel size of 3×3 and the step size of 2 into the IWConv module to obtain the transmission tower foreign body feature map ;
[0049] The transmission tower foreign body characteristic map And the characteristic diagram of foreign matter on the transmission tower Perform Concat operation to obtain the characteristic map of foreign matter on the transmission tower ;
[0050] The transmission tower foreign body characteristic map Input into the CB-SFE module to obtain the characteristic map of foreign matter on the transmission tower ;
[0051] The transmission tower foreign body characteristic map , the characteristic diagram of foreign matter on the transmission tower , the characteristic diagram of foreign matter on the transmission tower They are input into the target prediction head respectively, and the output is a tensor containing the prediction information. Each row corresponds to a prediction, including the bounding box coordinates, category label and confidence score.
[0052] Preferably, the Conv_BN_SiLU module includes a convolution layer, a batch normalization layer and an activation function;
[0053] The IWConv module uses a dynamic weight mechanism to input the transmission tower foreign body feature map. The automatically generated weight coefficient adjusts the convolution kernel weight in real time, so that the transmission tower foreign body hazard recognition model optimizes the feature extraction method according to the characteristics of the input feature map;
[0054] Given the input transmission tower foreign body characteristic diagram ,have The IWConv module with convolution kernels, the convolution result of one convolution kernel is determined by the convolution results of M convolution kernels, global average pooling is applied to fuse the information into the vector, and then a two-layer MLP module with Softmax activation is used to automatically generate coefficients;
[0055] The foreign body feature map of the transmission tower output after convolution is Input the BN layer, then input the SiLU layer, and obtain the final output transmission tower foreign body feature map Y;
[0056] The formula expression is:
[0057]
[0058]
[0059] Among them, Pool is a pooling operation. is the convolution operation, represents the i-th convolution weight tensor, is the corresponding dynamic coefficient, is the overall convolution weight of the module, This is the transmission tower foreign body feature map output after convolution, C is the number of channels of the feature map, H is the height of the feature map, and W is the width of the feature map.
[0060] Preferably, the CB-SFE module is used for feature extraction and feature fusion;
[0061] The feature extraction process includes:
[0062] Each CB-SFE module in the transmission tower foreign body hazard identification model uses different numbers of SSFE modules with stacked SFEs to achieve feature extraction at different stages of the transmission tower foreign body hazard identification model;
[0063] The feature fusion process includes:
[0064] The CB-SFE module improves the detection capability of the transmission tower foreign body hazard identification model for foreign bodies of different sizes on the transmission tower by fusing features of different scales.
[0065] Preferably, the transmission tower foreign body characteristic map Input into the CB-SFE module to obtain the characteristic map of foreign matter on the transmission tower The process includes:
[0066] The transmission tower foreign body characteristic diagram with channel number C Input into the CFE module, compress and enhance the channel information of the transmission tower foreign body characteristic map, and obtain the transmission tower foreign body characteristic map with a channel number of C / 2 ;
[0067] Stack four SSFE modules and transform the transmission tower foreign body feature diagram Input the first SSFE module, the output results of the first three SSFE modules are input to the next SSFE module respectively, and the transmission tower foreign body feature maps output by the four SSFE modules are recorded as follows: , , , ,The characteristic graph of foreign objects in the transmission tower has different levels of characteristic information, and the number of channels is C / 8;
[0068] Transmission tower foreign body feature map , , , , Perform the Concat operation to obtain the transmission tower foreign body feature map with channel number C. ;
[0069] The characteristic diagram of foreign matter on the transmission tower Perform ChannelShuffle operation to obtain the transmission tower foreign body feature map with channel number C , and then the transmission tower foreign body characteristic map Input into the CFE module to obtain the characteristic map of foreign matter on the transmission tower This is the characteristic diagram of foreign matter on the transmission tower .
[0070] Preferably, the working process of the SSFE module in the CB-SFE module includes:
[0071] Stack n SFE modules and perform output and input in sequence;
[0072] The number of SFE modules stacked on the SSFE modules in the same CB-SFE module is equal;
[0073] The number of SFE modules stacked in the SSFE modules in different CB-SFE modules may be different.
[0074] Preferably, the working process of the SFE module in the SSFE module includes:
[0075] The transmission tower foreign body characteristic diagram with channel number C Perform Split operation to obtain the transmission tower foreign body feature map with the number of channels being C / 2 , Characteristics of foreign matter on transmission towers ;
[0076] The transmission tower foreign body characteristic map Input into the CFE module to obtain the characteristic map of foreign matter on the transmission tower ;
[0077] Then the transmission tower foreign body characteristic map , the characteristic diagram of foreign matter on the transmission tower Perform Concat operation to obtain the characteristic map of foreign matter on the transmission tower ;
[0078] The transmission tower foreign body characteristic map Perform ChannelShuffle operation to obtain the characteristic map of foreign objects on transmission towers , as the final output feature map of the SFE module.
[0079] Preferably, the working process of the CFE module in the CB-SFE module includes:
[0080] The transmission tower foreign body characteristic diagram with channel number C The convolution kernel size is 5×5, 3×3, and the convolution kernel size is 1×1. The corresponding feature map of foreign objects on the transmission tower is obtained. , Characteristics of foreign matter on transmission towers , Characteristics of foreign matter on transmission towers ;
[0081] The transmission tower foreign body characteristic map , Characteristics of foreign matter on transmission towers , Characteristics of foreign matter on transmission towers , Characteristics of foreign matter on transmission towers Perform the Add operation to obtain the foreign body feature map of the transmission tower ;
[0082] The original features are combined with the deep extracted features, and then the transmission tower foreign body feature map is constructed. Input SiLU activation layer to get the transmission tower foreign body feature map ;
[0083] Then the transmission tower foreign body characteristic map Input the convolution kernel size of 1×1 into the Conv layer to obtain the foreign body feature map of the transmission tower. , as the final output feature map of the CFE module.
[0084] Compared with the prior art, the present invention has the following advantages and technical effects:
[0085] (1) In the data preprocessing stage, the present invention obtains a data-enhanced transmission tower foreign body dataset through data enhancement, which can ensure that the dataset has sufficient samples for training, verification and testing, and enhance the robustness of the transmission tower foreign body hazard identification model, reduce the model's sensitivity to images, and thus better train the deep learning model.
[0086] (2) The IWConv module designed in the present invention uses a dynamic weight mechanism to automatically generate weight coefficients based on the input feature map, thereby achieving real-time adjustment of the convolution kernel weights, allowing the network to optimize the feature extraction method according to the characteristics of the input feature map. The weight of each convolution kernel is adjusted individually, which enhances the model's expressiveness when processing irregular or complex foreign body features. By fine-tuning the computing resources used, the accuracy of the transmission tower foreign body hazard identification model is improved under low FLOPs conditions, and the irregular features such as foreign bodies are better extracted.
[0087] (3) The present invention designs a CB-SFE module. Each CB-SFE module in the transmission tower foreign body hazard identification model realizes feature extraction at different stages of the transmission tower foreign body hazard identification model by using SSFE modules with different numbers of stacked SFEs. Since the foreign bodies on the transmission tower vary in size, the CB-SFE module enhances the detection capability of the transmission tower foreign body hazard identification model for objects of various sizes by fusing features of different scales, especially enhancing the detection capability of small targets.
[0088] (4) The present invention proposes an Inner-Focaler-EIoU loss function. The EIoU loss function extends the traditional IoU loss function. It not only considers the overlapping area ratio between the predicted box and the true box, but also introduces the Euclidean distance between the center points of the predicted box and the true box, as well as the difference in width and height. Based on EIoU, Focaler-EIoU focuses on the quality of bounding box prediction through a linear interval mapping method. By setting two thresholds d and u, Focaler-EIoU adjusts the IoU value and focuses on samples with medium prediction quality, that is, IoU between d and u. The Inner-Focaler-EIoU loss function further introduces a scale factor ratio control based on Focaler-EIoU to generate auxiliary bounding boxes of different scales for calculating IoU. This method generates inner and outer bounding boxes by adjusting the size of the bounding box (through the ratio factor) and calculates the IoU of these auxiliary bounding boxes. Inner-Focaler-EIoU can not only improve the prediction accuracy, but also improve the generalization ability of the model under various scales and position changes by focusing on samples of different qualities and dynamically adjusting the size of the bounding box. BRIEF DESCRIPTION OF THE DRAWINGS
[0089] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0090] Figure 1 A schematic diagram of a method flow of an embodiment of the present invention;
[0091] Figure 2 Schematic diagram of a transmission tower foreign body hazard identification model according to an embodiment of the present invention;
[0092] Figure 3 Schematic diagram of the structure of the IWConv module of an embodiment of the present invention;
[0093] Figure 4 Schematic diagram of the structure of the CB-SFE module according to an embodiment of the present invention;
[0094] Figure 5 is a schematic structural diagram of an SFE module according to an embodiment of the present invention;
[0095] Figure 6 FIG. 4 is a schematic diagram of the structure of a CFE module according to an embodiment of the present invention. DETAILED DESCRIPTION
[0096] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0097] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0098] It should be noted that Conv, BN, SiLU, SPPF, Upsample, Concat, Head, Split, ChannelShuffle, and DWConv mentioned in the full text are all existing.
[0099] like Figure 1 As shown, this embodiment provides a method for identifying hidden dangers of foreign objects in transmission towers based on deep learning, including:
[0100] Constructing the original data set of foreign objects on transmission towers and performing preprocessing to obtain the processed data set of foreign objects on transmission towers;
[0101] Constructing a transmission tower foreign body hazard identification model based on deep learning, training the transmission tower foreign body hazard identification model based on the processed transmission tower foreign body data set, and obtaining a trained transmission tower foreign body hazard identification model;
[0102] Based on the trained transmission tower foreign body hazard identification model, foreign bodies in the transmission tower are identified to obtain an identification result.
[0103] Further, Step 1: Construct a raw data set of foreign objects on transmission towers, or use an existing public raw data set of foreign objects on transmission towers. Photograph the foreign objects on transmission towers or use an existing public data set to collect image data. The collected image data is manually annotated. The horizontal and vertical coordinates of the upper left corner and the lower right corner of the box are determined using an annotation tool to select the foreign object position and label it.
[0104] The more types of foreign objects a dataset contains, the more foreign objects can be identified. According to the original dataset of foreign objects on transmission towers, there are 1,500 images, of which 628 contain honeycomb foreign objects, 317 contain kite foreign objects, 290 contain balloon foreign objects, and 265 contain plastic sheet foreign objects. The labels here can be divided into four categories: honeycomb, kite, balloon, and plastic sheet. Use the LabelImg tool to label and export the xml label file, which contains the label name and label box information of the target foreign object.
[0105] Furthermore, Step 2: pre-process the original data set of foreign objects on the transmission tower to obtain a processed data set of foreign objects on the transmission tower, and divide the data set of foreign objects on the transmission tower to facilitate the subsequent training of the deep learning-based foreign object hazard identification model for the transmission tower.
[0106] The present invention first crops the original data set of foreign objects on transmission towers to the same size. Since the original data set of foreign objects on transmission towers is small, in order to ensure that the data set has sufficient samples for training, verification and testing, and to enhance the robustness of the transmission tower foreign object hazard identification model and reduce the model's sensitivity to images, data enhancement is then performed to better train the deep learning model, and the data-enhanced transmission tower foreign object data set is obtained, which is divided into training set, verification set and test set in a ratio of 8:1:1.
[0107] The original data set of foreign bodies on transmission towers contains 1500 images, which are first cropped to the same size of 512×512 pixels. The original data set is expanded by adding random pixels, Gaussian noise, salt and pepper noise, enhancing edges, flipping, etc., which can be implemented in Python. Random pixels can be added using the cv2.randu() function, Gaussian noise can be added using the GaussianBlur() method in the ImageFilter library in PIL, salt and pepper noise can be added using the cv2.randSalt() function, edge enhancement can be added using the cv2.Canny() function, and flipping can be added using the cv2.flip() function. 9000 images are obtained and divided into training set, validation set, and test set in a ratio of 8:1:1, with 7200 images for training set, 900 images for validation set, and 900 images for test set.
[0108] Further, Step 3: Construct a transmission tower foreign body hazard identification model based on deep learning, input the transmission tower foreign body data into the transmission tower foreign body hazard identification model, and the transmission tower foreign body hazard identification model is used to identify foreign objects on the transmission tower. Figure 2 shown.
[0109] Transmission tower foreign body image The input to the transmission tower foreign body hazard identification model first passes through the Conv_BN_SiLU module with a convolution kernel size of 3×3 and a step size of 2. The Conv_BN_SiLU module is composed of a Conv layer with a convolution kernel size of 3×3 and a step size of 2, a BN layer, and a SiLU layer in series to obtain the transmission tower foreign body feature map. ;Will Input the convolution kernel size of 3×3 and the step size of 2 into the IWConv (Intelligent Weight Convolution) module to obtain the transmission tower foreign body feature map ;Will Input into the CB-SFE (Channel-Based Spatial Feature Enhancement) module to obtain the transmission tower foreign body feature map ; Then stack the IWConv module and CB-SFE module three times in sequence to obtain the transmission tower foreign body feature map , , , , , ;Will Input into the SPPF module to obtain the characteristic map of foreign matter on the transmission tower ;right Upsampling is performed to obtain the characteristic map of foreign matter on the transmission tower ; Transmission tower foreign body feature map and Perform Concat operation to obtain the characteristic map of foreign matter on the transmission tower ;Will Input into the CB-SFE module to obtain the characteristic map of foreign matter on the transmission tower ;right Upsampling is performed to obtain the characteristic map of foreign matter on the transmission tower ;Will and Perform Concat operation to obtain the characteristic map of foreign matter on the transmission tower ;Will Input into the CB-SFE module to obtain the characteristic map of foreign matter on the transmission tower ;Will Input the convolution kernel size of 3×3 and the step size of 2 into the IWConv module to obtain the transmission tower foreign body feature map ;Will and Perform Concat operation to obtain the characteristic map of foreign matter on the transmission tower ;Will Input into the CB-SFE module to obtain the characteristic map of foreign matter on the transmission tower ;Will Input the convolution kernel size of 3×3 and the step size of 2 into the IWConv module to obtain the transmission tower foreign body feature map ;Will and Perform Concat operation to obtain the characteristic map of foreign matter on the transmission tower ;Will Input into the CB-SFE module to obtain the characteristic map of foreign matter on the transmission tower ;Will , , They are input into the target prediction head respectively, and the output is a tensor containing the prediction information. Each row corresponds to a prediction, including the bounding box coordinates, category label and confidence score.
[0110] Specifically, the feature map size is set to H×W×C, where H is the height of the feature map, W is the width of the feature map, and C is the number of channels of the feature map. The (size is 512×512×3) input is used in the transmission tower foreign body hazard recognition model. It first passes through the Conv_BN_SiLU module with a convolution kernel size of 3×3 and a step size of 2 (i.e., the Conv layer, BN layer, and SiLU layer with a convolution kernel size of 3×3 and a step size of 2 are connected in series), and the transmission tower foreign body feature map with a channel number of 64 is obtained. , the size is 256×256×64; the transmission tower foreign body feature map Input into the IWConv module (convolution kernel size is 3×3, step size is 2), and obtain the transmission tower foreign body feature map with 128 channels , the size is 128×128×128; the transmission tower foreign body feature map Input into the CB-SFE module to obtain the transmission tower foreign body feature map with 256 channels , the size is 128×128×256; then stack the IWConv module and CB-SFE module three times in sequence, and the transmission tower foreign body feature map with a size of 64×64×512 can be obtained respectively , Transmission tower foreign body feature map with a size of 64×64×512 , Foreign body feature map of transmission tower with size of 32×32×512 , Foreign body feature map of transmission tower with size of 32×32×512 , Transmission tower foreign body feature map with size of 16×16×512 , Transmission tower foreign body feature map with size of 16×16×512 ; Transmission tower foreign body feature map Input into the SPPF module to obtain a transmission tower foreign body feature map of size 16×16×512 ; Characteristic diagram of foreign matter on transmission tower Upsampling is performed to obtain a transmission tower foreign body feature map of size 32×32×512 ; Transmission tower foreign body feature map And the characteristic diagram of foreign objects on transmission towers Perform the Concat operation to obtain a transmission tower foreign body feature map of size 32×32×1024. ; Transmission tower foreign body feature map Input into the CB-SFE module to obtain a transmission tower foreign body feature map of size 32×32×512 ; Characteristic diagram of foreign matter on transmission tower Upsampling is performed to obtain a transmission tower foreign body feature map of size 64×64×512 ; Transmission tower foreign body feature map And the characteristic diagram of foreign objects on transmission towers Perform the Concat operation to obtain a transmission tower foreign body feature map of size 64×64×1024. ; Transmission tower foreign body feature map Input into the CB-SFE module to obtain a 64×64×256 transmission tower foreign body feature map ; Transmission tower foreign body feature map The input convolution kernel size is 3×3 and the step size is 2 in the IWConv module, and the foreign body feature map of the transmission tower with a size of 32×32×256 is obtained. ; Transmission tower foreign body feature map And the characteristic diagram of foreign objects on transmission towers Perform the Concat operation to obtain a transmission tower foreign body feature map of size 32×32×768 ; Transmission tower foreign body feature map Input into the CB-SFE module to obtain a transmission tower foreign body feature map of size 32×32×512 ; Transmission tower foreign body feature map The input convolution kernel size is 3×3 and the step size is 2 in the IWConv module, and the foreign body feature map of the transmission tower with a size of 16×16×512 is obtained. ; Transmission tower foreign body feature map And the characteristic diagram of foreign objects on transmission towers Perform the Concat operation to obtain a transmission tower foreign body feature map of size 16×16×1024. ; Transmission tower foreign body feature map Input into the CB-SFE module to obtain a transmission tower foreign body feature map of size 16×16×512 ; Transmission tower foreign body feature map , , They are input into the target prediction head respectively, and the output is a tensor containing the prediction information. Each row corresponds to a prediction, including the bounding box coordinates, category label and confidence score.
[0111] Furthermore, Step 3.1: Transmission tower foreign body image The input to the transmission tower foreign body hazard identification model first passes through the Conv_BN_SiLU module with a convolution kernel size of 3×3 and a step size of 2 to obtain the transmission tower foreign body feature map .
[0112] The Conv_BN_SiLU module of this embodiment consists of three parts: a convolutional layer (Conv), a batch normalization layer (BatchNormalization, referred to as BN), and an activation function (SiLU, i.e. SigmoidLinearUnit).
[0113] Furthermore, Step 3.2: Input the convolution kernel size of 3×3 and the step size of 2 into the IWConv module to obtain the transmission tower foreign body feature map .
[0114] The IWConv module designed in this embodiment uses a dynamic weight mechanism to automatically generate weight coefficients based on the input feature map to achieve real-time adjustment of the convolution kernel weights, so that the network can optimize its feature extraction method according to the characteristics of the input feature map. The weight of each convolution kernel is adjusted individually, which enhances the performance of the transmission tower foreign body hazard identification model when dealing with irregular or complex foreign body features, such as honeycombs, kites, etc. By fine-tuning the computing resources used, the accuracy of the transmission tower foreign body hazard identification model is improved under low FLOPs conditions, and the irregular features such as foreign bodies are better extracted.
[0115] like Figure 3 As shown, given the input transmission tower foreign body characteristic diagram ,have The convolution result of one convolution kernel is determined by the convolution results of M convolution kernels. Global average pooling is applied to fuse the information into the vector, and then a two-layer MLP module with Softmax activation is used to automatically generate coefficients, that is,
[0116]
[0117] available:
[0118]
[0119] Among them, Pool is a pooling operation. is the convolution operation, represents the i-th convolution weight tensor, is the corresponding dynamic coefficient, is the overall convolution weight of the module, It is the transmission tower foreign body feature map output after convolution. C is the number of channels of the feature map, H is the height of the feature map, and W is the width of the feature map.
[0120] Then the transmission tower foreign body feature map output after convolution is Input the BN layer, then input the SiLU layer, and obtain the final output transmission tower foreign body feature map Y.
[0121] Furthermore, if Figure 4 As shown, Step 3.3: Input into the CB-SFE module to obtain the characteristic map of foreign matter on the transmission tower .
[0122] The CB-SFE module designed in this embodiment is used for feature extraction and feature fusion. Each CB-SFE module in the transmission tower foreign body hazard identification model uses different numbers of SSFE modules of stacked SFE to realize the feature extraction of the transmission tower foreign body hazard identification model at different stages. Since the foreign objects on the transmission tower are large and small, the CB-SFE module improves the detection capability of the transmission tower foreign body hazard identification model for objects of various sizes by fusing features of different scales, especially enhancing the detection capability of small targets.
[0123] The CFE (Cluster Feature Enhancement) module is used to compress the input features first, reduce the feature dimension, and maintain key information to prepare for subsequent deeper processing. Then, through the stacking of a series of SSFE modules, the feature map is gradually segmented and enhanced. Each layer focuses on extracting more refined spatial features, which helps to capture complex foreign body features. Then, the Concat operation is performed to integrate the feature maps after multi-layer processing, and the channel information is reorganized through the channel shuffle operation (ChannelShuffle), which enhances the model's learning of the dependencies between channels and improves the efficiency of feature utilization. The feature map after ChannelShuffle is reprocessed through the CFE module to further refine the features and improve the recognition accuracy and robustness of the transmission tower hidden danger identification model.
[0124] First, the foreign body feature map of the transmission tower with channel number C is Input into the CFE module, the transmission tower foreign body characteristic diagram This is the characteristic diagram of foreign matter on the transmission tower , compress and enhance the channel information of the feature map, and obtain the transmission tower foreign body feature map with the number of channels C / 2 ; Then stack four SSFE modules to map the foreign body feature map of the transmission tower Input the first SSFE (Stacked Spatial Feature Enhancement) module, and the output results of the first three SSFE modules are respectively input into the next SSFE module. The transmission tower foreign body feature maps output by the four SSFE modules are recorded as , , , The feature map has different levels of feature information, and the number of channels is C / 8. , , , , Perform the Concat operation to obtain the transmission tower foreign body feature map with channel number C. Next, the foreign body feature map of the transmission tower is ChannelShuffle operation is performed to promote the interaction and fusion of information between different channels, which enhances the adaptability and generalization ability of the model when processing diversified inputs, and obtains the characteristic map of foreign objects on the transmission tower with the number of channels C. , and then input it into the CFE module to obtain the transmission tower foreign body characteristic map This is the characteristic diagram of foreign matter on the transmission tower .
[0125] In traditional convolutional neural networks, the channels of feature maps are often independent of each other, which means that the information processed by each channel is isolated, which may limit the interaction and integration of information. The core idea of ChannelShuffle is to rearrange these feature channels so that channels in different groups can share information, thereby enhancing the interaction and dependency between features. First, the input feature map is divided into several groups, usually evenly distributed according to the number of channels. After grouping, the channels in each group will be reordered according to certain rules, and the shuffled channels will be recombined into a new feature map.
[0126] To further optimize the solution, the working principle of the SSFE module in the CB-SFE module is as follows:
[0127] That is, n SFE (Spatial Feature Enhancement) modules are stacked and output and input in order. The number of SFE modules stacked by SSFE modules in the same CB-SFE module is equal. The number of SFE modules stacked by SSFE modules in different CB-SFE modules can be different.
[0128] like Figure 5 As shown, the working principle of the SFE module in the SSFE module is as follows:
[0129] First, through the Split operation, the SFE module divides the channel of the input transmission tower foreign body feature map into two parts, so that subsequent processing can be performed on different feature subsets, which helps the transmission tower foreign body hazard identification model capture more diverse features. One part of the channel is processed by the CFE module for deep features, and then fused with the other part of the original channel. This combination helps to maintain the original features while introducing new feature information, enhancing the model's ability to identify complex foreign objects. Then, through ChannelShuffle, the SFE module recombines the features of different channels, increasing the interaction of information between channels, which helps to improve the network's representation capabilities and prevent the model from over-relying on information from certain specific channels.
[0130] The transmission tower foreign body characteristic diagram with channel number C Perform Split operation to obtain the transmission tower foreign body feature map with the number of channels being C / 2 , , that is, the transmission tower foreign body feature map The first half channel and the second half channel are divided into two transmission tower foreign body characteristic diagrams. Input into the CFE module to obtain the characteristic map of foreign matter on the transmission tower , and then the transmission tower foreign body feature map , Perform Concat operation to obtain the characteristic map of foreign matter on the transmission tower , which retains The original feature information in The advanced features in the module ensure that the information of the feature map will not be lost after the module is processed, and at the same time enhance the diversity and complexity of the features. Then the ChannelShuffle operation is performed to obtain the feature map of foreign objects on the transmission tower. , which is the final output feature map of the module. A feature map with multiple channels is split into multiple feature maps by channel through the Split operation.
[0131] like Figure 6 As shown, the working principle of the CFE module in the CB-SFE module is as follows:
[0132] By using different sizes of depthwise separable convolution (DWConv), this module can capture spatial features of different scales while keeping the number of parameters low, which is crucial for detecting foreign objects of different sizes and shapes. By adding the original feature map with the feature map after different convolution operations, this module strengthens the nonlinear expression of features and the integration of multi-scale information, which helps to improve the accuracy of foreign object detection.
[0133] The transmission tower foreign body characteristic diagram with channel number C Two different sizes of convolution kernels are input into the depthwise separable convolution layer (DWConv) with sizes of 5×5 and 3×3 respectively, and the Conv layer with a convolution kernel size of 1×1. Using convolution kernels of different sizes can capture features of different scales. The 5×5 convolution kernel can extract a wider range of spatial information, while the 3×3 convolution kernel focuses more on capturing details in the medium range. , , , and then the transmission tower foreign body feature map , , , Perform the Add operation to obtain the foreign body feature map of the transmission tower , the original features are integrated with the deeply extracted features, thus enhancing the expressiveness of the transmission tower foreign body feature map. Input SiLU activation layer to get the transmission tower foreign body feature map , and then Input the convolution kernel size of 1×1 into the Conv layer to obtain a richer and more refined feature map of foreign objects on the transmission tower. , which is the final output feature map of this module.
[0134] Step 3.4: Stack the IWConv module and CB-SFE module three times in sequence to obtain the transmission tower foreign body feature map. , , , , , ;Will Input into the SPPF module to obtain the characteristic map of foreign matter on the transmission tower ;right Upsampling is performed to obtain the characteristic map of foreign matter on the transmission tower ; Transmission tower foreign body feature map and Perform Concat operation to obtain the characteristic map of foreign matter on the transmission tower ;Will Input into the CB-SFE module to obtain the characteristic map of foreign matter on the transmission tower ;right Upsampling is performed to obtain the characteristic map of foreign matter on the transmission tower ;Will and Perform Concat operation to obtain the characteristic map of foreign matter on the transmission tower ;Will Input into the CB-SFE module to obtain the characteristic map of foreign matter on the transmission tower ;Will Input the convolution kernel size of 3×3 and the step size of 2 into the IWConv module to obtain the transmission tower foreign body feature map ;Will and Perform Concat operation to obtain the characteristic map of foreign matter on the transmission tower ;Will Input into the CB-SFE module to obtain the characteristic map of foreign matter on the transmission tower ;Will Input the convolution kernel size of 3×3 and the step size of 2 into the IWConv module to obtain the transmission tower foreign body feature map ;Will and Perform Concat operation to obtain the characteristic map of foreign matter on the transmission tower ;Will Input into the CB-SFE module to obtain the characteristic map of foreign matter on the transmission tower ;
[0135] Step 3.5: , , They are input into the target prediction head respectively, and the output is a tensor containing the prediction information. Each row corresponds to a prediction, including the bounding box coordinates, category label and confidence score.
[0136] The head is responsible for predicting the class, position, and confidence of the object directly from the feature map. The position includes the coordinates of the bounding box. The output of the detection head is a three-dimensional tensor, where each row contains the class probability, bounding box coordinates, and confidence of the object's existence for each predicted box at each spatial position relative to the feature map.
[0137] (1) Bounding box prediction: Each cell is responsible for predicting the coordinates and confidence of several bounding boxes. The coordinates of the bounding box include: the center point relative to the position of the feature map cell , the width and height are scaled relative to the width and height of the entire image , these coordinates will pass through a sigmoid function to ensure that the output value is between 0 and 1, which can make training more stable.
[0138] (2) Category and confidence prediction: In addition to coordinate predictions, each bounding box also has a confidence prediction, which is used to indicate the probability that an object of a specific category exists within the box.
[0139] During the training process, the transmission tower foreign object hazard recognition model uses the Inner-Focaler-EIoU loss function to simultaneously optimize the position, size, confidence, and accuracy of category prediction of the bounding box. This loss function helps the transmission tower foreign object hazard recognition model to make trade-offs in multiple aspects to achieve the best overall performance.
[0140] The present invention designs an Inner-Focaler-EIoU loss function for training a transmission tower foreign object hazard identification model to accurately calculate the difference between the predicted frame and the true frame.
[0141] The EIoU loss function extends the traditional IoU loss function. It not only considers the overlap area ratio between the predicted box and the true box, but also introduces the Euclidean distance between the center points of the predicted box and the true box, as well as the difference in width and height. Based on EIoU, Focaler-EIoU focuses on the quality of bounding box prediction through a linear interval mapping method. By setting two thresholds and , Focaler-EIoU adjusts the IoU value and focuses on samples with medium prediction quality (i.e., IoU in and The Inner-Focaler-EIoU loss function further introduces a scale factor ratio control to generate auxiliary bounding boxes of different scales for calculating IoU based on Focaler-EIoU. This method adjusts the size of the bounding box by the ratio factor, generates internal and external bounding boxes, and calculates the IoU of these auxiliary bounding boxes. Inner-Focaler-EIoU can not only improve the accuracy of prediction, but also improve the generalization ability of the model under various scales and position changes by focusing on samples of different qualities and dynamically adjusting the size of the bounding box.
[0142] The loss function is defined as follows:
[0143]
[0144] in, It represents the intersection-over-union ratio of the predicted box and the true box, that is, , and Represent the predicted box and the true box respectively; and Represent the center points of the predicted box and the true box respectively; Represents the Euclidean distance between two points; and Represent the width and height of the smallest bounding box composed of the predicted box and the true box respectively; represents the diagonal of the minimum bounding box; and Represent the width and height of the real box respectively; and Represent the width and height of the prediction box respectively.
[0145] exist Based on this, we focus on different regression samples through linear interval mapping and obtain Loss function.
[0146] The loss function is defined as follows:
[0147]
[0148] Among them, the linear interval mapping method is used to reconstruct loss, allowing to improve the marginal regression, obtaining .
[0149]
[0150] set up and Two thresholds, By adjusting and The value of Focus on different regression samples. Less than a lower threshold hour, is 0; when Greater than an upper threshold hour, is 1; and when In and In between, is a basis A function whose value increases linearly.
[0151] exist Based on , the scale factor ratio control is used to generate auxiliary bounding boxes of different scales to calculate the loss, and we get Loss function.
[0152] The loss function is defined as follows:
[0153]
[0154] in, The calculation is as follows:
[0155]
[0156]
[0157]
[0158]
[0159]
[0160]
[0161]
[0162] The center points of the ground truth box and the inner ground truth box are given by express; Indicates the center point of the anchor and internal anchors; and Represent the width and height of the real box respectively; and Represent the width and height of the anchor box respectively; is the scaling factor, usually in the range Inside.
[0163] Step 4: Based on the transmission tower foreign object data set, the transmission tower foreign object hidden danger identification model is trained to obtain the trained transmission tower foreign object hidden danger identification model.
[0164] Train and update the parameters of each layer on the transmission tower foreign body hazard identification model. First, initialize all neural network parameters and set the hyperparameters related to the transmission tower foreign body hazard identification model, such as: training rounds, batch size, optimizer selection, learning rate, etc.
[0165] After initializing the parameters, the training set and validation set data are divided into multiple batches. Each time, a batch of training set data is input into the transmission tower foreign body hazard identification model for training to obtain the training loss value loss of the batch. After a round of training for all batches of data in the entire training set, the validation set is input into the transmission tower foreign body hazard identification model in batches to obtain the corresponding batch loss value batch_loss. The loss value of the validation set is mainly used to monitor whether the transmission tower foreign body hazard identification model is overfitting and to adjust the training strategy, such as terminating the training early or adjusting the learning rate. During training and verification, the transmission tower foreign body hazard identification model will automatically learn and adjust parameters according to each loss and batch_loss situation. When the training process has been carried out for one or more rounds until the batch_loss value converges, the training of the transmission tower foreign body hazard identification model is completed.
[0166] The epoch (training round) is uniformly set to 150, the batch (batch size) is 8, and the image size is 512×512. The stochastic gradient descent (SGD) optimizer is used, the initial learning rate is 0.01, and the weight decay is 0.0005. If the validation set loss does not improve for 5 consecutive rounds, the learning rate is halved. When the validation set loss no longer decreases for several consecutive rounds, the model is considered to have basically converged and the training is terminated.
[0167] Step 5: After the transmission tower foreign body hazard identification model is trained, the transmission tower foreign body hazard identification model is used to identify foreign objects in the current transmission tower.
[0168] (1) Based on deep learning technology, this paper proposes a method for processing transmission tower foreign body images with complex and irregular features. The IWConv module automatically generates weight coefficients based on the input feature map through a dynamic weight mechanism to achieve real-time adjustment of the convolution kernel weights, so that the network can optimize its feature extraction method according to the characteristics of the input feature map. The weight of each convolution kernel is adjusted individually, which enhances the model's expressiveness when processing irregular or complex foreign body features.
[0169] (2) The present invention proposes a method for efficiently processing complex transmission tower foreign object feature maps. Since the foreign objects on the transmission towers vary in size, the CB-SFE module enhances the detection capability of the transmission tower foreign object hazard identification model for objects of various sizes by fusing features of different scales, especially enhancing the detection capability of small targets.
[0170] (3) The present invention proposes an Inner-Focaler-EIoU loss function. The EIoU loss function extends the traditional IoU loss function. It not only considers the overlapping area ratio between the predicted box and the true box, but also introduces the Euclidean distance between the center points of the predicted box and the true box, as well as the difference in width and height. Based on EIoU, Focaler-EIoU focuses on the quality of bounding box prediction through a linear interval mapping method. By setting two thresholds d and u, Focaler-EIoU adjusts the IoU value and focuses on samples with medium prediction quality, that is, IoU between d and u. The Inner-Focaler-EIoU loss function further introduces a scale factor ratio control based on Focaler-EIoU to generate auxiliary bounding boxes of different scales for calculating IoU. This method generates inner and outer bounding boxes by adjusting the size of the bounding box (through the ratio factor) and calculates the IoU of these auxiliary bounding boxes. Inner-Focaler-EIoU can not only improve the prediction accuracy, but also improve the generalization ability of the model under various scales and position changes by focusing on samples of different qualities and dynamically adjusting the size of the bounding box.
[0171] (4) The method for identifying hidden dangers of foreign objects on transmission towers proposed in the present invention can automatically identify and classify foreign objects attached to transmission towers, such as honeycombs, kites, balloons and plastic sheets.
[0172] The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for identifying hidden dangers of foreign objects in transmission towers based on deep learning, characterized in that: include: Constructing the original data set of foreign objects on transmission towers and performing preprocessing to obtain the processed data set of foreign objects on transmission towers; Constructing a transmission tower foreign body hazard identification model based on deep learning, training the transmission tower foreign body hazard identification model based on the processed transmission tower foreign body data set, and obtaining a trained transmission tower foreign body hazard identification model; Based on the trained transmission tower foreign body hazard identification model, foreign bodies in the transmission tower are identified to obtain an identification result; The process of identifying foreign objects in the transmission tower based on the trained transmission tower foreign object hazard identification model includes: Transmission tower foreign body image The input to the transmission tower foreign body hazard identification model first passes through the Conv_BN_SiLU module with a convolution kernel size of 3×3 and a step size of 2 to obtain the transmission tower foreign body feature map ; The transmission tower foreign body characteristic map Input the convolution kernel size of 3×3 and the step size of 2 into the IWConv module to obtain the transmission tower foreign body feature map ; The transmission tower foreign body characteristic map Input into the CB-SFE module to obtain the characteristic map of foreign matter on the transmission tower ; Then stack the IWConv module and CB-SFE module three times in sequence to obtain the transmission tower foreign body feature map , Characteristics of foreign matter on transmission towers , Characteristics of foreign matter on transmission towers , Characteristics of foreign matter on transmission towers , Characteristics of foreign matter on transmission towers , Characteristics of foreign matter on transmission towers ; The transmission tower foreign body characteristic map Input into the SPPF module to obtain the characteristic map of foreign matter on the transmission tower ; The transmission tower foreign body characteristic diagram Upsampling is performed to obtain the characteristic map of foreign matter on the transmission tower ; The transmission tower foreign body characteristic map And the characteristic diagram of foreign matter on the transmission tower Perform Concat operation to obtain the characteristic map of foreign matter on the transmission tower ; The transmission tower foreign body characteristic map Input into the CB-SFE module to obtain the characteristic map of foreign matter on the transmission tower ; The characteristic diagram of foreign matter on the transmission tower Upsampling is performed to obtain the characteristic map of foreign matter on the transmission tower ; The transmission tower foreign body characteristic map And the characteristic diagram of foreign matter on the transmission tower Perform Concat operation to obtain the characteristic map of foreign matter on the transmission tower ; The transmission tower foreign body characteristic map Input into the CB-SFE module to obtain the characteristic map of foreign matter on the transmission tower ; The transmission tower foreign body characteristic map Input the convolution kernel size of 3×3 and the step size of 2 into the IWConv module to obtain the transmission tower foreign body feature map ; The transmission tower foreign body characteristic map And the characteristic diagram of foreign matter on the transmission tower Perform Concat operation to obtain the characteristic map of foreign matter on the transmission tower ; The transmission tower foreign body characteristic map Input into the CB-SFE module to obtain the characteristic map of foreign matter on the transmission tower ; The transmission tower foreign body characteristic map Input the convolution kernel size of 3×3 and the step size of 2 into the IWConv module to obtain the transmission tower foreign body feature map ; The transmission tower foreign body characteristic map And the characteristic diagram of foreign matter on the transmission tower Perform Concat operation to obtain the characteristic map of foreign matter on the transmission tower ; The transmission tower foreign body characteristic map Input into the CB-SFE module to obtain the characteristic map of foreign matter on the transmission tower ; The transmission tower foreign body characteristic map , the characteristic diagram of foreign matter on the transmission tower , the characteristic diagram of foreign matter on the transmission tower Input the target prediction head respectively, and output a tensor containing the prediction information. Each row corresponds to a prediction, including the bounding box coordinates, category label and confidence score. The Conv_BN_SiLU module includes a convolution layer, a batch normalization layer and an activation function; The IWConv module uses a dynamic weight mechanism to input the transmission tower foreign body feature map. The automatically generated weight coefficient adjusts the convolution kernel weight in real time, so that the transmission tower foreign body hazard recognition model optimizes the feature extraction method according to the characteristics of the input feature map; Given the input transmission tower foreign body characteristic diagram ,have The IWConv module with convolution kernels, the convolution result of one convolution kernel is determined by the convolution results of M convolution kernels, global average pooling is applied to fuse the information into the vector, and then a two-layer MLP module with Softmax activation is used to automatically generate coefficients; The foreign body feature map of the transmission tower output after convolution is Input the BN layer, then input the SiLU layer, and obtain the final output transmission tower foreign body feature map Y; The formula expression is: Among them, Pool is a pooling operation. Represents the input transmission tower foreign body feature map, is the convolution operation, represents the i-th convolution weight tensor, Transmission tower foreign body feature map showing the input The number of channels, is the corresponding dynamic coefficient, is the overall convolution weight of the module, This is the transmission tower foreign body feature map output after convolution, C is the number of channels of the feature map, H is the height of the feature map, and W is the width of the feature map.
2. The method for identifying hidden dangers of foreign objects in transmission towers based on deep learning according to claim 1 is characterized in that: The process of constructing the original data set of foreign objects on transmission towers and performing preprocessing includes: Collect image data of foreign objects on transmission towers by field photography, manually annotate the collected image data, use annotation tools to select the location of foreign objects and annotate them with labels, and then export an XML label file; the XML label file includes the label name and annotation frame information of the target foreign object; The manually annotated transmission tower foreign body image data are cropped to the same size, and then data enhancement is performed to obtain the data-enhanced transmission tower foreign body dataset, which is then divided into training set, validation set and test set in a ratio of 8:1:
1.
3. The method for identifying hidden dangers of foreign objects in transmission towers based on deep learning according to claim 1 is characterized in that: In the process of training the transmission tower foreign body hazard identification model based on the processed transmission tower foreign body dataset, the Inner-Focaler-EIoU loss function is used to simultaneously optimize the position, size, confidence and category prediction accuracy of the bounding box; The Inner-Focaler-EIoU loss function is Based on the loss function, different regression samples are focused by linear interval mapping to obtain Loss function; In the Based on the loss function, the scale factor ratio control is used to generate auxiliary bounding boxes of different scales to calculate the loss, and the Loss function; Said The loss function is defined as follows: in, The calculation is as follows: Among them, the center points of the real box and the inner real box are express; Indicates the center point of the anchor and internal anchors; and Represent the width and height of the real box respectively; and Represent the width and height of the anchor box respectively; is the scale factor; Said The loss function is defined as follows: Among them, the linear interval mapping method is used to reconstruct loss, allowing to improve the marginal regression, obtaining ; set up and Two thresholds, , by adjusting and The value of Focus on different regression samples; when Less than a lower threshold hour, is 0; when Greater than an upper threshold hour, is 1; and when In and In between, is a basis A function whose value increases linearly; The loss function is defined as follows: in, It represents the intersection-over-union ratio of the predicted box and the true box, that is, , and Represent the predicted box and the true box respectively; and Represent the center points of the predicted box and the true box respectively; Represents the Euclidean distance between two points; and Represent the width and height of the smallest bounding box composed of the predicted box and the true box respectively; represents the diagonal of the minimum bounding box; and Represent the width and height of the real box respectively; and Represent the width and height of the prediction box respectively.
4. The method for identifying hidden dangers of foreign objects in transmission towers based on deep learning according to claim 1 is characterized in that: The CB-SFE module is used for feature extraction and feature fusion; The feature extraction process includes: Each CB-SFE module in the transmission tower foreign body hazard identification model uses different numbers of SSFE modules with stacked SFEs to achieve feature extraction at different stages of the transmission tower foreign body hazard identification model; The feature fusion process includes: The CB-SFE module improves the detection capability of the transmission tower foreign body hazard identification model for foreign bodies of different sizes on the transmission tower by fusing features of different scales.
5. The method for identifying hidden dangers of foreign objects in transmission towers based on deep learning according to claim 1 is characterized in that: The transmission tower foreign body characteristic map Input into the CB-SFE module to obtain the characteristic map of foreign matter on the transmission tower The process includes: The transmission tower foreign body characteristic diagram with channel number C Input into the CFE module, compress and enhance the channel information of the transmission tower foreign body characteristic map, and obtain the transmission tower foreign body characteristic map with a channel number of C / 2 ; Stack four SSFE modules and transform the transmission tower foreign body feature diagram Input the first SSFE module, the output results of the first three SSFE modules are input to the next SSFE module respectively, and the transmission tower foreign body feature maps output by the four SSFE modules are recorded as follows: , , , ,The characteristic graph of foreign objects in the transmission tower has different levels of characteristic information, and the number of channels is C / 8; Transmission tower foreign body feature map , , , , Perform the Concat operation to obtain the transmission tower foreign body feature map with channel number C. ; The characteristic diagram of foreign matter on the transmission tower Perform ChannelShuffle operation to obtain the transmission tower foreign body feature map with channel number C , and then the transmission tower foreign body characteristic map Input into the CFE module to obtain the characteristic map of foreign matter on the transmission tower This is the characteristic diagram of foreign matter on the transmission tower .
6. The method for identifying hidden dangers of foreign objects in transmission towers based on deep learning according to claim 5 is characterized in that: The working process of the SSFE module in the CB-SFE module includes: Stack n SFE modules and perform output and input in sequence; The number of SFE modules stacked on the SSFE modules in the same CB-SFE module is equal; The number of SFE modules stacked in the SSFE modules in different CB-SFE modules may be unequal.
7. The method for identifying hidden dangers of foreign objects in transmission towers based on deep learning according to claim 6 is characterized in that: The working process of the SFE module in the SSFE module includes: The transmission tower foreign body characteristic diagram with channel number C Perform Split operation to obtain the transmission tower foreign body feature map with the number of channels being C / 2 , Characteristics of foreign matter on transmission towers ; The transmission tower foreign body characteristic map Input into the CFE module to obtain the characteristic map of foreign matter on the transmission tower ; Then the transmission tower foreign body characteristic map , the characteristic diagram of foreign matter on the transmission tower Perform Concat operation to obtain the characteristic map of foreign matter on the transmission tower ; The transmission tower foreign body characteristic map Perform ChannelShuffle operation to obtain the characteristic map of foreign objects on transmission towers , as the final output feature map of the SFE module.
8. The method for identifying hidden dangers of foreign objects in transmission towers based on deep learning according to claim 5 is characterized in that: The working process of the CFE module in the CB-SFE module includes: The transmission tower foreign body characteristic diagram with channel number C The convolution kernel size is 5×5, 3×3, and the convolution kernel size is 1×1. The corresponding feature map of foreign objects on the transmission tower is obtained. , Characteristics of foreign matter on transmission towers , Characteristics of foreign matter on transmission towers ; The transmission tower foreign body characteristic map , Characteristics of foreign matter on transmission towers , Characteristics of foreign matter on transmission towers , Characteristics of foreign matter on transmission towers Perform the Add operation to obtain the foreign body feature map of the transmission tower ; The original features are combined with the deep extracted features, and then the transmission tower foreign body feature map is constructed. Input SiLU activation layer to get the transmission tower foreign body feature map ; Then the transmission tower foreign body characteristic map Input the convolution kernel size of 1×1 into the Conv layer to obtain the foreign body feature map of the transmission tower. , as the final output feature map of the CFE module.
