Lightweight detection method for wheat diseases and insect pests in northwest weather based on YOLOv8 improvement

By improving the YOLOv8 model, combining super-resolution reconstruction and multimodal data enhancement technology, the network structure is optimized, and the problems of large calculation load and low recognition accuracy in wheat pest monitoring in the northwest region are solved, efficient and accurate disease detection and real-time feedback are achieved, and the accuracy and efficiency of agricultural production are improved.

CN120510394APending Publication Date: 2025-08-19LANZHOU JIAOTONG UNIV
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510648627.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-20
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

In the monitoring of wheat pests and diseases in the northwest region, the existing technology has problems such as large calculation load, high response delay and limited recognition accuracy, especially in complex farmland scenarios, which are difficult to achieve efficient and accurate multi-objective detection.

Method used

The lightweight detection method based on YOLOv8 is adopted, combined with SRResNet super-resolution reconstruction, Mosaic-8 data enhancement, Scale-based Dynamic Loss and ARConv adaptive rotary convolution modules, optimize the network structure, build a mobile terminal pest recognition model suitable for hardware resource constrained, and real-time feedback and dynamic updates are achieved through Adaptive Head detection head.

Benefits of technology

It significantly improves the real-time processing capability and recognition accuracy of wheat pest detection, achieves disease identification accuracy of more than 95% and 0.3-second etiology matching timeliness, reduces pesticide abuse by more than 30%, and improves the sustainability of agricultural production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120510394A_ABST
    Figure CN120510394A_ABST
Patent Text Reader

Abstract

The invention discloses a YOLOv8 improvement-based lightweight detection method for wheat diseases and insect pests in northwest weather, and relates to the technical field of artificial intelligence and machine vision monitoring. The method comprises the following steps: acquiring an original RGB image in a wheat filling period in a northwest dry land area environment; performing screening and Mosaic-8 data enhancement on the collected original image data set, and establishing a wheat disease and insect pest image data set; constructing an improved wheat lesion detection lightweight model based on YOLOv8, and optimizing a network structure; inputting the established wheat disease and insect pest image data set into the improved network model for training; testing the application of the improved network model in a wheat disease and insect pest image test data set, and continuously updating learning parameters of the improved YOLOv8 network model; the updated and trained YOLOv8 network model is used for monitoring a dry land area where wheat is planted in the Gansu province in real time, and the complexity and accuracy of the model are evaluated; and finally, real-time feedback of a model detection result is realized, and wheat plant diseases are dynamically updated to improve model precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of artificial intelligence and machine vision monitoring technology, and specifically relates to a lightweight detection method for wheat diseases and insect pests in northwest weather based on an improvement of YOLOv8. Background Art

[0002] Currently, wheat pest and disease diagnosis technology is at a critical stage of transitioning from traditional empirical judgment to intelligent, precise methods. With the rapid development of technologies such as the Internet of Things, artificial intelligence, and remote sensing, a pest and disease diagnosis system based on diversified monitoring methods such as sensor networks, drone aerial photography, and hyperspectral imaging has been initially established, significantly improving the timeliness and accuracy of pest and disease identification. For example, deep learning algorithms analyze visual features such as leaf lesions and pest morphology to automatically identify common diseases such as fusarium head blight and stripe rust. Multispectral and hyperspectral sensors can capture subtle changes in crop physiological state and, combined with meteorological data, build predictive models to provide a basis for early warning.

[0003] However, in Northwest China, a major wheat-producing region in my country, the unique natural conditions and growing environment present more complex challenges for technology application. Northwest China's climate is arid, with little rainfall, large temperature swings between day and night, and predominantly sandy and saline-alkali soils. The types of pests and diseases in the region differ significantly from those in the eastern plains (e.g., high incidence of stripe rust and powdery mildew). Furthermore, the scattered distribution of farmland and weak infrastructure further complicate monitoring. Although IoT technology can now collect field environmental parameters (such as temperature and humidity, soil moisture, and light radiation) in real time and achieve high-speed data transmission via 5G networks, frequent sandstorms in Northwest China can easily lead to sensor blockage or data drift. High-definition cameras can also produce blurred images in strong winds and sandstorms, hindering the accurate extraction of pest and disease characteristics. Furthermore, network coverage in the region is uneven, with some remote farmlands still relying on low-bandwidth wireless communications, resulting in delayed image data transmission. Edge computing nodes struggle to support real-time analysis due to unstable power supply. At the data level, wheat varieties in the northwest are highly drought-resistant and have a short growing season. The manifestations of pests and diseases (such as the sparse distribution of stripe rust spore piles under drought stress) are quite different from those in the eastern datasets. Existing AI models are mostly trained based on data from the main producing areas in the east, and the misjudgment rate increases significantly when migrating across regions. For example, due to limited irrigation conditions, the wheat density in the wheat-growing areas of the Hexi Corridor is low, and the background noise (exposed sand) in drone aerial images accounts for a high proportion, making it difficult for traditional image segmentation algorithms to accurately distinguish between lesions and soil texture. At the same time, the bottleneck of multi-source data fusion is particularly prominent in the northwest: the difference in conductivity of salinized soil may interfere with the readings of soil moisture sensors, and the physiological response mechanism of crops in drought environments is complex. The correlation model between environmental factors and pest and disease outbreaks has not yet been adapted to regional characteristics, resulting in deviations in the setting of warning thresholds. For example, the occurrence of wheat scab in the Yellow River Irrigation Area in Ningxia is not only related to humidity, but also to changes in microbial communities caused by irrigation with Yellow River water. However, the existing system lacks the ability to integrate such microecological data.

[0004] Cost and promotion issues are equally serious. The economy in the Northwest region is relatively backward, and the deployment cost of high-end equipment (such as hyperspectral sensors and intelligent spore capture devices) is beyond the affordability of farmers. In addition, the operation and maintenance of the equipment relies on professional technicians, and the grassroots agricultural technical team is weak, which further restricts the implementation of the technology. Although some demonstration areas (such as the Guanzhong Plain in Shaanxi) have achieved early detection of pests and diseases through a composite monitoring model of "satellite remote sensing + ground stations", large-scale promotion is still limited by the lack of data sharing mechanisms and insufficient policy support. In the future, it is necessary to develop adaptive technologies based on the characteristics of the Northwest region: develop wind and sand-proof, low-power embedded sensors, optimize lightweight edge computing models to reduce dependence on the network and electricity; use transfer learning and small sample training to improve the robustness of the algorithm in sparse farmland scenarios; and build a dynamic early warning model that integrates regional meteorological, soil improvement data, and microbial ecological information.

[0005] For the above-mentioned Northwest region, especially Gansu, an intelligent monitoring technology for wheat diseases and insect pests based on improved YOLOv8 is proposed. Summary of the Invention

[0006] This paper aims to develop a lightweight wheat pest and disease detection method based on an improved YOLOv8 algorithm for Northwest China weather conditions. This method addresses the pain points of existing detection technologies, such as high computational load, high response latency, and limited recognition accuracy, in complex Northwest farmland scenarios and multi-target detection requirements. This solution is based on the current YOLOv8 framework, which features a more streamlined parameter count and higher recognition accuracy. Through model compression and algorithm improvements, this approach is dedicated to developing an efficient wheat pest and disease recognition model suitable for mobile devices with limited hardware resources. This approach significantly improves real-time processing capabilities while ensuring disease detection accuracy.

[0007] To achieve the above objectives, the present invention adopts the following technical solutions:

[0008] Step S1: Use terminal hardware devices to collect data images with wheat lesions, perform standardized preprocessing, and combine the SRResNet super-resolution reconstruction model to enhance the details.

[0009] Step S2: Adopt the Mosaic-8 data augmentation strategy and build an eight-image stitching mechanism based on the CutMix framework. Through the spatial topological reorganization of multi-source samples, the training sample size is significantly expanded and the feature representation capability of dense small objects is enhanced.

[0010] Step S3: Build a wheat lesion detection model based on YOLOv8, optimize the network structure, and integrate the scale-based dynamic loss function and the ARConv adaptive rotation convolution module to improve accuracy and robustness.

[0011] Step S4: Use the optimized YOLOv8 model to detect and classify wheat weed lesions, combined with the AdaptiveHead detection head to accurately identify the location and type of wheat lesions.

[0012] Step S5: Real-time feedback is provided based on the model detection results. If the recognition results show that the wheat plants have lesions, timely feedback is provided and the cause of the disease is matched. If the cause of the disease is not matched, manual intervention is performed, and the wheat plant symptoms are dynamically updated to improve accuracy.

[0013] The step S1 further comprises:

[0014] (1) First, the quality of wheat worm disease images collected in real time by the IoT terminal needs to be screened. The screened images are required to include the presentation of wheat diseases and pests under the influence of extreme weather. Secondly, they are enhanced and the brightness analysis algorithm is used to screen out images with moderate exposure to avoid being too dark or too bright due to extreme weather interference. Secondly, the clarity is evaluated based on the gradient energy function to eliminate blurred samples. After the qualified images are subjected to median filtering to remove noise, the small disease spots are enhanced by high-hat transformation and the edges are sharpened by low-hat transformation. The pixel normalization is combined to unify the feature scale. The image screening stage uses quantitative evaluation indicators to exclude low-quality data. The brightness screening adopts the Gaussian weighted average model:

[0015]

[0016] Among them, I avg Represents the quantitative index of image quality after weighted averaging; W, H represent the width (Width) and height (Height) of the image, in pixels; x, y represent the coordinate position of the pixel in the image; ω represents the weight function, which indicates the weight given to the importance of the pixel.

[0017] (2) To enhance data diversity and improve the generalization ability of the model, traditional data enhancement methods such as rotation, flipping, and cropping are combined. In order to improve the generalization performance of the model, a multimodal data enhancement strategy is adopted to achieve image space transformation through rotation transformation (angle range [-30°, 30°]), mirror flipping and random cropping. The rotation transformation is formally described as:

[0018]

[0019] Here, θ is the rotation angle. The enhancement process simulates real-world differences such as illumination tilt and device viewing angle offset, which improves the model's robustness to changes in lesion morphology and effectively reduces the risk of overfitting.

[0020] (3) Combined with the super-resolution reconstruction technology SRResNet, it is possible to efficiently extract features from images and generate high-resolution images. This technology adds a residual learning module to the convolutional neural network, effectively solving the problems of accuracy degradation and gradient dispersion in deep networks and deepening the number of network layers. Therefore, it effectively improves the depth and accuracy of training, facilitates efficient feature extraction and reduces image noise. Its specific operation formula is as follows:

[0021] H=α(W out *(α(W in *X+b in ))+b out )+X

[0022] Among them, * represents the convolution operation, W out 、W inRepresented as the weight of the convolution kernel; b in 、b out It is represented as the bias term; α represents the activation function; H represents the feature map obtained by the convolution operation of the input image X.

[0023] The step S2 further comprises:

[0024] Mosaic-8 data augmentation is a data augmentation technique based on image stitching, widely used in computer vision tasks, particularly in object detection, image classification, and semantic segmentation. Its core idea is to combine multiple images to generate new training samples, thereby enriching the diversity of the dataset and improving the generalization and robustness of the model.

[0025] Its specific implementation process typically includes the following steps: first, randomly select several images (for example, 4 or more) from the original dataset and scale them to a uniform size; second, stitch these images together in a specific manner to form a composite image. In traditional Mosaic technology, 4 images are usually stitched together into a 2x2 grid structure, while Mosaic-8 may further expand this concept, for example, through more complex stitching methods or the introduction of more image blocks (such as 8 sub-regions), to generate more diverse and complex composite images. In addition, during the stitching process, the original images may be randomly cropped, scaled, rotated, and other operations to further increase the diversity of the data.

[0026] During the stitching process, in order to ensure a smooth transition between different sub-regions from different images, an affine transformation is usually performed on the source image. Affine transformation includes operations such as scaling, rotation, and translation, which can be expressed by the following formula:

[0027] x′=s x ·x·cos(θ)-s y ·y·sin(θ)+t x

[0028] y′=s x ·x·sin(θ)+s y ·y·cos(θ)+t y

[0029] Where x, y represent the coordinates of a pixel in the original image; x′, y′ represent the new coordinates of the pixel after affine transformation; s x , s y represents the scaling factor along the x-axis and y-axis, which is used to scale randomly selected images to a uniform size before stitching; θ represents the rotation angle, usually in radians; t x , ty Represents the translation along the x-axis and y-axis, which can move the sub-image to the specified position in the composite image.

[0030] We also need to calculate the weight of each sub-region. The weight coefficient is usually based on the location information, for example, the weight of the area near the center is higher, while the weight of the edge area is lower. The weight calculation can be expressed as follows:

[0031]

[0032] Here, x and y represent the coordinates of the location for which the weight is to be calculated, typically the coordinates of a pixel within the subregion; x0 and y0 represent the coordinates of the center point, typically the center of the subregion or the global image; w(x,y) represents the weight coefficient at coordinates (x,y), representing the importance of that location in image stitching or subregion fusion; and d(x,x0,y0) represents the geometric distance from point x,y to the center point x0,y0. The core of this formula is to achieve a "center-focused, edge-faded" weight distribution based on the inverse square of the distance. This is suitable for scenarios where the core area needs to be highlighted, ensuring that the diseased spot in the pest image is located at the center of the subimage.

[0033] The step S3 further comprises:

[0034] (1) YOLOv8 model construction: YOLOv8 is an efficient target detection model that uses a single neural network to simultaneously complete target position prediction and category recognition. The Backbone (feature extraction network) and Neck (feature fusion network) parts of YOLOv8 are used to extract feature information from the input image and fuse it into the final output. The basic YOLOv8 network structure is as follows: (x, y, w, h, p) = YOLOv8 (I aug ), where x, y are the coordinates of the target box, w, h are the width and height of the target box, p is the category probability, and I aug is the enhanced input image.

[0035] (2) Scale-based Dynamic Loss (SDIoU) is introduced. SDIoU is an adaptive loss optimization method designed for multi-scale tasks (such as target detection and image segmentation). It aims to solve the problem of model performance imbalance caused by target size differences by dynamically adjusting the loss weights of targets of different scales. Its core idea is to automatically assign weights to balance the learning progress of each scale based on the target scale attributes (such as size, feature level) or real-time feedback during training (such as loss value, number of samples). Key designs include weight adjustment basis (number of targets, loss amplitude, gradient statistics), dynamic update mechanism (batch-by-batch adjustment, sliding average smoothing) and flexible combination of mathematical forms (such as normalized weighting or exponential weighting). This loss function significantly improves the accuracy of small target detection in target detection tasks and balances the learning efficiency of multi-resolution features in image segmentation. Its advantage lies in adaptively optimizing the sensitivity of the model to different scales and reducing the cost of manual parameter adjustment. However, attention should be paid to the stability design of the weight strategy to avoid training fluctuations.

[0036]

[0037] This formula normalizes the loss of each scale through Softmax Dynamic weight allocation: The scale with higher loss has a larger weight, forcing the model to focus on the scale with the current poor performance. At the same time, the sharpness of the weight distribution is adjusted by the temperature coefficient T to achieve an adaptive balance in multi-scale learning.

[0038] (3) Adaptive Rotated Convolution (ARC) is introduced in the Bone layer of the YOLO algorithm. The improved algorithm can solve the directional adaptability problem in rotating target detection by dynamically adjusting the direction of the convolution kernel. The core idea is to predict multiple rotation angles θ and weights λ through a data-dependent routing function, rotate the original convolution kernel W = [W1, ..., Wn] by θ_i angles respectively, and then weightedly combine them into the final kernel Here, θ and λ are generated from the input feature map via a lightweight network. This formula enables parameter adaptation of the rotation kernel. Its computational process is equivalent to parallel convolution of multiple branches and summing the results, but the parameterized combination significantly reduces computational overhead. The ARC module can be directly embedded into existing convolutional layers, enabling the backbone network to extract robust, rotation-sensitive features while maintaining plug-and-play functionality.

[0039] The step S4 further comprises:

[0040] The Adaptive Head is a detection head design that dynamically adjusts feature expression in object detection algorithms. Its core concept is to achieve adaptive feature optimization for different detection tasks (classification, localization) and targets of different scales through a multi-branch structure and learnable parameters. Compared to traditional fixed-structure detection heads, the Adaptive Head significantly improves the detector's ability to perceive multi-scale targets by introducing a spatial attention mechanism, dynamic convolution kernels, and task-specific feature enhancement modules. Its typical structure consists of three core components:

[0041] (2) Multi-scale feature fusion module: Deformable convolution is used to achieve cross-scale feature aggregation, which is expressed as follows:

[0042]

[0043] Where p is the output position, p k is the preset offset, Δp k is the learnable offset parameter, w k is the dynamic weight. This module uses Δp k The dynamic adjustment of enables the convolution kernel to adaptively focus on the key areas of the target.

[0044] (2) Adaptive Spatial Attention (ASA): A channel-spatial dual attention mechanism is used to optimize feature responses. The spatial attention weight is calculated as:

[0045]

[0046] Where W s is a 1×1 convolution kernel, σ is a Sigmoid function, and the response value of the target area is enhanced through dynamic weight distribution to suppress background noise.

[0047] (3) Classification-regression decoupling branch: It adopts the structure of parameter-sharing backbone network + task-specific sub-network, and the classification branch uses dynamic probability calibration:

[0048]

[0049] Where τ is a learnable temperature coefficient that dynamically adjusts the discrimination of classification confidence; the regression branch improves positioning accuracy through IoU-aware prediction:

[0050] L reg =1-CIoU(B pred ,B gt )+λ||v pred -v gt ||2

[0051] The CIoU loss comprehensively considers the overlap rate, center distance and aspect ratio, and V is the velocity vector.

[0052] The step S5 further comprises:

[0053] The intelligent wheat disease diagnosis system, which provides real-time feedback based on model detection results, has established a dynamic closed-loop management mechanism of "detection-matching-optimization." By analyzing field image data in real time, it accurately identifies wheat plant lesions and responds quickly. When the detection model identifies abnormal symptoms such as leaf spots and discoloration, the system immediately triggers a three-level cause matching process: first, a rapid search and match is performed in the cloud-based cause database based on the similarity of symptom characteristics. If successful, the corresponding disease type, prevention and control recommendations, and pesticide spraying plan are automatically pushed to the farmer's terminal. If no known cause is matched, the manual expert intervention mechanism is simultaneously activated. Agronomists perform feature annotation and cause analysis on unknown symptoms through a remote annotation interface, and the new case data is added to the disease database in real time, realizing dynamic iteration of the cause database. At the same time, the system optimizes model performance through continuous feedback of historical detection results: for missed or misjudged cases, the classification confidence threshold is automatically adjusted to improve sensitivity to early mild lesions, and the feature contributions of different levels in the multi-scale feature pyramid are dynamically weighted to enhance the model's ability to capture the morphology and distribution patterns of lesions; at the data level, adversarial generative technology is combined to expand the diversity of lesion samples, simulate image variations under different lighting, angles and disease development stages, and ensure that the model adapts to complex field environments.

[0054] To ensure real-time performance, the system utilizes an edge computing architecture, enabling millisecond-level diagnosis of individual wheat plants. It also dynamically adjusts the camera's focal length and shooting angle through an adaptive acquisition strategy, prioritizing focus on suspected diseased areas. Verified by actual deployments, the system has increased the accuracy of identifying common wheat diseases to over 95%, shortened the time required to match disease causes to 0.3 seconds, and reduced manual response delays to less than 5 seconds for unknown conditions. This has also reduced pesticide overuse by over 30%, significantly improving the precision of disease prevention and control and the sustainability of agricultural production.

[0055] The beneficial effects of the present invention are:

[0056] 1. Accuracy: The monitoring platform uses machine vision technology to monitor air, temperature, soil, carbon dioxide content, light, and pest and disease conditions and provide timely feedback. Based on data analysis, it adjusts pesticide input to achieve the effect of less investment and more benefits, realizing the conservation of agricultural resources, reducing costs and increasing yields.

[0057] 2. Efficiency: The monitoring system uses modern intelligent machinery to replace some manual labor. This reduces agriculture's reliance on labor and alleviates labor shortages. Furthermore, intelligent machinery is more efficient and accurate than manual labor, reducing agricultural resource consumption and enabling early prediction of natural disasters in agricultural production, minimizing economic losses. Furthermore, by leveraging technologies such as the Internet of Things and big data, real-time data collection and analysis can be used to provide agricultural producers with information to aid decision-making, improve agricultural production and management efficiency, and increase yields.

[0058] 3. Improve the quality of the ecological environment: Through precise fertilization, precise spraying of pesticides and other operations, we can improve the problem of fertilizer and pesticide abuse in traditional agricultural production, protect the structure of cultivated land, and improve the quality of the ecological environment.

[0059] The present invention will be described in further detail below with reference to the accompanying drawings and specific embodiments:

[0060] 1. After collecting images showing wheat diseases, standardization preprocessing is first performed, including resizing, median filtering, denoising, and pixel normalization, to ensure that the input image quality meets the model requirements. A top-hat transform is used to enhance microcrack features, while a low-hat transform sharpens edge details. Histogram equalization is also used to optimize lighting consistency, laying a foundation for high-quality data for subsequent testing.

[0061] 2. By employing a multimodal data augmentation strategy and Mosaic-8 data augmentation, image spatial transformations are achieved through rotation, mirror flipping, and random cropping. These augmentations help the model adapt to diverse environmental changes, improve its wheat disease detection capabilities, and enhance its robustness in changing environments.

[0062] 3. Combined with super-resolution reconstruction technology SRResNet, it can efficiently extract image features and generate high-resolution images. This technology uses a deep learning model to restore tiny defects in images, improving image resolution and clarity, ensuring more accurate subsequent object detection.

[0063] 4. Use YOLOv8 to improve the model to extract target features in the image, and by integrating the scale-based dynamic loss function and the ARConv adaptive rotation convolution module, enhance the model's attention to defect areas and feature extraction efficiency, thereby improving the model's accuracy and robustness, especially in complex backgrounds.

[0064] 5. The optimized YOLOv8 model performs target detection and classification. By combining it with the Adaptive Head detection head, it ensures the detection accuracy of targets of different scales and accurately identifies the location and type of wheat lesions.

[0065] 6. Based on the model's detection results, a quick search and match is performed in the cloud-based cause of disease database based on the similarity of symptom characteristics (preset threshold 85%-90%). If successful, the corresponding disease type, prevention and control recommendations, and pesticide spraying plan are automatically pushed to the farmer's terminal; if no known cause is matched, the manual expert intervention mechanism is simultaneously activated to ensure the accuracy and reliability of the detection results.

[0066] 7. Optimize model performance through continuous feedback from historical test results: For missed or misdiagnosed cases, the classification confidence threshold is automatically adjusted to improve sensitivity to early mild lesions, and the feature contributions of different levels in the multi-scale feature pyramid are dynamically weighted to enhance the model's ability to capture lesion morphology and distribution patterns.

[0067] 8. At the data level, adversarial generative technology is used to expand the diversity of disease samples, simulate image variations under different lighting, angles and disease development stages, and ensure that the model adapts to complex field environments.

[0068] 9. Dynamically adjust detection strategies and parameters, such as enhancement weights and threshold settings, based on real-time feedback. By continuously optimizing model parameters, the accuracy of subsequent detections is improved, enabling the model to more accurately respond to minor defects in complex environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] Figure 1 It is an algorithm flow chart of the method of the present invention;

[0070] Figure 2 Categorize the results for pest capture;

[0071] Figure 3 Schematic diagram of image segmentation results;

[0072] Figure 4 Wheat leaf image features. DETAILED DESCRIPTION

[0073] The present invention will be further described below with reference to the accompanying drawings and specific embodiments:

[0074] The improved YOLOv8-based intelligent monitoring technology for wheat pests and diseases in northwest weather includes the following steps:

[0075] S1, multi-source image acquisition and preprocessing;

[0076] S2, feature fusion data enhancement, Mosaic-8 multi-image fusion enhancement;

[0077] S3. Improve the lightweight network model optimization of YOLOv8;

[0078] S4,deformable detection head design, multi-scale adaptive classification;

[0079] S5. Dynamic model update.

[0080] S1 specifically includes the following:

[0081] S101. Select the wheat-growing area in Northwest China with high incidence of pests and diseases as the monitoring sample area and set ground control points to calibrate the coordinate system;

[0082] S102, using a multi-rotor drone equipped with a hyperspectral imager to perform periodic aerial photography missions during the crop growth season;

[0083] S103. Use a fixed imager in the wheat field to collect images of the diseased area of wheat in extreme weather conditions such as dust and strong light, maintaining a height of 2-4 meters and an interval of ≤10 seconds;

[0084] S104, calculating the average brightness of the image based on a Gaussian weighted model;

[0085] S105: Use the gradient energy function to perform fuzzy screening to remove images with excessive noise or extreme blur.

[0086] S2 specifically includes the following:

[0087] S201. Construct a disease feature enhancement dataset and filter abnormal samples based on the HSV color space;

[0088] S202. Randomly select 8 images, unify their sizes through affine transformation, and give priority to samples containing extreme weather features, with a proportion of no less than 40%;

[0089] S203, adaptively scaling each image and randomly rotating the image (-30° to 30°) to simulate the perspective offset of drone aerial photography;

[0090] S204, stitching the eight images in a 3×3 grid layout, placing two superimposed images in the center grid, and using a random masking mechanism to perform transparency blending on the overlapping areas;

[0091] S205. Label each wheat ear with fusarium fusarium disease in the established image dataset using Labelimg according to the disease condition of the wheat in each image.

[0092] S3 specifically includes the following:

[0093] S301. The backbone network was restructured and rotation-aware designed, replacing standard convolutional layers with lightweight depthwise separable convolutions (DSCs). This reduced the number of parameters by 75% while retaining spatial feature extraction capabilities. Adaptive rotational convolution modules (ARCs) were embedded in the shallow backbone network to dynamically capture the tilt characteristics of fallen wheat ears. Multi-scale feature fusion optimization was performed, introducing cross-stage dense connections in the deep network. Feature maps output by adjacent layers were concatenated according to the channel dimension, and an attention-guided channel compression strategy was employed to preserve key disease characteristics.

[0094] S302. Design a lightweight neck network and optimize the bidirectional feature pyramid to construct a lightweight bidirectional feature fusion channel. First, use jump connections to fuse deep semantic information with shallow detail features. Second, prune the fusion results and retain the top 80% important feature channels. Add a deformable convolution layer on top of the feature pyramid to dynamically adjust the position of the convolution kernel sampling points to adapt to the irregular lesion morphology. Finally, embed a position-sensitive attention module before the output layer, extract spatial weights through parallel maximum pooling and average pooling, and assign 2 times the attention weight to areas with high disease incidence.

[0095] S302. The adaptive rotation convolution module needs to be progressively integrated with the original network. The routing network parameters are frozen in the initial stage. The temperature coefficient T of the dynamic loss function needs to be linearly decayed with the training rounds (from 1.0 to 0.3). After completing the structural optimization, three full rounds of training are required, with 200 epochs per round to achieve optimal parameters.

[0096] S4 specifically includes the following:

[0097] S401: Perform multi-scale dynamic feature fusion. Deploy a deformable convolution module at the front end of the detection head to dynamically adjust the feature sampling position for the wheat lesion area. 12 sets of basic sampling points are preset with an initial offset of 0. A lightweight sub-network is used to predict the offset in real time. Double offset weights are applied to the lesion edge area to accurately capture the lesion outline.

[0098] S402: Strengthen the attention mechanism by constructing a dual-path attention weight generator. The spatial attention mechanism uses a 5×5 convolution kernel to generate a heat map to highlight the diseased wheat ear area. The channel weights are matrix-multiplied with the spatial heat map to implement attention mechanism fusion, and the high confidence areas (weight > 0.7) are enhanced by 2 times.

[0099] S403: Construct a temperature coefficient adaptive mechanism, set the initial temperature τ = 1.0, and linearly decrease it to 0.3 with each training round. Enable dynamic temperature adjustment for difficult-to-classify samples (confidence 0.4-0.6), τ = 1-current training epoch / total epochs; after the dynamic temperature adjustment is completed, optimize the loss function, using the CIoU loss function, and optimize the overlap rate, center distance, and aspect ratio.

[0100] S5 specifically includes the following:

[0101] S501: Model dynamic optimization engine, formulate daily online incremental learning strategy, adopt curriculum learning strategy, and train in stages from easy to difficult according to the severity of the disease;

[0102] S502: Continuously optimize the data set and test set, and add the wheat disease data collected by the edge hardware to the data set using the developed learning strategy;

[0103] S503: Use the optimized dataset to construct and update the disease feature vector dataset and set the three-level matching threshold; when the confidence level is ≥85%, automatically detect and push the prevention and control plan; when the confidence level is between 60%-85%, trigger the multi-model voting mechanism to determine the cause of wheat disease; when the confidence level is <60%, mark it as an unknown disease and start manual review.

[0104] This technology has significantly improved the accuracy and practicality of wheat disease monitoring through a number of innovative improvements. Its core advantages are:

[0105] 1) Using SRResNet super-resolution reconstruction and multimodal data enhancement strategies, it effectively improves image detail features and enhances the model's generalization ability for complex scenes, increasing the accuracy of tiny lesion recognition by 30%;

[0106] 2) Innovative fusion of a scale-dynamic loss function and an adaptive rotational convolution module. By dynamically weighting multi-scale features and optimizing rotational kernel parameters, this method solves the challenge of dense small target detection, achieving over 95% disease recognition accuracy in field measurements.

[0107] 3) Build a closed-loop "detection-matching-optimization" system, combined with edge computing to achieve 0.3-second real-time diagnosis. Through dynamic cause library updates and adversarial sample generation technology, the response delay for unknown diseases is reduced to less than 5 seconds, shortening the model iteration cycle by 60%;

[0108] The use of an adaptive detection head enhances spatial perception capabilities, and combined with the CIoU loss function, improves positioning accuracy to 92.5%, while reducing pesticide overuse by 30%, forming an intelligent, efficient, and precise prevention and control system. These innovations make the technology highly robust, highly real-time, and continuously evolving, providing a reliable solution for smart agriculture.

Claims

1. A lightweight detection method for wheat pests and diseases in northwest weather based on YOLOv8, characterized by: The following steps are involved: Step S1: Using terminal hardware devices to collect data images with wheat lesions, perform standardized preprocessing, and combine the SRResNet super-resolution reconstruction model to enhance image details and extract features to generate high-resolution images; Step S2: Using the Mosaic-8 data augmentation strategy, an eight-image stitching mechanism is constructed based on the CutMix framework. By reorganizing the spatial topology of multi-source samples, the training sample size is expanded and the feature representation capability of dense small objects is enhanced. Step S3: Build a wheat lesion detection model based on YOLOv8, optimize the network structure, and integrate the scale-based dynamic loss function and the ARConv adaptive rotation convolution module to improve accuracy and robustness; Step S4: Use the optimized YOLOv8 model to detect and classify wheat lesions, combined with the Adaptive Head detection head to accurately identify the location and type of wheat lesions; Step S5: Real-time feedback is provided based on the model detection results. If the recognition results show that the wheat plants have lesions, timely feedback is provided and the cause of the disease is matched. If the cause of the disease is not matched, manual intervention is performed, and the wheat plant symptoms are dynamically updated to improve accuracy.

2. The improved lightweight detection method for wheat pests and diseases in northwest weather based on YOLOv8 according to claim 1 is characterized in that: The step S1 specifically includes: (1) First, the quality of wheat worm disease images collected in real time by the IoT terminal is screened. The screened images contain the presentation of wheat diseases and pests under the influence of extreme weather. Secondly, enhancement processing is performed, and the brightness analysis algorithm is used to screen out images with moderate exposure to avoid being too dark or too bright due to extreme weather interference. Secondly, the clarity is evaluated based on the gradient energy function, and blurred samples are eliminated. After the qualified images are subjected to median filtering to remove noise, the small lesions are enhanced by high-hat transformation and the edges are sharpened by low-hat transformation. The pixel normalization is combined to unify the feature scale. The image screening stage uses quantitative evaluation indicators to exclude low-quality data. The brightness screening adopts the Gaussian weighted average model: Among them, I avg Represents the quantitative index of image quality after weighted averaging; W, H represent the width and height of the image, in pixels; x, Y represent the coordinate position of the pixel in the image; ψ represents the weight function, which indicates the weight given to the importance of the pixel; (2) To improve the generalization performance of the model, a multimodal data augmentation strategy is adopted to achieve image space transformation through rotation transformation, mirror flipping and random cropping. The angle range of the rotation transformation is [-30°, 30°]. The rotation transformation is described by the formula: Where θ is the rotation angle. The enhancement process simulates lighting tilt, device viewing angle offset, and other real-world differences, making the model more robust to changes in lesion morphology and reducing the risk of overfitting. (3) Combined with the super-resolution reconstruction technology SRResNet, the image features are extracted to generate a high-resolution image; the specific operation formula is as follows: H=α(W out *(α(W in *X+b in ))+b out )+X Among them, * represents the convolution operation, W out 、W in Represented as the weight of the convolution kernel; b in 、b out It is represented as the bias term; α represents the activation function; H represents the feature map obtained by the convolution operation of the input image X.

3. The improved lightweight detection method for wheat diseases and insect pests in northwest weather based on YOLOv8 according to claim 1 is characterized in that: The step S2 specifically includes: First, randomly select several images from the original dataset and scale them to a uniform size; Second, the selected images are stitched together to form a composite image; Before stitching, in order to ensure smooth transition when different sub-regions come from different images, the source image is affine transformed; affine transformation includes scaling, rotation and translation operations, which can be expressed by the following formula: x′=s x ·x·cos(θ)-s y ·y·sin(θ)+t x and′=s x ·x·sin(θ)+s y ·y·cos(θ)+t y Where x, y represent the coordinates of a pixel in the original image; x′, y′ represent the new coordinates of the pixel after affine transformation; s x , s y represents the scaling factor along the x-axis and y-axis, which is used to scale randomly selected images to a uniform size before stitching; θ represents the rotation angle, usually in radians; t x , t y Represents the translation along the x-axis and y-axis, which can move the sub-image to the specified position in the composite image; In addition, the weight of each sub-region needs to be calculated. The weight coefficient is based on the location information. The weight close to the center is higher, while the weight of the edge area is lower. The weight calculation is expressed by the following formula: Among them, x, y represent the coordinates of the position to be calculated, usually the coordinates of a pixel in the sub-region; x0, y0 represent the coordinates of the center point, usually the center of the sub-region or the global image; w(x, y) represents the weight coefficient at the coordinate (x, y), which is the importance weight of the position in image stitching or sub-region fusion; d(x, x0, y0) means the geometric distance from point x, y to the center point x0, y0; The core of the formula is to achieve a weight distribution of "center focus and edge fading" through the inverse square relationship of distance. This formula is suitable for scenarios where the core area needs to be highlighted, so that the diseased spot in the pest image is located in the center of the sub-image.

4. The improved lightweight detection method for wheat diseases and insect pests in northwest weather based on YOLOv8 according to claim 1 is characterized in that: The step S3 specifically includes: (1) YOLOv8 model construction: The YOLOv8 network structure is as follows: (x, y, w, h, p) = YOLOv8 (I aug ); Among them, x, y are the coordinates of the target box, w, h are the width and height of the target box, p is the category probability, I aug is the enhanced input image; (2) Scale-based Dynamic Loss is introduced to solve the problem of model performance imbalance caused by target size differences by dynamically adjusting the loss weights of targets of different scales; (3) Adaptive Rotated Convolution (ARC) is introduced in the Bone layer of the YOLO algorithm to solve the directional adaptability problem in rotated target detection by dynamically adjusting the direction of the convolution kernel.

5. The improved lightweight detection method for wheat diseases and insect pests in northwest weather based on YOLOv8 according to claim 1 is characterized in that: The step S4 specifically includes: The Adaptive Head introduces a spatial attention mechanism, dynamic convolution kernels, and task-specific feature enhancement modules. Its typical structure consists of three core components: (1) Multi-scale feature fusion module: Deformable convolution is used to achieve cross-scale feature aggregation, which is expressed as follows: Where p is the output position, p k is the preset offset, Δp k is the learnable offset parameter, w k is the dynamic weight; this module uses Δp k Dynamic adjustment of the convolution kernel enables it to adaptively focus on the key areas of the target; (2) Adaptive Spatial Attention (ASA): A channel-spatial dual attention mechanism is used to optimize feature responses. The spatial attention weight is calculated as: Where W s is a 1×1 convolution kernel, σ is a Sigmoid function, which strengthens the response value of the target area and suppresses background noise through dynamic weight distribution; (3) Classification-regression decoupling branch: It adopts the structure of parameter-sharing backbone network + task-specific sub-network, and the classification branch uses dynamic probability calibration: Where τ is a learnable temperature coefficient that dynamically adjusts the discrimination of classification confidence; the regression branch improves positioning accuracy through IoU-aware prediction: L reg =1-CIoU(B pred ,B gt )+λ||v pred -v gt ||2 The CIoU loss comprehensively considers the overlap rate, center distance and aspect ratio, and V is the velocity vector.

6. The improved lightweight detection method for wheat diseases and insect pests in northwest weather based on YOLOv8 according to claim 1 is characterized in that: The step S5 specifically includes: The intelligent wheat disease diagnosis system, which provides real-time feedback based on model detection results, has established a dynamic closed-loop management mechanism of "detection-matching-optimization". By analyzing field image data in real time, it can accurately identify wheat plant diseases and respond quickly. When the detection model identifies abnormal symptoms such as leaf spots and discoloration, the system immediately triggers a three-level cause matching process: first, a quick search and match is performed in the cloud-based cause database based on the similarity of symptom characteristics. If successful, the corresponding disease type, prevention and control recommendations, and pesticide spraying plan are automatically pushed to the farmer's terminal; If no known cause is matched, the manual expert intervention mechanism will be activated simultaneously. The agronomist will perform feature annotation and cause analysis on the unknown disease through the remote annotation interface, and expand the new case data to the disease database in real time to realize the dynamic iteration of the cause database.

Citation Information

Cited By

  • Rice leaf folder imago image detection and counting method and system oriented to complex environment

    CN121095871A

  • Highway pavement disease intelligent detection method and system based on multi-source data fusion and YOLO optimization algorithm

    CN121190981A

  • Paddy rice infected rice ear segmentation method based on position enhancement and detail aggregation network

    CN121213921A