Power transmission channel tree obstacle hidden danger detection model training method and detection method
By introducing a multi-dimensional convolution module and a channel space attention fusion module in the transmission channel tree barrier potential detection model, the problems of high computational complexity and poor generalization ability in the existing technology are solved, and tree barrier detection with higher accuracy and robustness are achieved.
Patent Information
- Application Number
- CN202510218525.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2045-02-26
AI Technical Summary
The prior art has problems with high computational complexity and poor generalization ability in the detection of tree barriers on transmission lines, especially in the complex context, it is difficult to accurately detect tree barrier areas.
A transmission channel tree barrier potential detection model is designed with a multi-dimensional convolution module containing a multi-dimensional convolution kernel and a channel space attention fusion module. The characteristics of different levels of the image are captured through the multi-dimensional convolution module, and the weighted operation of the channel space attention fusion module is enhanced to enhance the accuracy and robustness of feature extraction.
It improves the accuracy and efficiency of tree barrier potential hazard detection, can better adapt to detection in different complex scenarios, reduces sensitivity to background interference, and enhances the ability to identify tree barrier areas.
Smart Images

Figure CN120032182A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, computer equipment, computer-readable storage medium and computer program product for training a model for detecting tree obstacles in power transmission channels, and a method, device, computer equipment, computer-readable storage medium and computer program product for detecting tree obstacles in power transmission channels. Background Art
[0002] Transmission lines pass through complex terrains such as forests, farmlands and mountains. The excessive growth or lodging of surrounding vegetation (especially trees) can easily lead to contact or proximity with transmission lines, which may cause branches or trees to touch the transmission lines and cause short circuits, resulting in power outages and huge economic losses.
[0003] Traditional transmission line inspection methods mainly rely on manual inspection or helicopter inspection, which is inefficient, costly and has safety hazards. In recent years, the development of remote sensing technology has provided new means for monitoring transmission lines. At the same time, with the rise of machine learning methods, machine learning methods such as support support machines and random forest machines have been introduced into image classification and have achieved certain results. These methods artificially design features, however, when faced with high-resolution remote sensing images, they often have problems of high computational complexity and poor generalization ability.
[0004] Recently, the rise of deep learning, especially complex neural networks, has provided a new solution for remote sensing image analysis. However, although remote sensing technology and deep learning have great potential in the monitoring of tree obstacles on transmission lines, they still face some technical challenges. For example, remote sensing images often have complex backgrounds, such as mountains and buildings, which are easily confused with trees and affect the detection accuracy. Summary of the invention
[0005] Based on this, it is necessary to provide a transmission channel tree barrier hazard detection model training method, device, computer equipment, computer readable storage medium and computer program product that can improve the accuracy of tree barrier hazard detection, as well as a transmission channel tree barrier hazard detection method, device, computer equipment, computer readable storage medium and computer program product in response to the above-mentioned technical problems.
[0006] In a first aspect, the present application provides a method for training a tree barrier hazard detection model for a power transmission channel, comprising:
[0007] Acquire a historical transmission channel remote sensing image, where the historical transmission channel remote sensing image contains the category label and location information of the real frame of the tree barrier area;
[0008] Taking the historical transmission channel remote sensing image as input, calling the constructed initial transmission channel tree barrier hidden danger detection model, so that the initial transmission channel tree barrier hidden danger detection model respectively captures the features of different levels of the historical transmission channel remote sensing image through the convolution kernels of different dimensions in the multidimensional convolution module, generates a transmission channel tree barrier feature map based on the features of different levels, and inputs the transmission channel tree barrier feature map into the channel space attention fusion module. The channel space attention fusion module performs weighted operations on the attention of the transmission channel tree barrier feature map in the channel dimension and the spatial dimension to obtain a transmission channel tree barrier feature enhancement map. Based on the transmission channel tree barrier feature enhancement map and the features of different levels, the category, location information and confidence of the prediction box are determined. The prediction box is used to identify the tree barrier area in the historical transmission channel remote sensing image. The features of different levels include the global features and local features of the historical transmission channel remote sensing image. The initial transmission channel tree barrier hidden danger detection model includes a multidimensional convolution module and a channel space attention fusion module.
[0009] Determine the error between the predicted box and the true box based on the category label and location information of the true box, as well as the category, location information and confidence of the predicted box;
[0010] Based on the error, the parameters of the initial transmission channel tree barrier hazard detection model are iteratively updated until the preset training end condition is reached, thereby obtaining the trained transmission channel tree barrier hazard detection model.
[0011] In a second aspect, the present application also provides a method for detecting tree obstacle hazards in a power transmission channel, comprising:
[0012] Acquire remote sensing images of power transmission channels;
[0013] Taking the remote sensing image of the power transmission channel as input, calling the trained power transmission channel tree barrier hidden danger detection model to obtain the tree barrier hidden danger detection result, the power transmission channel tree barrier hidden danger detection model is trained based on the above-mentioned power transmission channel tree barrier hidden danger detection model training method;
[0014] An early warning is issued based on the tree obstacle hidden danger detection result.
[0015] In a third aspect, the present application also provides a transmission channel tree obstacle hidden danger detection model training device, comprising:
[0016] An image acquisition module is used to acquire a historical transmission channel remote sensing image, where the historical transmission channel remote sensing image contains the category label and location information of the real frame of the tree barrier area;
[0017] A model training module is used to take the historical transmission channel remote sensing image as input and call the constructed initial transmission channel tree barrier hidden danger detection model, so that the initial transmission channel tree barrier hidden danger detection model can respectively capture the features of different levels of the historical transmission channel remote sensing image through the convolution kernels of different dimensions in the multidimensional convolution module, generate a transmission channel tree barrier feature map based on the features of different levels, and input the transmission channel tree barrier feature map into the channel space attention fusion module. The channel space attention fusion module performs a weighted operation on the attention of the transmission channel tree barrier feature map in the channel dimension and the spatial dimension to obtain a transmission channel tree barrier feature enhancement map. Based on the transmission channel tree barrier feature enhancement map and the features of different levels, the category, location information and confidence of the prediction box are determined. The prediction box is used to identify the tree barrier area in the historical transmission channel remote sensing image. The features of different levels include the global features and local features of the historical transmission channel remote sensing image. The initial transmission channel tree barrier hidden danger detection model includes a multidimensional convolution module and a channel space attention fusion module.
[0018] An error determination module is used to determine the error between the predicted box and the true box based on the category label and location information of the true box, and the category, location information and confidence of the predicted box;
[0019] The parameter updating module is used to iteratively update the parameters of the initial power transmission channel tree obstacle hazard detection model based on the error until the preset training end condition is reached to obtain the trained power transmission channel tree obstacle hazard detection model.
[0020] In a fourth aspect, the present application further provides a device for detecting tree obstacle hazards in a power transmission channel, comprising:
[0021] A remote sensing image acquisition module, used to acquire remote sensing images of power transmission channels;
[0022] A tree barrier hidden danger detection module is used to use a transmission channel remote sensing image as input, call a trained transmission channel tree barrier hidden danger detection model, and obtain a tree barrier hidden danger detection result. The transmission channel tree barrier hidden danger detection model is trained based on the above-mentioned transmission channel tree barrier hidden danger detection model training method;
[0023] The early warning module is used to issue early warnings based on the tree obstacle hazard detection results.
[0024] In a fifth aspect, the present application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the steps in any one of the above-mentioned embodiments of the training method for detecting tree barrier hazards in a transmission channel, and the steps in an embodiment of a method for detecting tree barrier hazards in a transmission channel.
[0025] In a sixth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in any one of the above-mentioned embodiments of a model training method for detecting tree obstacles in a transmission channel, and the steps in an embodiment of a method for detecting tree obstacles in a transmission channel.
[0026] In the seventh aspect, the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps in any one of the above-mentioned transmission channel tree barrier hazard detection model training method embodiments and the steps in a transmission channel tree barrier hazard detection method embodiment.
[0027] The above-mentioned transmission channel tree barrier hazard detection model training method, device, computer equipment, computer readable storage medium and computer program product take into account the influence of the complex background in the transmission channel remote sensing image on the tree barrier hazard detection accuracy, and design a multidimensional convolution module containing a multidimensional convolution kernel to capture the features of the image at different levels. At the same time, considering that the tree barrier hazard area accounts for a small proportion in the remote sensing image, in order to make the model focus on the tree barrier features and ignore the background interference information such as the sky and buildings, a channel space attention fusion module is designed. Through the multidimensional convolution module and the channel space attention fusion module, an initial transmission channel tree barrier hazard detection model for detecting tree barrier hazards in the transmission channel is constructed. The historical transmission channel remote sensing image with the category label and location information of the real box containing the tree barrier area is used as input, and the initial transmission channel tree barrier hidden danger detection module is called. The global and local features of the historical transmission channel remote sensing image are captured through the multi-dimensional convolution of the multi-dimensional convolution module to obtain the transmission channel tree barrier feature map. The transmission channel tree barrier feature map is input into the channel space attention fusion module. By weighting the attention of the transmission channel tree barrier feature map in the spatial dimension and the channel dimension, the detail information is retained to the maximum extent, and the loss of the model during feature extraction is reduced to obtain the transmission channel tree barrier feature enhancement map. According to the transmission channel tree barrier feature enhancement map and the features of different levels, the category, location information and confidence of the predicted box are determined, so as to determine the error between the real box and the predicted box according to the category label and location information of the real box, and the category, location information and confidence of the predicted box. The model parameters are iteratively updated according to the error until the preset training end condition is reached, and the trained transmission channel tree barrier hidden danger detection model is obtained. The trained transmission channel tree barrier hazard detection model is conducive to improving the tree barrier detection accuracy in different geographical environments of transmission channels, as well as the model's adaptability to high-precision tree barrier detection in different complex scenarios.
[0028] The above-mentioned transmission channel tree barrier hazard detection method, device, computer equipment, computer scale storage medium and computer program product obtain remote sensing images of the transmission channel, input them into the trained transmission channel tree barrier hazard detection model obtained by the above-mentioned transmission channel tree barrier hazard detection model training method, obtain tree barrier hazard detection results, and issue early warnings based on the tree barrier hazard detection results. On the one hand, the accuracy and efficiency of tree barrier hazard detection are improved through model detection; on the other hand, early warning of the rapid and accurate detection results of tree barrier hazards based on the model is conducive to timely discovery of potential hazards of the power system, so as to take corresponding measures to reduce the possibility of accidents and improve the stability and safety of power system operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0030] Figure 1 A diagram showing an application environment of a method for training a model for detecting tree obstacles in a power transmission channel in one embodiment;
[0031] Figure 2 A schematic diagram of a flow chart of a method for training a tree obstacle hazard detection model for a power transmission channel in one embodiment;
[0032] Figure 3 It is a structural block diagram of a tree obstacle hidden danger detection model for a power transmission channel in one embodiment;
[0033] Figure 4 is a structural block diagram of a multi-dimensional convolution module in one embodiment;
[0034] Figure 5 A schematic diagram of a flow chart of a method for training a transmission channel tree obstacle hazard detection model in another embodiment;
[0035] Figure 6 is a structural block diagram of a channel space attention fusion module in one embodiment;
[0036] Figure 7 It is a flowchart of a method for training a model for detecting tree obstacles in power transmission channels in another embodiment;
[0037] Figure 8 It is a schematic diagram of the flow of a method for detecting tree obstacle hazards in a power transmission channel in one embodiment;
[0038] Fig. 9It is a structural block diagram of a power transmission channel tree obstacle hidden danger detection model training device in one embodiment;
[0039] Fig.10 It is a structural block diagram of a device for detecting tree obstacles in a power transmission channel in one embodiment;
[0040] Fig.11 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0042] The transmission channel tree obstacle hidden danger detection model training method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers.
[0043] Specifically, the operator may upload the collected historical transmission channel remote sensing images to the server 104 through the terminal 102, and then send the model training message to the server 104 through the terminal 102, and the server 104 obtains the historical transmission channel remote sensing image data. Secondly, the historical transmission channel remote sensing image is used as input to call the constructed initial transmission channel tree barrier hidden danger detection model, so that the initial transmission channel tree barrier hidden danger detection model can capture the features of different levels of the historical transmission channel remote sensing image through the convolution kernels of different dimensions in the multidimensional convolution module, generate a transmission channel tree barrier feature map based on the features of different levels, and input the transmission channel tree barrier feature map into the channel space attention fusion module, which pays attention to the transmission channel tree barrier feature map in the channel dimension and the spatial dimension. A weighted operation is performed to obtain a tree barrier feature enhancement map of the transmission channel. Based on the tree barrier feature enhancement map of the transmission channel and features at different levels, the category, location information and confidence of the prediction box are determined. The prediction box is used to identify the tree barrier area in the historical transmission channel remote sensing image. The features at different levels include global features and local features of the historical transmission channel remote sensing images. The initial transmission channel tree barrier hidden danger detection model includes a multidimensional convolution module and a channel space attention fusion module. Then, based on the category label and location information of the true box, as well as the category, location information and confidence of the prediction box, the error between the prediction box and the true box is determined. Finally, based on the error, the parameters of the initial transmission channel tree barrier hidden danger detection model are iteratively updated until the preset training end condition is reached, and the trained transmission channel tree barrier hidden danger detection model is obtained.
[0044] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart TVs, smart car devices, projection devices, etc. The portable wearable devices may be smart watches, smart bracelets, etc. The server 104 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.
[0045] In an exemplary embodiment, Figure 2 As shown in the figure, a method for training a tree barrier hazard detection model for a power transmission channel is provided. Figure 1 The server 104 in the example is used for explanation, and includes the following S100 to S400. Among them:
[0046] S100, obtaining a historical transmission channel remote sensing image, where the historical transmission channel remote sensing image includes a category label and location information of a real frame of a tree barrier area.
[0047] The historical transmission channel remote sensing image can be an image obtained by collecting images of the transmission channel during a historical period of time. The tree barrier of the transmission channel refers to the situation where the transmission line corridor or the surrounding area is exposed to, blocked by trees (such as trees growing too high or too dense), affecting the power transmission equipment. The tree barrier area in the image can be a vegetation-covered area that may pose a threat to power lines and equipment.
[0048] The category label of the real box may include the tree obstacle area and the background area. The position information may include the upper left corner coordinates and the lower right corner coordinates of the real box.
[0049] In practical applications, transmission channels can be imaged through UAV remote sensing and satellite remote sensing. UAVs can fly at low altitudes and obtain high-resolution image data, which is suitable for monitoring local key areas; while satellite remote sensing has a wide coverage area and is suitable for monitoring transmission channels over a large area. Acquiring historical transmission channel remote sensing images can be to obtain multiple historical transmission channel remote sensing images including tree barrier areas collected by UAV remote sensing and satellite remote sensing in a historical time period.
[0050] After obtaining the remote sensing images of the historical transmission channels, the sizes of these remote sensing images can be standardized for the convenience of model processing. Specifically, the remote sensing images of the historical transmission channels are cropped and resized to make the image sizes uniform, such as 512×512 pixels. During the cropping process, key areas in the image are retained to reduce the possibility of losing information about transmission lines and tree barriers. Data annotation of the remote sensing images of the historical transmission channels can be performed by manually annotating the collected remote sensing images of the historical transmission channels through image data set annotation tools. During the annotation process, the location of the tree barriers is marked, and the tree barrier area is marked with a rectangular frame, such as marking branches or leaves close to or touching power lines, trees that may threaten the transmission channels due to generation trends, trees that are at risk of collapse due to disease or aging, trees above a certain height, and trees located near key transmission equipment. The area is the tree barrier area, and the coordinates of the upper left corner of the rectangular frame are marked when selecting. and the lower right corner coordinates , annotate each box with the corresponding category label.
[0051] In other embodiments, in order to improve the generalization ability and robustness of the model, data enhancement processing is performed on the historical transmission channel remote sensing images. Data enhancement processing includes but is not limited to rotation processing, flipping processing, scaling and cropping processing, brightness adjustment processing and noise addition processing. Specifically, the rotation processing can be a random rotation of the image so that the model can cope with tree obstacles at different angles; the flipping processing can be a horizontal flipping and vertical flipping of the image to increase the diversity of the image; the scaling and cropping processing can be a random scaling and cropping of the image to simulate different tree obstacle distance ratios; the brightness adjustment processing can be to adjust the image brightness to enhance the model's adaptability to different lighting conditions; the noise addition processing can be to randomly add noise to the image to enhance the model's anti-interference ability. After data enhancement processing, the historical transmission channel remote sensing images can also be divided into a training set, a validation set and a test set in a ratio of 8:1:1. The initial transmission channel tree obstacle hazard detection model is trained with the historical transmission remote sensing images in the training set.
[0052] S200, taking the historical transmission channel remote sensing image as input, calling the constructed initial transmission channel tree barrier hidden danger detection model, so that the initial transmission channel tree barrier hidden danger detection model captures the features of different levels of the historical transmission channel remote sensing image through the convolution kernels of different dimensions in the multidimensional convolution module, generates a transmission channel tree barrier feature map based on the features of different levels, inputs the transmission channel tree barrier feature map into the channel space attention fusion module, and the channel space attention fusion module performs a weighted operation on the attention of the transmission channel tree barrier feature map in the channel dimension and the spatial dimension to obtain a transmission channel tree barrier feature enhancement map, and determines the category, location information and confidence of the prediction box based on the transmission channel tree barrier feature enhancement map and the features of different levels, the prediction box is used to identify the tree barrier area in the historical transmission channel remote sensing image, the features of different levels include the global features and local features of the historical transmission channel remote sensing image, and the initial transmission channel tree barrier hidden danger detection model includes a multidimensional convolution module and a channel space attention fusion module.
[0053] The initial transmission channel tree obstacle hazard detection model is improved based on the pre-training model. The multi-dimensional convolution module contains convolution kernels of different dimensions for image feature extraction. The channel space attention fusion module is used for image feature enhancement and reducing background noise interference. The transmission channel tree obstacle feature enhancement map can be a feature map after feature enhancement processing.
[0054] In practical applications, in order to improve the accuracy of capturing the features of tree barrier areas in remote sensing images with different spatial resolutions, a multidimensional convolution module containing one-dimensional convolution kernels, two-dimensional convolution kernels and three-dimensional convolution is designed to capture the global features (deep features in the spatial structure) and local features (edge information and local details) in the historical transmission channel remote sensing images. Considering that the tree barrier area accounts for a small proportion in the remote sensing image, in order to reduce background interference, a channel space attention fusion module is designed to fuse the attention of the channel dimension and the spatial dimension to improve the model's sensitivity to the tree barrier area. The architecture of the pre-trained model (such as the YOLO model) is improved by the multidimensional convolution module and the channel space attention fusion module to obtain the initial transmission channel tree barrier hazard detection model, such as Figure 2 Initialize all neural network parameters of the initial transmission channel tree barrier hidden danger detection model, and set the hyperparameters related to the transmission channel tree barrier hidden danger detection model, such as: training rounds, batch size, optimizer selection, learning rate, etc.
[0055] Taking the historical transmission channel remote sensing image as input, the constructed initial transmission channel tree barrier hidden danger detection model is called. The global and local features of the historical transmission channel remote sensing image are captured by combining the one-dimensional convolution kernel, two-dimensional convolution kernel and three-dimensional convolution kernel of the multidimensional convolution module in the initial transmission channel tree barrier hidden danger detection model. The transmission channel tree barrier feature map is generated by fusing the global and local features. The channel space attention fusion module performs weighted operations on the attention of the transmission channel tree barrier feature map at the channel level and the spatial level, so that the model automatically focuses on key areas and features, reduces the attention to irrelevant information, and obtains the transmission channel tree barrier feature enhancement map. The channel dimension represents different types of features (such as edge information, texture, etc.) in the convolutional neural network. By performing feature extraction, feature enhancement, feature fusion and other processing on features at different levels and the transmission channel tree barrier enhanced map, a prediction box for identifying the tree barrier area is generated, and the category, location information and confidence of the prediction box are output.
[0056] S300, based on the category label and position information of the real box, and the category, position information and confidence of the predicted box, determine the error between the predicted box and the real box.
[0057] In practical applications, the intersection-and-union ratio between the predicted box and the real box can be determined based on the position information of the predicted box and the position information of the real box, and the difference between the position information of the predicted box and the real box, the difference between the category of the predicted box and the real category, the confidence of the predicted box and the intersection-and-union ratio can be calculated through the loss function to determine the error between the predicted box and the real box. The loss function includes but is not limited to the mean square error loss function, the cross entropy loss function and the smooth L1 loss function.
[0058] S400, iteratively updating the parameters of the initial power transmission channel tree obstacle hazard detection model based on the error until a preset training end condition is reached, thereby obtaining a trained power transmission channel tree obstacle hazard detection model.
[0059] In practical applications, after obtaining the error between the real frame and the predicted frame through the loss function, back propagation is started from the output layer of the initial transmission channel tree barrier hazard detection model according to the loss function value (error), the parameter gradient value of each layer is calculated, and the parameters of the initial transmission channel tree barrier hazard detection model are updated to minimize the loss function value. The preset training end condition can be that the loss function value is continuously less than the preset loss threshold within the preset number of iterations, and the training of the initial transmission channel tree barrier hazard detection model is stopped to obtain the trained transmission channel tree barrier hazard detection model.
[0060] In other embodiments, after completing a round of training on the images in the training set, the model performance is verified based on the historical transmission channel remote sensing images in the verification set, and the training strategy is adjusted based on the verification results, such as terminating the training early or adjusting the learning rate.
[0061] In the above-mentioned transmission channel tree barrier hazard detection model training method, considering the influence of the complex background in the transmission channel remote sensing image on the detection accuracy of tree barrier hazard, a multidimensional convolution module containing a multidimensional convolution kernel is designed to capture the features of the image at different levels. At the same time, considering that the tree barrier hazard area accounts for a small proportion in the remote sensing image, in order to make the model focus on the tree barrier features and ignore the background interference information such as the sky and buildings, a channel space attention fusion module is designed. Through the multidimensional convolution module and the channel space attention fusion module, an initial transmission channel tree barrier hazard detection model for detecting tree barrier hazards in the transmission channel is constructed. The historical transmission channel remote sensing image with the category label and location information of the real box containing the tree barrier area is used as input, and the initial transmission channel tree barrier hidden danger detection module is called. The global and local features of the historical transmission channel remote sensing image are captured by the multi-dimensional convolution of the multi-dimensional convolution module to obtain the transmission channel tree barrier feature map. The transmission channel tree barrier feature map is input into the channel space attention fusion module. By weighting the attention of the transmission channel tree barrier feature map in the spatial dimension and channel dimension, the detail information is retained to the maximum extent, and the loss of the model during feature extraction is reduced to obtain the transmission channel tree barrier feature enhancement map. According to the transmission channel tree barrier feature enhancement map and the features of different levels, the category, location information and confidence of the prediction box are determined. Therefore, according to the category label and location information of the real box, and the category, location information and confidence of the prediction box, the error between the real box and the prediction box is determined, and the model parameters are iteratively updated according to the error until the preset training end condition is reached, and the trained transmission channel tree barrier hidden danger detection model is obtained. The trained transmission channel tree barrier hazard detection model is conducive to improving the tree barrier detection accuracy in different geographical environments of transmission channels, as well as the model's adaptability to high-precision tree barrier detection in different complex scenarios.
[0062] In an exemplary embodiment, the initial transmission channel tree obstacle hazard detection model includes a first feature extraction module and a second feature extraction module, such as Figure 4 As shown, the initial transmission channel tree obstacle hazard detection model captures the features of different levels of the historical transmission channel remote sensing image through the convolution kernels of different dimensions in the multidimensional convolution module, and generates the transmission channel tree obstacle feature map based on the features of different levels, including S210 to S240. Among them:
[0063] S210, extracting features of the historical power transmission channel remote sensing image through a first feature extraction module to obtain a first feature map.
[0064] Among them, the first feature map is a feature map obtained by the first feature extraction module performing a feature extraction operation on the historical power transmission channel remote sensing image.
[0065] In this embodiment, the first feature extraction module is a Conv_BN_SiLU module, which is composed of a Conv layer with a convolution kernel size of 3×3 and a step size of 2, a BN layer (Batch Normalization, batch normalization layer), and a SiLU layer (Sigmoid Linear Unit, activation function) connected in series.
[0066] In practical applications, the features of the historical power transmission remote sensing image are extracted through the convolution layer, batch normalization layer and activation function of the first feature extraction module to obtain the first feature map.
[0067] S220, based on convolution kernels of different dimensions in the multidimensional convolution module, respectively capture features of different levels of the first feature map to obtain a second feature map.
[0068] The second feature map is a feature map obtained by performing feature extraction and feature fusion on the first feature map by the multi-dimensional convolution module.
[0069] In practical applications, the multidimensional convolution module captures the features of the first feature map at different levels through a combination of one-dimensional convolution kernels, two-dimensional convolution kernels, and three-dimensional convolution kernels, such as the three-dimensional relationship between tree barriers and backgrounds in complex terrain, and the subtle differences between branches and cables, and performs feature splicing on features at different levels to obtain the second feature map.
[0070] S230, extracting features of the second feature map through a second feature extraction module to obtain a third feature map.
[0071] In this embodiment, the second feature extraction module is a C3K2 module, which is used for feature extraction.
[0072] In practical applications, features are extracted on different channels of the input second feature map through the parallel convolutional layer in the second feature extraction module, and the features are concatenated to obtain the third feature map.
[0073] S240, based on the second feature extraction module and the multi-dimensional convolution module, extract the features of the third feature map at different scales to obtain a tree barrier feature map of the power transmission channel.
[0074] In practical applications, the multidimensional convolution module and the second feature extraction module may be stacked in sequence for multiple times, and the features of the third feature map at different scales may be extracted through multiple convolution operations of the stacked multidimensional convolution module and the second feature extraction module to obtain the tree barrier feature map of the transmission channel.
[0075] In this embodiment, features of the image at different scales are extracted through the first feature extraction module, the multidimensional convolution module and the second feature extraction module to obtain a transmission channel feature map, which enables the model to capture detailed information in the image, thereby improving the accuracy of small target detection.
[0076] To improve detection accuracy, in an exemplary embodiment, S220 includes S222 to S224.
[0077] S222, performing convolution operations on the first feature map using convolution kernels of different dimensions in the multi-dimensional convolution layer to obtain a global feature map and a local feature map.
[0078] S224, performing feature fusion on the global feature map and the local feature map to obtain a first feature fusion map, and processing the first feature fusion map based on the activation function in the multi-dimensional convolutional layer to obtain a second feature map.
[0079] The global feature map may be a feature map including deep feature information of the first feature map, and the local feature map may be a feature map including edge information and local details of the first feature map.
[0080] Considering that tree barriers in remote sensing images vary in size and shape, it is difficult to capture key information at different scales through single-scale convolution. A multi-dimensional convolution module, namely the AMConv module, is designed. Figure 4 As shown in the figure, it uses a combination of 1D, 2D and 3D convolutions to extract spatial features at different levels, thereby improving the robustness of the model in small and large tree obstacle detection. Specifically, 3D convolution can capture deep features in spatial structure, such as the three-dimensional relationship between tree obstacles and backgrounds in complex terrain. 1D and 2D convolutions are used to enhance edge information and local details, respectively, so that the model can more keenly perceive the subtle differences between branches and cables.
[0081] In particular, considering directly using large convolution kernels or deep convolutional networks will result in excessive computational costs. The AMConv module obtains rich feature expressions with lower computational costs by gradually reducing the dimension and reorganizing the input feature map. This design ensures that the detection speed is not affected when processing large-scale remote sensing data efficiently. At the same time, remote sensing images are often interfered by noise, buildings and other natural landscapes, which can easily cause feature confusion. By combining convolution kernels of different scales in the AMConv module, it ensures that the global features of distant trees are captured while not ignoring the detailed information of the foreground, reducing the probability of missed detection and false detection.
[0082] In practical applications, such as Figure 3 As shown, in the AMConv module, the first feature map with the input channel number C , through the three-dimensional convolution kernel first feature map Perform Conv3D (3D convolution) operation to obtain a feature map with a channel number of C / 4 . Through two-dimensional convolution Perform Conv2D (2D convolution) operation to obtain a local feature map with a channel number of C / 4 , and through one-dimensional convolution Perform Conv1D (1D convolution) operation to obtain a local feature map with a channel number of C / 4 .
[0083] For the first feature map Perform Conv2D operation to obtain a feature map with a channel number of C / 4 At the same time, for the first feature map Perform Conv1D operation to obtain a feature map with a channel number of C / 4 . For the feature map and feature map Perform the Concat (feature concatenation) operation, and perform the Conv3D operation on the result of feature concatenation to obtain a global feature map with a channel number of C / 2. . For local feature maps , local feature map , global feature map Perform the Concat operation to obtain the first feature fusion map with the number of channels C .
[0084] The first feature fusion graph Activation processing through Scelu activation function:
[0085]
[0086] In the formula, is the scaling parameter, usually a positive number, , is an adaptive parameter, where , can be adjusted according to the training effect , The size of is the input feature map, is the feature map after being processed by the Scelu activation function. The Scelu activation function introduces stronger nonlinear representation capabilities to the network through its nonlinear form. This enables the model to better process complex tree barrier images of power transmission channels and capture key features in the image, thereby improving the accuracy and robustness of recognition.
[0087] In particular, the introduction of scaling parameters in the Scelu activation function of the multidimensional convolution module makes the output distribution between layers tend to be consistent, which can reduce gradient explosion and oscillation phenomena and ensure that the model converges at a faster speed. Tree barrier detection scenarios in transmission lines often have the phenomenon of unbalanced data categories. For example, the vast majority of pixels in remote sensing images belong to the background, and only a small number of pixels correspond to the tree barrier area. The Scelu activation function allows the negative part to retain the output, enhances the learning ability of the model under unbalanced data, and enables the model to more keenly identify tree barriers in small areas. At the same time, in the monitoring of tree barrier hazards in transmission channels, the model needs to handle complex scenes, such as the overlapping areas of branches and cables. The Scelu activation function can model these nonlinear edges more carefully, so that the model can retain more details during segmentation and detection, and improve the accurate distinction between tree barriers and transmission lines. Through the processing of the activation function, the output of the AMConv module is obtained, which is the second feature map .
[0088] In this embodiment, a multi-dimensional convolution layer containing convolution kernels of different dimensions is designed to enhance the feature extraction capability of the initial transmission channel tree barrier hidden danger detection model. Through the multi-scale convolution and flexible channel operation of the multi-dimensional convolution module, the features of the tree barrier area at different spatial resolutions are accurately captured, solving the detection problem caused by complex background interference in remote sensing images.
[0089] In an exemplary embodiment, there are multiple multi-dimensional convolution modules and second feature extraction modules, and S240 includes S242 to S248. Among them:
[0090] S242, respectively connect the output end of each multi-dimensional convolutional layer with the input end of each second feature extraction module to obtain a first feature extraction combination module, a second feature extraction combination module and a third feature extraction combination module.
[0091] S244, extracting features of the third feature map through a first feature extraction and combination module to obtain a first scale feature map.
[0092] S246, extracting features of the first scale feature map through a second feature extraction and combination module to obtain a second scale feature map.
[0093] S248, extracting features of the second scale feature map through a third feature extraction combination module to obtain a tree barrier feature map of the power transmission channel.
[0094] In practical applications, such as Figure 3 As shown, in the initial transmission channel tree obstacle hazard detection module, the output end of the multi-dimensional convolution layer is connected to the input end of the second feature extraction module, and the multi-dimensional convolution module and the second feature extraction module are stacked three times to obtain the first feature extraction combination module, the second feature extraction combination module and the third feature extraction combination module respectively.
[0095] The input is the third feature map ( Figure 3 The feature map in ), extract the feature map through the multi-dimensional convolution module in the first feature extraction combination module The features of the output feature map , the feature map is extracted by the second feature extraction module in the first feature extraction combination module Perform feature extraction to obtain the first scale feature map .
[0096] The first scale feature map is input into the second feature extraction combination module, and the first scale feature map is subjected to feature extraction through the multi-dimensional convolution module and the multi-layer convolution operation of the second feature extraction module to reduce the spatial dimensions (height and width) and obtain feature maps. and the second scale feature map .
[0097] The second scale feature map The input is input into the third feature extraction combination module, and the second scale feature map is subjected to feature extraction through the multi-dimensional convolution module and the multi-layer convolution operation of the second feature extraction module to reduce the spatial dimensions (height and width) and obtain feature maps respectively. And the tree barrier characteristic map of the transmission channel .
[0098] In this embodiment, the feature extraction combination module composed of the multi-dimensional convolution module and the second feature extraction module gradually reduces the spatial dimension of the feature map and captures information at different levels, which helps the model detect targets of different sizes. At the same time, it reduces the amount of calculation and helps to improve the detection speed.
[0099] In an exemplary embodiment, Figure 5 As shown, the channel space attention fusion module performs weighted operations on the attention of the transmission channel tree obstacle feature map in the channel dimension and the spatial dimension, and obtains the transmission channel tree obstacle feature enhancement map including S262 to S268. Among them:
[0100] S262, performing a convolution operation on the power transmission channel tree barrier feature map through the convolution layer in the channel space attention fusion module to obtain a first power transmission channel tree barrier feature map.
[0101] S264, processing the first transmission channel tree barrier feature map through the activation function in the channel space attention fusion module to obtain a second transmission channel tree barrier feature map.
[0102] S266, performing a convolution operation on the tree barrier feature map of the power transmission channel through the convolution layer in the channel space attention fusion module to obtain a spatial weight map.
[0103] S268, performing a spatial weighting operation on the spatial weight map and the power transmission channel tree barrier feature map to obtain a power transmission channel tree barrier feature enhancement map.
[0104] Considering the tree obstacle monitoring task, the acquired remote sensing image contains a large area of background (such as mountains, grasslands, buildings), while the tree obstacles usually only occupy a small part of the remote sensing image. In order to highlight the target features and suppress background noise, and reduce the possibility of missed detection and false detection, a channel space attention fusion module, CHAttention module, is designed. Figure 6 As shown in the figure, the tree barrier feature map of the transmission channel is firstly fused by the convolutional layer in the channel space attention fusion module. A convolution operation is performed, the convolution kernel size of which is 1×1, the number of convolution kernels is C / r, and r is the channel compression rate. The tree barrier feature map of the first transmission channel with the number of channels being C / r is obtained. .
[0105] Secondly, the tree barrier feature map of the first transmission channel is activated by the Scelu activation function Perform activation processing to obtain the tree barrier characteristic map of the second transmission channel The activation process in this embodiment can refer to the above embodiment in which the Scelu activation function is used to activate the first feature fusion graph. The implementation process of the activation process will not be described in detail here.
[0106] Characteristics of tree obstacles in transmission channels Perform a convolution operation with a convolution kernel size of 1X1 to obtain a spatial weight map with a channel number of 1 .
[0107] In the spatial weight map Then, by using the spatial weight map And the tree barrier characteristic map of the transmission channel Perform spatial-multiplication to obtain the output of the CHAttention module as the tree barrier feature enhancement map of the power transmission channel. Specifically, for the spatial weight map with channel number 1 And the number of channels is The spatial weighting operation of the transmission channel tree barrier feature map: firstly transform the spatial weight map Copy to the transmission channel tree obstacle feature map On each channel of , a channel number is generated Feature map Then the feature map The characteristic diagram of tree barriers in the transmission channel Multiply element by element to get the tree barrier feature enhancement map of the transmission channel . The CHAttention module uses channel-level and spatial-level attention weighting operations to allow the model to automatically focus on key areas and features, reducing attention to irrelevant information. The channel dimension represents different types of features (such as edge information, texture, etc.) in convolutional neural networks. The CHAttention module can discover potential correlations between multiple feature channels, allowing the model to more accurately combine features from different channels, thereby improving the overall detection performance. For power line scenes, the background may be very complex, including leaves, cables, buildings, clouds, and other elements. The CHAttention module can dynamically adjust the attention weights to highlight target features and suppress background noise, reducing the possibility of missed detections and false detections.
[0108] In this implementation, the channel-spatial attention fusion module is designed to fuse the attention of the channel dimension and the spatial dimension, which effectively improves the sensitivity of the model to tree obstacle hazards. The accuracy of tree obstacle hazard detection for remote sensing images containing complex backgrounds and detail noise is improved, while ensuring computational efficiency.
[0109] In an exemplary embodiment, based on the tree barrier feature enhancement map of the power transmission channel and features at different levels, the category, location information and confidence of the prediction box are determined, including S282 to S284.
[0110] S282, the first feature map, the second feature map and the transmission channel tree barrier feature enhancement map are respectively fused and extracted through the feature fusion module and the multi-dimensional convolution module in the initial transmission channel tree barrier hidden danger detection model to obtain a first scale feature map, a second scale feature map and a third scale feature map.
[0111] The sizes of the first scale feature map, the second scale feature map and the third scale feature map are different from each other.
[0112] In practical applications, such as Figure 2 As shown in the figure, the tree barrier feature of the transmission channel is enhanced. Input the SPPF pooling layer (Spatial Pyramid Pooling - Fast) in the initial transmission channel tree barrier hidden danger detection model. The SPPF pooling layer enhances the tree barrier feature of the transmission channel. Perform a fast pooling operation and concatenate the outputs after the pooling operation to obtain a feature map .
[0113] For feature maps Perform upsampling to increase feature maps The size of the model enables the model to capture the characteristics of the target more carefully, and the feature map of the output after the upsampling operation With the second scale feature map Perform feature fusion to obtain feature map . The feature map Input into the second feature extraction module to extract features and obtain , for the feature map Perform upsampling operation to obtain feature map , for the feature map and the first scale feature map Perform feature fusion to obtain feature map , extract the feature map through the second feature extraction module The features of the first scale feature map are obtained .
[0114] Extract the first scale feature map through the multi-dimensional convolution module The features of , for the feature map and feature map Perform feature fusion to obtain feature map , extract the feature map through the second feature extraction module The features of the second scale feature map are obtained .
[0115] Extract the second scale feature map through the multi-dimensional convolution module The features of , for the feature map and feature map Perform feature fusion and output feature map , extract the feature map through the second feature extraction module The features of the third scale feature map are obtained .
[0116] S284, input the first scale feature fusion map, the second scale feature fusion map and the third scale feature fusion map into the target prediction head of the initial transmission channel tree obstacle hazard detection model, generate multiple prediction boxes, and output the category, location information and confidence of each prediction box.
[0117] In practical applications, the first-scale feature fusion map, the second-scale feature fusion map and the third-scale feature fusion map are respectively input into the target prediction head of the initial transmission channel tree barrier hazard detection model. The target prediction head generates multiple prediction boxes for identifying the tree barrier area, predicts the category of each prediction box, and outputs the category, location information and confidence of the prediction box.
[0118] In this embodiment, the feature fusion module and the multi-dimensional convolution module are combined to gradually reduce the dimension and optimize the calculation path, and the features of the first feature map, the second feature map and the transmission channel tree barrier feature enhancement map are fused and extracted to obtain the first scale feature map, the second scale feature map and the third scale feature map. According to the first scale feature map, the second scale feature map and the third scale feature map, the category, position information and confidence of the prediction box are output, which improves the detection accuracy and reduces the computational cost of the model.
[0119] In order to measure the prediction quality of the model, in an exemplary embodiment, S300 includes S310 to S350. Among them:
[0120] S310, determining an intersection-over-union ratio between the real frame and the predicted frame based on the position information of the real frame and the position information of the predicted frame.
[0121] In practical applications, the intersection-and-union ratio of the real box and the predicted box is calculated based on the position information of the real box and the predicted box to measure the degree of overlap between them. The intersection-and-union ratio is the ratio of the intersection area of the real box and the predicted box to the union area. The higher the intersection-and-union ratio, the higher the degree of overlap between the two.
[0122] S320, determining a prediction box loss value between the real box and the prediction box based on the intersection-over-union ratio.
[0123] Among them, the predicted box loss value represents the position difference between the predicted box and the true box.
[0124] In practical applications, the predicted box loss value between the real box and the predicted box can be obtained according to a preset loss function and intersection-over-union ratio. The preset loss function includes but is not limited to a mean square error loss function, a cross entropy loss function, and a smooth L1 loss function.
[0125] S330, determining a category loss value between the real box and the predicted box according to the category label of the real box, the category of the predicted box and a preset loss function.
[0126] Among them, the category loss value is used to measure the difference between the predicted box category distribution and the actual category.
[0127] In practical applications, the category label of the true box and the category probability distribution of the predicted box can be obtained by combining sigmoid with the binary cross entropy loss function to determine the category loss value between the true box and the predicted box.
[0128] S340, determining a confidence loss value between the real box and the predicted box according to the intersection-over-union ratio between the real box and the predicted box and the confidence of the predicted box.
[0129] Among them, the confidence loss value is used to measure the prediction error of the model on whether there is a tree barrier area in the prediction box.
[0130] In practical applications, the intersection-over-union ratio of the true box and the predicted box can be the true confidence. The confidence loss value between the true box and the predicted box is determined according to the cross entropy loss function, the true confidence and the confidence of the predicted box.
[0131] S350, determining the error between the predicted box and the true box according to the predicted box loss value, the category loss value and the confidence loss value.
[0132] In practical applications, weights can be assigned to the prediction box loss value, category loss value, and confidence loss value respectively, and the loss value (error) between the prediction box and the true box can be obtained by weighted summation.
[0133] In this embodiment, the error between the prediction result of the model and the true label is determined by the prediction box loss value, category loss value and confidence loss value between the true box and the prediction box, which is conducive to guiding the adjustment of model parameters according to the error to minimize the error.
[0134] To improve the accuracy of the model in calculating the difference between the predicted box and the true box, in an exemplary embodiment, Figure 7 As shown, S400 includes S420 to S460. Among them:
[0135] S420, determining a minimum bounding box between the real box and the predicted box.
[0136] In practical applications, the minimum bounding box is determined to be the minimum enclosing rectangle containing the real box and the predicted box.
[0137] S440, determining an intersection-over-union loss value between the real box and the predicted box based on the minimum bounding box, the sizes of the real box and the predicted box, and the intersection-over-union ratio.
[0138] Considering that in the images obtained from power inspection, the tree barrier area accounts for a small proportion of the image, while the background accounts for a large proportion. Traditional loss functions (such as IoU loss or cross entropy loss) are easily disturbed by background pixels, causing the model to ignore sparse positive samples. This application designs an improved intersection over union loss function to address the problem that traditional loss functions easily ignore the edges of small targets and objects in complex scenes (such as branches and leaves on transmission lines). The loss function considers the overall overlapping area of the object and gives higher weights to the edge area so that the model can retain more edge details during segmentation.
[0139] The loss function is defined as follows:
[0140]
[0141] 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.
[0142] In practical applications, according to the minimum bounding box, the size of the real box and the predicted box, and the intersection-and-union ratio, the intersection-and-union ratio loss value between the real box and the predicted box is determined by the above improved intersection-and-union ratio loss function. .
[0143] S460, based on a preset IoU upper threshold and a preset IoU lower threshold, the IoU is converted into an IoU loss weight through linear interval mapping, and the predicted box loss value between the real box and the predicted box is obtained according to the IoU loss value and the IoU loss weight.
[0144] Among them, the intersection-over-union loss weight represents the importance of different types of samples.
[0145] exist Based on this, we focus on different regression samples through linear interval mapping, and design a prediction box loss value between the real box and the prediction box. 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 the lower threshold of the intersection-over-union ratio Intersection and union upper threshold , By adjusting and The value of Focus on different regression samples. Less than the intersection-and-union ratio lower limit threshold hour, is 0, indicating that the predicted box is a background or a negative sample; when Greater than the intersection-over-union ratio upper threshold hour, is 1, indicating that the predicted box is a positive sample; At the lower threshold of the intersection-and-union ratio Intersection and union upper threshold In between, is a basis The value of the function increases linearly, and the intersection-union ratio loss weights of these samples are dynamically adjusted through the linear interval mapping method, so that the intersection-union ratio loss weight changes linearly with the size of the intersection-union ratio.
[0151] In practical applications, according to the above formula, the intersection-over-union ratio between the real box and the predicted box is converted into the intersection-over-union ratio loss weight , according to the intersection-over-union loss value and the intersection-over-union loss weight, the prediction box loss value is obtained .
[0152] The above method of determining the prediction box loss value between the true box and the prediction box can better handle the bounding box regression problem in target detection, and the degree of influence of different samples on the training process can be dynamically controlled by adjusting the threshold. Specifically, the importance of different samples to the training process can be flexibly controlled by adjusting the upper and lower thresholds of the intersection-over-union ratio. Lowering the lower threshold of the intersection-over-union ratio can allow the model to treat those prediction boxes that are almost non-overlapping more strictly and reduce false positives. Increasing the upper threshold of the intersection-over-union ratio can make the model focus on those prediction boxes that are already very close to the true box, further improving the accuracy.
[0153] In this embodiment, an improved prediction frame loss value calculation method is used to participate in the training process of the initial transmission channel tree obstacle hidden danger detection model, thereby improving the accuracy of calculating the prediction frame loss value, thereby improving the detection accuracy of the model.
[0154] In order to make a clearer description of the transmission channel tree obstacle hidden danger detection model training method provided by the present application, it is described below in conjunction with a specific embodiment, and the specific embodiment includes the following steps:
[0155] S1, obtain the historical transmission channel remote sensing image, which contains the category label and location information of the real box of the tree barrier area.
[0156] S2, taking the historical transmission channel remote sensing image as input, calling the constructed initial transmission channel tree obstacle hazard detection model, extracting the features of the historical transmission channel remote sensing image through the first feature extraction module, obtaining a first feature map, performing convolution operations on the first feature map through convolution kernels of different dimensions in the multidimensional convolution layer respectively, obtaining a global feature map and a local feature map, performing feature fusion operations on the global feature map and the local feature map, obtaining a first feature fusion map, processing the first feature fusion map based on the activation function in the multidimensional convolution layer, obtaining a second feature map, extracting the features of the second feature map through the second feature extraction module, and obtaining a third feature map.
[0157] S3, respectively connecting the output end of each multidimensional convolutional layer with the input end of each second feature extraction module to obtain a first feature extraction combination module, a second feature extraction combination module and a third feature extraction combination module, extracting features of the third feature map through the first feature extraction combination module to obtain a first scale feature map, extracting features of the first scale feature map through the second feature extraction combination module to obtain a second scale feature map, extracting features of the second scale feature map through the third feature extraction combination module to obtain a transmission channel tree barrier feature map.
[0158] S4, performing a convolution operation on the transmission channel tree barrier feature map through the convolution layer in the channel space attention fusion module to obtain a first transmission channel tree barrier feature map, processing the first transmission channel tree barrier feature map through the activation function in the channel space attention fusion module to obtain a second transmission channel tree barrier feature map, performing a convolution operation on the transmission channel tree barrier feature map through the convolution layer in the channel space attention fusion module to obtain a spatial weight map, performing a spatial weighting operation on the spatial weight map and the transmission channel tree barrier feature map to obtain a transmission channel tree barrier feature enhanced map.
[0159] S5, respectively fuse and extract the features of the first feature map, the second feature map and the transmission channel tree barrier feature enhancement map through the feature fusion module and the multi-dimensional convolution module in the initial transmission channel tree barrier hidden danger detection model, obtain the first scale feature map, the second scale feature map and the third scale feature map, input the first scale feature fusion map, the second scale feature fusion map and the third scale feature fusion map into the target prediction head of the initial transmission channel tree barrier hidden danger detection model, generate multiple prediction boxes, and output the category, location information and confidence of each prediction box.
[0160] S6, based on the position information of the real frame and the position information of the predicted frame, determine the intersection-and-union ratio of the real frame and the predicted frame, determine the minimum bounding box of the real frame and the predicted frame, determine the intersection-and-union ratio loss value between the real frame and the predicted frame based on the minimum bounding box, the sizes of the real frame and the predicted frame, and the intersection-and-union ratio, based on a preset intersection-and-union ratio upper limit threshold and a preset intersection-and-union ratio lower limit threshold, convert the intersection-and-union ratio loss into an intersection-and-union ratio loss weight through linear interval mapping, and obtain the prediction box loss value between the real frame and the predicted frame based on the intersection-and-union ratio loss value and the intersection-and-union ratio loss weight.
[0161] S7, according to the category label of the true box, the category of the predicted box and the preset loss function, determine the category loss value between the true box and the predicted box, according to the intersection and union ratio of the true box and the predicted box, and the confidence of the predicted box, determine the confidence loss value between the true box and the predicted box, and determine the error between the predicted box and the true box according to the predicted box loss value, the category loss value and the confidence loss value.
[0162] In practical applications, the size of the feature map 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.
[0163] like Figure 2 As shown in the figure, the historical transmission channel tree barrier remote sensing image with a size of 512×512×3 Input into the initial transmission channel tree obstacle hazard detection model, first After the Conv_BN_SiLU module, a feature map with 64 channels is obtained. , the size is 256×256×64; the feature map Input into the AMConv module and get a feature map with 128 channels , the size is 128×128×128; Input into the C3K2 module to obtain a feature map with 256 channels , the size is 128×128×256; then stack the AMConv module and the C3K2 module three times in sequence to obtain feature maps of size 64×64×512 respectively , feature map of size 64×64×512 , feature map of size 32×32×512 , feature map of size 32×32×512 , feature map of size 16×16×512 , the tree barrier feature map of the transmission channel with a size of 16×16×512 ;Will After inputting into the CHAttention module, a feature map of size 16×16×512 is obtained ; then Input into the SPPF pooling module to obtain a feature map of size 16×16×512 ;right Upsample to get a feature map of size 32×32×512 ;Will and feature map Perform the Concat operation to obtain a feature map of size 32×32×1024 ;Will Input into the C3K2 module and get a feature map of size 32×32×512 ;right Upsample to get a feature map of size 64×64×512 ;Will and feature map Perform the Concat operation to obtain a feature map of size 64×64×1024 ;Will Input into the C3K2 module to obtain a feature map of size 64×64×256 ;Will Input into the AMConv module to obtain a feature map of size 32×32×256 ;Will and feature map Perform the Concat operation to obtain a feature map of size 32×32×768 ;Will Input into the C3K2 module and get a feature map of size 32×32×512 ;Will Input into the AMConv module to obtain a feature map of size 16×16×512 ;Will and Perform the Concat operation to obtain a feature map of size 16×16×1024 ;Will Input into the C3K2 module and get a feature map of size 16×16×512 ;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.
[0164] S8, based on the error, iteratively update the parameters of the initial power transmission channel tree barrier hazard detection model until the preset training end condition is reached, and obtain the trained power transmission channel tree barrier hazard detection model.
[0165] On the one hand, an AMConv module is designed in this application. Through multi-scale convolution and feature fusion, the AMConv module enables the model to maintain high-precision detection when facing tree obstacles of different sizes and shapes. At the same time, its design reduces the impact of background interference in remote sensing images and improves the overall detection effect. The AMConv module reduces the computational cost of the model by gradually reducing the dimension and optimizing the calculation path. This is particularly critical for real-time monitoring, because the inspection of the power system requires rapid response and timely detection of potential hidden dangers.
[0166] On the other hand, this application designs a CHAttention module. In the tree obstacle monitoring task, the CHAttention module can ensure that the model focuses on the tree obstacle features, while ignoring interference information such as the sky and buildings, thereby improving the accuracy of detection. Some features in remote sensing images are very weak (such as small branches and leaves entangled with cables). The CHAttention module retains detail information to the maximum extent through dual attention of channels and space, reducing the loss of the model during feature extraction. Whether it is a mountainous environment or an urban scene, the CHAttention module can flexibly adjust its attention weight to ensure that the model can maintain high accuracy in various complex scenarios.
[0167] On the other hand, the present application proposes a Focaler-KIoU loss function. The Focal mechanism reduces the background dominance problem by dynamically adjusting the loss weights so that the model focuses on samples that are difficult to predict. The edges of small targets and objects in complex scenes (such as branches and leaves on transmission lines) are very important, but they are easily ignored by traditional loss functions. KIoU not only considers the overall overlapping area of the object, but also gives a higher weight to the edge area, so that the model can retain more edge details during segmentation.
[0168] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0169] The method for detecting tree obstacle hazards in a power transmission channel provided in the embodiment of the present application can be applied to Figure 1In the application environment shown, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers.
[0170] Specifically, the operator may send a message of detecting tree obstacles in a power transmission channel to the server 104 through the terminal. The server receives the message of detecting tree obstacles in a power transmission channel. Secondly, the remote sensing image of the power transmission channel is obtained. The remote sensing image of the power transmission channel is used as input, and a trained model of detecting tree obstacles in a power transmission channel is called to obtain a result of detecting tree obstacles. An early warning is issued based on the result of detecting tree obstacles.
[0171] In an exemplary embodiment, the present application also provides a method for detecting tree obstacle hazards in a power transmission channel, such as Figure 8 As shown, it includes the following S500 to S700. Among them:
[0172] S500: Acquire a remote sensing image of a power transmission channel.
[0173] The remote sensing image of the power transmission channel may be an image obtained by collecting images of the power transmission channel.
[0174] In practical applications, during power grid operations, transmission channel lines can be inspected regularly, and remote sensing images of the transmission channels can be obtained through UAV remote sensing and satellite remote sensing.
[0175] S600, taking the remote sensing image of the power transmission channel as input, calling the trained power transmission channel tree barrier hazard detection model to obtain the tree barrier hazard detection result, the power transmission channel tree barrier hazard detection model is trained based on the above-mentioned power transmission channel tree barrier hazard detection model training method.
[0176] Among them, the tree obstacle hazard detection results can include the detection box and category label of the tree obstacle area.
[0177] In practical applications, during the inspection and collection of remote sensing images of power transmission channels, the acquired remote sensing images of power transmission channels are input into the trained model obtained by the above-mentioned power transmission channel tree barrier hazard detection model training method, and the tree barrier area in the power transmission channel remote sensing image is detected to obtain the tree barrier hazard detection result. The power transmission channel tree barrier hazard detection model is obtained by training using the steps in any of the above-mentioned power transmission channel tree barrier hazard detection model training methods. The specific model training process will not be repeated here.
[0178] S700, issues early warning based on tree obstacle hazard detection results.
[0179] In practical applications, the detected tree barrier area is represented in the tree barrier hazard detection result. The tree barrier area can be obtained based on the remote sensing image of the transmission channel where the tree barrier area is detected. According to the source of the remote sensing image of the transmission channel, the specific location information of the transmission channel where the tree barrier area is located is obtained, and the specific location information of the tree barrier area and the time when the tree barrier area is detected are integrated to obtain early warning information, and push the early warning information. The method of pushing early warning information can include pushing the alarm information in the notification bar, displaying the alarm information in the form of a full-screen or half-screen pop-up window, issuing an alarm prompt by emitting a specific sound or vibration mode, and providing a visual alarm prompt by flashing an indicator light, etc. It can be understood that the method of pushing the alarm information can be any one of the aforementioned methods or a combination of any multiple methods, which is not limited here.
[0180] In this embodiment, by acquiring remote sensing images of the transmission channel and inputting them into the trained transmission channel tree barrier hazard detection model obtained by the above-mentioned transmission channel tree barrier hazard detection model training method, tree barrier hazard detection results are obtained, and early warning is given based on the tree barrier hazard detection results. On the one hand, the accuracy and efficiency of tree barrier hazard detection are improved through model detection. On the other hand, early warning of the rapid and accurate detection results of tree barrier hazards based on the model is conducive to timely discovery of potential hazards of the power system, thereby taking corresponding measures to reduce the possibility of accidents and improve the stability and safety of power system operation.
[0181] In an exemplary embodiment, Fig. 9 As shown, a transmission channel tree obstacle hidden danger detection model training device 600 is provided, comprising: an image acquisition module 610, a model training module 620, an error determination module 630 and a parameter updating module 640, wherein:
[0182] An image acquisition module 610 is used to acquire a historical transmission channel remote sensing image, where the historical transmission channel remote sensing image contains the category label and location information of the real frame of the tree barrier area;
[0183] The model training module 620 is used to take the historical transmission channel remote sensing image as input and call the constructed initial transmission channel tree barrier hidden danger detection model, so that the initial transmission channel tree barrier hidden danger detection model can respectively capture the features of different levels of the historical transmission channel remote sensing image through the convolution kernels of different dimensions in the multidimensional convolution module, generate a transmission channel tree barrier feature map based on the features of different levels, input the transmission channel tree barrier feature map into the channel space attention fusion module, and the channel space attention fusion module performs a weighted operation on the attention of the transmission channel tree barrier feature map in the channel dimension and the spatial dimension to obtain a transmission channel tree barrier feature enhancement map. Based on the transmission channel tree barrier feature enhancement map and the features of different levels, the category, location information and confidence of the prediction box are determined. The prediction box is used to identify the tree barrier area in the historical transmission channel remote sensing image. The features of different levels include the global features and local features of the historical transmission channel remote sensing image. The initial transmission channel tree barrier hidden danger detection model includes a multidimensional convolution module and a channel space attention fusion module.
[0184] An error determination module 630 is used to determine the error between the predicted box and the true box based on the category label and position information of the true box, and the category, position information and confidence of the predicted box;
[0185] The parameter updating module 640 is used to iteratively update the parameters of the initial power transmission channel tree obstacle hazard detection model based on the error until the preset training end condition is reached to obtain the trained power transmission channel tree obstacle hazard detection model.
[0186] In an exemplary embodiment, the model training module 620 is also used to extract features of historical transmission channel remote sensing images through a first feature extraction module to obtain a first feature map; to capture features of different levels of the first feature map based on convolution kernels of different dimensions in a multidimensional convolution module to obtain a second feature map; to extract features of the second feature map through a second feature extraction module to obtain a third feature map; and to extract features of the third feature map at different scales based on the second feature extraction module and the multidimensional convolution module to obtain a tree barrier feature map of the transmission channel.
[0187] In an exemplary embodiment, the model training module 620 is also used to perform convolution operations on the first feature map using convolution kernels of different dimensions in the multidimensional convolution layer to obtain a global feature map and a local feature map; perform feature fusion on the global feature map and the local feature map to obtain a first feature fusion map, and process the first feature fusion map based on the activation function in the multidimensional convolution layer to obtain a second feature map.
[0188] In an exemplary embodiment, the model training module 620 is also used to respectively connect the output end of each multidimensional convolutional layer with the input end of each second feature extraction module to obtain a first feature extraction combination module, a second feature extraction combination module and a third feature extraction combination module; extract the features of the third feature map through the first feature extraction combination module to obtain a first scale feature map; extract the features of the first scale feature map through the second feature extraction combination module to obtain a second scale feature map; extract the features of the second scale feature map through the third feature extraction combination module to obtain a transmission channel tree barrier feature map.
[0189] In an exemplary embodiment, the model training module 620 is also used to perform a convolution operation on the transmission channel tree barrier feature map through the convolution layer in the channel space attention fusion module to obtain a first transmission channel tree barrier feature map; process the first transmission channel tree barrier feature map through the activation function in the channel space attention fusion module to obtain a second transmission channel tree barrier feature map; perform a convolution operation on the transmission channel tree barrier feature map through the convolution layer in the channel space attention fusion module to obtain a spatial weight map; perform spatial weighting operation on the spatial weight map and the transmission channel tree barrier feature map to obtain a transmission channel tree barrier feature enhanced map.
[0190] In an exemplary embodiment, the parameter updating module 640 is also used to fuse and extract features of the first feature map, the second feature map and the transmission channel tree barrier feature enhancement map through the feature fusion module and the multidimensional convolution module in the initial transmission channel tree barrier hazard detection model, respectively, to obtain a first scale feature map, a second scale feature map and a third scale feature map; input the first scale feature fusion map, the second scale feature fusion map and the third scale feature fusion map into the target prediction head of the initial transmission channel tree barrier hazard detection model, generate multiple prediction boxes, and output the category, location information and confidence of each prediction box.
[0191] In an exemplary embodiment, the error determination module 630 is further used to determine the intersection-over-union ratio of the real box and the predicted box based on the position information of the real box and the position information of the predicted box; determine the prediction box loss value between the real box and the predicted box based on the intersection-over-union ratio; determine the category loss value between the real box and the predicted box according to the category label of the real box, the category of the predicted box and a preset loss function; determine the confidence loss value between the real box and the predicted box according to the intersection-over-union ratio of the real box and the predicted box, and the confidence of the predicted box; determine the error between the predicted box and the real box according to the prediction box loss value, the category loss value and the confidence loss value.
[0192] In an exemplary embodiment, the error determination module 630 is also used to determine the minimum bounding box between the real box and the predicted box; based on the minimum bounding box, the sizes of the real box and the predicted box, and the intersection and union ratio, determine the intersection and union ratio loss value between the real box and the predicted box; based on a preset intersection and union ratio upper limit threshold and a preset intersection and union ratio lower limit threshold, convert the intersection and union ratio into an intersection and union ratio loss weight through linear interval mapping; based on the intersection and union ratio loss value and the intersection and union ratio loss weight, obtain the prediction box loss value between the real box and the predicted box.
[0193] Each module in the above-mentioned power transmission channel tree obstacle hidden danger detection model training device 600 can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0194] In an exemplary embodiment, Fig.10 As shown, a transmission channel tree obstacle hidden danger detection device 700 is provided, comprising: a remote sensing image acquisition module 710, a tree obstacle hidden danger detection module 720 and an early warning module 730, wherein:
[0195] A remote sensing image acquisition module 710 is used to acquire remote sensing images of power transmission channels;
[0196] The tree barrier hidden danger detection module 720 is used to use the transmission channel remote sensing image as input, call the trained transmission channel tree barrier hidden danger detection model, and obtain the tree barrier hidden danger detection result. The transmission channel tree barrier hidden danger detection model is trained based on the transmission channel tree barrier hidden danger detection model training method described in the claims;
[0197] The early warning module 730 is used to issue an early warning based on the tree obstacle hidden danger detection result.
[0198] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig.11As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for training a transmission channel tree barrier hidden danger detection model and the steps in the embodiment of the transmission channel tree barrier hidden danger detection method are implemented.
[0199] Those skilled in the art will understand that Fig.11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0200] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps in any one of the above-mentioned embodiments of the training method for detecting tree barrier hazards in a power transmission channel and the steps in the embodiment of the method for detecting tree barrier hazards in a power transmission channel are implemented.
[0201] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in any one of the above-mentioned transmission channel tree barrier hazard detection model training method embodiments and the steps in the transmission channel tree barrier hazard detection method embodiments are implemented.
[0202] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the steps in any one of the above-mentioned transmission channel tree barrier hazard detection model training method embodiments and the steps in the transmission channel tree barrier hazard detection method embodiments.
[0203] It should be noted that the data involved in this application (including but not limited to data used for analysis, storage, display, etc.) are all data fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0204] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but is not limited thereto.
[0205] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0206] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for training a tree barrier hazard detection model for a power transmission channel, characterized in that: The method comprises: Acquire a historical transmission channel remote sensing image, wherein the historical transmission channel remote sensing image includes a category label and location information of a real frame of a tree barrier area; Taking the historical transmission channel remote sensing image as input, calling the constructed initial transmission channel tree barrier hidden danger detection model, so that the initial transmission channel tree barrier hidden danger detection model respectively captures the features of different levels of the historical transmission channel remote sensing image through the convolution kernels of different dimensions in the multidimensional convolution module, generates a transmission channel tree barrier feature map based on the features of different levels, and inputs the transmission channel tree barrier feature map into the channel space attention fusion module, the channel space attention fusion module performs a weighted operation on the attention of the transmission channel tree barrier feature map in the channel dimension and the spatial dimension to obtain a transmission channel tree barrier feature enhancement map, based on the transmission channel tree barrier feature enhancement map and the features of different levels, determines the category, location information and confidence of the prediction box, the prediction box is used to identify the tree barrier area in the historical transmission channel remote sensing image, the features of different levels include the global features and local features of the historical transmission channel remote sensing image, and the initial transmission channel tree barrier hidden danger detection model includes a multidimensional convolution module and a channel space attention fusion module; Determine an error between the predicted frame and the true frame based on the category label and position information of the true frame, and the category, position information, and confidence of the predicted frame; Based on the error, the parameters of the initial power transmission channel tree obstacle hazard detection model are iteratively updated until a preset training end condition is reached, thereby obtaining a trained power transmission channel tree obstacle hazard detection model.
2. The method according to claim 1, characterized in that The initial power transmission channel tree obstacle hidden danger detection model includes a first feature extraction module and a second feature extraction module; The initial power transmission channel tree obstacle hazard detection model captures the features of different levels of the historical power transmission channel remote sensing image through convolution kernels of different dimensions in the multidimensional convolution module, and generates a power transmission channel tree obstacle feature map based on the features of different levels, including: Extracting features of the historical power transmission channel remote sensing image by the first feature extraction module to obtain a first feature map; Capturing features of different levels of the first feature map based on convolution kernels of different dimensions in the multidimensional convolution module to obtain a second feature map; Extracting features of the second feature map by the second feature extraction module to obtain a third feature map; Based on the second feature extraction module and the multi-dimensional convolution module, the features of the third feature map at different scales are extracted to obtain a tree barrier feature map of the power transmission channel.
3. The method according to claim 2, characterized in that The convolution kernels of different dimensions in the multidimensional convolution module respectively capture features of different levels of the first feature map to obtain a second feature map, including: Performing convolution operations on the first feature map using convolution kernels of different dimensions in the multidimensional convolution layer to obtain a global feature map and a local feature map; The global feature map and the local feature map are subjected to feature fusion to obtain a first feature fusion map, and the first feature fusion map is processed based on the activation function in the multidimensional convolutional layer to obtain a second feature map.
4. The method according to claim 3, characterized in that The number of the multidimensional convolution module and the second feature extraction module is multiple; based on the second feature extraction module and the multidimensional convolution module, the features of the third feature map at different scales are extracted to obtain a tree barrier feature map of the power transmission channel, including: Respectively connecting the output end of each of the multidimensional convolutional layers with the input end of each of the second feature extraction modules to obtain a first feature extraction combination module, a second feature extraction combination module and a third feature extraction combination module; Extracting features of the third feature map by using the first feature extraction and combination module to obtain a first scale feature map; Extracting features of the first scale feature map by the second feature extraction and combination module to obtain a second scale feature map; The features of the second scale feature map are extracted by the third feature extraction combination module to obtain a tree barrier feature map for a power transmission channel.
5. The method according to claim 4, characterized in that The channel space attention fusion module performs a weighted operation on the attention of the transmission channel tree obstacle feature map in the channel dimension and the space dimension to obtain a transmission channel tree obstacle feature enhancement map, including: Performing a convolution operation on the power transmission channel tree barrier feature map through the convolution layer in the channel space attention fusion module to obtain a first power transmission channel tree barrier feature map; Processing the first power transmission channel tree barrier feature map through the activation function in the channel space attention fusion module to obtain a second power transmission channel tree barrier feature map; Performing a convolution operation on the tree barrier feature map of the power transmission channel through the convolution layer in the channel space attention fusion module to obtain a spatial weight map; A spatial weighting operation is performed on the spatial weight map and the power transmission channel tree barrier feature map to obtain a power transmission channel tree barrier feature enhancement map.
6. The method according to claim 4, characterized in that The determining of the category, location information and confidence of the prediction box based on the tree barrier feature enhancement map of the power transmission channel and features at different levels includes: The first feature map, the second feature map and the transmission channel tree barrier feature enhancement map are respectively subjected to feature fusion and feature extraction by the feature fusion module and the multidimensional convolution module in the initial transmission channel tree barrier hidden danger detection model to obtain a first scale feature map, a second scale feature map and a third scale feature map; The first scale feature fusion map, the second scale feature fusion map and the third scale feature fusion map are input into the target prediction head of the initial transmission channel tree obstacle hazard detection model to generate multiple prediction boxes, and the category, location information and confidence of each prediction box are output.
7. The method according to claim 6, characterized in that The determining the error between the predicted frame and the true frame based on the category label and position information of the true frame, and the category, position information and confidence of the predicted frame includes: Determine an intersection-over-union ratio between the real frame and the predicted frame based on the position information of the real frame and the position information of the predicted frame; Based on the intersection-over-union ratio, determining a prediction box loss value between the real box and the prediction box; Determine a category loss value between the real frame and the predicted frame according to the category label of the real frame, the category of the predicted frame and a preset loss function; Determine a confidence loss value between the real frame and the predicted frame according to the intersection-over-union ratio of the real frame and the predicted frame, and the confidence of the predicted frame; The error between the predicted box and the true box is determined according to the predicted box loss value, the category loss value and the confidence loss value.
8. The method according to claim 7, characterized in that The determining, based on the intersection-over-union ratio, a prediction frame loss value between the real frame and the prediction frame comprises: Determine a minimum bounding box between the real box and the predicted box; Determine an intersection-over-union loss value between the real box and the predicted box based on the minimum bounding box, the sizes of the real box and the predicted box, and the intersection-over-union ratio; Based on a preset IoU upper threshold and a preset IoU lower threshold, the IoU is converted into an IoU loss weight through linear interval mapping, and the predicted box loss value between the real box and the predicted box is obtained according to the IoU loss value and the IoU loss weight.
9. A method for detecting tree obstacle hazards in power transmission channels, characterized in that: The method comprises: Acquire remote sensing images of power transmission channels; Taking the remote sensing image of the power transmission channel as input, calling a trained power transmission channel tree barrier hazard detection model to obtain a tree barrier hazard detection result, wherein the power transmission channel tree barrier hazard detection model is trained based on the power transmission channel tree barrier hazard detection model training method according to any one of claims 1 to 8; An early warning is issued based on the tree obstacle hidden danger detection result.
10. A transmission channel tree obstacle hidden danger detection model training device, characterized in that: The device comprises: An image acquisition module, used to acquire a historical transmission channel remote sensing image, wherein the historical transmission channel remote sensing image contains a category label and location information of a real frame of a tree barrier area; A model training module, used to take the historical transmission channel remote sensing image as input, call the constructed initial transmission channel tree barrier hidden danger detection model, so that the initial transmission channel tree barrier hidden danger detection model respectively captures the features of different levels of the historical transmission channel remote sensing image through the convolution kernels of different dimensions in the multidimensional convolution module, generates a transmission channel tree barrier feature map based on the features of different levels, and inputs the transmission channel tree barrier feature map into the channel space attention fusion module, the channel space attention fusion module performs a weighted operation on the attention of the transmission channel tree barrier feature map in the channel dimension and the spatial dimension to obtain a transmission channel tree barrier feature enhancement map, and determines the category, location information and confidence of the prediction box based on the transmission channel tree barrier feature enhancement map and the features of different levels, the prediction box is used to identify the tree barrier area in the historical transmission channel remote sensing image, the features of different levels include the global features and local features of the historical transmission channel remote sensing image, and the initial transmission channel tree barrier hidden danger detection model includes a multidimensional convolution module and a channel space attention fusion module; An error determination module, configured to determine an error between the predicted box and the true box based on the category label and position information of the true box, and the category, position information and confidence of the predicted box; A parameter updating module is used to iteratively update the parameters of the initial power transmission channel tree obstacle hazard detection model based on the error until a preset training end condition is reached to obtain a trained power transmission channel tree obstacle hazard detection model.
Citation Information
Patent Citations
YOLOV4 remote sensing target detection method fusing feature transfer and attention mechanism
CN115497005A
Power transmission line pin state identification method based on improved YOLOv5 model
CN116778297A
Power transmission line inspection image detection method based on deep convolutional neural network
CN117541535A
Railway environmental hidden danger identification and risk level evaluation method based on unmanned aerial vehicle image
CN119027837A
Power transmission channel hidden danger identification method and system fusing optical and radar remote sensing
CN119274060A
Cited By
Lightweight YOLOv11 transformer substation abnormal behavior detection method based on QD optimization
CN121392980A