Telegraph pole target detection method and equipment based on unmanned aerial vehicle, and medium
By identifying the inspection area and planning the flight path during UAV power line inspection, and combining image processing with a cross-modal detection model, the detection challenges in complex terrain and low-light environments were solved, achieving efficient and accurate detection of utility poles.
Patent Information
- Application Number
- CN202511490446.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-17
- Publication Date
- 2026-02-17
AI Technical Summary
Unmanned aerial vehicle (UAV) power line inspection faces challenges such as redundant path planning or collision risks, difficulty in target feature extraction, and low detection accuracy in complex terrain and low-light environments. Traditional methods are inefficient and lack sufficient security.
By determining the area to be inspected, planning the flight path of the UAV, and combining the cross-modal detection model for image weight matching, feature extraction and fusion processing, and combining tilt angle judgment, the detection accuracy and anti-interference ability are improved.
This has enabled efficient coverage and accurate detection through drone inspections, reduced the risk of false positives and missed positives, and improved the accuracy and safety of utility pole inspections.
Smart Images

Figure CN121544523A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this application relate to, but are not limited to, the field of drone and power equipment detection, and particularly to a method, device and medium for detecting utility pole targets based on drones. Background Technology
[0002] Due to their efficiency, safety, and flexibility, unmanned aerial vehicles (UAVs) are widely used for power line inspection in high-voltage and complex terrain scenarios. my country's power grid is vast, with an increasing number of power poles and the risk of tilting. Therefore, efficient and accurate detection has become a core issue in ensuring power grid safety, and current practices still face multiple challenges.
[0003] From a practical application perspective, in complex terrain, power transmission lines in mountainous areas are distributed along ridges and valleys, making traditional PSO algorithms prone to getting trapped in local optima, leading to path redundancy or collision risks. Urban utility poles are subject to interference from dense buildings, making target feature extraction difficult. In terms of lighting, low-light environments increase noise and reduce contrast in visible light images, decreasing the accuracy of single-modal detection and making it easy to miss detections in extreme cases. Although infrared modes can capture temperature features, they lack texture details and are susceptible to interference from cross-modal noise.
[0004] However, traditional detection methods have significant drawbacks: manual inspection is inefficient, costly, and poses safety risks; single-modal image processing lacks robustness; and deep learning models have limited resistance to interference from complex backgrounds. In path planning, traditional PSO algorithms have weak global search capabilities, and their obstacle avoidance efficiency fails to meet real-time and safety requirements. Summary of the Invention
[0005] The following is an overview of the subject matter described in detail herein. This overview is not intended to limit the scope of the claims.
[0006] This application provides a method, device, and medium for detecting utility poles based on unmanned aerial vehicles (UAVs). By determining the area to be inspected and planning the path, processing the cross-modal detection model, and judging the tilt angle, it effectively improves the efficiency of UAV inspection and the accuracy of utility pole detection.
[0007] In a first aspect, embodiments of this application provide a method for detecting utility pole targets based on unmanned aerial vehicles (UAVs), comprising: determining a region to be inspected; planning a flight path for the UAV based on the region to be inspected; controlling the UAV to inspect the region to be inspected according to the flight path and collecting target images; performing weighted matching on the target images according to a preset cross-modal detection model to obtain a matching result; performing feature extraction and fusion processing on the target images to obtain a feature map set; obtaining a detection result based on the matching result and the feature map set; and determining the tilt angle of the target utility pole in the target image based on the detection result to obtain a target detection result.
[0008] In one embodiment of this application, the step of planning the flight path of a UAV based on the area to be inspected includes: acquiring the starting location, obstacle distribution information, and flight area boundary of the area to be inspected; generating an initial particle swarm based on the obstacle distribution information and the starting location using Gaussian distribution guided particles; dynamically adjusting the inertia weight and mutation probability of the initial particle swarm based on the obstacle distribution information, and performing a cross-mutation operation on the adjusted initial particle swarm to obtain an iterative particle swarm; establishing a multi-dimensional cost function based on the flight area boundary, and calculating the cost value of each particle in the iterative particle swarm using path length, obstacle avoidance, and flight area boundary constraints as constraints; iteratively updating the particle swarm based on the cost value of each particle until a preset termination condition is met to obtain the initial path corresponding to the target particle; and smoothing the initial path using a B-spline curve to obtain the flight path of the UAV.
[0009] In one embodiment of this application, before performing weight matching on the target image according to a preset cross-modal detection model, the method further includes: performing noise suppression, geometric correction, illumination equalization, and normalization on the target image to obtain a preliminary processed image; adjusting the size of the preliminary processed image to obtain an initially optimized target image; and performing data augmentation on the initially optimized target image to obtain an optimized target image.
[0010] In one embodiment of this application, the target image includes a visible light image and a corresponding infrared light image; the step of performing weighted matching on the target image according to a preset cross-modal detection model to obtain a matching result includes: inputting the target image into the cross-modal detection model, calculating the cross-modal intersection-union ratio (CUIR) between the visible light image and the infrared light image; determining a first uncertainty weight for the visible light image and a second uncertainty weight for the infrared light image based on the CUIR; and obtaining a matching result based on the first uncertainty weight and the second uncertainty weight.
[0011] In one embodiment of this application, the step of performing feature extraction and fusion processing on the target image to obtain a feature map set includes: extracting features from the visible light image to obtain a first feature map; extracting features from the infrared light image to obtain a second feature map; obtaining a fused feature map based on the first feature map and the second feature map; and obtaining a feature map set based on the first feature map, the second feature map, and the fused feature map.
[0012] In one embodiment of this application, obtaining a detection result based on the matching result and the feature map set includes: calculating a first loss value based on the first feature map and the first uncertainty weight; calculating a second loss value based on the second feature map and the second uncertainty weight; calculating a fusion loss value based on the fusion feature map and the second uncertainty weight; and obtaining a detection result based on the illumination uncertainty weight of the visible light image, the first loss value, the second loss value, and the fusion loss value.
[0013] In one embodiment of this application, obtaining the detection result based on the illumination uncertainty weight of the visible light image, the first loss value, the second loss value, and the fusion loss value includes: obtaining a first initial detection box and a first detection score corresponding to the first loss value; obtaining a second initial detection box and a second detection score corresponding to the second loss value; obtaining a third initial detection box and a third detection score corresponding to the fusion loss value; multiplying the first detection score by the illumination uncertainty weight of the visible light image to obtain a fourth detection score; merging the first initial detection box, the second initial detection box, the third initial detection box, and the first detection score, the second detection score, the third detection score, and the fourth detection score to obtain a candidate bounding box set; and performing a redundancy removal operation on the candidate bounding box set according to a preset redundancy threshold to obtain the detection result.
[0014] In one embodiment of this application, the step of determining the tilt angle of the target utility pole in the target image based on the detection result to obtain the target detection result includes: obtaining the contour information of the target utility pole based on the detection result; obtaining the central axis of the target utility pole based on the contour information; calculating the tilt angle of the target utility pole based on the angle between the central axis and the vertical direction; and obtaining the target detection result based on the tilt angle.
[0015] On the other hand, embodiments of this application provide an electronic device, which includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, it implements the utility pole target detection method described above.
[0016] On the other hand, embodiments of this application provide a computer-readable storage medium storing a processor-executable program, which, when executed by a processor, is used to perform the utility pole target detection method described above.
[0017] This application provides a method, electronic device, and computer-readable storage medium for detecting utility poles based on unmanned aerial vehicles (UAVs). First, the area to be inspected is determined, and the flight path of the UAV is planned according to the area. Then, the UAV is controlled to inspect the area according to the flight path, collecting target images. Next, the target images are weighted and matched according to a preset cross-modal detection model to obtain matching results. Feature extraction and fusion processing are then performed on the target images to obtain a feature map set. Based on the matching results and the feature map set, the detection result is obtained. Subsequently, the tilt angle of the target utility pole in the target image is determined based on the detection result to obtain the target detection result. By first determining the area to be inspected and then planning the flight path, the drone can accurately cover the inspection area according to the preset route, avoiding invalid flights or missed inspection areas, thus improving the execution efficiency of the inspection task. By using the preset cross-modal detection model for weight matching, feature extraction and fusion processing, the multimodal information of the target image can be fully integrated. Through weight matching, high-reliability features are selected and interference information is suppressed. Then, the detection results are obtained by combining the feature map set and the matching results, which effectively reduces the limitations of single-modal detection, improves the accuracy and anti-interference ability of utility pole target detection, and reduces the risk of false detection and missed detection. Attached Figure Description
[0018] Figure 1 This is a flowchart of a utility pole target detection method provided in one embodiment of this application; Figure 2 This is provided in one embodiment of the present application. Figure 1 The detailed flowchart of step 110; Figure 3 This is provided in one embodiment of the present application. Figure 1 The detailed flowchart of step 130; Figure 4 This is provided in one embodiment of the present application. Figure 1 The detailed flowchart of step 150; Figure 5 This is a schematic diagram illustrating the working principle architecture of a cross-modal detection model provided in one embodiment of this application; Figure 6 This is a diagram illustrating the inference process of a cross-modal detection model provided in one embodiment of this application; Figure 7 This is provided in one embodiment of the present application. Figure 1 The detailed flowchart of step 160; Figure 8 This is a schematic diagram of a utility pole tilt detection provided in one embodiment of this application; Figure 9 This is an overall flowchart of a utility pole target detection method provided in one embodiment of this application. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0020] It should be noted that although the flowchart shows a logical order, in some cases, the steps shown or described may be performed in a different order than that shown in the flowchart. The terms "first," "second," etc., used in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the structures, proportions, sizes, etc., depicted in the drawings are only used to complement the content disclosed in the specification for those skilled in the art to understand and read, and are not intended to limit the implementation conditions of this application. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in proportions, or adjustments to size, without affecting the effects and purposes achieved by this application, should still fall within the scope of the technical content disclosed in this application. Similarly, the terms such as "upper," "lower," "left," "right," "middle," and "one" used in this specification are only for clarity of description and are not used to limit the scope of implementation of this application. Changes or adjustments in their relative relationships, without substantially altering the technical content, should also be considered within the scope of implementation of this application.
[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0022] With its significant advantages of efficiency, safety, and flexibility, unmanned aerial vehicle (UAV) power line inspection has been widely applied in high-voltage transmission line monitoring and in complex terrain scenarios such as mountainous and hilly areas. my country's power system is extremely large, and power poles, as indispensable key components of transmission lines, are crucial to the stability and safety of the power grid operation. As the power grid coverage continues to expand, the number of power poles is increasing year by year, and some poles are at risk of tilting and collapsing. Against this backdrop, how to achieve efficient and accurate inspection of power poles has become a core technical issue for ensuring the safe operation of the power grid.
[0023] From a practical application perspective, there are currently many challenges: In complex terrain environments, such as mountainous areas where power transmission lines often follow ridges and valleys, drone inspections not only need to avoid obstacles such as mountains and trees, but also need to ensure the effectiveness of the detection perspective. Traditional path planning algorithms (such as particle swarm optimization, PSO) are prone to getting stuck in local optima in these scenarios, leading to redundant path planning or collision risks. In urban building clusters, the dense background interference of utility poles significantly increases the difficulty of target feature extraction. Regarding lighting conditions, low-light environments such as sunrise, sunset, and rainy weather in field inspections cause a significant increase in visible light image noise and a decrease in contrast, resulting in a significant drop in the accuracy of traditional single-modal (visible light) detection methods. In extreme low-light scenarios such as at night or in tunnels, target misses may even occur. Although infrared modes can capture temperature features in low-light environments, they are highly susceptible to interference from cross-modal noise such as "ghosting" (e.g., heat-generating equipment) due to the lack of texture details. Furthermore, traditional detection methods have significant drawbacks: manual inspection is not only inefficient and costly, but also poses safety hazards due to high-altitude operations; methods based on single-modal image processing lack robustness and struggle to cope with complex backgrounds and sudden changes in lighting; deep learning models have limited resistance to interference from complex backgrounds when processing images captured from high altitudes, especially in low-light scenarios where they struggle to accurately extract target features. At the path planning level, traditional PSO algorithms have weak early-stage global search capabilities and low obstacle avoidance efficiency in complex terrain, failing to meet the real-time and safety requirements of UAV power line inspection.
[0024] In view of this, embodiments of this application provide a method, electronic device, and computer-readable storage medium for detecting utility pole targets based on a drone. The method first determines the area to be inspected and plans the drone's flight path accordingly. Then, the drone is controlled to patrol the area according to the flight path, collecting target images. Next, weighted matching is performed on the target images using a preset cross-modal detection model to obtain matching results. Feature extraction and fusion processing are then performed on the target images to obtain a feature map set. Based on the matching results and the feature map set, a detection result is obtained. Subsequently, the tilt angle of the target utility pole in the target image is determined based on the detection results to obtain the target detection result. By first determining the area to be inspected and then planning the flight path, the drone can accurately cover the inspection area according to the preset route, avoiding invalid flights or missed inspection areas, thus improving the execution efficiency of the inspection task. By using the preset cross-modal detection model for weight matching, feature extraction and fusion processing, the multimodal information of the target image can be fully integrated. Through weight matching, high-reliability features are selected and interference information is suppressed. Then, the detection results are obtained by combining the feature map set and the matching results, which effectively reduces the limitations of single-modal detection, improves the accuracy and anti-interference ability of utility pole target detection, and reduces the risk of false detection and missed detection.
[0025] The embodiments of this application will be further described below with reference to the accompanying drawings.
[0026] Reference Figure 1 , Figure 1 This is a flowchart of the utility pole target detection method provided in the embodiments of this application. The process may specifically include, but is not limited to, steps 110 to 160.
[0027] Step 110: Determine the area to be inspected and plan the flight path of the drone based on the area to be inspected; Step 120: Control the drone to inspect the area to be inspected according to the flight path and collect target images; Step 130: Perform weighted matching on the target image according to the preset cross-modal detection model to obtain the matching result; Step 140: Perform feature extraction and fusion processing on the target image to obtain a feature map set; Step 150: Obtain the detection results based on the matching results and feature map set; Step 160: Determine the tilt angle of the target utility pole in the target image based on the detection results to obtain the target detection results.
[0028] Steps 110 to 160 will be described in detail below.
[0029] In one feasible embodiment, in step 110, the area to be inspected is the key area delineated around the power facilities to be monitored and the surrounding risk areas during drone power line inspection. The core objective is to accurately cover the equipment to be inspected and the potentially affected areas. It includes not only the core facilities themselves, such as utility poles, transmission lines, and substation equipment, but also areas around the facilities that may pose a safety threat (such as trees, mountains, and buildings). Typically, the delineation of the area to be inspected is mainly based on the inspection task (routine maintenance or troubleshooting), power facility distribution data (such as GIS coordinates), and historical risk records to ensure targeted coverage. It is understood that the scope and focus can be flexibly adjusted in different scenarios (such as transmission lines and substations) to match specific inspection targets.
[0030] In some implementations, after defining the area to be inspected, the flight path of the drone can be further planned based on the area to be inspected. For example... Figure 2 As shown, the execution process of planning the flight path of the UAV according to the area to be inspected in step 110 may include, but is not limited to, steps 210 to 260.
[0031] Step 210: Obtain the starting location, obstacle distribution information, and flight area boundary of the area to be inspected; Step 220: Based on obstacle distribution information, initialize the initial particle swarm by guiding particles through a Gaussian distribution with the starting location as the reference. Step 230: Based on the obstacle distribution information, dynamically adjust the inertia weight and mutation probability of the initial particle swarm, and perform crossover and mutation operations on the adjusted initial particle swarm to obtain the iterative particle swarm. Step 240: Establish a multi-dimensional cost function based on the flight area boundary, and calculate the cost value of each particle in the iterative particle swarm with path length, obstacle avoidance and flight area boundary restrictions as constraints; Step 250: Iteratively update the particle swarm based on the cost value of each particle until the preset termination condition is met, and obtain the initial path corresponding to the target particle; Step 260: Smooth the initial path using B-spline curves to obtain the UAV's flight path.
[0032] Steps 210 to 260 represent the UAV path planning process based on the particle swarm optimization algorithm. This process primarily involves generating a smooth flight path from environmental information. Specifically, it includes: First, acquiring basic information about the area to be inspected, including the starting point, obstacle distribution, and flight area boundaries. Next, using the starting point as a baseline and considering the obstacle distribution, a batch of initial candidate paths (i.e., the initial particle swarm) is generated using a Gaussian distribution method. Then, based on the obstacle situation, the optimization parameters of the particle swarm (including inertia weights, mutation probabilities, etc.) are dynamically adjusted, and the candidate paths are optimized through cross-mutation to obtain an iterative path set (i.e., the iterative particle swarm). Subsequently, an evaluation criterion (i.e., a cost function) is established, scoring each candidate path based on dimensions such as path length, obstacle avoidance, and whether it is within the flight range. The path set is continuously optimized based on the scores until the termination condition is met, yielding a preliminary optimal path (i.e., the initial path corresponding to the target particle). Finally, the initial path is smoothed using a B-spline curve to obtain a smooth path suitable for UAV flight.
[0033] The execution process of step 110 will be described in detail below with specific examples.
[0034] In this embodiment, the core of the UAV flight path planning process lies in the deep integration of genetic algorithm (GA) and particle swarm optimization algorithm (PSO). Through Gaussian distribution-guided particle initialization, dynamic parameter collaborative optimization, path smoothing, and multi-dimensional cost constraint modeling, efficient path search in complex environments is achieved. The specific implementation is as follows: First, construct a path-based obstacle model:
[0035] The particle swarm is initialized using a Gaussian distribution, causing the particles to concentrate in a key area around the obstacle. (where the coordinates are the center coordinates of the mountain) Controlling the height of the mountain and This initialization method, which determines the slope decay characteristics, can reduce invalid searches by more than 30%.
[0036] Inertia weight through Dynamic adjustment, among which, This represents the inertia weight of the current iteration. This represents the maximum value of the inertia weight. This represents the minimum value of the inertia weight. This indicates that the current number of iterations completed is 1. This indicates the maximum total number of iterations set in advance.
[0037] In some implementations... .
[0038] In some implementations, a large inertia weight is initially used to enhance the global search, while a linear decrease in weights is used to focus on local optimization in the later stages. Simultaneously, a logistic function is introduced:
[0039] The mutation probability is dynamically adjusted so that the algorithm maintains population diversity with a high mutation probability (up to 0.7) in the early stages and gradually decreases it in the later stages to improve convergence accuracy. In this logic function, p represents the mutation probability of the current iteration; represents the maximum value of the mutation probability (set to 0.7 here); l represents the shape parameter, set to 6 here, used to adjust the "steepness" of the logic function, affecting the rate at which the mutation probability changes with the number of iterations.
[0040] Secondly, the particle swarm evolution mechanism is optimized through crossover and mutation operations in a genetic algorithm: for the top 50% of particles in terms of flight cost, a roulette wheel selection is used. And through cross operations:
[0041] By integrating high-quality path features, the number of path inflection points is reduced by 40%; mutation operations are performed on the last 50% of high-cost particles to break local optima by randomly perturbing their positions and velocities.
[0042] In some implementations, path smoothing uses cubic B-spline curves: The basic function is defined as This transforms discrete nodes into C2 continuous trajectories, reducing non-performance overhead. Ultimately, this is achieved through a multi-dimensional cost function:
[0043] To achieve path optimization under constraints, the Euclidean distance cost is:
[0044] To ensure the shortest path, the terrain cost is:
[0045] Forced obstacle avoidance, with a boundary cost of:
[0046] By restricting the flight area, the cost of the final drone flight path is significantly reduced compared to traditional algorithms (by more than 28.2%).
[0047] Understandably, after the drone arrives at the inspection area, it first adjusts its attitude and altitude according to the pre-planned flight path to ensure that the onboard RGB-infrared dual-mode camera can capture images of the utility pole (such as the insulator string above) at the optimal angle and distance. The image data captured by the camera is transmitted in real time to the terminal display via 5G communication, and is also stored in the drone's local storage device for subsequent processing.
[0048] To improve the accuracy and efficiency of defect detection, the acquired images need to undergo a series of preprocessing steps. Specifically, since images captured by drones in complex environments may be affected by conditions such as lighting changes, contain noise, and have key features of utility poles that are easily interfered with, images must first be acquired using a detection method combining infrared and visible light to preserve the key features of the utility poles. Based on this, the target image is optimized: first, noise suppression, geometric correction, illumination equalization, and normalization are performed to obtain a preliminary processed image (this step aims to eliminate lighting differences, reduce noise interference, and ensure a uniform range of pixel values); then, the size of the preliminary processed image is adjusted to match the input requirements of the target detection model; finally, data augmentation is performed on the initially optimized target image, including random rotation, flipping, and scaling operations, to simulate image changes under different shooting conditions, ultimately obtaining the optimized target image. These preprocessing steps ensure the consistency of the model input (such as pixel value normalization and size uniformity) and improve the robustness of the model through data augmentation, optimizing the acquired utility pole images into a format suitable for the target detection model input, providing high-quality input data for subsequent detection.
[0049] In one feasible embodiment, the target image includes a visible light image and a corresponding infrared light image. That is, the target image includes a synchronously acquired visible light image (used to capture the texture and color details of towers, insulators, etc.) and a corresponding infrared light image (used to reflect the temperature distribution characteristics of the equipment). For both types of images, the aforementioned preprocessing operations such as noise suppression, geometric correction, illumination equalization, normalization, size adjustment, and data augmentation are performed to obtain optimized visible light and infrared light images. These are then input into a cross-modal detection model, where weight matching and feature fusion are performed on the two types of images to achieve more accurate defect detection.
[0050] like Figure 3 As shown, the execution process of step 130 may include, but is not limited to, steps 310 to 330.
[0051] Step 310: Input the target image into the cross-modal detection model and calculate the cross-modal crossover ratio between the visible light image and the infrared light image; Step 320: Determine the first uncertainty weight of the visible light image and the second uncertainty weight of the infrared light image based on the cross-modal crossover and union ratio; Step 330: Obtain the matching result based on the first uncertainty weight and the second uncertainty weight.
[0052] Through the processing steps 310 to 330, the optimized visible light image and infrared image are first input into the cross-modal detection model. The model can calculate the degree of overlap of the "target region" in these two types of images. This overlap is the cross-modal intersection-union ratio (ECU) (for example, how much the position and range of a utility pole overlap in the visible light and infrared images). Next, based on the calculated ECU, reliability weights are assigned to the two types of images respectively. Generally, a high overlap indicates that the two types of images describe the target consistently and reliably, and the corresponding weights (the "first uncertainty weight" for visible light and the "second uncertainty weight" for infrared light) are large. A low overlap indicates that one type of image may be affected by interference (e.g., backlighting in visible light or noise in infrared light), and the corresponding weights are small. Subsequently, the detection information of the two types of images is fused according to the weights to obtain a more accurate matching result.
[0053] In a feasible embodiment, the process of feature extraction and fusion processing of the target image to obtain a feature map set includes: extracting features from the visible light image to obtain a first feature map; extracting features from the infrared light image to obtain a second feature map; obtaining a fused feature map based on the first and second feature maps; and obtaining a feature map set based on the first, second, and fused feature maps. In short, this process is a flow from single-modal feature extraction to multi-feature integration. The core is to first capture the key information of the two types of images separately, then fuse and complement them, and finally summarize them into a feature map set. Specifically: first, features reflecting target details (such as the texture of a utility pole or the shape of an insulator) are extracted from the visible light image to obtain a first feature map; then, temperature-related features (such as whether the equipment has overheated areas) are extracted from the infrared light image to obtain a second feature map; the first and second feature maps are fused according to certain rules (such as combining texture and temperature information) to obtain a fused feature map that takes into account the advantages of both modalities; the individual first and second feature maps, plus the fused feature map, are combined to form the final feature map set, facilitating further processing by the subsequent model.
[0054] In a feasible embodiment, after obtaining the matching results and feature map set, detection results can be further obtained based on the matching results and feature map set. For example... Figure 4 As shown, the execution process of step 150 may include, but is not limited to, steps 410 to 440.
[0055] Step 410: Calculate the first loss value based on the first feature map and the first uncertainty weight; Step 420: Calculate the second loss value based on the second feature map and the second uncertainty weight; Step 430: Calculate the fusion loss value based on the fusion feature map and the second uncertainty weight; Step 440: Obtain the detection result based on the illumination uncertainty weight of the visible light image, the first loss value, the second loss value, and the fusion loss value.
[0056] Steps 410 to 440 are the process of calculating the errors (loss values) of different features, combining reliability weights and illumination factors, to finally obtain accurate detection results. This includes: calculating a first loss value using the first feature map of the visible light image, combined with its first uncertainty weight (reflecting the reliability of visible light); calculating a second loss value using the second feature map of the infrared light image, combined with its second uncertainty weight (reflecting the reliability of infrared light); and calculating a fusion loss value using the fused feature map, combined with the second uncertainty weight of infrared light, to measure the detection error of the features after fusion of the two modalities. Finally, by comprehensively considering the illumination uncertainty weight of visible light (the degree of interference of illumination on visible light) and the three loss values mentioned above, a more accurate detection result is obtained by balancing the errors and reliability of each modality.
[0057] In a feasible embodiment, the execution process of step 440 may include: obtaining a first initial detection box and a first detection score corresponding to a first loss value; obtaining a second initial detection box and a second detection score corresponding to a second loss value; obtaining a third initial detection box and a third detection score corresponding to a fusion loss value; multiplying the first detection score by the illumination uncertainty weight of the visible light image to obtain a fourth detection score; merging the first initial detection box, the second initial detection box, the third initial detection box, the first detection score, the second detection score, the third detection score, and the fourth detection score to obtain a candidate bounding box set; and performing a redundancy removal operation on the candidate bounding box set according to a preset redundancy threshold to obtain the detection result. Specifically, the first initial detection box (marking the target position) and the first detection score (marking the corresponding result confidence) corresponding to visible light can be found from the first loss value; the second initial detection box and the second detection score corresponding to infrared light can be found from the second loss value; and the third initial detection box and the third detection score corresponding to the fusion feature can be found from the fusion loss value. Because illumination affects the detection accuracy of visible light, the first detection score for visible light is multiplied by an illumination uncertainty weight (e.g., a lower weight for poor illumination results in a lower score), yielding an adjusted fourth detection score. The three initial detection boxes (first, second, and third) and the four detection scores (first, second, third, and fourth) are then combined to form a candidate bounding box set (equivalent to all possible target locations and their corresponding confidence levels). Based on a pre-defined redundancy threshold (e.g., keeping only one box if their positions are too similar), duplicate boxes in the candidate set are removed, and the remaining boxes represent the final detection result.
[0058] Steps 130 to 150 will be described in detail below with reference to specific embodiments.
[0059] See Figure 5 , Figure 5 This is a schematic diagram illustrating the working principle of the cross-modal detection model provided in this application. The detection model includes an Uncertainty Awareness Module (UMA) and a cross-modal detector (CMDet). The core of the UMA is an Uncertainty Awareness Algorithm (UAM) that quantifies cross-modal uncertainty using a task-driven approach. This UAM algorithm first calculates the cross-modal intersection-union ratio (IoU) of the ground-truth bounding boxes in the RGB-infrared image pair, and then uses this metric to quantify the localization difference between the two modalities. In object detection tasks, the IoU is typically used to evaluate the localization matching quality between the predicted bounding box and the ground-truth bounding box. It is important to note that, unlike the conventional IoU calculation which measures the overlap between a single predicted bounding box and its corresponding ground-truth bounding box, the cross-modal intersection-union ratio (CM_IoU) in this embodiment is calculated directly on the ground-truth bounding boxes of both modalities. CM_IoU can be calculated as:
[0060] in, and CM_IoU∈(0,1) represents the ground truth bounding box of the target in the RGB and infrared images, respectively, and area represents the function used to calculate the area of any polygon (i.e., the bounding box). Ideally, CM_IoU∈(0,1) should be close to 1.
[0061] In some implementations, CM_IoU can be used to match the corresponding ground truth bounding boxes in two modalities. The specific process for matching ground truth bounding boxes is as follows: Assume that an RGB image and its corresponding infrared image contain R and T ground truth bounding boxes, respectively. By calculating the CM_IoU between each ground truth bounding box in the RGB modality and each ground truth bounding box in the infrared modality, an R×T matrix is constructed (where rows correspond to the R ground truth bounding boxes in the RGB modality, and columns correspond to the T ground truth bounding boxes in the infrared modality). In this matrix, for each column (i.e., a ground truth bounding box corresponding to the infrared modality), if the value of the largest element in the column is in the range [0.8, 1], then the coordinate (r, t) of that element indicates that the r-th ground truth bounding box in the RGB image and the t-th ground truth bounding box in the infrared image have successfully matched. Furthermore, based on the above matching results, the index numbers of the unmatched bounding boxes (i.e., missing bounding boxes) in their respective modalities can be further determined.
[0062] In some implementations, infrared modalities often suffer from blurred appearances due to a lack of color information and texture details, leading to frequent omissions in manual annotation. To address this, ground truth bounding boxes already annotated in the RGB modal can be used to fill in the missing bounding boxes in the infrared modal. Specifically, after filling in the missing bounding boxes for the infrared modal, an uncertainty weight needs to be assigned to each newly added infrared modal bounding box. Simultaneously, the weights of the originally labeled bounding boxes in the infrared mode are set to 1. Through the above processing, the uncertainty weights corresponding to each target object in the infrared mode can be finally obtained. (i.e., the second uncertainty weight):
[0063] In some implementations, targets in RGB images are often missed under low-light conditions, making accurate position matching between RGB and infrared images difficult. Considering the uncertainty in the positions of these targets in the RGB image under such circumstances, an uncertainty weight can be assigned to each target object in the RGB modality. ; Meanwhile, the true value bounding boxes marked in the infrared modality are used to fill in the missing true value bounding boxes in the RGB modality. In addition, different lighting conditions also have a great impact on the detection performance. Especially for the RGB modality, different lighting intensities will directly change the uncertainty degree of the target objects in the RGB image. Therefore, the illumination uncertainty of the RGB image can be estimated through the gray histogram , providing a basis for subsequent weight adjustment and detection optimization.
[0064] In some embodiments, when calculating the illumination uncertainty of the RGB image, the specific process is as follows: First, convert the RGB image to the gray domain to obtain the corresponding gray image; then count the number of pixels in the gray image whose gray values are less than the preset threshold Gray_T, denoted as Num_Gray; then calculate the Dark_V value, which is the ratio of Num_Gray to the total number of pixels in the image, and its size can reflect the proportion of the dark area in the image. After that, according to the relationship between the Dark_V value and the preset threshold Light_Threshold, determine the final illumination-related weight: If the Dark_V value is greater than Light_Threshold, then is set to 1 - Dark_V value; if the Dark_V value is less than or equal to Light_Threshold, then is set to 1. Among them, according to experimental verification, the specific value of the Gray_T threshold is 60, and the specific value of the Light_Threshold threshold is 0.45.
[0065] In some embodiments, in terms of cross-modal image position alignment processing, since it is difficult to achieve pixel-level precise alignment of the cross-modal image pairs of RGB and infrared during the acquisition process, the misalignment degree of the target object positions between the two modalities can be quantified by setting an alignment threshold μ. The specific operation takes the target position in the infrared modality as the reference benchmark. When the cross-modal intersection over union (CM_IoU) of the corresponding targets in the RGB modality and the infrared modality satisfies 0 < CM_IoU < μ, the CM_IoU value is used as the uncertainty weight of the misaligned target, denoted by , and this weight is assigned to the true value bounding box of the corresponding target in the RGB modality. Finally, the uncertainty weight (i.e., the first uncertainty weight) of each object in the RGB modality can be calculated as:
[0066] In some embodiments, the structure of the cross-modal detector consists of an RGB branch, an infrared branch, and a fusion branch, and the three work together to learn the fusion features and the exclusive knowledge of each modality. The uncertainty perception module provides the corresponding uncertainty weight for each target object. Such as Figure 5As shown, the input to this model is a pair of RGB-infrared images, which are fed into their respective backbone networks. In this embodiment, the backbone network is ResNet-FPN, with ResNet serving as the feature extractor within each backbone network. The feature maps extracted by ResNet are then refined using FPN (Feature Pyramid Network). The output of each backbone network consists of five sets of feature maps at different scales, corresponding to downsampling of 1 / 4, 1 / 8, 1 / 16, 1 / 32, and 1 / 64 times the original image size (i.e., downsampling factors of 4x, 8x, 16x, 32x, and 64x), and each set contains 256 channels. During model execution, all feature maps extracted from different layers of the backbone network are fed into the cross-modal fusion module. Finally, cross-modal knowledge is obtained by concatenating feature maps of the same scale. Specifically, feature maps of the same scale are first concatenated along the channel dimension, and then the concatenated feature maps are input into a 1×1 convolutional layer, thereby achieving dimensionality reduction and cross-channel information interaction. After the above processing is completed, the feature map of each branch, along with its corresponding uncertainty weights, is input into its respective detection head. Considering the unique features contained in the infrared mode and the RGB mode (such as infrared focusing on temperature information and RGB focusing on texture and color information), the model retains independent detection heads for the two modes to make full use of the unique information of each mode.
[0067] In some implementations, the detection head employs an RoI Transformer structure, which consists of a Region Proposal Network (RPN) and RoI Transformer modules. The RPN's primary function is to generate lateral region proposals (i.e., initial target candidate regions). The RoI Transformer modules are responsible for converting these lateral proposals into orientation proposals (adapting to the target's actual orientation), and performing fine-grained classification (determining target categories) and bounding box regression (optimizing target location coordinates) on the targets corresponding to these proposals. In each detection head, an Uncertainty Awareness Module (UAM) recalibrates the weights involved in target bounding box regression in the RPN and RoI Transformer modules. Specifically, by dynamically adjusting the weight allocation, it reduces the proportion of loss from bounding boxes with high uncertainty during the regression process, thereby reducing the interference of these low-reliability bounding boxes on the overall detection accuracy. The bounding box regression loss Lloc for each object can be calculated as:
[0068] Where l∈{x,y,w,h,θ}, x and y represent the x and y coordinates of the bounding box center, respectively, w and h represent the width and height of the predicted bounding box, respectively, and θ is used to describe the orientation of the bounding box. Let u represent the base case, v represent the base case bounding box regression target, (x,y) represent the center of the prediction result, (w,h) represent the width and height of the prediction result, and θ represent the direction of the prediction result. Let represent the uncertainty weights, where j∈{R,I,F}. The uncertainty weights of each object on the fusion branch. Uncertainty weights on the infrared branch Consistent.
[0069] In some implementations, taking the RGB branch as an example, multi-task loss is used. Jointly train the classifier and the bounded box regressor:
[0070] in, is the cross-entropy loss function; p represents the predicted probability of each class; u represents the true class label, where the index function (Iverson brackets) [u≥1] is 1 when u≥1, and 0 otherwise. By convention, the all-encompassing background class is labeled u=0.
[0071] The objective overall loss is:
[0072] in, The multi-task loss (i.e., the first loss value) for the RGB branch. This is the multi-task loss (i.e., the second loss value) for the infrared branch. This is the loss of the fusion branch (i.e., the fusion loss value).
[0073] In some implementations, during the reasoning process, such as Figure 6 As shown, the model consists of an RGB modal detector, an infrared modal detector, a fusion detection branch, and an IA-NMS (intermodal nonmaximum suppression) module. The RGB and infrared modal detectors perform classification (determining target category, such as whether it's a defect or what type of equipment it belongs to) and regression (optimizing the position and size of the target bounding box) tasks for their respective modalities. Within the fusion detection branch, the intermodal fusion module integrates information from both RGB and infrared modalities and inputs the fused features into the branch's detection head for target prediction. Finally, the IA-NMS module performs post-processing on all the outputs (such as filtering and fusing redundant or complementary detection boxes) to obtain the final detection result. This better integrates the detection results from different modalities, improving the accuracy and robustness of intermodal target detection.
[0074] Understandably, in object detection tasks, the Non-Maximum Suppression (NMS) algorithm is typically used to determine the final object bounding boxes. Specifically, NMS ranks candidate bounding boxes based on their classification probabilities, which are calculated using the softmax function in the object detector's classifier. However, the softmax function has a drawback: it often over-amplifies the probability of the predicted class (i.e., "probability inflation"), which negatively impacts the detection performance of cross-modal object detectors. For example, in cross-modal object detection scenarios, the RGB branch struggles to accurately predict the true location of objects in dark scenes due to poor lighting conditions. When the predictions from the RGB, infrared, and fusion branches in the integrated model are combined, false positives predicted by the RGB branch (i.e., background areas incorrectly labeled as targets or non-existent targets) severely interfere with the final detection performance, leading to numerous false detections or inaccurate localization.
[0075] In some implementations, considering the sensitivity of RGB images to lighting conditions and the effectiveness of non-maximum suppression (NMS) in reducing redundant bounding boxes, in cross-modal NMS, the initial bounding box lists and corresponding detection scores of the three detection branches (RGB branch, infrared branch, and fusion branch) can be set as specific sets (i.e., candidate bounding box sets). Specifically: Let the initial detection box list for the RGB branch be... (in arrive The list of N candidate detection boxes generated for the RGB branch, and their corresponding detection scores are as follows: ( For detection box (Corresponding detection score); the initial detection box list for the infrared branch is as follows: The corresponding detection score list is as follows The initial detection box list for the fusion branch is as follows: The corresponding detection score list is as follows (N is the number of initial candidate detection boxes in each branch).
[0076] The current number of iterations completed is set as the NMS threshold (i.e., the redundancy threshold, used to characterize the iteration state of the NMS process). At this point, the detection score of the RGB modality candidate bounding box is multiplied by the illumination uncertainty weight of the current RGB image. , represented as (That is, the scores of each candidate detection box in the RGB branch are weighted and adjusted to reflect the uncertainty brought by illumination factors to RGB modality detection.) Then, all candidate bounding boxes from the RGB, infrared, and fusion branches are merged, and the merged set of candidate bounding boxes is used for the NMS operation. In this way, IA-NMS can reduce the interference of RGB modality prediction results on the final detection results of the model, especially in dark scenes, effectively reducing the negative impact of unreliable RGB modality predictions caused by insufficient illumination on the detection results.
[0077] In some implementations, during the inference phase, RGB-infrared image pairs (i.e., visible light image and corresponding infrared image) are fed into the RGB modality detector and the infrared modality detector, respectively, allowing each detector to perform detection on its corresponding modality image. Simultaneously, the fusion detection branch integrates cross-modal information (fusing features from RGB and infrared modalities) for target prediction. Furthermore, IA-NMS performs post-processing operations on the outputs of all branches—RGB, infrared, and fusion—to obtain the final detection result.
[0078] In a feasible embodiment, after obtaining the detection result, the tilt angle of the target utility pole in the target image can be further determined based on the detection result to obtain the target detection result. For example... Figure 7 As shown, the execution process of step 160 may include, but is not limited to, steps 710 to 740.
[0079] Step 710: Based on the detection results, obtain the outline information of the target utility pole; Step 720: Obtain the centerline of the target utility pole based on the contour information; Step 730: Calculate the tilt angle of the target utility pole based on the angle between the central axis and the vertical direction; Step 740: Obtain the target detection result based on the tilt angle.
[0080] Steps 710 to 740 are specific steps to further determine whether the utility pole is tilted and by what angle after obtaining the foundation inspection results: First, extract the outline information of the target utility pole from the previously obtained inspection results, that is, the lines that clearly show the edge of the utility pole (such as the top, bottom, left, and right boundaries of the utility pole and the overall shape outline); then, based on this outline information, find the central axis of the utility pole, which passes through the center of the utility pole and divides it into two symmetrical parts on the left and right (or front and back); next, calculate the tilt angle of the utility pole based on the angle between this central axis and the vertical direction (for example, if the central axis is tilted to the left by 5 degrees, the tilt angle is 5 degrees); based on the calculated tilt angle, obtain the final target inspection result, such as determining whether the tilt angle is within the safe range. If the tilt angle exceeds the threshold, it is "abnormal tilt", and if it is within the range, it is "normal". This judgment result and the tilt angle data are used as the final result.
[0081] Step 160 will be described in detail below with specific embodiments.
[0082] In some implementations, such as Figure 8As shown, after detecting the bounding box of the utility pole using a cross-modal detection model, the contour information (including edge lines, potential central axis, etc.) or key feature points (such as top endpoints, bottom endpoints, and turning point feature points) of the utility pole are further extracted from the fused feature map. This feature extraction process uses uncertainty weights calculated by UAM (where the first uncertainty weight corresponds to the visible light mode and the second uncertainty weight corresponds to the infrared mode) to filter feature regions, prioritizing the retention of high-reliability feature regions while effectively suppressing the adverse effects of interference regions such as low illumination and high noise on feature extraction (e.g., filtering out blurred edges caused by backlighting in the visible light and pseudo contours formed by thermal noise in the infrared). At the same time, this process also integrates the temperature contour features of the infrared mode and the texture edge features of the visible light mode: the infrared features can enhance the temperature difference boundary between the utility pole and the background (such as trees, buildings, etc.) (as a metal / solid structure, the temperature distribution of the utility pole differs significantly from the surrounding environment); the visible light features accurately retain the key structural details of the utility pole (such as the insulator group at the top, the concrete base at the bottom, and the fixing device of the pole). Based on this, the consistency and reliability of the bimodal contour features are verified by the cross-modal intersection-union ratio (CM_IoU): if the CM_IoU of the bounding boxes of the utility pole detected by the infrared and visible light modes is ≥0.8 (i.e., the overlap of the bounding boxes of the utility pole under the two modes is high and the feature consistency is good), then the contour features are considered reliable, and the continuous edge lines of the utility pole can be directly extracted by the Canny edge detection algorithm, and then the most likely central axis is fitted by the Hough Transform (since the utility pole is approximately cylindrical in shape, the central axis is the geometric central axis, which runs through both ends of the pole); if CM_IoU<0.8 (at this time, the consistency of the two modal features is low, which may be affected by factors such as sudden changes in illumination and occlusion), then the weights of the bimodal features are dynamically adjusted by UAM (such as increasing the weight of the infrared mode in night scenes and appropriately increasing the weight of the visible light mode in complex texture backgrounds), and the edge detection results are re-optimized to ensure the robustness of the central axis extraction.
[0083] In some implementations, after obtaining a reliable centerline or key feature points, the tilt angle is calculated. Using the image coordinate system as a reference (with the vertical direction as the positive y-axis), the angle between the centerline of the utility pole (or the line connecting the top and bottom) and the vertical direction is calculated. If the centerline (straight line) is extracted, the angle is calculated using the slope k of the line, using the following formula:
[0084] If the top point is extracted and bottom point The horizontal offset of the line connecting the two points. and vertical distance Using the formula:
[0085] Angle calculation. This calculation process integrates precise contour and key point information provided by the feature map, laying a solid foundation for accurate angle calculation and reducing misjudgments caused by biases in single-modal information. Finally, according to power safety regulations, if the calculated tilt angle is greater than 5 degrees, the utility pole is deemed to have a risk of collapse and is marked as a high-risk target. This judgment not only relies on accurate angle calculation but also indirectly benefits from the optimal drone shooting angle ensured by the path planning mentioned earlier, ensuring that the acquired image information accurately reflects the actual state of the utility pole. This makes the entire tilt judgment process more reliable and efficient, effectively connecting with the closed-loop process of "data acquisition - feature fusion - uncertainty detection - intelligent planning - scene optimization," further improving the accuracy of high-risk utility pole detection.
[0086] See Figure 9 , Figure 9This is an overall flowchart of a utility pole target detection method provided in one embodiment of this application. The overall process is as follows: First, based on the requirements of the power inspection task and the distribution of the utility poles to be inspected, the starting point of the inspection area for the UAV to perform the inspection task is determined in three-dimensional geographic space. Then, a hybrid strategy of deep fusion genetic algorithm (GA) and particle swarm optimization algorithm (PSO) is adopted. Based on a multi-dimensional cost function covering path length, obstacle avoidance cost, flight area constraints, etc., the 3D path of the UAV from the starting point to each utility pole area to be inspected is planned. During the process, Gaussian distribution guided particle initialization, dynamic adjustment of inertia weight and mutation probability, crossover and mutation operation of genetic algorithm, and cubic B-spline curve smoothing are used to ensure that the planned path has global optimality, fast convergence and practical flight feasibility. Next, the UAV flies autonomously according to the planned three-dimensional path. After reaching the inspection location, it uses the onboard dual-modal sensors (visible light camera and infrared thermal imager) to simultaneously collect visible light images and infrared images of the utility poles. Afterwards, image preprocessing is performed on the collected visible light images and infrared images respectively. For example, the visible light image is subjected to adaptive histogram equalization. To enhance texture detail clarity, infrared images are filtered to reduce thermal noise interference, resulting in a preprocessed image that meets the input specifications of the cross-modal detection model. The preprocessed bimodal image is then input into the cross-modal detection model for further processing: UAM first calculates the cross-modal intersection-union ratio (CM_IoU) of the bimodal ground truth bounding boxes, quantifying cross-modal localization differences and illumination uncertainties, and then inputs the feature map and uncertainty weights into the detection head. CMDet, based on the fused cross-modal features, classifies the utility pole target and performs bounding box regression, outputting preliminary utility pole detection results (including category, bounding box position, etc.). Subsequently, based on the utility pole detection results output by the cross-modal detection model, the contour information of the utility pole is further extracted. If the bimodal bounding box CM_IoU ≥ 0.8, the central axis is directly extracted using Canny edge detection and Hough transform; if CM_IoU < 0.8, the bimodal feature weights are dynamically adjusted using UAM before optimizing the edge detection results. Finally, the tilt angle of the utility pole is calculated based on the angle between the central axis and the vertical direction. Finally, the target detection results are output.
[0087] This application embodiment effectively improves the detection accuracy and inspection efficiency of UAVs for utility poles in low-light environments by using cross-modal fusion technology of infrared and visible light combined with an optimized path planning algorithm. Specifically, the implementation is as follows: At the cross-modal fusion level, the core detection model includes an Uncertainty Awareness Module (UAM) and a cross-modal detector (CMDet). UAM calculates the cross-modal intersection-union ratio (CM_IoU) between the ground truth bounding boxes of the target in both modes (infrared and visible light) to accurately quantify cross-modal localization differences (such as the offset of the utility pole bounding box in the two modes) and illumination uncertainties (such as the interference of the low-light environment on the visible light mode). Subsequently, the extracted feature maps and the calculated uncertainty weights (the first uncertainty weight corresponds to the visible light mode, and the second uncertainty weight corresponds to the infrared mode) are input into the detection head for training. This process, by dynamically adjusting the contribution of different modal features, effectively suppresses noise interference (such as infrared thermal noise and visible light blurring areas) and enhances the model's sensitivity to high-reliability modes (such as preferential reliance on infrared features in low-light environments), thereby significantly optimizing detection accuracy in low-light scenarios and improving the system's adaptability to complex environments. At the path planning level, a hybrid strategy combining a deep fusion of genetic algorithm (GA) and particle swarm optimization (PSO) is adopted, integrating key technologies such as dynamic parameter control, hierarchical particle optimization, and path smoothing. Specifically, Gaussian distribution-guided particle initialization concentrates particles in key obstacle areas (such as utility poles), reducing ineffective searches in open areas; dynamic adjustment of inertia weights and mutation probabilities achieves a dynamic balance between global search and local optimization; crossover and mutation operations of the genetic algorithm optimize the particle swarm's evolutionary mechanism, enhancing population diversity and optimization capabilities; finally, cubic B-spline curves smooth the planned path, ensuring the continuity and safety of the UAV's flight trajectory. Simultaneously, a multi-dimensional cost function is constructed to ensure the shortest path while strictly avoiding obstacles and confining the flight to a preset area. These optimizations significantly enhance the global search capability, convergence speed, and practical feasibility of UAV 3D path planning, providing reliable algorithmic support for autonomous navigation in complex environments. By deeply integrating path planning with cross-modal fusion detection, a closed-loop process is formed: "data acquisition (UAV acquires infrared-visible image pairs according to the optimized path) - feature fusion (dual-modal feature complementarity enhancement) - uncertainty detection (UAM dynamically suppresses interference) - intelligent planning (GA-PSO hybrid algorithm optimizes the path) - scene optimization (path adjustment based on detection results)". This closed loop not only effectively improves the accuracy and anti-interference capability of target detection in power line inspection but also significantly enhances the execution efficiency of inspection tasks, ultimately providing an efficient and accurate solution for target detection of power poles in complex environments.
[0088] This application also discloses an electronic device, which includes a processor, a memory, and a computer program stored in the memory and executable by the processor. When the computer program is executed by the processor, it implements the utility pole target detection method described above.
[0089] This application also discloses a computer-readable storage medium storing a processor-executable program, which, when executed by a processor, is used to perform the utility pole target detection method described above.
[0090] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for detecting utility pole targets based on unmanned aerial vehicles (UAVs), characterized in that, include: Determine the area to be inspected, and plan the flight path of the UAV based on the area to be inspected; The drone is controlled to patrol the area to be inspected along the flight path and collect target images. The target image is weighted and matched according to a preset cross-modal detection model to obtain the matching result; The target image is subjected to feature extraction and fusion processing to obtain a feature map set; the detection result is obtained based on the matching result and the feature map set. Based on the detection results, the tilt angle of the target utility pole in the target image is determined to obtain the target detection result.
2. The method for detecting utility pole targets according to claim 1, characterized in that, The step of planning the flight path of the UAV based on the area to be inspected includes: Obtain the starting location, obstacle distribution information, and flight area boundary of the area to be inspected; Based on the obstacle distribution information, an initial particle swarm is generated by initializing guided particles using a Gaussian distribution with the starting location as a reference. Based on the obstacle distribution information, the inertia weight and mutation probability of the initial particle swarm are dynamically adjusted, and a crossover mutation operation is performed on the adjusted initial particle swarm to obtain an iterative particle swarm. A multi-dimensional cost function is established based on the flight area boundary, and the cost value of each particle in the iterative particle swarm is calculated with path length, obstacle avoidance and flight area boundary restrictions as constraints. The particle swarm is iteratively updated based on the cost value of each particle until a preset termination condition is met, and the initial path corresponding to the target particle is obtained. The initial path is smoothed using a B-spline curve to obtain the UAV's flight path.
3. The method for detecting utility pole targets according to claim 1, characterized in that, Before performing weight matching on the target image according to the preset cross-modal detection model, the method further includes: The target image is subjected to noise suppression, geometric correction, illumination equalization and normalization to obtain a preliminary processed image; Adjust the size of the pre-processed image to obtain the initial optimized target image; The initially optimized target image is then augmented to obtain the optimized target image.
4. The method for detecting utility pole targets according to claim 1, characterized in that, The target image includes a visible light image and a corresponding infrared light image; The step of performing weighted matching on the target image according to a preset cross-modal detection model to obtain a matching result includes: The target image is input into the cross-modal detection model to calculate the cross-modal crossover ratio between the visible light image and the infrared light image; Based on the cross-modal crossover and union ratio, a first uncertainty weight for the visible light image and a second uncertainty weight for the infrared light image are determined; The matching result is obtained based on the first uncertainty weight and the second uncertainty weight.
5. The method for detecting utility pole targets according to claim 4, characterized in that, The step of performing feature extraction and fusion processing on the target image to obtain a feature map set includes: Feature extraction is performed on the visible light image to obtain a first feature map; Feature extraction is performed on the infrared image to obtain a second feature map; A fused feature map is obtained based on the first feature map and the second feature map; A feature map set is obtained based on the first feature map, the second feature map, and the fused feature map.
6. The method for detecting utility pole targets according to claim 5, characterized in that, The step of obtaining the detection result based on the matching result and the feature map set includes: The first loss value is calculated based on the first feature map and the first uncertainty weight; The second loss value is calculated based on the second feature map and the second uncertainty weight; The fusion loss value is calculated based on the fused feature map and the second uncertainty weight; The detection result is obtained based on the illumination uncertainty weight of the visible light image, the first loss value, the second loss value, and the fusion loss value.
7. The method for detecting utility pole targets according to claim 6, characterized in that, The step of obtaining the detection result based on the illumination uncertainty weight of the visible light image, the first loss value, the second loss value, and the fusion loss value includes: Obtain the first initial detection box and the first detection score corresponding to the first loss value; Obtain the second initial detection box and the second detection score corresponding to the second loss value; Obtain the third initial detection box and the third detection score corresponding to the fusion loss value; Multiply the first detection score by the illumination uncertainty weight of the visible light image to obtain the fourth detection score; The first initial detection box, the second initial detection box, the third initial detection box, the first detection score, the second detection score, the third detection score, and the fourth detection score are merged to obtain a candidate bounding box set; The candidate bounding box set is deredundanted according to a preset redundancy threshold to obtain the detection result.
8. The method for detecting utility pole targets according to claim 1, characterized in that, The step of determining the tilt angle of the target utility pole in the target image based on the detection result to obtain the target detection result includes: Based on the detection results, the outline information of the target utility pole is obtained; The centerline of the target utility pole is obtained based on the contour information; The tilt angle of the target utility pole is calculated based on the angle between the central axis and the vertical direction. The target detection result is obtained based on the tilt angle.
9. An electronic device, wherein, The electronic device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, it implements the utility pole target detection method as described in any one of claims 1 to 8.
10. A computer-readable storage medium storing a processor-executable program, characterized in that, The processor-executable program, when executed by the processor, is used to perform the utility pole target detection method as described in any one of claims 1 to 8.