Bayesian optimization-based adaptive image enhancement and detection integrated method and system for grape downy mildew

By combining Bayesian optimized adaptive image enhancement with a lightweight GDM-DETR detection model, the problems of adaptability and computational efficiency in UAV monitoring of grape downy mildew were solved, achieving high-precision and low-complexity detection of grape downy mildew.

CN122116139APending Publication Date: 2026-05-29NANJING FORESTRY UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANJING FORESTRY UNIV
Filing Date
2026-02-25
Publication Date
2026-05-29

Smart Images

  • Figure CN122116139A_ABST
    Figure CN122116139A_ABST
Patent Text Reader

Abstract

The application discloses a grape downy mildew adaptive image enhancement and detection integrated method based on Bayesian optimization, and comprises the following steps: acquiring a grape canopy visible light image collected by a UAV; and performing adaptive image enhancement processing on the grape canopy visible light image to obtain an enhanced image; wherein the adaptive image enhancement processing adopts a combination mode of power intensity mapping and an unsharp mask, and the execution sequence of the two enhancement modes and the hyperparameters thereof are adaptively determined in a two-stage process through Bayesian optimization; and the enhanced image is input into a trained GDM-DETR detection model to obtain grape downy mildew detection results, wherein the results comprise the category and the bounding box position of a disease target; the application not only improves the accuracy and real-time performance of the model in detecting grape downy mildew, but also reduces the number of model parameters and the calculation complexity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision technology, specifically to a method and system for adaptive image enhancement and detection of grape downy mildew based on Bayesian optimization. Background Technology

[0002] Downy mildew is a devastating disease that severely threatens grape yield and quality. In its early stages, the lesions appear as irregular, pale yellow, oily stains with extremely low contrast and blurred texture, easily obscured by soil, wire mesh, or shadows in complex field backgrounds captured by drones. Traditional manual field inspections are inefficient and highly subjective, failing to meet the needs of large-scale cultivation. Although using drones combined with deep learning for monitoring has become a trend, existing image processing techniques still have significant shortcomings: most image enhancement methods (such as traditional histogram equalization or the Retinex algorithm) rely on fixed empirical parameters and cannot adapt to the constantly changing natural lighting conditions in the field. This static enhancement process, lacking adaptability, often leads to the loss of lesion features under excessively strong light or over-amplifies noise and artifacts in complex backgrounds, thus interfering with the identification of early, subtle lesions. At the target detection algorithm level, existing solutions struggle to balance detection accuracy and computational efficiency, limiting their practical deployment at the edge of drone operations. While Transformer-type detection models, such as DETR, possess a global receptive field, their massive parameter count and computational overhead (FLOPs) result in slow inference speeds, making it difficult to meet the real-time operational needs of UAVs. On the other hand, traditional lightweight convolutional neural networks (such as some YOLO series models), although having faster inference speeds, often suffer from missed or false detections when dealing with early lesions characterized by dense occlusion, large scale variations, and weak features due to insufficient feature extraction capabilities. Summary of the Invention

[0003] Purpose of the invention: This invention aims to provide an integrated adaptive image enhancement and detection method for grape downy mildew based on Bayesian optimization. By adaptively optimizing the image enhancement parameters through Bayesian optimization and collaborating with a lightweight detection model to complete the identification of grape downy mildew, this method not only improves the accuracy and real-time performance of the model in detecting grape downy mildew, but also reduces the number of model parameters and computational complexity.

[0004] Technical solution: The adaptive image enhancement and detection method for grape downy mildew based on Bayesian optimization described in this invention includes the following steps:

[0005] (1) Acquire visible light images of the grape canopy collected by a drone;

[0006] (2) Adaptive image enhancement processing is performed on the visible light image of the grape canopy to obtain an enhanced image; wherein, the adaptive image enhancement processing adopts a combination of power intensity mapping and anti-sharpening mask, and the execution order and hyperparameters of the two enhancement methods are adaptively determined in the two-stage process through Bayesian optimization;

[0007] (3) Input the enhanced image into the trained GDM-DETR detection model to obtain the detection results of grape downy mildew, which include at least the category and bounding box location of the disease target;

[0008] The GDM-DETR detection model is based on the Transformer architecture detection model, but the backbone network of the model is replaced with the ConvNeXtV2 network. In the cross-scale feature fusion module CCFM of the model, the original feature fusion unit is replaced with the C2f_Faster_Rep_ADFA module. The C2f_Faster_Rep_ADFA module integrates structural reparameterization design and adaptive dual-channel fusion attention mechanism.

[0009] Furthermore, in step (2), the two-stage Bayesian optimization is as follows: Stage 1: Fast search: Construct the search space for enhancement parameters and initialize the Bayesian optimizer; In each iteration, fit the surrogate model based on historical observation data and select candidate parameter groups, use these parameters to process training images and perform short-cycle training on the detection model, and update historical observation data based on the comprehensive performance score of the model; After a preset number of iterations, select multiple candidate parameter groups with the highest scores; Stage 2: Fine search: Use the selected multiple candidate parameter groups to perform long-cycle training on the detection model, and select the optimal group as the final adaptive enhancement parameters based on the final performance of the model on the validation set.

[0010] Furthermore, the C2f_Faster_Rep_ADFA module contains a bottleneck structure composed of stacked FasterBlock_Rep_ADFA submodules; the FasterBlock_Rep_ADFA submodule contains a Partial_Conv3_Rep structure and an ADFA attention structure.

[0011] Furthermore, the Partial_Conv3_Rep structure contains multiple parallel convolutional branches and identity mapping branches during the model training phase, which are then fused into a single convolutional path during the model inference phase through reparameterization techniques.

[0012] Furthermore, the ADFA attention structure performs multi-scale convolutional feature extraction, dual-path attention focusing, cross-attention interaction, and adaptive dynamic fusion between feature paths, thereby improving the ability to distinguish occluded and small targets.

[0013] Furthermore, the ConvNeXtV2 backbone network comprises multiple stages consisting of stacked ConvNeXtV2 Block units; each ConvNeXtV2 Block unit includes a deep convolutional layer with large kernels to expand the receptive field, and a global response normalization GRN layer to enhance competition between feature channels.

[0014] The present invention provides a Bayesian-optimized adaptive image enhancement and detection system for grape downy mildew, comprising:

[0015] Image acquisition unit: used to acquire aerial images of the grape canopy taken by drone;

[0016] Enhancement computing unit: Used to run adaptive image enhancement processing algorithms to enhance the input image;

[0017] Intelligent recognition unit: Loads the trained GDM-DETR detection model to identify disease targets in the enhanced image and outputs disease category and location information;

[0018] Results visualization unit: used to label the recognition results and generate reports.

[0019] An electronic device according to the present invention includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement any of the methods described herein.

[0020] The present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the methods described herein.

[0021] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: First, the present invention achieves dynamic optimization of enhancement parameters through an adaptive image enhancement module using a Bayesian optimization strategy, which significantly improves the salience of low-contrast lesions while suppressing artifacts; Second, by constructing a GDM-DETR detection model, and using the ConvNeXtV2 backbone and the C2f_Faster_Rep_ADFA feature fusion module that integrates reparameterization and attention mechanisms, the model's parameter count and computation are greatly reduced while ensuring that the model has a strong feature extraction capability, thus achieving the best balance between high-precision recognition and lightweight deployment. Attached Figure Description

[0022] Figure 1 This is a flowchart of the present invention;

[0023] Figure 2 This is an example diagram showing the experimental data acquisition area, the UAV operation scenario, and the acquired canopy images of the present invention;

[0024] Figure 3 The following are three typical symptoms of grape downy mildew and illustrated with annotations according to the present invention;

[0025] Figure 4 This is a schematic diagram of the two-stage Bayesian parameter optimization process of the adaptive image enhancement module of the present invention;

[0026] Figure 5 This is a schematic diagram of the overall network architecture and core component structure of the GDM-DETR detection model of the present invention;

[0027] Figure 6 This is a schematic diagram of the ADFA module of the present invention;

[0028] Figure 7 This is a visual diagram illustrating the results of the present invention. Detailed Implementation

[0029] The technical solution of the present invention will be further described below with reference to the accompanying drawings.

[0030] like Figure 1 As shown, this embodiment of the invention provides an integrated adaptive image enhancement and detection method for grape downy mildew based on Bayesian optimization, comprising the following steps:

[0031] Acquire RGB images of the grape canopy layer from the drone to be inspected;

[0032] The RGB image of the grape canopy is input into the adaptive image information enhancement module, and image feature enhancement is performed based on a preset parameter search strategy to obtain the enhanced disease image;

[0033] The enhanced disease image is input into the trained GDM-DETR detection model to obtain the corresponding grape downy mildew detection results;

[0034] The adaptive image enhancement includes: power intensity mapping enhancement and anti-sharpening mask enhancement, and the order and hyperparameters are adaptively determined in the two-stage process through Bayesian optimization.

[0035] The GDM-DETR detection model includes:

[0036] The input module is used to input the enhanced disease image;

[0037] The ConvNeXtV2 backbone network module is used to extract features based on the enhanced disease image to obtain image extraction features at different scales, including a first extraction feature, a second extraction feature, and a third extraction feature.

[0038] In CCFM, multi-scale feature fusion is performed based on the first extracted feature, the second extracted feature, and the third extracted feature to obtain image prediction features;

[0039] The Transformer decoder module is used to decode and predict the target query vector based on the image prediction features.

[0040] The output module is used to output the type and bounding box location of grape downy mildew based on the decoding results.

[0041] The specific processing flow and formulas of the adaptive image information enhancement module are as follows:

[0042] Step S1: Construct a comprehensive scoring function To quantitatively evaluate the impact of different enhancement parameters on the performance of the detection model, a weighted comprehensive scoring function is constructed as the objective function for parameter optimization, and its expression is as follows:

[0043]

[0044] In the formula, This represents the average precision of the IoU threshold from 0.5 to 0.95. This represents the average accuracy when the IoU threshold is 0.5; Recall rate; It represents precision.

[0045] Step S2: Perform two-stage Bayesian parameter optimization: Stage 1: Fast search: Constructing the parameter search space Initialize the Bayesian optimizer; in the first... In the next iteration, based on the historical observation set Fit the surrogate model and maximize the acquisition function. Select the next set of candidate parameters :

[0046]

[0047]

[0048] Using parameters Process the training set and perform short-cycle training on the detection model, wherein the number of rounds of short-cycle training is... Calculate the overall score And update the historical observation set. After 100 iterations, based on the score... Sort and filter before Optimal parameter combinations Power-law strength mapping enhancement via formula Performing a nonlinear transformation can amplify this difference exponentially. We introduce parameters... To control the degree of stretching, The larger the size, the more prominent the highlight areas become, but it may also result in a loss of detail in the shadows. Therefore, it is necessary to automatically find the optimal balance point. Desharpening mask enhancement, based on power-law intensity mapping enhancement, extracts high-frequency components through Gaussian filtering and superimposes them back onto the original image to sharpen edges.

[0049]

[0050]

[0051] In the formula, To ultimately enhance the output image, The image after stretching. This indicates a Gaussian blur operation. For the size of a Gaussian kernel, ; Standard deviation, ; To sharpen the weighting coefficients, .

[0052] Step S3, Phase Two: Fine-grained Search Each set of parameters in the model is used to train the detection model over a long period of time, wherein the number of rounds of long-term training is... Compare the performance of the final validation set and select the set with the best performance as the final enhancement parameters.

[0053] The GDM-DETR detection model is structurally reconstructed based on the RT-DETR architecture, specifically including:

[0054] The ConvNeXtV2 backbone network module is used to replace the original ResNet backbone. This module is composed of multiple stacked ConvNeXtV2 Blocks, each containing deep convolutional layers. To expand the receptive field, a Global Response Normalization (GRN) layer is introduced. The GRN layer calibrates the channel response by calculating the L2 norm of the feature channels in the spatial dimension, enhancing feature competition and thus improving the ability to extract the global morphology of lesions while reducing the number of parameters.

[0055] CCFM: Used for multi-scale feature fusion, responsible for aggregating three feature layers of different scales output from the ConvNeXtV2 backbone network. This invention replaces the RepC3 module in CCFM with the C2f_Faster_Rep_ADFA module.

[0056] First, let the module input characteristics be... The input first passes through a 1×1 convolutional layer for channel adjustment, and is then segmented along the channel dimension. and Two parts. Among them, Directly using skip connections as part of the output features, while Then, it enters the bottleneck layer sequence consisting of N cascaded FasterBlock_Rep_ADFA units for deep processing. Finally, The outputs of all bottleneck units are concatenated along the channel dimension and then fused through a 1×1 convolutional layer at the end to obtain the final output. .

[0057] In the aforementioned bottleneck unit, the core convolution extraction employs a Partial_Conv3_Rep structure, which achieves a balance between performance and speed through differentiated computation strategies during the training and inference phases. During model training, this structure utilizes a multi-branch topology to obtain rich gradient information. The input feature F only contains the first... Each channel participates in the convolution operation, constructing three parallel computation branches: a 3×3 convolution branch, a 1×1 convolution branch, and an identity mapping branch. These branches are then combined with the remaining channel features that did not participate in the computation. The model is then reassembled. During the model inference phase, based on the principle of linear additivity of convolution operators, the parameters of the three branches mentioned above are reparameterized and merged into the weights and biases of a single-path 3×3 convolution.

[0058] Following the convolution operation, the feature map enters the ADFA structure. The input features are first processed by a multi-scale convolutional integrator, which uses three parallel depthwise convolutional branches with kernel sizes {3, 5, 7} to capture different features. We introduce learnable adaptive weights to balance the multiple scales:

[0059]

[0060] in, Indicates the input feature map, Indicates having a kernel size Convolution operation, These are trainable weights normalized using the Softmax function. Integrate information from different convolutions.

[0061] Following multi-scale feature extraction, the features are processed through two complementary attention paths: the upper path uses a CA attention module for each attention channel, while the lower path uses a CBAM attention module. To achieve effective information exchange between these paths, we introduce a cross-attention mechanism that promotes bidirectional feature refinement. The most crucial mechanism after cross-attention interaction is the dynamic fusion mechanism, which adaptively combines content-aware analysis. This dynamic weighting enables the network to automatically balance the contributions from different attention paths based on specific features of the input features.

[0062]

[0063]

[0064]

[0065] in, This represents the cross-attention operation, which enables the network to adaptively fuse complementary information from two feature sources; Indicates adaptive fusion weights; This is the final fused output feature map.

[0066] Example 1:

[0067] This embodiment provides a UAV-based method for detecting grape downy mildew based on adaptive image enhancement and a lightweight detection network. This method achieves accurate disease identification in complex field environments through the collaborative work of a data-driven adaptive enhancement front-end and a lightweight detection back-end. The specific implementation steps are as follows:

[0068] Step 1: Data Acquisition and Scenario Definition

[0069] like Figure 2 As shown, the experimental data in this embodiment were collected from a grape-growing demonstration area.

[0070] Data acquisition equipment: DJI Air 3 drone, equipped with a 48-megapixel visible light camera (1 / 1.3-inch CMOS, f / 1.7 aperture).

[0071] Data collection parameters: The drone flight altitude was set to 2-3 meters above the top of the canopy, the shooting resolution was 2160×2160 pixels, and the data collection time covered 14:00-17:00 to include various lighting conditions such as strong light, side light and shadow.

[0072] Scene characteristics: The collected images cover complex field backgrounds, including real scenes such as exposed soil, weed interference, wire mesh obstruction, and densely overlapping leaves, providing basic data for verifying the robustness of the algorithm.

[0073] Step 2: Definition and labeling of disease characteristics

[0074] like Figure 3 As shown, to achieve refined monitoring, this invention subdivides grape downy mildew into three categories based on the disease development stage, and uses a labeling tool to mark them with rectangular boxes:

[0075] Early symptoms (ES): such as Figure 3 (a) As shown in the first row, the characteristic is that irregular pale yellow to light green "oil stain" patches appear on the front of the leaf, with blurred edges and extremely low contrast with healthy leaves, which is a difficult point to detect.

[0076] Late-stage symptoms (LS): such as Figure 3 (a) As shown in the second row, the characteristic features are necrosis in the center of the lesion, which is brown and often accompanied by a yellowish-brown halo, and the tissue is dry.

[0077] Mold symptoms (DM): such as Figure 3 (a) As shown in the third row, the characteristic is a white or grayish-white mold layer that forms on the underside of the leaves, which usually appears in humid environments.

[0078] Step 3: Adaptive Image Enhancement

[0079] like Figure 4 As shown, to overcome the weak features of early lesions and the interference of lighting changes, this embodiment constructs an adaptive image enhancement module. This module abandons the traditional fixed-parameter enhancement method and employs a two-stage Bayesian optimization strategy to dynamically find the optimal enhancement parameters for the current dataset. The specific process is as follows:

[0080] 3.1 Parameter Space Construction:

[0081] Setting the exponential parameter for power-law strength mapping enhancement Set the Gaussian kernel size for unsharpening mask enhancement. Standard deviation Sharpening weights .

[0082] 3.2 Rapid Search Phase

[0083] like Figure 4 As shown on the left, the Bayesian optimizer is initialized. (1) The optimizer samples a set of candidate parameters based on historical observations. ;(2)Use (3) Process the training set to generate enhanced images; (4) Input the enhanced images into the RT-DETR-r18 model for short-cycle training (20 epochs); (5) Calculate the comprehensive score. (5) Iterate 100 times and select the Top-10 potential parameters based on the score ranking.

[0084] 3.3 Fine-grained search phase

[0085] like Figure 4As shown on the right, the model is trained for a long period (300 epochs) for each set of parameters in the Top-10. The globally optimal parameter combination is determined by comparing the final performance on the validation set.

[0086] Step 4: GDM-DETR model detection

[0087] The enhanced image is then input into the GDM-DETR model. For example... Figure 5 As shown, the model is based on the RT-DETR architecture and has been specifically improved. It mainly consists of three parts: the backbone network, the feature fusion network, and the decoder.

[0088] 4.1 Backbone Feature Extraction (ConvNeXtV2 Backbone)

[0089] like Figure 5 As shown in (a) and (b), the image undergoes feature extraction through four stages of ConvNeXtV2. Within each ConvNeXtV2 block: the input features first pass through a deep convolutional layer. To expand the receptive field, a Global Response Normalization (GRN) layer is introduced. The GRN layer calibrates the channel response by calculating the L2 norm of the feature channels in the spatial dimension, enhancing feature competition so that channels containing lesion features are activated while background channels are suppressed.

[0090] 4.2 Feature Fusion Network (CCFM)

[0091] The three scale features (80×80, 40×40, 20×20) output by the backbone network are fed into the CCFM module. For example... Figure 5 As shown in (a), this embodiment completely replaces the original RepC3 module with the C2f_Faster_Rep_ADFA module. The internal structure of the C2f_Faster_Rep_ADFA module is as follows: Figure 5 (c) shows: (1) Split: The input features are split into two paths, one through a shortcut and the other into a stacked bottleneck layer. (2) Bottleneck layer processing: Each layer consists of FasterBlock_Rep_ADFA units. Figure 5 (d)). Reparameterized convolution (Partial_Conv3_Rep): such as Figure 5 As shown in (e), during the training phase, the structure includes three branches: a 3×3 convolution, a 1×1 convolution, and an identity mapping, to obtain a rich gradient flow. During the inference phase, leveraging the additivity principle of convolution, the weights and biases of the three branches are merged into a single 3×3 convolution, thereby improving performance without increasing inference time. The processed features are concatenated with the split features and then fused through a 1×1 convolution for output. Figure 6 As shown, embedding the ADFA module in the FasterBlock_Rep_ADFA unit effectively suppresses... Figure 2 The noise from the soil, weeds, and barbed wire in the scene shown.

[0092] Step 5: Decoding and Output

[0093] The fused multi-scale feature maps are input to the Transformer decoder. The decoder interacts with the feature maps using learnable query vectors to predict the object's class and bounding box. Figure 7 As shown, this was effectively demonstrated on complex field test sets.

[0094] Step 6: Model Training

[0095] The training environment was configured as follows: Operating System: Windows 11 Professional 64-bit, CPU: Intel Core i9-14900K, GPU: NVIDIA GeForce RTX 4090, CUDA 12.6, PyTorch 2.5.0, Python 3.10.

[0096] The model hyperparameters were adjusted as follows: input image size 640×640, number of iterations 300, batch size 8, number of object categories 3, optimizer AdamW, learning rate 0.0001, momentum term 0.9, and weight decay 0.0001.

[0097] Step 7, Experimental Results and Analysis

[0098] This study improves the feature attention mechanism and network structure strategy based on the RT-DETR-r18 framework, and evaluates the independent contribution of each module to detection accuracy and efficiency, as well as their combined gain, through ablation experiments. Specifically, (A) an adaptive image enhancement technique is introduced in the data preprocessing stage; (B) at the backbone network level, ConvNeXtV2 is used to replace the traditional ResNet; (C) in the feature fusion structure design, the C2f module of YOLOv8 is used to replace the original RepC3 module; (D) the bottleneck unit in C2f is further upgraded to FasterBlock_Rep through reparameterization; and (E) based on this, the ADFA attention mechanism is introduced.

[0099]

[0100] In summary, compared with the baseline model, the method proposed in this invention improves mAP@0.5 by 6.3 percentage points and Recall by 4.2 percentage points, while reducing the number of parameters by 32.3% and the computational load by 42.7%. It achieves the best balance between detection accuracy and operational efficiency, making it very suitable for real-time deployment on UAV platforms.

[0101] Example 2

[0102] This embodiment provides a Bayesian-optimized adaptive image enhancement and detection integrated method system for grape downy mildew, which includes:

[0103] Image acquisition module: Used to receive high-resolution image streams transmitted by the drone;

[0104] Enhanced computing module: Built-in optimized adaptive image enhancement algorithm for real-time brightness stretching and desharpening mask processing of images;

[0105] Intelligent detection module: Equipped with a reparameterized GDM-DETR model for inference operations on enhanced images;

[0106] Results output module: Used to mark the location and type of diseases in real time on the display terminal, and generate a heat map of disease distribution.

[0107] Those skilled in the art will understand that the embodiments of the present invention can be implemented as a method, a system, or a computer program product. Therefore, the present invention can be specifically embodied in a fully hardware implementation, a fully software implementation, or a combination of hardware and software implementation. Furthermore, the present invention can also be specifically embodied as a computer program product containing computer-usable program code, stored in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.).

[0108] This document describes in detail the methods, apparatus (systems), and computer program products according to embodiments of the present invention, with reference to flowchart illustrations and / or block diagrams. It should be understood that each flowchart and / or block, and combinations thereof, in the flowchart illustrations and / or block diagrams can be implemented by computer program instructions. These program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device for execution, thereby generating a machine, which, through the instructions executed by the processor of the computer or other programmable data processing device, produces means for implementing the functions specified in the flowchart illustrations or block diagrams.

[0109] The aforementioned computer program instructions may also be stored in a computer-readable storage medium capable of directing a computer or other programmable data processing device to operate in a specific mode, thereby causing the instructions in the storage medium to form an article of manufacture containing instruction means, which is used to implement the process. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0110] In addition, these computer program instructions can be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on such equipment, thereby producing a computer-implemented processing procedure, and the instructions executed on the computer or other programmable equipment provide steps for implementing the functions specified in the flowchart or block diagram.

[0111] In summary, the above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. It should be emphasized that those skilled in the art can make several improvements and modifications without departing from the core principles of the present invention, and these improvements and modifications should also be covered within the patent protection scope of the present invention.

Claims

1. A Bayesian-optimized adaptive image enhancement and detection method for grape downy mildew, characterized in that, Includes the following steps: (1) Acquire visible light images of the grape canopy collected by a drone; (2) Adaptive image enhancement processing is performed on the visible light image of the grape canopy to obtain an enhanced image; wherein, the adaptive image enhancement processing adopts a combination of power intensity mapping and anti-sharpening mask, and the execution order and hyperparameters of the two enhancement methods are adaptively determined in the two-stage process through Bayesian optimization; (3) Input the enhanced image into the trained GDM-DETR detection model to obtain the detection results of grape downy mildew, which include the category and bounding box location of the disease target; The GDM-DETR detection model is based on the Transformer architecture detection model, with the backbone network replaced by the ConvNeXtV2 network. In the cross-scale feature fusion module CCFM, the original RepC3 module is replaced by the C2f_Faster_Rep_ADFA module. The C2f_Faster_Rep_ADFA module integrates structural reparameterization design and adaptive dual-channel fusion attention mechanism ADFA.

2. The method for adaptive image enhancement and detection of grape downy mildew based on Bayesian optimization according to claim 1, characterized in that, In step (2), the two-stage Bayesian optimization is as follows: Stage 1: Fast search: Construct the search space of the enhancement parameters and initialize the Bayesian optimizer; In each iteration, fit the surrogate model according to the historical observation data and select the candidate parameter group, use the group of parameters to process the training image and perform short-cycle training on the detection model, and update the historical observation data according to the comprehensive performance score of the model; After a preset number of iterations, select the top-scoring candidate parameter groups; Stage 2: Fine search: Use the selected candidate parameters to perform long-cycle training on the detection model, and select the best group as the final adaptive enhancement parameters based on the final performance of the model on the validation set.

3. The method for adaptive image enhancement and detection of grape downy mildew based on Bayesian optimization according to claim 1, characterized in that, The C2f_Faster_Rep_ADFA module contains a bottleneck structure composed of stacked FasterBlock_Rep_ADFA submodules; the FasterBlock_Rep_ADFA submodule contains a Partial_Conv3_Rep structure and an ADFA attention structure.

4. The integrated method for adaptive image enhancement and detection of grape downy mildew based on Bayesian optimization according to claim 3, characterized in that, The Partial_Conv3_Rep structure contains multiple parallel convolutional branches and identity mapping branches during the model training phase, and is fused into a single convolution during the model inference phase through reparameterization techniques.

5. The method for adaptive image enhancement and detection of grape downy mildew based on Bayesian optimization according to claim 3, characterized in that, The ADFA attention structure performs multi-scale convolutional feature extraction, dual-path attention focusing, cross-attention interaction, and adaptive dynamic fusion between feature paths, thereby improving the ability to distinguish occluded and small targets.

6. The method for adaptive image enhancement and detection of grape downy mildew based on Bayesian optimization according to claim 1, characterized in that, The ConvNeXtV2 backbone network consists of multiple stages composed of stacked ConvNeXtV2 Block units; each ConvNeXtV2 Block unit contains deep convolutional layers with large kernels to expand the receptive field, and global response normalization GRN layers to enhance competition between feature channels.

7. A system for an integrated adaptive image enhancement and detection method for grape downy mildew based on Bayesian optimization, characterized in that... include: Image acquisition unit: used to acquire aerial images of the grape canopy taken by drone; Enhancement computing unit: Used to run adaptive image enhancement processing algorithms to enhance the input image; Intelligent recognition unit: Loads the trained GDM-DETR detection model to identify disease targets in the enhanced image and outputs disease category and location information; Results visualization unit: used to label the recognition results and generate reports.

8. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method of any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The device contains a computer program that, when executed by a processor, implements the method of any one of claims 1-6.