An unmanned aerial vehicle image recognition method suitable for harsh environments

CN122551209APending Publication Date: 2026-08-11CHINA RESOURCES POWER WIND ENERGY (JIANPING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-14
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0004]然而,户外工程的恶劣环境会导致无人机拍摄的原始图像出现雾霭遮挡、对比度低的问题,影响图像识别的准确性

Benefits of technology

[0007]综上所述,本申请实施例,通过上述技术方案,解决了恶劣环境下无人机图像雾霭遮挡、对比度低的问题,使无人机在恶劣环境下的巡检可靠性得到提升。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122551209A_ABST
    Figure CN122551209A_ABST
Patent Text Reader

Abstract

The application relates to the field of unmanned aerial vehicles and discloses an unmanned aerial vehicle image recognition method suitable for severe environments, which comprises the following steps: an unmanned aerial vehicle inspection system acquires meteorological data; when the meteorological data shows that the current inspection area of the unmanned aerial vehicle is in a severe weather environment, an original image photographed by the unmanned aerial vehicle is acquired; an improved generative adversarial network is used to carry out defogging processing on the original image; the improved generative adversarial network comprises a generator and a discriminator; the original image is input into the generator, the generator outputs a defogged image based on a learned clear image feature distribution to obtain a defogged image; the defogged image is subjected to enhancement processing to enhance the contrast and detail information of the image to obtain an enhanced image; and the enhanced image is used for image recognition to complete a recognition task. Through the technical scheme, the problem of image fog shielding and low contrast of an unmanned aerial vehicle in a severe environment is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of unmanned aerial vehicles (UAVs), and more particularly to an image recognition method for UAVs suitable for harsh environments. Background Technology

[0002] In outdoor engineering fields such as wind power and large-scale building construction, safety monitoring is a crucial link in ensuring the smooth progress of projects. Taking wind power projects as an example, their operating environments are mostly located in remote areas, often facing severe weather conditions such as dense fog and low sunlight. Traditional manual inspection methods are limited by harsh environments, wide operating areas, and high risks of working at heights, resulting in problems such as low efficiency, incomplete coverage, and a high rate of missed hazard detection.

[0003] With the development of drone technology and image recognition technology, drone inspection has become a means of safety monitoring in outdoor engineering projects. By taking on-site images with cameras that come with or are mounted on the drone, and then using image recognition technology to identify potential hazards in the images, early warning and identification of safety risks can be achieved.

[0004] However, the harsh environment of outdoor engineering projects can cause problems such as fog and low contrast in the raw images captured by drones, affecting the accuracy of image recognition. Therefore, how to effectively process drone images in harsh environments is a technical challenge that needs to be overcome by those skilled in the art. Summary of the Invention

[0005] This application provides an image recognition method for unmanned aerial vehicles (UAVs) suitable for harsh environments, in order to at least partially solve the above-mentioned technical problems.

[0006] To achieve the above objectives, according to a first aspect of this application, a method for image recognition of unmanned aerial vehicles (UAVs) suitable for harsh environments is provided, comprising: The drone inspection system acquires meteorological data; when the meteorological data shows that the drone is currently inspecting an area in severe weather conditions, it acquires the original images captured by the drone. An improved generative adversarial network is used to dehaze the original image; the improved generative adversarial network includes a generator and a discriminator; the original image is input into the generator, and the generator outputs a dehazed image based on the learned distribution of sharp image features to obtain the dehazed image; The dehazed image is enhanced to improve its contrast and detail, resulting in an enhanced image. The enhanced image is used for image recognition to complete the recognition task; The generator and discriminator both incorporate attention mechanisms and employ multi-scale network structures. The training process of the improved generative adversarial network includes optimizing network parameters through adversarial training of the generator and discriminator.

[0007] In summary, the embodiments of this application, through the above technical solutions, solve the problems of fog obstruction and low contrast in UAV images under harsh environments, thereby improving the reliability of UAV inspection in harsh environments.

[0008] Other features and advantages of this application will be described in detail in the following detailed description section. Attached Figure Description

[0009] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0010] Figure 1 This is a flowchart illustrating the steps of an image recognition method for unmanned aerial vehicles (UAVs) suitable for harsh environments, provided in an exemplary embodiment of this application. Detailed Implementation

[0011] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the protection scope of this application.

[0012] This application provides an image recognition method for unmanned aerial vehicles (UAVs) suitable for harsh environments. Please refer to [link / reference]. Figure 1 The image recognition method for unmanned aerial vehicles (UAVs) suitable for harsh environments provided in this application includes the following steps: Step 101: The drone inspection system acquires meteorological data; when the meteorological data shows that the drone's current inspection area is in severe weather conditions, the system acquires the original images captured by the drone.

[0013] Specifically, the meteorological sensors on the drone inspection system collect real-time meteorological data of the inspection area. This data includes, but is not limited to, temperature, humidity, wind speed, light intensity, and fog concentration level. The fog concentration level is an indicator used to quantify visibility in foggy weather, typically categorized into light fog, moderate fog, and heavy fog based on visibility distance. Light fog has a visibility distance of 500-1000 meters, moderate fog 200-500 meters, and heavy fog less than 200 meters. When any one or more of the meteorological data meet a preset threshold, it is determined to be a severe weather environment, such as fog concentration level ≥ moderate fog, wind speed ≥ level 6, and light intensity < 50 lux. When the current area is determined to be a severe weather environment, the system acquires the original image of the inspection target. The original image format includes, but is not limited to, JPG and PNG, with resolution set to 1920×1080 to 4K according to inspection requirements. If the meteorological data shows no severe weather environment, the drone can take images using the conventional inspection mode without performing subsequent defogging and enhancement processing, thus saving computing resources.

[0014] Step 102: The original image is dehazed using an improved generative adversarial network; the improved generative adversarial network includes a generator and a discriminator; the original image is input into the generator, and the generator outputs a dehazed image based on the learned distribution of clear image features to obtain the dehazed image.

[0015] Specifically, the improved Generative Adversarial Network (GAN) is an upgrade of the traditional GAN. A GAN is a deep learning model composed of two sub-networks: a generator and a discriminator. Model optimization is achieved through adversarial training between the two. The generator learns the feature distribution of a real, clear image and generates a dehazed image. The discriminator distinguishes between the input image and the dehazed image output by the generator. In this embodiment, to improve dehazing performance in harsh environments, both the generator and discriminator of the improved GAN incorporate attention mechanisms and employ multi-scale network structures. The attention mechanism assigns differentiated weights to different features, strengthening the responses of key features useful for the dehazing task and suppressing interference from irrelevant noise. The multi-scale network structure means that the network contains multiple feature extraction branches at different scales. Different sized convolutional kernels extract features at different levels, such as fine-grained details, mid-scale structures, and global contours. Feature fusion is then used to achieve a more comprehensive feature representation, avoiding the loss of details or insufficient global information caused by single-scale feature extraction.

[0016] Step 103: Enhance the dehazed image to improve its contrast and detail, resulting in an enhanced image.

[0017] In practice, the dehazed image may still have insufficient contrast and blurred details, such as minor defects of the inspection target and details of the connectors. Therefore, further enhancement processing is required to obtain the enhanced image.

[0018] Step 104: Use the enhanced image for image recognition to complete the recognition task.

[0019] The generator and discriminator both incorporate attention mechanisms and employ multi-scale network structures. The training process of the improved generative adversarial network includes optimizing network parameters through adversarial training of the generator and discriminator.

[0020] This solution triggers the process of identifying images under severe weather conditions using meteorological data. It employs an improved generative adversarial network for image dehazing and optimizes image contrast and details through an enhancement strategy based on local texture complexity. This enables UAV image recognition under severe weather conditions, at least partially solving the problems of fog occlusion and low contrast in UAV images under severe conditions, thereby improving the reliability of UAV inspections in harsh environments.

[0021] In some embodiments, both the generator and the discriminator incorporate an attention mechanism, including: Integrating the SE attention module into the generator; this includes: connecting the SE attention module in series after the feature extraction stage of each convolutional branch of the generator, and processing the feature maps output by the convolutional branches by the SE attention module; Integrating the SE attention module into the discriminator includes: integrating the SE attention module into the front end of each discrimination branch of the discriminator; after each branch of the discriminator receives the generated image or a real clear image, it first preprocesses the features through the SE attention module. The SE attention module receives the initial feature map output from the generator's convolutional branch. It first performs a compression operation on the initial feature map: global average pooling is used to compress the initial feature map of each channel into a single-valued feature vector; the single-valued feature vector represents the global information of the corresponding channel. Then, an activation operation is performed: the importance weights of each channel are learned through a fully connected layer and a sigmoid activation function. The learned importance weights of each channel are then multiplied channel-by-channel with the corresponding channels of the original initial feature map to enhance the response strength of the channels corresponding to the key dehazing features. The SE attention module first performs a compression operation on the input image of the discriminator: compressing the feature maps of each channel into single-value feature vectors through global average pooling; then it performs an activation operation: learning the importance weights of each channel through a fully connected layer and a sigmoid activation function; learning and strengthening the response intensity of key feature channels that distinguish between generated images and real clear images to improve the discriminator's ability to distinguish features between the two types of images.

[0022] Specifically, the SE attention module is connected in series after the feature extraction stage of each convolutional branch of the generator. The convolutional branches here include a first-size convolutional branch for extracting fine-grained detail features, a second-size convolutional branch for extracting mid-scale structural features, and a third-size convolutional branch for extracting global contour features. After the convolutional branches output feature maps, these feature maps are first input into the SE attention module for processing. By adjusting the importance of each channel feature, the network pays more attention to the feature channels that are key to the dehazing task.

[0023] The SE attention module is integrated into the front end of each discrimination branch of the discriminator. After receiving the generated image or the real clear image, each branch of the discriminator first performs feature preprocessing through the SE attention module. The discrimination branches include discrimination branches corresponding to the first size, the second size, and the third size, which process image features at different scales respectively. The SE attention module weights the input image features and strengthens the response intensity of the key feature channels that distinguish between the generated image and the real clear image, thereby improving the discriminator's feature discrimination ability between the two types of images.

[0024] The SE attention module receives the initial feature map output from the generator's convolutional branch, i.e., the multi-channel feature map output from the convolutional layer. It first performs a compression operation on the initial feature map: global average pooling compresses each channel's initial feature map into a single-valued feature vector. This single-valued feature vector represents the global information of the corresponding channel, i.e., the average response intensity of that channel across the entire image region. Then, it performs an activation operation: learning the importance weights of each channel through a fully connected layer and a sigmoid activation function. The learned channel importance weights are then multiplied channel-by-channel by the corresponding channel of the original initial feature map, i.e., each channel's feature map is multiplied by its corresponding weight to enhance the response intensity of the channel corresponding to the key dehazing features.

[0025] The SE attention module used in the discriminator follows the same workflow: it first performs a squeezing operation on the input image and then an activation operation; it learns and strengthens the response intensity of key feature channels that distinguish between the generated image and the real clear image, so as to improve the discriminator's ability to distinguish features between the two types of images.

[0026] This scheme integrates SE attention modules into the generator and discriminator. The SE attention mechanism acquires global information for each channel through global average pooling, and then learns channel importance weights through fully connected layers and a sigmoid activation function. This allows the network to focus on feature channels crucial to the dehazing task and suppress irrelevant noise interference. On the generator side, it improves the retention rate of key details in the dehazed image; on the discriminator side, it enhances the network's ability to distinguish between the generated image and the real clear image, avoiding a decline in dehazing performance due to feature confusion.

[0027] In some embodiments, both the generator and the discriminator employ a multi-scale network structure, including: A multi-scale network structure for the generator is constructed. The generator contains multiple convolutional branches of different scales, each using a convolutional kernel of a different size to extract features from the input original image. The kernel sizes of each branch are, in order, a first size, a second size, and a third size; the first size is smaller than the second size, and the second size is smaller than the third size. The first-size kernel branch is used to extract fine-grained detail features; the second-size kernel branch is used to extract mid-scale structural features; and the third-size kernel branch is used to extract global contour features. After each convolutional branch completes feature extraction at its corresponding scale, it outputs a feature map corresponding one-to-one with its extracted scale. The number of channels in the feature maps output by each convolutional branch is unified using a 1×1 convolutional kernel. Feature fusion is performed on the multi-scale feature maps with unified channel numbers using feature concatenation to obtain a comprehensive feature map. The generator outputs a dehazed image based on the comprehensive feature map. Construct a multi-scale network structure for the discriminator; the discriminator contains multiple discriminative branches of different scales, each branch being adapted to image inputs of different scales. Each discrimination branch processes the generated image and the real clear image at the appropriate scale: first, it extracts the discrimination features of the generated image and the real clear image at that scale, then compares the discrimination features of the two types of images at the same scale to complete the authenticity judgment and output the discrimination result at the corresponding scale; the discrimination results at each scale are fused based on a weighted fusion strategy to obtain the final discrimination result; the weighted fusion strategy adjusts the weights of each branch according to the discrimination results at different scales to improve the discrimination accuracy of the discriminator in distinguishing between the generated image and the real clear image.

[0028] Specifically, the generator contains multiple convolutional branches at different scales, each using a convolutional kernel of a different size to extract features from the input original image. The kernel sizes of each branch are, in order, a first size, a second size, and a third size. The first-size kernel branch extracts fine-grained detail features; the second-size kernel branch extracts mid-scale structural features; and the third-size kernel branch extracts global contour features. After each branch completes feature extraction at its corresponding scale, it outputs a feature map corresponding one-to-one with its extracted scale. The number of channels in the feature maps output by each convolutional branch is unified using a 1×1 kernel. Feature fusion is then performed on the multi-scale feature maps after channel unification using a feature concatenation method to obtain a comprehensive feature map. The generator outputs a dehazed image based on this comprehensive feature map.

[0029] The discriminator comprises multiple discriminative branches at different scales, each adapted to image input at a different scale. Each branch processes the generated image and the real clear image at the adapted scale: extracting the discriminative features of the generated image and the real clear image at that scale, comparing the discriminative features of the two types of images at the same scale, completing the real / false discrimination, and outputting the discrimination result at the corresponding scale. The discrimination results at each scale are fused based on a weighted fusion strategy to obtain the final discrimination result. The weighted fusion strategy adjusts the weights of each branch according to the discrimination results at different scales to improve the discriminator's accuracy in distinguishing between the generated image and the real clear image.

[0030] On the generator side, three convolutional branches of different scales are used to extract features at different levels of the image, avoiding the loss of details or insufficient global information caused by single-scale feature extraction. Multi-scale feature fusion is achieved by unifying the number of channels and concatenating features through 1×1 convolutional kernels, enabling the network to pay attention to both the microscopic details and macroscopic structure of the image at the same time, thus solving the technical problems of loss of key image features and insufficient global information in harsh environments.

[0031] In some embodiments, the training process of the improved generative adversarial network includes: Define a composite loss function; the composite loss function consists of perceptual loss and mean squared error loss. The perceptual loss is obtained by extracting high-level features from the generated image and the real clear image through a pre-trained deep convolutional neural network and calculating the mean square error of the two sets of high-level features. The mean squared error loss is obtained by calculating the pixel-level grayscale difference between the generated image and the real clear image. A composite loss function is used to iteratively update the generator parameters to improve the semantic consistency and detail realism of the generated images; The discriminator parameters are updated iteratively using the cross-entropy loss function to enhance the discriminator's ability to distinguish features between generated images and real, clear images. The network parameters are optimized by iteratively alternating between the generator and the discriminator until the semantic features of the generated image are consistent with those of the real, clear image.

[0032] Specifically, this scheme addresses the technical problems of semantic inconsistency and blurred details in generated images during traditional GAN ​​training by using a composite loss function and a cross-entropy loss function. The perceptual loss extracts high-level features through pre-trained VGG19, ensuring that the generated images are semantically consistent with real images, avoiding the problem of visually realistic but semantically incorrect images generated by traditional GANs. The mean squared error loss ensures that the generated images are highly consistent with real images in terms of detail, solving the problem of detail loss in fog. The cross-entropy loss function enables the discriminator to more accurately distinguish between generated and real images, avoiding training imbalance caused by an overly strong or weak discriminator. Through alternating iterative optimization of the generator and discriminator, the semantic features of the generated images are consistent with those of the real, clear images, improving the dehazing effect.

[0033] In some embodiments, enhancing the dehazed image to improve its contrast and detail information results in an enhanced image, including: The dehazed image is traversed using a sliding window; Calculate the grayscale histogram for the local area covered by each window and calculate the local texture complexity index based on the histogram distribution; The equalized grayscale mapping relationship is determined based on the local texture complexity index: when the local texture complexity index is higher than a preset threshold, a first window size is used to generate the grayscale mapping relationship; when the local texture complexity index is lower than the preset threshold, a second window size is used to generate the grayscale mapping relationship; the first window size is smaller than the second window size. The grayscale of a local region is adjusted based on the grayscale mapping relationship to enhance image contrast and detail information. The local texture complexity index is determined by calculating the grayscale variance of the local region.

[0034] Specifically, a sliding window refers to a rectangular area on an image that moves with a fixed size and step size, used for local image processing; the sliding window traverses the dehazed image with a preset window size, covering the entire image area; the window movement step size is set to 1 / 2 of the window size to ensure that adjacent window areas overlap and avoid image processing gaps; a grayscale histogram is a statistical chart representing the frequency of each grayscale level in the image, used to describe the grayscale distribution characteristics of a local area; the local texture complexity index is an indicator that measures the richness of texture in a local area, determined by calculating the grayscale variance of the local area. The larger the grayscale variance, the more complex the local texture and the richer the details.

[0035] The grayscale mapping relationship is determined as follows: when the local texture complexity index is higher than the preset threshold, the grayscale mapping relationship is generated using the first window size; when the local texture complexity index is lower than the preset threshold, the grayscale mapping relationship is generated using the second window size; the first window size is used for high texture complexity areas to retain more details; the second window size is used for low texture complexity areas to avoid noise amplification.

[0036] Gray-level adjustment refers to the redistribution of gray-level values ​​of pixels in a local area according to the gray-level mapping relationship, so as to enhance the contrast of the image and highlight the details. Specifically, it is achieved by mapping the gray-level values ​​of the local area to a new gray-level range, making the histogram distribution more uniform, thereby improving the contrast and detail information of the image and obtaining an enhanced image.

[0037] In some embodiments, the activation operation of the SE attention module further includes: Fog concentration levels are obtained from raw images based on meteorological data; Set the compression coefficient r according to the fog concentration level; The single-valued feature vector is compressed to 1 / r of its original dimension through the first fully connected layer; The feature dimension is restored to the original number of channels through a second fully connected layer; A batch normalization layer is added after the second fully connected layer; this batch normalization layer normalizes the features during the training phase to avoid the gradient vanishing problem during training.

[0038] Specifically, this solution addresses the feature imbalance problem in fog caused by the use of a fixed r value in traditional SE modules by associating fog concentration levels with the compression coefficient r of the SE attention module. In dense fog scenarios, setting r=32 allows the network to focus on global contour features, avoiding misjudgments of fine-grained features due to noise interference in fog. In light fog scenarios, setting r=8 preserves more detailed features. Batch normalization layers ensure the stability of the training process, avoiding the gradient vanishing problem caused by changes in fog concentration. This enables the network to maintain stable feature extraction capabilities under different fog concentration environments, effectively solving the technical problem of low recognition accuracy caused by feature distribution imbalance in image recognition under harsh conditions, and improving the reliability of UAV inspections under adverse weather conditions.

[0039] In some embodiments, when the 1×1 convolutional kernel unifies the number of channels for multi-scale feature maps, the method further includes: determining the unified number of channels based on the fog concentration level. The composite loss function introduces a fog concentration weighting coefficient, which includes: calculating the weighting coefficient ω based on the fog concentration level of the original image; multiplying the weighting coefficient ω by the perceptual loss to obtain the weighted perceptual loss; and updating the composite loss function to the weighted perceptual loss + mean squared error loss, so that the training process can adapt to the defogging requirements of images with different fog concentrations.

[0040] Specifically, by dynamically determining the uniform number of channels for the 1×1 convolutional kernel based on the fog concentration level and introducing a fog concentration weighting coefficient into the composite loss function, the technical problem of fixed parameters in traditional dehazing methods being unable to adapt to different fog concentration environments is solved. In dense fog scenarios, increasing the uniform number of channels and improving the perceptual loss weight makes the network focus more on global contour features, avoiding misjudgments of fine-grained features due to noise interference in the fog; in light fog scenarios, reducing the uniform number of channels and lowering the perceptual loss weight makes the network focus more on detailed features, avoiding the loss of details caused by excessive smoothing, and improving the quality of dehazed images.

[0041] In some embodiments, the improved generative adversarial network further includes a weather condition adjustment module; the weather condition adjustment module can adjust the operating parameters of the generator and discriminator according to real-time acquired weather data to adapt to different severe weather environments; The meteorological condition adjustment module first analyzes the input meteorological data to determine the climate parameters under the current meteorological conditions; the climate parameters include temperature, humidity, wind speed, and fog concentration level. Based on the climate parameters, the meteorological condition adjustment module calculates the optimal set of operating parameters for the generator and discriminator through a preset mapping relationship; On the generator side, the optimal set of operating parameters includes the learning rate, kernel size adjustment factor, and activation function selection to optimize the quality of the dehazed image; On the discriminator side, the optimal set of operating parameters includes decision threshold adjustment and branch weight allocation strategies to improve the ability to distinguish between real clear images and generated images under different meteorological conditions.

[0042] In some embodiments, the method further includes: the meteorological condition adjustment module further integrates a complexity adaptive submodule, which is used to implement pruning of the generator network structure, specifically including the following steps: The complexity adaptive submodule obtains the current climate parameters from the meteorological conditions adjustment module in real time; the current climate parameters include fog concentration level and real-time light intensity. Environmental assessment is conducted based on a preset threshold for judging the quality of the environment; the assessment results include whether the current environment is a relatively good environment or a bad environment. If the current environment is relatively favorable, trigger the generator pruning strategy: disable the fine-grained convolution branch corresponding to the first-size convolution kernel in the generator; retain the medium-scale convolution branch corresponding to the second-size convolution kernel and the global-scale convolution branch corresponding to the third-size convolution kernel; update the channel number unification strategy of the 1×1 convolution kernel: calculate the unified channel number based on the output channel number of the two currently active convolution branches; unify the channel number of the feature map through the 1×1 convolution kernel; If the current environment is harsh, trigger the generator full structure activation strategy: activate all three convolutional branches.

[0043] Specifically, the complexity adaptive submodule evaluates the environmental quality in real time based on fog concentration level and real-time light intensity: when the environment is relatively good, the fine-grained convolutional branch of the first size is disabled, while the medium-scale convolutional branch of the second size and the global contour convolutional branch of the third size are retained. The channel number of the 1×1 convolutional kernel is dynamically adjusted according to the number of output channels of the activated branches, thereby reducing the computational load of the network and effectively reducing the problem of excessive consumption of computing resources in good weather. When the environment is bad, all three convolutional branches are activated to ensure the complete extraction of key features such as building contours in dense fog scenes, avoiding the resource waste and performance deficiencies caused by the fixed network structure of traditional methods.

[0044] It should be noted that the UAV image recognition enhancement system for harsh environments provided in this embodiment of the invention is used to execute all the process steps of the UAV image recognition method for harsh environments described in the above embodiment. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.

[0045] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more features. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0046] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0047] The embodiments, implementation methods, and related technical features of this application can be combined and substituted for each other without conflict.

[0048] The above are merely preferred embodiments of this application and are not intended to limit this application in any way. Any simple modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of this application without departing from the scope of the technical solution of this application shall still fall within the scope of the technical solution of this application.

Claims

1. A method for unmanned aerial vehicle image recognition suitable for harsh environments, characterized in that, include: The drone inspection system acquires meteorological data; When the meteorological data shows that the area currently being inspected by the drone is in severe weather conditions, the drone acquires the original images it takes. An improved generative adversarial network is used to dehaze the original image; the improved generative adversarial network includes a generator and a discriminator; the original image is input into the generator, and the generator outputs a dehazed image based on the learned distribution of sharp image features to obtain the dehazed image; The dehazed image is enhanced to improve its contrast and detail, resulting in an enhanced image. The enhanced image is used for image recognition to complete the recognition task; The generator and discriminator both incorporate attention mechanisms and employ multi-scale network structures. The training process of the improved generative adversarial network includes optimizing network parameters through adversarial training of the generator and discriminator.

2. The method of claim 1, wherein, Both the generator and the discriminator incorporate attention mechanisms, including: Integrating the SE attention module into the generator; this includes: connecting the SE attention module in series after the feature extraction stage of each convolutional branch of the generator, and processing the feature maps output by the convolutional branches by the SE attention module; Integrating the SE attention module into the discriminator includes: integrating the SE attention module into the front end of each discrimination branch of the discriminator; after each branch of the discriminator receives the generated image or a real clear image, it first preprocesses the features through the SE attention module. The SE attention module receives the initial feature map output from the generator's convolutional branch. It first performs a compression operation on the initial feature map: global average pooling is used to compress the initial feature map of each channel into a single-valued feature vector; the single-valued feature vector represents the global information of the corresponding channel. Then, an activation operation is performed: the importance weights of each channel are learned through a fully connected layer and a sigmoid activation function. The learned importance weights of each channel are then multiplied channel-by-channel with the corresponding channels of the original initial feature map to enhance the response strength of the channels corresponding to the key dehazing features. The SE attention module first performs a compression operation on the input image of the discriminator: compressing the feature maps of each channel into single-value feature vectors through global average pooling; then it performs an activation operation: learning the importance weights of each channel through a fully connected layer and a sigmoid activation function; learning and strengthening the response intensity of key feature channels that distinguish between generated images and real clear images to improve the discriminator's ability to distinguish features between the two types of images.

3. The method of claim 2, wherein, Both the generator and discriminator employ a multi-scale network structure, including: A multi-scale network structure for the generator is constructed. The generator contains multiple convolutional branches of different scales, each using a convolutional kernel of a different size to extract features from the input original image. The kernel sizes of each branch are, in order, a first size, a second size, and a third size; the first size is smaller than the second size, and the second size is smaller than the third size. The first-size kernel branch is used to extract fine-grained detail features; the second-size kernel branch is used to extract mid-scale structural features; and the third-size kernel branch is used to extract global contour features. After each convolutional branch completes feature extraction at its corresponding scale, it outputs a feature map corresponding one-to-one with its extracted scale. The number of channels in the feature maps output by each convolutional branch is unified using a 1×1 convolutional kernel. Feature fusion is performed on the multi-scale feature maps with unified channel numbers using feature concatenation to obtain a comprehensive feature map. The generator outputs a dehazed image based on the comprehensive feature map. Construct a multi-scale network structure for the discriminator; the discriminator contains multiple discriminative branches of different scales, each branch being adapted to image inputs of different scales. Each discrimination branch processes the generated image and the real clear image at the appropriate scale: first, it extracts the discrimination features of the generated image and the real clear image at that scale, then compares the discrimination features of the two types of images at the same scale to complete the authenticity judgment and output the discrimination result at the corresponding scale; the discrimination results at each scale are fused based on a weighted fusion strategy to obtain the final discrimination result; the weighted fusion strategy adjusts the weights of each branch according to the discrimination results at different scales to improve the discrimination accuracy of the discriminator in distinguishing between the generated image and the real clear image.

4. The method of claim 3, wherein, The training process of the improved generative adversarial network includes: Define a composite loss function; the composite loss function consists of perceptual loss and mean squared error loss. The perceptual loss is obtained by extracting high-level features from the generated image and the real clear image through a pre-trained deep convolutional neural network and calculating the mean square error of the two sets of high-level features. The mean squared error loss is obtained by calculating the pixel-level grayscale difference between the generated image and the real clear image. A composite loss function is used to iteratively update the generator parameters to improve the semantic consistency and detail realism of the generated images; The discriminator parameters are updated iteratively using the cross-entropy loss function to enhance the discriminator's ability to distinguish features between generated images and real, clear images. The network parameters are optimized by iteratively alternating between the generator and the discriminator until the semantic features of the generated image are consistent with those of the real, clear image.

5. The method of claim 4, wherein, The dehazed image is enhanced to improve its contrast and detail, resulting in an enhanced image, including: The dehazed image is traversed using a sliding window; Calculate the grayscale histogram for the local area covered by each window and calculate the local texture complexity index based on the histogram distribution; The equalized grayscale mapping relationship is determined based on the local texture complexity index: when the local texture complexity index is higher than a preset threshold, a first window size is used to generate the grayscale mapping relationship; when the local texture complexity index is lower than the preset threshold, a second window size is used to generate the grayscale mapping relationship; the first window size is smaller than the second window size. The grayscale of a local region is adjusted based on the grayscale mapping relationship to enhance image contrast and detail information. The local texture complexity index is determined by calculating the grayscale variance of the local region.

6. The method of claim 5, wherein, The activation operations of the SE attention module also include: Fog concentration levels are obtained from raw images based on meteorological data; Set the compression coefficient r according to the fog concentration level; The single-valued feature vector is compressed to 1 / r of its original dimension through the first fully connected layer; The feature dimension is restored to the original number of channels through a second fully connected layer; A batch normalization layer is added after the second fully connected layer; this batch normalization layer normalizes the features during the training phase to avoid the gradient vanishing problem during training.

7. The method of claim 6, wherein, When unifying the number of channels for multi-scale feature maps using the 1×1 convolutional kernel, the method also includes: determining the unified number of channels based on the fog concentration level. The composite loss function introduces a fog concentration weighting coefficient, which includes: calculating the weighting coefficient ω based on the fog concentration level of the original image; multiplying the weighting coefficient ω by the perceptual loss to obtain the weighted perceptual loss; and updating the composite loss function to the weighted perceptual loss + mean squared error loss, so that the training process can adapt to the defogging requirements of images with different fog concentrations.

8. The method of claim 7, wherein, The improved generative adversarial network also includes a weather condition adjustment module; the weather condition adjustment module can adjust the operating parameters of the generator and discriminator according to the real-time acquired weather data to adapt to different severe weather environments; The meteorological condition adjustment module first analyzes the input meteorological data to determine the climate parameters under the current meteorological conditions; the climate parameters include temperature, humidity, wind speed, and fog concentration level. Based on the climate parameters, the meteorological condition adjustment module calculates the optimal set of operating parameters for the generator and discriminator through a preset mapping relationship; On the generator side, the optimal set of operating parameters includes the learning rate, kernel size adjustment factor, and activation function selection to optimize the quality of the dehazed image; On the discriminator side, the optimal set of operating parameters includes decision threshold adjustment and branch weight allocation strategies to improve the ability to distinguish between real clear images and generated images under different meteorological conditions.

9. The method of claim 8, wherein, The method further includes: the meteorological condition adjustment module also integrates a complexity adaptive submodule, which is used to prune the generator network structure, specifically including the following steps: The complexity adaptive submodule obtains the current climate parameters from the meteorological conditions adjustment module in real time; the current climate parameters include fog concentration level and real-time light intensity. Environmental assessment is conducted based on a preset threshold for judging the quality of the environment; the assessment results include whether the current environment is a relatively good environment or a bad environment. If the current environment is relatively favorable, trigger the generator pruning strategy: disable the fine-grained convolutional branch corresponding to the first-size convolutional kernel in the generator; retain the medium-scale convolutional branch corresponding to the second-size convolutional kernel and the global-scale convolutional branch corresponding to the third-size convolutional kernel; update the channel number unification strategy of the 1×1 convolutional kernel: calculate the unified channel number based on the output channel number of the two currently active convolutional branches; unify the channel number of the feature map through the 1×1 convolutional kernel; If the current environment is harsh, trigger the generator full structure activation strategy: activate all three convolutional branches.