Image acquisition method of power transmission line and related device

Through multi-model collaborative processing and parameter adjustment, the problem of unclear image acquisition of power transmission lines in bad weather is solved, and high-quality image acquisition and key component recognition are achieved.

CN120455833APending Publication Date: 2025-08-08SHENZHEN POWER SUPPLY BUREAU
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510518974.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-23
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The image quality of the transmission line taken by the drone in bad weather such as haze or rainy days is not clear, which affects the inspection effect.

Method used

Multi-model collaborative processing methods are adopted, including generating adversarial networks to remove raindrops and haze, combining deep learning and physical models, segmenting out key components, and adjusting the flight trajectory and focal length of the drone to optimize image acquisition.

Benefits of technology

Improve the clarity and accuracy of image acquisition in bad weather, ensuring the identification and inspection results of key components.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120455833A_ABST
    Figure CN120455833A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an image acquisition method of a power transmission line and a related device, and the method comprises the steps: carrying out the first processing operation according to an acquired to-be-processed image, and obtaining a first target image, the to-be-processed image being a target power transmission line image which is shot by an unmanned plane and contains defects; performing second processing operation on the first target image to obtain a second target image; according to the second target image, segmenting a plurality of components in the second target image, and identifying key components in the plurality of components, the key components being one or more components for maintaining safe operation of the power system; according to the key component, shooting parameters of the unmanned aerial vehicle are adjusted to optimize and collect the target power transmission line image, and the shooting parameters comprise the flight path and the focal length. Therefore, the defect part of the original image is eliminated, the accurate and clear target power transmission line image is obtained, the unmanned aerial vehicle is controlled to collect the image, and the quality of the image collected by the unmanned aerial vehicle in severe weather is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a method for acquiring images of power transmission lines and related devices. Background Art

[0002] Currently, power transmission lines are often installed in cities, mountainous areas, coastal areas, or near highways. Drone inspections of power transmission lines often encounter various weather conditions, including haze, fog, rain, or high humidity. Raindrops formed by humidity or fog on the drone's lens can hinder the clarity and accuracy of the background scene in the captured image, reducing the quality of the captured transmission line image and posing a significant challenge to drone inspections of transmission lines in remote areas. Summary of the Invention

[0003] In view of this, the present application provides an image acquisition method and related devices for transmission lines. Through multi-model collaborative processing, the defective parts of the original image are eliminated to obtain accurate and clear images of the target transmission line, and the drone is controlled to adjust the flight trajectory and lens focal length, further improving the image quality collected by the drone in bad weather.

[0004] In a first aspect, an embodiment of the present application provides a method for capturing an image of a power transmission line, comprising:

[0005] Performing a first processing operation on the collected image to be processed to obtain a first target image, wherein the image to be processed is an image of a target power transmission line containing defects taken by a drone;

[0006] Performing a second processing operation on the first target image to obtain a second target image;

[0007] Segmenting a plurality of components in the second target image according to the second target image, and identifying key components among the plurality of components, wherein the key components refer to one or more components that are essential for maintaining safe operation of the power system;

[0008] According to the key components, the shooting parameters of the UAV are adjusted to optimize the acquisition of the target transmission line image, and the shooting parameters include flight trajectory and focal length.

[0009] In a possible embodiment, the first processing operation is performed based on the collected image to be processed, including: constructing a generator of a generative adversarial network based on a U-Net architecture combined with a residual block and a channel attention module, wherein the U-Net architecture includes a symmetrical encoder and decoder; and using a multi-scale PathGAN as a discriminator of the generative adversarial network; inputting the image to be processed into the generator, extracting the defect area features of the image to be processed through the encoder, and restoring the background structure of the image to be processed through the decoder, wherein the defect area refers to an area occluded by raindrops; extracting the defect area through the convolution layer of the residual block. The method comprises the following steps: obtaining multi-scale features of the image to be processed, reducing the resolution of the image to be processed, and optimizing the fusion of features of the raindrop occlusion area through the channel attention module; outputting a de-raindropped image with the same resolution as the image to be processed; inputting the de-raindropped image into the discriminator, evaluating the local authenticity of the de-raindropped image through the discriminator, and feeding back the adversarial loss; constraining the generative adversarial network through a loss function, and training the generative adversarial network through a first target strategy so that the generative adversarial network outputs the first target image, wherein the loss function includes an adversarial loss function, an L1 loss function, and a multi-scale perceptual loss function.

[0010] In one possible embodiment, the training of the generative adversarial network through the first target strategy includes: reducing the resolution of the de-rained image and training the generator in the generative adversarial network according to the L1 loss function so that the generator has preliminary mapping capabilities; combining the loss function to update the parameters of the generator and the discriminator respectively until the generative adversarial network converges; and when the training of the generative adversarial network reaches a convergence state, increasing the resolution of the de-rained image to the original resolution of the image to be processed, and continuing the first target strategy until the generative adversarial network is in a convergence state again.

[0011] In a possible embodiment, the target transmission line image containing defects refers to an image obscured by fog or haze; the second processing operation on the first target image includes: combining an atmospheric scattering model and a deep learning network to construct a defogging model; training the defogging model according to a second target strategy; inputting the first target image into the trained defogging model, the defogging model including a backbone network and a physical constraint branch; extracting multi-scale features of the first target image through the backbone network, and estimating transmittance and atmospheric light through the physical constraint branch, the multi-scale features including dilated convolution and dynamic filtering; calculating a preliminary defogging image based on the estimated transmittance, the atmospheric light, and the atmospheric scattering formula; correcting detail defects of the preliminary defogging image through a residual refinement module, and outputting the second target image, the detail defects including at least one of the following: edge blur and chromatic aberration.

[0012] In a possible embodiment, the training of the defogging model according to the second target strategy includes: independently training the transmittance estimation subnetwork and the atmospheric light estimation module in the defogging model; jointly optimizing the backbone network and the physical constraint branch, and generating a target defogging image through multi-scale feature fusion and adversarial training, wherein the target defogging image refers to an image that conforms to physical laws and is visually realistic; and fine-tuning the target defogging image according to the residual refinement module to correct the distribution difference between the target defogging image and the real image data, wherein the distribution difference includes raindrop residue and sensor noise.

[0013] In a possible embodiment, the method of segmenting the plurality of components in the second target image according to the second target image includes: inputting the second target image into a shallow convolution layer of an improved ResNet-18 operation to extract basic features, wherein the basic features refer to image edges and textures, and the improvement operation refers to removing the last two layers and adding a dilated convolution; dynamically generating convolution kernel weights according to the texture complexity of the second target image, and outputting a high-resolution feature map; and dividing the second target image into a plurality of sub-blocks and outputting a low-resolution feature map; performing convolution on the high-resolution feature map and the low-resolution feature map respectively, and achieving weighted fusion through spatial attention; performing edge detection on the fused feature map using an edge detection operator to generate an edge mask, and multiplying the edge mask element-wise with the feature map to enhance the response of the boundary area; after multiple iterations, predicting the category probability of each pixel through the convolution layer to obtain a semantic segmentation mask, wherein each pixel corresponds to a component label; processing the fused feature map through CNN to determine a single-channel edge probability map; and outputting the semantic segmentation result, which includes a component category label map and the edge probability map.

[0014] In one possible embodiment, the method further includes: determining a main segmentation loss function; performing weighted cross entropy processing to assign higher weights to difficult-to-separate samples to avoid confusion of similar components; determining an edge auxiliary loss function to reduce the weights of non-edge pixels; summing the main style loss function and the edge auxiliary loss function to obtain a total loss function, and using the total loss function to drive the category segmentation of the multiple components and ensure edge integrity.

[0015] In a second aspect, an embodiment of the present application provides an image acquisition device for a transmission line, comprising: a first processing unit, a second processing unit, a segmentation unit, and a control unit; wherein the first processing unit is used to perform a first processing operation on the acquired image to be processed to obtain a first target image, and the image to be processed refers to an image of a target transmission line containing defects taken by a drone; the second processing unit is used to perform a second processing operation on the first target image to obtain a second target image; the segmentation unit is used to segment multiple components in the second target image based on the second target image, and identify key components among the multiple components, and the key components refer to one or more components for maintaining the safe operation of the power system; the control unit is used to adjust the shooting parameters of the drone according to the key components to optimize the acquisition of the target transmission line image, and the shooting parameters include flight trajectory and focal length.

[0016] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program comprises instructions for executing the steps of any method of the first aspect of the embodiment of the present application.

[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the above-mentioned computer-readable storage medium stores a computer program for electronic data exchange, wherein the above-mentioned computer program enables a computer to execute part or all of the steps described in any method of the first aspect of the embodiment of the present application.

[0018] In a fifth aspect, embodiments of the present application provide a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, wherein the computer program is operable to cause a computer to execute some or all of the steps described in any method of the first aspect of the embodiments of the present application. The computer program product may be a software installation package.

[0019] It can be seen that through the above-mentioned transmission line image acquisition method and related devices, a first processing operation is first performed on the acquired image to be processed to obtain a first target image. The image to be processed refers to an image of the target transmission line containing defects taken by a drone. The first target image is then subjected to a second processing operation to obtain a second target image. Based on the second target image, multiple components in the second target image are segmented and key components among the multiple components are identified. Key components refer to one or more components that are essential for maintaining the safe operation of the power system. Based on the key components, the drone's shooting parameters are adjusted to optimize the acquisition of the target transmission line image. The shooting parameters include flight trajectory and focal length. In this way, through multi-model collaborative processing, the defective parts of the original image are eliminated, an accurate and clear image of the target transmission line is obtained, and the drone is controlled to adjust its flight trajectory and lens focal length, further improving the quality of images collected by the drone in inclement weather. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0021] Figure 1 This is a schematic diagram of an application of an image acquisition system provided by an embodiment of the present application;

[0022] Figure 2 This is a flow chart of a method for capturing images of a power transmission line provided in an embodiment of the present application;

[0023] Figure 3 Schematic diagram of a generative adversarial network model provided in an embodiment of the present application;

[0024] Figure 4 This is a flow chart of a training generative adversarial network provided in an embodiment of the present application;

[0025] Figure 5 This is a schematic diagram of a flow chart of data processing by a defogging model provided in an embodiment of the present application;

[0026] Figure 6 This is a flowchart of a semantic segmentation process provided by an embodiment of the present application;

[0027] Figure 7 This is a block diagram of the functional units of an image acquisition device for a power transmission line provided in an embodiment of the present application;

[0028] Figure 8 This is a structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0030] The terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish between different objects, not to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.

[0031] It should be understood that the term "and / or" as used herein simply describes an association between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " as used herein indicates that the related objects are in an "or" relationship.

[0032] The term "multiple" as used in the embodiments of the present application refers to two or more. The term "connection" as used in the embodiments of the present application refers to various connection methods, such as direct connection or indirect connection, to achieve communication between devices, and the embodiments of the present application do not impose any limitation on this.

[0033] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0034] The following describes the relevant contents, concepts, meanings, technical issues, technical solutions, beneficial effects, etc. involved in the embodiments of this application.

[0035] Currently, power transmission lines are often installed in cities, mountainous areas, coastal areas, or near highways. Drone inspections of power transmission lines often encounter various weather conditions, including haze, fog, rain, or high humidity. Raindrops formed by humidity or fog on the drone's lens can hinder the clarity and accuracy of the background scene in the captured image, reducing the quality of the captured transmission line image and posing a significant challenge to drone inspections of transmission lines in remote areas.

[0036] To solve the above problems, the embodiments of the present application provide a method and related devices for image acquisition of power transmission lines. Through multi-model collaborative processing, the defective parts of the original image are eliminated to obtain an accurate and clear image of the target power transmission line. The drone is controlled to adjust the flight trajectory and lens focal length, further improving the image quality collected by the drone in bad weather.

[0037] First, the method in the embodiment of the present application is applied to the server of the image acquisition system, which includes a server and a drone carrying an image sensor. Figure 1 A method for capturing an image of a power transmission line in an embodiment of the present application is described. Figure 1 This is an application diagram of an image acquisition system provided in an embodiment of the present application. The image acquisition system 10 includes a server 100 and a drone 110, wherein the drone 110 is communicatively connected to the server 100. The drone 110 also includes a controller 1101 and a camera 1102. The server 100 sends a control instruction to the controller 1101, so that the controller 1101 controls the camera 1102 and / or controls the flight module of the drone 110, adjusts the angle and lens focal length of the drone 110 to capture the target transmission line, and thus captures more accurate and clear images.

[0038] Among them, the server 100 first performs a first processing operation on the collected image to be processed to obtain a first target image, where the image to be processed refers to an image of a target transmission line containing defects taken by a drone; secondly, the server 100 performs a second processing operation on the first target image to obtain a second target image; then, the server 100 segments multiple components in the second target image based on the second target image, and identifies key components among the multiple components, where key components refer to one or more components that maintain the safe operation of the power system; finally, based on the key components, the server 100 sends instructions to the controller 1101 to adjust the shooting parameters of the drone 110 to optimize the collection of the target transmission line image, where the shooting parameters include flight trajectory and focal length.

[0039] Specifically, the drone controller 1101 (Flight Controller) is a microprocessor at its core and includes a main control chip. This chip, as the flight controller's core computing unit, processes data from various sensors, performs complex attitude calculations and control algorithm calculations, determines the drone's current state, and generates corresponding control signals based on pre-set instructions and algorithms. Common main control chips include those based on the ARM architecture, and their performance determines the flight controller's ability to respond to complex flight situations. Sensor modules include accelerometers, gyroscopes, magnetometers, and barometers. Accelerometers measure acceleration changes in the drone's three axes; gyroscopes measure the drone's angular velocity and detect changes in its rotational attitude; magnetometers measure the Earth's magnetic field and provide heading information; and barometers calculate the drone's altitude by measuring atmospheric pressure. Communication interfaces facilitate communication between the flight controller and other drone components (such as the remote control, motor ESCs, GPS module, and camera). Common communication interfaces include UART, SPI, and I2C. Power management module: responsible for managing and distributing the input power, providing stable voltage and current for the flight control system and other related components, and also has functions such as battery power monitoring.

[0040] Specifically, the image sensor is the core component of the camera 1102, responsible for converting optical images into electrical signals. Based on the photoelectric effect, after photons pass through the lens and enter the sensor, they are absorbed by the photodiode in the sensor to generate electrons. The electrons are collected and converted into electrical signals, which are amplified and processed to form a digital image. It can include CCD (charge-coupled device) image sensors, CMOS (complementary metal oxide semiconductor) image sensors, etc.

[0041] Next, combine Figure 2 A method for capturing an image of a power transmission line in an embodiment of the present application is described. Figure 2 This is a flow chart of a method for capturing an image of a power transmission line provided in an embodiment of the present application, which specifically includes the following steps:

[0042] Step S210 : performing a first processing operation on the collected image to be processed to obtain a first target image.

[0043] Among them, the images to be processed refer to images of target transmission lines containing defects taken by drones. Since transmission lines are often installed in urban, mountainous, coastal and other environments, drone inspections may encounter various weather conditions, such as rainy and foggy days, which will block the drone's lens and make it impossible to collect accurate transmission line images, making it difficult to achieve the inspection purpose. Therefore, the defect factors specifically include: raindrops and / or haze.

[0044] Specifically, in one possible embodiment, a first processing operation is performed based on the collected image to be processed, including: constructing a generator of a generative adversarial network based on a U-Net architecture combined with a residual block and a channel attention module, wherein the U-Net architecture includes a symmetrical encoder and decoder; and using a multi-scale PathGAN as a discriminator of the generative adversarial network; inputting the image to be processed into the generator, extracting the features of the defective area of the image to be processed through the encoder, and restoring the background structure of the image to be processed through the decoder, wherein the defective area refers to the area containing raindrop occlusion; extracting the multi-scale features of the image to be processed through the convolutional layer of the residual block, reducing the resolution of the image to be processed, and optimizing the fusion of the features of the raindrop occlusion area through the channel attention module; outputting a de-rained image with the same resolution as the image to be processed; inputting the de-rained image into the discriminator, evaluating the local authenticity of the de-rained image through the discriminator, and feeding back the adversarial loss; constraining the generative adversarial network through a loss function, and training the generative adversarial network through a first target strategy, so that the generative adversarial network outputs a first target image, wherein the loss function includes an adversarial loss function, an L1 loss function, and a multi-scale perceptual loss function.

[0045] Among them, the generative adversarial network refers to the multi-scale attention generative adversarial network (MS-AttnGAN). The core module is to inject the visual attention mechanism into the generator and discriminator, so that the model focuses on the raindrop area and its surrounding structures; the generator (Generator) adopts an improved U-Net structure, embeds residual blocks (ResBlock) in the encoder and decoder, and adds channel attention modules in the deep layer of the encoder and the shallow layer of the decoder to generate channel weights to enhance the attention to raindrop-related feature channels, such as high-frequency edges and reflective areas; through the attention mechanism, the distribution pattern of the raindrop area is learned, which can be, for example, the blurred edges of transparent / translucent raindrops and the shape differences of raindrops of different scales, to generate a clear image after removing the raindrops. The discriminator uses multi-scale discrimination, simultaneously processing feature maps of three scales: 128*128, 64**64, and 32*32. Each scale uses an independent PatchGAN discriminator to evaluate the local texture consistency of the generated clear image after raindrop removal. It also determines whether the background edges after raindrop removal are natural and whether the reflective areas conform to physical laws, thereby forcing the generator to restore real details.

[0046] Among them, the loss functions complement each other and constrain the generation of adversarial networks from different levels. For example, the adversarial loss function can be as follows:

[0047] Ladv = Ex~preal[logD(x)]+Ez~pz[log(1-D(G(z)))]; where D(x) is the discriminator's probability of judging a true rain-free image, and G(z) is the generator's output image with raindrops removed. This is used to force the generator to produce more realistic images, making it impossible for the discriminator to distinguish between true rain-free images and generated images. The discriminator focuses more on the global authenticity of the image, such as whether the overall brightness and color distribution conform to a rain-free scene, and the rationality of the local structure, such as whether there are artifacts or blurred blocks in the area after raindrops are removed.

[0048] For example, the multi-scale perceptual loss function (PerceptualLoss) is based on a pre-trained VGG network (such as VGG16), which extracts feature maps of the generated image and the real image at multiple levels (such as Conv1_2, Conv2_2, Conv3_3) to ensure that the generated image and the real image are consistent in high-level semantic features, such as edges, textures, and object shapes, avoiding only pixel-level similarity but semantic distortion, such as the distortion of the background structure after removing raindrops, multi-scale feature alignment, shallow edges → deep semantics, and adapting to the complex fusion relationship between the raindrop area and the background, such as the local blurring of the background texture by translucent raindrops.

[0049] For example, the L1 loss function (L1 Loss) is shown in the following formula:

[0050] L1=E z,x ||G(z)-x||1; the L1 loss function is used to provide basic pixel-level constraints to ensure that the brightness and contrast of the derained image are close to those of the true rain-free image, avoiding over-enhancement or under-enhancement, such as loss of details due to overexposure. It dominates the optimization direction in the pre-training stage and quickly establishes the basic mapping relationship for raindrop removal.

[0051] For details, please refer to Figure 3 , Figure 3 is a schematic diagram of a generative adversarial network model provided in an embodiment of the present application, such as Figure 3As shown, the image to be processed 300 is input into the generative adversarial network model. The generator first removes raindrops to obtain multiple processed images 310 and 320, and finally outputs an image 330 with raindrops completely removed. Finally, the discriminator evaluates whether the output image is credible, that is, the probability of the image being real. Among them, LSTM (Long Short-Term Memory Network) is a special recurrent neural network used to solve the gradient vanishing problem of traditional RNN when processing long sequences. It can effectively capture long-distance dependencies in sequence data. Conv+Relu is a commonly used combination in deep learning model construction and plays a key role in image data feature extraction and processing. Convs represents the plural form of Convolutional Layers, and Relu refers to the Rectified Linear Unit activation function.

[0052] It can be seen that in this embodiment, through the adversarial mechanism of the generative adversarial network and the joint constraints of the multi-dimensional loss function, a complete process from coarse-grained raindrop removal to fine-grained detail restoration is formed, which provides high-quality image input for subsequent haze removal and semantic segmentation, and provides a high-quality image foundation for transmission line inspection in all-weather scenarios.

[0053] In one possible embodiment, see Figure 4 , Figure 4 This is a flow chart of a training generative adversarial network provided by an embodiment of the present application, such as Figure 4 As shown in Figure 1, training the generative adversarial network through the first target strategy includes the following steps:

[0054] S41. Reduce the resolution of the raindrop-free image and train the generator in the generative adversarial network based on the L1 loss function.

[0055] The goal of training the generator in a generative adversarial network is to enable it to have preliminary mapping capabilities. In training a generative adversarial network model, the first objective strategy includes two-stage training and progressive training.

[0056] Specifically, the first stage pre-trains the generator loss function: training is performed using only the L1 loss function. The L1 loss function directly calculates the pixel-wise absolute error between the generated image and the ground-truth image, enabling the generator to quickly learn a preliminary mapping from raindrop regions to rain-free regions. Training lasts for 100 epochs and includes the following steps: 1. Initialize the generator parameters; 2. Select an image containing raindrops from the dataset as input z and the corresponding ground-truth rain-free image x; 3. Input the raindrop image z into the generator G to generate the de-rained image G(z); 4. Calculate the L1 loss between G(z) and x; 5. Update the generator parameters based on the L1 loss using an optimizer (such as Adam). Finally, repeat steps 2-5 until 100 epochs of training are complete.

[0057] S42, joint loss function, updates the parameters of the generator and discriminator respectively until the generative adversarial network converges.

[0058] Specifically, the second stage is adversarial training, which uses a combination of adversarial loss, multi-scale perceptual loss, and L1 loss. The total loss formula is total_loss = (1.0*adv_loss+0.6*percep_loss+0.4*L1_loss). The adversarial loss forces the generator to produce more realistic images to deceive the discriminator; the multi-scale perceptual loss ensures that the generated images are consistent with the real images in terms of high-level semantic features; and the L1 loss continues to provide basic pixel-level constraints.

[0059] S43. When the training of the generative adversarial network reaches a convergence state, the resolution of the raindrop-removed image is increased to the original resolution of the image to be processed.

[0060] To increase the resolution, the input image resolution is set to 128×128 during initial training. Once the training reaches convergence, the resolution is gradually increased to 256×256. Each time the resolution is increased, the model parameters need to be fine-tuned to adapt to the higher resolution image. Training advantages: The feature space of low-resolution images is relatively simple, making it easier for the generator to learn basic deraining patterns, such as removing large raindrops. As the resolution gradually increases, the multi-scale perceptual loss and PatchGAN's local discrimination capabilities complement each other, ensuring that the details of the enlarged image remain realistic and natural, avoiding overfitting problems at high resolutions.

[0061] S44. Continue with the first target strategy until the generative adversarial network converges again.

[0062] It can be seen that in this embodiment, through two-stage training and progressive training, the generative adversarial network model can gradually learn the ability to remove raindrops and generate high-quality derained images on images of different resolutions.

[0063] Step S220 , performing a second processing operation on the first target image to obtain a second target image.

[0064] Specifically, in one possible embodiment, the target transmission line image containing defects refers to an image obscured by fog or haze; see Figure 5 , Figure 5 This is a flow chart of a defogging model processing data provided by an embodiment of the present application. Figure 5 As shown, performing a second processing operation on the first target image includes the following steps:

[0065] S51. Combine the atmospheric scattering model and deep learning network to build a defogging model.

[0066] Among them, the defogging model is an adaptive multi-scale physical guidance network, which combines the physical scattering model with deep learning. It achieves efficient defogging of images through multi-scale feature fusion, dynamic parameter adjustment and physical constraint optimization. Specifically, the defogging model architecture includes: (1) Backbone network: multi-scale feature extraction layer, which adopts an improved U-Net structure and contains 5-level downsampling-upsampling modules. Each level integrates dilated convolution to enhance the receptive field. Adaptive filtering module, which introduces dynamic convolution kernels in the jump connection and dynamically adjusts parameters according to the input fog concentration. (2) Physical constraint branch: transmittance estimation subnetwork, based on the improved dark channel prior (DCP), generates transmittance map through lightweight CNN (3-layer convolution), and adds channel attention mechanism (CA) to optimize local details. Atmospheric light estimation module, which combines global average pooling and spatial pyramid pooling (SPP) to predict atmospheric light vector, avoiding the misjudgment of sky area in traditional methods. (3) Multi-task joint optimization: Physical model embedding: Substitute the estimated transmittance t(x) and atmospheric light A into the atmospheric scattering formula to generate a preliminary dehazed image. Residual refinement module: Correct the deviation between the physical model output and the backbone network prediction through residual connections to enhance detail recovery.

[0067] S52: Train a defogging model according to the second objective strategy.

[0068] S53: Input the first target image into the trained defogging model.

[0069] Among them, the defogging model includes a backbone network and a physical constraint branch.

[0070] S54. Extract multi-scale features of the first target image through the backbone network, and estimate transmittance and atmospheric light through the physical constraint branch.

[0071] Among them, multi-scale features include dilated convolution and dynamic filtering. Specifically, in the first stage, synthetic data is used to force the physical constraint branch to learn accurate transmittance and atmospheric light estimation, providing reliable physical parameters for the second stage, avoiding the disconnection between the physical model and deep learning due to random parameter initialization during joint training, such as transmittance estimation errors causing the defogged image to be too dark or overexposed. After the second stage unlocks the backbone network, the prior knowledge of the physical branch (such as the physical range constraint of transmittance) guides the backbone network to learn features that conform to the laws of reality. At the same time, the multi-scale features of the backbone network are integrated, the dilated convolution expands the receptive field, and the dynamic filtering adapts to changes in fog concentration, supplementing the limitations of the physical model, such as the inability to handle the complex distribution of non-uniform fog.

[0072] S55. Calculate and obtain a preliminary defogging image based on the estimated transmittance, atmospheric light, and atmospheric scattering formula.

[0073] The atmospheric scattering formula is:

[0074] I(x)=J(x)·t(x)+A·(1-t(x));

[0075] Here, I(x) is the pixel value (RGB channels) of pixel x in the input foggy image; J(x) is the pixel value of pixel x in the dehazed, clear image to be solved; t(x) is the transmittance of pixel x, whose value range is limited by physical constraints to 0.1 ≤ t(x) ≤ 1 to avoid overexposure or distortion; A is the global atmospheric light vector, typically expressed in RGB channels, representing the intensity of ambient light scattered through fog. The solution yields J(x) = (I(x) - A (1 - t(x))) / t(x).

[0076] S56 , correcting detail defects of the preliminary defogging image through a residual refinement module, and outputting a second target image.

[0077] The detail defects include at least one of the following: edge blur and color aberration.

[0078] The residual refinement module optimizes details using the following formula:

[0079] J(x)=Jphys(x)+(Jnet(x)-Jphys(x))

[0080] Among them, Jnet(x) is the dehazed image predicted by the backbone network (U-Net) through deep learning; Jnet(x)-Jphys(x) corrects the errors of the physical model, such as excessive darkness and blurred edges, and enhances the recovery of details, such as the clarity of wire texture and insulator shed skirts.

[0081] It can be seen that in this embodiment, the defogging model can efficiently calculate a preliminary defogging image from a foggy image, providing clear visual input for subsequent semantic segmentation, and ultimately serving the accurate identification of key components of the transmission line.

[0082] Step S230 : Segmenting a plurality of components in the second target image according to the second target image, and identifying key components among the plurality of components.

[0083] Among them, key components refer to one or more components that maintain the safe operation of the power system, such as tension towers, straight towers, insulators in dirty areas, pin nuts in windy areas, etc.; in addition to multiple components, the segmentation results also include environmental information about the target transmission line.

[0084] Specifically, in a possible embodiment, see Figure 6 , Figure 6 This is a flowchart of a semantic segmentation process provided by an embodiment of the present application. Figure 6 As shown, based on the second target image, multiple components in the second target image are segmented and key components among the multiple components are identified, including the following steps:

[0085] S61. Input the second target image into the improved ResNet-18 shallow convolution layer to extract basic features.

[0086] Among them, the basic features refer to the image edges and textures, and the improvement operation refers to removing the last two layers and adding void convolution;

[0087] S62. Dynamically generate convolution kernel weights based on the texture complexity of the second target image and output a high-resolution feature map.

[0088] S63: Divide the second target image into multiple sub-blocks and output a low-resolution feature map.

[0089] S64. Convolve the high-resolution feature map and the low-resolution feature map separately, and achieve weighted fusion through spatial attention.

[0090] S65. Perform edge detection on the fused feature map using an edge detection operator to generate an edge mask, which is then multiplied element-by-element with the feature map to enhance the response of the boundary area.

[0091] S66. After multiple iterations, the convolutional layer is used to predict the category probability of each pixel to obtain the semantic segmentation mask.

[0092] Among them, each pixel corresponds to a component label.

[0093] S67. Process the fused feature map through CNN to determine the edge probability map of a single channel.

[0094] S68. Output semantic segmentation results.

[0095] Among them, the semantic segmentation results include component category label maps and edge probability maps.

[0096] Specifically, the semantic segmentation model addresses issues such as blurred edges, missed small objects, and computational redundancy in traditional segmentation models. It proposes dynamic multi-scale feature fusion, edge-guided attention mechanism, and lightweight context modeling to achieve efficient and accurate segmentation. The model architecture design includes:

[0097] (1) Dual-path encoder, local detail path (CNN branch): uses an improved ResNet-18 (removes the last two layers and adds dilated convolutions) to output high-resolution feature maps (1 / 4 the size of the original image). Introduces a dynamic convolution module: dynamically generates convolution kernel weights based on the input image to enhance adaptability to texture changes. Global context path (Transformer branch): uses a lightweight Swin-Transformer-Tiny structure to divide the image into 4×4 patches and outputs low-resolution global features (1 / 16 the size of the original image). Adds cross-window attention (CWA): shares attention weights between adjacent windows to reduce computational effort.

[0098] (2) Multi-scale fusion decoder, adaptive feature fusion module (AFFM): perform channel alignment (1×1 convolution) on the feature maps of the CNN and Transformer branches and perform weighted fusion through spatial attention. See formula:

[0099] F fused =α·F cnn +(1-α)·F transformer ;

[0100] Here, α is generated by a learnable parameter and the fusion ratio is dynamically adjusted. Edge-Guided Upsampling (EGU): Before each upsampling, an edge mask is generated using an edge detection operator (such as Sobel) and multiplied element-wise with the feature map to enhance the response of the boundary area.

[0101] (3) Edge optimization branch, edge-aware loss calculator: In parallel with the main decoder, a lightweight CNN is used to predict the edge probability map (1 channel) and calculate the auxiliary loss with the real edge (generated by annotation). FocalLoss is used to alleviate the problem of edge pixel imbalance.

[0102] Step S240: Adjust the shooting parameters of the UAV according to the key components to optimize the acquisition of the target transmission line image.

[0103] Among them, the shooting parameters include flight trajectory and focal length.

[0104] As can be seen, in this embodiment, by collecting the image to be processed and processing it according to the generative adversarial network, a first target image is obtained; a defogging model is constructed by combining the atmospheric scattering model and the deep learning network; the first target image is then defogged according to the defogging model to obtain a second target image; the second target image is then input into the semantic segmentation model to obtain a semantic segmentation result, which includes: the components of the target transmission line and the environmental information in which the target transmission line is located; and, based on the environmental information, the key components of the components are determined; finally, based on the semantic segmentation result, the drone's shooting parameters are adjusted to optimize the acquisition of the target transmission line image, and the shooting parameters include the flight trajectory and focal length. In this way, through multi-model collaborative processing, the defects of the original image are eliminated, and an accurate and clear image of the target transmission line is obtained. The drone is also controlled to adjust its flight trajectory and lens focal length, further improving the quality of images collected by the drone in adverse weather.

[0105] In one possible embodiment, a defogging model is trained according to the second target strategy, including: independently training the transmittance estimation subnetwork and the atmospheric light estimation module in the defogging model; jointly optimizing the backbone network with the physical constraint branch, and generating a target defogging image through multi-scale feature fusion and adversarial training. The target defogging image refers to an image that conforms to physical laws and is visually realistic; and fine-tuning the target defogging image according to the residual refinement module to correct the distribution differences between the target defogging image and the real image data, the distribution differences including raindrop residues and sensor noise.

[0106] Among them, the transmittance estimation subnetwork and atmospheric light estimation module are trained separately to accurately estimate the key parameters transmittance and atmospheric light in the physical scattering model, avoiding optimization deviations caused by inaccurate physical parameters during subsequent joint training.

[0107] Specifically, training can be done in stages: Stage 1: Train only the physical constraint branch (transmittance and atmospheric light estimation), fixing the backbone network parameters. Stage 2: Jointly optimize the backbone network and the physical branch, introducing an adversarial loss. Stage 3: Fine-tune the residual refinement module, using high-resolution real-world fog images (such as O-HAZE). Hyperparameter settings: Initial learning rate: 2×10-42×10-4 (Adam optimizer), decaying by 50% every 50 epochs. Batch size: 8 (limited GPU memory), using mixed-precision training to accelerate convergence.

[0108] It can be seen that in this embodiment, the filter parameters are adaptively adjusted according to the input fog concentration to improve the effect of non-uniform fog scenes, and the deep learning prediction and physical model output are jointly optimized to avoid the overfitting of the pure data-driven method. Through channel pruning and model quantization, efficient data processing is achieved.

[0109] In one possible embodiment, the method further includes: determining a main segmentation loss function; performing weighted cross entropy processing to assign higher weights to difficult-to-separate samples to avoid confusion of similar components; determining an edge auxiliary loss function to reduce the weights of non-edge pixels; summing the main style loss function and the edge auxiliary loss function to obtain a total loss function, and using the total loss function to drive the category segmentation of the multiple components and ensure edge integrity.

[0110] The above scheme is the loss function supervision step, which belongs to the training phase. First, the main segmentation loss Dice Loss can address class imbalance (for example, background pixels account for 80%) and force the model to focus on the segmentation accuracy of small components (pins, nuts). Weighted cross entropy assigns higher weights to difficult-to-separate samples (such as tension towers and straight towers) to avoid confusion between similar components. The edge-assisted loss is shown in the following formula:

[0111]

[0112] The total loss is the weighted sum of the two, driving the model to simultaneously optimize category segmentation and edge integrity.

[0113] The above mainly introduces the solution of the embodiment of the present application from the perspective of the execution process on the method side. It is understandable that, in order to realize the above functions, the mobile electronic device includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiment provided in this article, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0114] The embodiment of the present application can divide the functional units of the electronic device according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0115] and Figure 2 For details on the implementation of Figure 7 , Figure 7This is a functional unit composition block diagram of an image acquisition device for a transmission line provided in an embodiment of the present application. The image acquisition device 700 for a transmission line includes: a first processing unit 710, a second processing unit 720, a segmentation unit 730, and a control unit 740; wherein the first processing unit 710 is used to perform a first processing operation on the acquired image to be processed to obtain a first target image, where the image to be processed refers to an image of a target transmission line containing defects taken by a drone; the second processing unit 720 is used to perform a second processing operation on the first target image to obtain a second target image; the segmentation unit 730 is used to segment multiple components in the second target image based on the second target image and identify key components among the multiple components, where the key components refer to one or more components that are essential for maintaining the safe operation of the power system; the control unit 740 is used to adjust the shooting parameters of the drone according to the key components to optimize the acquisition of the target transmission line image, where the shooting parameters include flight trajectory and focal length.

[0116] In one possible embodiment, a first processing operation is performed based on the collected image to be processed. The first processing unit 710 is specifically configured to: construct a generator of a generative adversarial network based on a U-Net architecture combined with a residual block and a channel attention module, wherein the U-Net architecture includes a symmetrical encoder and decoder; and use a multi-scale PathGAN as a discriminator of the generative adversarial network; input the image to be processed into the generator, extract features of defective areas of the image to be processed through the encoder, and restore the background structure of the image to be processed through the decoder, wherein the defective area refers to an area occluded by raindrops; extract multi-scale features of the image to be processed through the convolutional layer of the residual block, reduce the resolution of the image to be processed, and optimize the fusion of features of the raindrop occlusion area through the channel attention module; output a de-rained image with the same resolution as the image to be processed; input the de-rained image into the discriminator, evaluate the local authenticity of the de-rained image through the discriminator, and feed back an adversarial loss; constrain the generative adversarial network through a loss function, and train the generative adversarial network through a first target strategy so that the generative adversarial network outputs a first target image, wherein the loss function includes an adversarial loss function, an L1 loss function, and a multi-scale perceptual loss function.

[0117] In one possible embodiment, in terms of training the generative adversarial network through the first target strategy, the first processing unit 710 is specifically used to: reduce the resolution of the de-rained image, and train the generator in the generative adversarial network according to the L1 loss function so that the generator has preliminary mapping capabilities; jointly update the parameters of the generator and the discriminator until the generative adversarial network converges; and, when the training of the generative adversarial network reaches a convergence state, increase the resolution of the de-rained image to the original resolution of the image to be processed, and continue the first target strategy until the generative adversarial network is in a convergence state again.

[0118] In one possible embodiment, the target transmission line image containing defects refers to an image obscured by fog or haze; in terms of performing a second processing operation on the first target image, the second processing unit 720 is specifically used to: combine the atmospheric scattering model and the deep learning network to construct a defogging model; train the defogging model according to the second target strategy; input the first target image into the trained defogging model, the defogging model includes a backbone network and a physical constraint branch; extract the multi-scale features of the first target image through the backbone network, and estimate the transmittance and atmospheric light through the physical constraint branch, the multi-scale features include void convolution and dynamic filtering; calculate a preliminary defogging image based on the estimated transmittance, atmospheric light, and atmospheric scattering formula; correct the detail defects of the preliminary defogging image through the residual refinement module, and output the second target image, the detail defects include at least one of the following: edge blur and chromatic aberration.

[0119] In one possible embodiment, in terms of training the defogging model according to the second target strategy, the second processing unit 720 is specifically used to: independently train the transmittance estimation subnetwork and the atmospheric light estimation module in the defogging model; jointly optimize the backbone network and the physical constraint branch, and generate a target defogging image through multi-scale feature fusion and adversarial training. The target defogging image refers to an image that conforms to physical laws and is visually realistic; according to the residual refinement module, the target defogging image is fine-tuned to correct the distribution difference between the target defogging image and the real image data, and the distribution difference includes raindrop residues and sensor noise.

[0120] In one possible embodiment, in terms of segmenting multiple components in the second target image based on the second target image, the segmentation unit 730 is specifically used to: input the second target image to the improved ResNet-18 shallow convolution layer to extract basic features, where the basic features refer to image edges and textures, and the improvement operation refers to removing the last two layers and adding void convolution; dynamically generate convolution kernel weights according to the texture complexity of the second target image, and output a high-resolution feature map; and divide the second target image into multiple sub-blocks to output a low-resolution feature map; perform convolution on the high-resolution feature map and the low-resolution feature map respectively, and achieve weighted fusion through spatial attention; perform edge detection on the fused feature map using an edge detection operator to generate an edge mask, which is multiplied element-by-element with the feature map to enhance the response of the boundary area; after multiple iterations, predict the category probability of each pixel through the convolution layer to obtain a semantic segmentation mask, where each pixel corresponds to a component label; process the fused feature map through CNN to determine a single-channel edge probability map; and output a semantic segmentation result, which includes a component category label map and an edge probability map.

[0121] In one possible embodiment, the image acquisition device 700 of the power transmission line is further specifically used to: determine a main segmentation loss function; perform weighted cross entropy processing to assign higher weights to difficult-to-separate samples to avoid confusion of similar components; determine an edge auxiliary loss function to reduce the weights of non-edge pixels; sum the main style loss function and the edge auxiliary loss function to obtain a total loss function, and use the total loss function to drive the category segmentation of multiple components and ensure edge integrity.

[0122] It can be understood that since the method embodiment and the device embodiment are different presentation forms of the same technical concept, the content of the method embodiment part in this application should be synchronously adapted to the device embodiment part and will not be repeated here.

[0123] Figure 8 This is a structural block diagram of an electronic device provided in an embodiment of the present application. Figure 8 As shown, the electronic device 800 may include one or more of the following components: a processor 801, a memory 802 coupled to the processor 801, wherein the memory 802 may store one or more computer programs, and the one or more computer programs may be configured to implement the methods described in the above examples when executed by one or more processors 801. Figure 1 Server 100 is shown.

[0124] The processor 801 may include one or more processing cores. The processor 801 uses various interfaces and routes to connect the various parts of the entire electronic device 800, and executes various functions and processes data of the electronic device 800 by running or executing instructions, programs, code sets or instruction sets stored in the memory 802, and calling data stored in the memory 802. Optionally, the processor 801 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 801 can integrate one or more combinations of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. It is understandable that the above-mentioned modem may not be integrated into the processor 801, but may be implemented separately through a communication chip.

[0125] The memory 802 may include a random access memory (RAM) or a read-only memory (ROM). The memory 802 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 802 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method examples, etc. The data storage area may also store data created by the electronic device 800 during use.

[0126] It is understandable that the electronic device 800 may include more or fewer structural elements than those in the above structural block diagram, for example, a power module, physical buttons, a WiFi (Wireless Fidelity) module, a speaker, a Bluetooth module, a sensor, etc., which are not limited here.

[0127] The present application also provides a computer storage medium having a computer program / instructions stored thereon, which, when executed by a processor, implements some or all of the steps of any of the methods described in the above method embodiments. The present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, wherein the computer program is operable to cause a computer to execute some or all of the steps of any of the methods described in the above method embodiments.

[0128] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0129] In the several embodiments provided in this application, it should be understood that the disclosed methods, devices, and systems can be implemented in other ways. For example, the device embodiments described above are merely schematic; for example, the division of units is merely a logical function division, and there may be other division methods in actual implementation; for example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection of devices or units, which may be electrical, mechanical, or other forms.

[0130] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0131] In addition, the functional units in various embodiments of the present invention may be integrated into a single processing unit, each unit may be physically included separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or hardware plus software functional units.

[0132] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform some steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a volatile memory or a non-volatile memory. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct RAM bus random access memory (DR RAM), among other media that can store program code.

[0133] Although the present invention is disclosed above, it is not limited thereto. Any person skilled in the art may readily conceive of variations or substitutions, and may make various modifications and alterations without departing from the spirit and scope of the present invention. Combinations of the above-described functions and implementation steps, including software and hardware implementations, are all within the scope of protection of the present invention.

Claims

1. A method for collecting images of a transmission line, characterized in that: include: Performing a first processing operation on the collected image to be processed to obtain a first target image, wherein the image to be processed is an image of a target power transmission line containing defects taken by a drone; Performing a second processing operation on the first target image to obtain a second target image; Segmenting a plurality of components in the second target image according to the second target image, and identifying key components among the plurality of components, wherein the key components refer to one or more components that are essential for maintaining safe operation of the power system; According to the key components, the shooting parameters of the UAV are adjusted to optimize the acquisition of the target transmission line image, and the shooting parameters include flight trajectory and focal length.

2. The method according to claim 1, characterized in that The first processing operation is performed according to the collected image to be processed, including: A generator for a generative adversarial network is constructed based on a U-Net architecture, which combines residual blocks with a channel attention module. The U-Net architecture includes a symmetric encoder and decoder. A multi-scale PathGAN is used as the discriminator for the generative adversarial network. Inputting the image to be processed into the generator, extracting defect area features of the image to be processed by the encoder, and restoring the background structure of the image to be processed by the decoder, wherein the defect area refers to an area covered by raindrops; Extracting multi-scale features of the image to be processed through the convolutional layer of the residual block, reducing the resolution of the image to be processed, and optimizing the fusion of raindrop occlusion area features through the channel attention module; Outputting a raindrop-removed image with a resolution consistent with the image to be processed; Inputting the de-raindropped image into the discriminator, evaluating the local authenticity of the de-raindropped image through the discriminator, and feeding back the adversarial loss; The generative adversarial network is constrained by a loss function and trained by a first target strategy so that the generative adversarial network outputs the first target image. The loss function includes an adversarial loss function, an L1 loss function, and a multi-scale perceptual loss function.

3. The method according to claim 2, characterized in that The training of the generative adversarial network using a first target strategy includes: Reducing the resolution of the raindrop-removed image and training the generator in the generative adversarial network according to an L1 loss function so that the generator has a preliminary mapping capability; Combined with the loss function, the parameters of the generator and the discriminator are updated respectively until the generative adversarial network converges; and When the training of the generative adversarial network reaches a convergence state, the resolution of the raindrop-removed image is increased to the original resolution of the image to be processed, and the first target strategy is continued until the generative adversarial network is in a convergence state again.

4. The method according to claim 2, characterized in that The target transmission line image containing defects refers to an image obscured by fog or haze; The performing a second processing operation on the first target image includes: Combining the atmospheric scattering model and deep learning network to build a defogging model; Training the defogging model according to a second objective strategy; Inputting the first target image into the trained defogging model, wherein the defogging model includes a backbone network and a physical constraint branch; Extracting multi-scale features of the first target image through the backbone network, and estimating transmittance and atmospheric light through the physical constraint branch, wherein the multi-scale features include dilated convolution and dynamic filtering; Calculating a preliminary defogging image based on the estimated transmittance, the atmospheric light, and an atmospheric scattering formula; The residual refinement module corrects detail defects of the preliminary dehazed image and outputs the second target image, where the detail defects include at least one of the following: edge blur and chromatic aberration.

5. The method according to claim 4, characterized in that The training of the defogging model according to the second objective strategy includes: Independently training the transmittance estimation subnetwork and the atmospheric light estimation module in the defogging model; The backbone network and the physical constraint branch are jointly optimized to generate a target defogging image through multi-scale feature fusion and adversarial training. The target defogging image refers to an image that conforms to physical laws and is visually realistic. According to the residual refinement module, the target defogging image is fine-tuned to correct the distribution difference between the target defogging image and the real image data, wherein the distribution difference includes raindrop residue and sensor noise.

6. The method according to any one of claims 2 to 5, characterized in that: Segmenting the plurality of components in the second target image according to the second target image includes: Inputting the second target image into a shallow convolutional layer of a modified ResNet-18 to extract basic features, where the basic features are image edges and textures. The modified operation is to remove the last two layers and add a dilated convolution. Dynamically generating convolution kernel weights according to the texture complexity of the second target image and outputting a high-resolution feature map; and dividing the second target image into a plurality of sub-blocks and outputting a low-resolution feature map; Convolving the high-resolution feature map and the low-resolution feature map respectively, and achieving weighted fusion through spatial attention; The fused feature map is subjected to edge detection using an edge detection operator to generate an edge mask, which is then element-wise multiplied with the feature map to enhance the response of the boundary area. After multiple iterations, the convolutional layer predicts the category probability of each pixel to obtain a semantic segmentation mask, where each pixel corresponds to a component label. Processing the fused feature map through CNN to determine an edge probability map of a single channel; Output a semantic segmentation result, wherein the semantic segmentation result includes a component category label map and the edge probability map.

7. The method according to claim 6, characterized in that The method further comprises: Determine the main segmentation loss function; Perform weighted cross entropy processing to give higher weights to difficult samples to avoid confusion between similar parts; Determine an edge-assisted loss function to reduce the weight of non-edge pixels; The main style loss function and the edge auxiliary loss function are summed to obtain a total loss function, and the total loss function is used to drive the category segmentation of the multiple components and ensure edge integrity.

8. An image acquisition device for a power transmission line, characterized in that: include: A first processing unit, a second processing unit, a segmentation unit, and a control unit; wherein, The first processing unit is configured to perform a first processing operation based on the collected image to be processed to obtain a first target image, wherein the image to be processed is an image of a target power transmission line containing defects taken by a drone; The second processing unit is configured to perform a second processing operation on the first target image to obtain a second target image; The segmentation unit is configured to segment a plurality of components in the second target image according to the second target image, and identify key components among the plurality of components, wherein the key components refer to one or more components that are essential for maintaining safe operation of the power system; The control unit is used to adjust the shooting parameters of the UAV according to the key components to optimize the acquisition of the target transmission line image, and the shooting parameters include flight trajectory and focal length.

9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store one or more programs and is configured to be executed by the processor, wherein the programs include instructions for executing the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that A computer program for electronic data exchange is stored, wherein the computer program enables a computer to execute the method according to any one of claims 1 to 7.