Unmanned aerial vehicle image enhancement method based on generative adversarial network
By combining the generative adversarial network and self-attention mechanism, the problem of insufficient image quality of the drone is solved, and lightweight real-time enhancement is achieved on the drone side, which is suitable for efficient image processing in multiple scenarios.
Patent Information
- Application Number
- CN202510551518.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-08-15
AI Technical Summary
The image quality of the drone is limited by shooting conditions, with low light noise, motion blur, insufficient dynamic range and geometric distortion. The existing methods cannot accurately enhance the specific needs, and the traditional deep learning model is computationally large, making it difficult to achieve lightweight real-time enhancement on the drone side.
The generative adversarial network is adopted to combine self-attention mechanisms to design generator and discriminator networks. Through anti-loss and content loss training, the image enhancement of conditional guidance and regional focus is achieved, and the end-side deployment and lightweight design are supported.
It improves the visual authenticity and enhances accuracy of drone images, adapts to complex environments, reduces computing volume, supports real-time processing, and is suitable for drone inspections and emergency rescue scenarios.
Smart Images

Figure CN120495104A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of unmanned aerial vehicles (UAVs), and in particular relates to a UAV image enhancement method based on a generative adversarial network. Background Art
[0002] Drone imagery is image data collected by drones equipped with cameras or multimodal sensors (such as infrared and multispectral equipment). It has the characteristics of flexible shooting angles (capable of low-altitude multi-angle viewing), high resolution (consumer-grade devices can reach the centimeter level, and professional-grade devices can reach the sub-centimeter level), convenient acquisition (suitable for rapid deployment in remote or dynamic scenes), and multi-dimensional information support (visible light, thermal imaging, and other multimodal data). However, its quality is often limited by shooting conditions, and there are problems such as low-light noise, motion blur, and insufficient dynamic range. It is also prone to geometric distortion due to lens distortion and changes in the drone's posture. The need for real-time processing of massive data and insufficient small target detection accuracy also restrict its application effect. Currently, drone imagery is widely used in agriculture (crop health monitoring, irrigation planning), surveying and mapping (high-precision map construction), infrastructure inspection (power line defect detection), emergency rescue (disaster scene image transmission) and other fields.
[0003] The quality of existing drone images is limited by shooting conditions. Low light, complex weather, and changes in flight attitude lead to blurred images, high noise, and loss of details. It is difficult to adapt to the image quality differences between different types of drones and diverse scenarios. Drone image enhancement methods cannot accurately enhance images for specific needs and only rely on objective indicators or subjective evaluations, lacking multi-dimensional verification. Traditional deep learning models are computationally intensive, making it difficult to achieve lightweight real-time enhancement on the drone side. To this end, we propose a drone image enhancement method based on a generative adversarial network to address the above problems. Summary of the Invention
[0004] The purpose of this invention is to provide a drone image enhancement method based on generative adversarial networks, which can combine cGAN with the self-attention mechanism to achieve precise enhancement of "conditional guidance + regional focus", break through the global uniformity defect of traditional GAN, and make the subjective vision close to the real image. The objective indicators are better than traditional algorithms. The lightweight design supports end-side deployment, the training process is standardized for easy reproduction, and the post-processing and application links are complete. It closely meets the needs of drone inspections, solves the pain points of difficult data collection, low enhancement accuracy, and poor real-time performance, and has significant commercial value.
[0005] The technical solutions adopted by the present invention are as follows:
[0006] A UAV image enhancement method based on a generative adversarial network, the UAV image enhancement method comprising the following steps:
[0007] Step 1. Dataset preparation and preprocessing;
[0008] Step 2. Generator network design;
[0009] Step 3. Discriminator network design;
[0010] Step 4. Loss function definition;
[0011] Step 5. Network training strategy;
[0012] Step 6. Conditional input and attention mechanism;
[0013] Step 7. Model validation and evaluation;
[0014] Step 8. Reasoning and image enhancement;
[0015] Step 9. Post-processing and application of results.
[0016] In a preferred embodiment, the dataset preparation and preprocessing includes data collection, data cleaning and annotation, data preprocessing, data partitioning and storage, obtaining low-quality drone images and their corresponding high-quality reference images, using different models of drones to shoot in various weather conditions and flight altitudes, recording shooting parameters, searching for public datasets related to drone images, and screening images that meet low-quality standards;
[0017] Delete images with excessive blur, severe occlusion, or incomplete content. Check the scene consistency between high-quality reference images and low-quality images. Remove duplicate images by comparing hash values to avoid training data redundancy. Annotate each image with a quality label and record image resolution, capture time, and sensor model metadata.
[0018] The original image is scaled to a fixed size, and the center is cropped to avoid edge information loss. The image is randomly rotated by ±15° and ±30° to simulate the posture changes of the drone during flight. The local area is randomly cropped and resized to 256×256. The pixel value is linearly scaled from [0,255] to [-1,1] or [0,1]. The formula is as follows:
[0019] (scaled to [0,1])
[0020] Accelerate gradient updates during neural network training;
[0021] The dataset is divided into training set, validation set, and test set in an 8:1:1 ratio. The validation set and test set contain original low-quality images without data augmentation. The data pipeline is constructed using PyTorch's Dataset and DataLoader or TensorFlow's tf.data.Dataset.
[0022] In a preferred embodiment, the generator network design uses a convolutional neural network as the backbone, extracts deep features of the image through convolution and pooling, restores image resolution through deconvolution or interpolation, combines jump connections to fuse shallow details, uses Tanh or Sigmoid activation functions, generates enhanced images consistent with the input size, and uses convolution + pooling to extract deep features: 3×3 convolution increases the number of channels layer by layer, 64→128→
[0023] 256, stride = 2 downsampling, keep the number of channels at 512, use 1×1 convolution to compress the amount of calculation, use deconvolution or interpolation + convolution upsampling, concatenate the corresponding layer features of the encoder through jump connections, retain shallow details, generate an image of the same size as the input, map 1×1 convolution to 3 channels, use Tanh / Sigmoid activation function to normalize pixel values, and use depth-wise separable convolution instead of standard convolution.
[0024] In a preferred embodiment, the discriminator network is designed to adopt a PatchGAN structure to discriminate local areas of the image, superimpose multiple convolutional layers, gradually narrow the receptive field, focus on the local texture and color authenticity of the image, output a single scalar value, and indicate the probability that the input image is a real image. The global image is not discriminated, the image is divided into multiple local patches, and the average value of the patch-level discrimination results is output. The convolutional layer structure is designed to receive the image and start downsampling with 4×4 convolution + LeakyReLU, step size = 2, number of channels 64, and the number of channels is increased layer by layer, 64→128→256→512. LeakyReLU is used for activation after each convolution, InstanceNormalization is added to some layers, and the pooling layer is replaced by convolution with step size = 2. The output layer is designed to compress the number of channels to 1 with 1×1 convolution, output a single-channel feature map, average the feature map, and output a scalar value through the Sigmoid activation function, indicating the probability that the input image is a real image.
[0025] In a preferred embodiment, the loss function definition includes adversarial loss and content loss. The adversarial loss is to force the generator to generate an image as close to the real image as possible. The formula is:
[0026] ζ GAN (G,D)=Ε x~Pdata [logD(x)]+Ε x~Pz [log(1-D(G(x)))]
[0027] Among them, G is the generator, D is the discriminator, x is the real image, and z is the input noise;
[0028] The content loss is to extract features based on the pre-trained VGG network, calculate the feature vector distance between the generated image and the real image, and retain the semantic structure of the image. The total loss function is:
[0029] ζ total =ζ GAN +λ·ζ content
[0030] λ is the balance coefficient, which adjusts the weight of adversarial loss and content loss.
[0031] In a preferred embodiment, the network training strategy includes weight initialization and alternating training. The weight initialization is that both the generator and the discriminator are initialized with normal distribution or Xavier initialization, the Adam optimizer is selected, the parameters are default, the generator learning rate = 0.0002, the discriminator learning rate = 0.0002, β1 = 0.5, the initial decay rate of the first-order momentum is reduced, β2 = 0.999, and the second-order momentum convergence is accelerated. The alternating training is input data, real high-quality image (x_real) → label y_real = 1, enhanced image generated by the generator (x_fake = G(x_low)) → label y_fake = 0, forward propagation, calculating the output probabilities D(x_real) and D(x_fake) of the discriminator for x_real and x_fake, and calculating the loss:
[0032] L D =-[logD(x r eal)+log(1-D(G(x f ake)))]
[0033] Back propagation: Update the discriminator parameters to maximize L_D, that is, let D(x_real)→1, D(x_fake)→0;
[0034] Fixed the discriminator parameters, only updated the generator, input data, low-quality image x_low, the goal is to make the generated x_fake fool the discriminator, forward propagation, generate x_fake = G(x_low), calculate the discriminator's output probability D(x_fake) for x_fake, and calculate the loss:
[0035] L G =-log D(x f ake)(adversarial loss)+λ·L content (Content loss)
[0036] Back propagation: Update the generator parameters to minimize L_G, that is, let D(x_fake)→1;
[0037] Repeat the above steps until the loss converges to the preset number of iterations 50-100 epochs;
[0038] Learning rate decay strategy, reduce the learning rate in the later stage of training to avoid parameter oscillation, linear decay:
[0039]
[0040] When the number of iterations iter reaches the maximum number of iterations iter max , the learning rate drops to 0;
[0041] Cosine annealing:
[0042]
[0043] The learning rate decays in a cosine curve, with smaller fluctuations in the later stages. When the validation set loss stops decreasing and there is no improvement for five consecutive epochs, the decay strategy is initiated.
[0044] In a preferred solution, the conditional input and attention mechanism is to input noise type and light intensity labels into the generator to achieve directional enhancement. A self-attention module is introduced into the generator to make the model focus on buildings and roads in the image. The model receives images and conditional labels at the same time, judges whether the image is a real sample under given conditions, and splices the image features with the conditional label features in the deep network to strengthen the conditional correlation judgment, adjust the loss function, and introduce the conditional term in the adversarial loss. The formula is:
[0045]
[0046] Among them, c is the conditional label.
[0047] In a preferred embodiment, the model verification and evaluation includes subjective evaluation, objective indicator evaluation, and ablation experiment. The subjective evaluation is to randomly select 20-50 low-quality images and their corresponding real high-quality images from the verification set / test set, generate enhanced images, evaluate noise suppression to observe whether there is residual noise in the smooth area of the image, edge clarity to check whether the edge of the object is sharp, whether there is blur or over-sharpening artifacts, detail retention to evaluate whether small targets are distinguishable and whether the texture is natural, and the objective indicator evaluation is to generate an image (I gen ) and the real image (I gt ) is converted to an 8-bit image with a pixel value range of [0,255] and the mean square error (MSE) is calculated:
[0048]
[0049] H represents the height of the image, W represents the width of the image, H×W represents the total number of pixels in the image, (i, j) is the coordinate of the pixel, I gen (i, j) represents the pixel value of the pixel located in the i-th row and j-th column in the generated image;
[0050] The ablation experiment uses the same dataset and training parameters to train the baseline model and the comparison model respectively. The PSNR / SSIM / LPIPS indicators of the two groups of models are calculated on the test set, the differences are compared, and the generated images are visualized to observe the impact of the module on the details.
[0051] In a preferred solution, the reasoning and image enhancement involves inputting low-quality drone images into a trained generator, outputting enhanced images, developing scripts or tools to batch enhance large-scale drone images, deploying them to the drone end, and achieving real-time processing through model compression or lightweight network design.
[0052] In a preferred embodiment, the post-processing and application of the results is to perform deblocking filtering and sharpening operations on the generated image to further improve the visual effect, and the enhanced image is used for drone inspection, remote sensing image analysis, and disaster monitoring.
[0053] The technical effects achieved by the present invention are:
[0054] By collecting data from different drone models, weather conditions, and flight altitudes, covering multiple scenarios such as cities, farmland, and power facilities, the model's adaptability to real and complex environments is improved. Data augmentation strategies artificially expand the data distribution to avoid overfitting, allowing the model to remain stable despite changes in drone posture or noise interference. Operations such as unifying the size and normalizing pixel values ensure that the data format of the input network is consistent, accelerating training convergence. Center cropping and maintaining the aspect ratio strategies reduce semantic distortion caused by image deformation and retain key information.
[0055] The codec structure incorporates skip connections to complement shallow details with deep semantics, avoiding incomplete enhancement caused by single-scale features. The lightweight design reduces the number of parameters while ensuring accuracy, adapting to the computing power limitations of drones and supporting real-time enhancement. The PatchGAN architecture focuses on the texture and color consistency of local patches in the image, forcing the generator to optimize details rather than focusing solely on global structure, improving visual realism. InstanceNormalization avoids cross-sample statistical interference, making the discriminator more sensitive to local anomalies in a single image and guiding the generator to fine-tune adjustments.
[0056] The adversarial loss drives the generator to approximate the real image distribution, solving the over-enhancement and color shift issues that are common in traditional algorithms. The content loss, based on a pre-trained VGG network, preserves semantic structure, avoiding the common "blurry but realistic" pitfall of GAN generation and ensuring that the enhanced images are suitable for downstream tasks. cGAN's targeted enhancement: By using labels such as noise type and light intensity, the model can perform customized enhancements for specific problems, eliminating the need to train separate models for different scenarios. The self-attention module forces the model to focus on key areas, suppressing over-enhancement of irrelevant background and improving the detectability of small objects.
[0057] Subjective evaluation aligns with human visual characteristics to ensure that the enhancement results meet the actual needs of inspectors. Differences are quantified at the pixel, structural, and semantic levels to facilitate iterative model optimization. Ablation experiments verify module effectiveness and avoid redundant design. Model compression and lightweighting: Reduce model size through pruning, quantization, and other technologies to support real-time processing on embedded devices and reduce data return latency. Batch processing and post-optimization: Develop scripts to support large-scale image enhancement and further improve practicality through post-processing such as deblocking filtering and sharpening, adapting to batch scenarios such as remote sensing analysis and disaster monitoring.
[0058] To address common inspection issues such as low light, haze, and motion blur, we provide an end-to-end enhancement solution that directly improves the accuracy of defect detection algorithms and supports real-time processing, enabling drones to generate clear images during flight and reducing the cost of repeated shooting. This is especially suitable for time-sensitive scenarios such as emergency rescue. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 This is a schematic diagram of a UAV image enhancement method based on a generative adversarial network according to the present invention. DETAILED DESCRIPTION
[0060] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0061] See also Figure 1 As shown, the present invention provides a UAV image enhancement method based on a generative adversarial network, and the UAV image enhancement method includes the following steps:
[0062] Step 1. Dataset preparation and preprocessing;
[0063] Step 2. Generator network design;
[0064] Step 3. Discriminator network design;
[0065] Step 4. Loss function definition;
[0066] Step 5. Network training strategy;
[0067] Step 6. Conditional input and attention mechanism;
[0068] Step 7. Model validation and evaluation;
[0069] Step 8. Reasoning and image enhancement;
[0070] Step 9. Post-processing and application of results.
[0071] Dataset preparation and preprocessing include data collection, data cleaning and annotation, data preprocessing, data partitioning and storage, obtaining low-quality drone images and their corresponding high-quality reference images, using different drone models to shoot in various weather conditions and flight altitudes, recording shooting parameters, searching for public datasets related to drone images, and screening images that meet low-quality standards;
[0072] Delete images with excessive blur, severe occlusion, or incomplete content. Check the scene consistency between high-quality reference images and low-quality images. Remove duplicate images by comparing hash values to avoid training data redundancy. Annotate each image with a quality label and record image resolution, capture time, and sensor model metadata.
[0073] The original image is scaled to a fixed size, and the center is cropped to avoid edge information loss. The image is randomly rotated by ±15° and ±30° to simulate the posture changes of the drone during flight. The local area is randomly cropped and resized to 256×256. The pixel value is linearly scaled from [0,255] to [-1,1] or [0,1]. The formula is as follows:
[0074] (scaled to [0,1])
[0075] Accelerate gradient updates during neural network training;
[0076] The dataset is divided into training set, validation set, and test set in an 8:1:1 ratio. The validation set and test set contain original low-quality images without data augmentation. The data pipeline is constructed using PyTorch's Dataset and DataLoader or TensorFlow's tf.data.Dataset.
[0077] The generator network design uses a convolutional neural network as the backbone, extracts deep image features through convolution and pooling, restores image resolution through deconvolution or interpolation, combines jump connections to fuse shallow details, uses Tanh or Sigmoid activation functions, generates enhanced images with the same input size, and uses convolution + pooling to extract deep features: 3×3 convolution increases the number of channels layer by layer, 64→128→256, downsampling with a step size of 2, maintaining the number of channels at 512, using 1×1 convolution to compress the computational complexity, using deconvolution or interpolation + convolution upsampling, splicing the corresponding layer features of the encoder through jump connections, retaining shallow details, generating images of the same size as the input, 1×1 convolution maps to 3 channels, the activation function uses Tanh / Sigmoid to normalize the pixel values, and depth-separable convolution is used instead of standard convolution.
[0078] The discriminator network is designed to adopt the PatchGAN structure to discriminate local areas of the image. Multiple convolution layers are superimposed to gradually reduce the receptive field, focus on the local texture and color authenticity of the image, and output a single scalar value to indicate the probability that the input image is a real image. The global image is not discriminated. The image is divided into multiple local patches and the average value of the patch-level discrimination results is output. The convolution layer structure is designed to receive the image and start downsampling with 4×4 convolution + LeakyReLU, step size = 2, number of channels 64, and the number of channels is increased layer by layer, 64→128→256→512. LeakyReLU is used for activation after each convolution, InstanceNormalization is added to some layers, and the pooling layer is replaced by convolution with step size = 2. The output layer is designed to compress the number of channels to 1 with 1×1 convolution, output a single-channel feature map, take the average of the feature map, and output a scalar value through the Sigmoid activation function to indicate the probability that the input image is a real image.
[0079] The loss function definition includes adversarial loss and content loss. The adversarial loss is to encourage the generator to generate images as close to the real image as possible. The formula is:
[0080] ζ GAN (G,D)=Ε x~Pdata [logD(x)]+Ε x~Pz [log(1-D(G(x)))]
[0081] Among them, G is the generator, D is the discriminator, x is the real image, and z is the input noise;
[0082] The content loss is to extract features based on the pre-trained VGG network, calculate the feature vector distance between the generated image and the real image, and retain the semantic structure of the image. The total loss function is:
[0083] ζ total =ζ GAN +λ·ζ content
[0084] λ is the balance coefficient, which adjusts the weight of adversarial loss and content loss.
[0085] The network training strategy includes weight initialization and alternating training. The weight initialization is that both the generator and the discriminator are initialized with normal distribution or Xavier initialization. The Adam optimizer is selected with the default parameters. The generator learning rate = 0.0002, the discriminator learning rate = 0.0002, β1 = 0.5, the initial decay rate of the first-order momentum is reduced, β2 = 0.999, and the second-order momentum convergence is accelerated. The alternating training is input data, the real high-quality image (x_real) → label y_real = 1, the enhanced image generated by the generator (x_fake = G(x_low)) → label y_fake = 0, forward propagation, calculate the output probabilities D(x_real) and D(x_fake) of the discriminator for x_real and x_fake, and calculate the loss:
[0086] L D =-[logD(x r eal)+log(1-D(G(x f ake)))]
[0087] Back propagation: Update the discriminator parameters to maximize L_D, that is, let D(x_real)→1, D(x_fake)→0;
[0088] Fixed the discriminator parameters, only updated the generator, input data, low-quality image x_low, the goal is to make the generated x_fake fool the discriminator, forward propagation, generate x_fake = G(x_low), calculate the discriminator's output probability D(x_fake) for x_fake, and calculate the loss:
[0089] L G =-log D(x f ake)(adversarial loss)+λ·L content (Content loss)
[0090] Back propagation: Update the generator parameters to minimize L_G, that is, let D(x_fake)→1;
[0091] Repeat the above steps until the loss converges to the preset number of iterations 50-100 epochs;
[0092] Learning rate decay strategy, reduce the learning rate in the later stage of training to avoid parameter oscillation, linear decay:
[0093]
[0094] When the number of iterations iter reaches the maximum number of iterations iter max , the learning rate drops to 0;
[0095] Cosine annealing:
[0096]
[0097] The learning rate decays in a cosine curve, with smaller fluctuations in the later stages. When the validation set loss stops decreasing and there is no improvement for five consecutive epochs, the decay strategy is initiated.
[0098] The conditional input and attention mechanism inputs noise type and light intensity labels into the generator to achieve directional enhancement. A self-attention module is introduced into the generator to make the model focus on buildings and roads in the image. It also receives images and conditional labels at the same time, and determines whether the image is a real sample under given conditions. The image features and conditional label features are spliced in the deep network to strengthen the conditional correlation judgment, adjust the loss function, and introduce conditional terms in the adversarial loss. The formula is:
[0099]
[0100] Among them, c is the conditional label.
[0101] Model verification and evaluation include subjective evaluation, objective indicator evaluation, and ablation experiments. The subjective evaluation is to randomly select 20-50 low-quality images and their corresponding real high-quality images from the validation set / test set, generate enhanced images, evaluate noise suppression to see whether there is residual noise in the smooth area of the image, edge clarity to check whether the edge of the object is sharp and whether there is blur or over-sharpening artifacts, and detail retention to evaluate whether small targets are recognizable and whether the texture is natural. The objective indicator evaluation is to generate an image (I gen ) and the real image (I gt ) is converted to an 8-bit image with a pixel value range of [0,255] and the mean square error (MSE) is calculated:
[0102]
[0103] H represents the height of the image, W represents the width of the image, H×W represents the total number of pixels in the image, (i, j) is the coordinate of the pixel, I gen (i, j) represents the pixel value of the pixel located in the i-th row and j-th column in the generated image;
[0104] The ablation experiment uses the same dataset and training parameters to train the baseline model and the comparison model respectively. The PSNR / SSIM / LPIPS indicators of the two groups of models are calculated on the test set, the differences are compared, and the generated images are visualized to observe the impact of the module on the details.
[0105] Inference and image enhancement involve inputting low-quality drone images into a trained generator and outputting enhanced images. Scripts or tools are developed to batch enhance large-scale drone images and deployed to the drone end, achieving real-time processing through model compression or lightweight network design.
[0106] The post-processing and application of the results are to perform deblocking filtering and sharpening operations on the generated images to further improve the visual effect. The enhanced images will be used for drone inspection, remote sensing image analysis, and disaster monitoring.
[0107] In this invention, by collecting data on different drone models, weather conditions, and flight altitudes, covering multiple scenarios such as cities, farmlands, and power facilities, the model's adaptability to real complex environments is improved. The data enhancement strategy artificially expands the data distribution to avoid overfitting, so that the model can still be stably enhanced under drone posture changes or noise interference;
[0108] The adversarial loss drives the generator to approximate the real image distribution, solving the over-enhancement and color shift issues that are common in traditional algorithms. The content loss, based on the pre-trained VGG network, preserves semantic structure, avoiding the common "blurry but realistic" pitfall of GAN generation and ensuring that the enhanced images are suitable for downstream tasks. cGAN's targeted enhancement: By using labels such as noise type and light intensity, the model can perform customized enhancements for specific problems, eliminating the need to train separate models for different scenarios.
[0109] To address common inspection issues such as low light, haze, and motion blur, we provide an end-to-end enhancement solution that directly improves the accuracy of defect detection algorithms and supports real-time processing, enabling drones to generate clear images during flight and reducing the cost of repeated shooting. This is especially suitable for time-sensitive scenarios such as emergency rescue.
[0110] The foregoing is merely a preferred embodiment of the present invention. It should be noted that those skilled in the art may make various improvements and modifications without departing from the principles of the present invention, and such improvements and modifications are also within the scope of protection of the present invention. Structures, devices, and operating methods not specifically described or explained herein shall, unless otherwise specified or limited, be implemented in accordance with conventional means in the art.
Claims
1. A UAV image enhancement method based on generative adversarial networks, characterized by: The UAV image enhancement method comprises the following steps: Step 1. Dataset preparation and preprocessing; Step 2. Generator network design; Step 3. Discriminator network design; Step 4. Loss function definition; Step 5. Network training strategy; Step 6. Conditional input and attention mechanism; Step 7. Model validation and evaluation; Step 8. Reasoning and image enhancement; Step 9. Post-processing and application of results.
2. The UAV image enhancement method based on generative adversarial network according to claim 1, characterized in that: The dataset preparation and preprocessing includes data collection, data cleaning and annotation, data preprocessing, data partitioning and storage, obtaining low-quality drone images and their corresponding high-quality reference images, using different models of drones to shoot in various weather conditions and flight altitudes, recording shooting parameters, searching for public datasets related to drone images, and screening images that meet low-quality standards; Delete images with excessive blur, severe occlusion, or incomplete content. Check the scene consistency between high-quality reference images and low-quality images. Remove duplicate images by comparing hash values to avoid training data redundancy. Annotate each image with a quality label and record image resolution, capture time, and sensor model metadata. The original image is scaled to a fixed size, and the center is cropped to avoid edge information loss. The image is randomly rotated by ±15° and ±30° to simulate the posture changes of the drone during flight. The local area is randomly cropped and resized to 256×256. The pixel value is linearly scaled from [0,255] to [-1,1] or [0,1]. The formula is as follows: (scaled to [0,1]) Accelerate gradient updates during neural network training; The dataset is divided into training set, validation set, and test set in an 8:1:1 ratio. The validation set and test set contain original low-quality images without data augmentation. The data pipeline is constructed using PyTorch's Dataset and DataLoader or TensorFlow's tf.data.Dataset.
3. The UAV image enhancement method based on generative adversarial network according to claim 1, characterized in that: The generator network design adopts convolutional neural network as the backbone, extracts deep features of the image through convolution and pooling, restores the image resolution through deconvolution or interpolation, combines jump connection to fuse shallow details, uses Tanh or Sigmoid activation function, generates an enhanced image with the same size as the input, and uses convolution + pooling to extract deep features: 3×3 convolution increases the number of channels layer by layer, 64→128→256, step size = 2 downsampling, keeps the number of channels at 512, uses 1×1 convolution to compress the computational complexity, uses deconvolution or interpolation + convolution upsampling, splices the corresponding layer features of the encoder through jump connection, retains shallow details, generates an image of the same size as the input, 1×1 convolution maps to 3 channels, uses Tanh / Sigmoid activation function to normalize pixel values, and uses depthwise separable convolution to replace standard convolution.
4. The UAV image enhancement method based on generative adversarial network according to claim 1, characterized in that: The discriminator network is designed to adopt the PatchGAN structure to discriminate the local area of the image, superimpose multiple convolution layers, gradually narrow the receptive field, focus on the local texture and color authenticity of the image, output a single scalar value, indicating the probability that the input image is a real image, do not discriminate the global image, divide the image into multiple local patches, output the average of the patch-level discrimination results, design the convolution layer structure, receive the image, start downsampling with 4×4 convolution + LeakyReLU, step size = 2, number of channels 64, increase the number of channels layer by layer, 64→128→256→512, activate with LeakyReLU after each convolution, add InstanceNormalization to some layers, replace the pooling layer with convolution with step size = 2, design the output layer, compress the number of channels to 1 with 1×1 convolution, output a single-channel feature map, take the average of the feature map, and output a scalar value through the Sigmoid activation function, indicating the probability that the input image is a real image.
5. The UAV image enhancement method based on generative adversarial network according to claim 1, characterized in that: The loss function definition includes adversarial loss and content loss. The adversarial loss is to encourage the generator to generate images as close to the real image as possible. The formula is: g GAN (G,D)=E x~Pdata [logD(x)]+E x~Pz [log(1-D(G(x)))] Among them, G is the generator, D is the discriminator, x is the real image, and z is the input noise; The content loss is to extract features based on the pre-trained VGG network, calculate the feature vector distance between the generated image and the real image, and retain the semantic structure of the image. The total loss function is: g total =ζ GAN +l·z content λ is the balance coefficient, which adjusts the weight of adversarial loss and content loss.
6. The UAV image enhancement method based on generative adversarial network according to claim 1, characterized in that: The network training strategy includes weight initialization and alternating training. The weight initialization is that both the generator and the discriminator are initialized with normal distribution or Xavier initialization, and the Adam optimizer is selected with the default parameters, the generator learning rate = 0.0002, the discriminator learning rate = 0.0002, β1 = 0.5, the initial decay rate of the first-order momentum is reduced, β2 = 0.999, and the second-order momentum convergence is accelerated. The alternating training is input data, real high-quality image (x_real) → label y_real = 1, the enhanced image generated by the generator (x_fake = G(x_low)) → label y_fake = 0, forward propagation, calculating the output probabilities D(x_real) and D(x_fake) of the discriminator for x_real and x_fake, and calculating the loss: L D =-[logD(x r eal)+log(1-D(G(x f ake)))] Back propagation: Update the discriminator parameters to maximize L_D, that is, let D(x_real)→1, D(x_fake)→0; Fixed the discriminator parameters, only updated the generator, input data, low-quality image x_low, the goal is to make the generated x_fake fool the discriminator, forward propagation, generate x_fake = G(x_low), calculate the discriminator's output probability D(x_fake) for x_fake, and calculate the loss: L G = -logD(x f ake)(adversarial loss)+λ·L content (Content loss) Back propagation: Update the generator parameters to minimize L_G, that is, let D(x_fake)→1; Repeat the above steps until the loss converges to the preset number of iterations 50-100 epochs; Learning rate decay strategy, reduce the learning rate in the later stage of training to avoid parameter oscillation, linear decay: When the number of iterations iter reaches the maximum number of iterations iter max , the learning rate drops to 0; Cosine annealing: The learning rate decays in a cosine curve, with smaller fluctuations in the later stages. When the validation set loss stops decreasing and there is no improvement for five consecutive epochs, the decay strategy is initiated.
7. The UAV image enhancement method based on generative adversarial network according to claim 1, characterized in that: The conditional input and attention mechanism is to input noise type and light intensity labels into the generator to achieve directional enhancement. The self-attention module is introduced into the generator to make the model focus on buildings and roads in the image. At the same time, it receives images and conditional labels, and judges whether the image is a real sample under given conditions. The image features and conditional label features are spliced in the deep network to strengthen the conditional correlation judgment, adjust the loss function, and introduce conditional terms in the adversarial loss. The formula is: ζ cGAN (G,D)HΕ x~Pdata [log D(x,c)]+Ε x~Pz [log(1-D(G(z,c),c))] Among them, c is the conditional label.
8. The UAV image enhancement method based on generative adversarial network according to claim 1, characterized in that: The model verification and evaluation includes subjective evaluation, objective indicator evaluation, and ablation experiment. The subjective evaluation is to randomly select 20-50 low-quality images and their corresponding real high-quality images from the validation set / test set, generate enhanced images, evaluate noise suppression to observe whether there is residual noise in the smooth area of the image, edge clarity to check whether the edge of the object is sharp, whether there is blur or over-sharpening artifacts, detail retention to evaluate whether small targets are distinguishable and whether the texture is natural, and the objective indicator evaluation is to generate an image (I gen ) and the real image (I gt ) is converted to an 8-bit image with a pixel value range of [0,255] and the mean square error (MSE) is calculated: H represents the height of the image, W represents the width of the image, H×W represents the total number of pixels in the image, (i, j) is the coordinate of the pixel, I gen (i, j) represents the pixel value of the pixel located in the i-th row and j-th column in the generated image; The ablation experiment uses the same dataset and training parameters to train the baseline model and the comparison model respectively. The PSNR / SSIM / LPIPS indicators of the two groups of models are calculated on the test set, the differences are compared, and the generated images are visualized to observe the impact of the module on the details.
9. The UAV image enhancement method based on generative adversarial network according to claim 1, characterized in that: The reasoning and image enhancement described is to input low-quality drone images into a trained generator, output enhanced images, develop scripts or tools to batch enhance large-scale drone images, deploy them to the drone end, and achieve real-time processing through model compression or lightweight network design.
10. The UAV image enhancement method based on generative adversarial network according to claim 1, characterized in that: The post-processing and application of the results are to perform deblocking filtering and sharpening operations on the generated images to further improve the visual effect, and the enhanced images can be used for drone inspections, remote sensing image analysis, and disaster monitoring.
Citation Information
Cited By
Light-weight portrait wrinkle removal image enhancement method based on generative adversarial network
CN121660910A
Image enhancement joint optimization method and system based on downstream task performance
CN121707879A