Lightweight risk target detection method and device for electric power remote sensing data
By introducing deep separable convolution and CIoU non-maximum suppression algorithms in the YOLOv5 model, the lightweight risk target detection method for power remote sensing data is optimized, and the problems of low computing efficiency and difficult deployment of existing methods are solved, achieving efficient and accurate target detection.
Patent Information
- Application Number
- CN202411890025.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-20
AI Technical Summary
The existing deep learning methods have low computing efficiency, large model parameters, and difficult deployment in power remote sensing applications, making it difficult to reduce computing overhead and model delay while ensuring detection accuracy.
The lightweight risk object detection method based on the YOLOv5 model is adopted, and the network structure and loss function are optimized and the calculation amount and parameter amount are reduced by introducing a deep separable convolution mechanism and a non-maximum suppression algorithm based on CIoU.
It realizes efficient and lightweight target detection in power remote sensing scenarios, improves real-time and deployment efficiency, reduces computing costs and storage requirements, and ensures accurate identification of risk targets in power facilities.
Smart Images

Figure CN119723059A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computing models, and in particular to a lightweight risk target detection method for electric power remote sensing data. Background Art
[0002] As an important means of power inspection, power remote sensing technology has been widely used in the monitoring and maintenance of power facilities such as transmission lines and substations, overcoming many limitations of traditional manual inspections in large-scale power facility inspections, such as high cost, low efficiency and human errors.
[0003] With the maturity of deep learning technology, remote sensing image target detection methods based on convolutional neural networks have gradually replaced traditional target detection methods. However, existing deep learning methods often ignore computational efficiency and model lightweight while pursuing accuracy, which is particularly prominent in power remote sensing applications. The real-time requirements of power remote sensing scenes and the limitations on equipment hardware resources make efficient and lightweight target detection models a research focus. How to reduce computational overhead and model latency while ensuring model detection accuracy has become a key challenge facing power remote sensing target detection technology. Summary of the invention
[0004] In order to solve the above problems, the purpose of the present invention is to provide a lightweight risk target detection method for power remote sensing data, which solves the problems of large number of target model parameters, low computational efficiency and great deployment difficulty in power remote sensing scenarios.
[0005] To achieve the above object, the present invention adopts the following technical solutions:
[0006] Technical Solution 1
[0007] A lightweight risk target detection method for electric power remote sensing data comprises the following steps: collecting electric power remote sensing image data and marking risk information on the image; preprocessing the marked image to make the image diverse; building a risk target prediction model: based on the YOLOv5 model, introducing a deep separable convolution mechanism in its backbone network to extract and fuse features of the image; dividing the image into a plurality of grids and inputting the prediction model, the prediction model predicts the bounding box position and category of the target falling into the grid, and each grid predicts multiple bounding boxes; using a CIoU-based non-maximum suppression algorithm to screen multiple predicted bounding boxes of each grid, filter overlapping predicted bounding boxes, obtain the screened best bounding box, and then determine the position and category of the target.
[0008] Preferably, the depthwise separable convolution mechanism includes two parts: channel-by-channel convolution and point-by-point convolution. For the input feature map, channel-by-channel convolution is first performed, with one convolution kernel responsible for one channel. The outputs of all convolution kernels are concatenated to obtain the final output, and the number of channels is not changed in the process:
[0009] P dw =D k ×D k ×M×D F ×D F
[0010] Among them, M×D F ×D F is the size of the input feature map, D F ×D F Represents the height and width of the input feature map, M represents the number of channels of the input feature matrix, and the convolution kernel size is D k ×D k , after channel-by-channel convolution, point-by-point convolution is performed, using a 1×1 convolution kernel. The number of output channels changes with the number of convolution kernels, as shown in the following formula:
[0011] P pw =M×N×D F ×D F
[0012] Among them, N represents the number of convolution kernels. Point-by-point convolution not only enables the network to flexibly transform the output channel dimension, but also realizes feature fusion between channels for the feature map output in the channel-by-channel convolution.
[0013] Preferably, the predicted bounding box output by the prediction model includes the following attribute information: (x, y), (w, h), confidence s, multiple categories of the target and the probability of each category; wherein (x, y) represents the coordinates of the center of the predicted bounding box relative to the grid unit, (w, h) represents the width and height of the predicted bounding box, the confidence s reflects whether there is a target in the bounding box and the accuracy of the predicted bounding box, the category represents the risk level of the identified power facilities, and the predicted bounding box screening based on the CIoU non-maximum suppression algorithm, under the conditions of considering the center point distance and the aspect ratio, the optimal bounding box expression is screened according to the degree of overlap as follows:
[0014]
[0015] Among them, s i represents the confidence of each predicted bounding box output by the prediction model, M is the predicted bounding box with the highest current score, and b i is one of the remaining candidate predicted bounding boxes, N i is the set threshold;
[0016] Preferably, a multi-task loss function is used to optimize the prediction model, including the classification loss L cls , confidence loss L obj and the prediction box regression loss L loc , the total loss function formula of the prediction model is: L = λ1L cls +λ2L obj +λ3L loc , where λ1, λ2, and λ3 are the preset weight values for model training. The prediction model is trained through the power remote sensing image dataset, the loss function is calculated, and the model is continuously trained and optimized.
[0017] Preferably, the confidence loss L obj , expressed as the following formula:
[0018]
[0019] Among them, s is the confidence level, and its value ranges from [0,1]. is the existence of the target corresponding to the true label, and its value can only be 0 or 1. β is a fixed weight coefficient. The larger the β is, the greater the contribution provided by the positive sample is, and the lower the contribution of the negative sample is. τ is the attenuation coefficient that is adaptive to the probability size. It gives a greater attenuation to simple samples with larger s values, reducing their contribution and making the network focus on learning difficult samples.
[0020] Preferably, the prediction box regression loss L loc The position difference between the predicted bounding box and the true bounding box is measured. In order to adapt to the different sizes and shapes of power equipment targets, a more robust CIoU is adopted, which is expressed as follows:
[0021]
[0022] Among them, IoU represents the intersection-over-union ratio between the real bounding box and the predicted bounding box, ρ 2 (b,b gt ) represents the Euclidean distance between the center points of the true bounding box and the predicted bounding box, c 2 is the Euclidean distance between the diagonal of the minimum circumscribed rectangle of the real bounding box and the predicted bounding box, α is the weight parameter, v is used to measure the similarity of aspect ratio, and w gt 、h gt is the width and height of the true bounding box, w and h are the width and height of the predicted bounding box.
[0023] Preferably, the class loss L cls To measure the prediction accuracy of the target category, a binary cross entropy loss function is used:
[0024]
[0025] Among them, yi represents 0 or 1, p(y i ) is the output label y i probability.
[0026] Based on the same inventive concept, the present invention also provides a lightweight risk target detection device for electric power remote sensing data.
[0027] Technical Solution 2
[0028] A lightweight risk target detection device for electric power remote sensing data includes a memory storing an executable program and a processor, wherein the processor runs the program and executes the method steps described in technical solution one.
[0029] The present invention has the following beneficial effects:
[0030] 1. The present invention optimizes the network structure and loss function of the YOLOv5 model and adopts deep separable convolution to reduce the calculation amount and parameter amount of the model, improve real-time performance, and enable the model to run efficiently in a low-resource environment. It is particularly suitable for the deployment of mobile devices and edge computing devices with high deployment efficiency.
[0031] 2. By introducing the CIoU-based non-maximum suppression method, the present invention effectively solves the problems of misjudgment and missed detection in traditional methods in high-density target detection and complex backgrounds, and further optimizes the precision of target detection and positioning accuracy.
[0032] 3. The present invention introduces Focal loss, which can better balance the contribution of various samples in the data set.
[0033] 4. The present invention adopts a variety of data enhancement strategies to improve the robustness and adaptability of the model, ensuring that the model can maintain good detection effects under different environments and lighting conditions.
[0034] 5. The present invention improves the model's ability to detect risky targets in power remote sensing images, significantly reduces computing costs and storage requirements while ensuring high accuracy, and provides more efficient and reliable technical support for intelligent risk monitoring in power inspections. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION
[0036] In order to solve the problems of large number of parameters, low computational efficiency and high deployment difficulty of target detection model in power remote sensing scenario, the present invention provides an efficient and lightweight risk target detection method. The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:
[0037] Embodiment 1
[0038] See also Figure 1 , a lightweight risk target detection method for power remote sensing data, including the following steps:
[0039] Step 1: Collect power remote sensing image data and mark risk information on the image. In order to implement risk control of power facilities, remote sensing image data of power facilities covering different geographical areas and diverse environmental conditions are comprehensively collected. The targets of data collection include but are not limited to key power facilities such as power lines, substations, towers, and substation equipment. During the collection process, ensure that the images cover various weather and lighting conditions and fully represent environmental changes that may affect the safety of power facilities. Specifically, the collected remote sensing images include the following important dimensions: weather conditions, lighting conditions, geographical location, and equipment type. All images are detailedly marked with risk location bounding boxes, that is, the real bounding boxes described below, and different risk levels C are assigned according to the specific conditions of the power facilities. The risk level can be comprehensively assessed based on factors such as the degree of facility aging, historical fault records, and external environmental impacts. After the data collection is completed, it is divided into training sets and test sets in a reasonable proportion. The training set accounts for 70% of the data set and is used for model training and tuning; the test set accounts for 30% and is used for model verification and evaluation. When dividing the data, ensure that all types of scenarios (different weather, lighting, device types, etc.) are fully represented in the training set and test set to ensure the fairness and accuracy of training and evaluation.
[0040] Step 2: Preprocess the annotated images to ensure that the data input to the prediction model has good diversity. The input images are preprocessed through Mosaic data enhancement, adaptive image scaling, and adaptive bounding box calculation. Mosaic data enhancement is to splice four images by random scaling, random cropping, and random arrangement to enrich the training data and make the network more robust. Adaptive bounding box calculation is to calculate the cluster center as the initial bounding box based on the sample data. Adaptive image scaling adaptively adds the least black border to the scaled image, changes the aspect ratio of the image to reach the standard size, and further speeds up the network's reasoning.
[0041] Step 3, construct a risk target prediction model. For the target recognition task of power remote sensing images, a lightweight model design is required. Therefore, the present invention is based on the YOLOv5 model and introduces a lightweight deep separable convolution mechanism in its backbone network to perform feature extraction and feature fusion on the image. The deep separable convolution mechanism specifically includes two parts: channel-by-channel convolution and point-by-point convolution. For the input feature map, channel-by-channel convolution is first performed. One convolution kernel is responsible for one channel. The outputs of all convolution kernels are spliced together to obtain the final output. The number of channels is not changed in this process. The expression is: P dw =Dk ×D k ×M×D F ×D F ; Among them, M×D F ×D F is the size of the input feature map, D F ×D F Represents the height and width of the input feature map, M represents the number of channels of the input feature matrix, and the convolution kernel size is D k ×D k , after channel-by-channel convolution, point-by-point convolution is performed, using a 1×1 convolution kernel. The number of output channels changes with the number of convolution kernels, and the expression is: P pw =M×N×D F ×D F ; Where N represents the number of convolution kernels. Point-by-point convolution not only enables the network to flexibly transform the output channel dimension, but also realizes feature fusion between channels for the feature map output in channel-by-channel convolution.
[0042] Step 4: Divide the image into several grids and input them into the prediction model. Perform a single forward pass through the prediction model for each grid. At the same time, predict the bounding box position and category of the target falling into the grid, and predict B bounding boxes for each grid. Each predicted bounding box includes the following attribute information: (x, y), (w, h), confidence s, multiple categories of the target, and the probability of each category; where (x, y) represents the coordinates of the center of the predicted bounding box relative to the grid unit, (w, h) represents the width and height of the predicted bounding box, the confidence s reflects whether there is a target in the predicted bounding box and the accuracy of the predicted bounding box, and the category represents the identified target, that is, the risk level of the power facility.
[0043] Step 5: Screening of predicted bounding boxes. In the predicted bounding boxes, there may be multiple overlapping boxes representing the same target. In order to eliminate redundant predicted bounding boxes, the CIoU-based non-maximum suppression algorithm is used. Under the conditions of considering the center point distance and aspect ratio, the best bounding box is screened according to the degree of overlap. The calculation formula is as follows:
[0044]
[0045] Among them, s i Represents the confidence of each predicted bounding box output by the prediction model, M is the predicted bounding box with the highest confidence, and b i is one of the remaining candidate predicted bounding boxes, N i is the set threshold, IoU represents the intersection-over-union ratio between the candidate predicted bounding box and the true bounding box, represents the intersection-over-union ratio of the predicted bounding box with the highest confidence and the candidate bounding box, ρ 2 (M,bi ) represents the Euclidean distance between the center point of the predicted bounding box with the highest confidence and the center point of the candidate predicted bounding box, is the Euclidean distance between the diagonal of the smallest circumscribed rectangle of the predicted bounding box with the highest confidence and the candidate predicted bounding box, α is the weight parameter, Used to measure the similarity of aspect ratio, w m 、h m is the width and height of the predicted bounding box with the highest confidence, and w and h are the width and height of the candidate predicted bounding box. CIoU is used to evaluate the geometric matching degree between the predicted bounding box with the highest confidence and the candidate predicted bounding box, which takes into account both the center point distance and diagonal distance of the two, as well as the geometric shapes of the two, such as the aspect ratio. Therefore, the similarity between the predicted bounding box with the highest confidence and the candidate predicted bounding box can be measured more accurately, especially when the shape and size of the target are irregular. The predicted bounding boxes with two distant center points and large IoU may be located on different targets and will not be deleted, which will reduce the probability of missed detection of the target.
[0046] The location and category of the target are determined based on the attribute information of the best predicted bounding box that is filtered out, where the category with the highest probability can be selected as the output category.
[0047] Step 6: Use a multi-task loss function to optimize the prediction model, including the classification loss L cls , confidence loss L obj and the prediction box regression loss L loc , the total loss function formula of the prediction model is: L = λ1L cls +λ2L obj +λ3L loc , where λ1, λ2, and λ3 are the preset weight values for model training. The prediction model is trained through the power remote sensing image dataset, the loss function is calculated, and the model is continuously trained and optimized.
[0048] Confidence loss L obj The confidence loss L is used to measure whether the predicted bounding box correctly predicts the target and penalize the confidence of the background box. In order to avoid too many negative samples affecting the optimization of the model, the present invention adopts Focal Loss for the confidence loss. By reducing the loss information weight of easy-to-classify samples, the model is more focused on difficult-to-classify samples during training, thereby partially alleviating the problem of imbalance between positive and negative samples caused by the small target ratio and dense prediction of multiple predicted bounding boxes in detection. obj The formula is as follows:
[0049]
[0050] Among them, s is the confidence of the predicted bounding box, and its value ranges from [0,1]. is the existence of the target corresponding to the true label, and its value can only be 0 or 1. β is a fixed weight coefficient. The larger the β is, the greater the contribution provided by the positive sample is, and the lower the contribution of the negative sample is. τ is the attenuation coefficient that is adaptive to the probability size. It gives a greater attenuation to simple samples with larger s values, reducing their contribution and making the network focus on learning difficult samples.
[0051] The prediction box regression loss L loc The position difference between the predicted bounding box and the true bounding box is measured. In order to adapt to the different sizes and shapes of power equipment targets, a more robust CIoU is adopted, which is expressed as follows:
[0052]
[0053] Among them, IoU represents the intersection-over-union ratio between the real bounding box and the predicted bounding box, ρ 2 (b,b gt ) represents the Euclidean distance between the center points of the true bounding box and the predicted bounding box, c 2 is the Euclidean distance between the diagonal of the minimum circumscribed rectangle of the real bounding box and the predicted bounding box, α is the weight parameter, v is used to measure the similarity of aspect ratio, and w gt 、h gt is the width and height of the true bounding box, w, h are the width and height of the predicted bounding box. This loss takes into account the center point distance and diagonal distance between the true bounding box and the predicted bounding box, so it can more accurately measure the similarity between the two bounding boxes, especially when the target shape and size are irregular.
[0054] The class loss L cls To measure the prediction accuracy of the target category, a binary cross entropy loss function is used:
[0055]
[0056] Among them, y i represents 0 or 1, p(y i ) is the output label y i As a loss function, binary cross entropy is used to evaluate the quality of the prediction results. When the label y is 1, the value of the loss function should approach 0 as the predicted value p(y) approaches 1. Conversely, the value of the loss function will become very large when the predicted value p(y) approaches 0. The loss is small when the predicted value is close to the label value, and it is large when the predicted value is far from the label value.
[0057] The present invention establishes a standardized process for target detection in electric power remote sensing images by introducing an efficient and lightweight risk target detection method based on YOLOv5. The lightweight depth-separable convolution mechanism reduces the computational complexity and storage requirements while maintaining detection accuracy, enabling the model to run efficiently in a low-resource environment, and is particularly suitable for deployment on mobile devices and edge computing devices. At the same time, the non-maximum suppression technology based on CIoU effectively solves the problem of missed detection in high-density target detection by traditional methods, further improves the accuracy of target positioning, and ensures the accurate identification of key risk targets in power facilities. Furthermore, the introduction of Focal loss can better balance the contribution of various samples in the data set. Deploying the pre-trained model to the remote sensing monitoring platform of the power system can achieve risk warning and level monitoring.
[0058] Based on the same inventive concept, the present invention further provides an implementation of an electronic device corresponding to the first embodiment, see the second embodiment for details.
[0059] Embodiment 2
[0060] A lightweight risk target detection device for electric power remote sensing data includes a memory storing an executable program and a processor, wherein the processor runs the program to execute the method steps described in the first embodiment.
[0061] Since the electronic device introduced in this embodiment is a device used to implement the method in the first embodiment of the present application, based on the method introduced in the first embodiment of the present application, a person skilled in the art can understand the specific implementation of the electronic device of the present embodiment and its various variations, so how the electronic device implements the method in the first embodiment of the present application is not described in detail here. As long as the device used by a person skilled in the art to implement the method in the first embodiment of the present application belongs to the scope of protection of the present application.
[0062] The above description is only a specific implementation mode of the present invention, and does not limit the patent scope of the present invention. Any equivalent structural transformation made by using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A lightweight risk target detection method for power remote sensing data, characterized by: The steps include: Collect power remote sensing image data and mark risk information on the image; Preprocess the annotated images to make them diverse; Construct a risk target prediction model: Based on the YOLOv5 model, a deep separable convolution mechanism is introduced into its backbone network to extract and fuse features of images; The image is divided into a plurality of grids and then input into the prediction model, the prediction model predicts the bounding box position and category of the object falling into the grid, and each grid predicts multiple bounding boxes; The CIoU-based non-maximum suppression algorithm is used to screen multiple predicted bounding boxes of each grid, filter out overlapping predicted bounding boxes, obtain the best filtered bounding box, and then determine the location and category of the target.
2. According to claim 1, a lightweight risk target detection method for power remote sensing data is characterized by: The depth-wise separable convolution mechanism consists of two parts: channel-by-channel convolution and point-by-point convolution. For the input feature map, channel-by-channel convolution is first performed. One convolution kernel is responsible for one channel. The outputs of all convolution kernels are concatenated to obtain the final output. The number of channels does not change in this process: P dw =D k ×D k ×M×D F ×D F Among them, M×D F ×D F is the size of the input feature map, D F ×D F Represents the height and width of the input feature map, M represents the number of channels of the input feature matrix, and the convolution kernel size is D k ×D k , after channel-by-channel convolution, point-by-point convolution is performed, using a 1×1 convolution kernel. The number of output channels changes with the number of convolution kernels, as shown in the following formula: P pw =M×N×D F ×D F Among them, N represents the number of convolution kernels. Point-by-point convolution not only enables the network to flexibly transform the output channel dimension, but also realizes feature fusion between channels for the feature map output in the channel-by-channel convolution.
3. The lightweight risk target detection method for electric power remote sensing data according to claim 1 is characterized by: The prediction bounding box output by the prediction model includes the following attribute information: (x, y), (w, h), confidence s, multiple categories of the target and the probability of each category; where (x, y) represents the coordinates of the center of the prediction bounding box relative to the grid unit, (w, h) represents the width and height of the prediction bounding box, the confidence s reflects whether there is a target in the bounding box and the accuracy of the prediction bounding box, and the category represents the risk level of the identified power facility; The prediction bounding box screening based on the CIoU non-maximum suppression algorithm takes into account the center point distance and aspect ratio, and the optimal bounding box expression is screened according to the degree of overlap as follows: Among them, s i Represents the confidence of each predicted bounding box output by the prediction model, M is the predicted bounding box with the highest confidence, and b i is one of the remaining candidate prediction bounding boxes, N i is the set threshold, IoU represents the intersection-over-union ratio between the candidate predicted bounding box and the true bounding box, represents the intersection-over-union ratio of the predicted bounding box with the highest confidence and the candidate bounding box, ρ 2 (M,b i ) represents the Euclidean distance between the center point of the predicted bounding box with the highest confidence and the center point of the candidate predicted bounding box, is the Euclidean distance between the diagonal of the smallest circumscribed rectangle of the predicted bounding box with the highest confidence and the candidate predicted bounding box, α is the weight parameter, Used to measure the similarity of aspect ratio, w m 、h m is the width and height of the predicted bounding box with the highest confidence, and w and h are the width and height of the candidate predicted bounding box.
4. The lightweight risk target detection method for electric power remote sensing data according to claim 1 is characterized by: A multi-task loss function is used to optimize the prediction model, including the classification loss L cls , confidence loss L obj and the prediction box regression loss L loc , the total loss function formula of the prediction model is: L = λ1L cls +λ2L obj +λ3L loc , where λ1, λ2, and λ3 are the preset weight values for model training. The prediction model is trained through the power remote sensing image dataset, the loss function is calculated, and the model is continuously trained and optimized.
5. The lightweight risk target detection method for electric power remote sensing data according to claim 4 is characterized by: The confidence loss L obj , expressed as the following formula: Among them, s is the confidence level, and its value ranges from [0,1]. is the existence of the target corresponding to the true label, and its value can only be 0 or 1. β is a fixed weight coefficient. The larger the β is, the greater the contribution provided by the positive sample is, and the lower the contribution of the negative sample is. τ is the attenuation coefficient that is adaptive to the probability size. It gives a greater attenuation to simple samples with larger s values, reducing their contribution and making the network focus on learning difficult samples.
6. A lightweight risk target detection method for electric power remote sensing data according to claim 4, characterized in that: The prediction box regression loss L loc The position difference between the predicted bounding box and the true bounding box is measured. In order to adapt to the different sizes and shapes of power equipment targets, a more robust CIoU is adopted, which is expressed as follows: Among them, IoU represents the intersection-over-union ratio between the real bounding box and the predicted bounding box, ρ 2 (b,b gt ) represents the Euclidean distance between the center points of the true bounding box and the predicted bounding box, c 2 is the Euclidean distance between the diagonal of the minimum circumscribed rectangle of the real bounding box and the predicted bounding box, α is the weight parameter, v is used to measure the similarity of aspect ratio, and w gt 、h gt is the width and height of the true bounding box, w and h are the width and height of the predicted bounding box.
7. The lightweight risk target detection method for electric power remote sensing data according to claim 4 is characterized by: The class loss L cls To measure the prediction accuracy of the target category, a binary cross entropy loss function is used: Among them, y i represents 0 or 1, p(y i ) is the output label y i probability.
8. A lightweight risk target detection device for power remote sensing data, characterized by: It comprises a memory storing an executable program and a processor, wherein the processor runs the program to execute the method steps described in any one of claims 1 to 7.
Citation Information
Patent Citations
Workpiece category and pose estimation method based on YOLOv4-tiny model
CN115100136A
Lightweight garbage detection method based on improved YOLOv3
CN115908833A
Light-weight YOLOv4-based photosensitive element defect detection method
CN116703830A
AU2020101011A4