Field rice leaf blast detection method, device, equipment and medium

Through the improved Pyrami d-YOLOv8 model, combined with the convolutional attention module and the pyramid-bottleneck module, the accuracy and speed problems of rice leaf plague detection in the existing technology are solved, and efficient and accurate field small-target disease detection is achieved.

CN119478654BActive Publication Date: 2025-08-12SHENYANG AGRI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411253844.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2025-08-12
Estimated Expiration
2044-09-09

AI Technical Summary

Technical Problem

The rice leaf plague detection method based on machine learning in the prior art relies on artificial features and has poor generalization capabilities in complex scenarios. The YOLO series models sacrifice detection accuracy in order to improve speed, making it difficult to efficiently and accurately detect small target diseases in the field.

Method used

The improved Pyrami d-YOLOv8 model is adopted, and the convolutional attention module and pyramid-bottleneck module are introduced. Combined with high-resolution feature maps and additional detection heads, a rice leaf plague detection model is constructed. Through multi-scale feature fusion and bottom-up information transmission, detection accuracy and efficiency are improved.

Benefits of technology

It significantly improves the accuracy and efficiency of rice leaf plague detection, can better capture the characteristics of small target diseases, reduce the impact of background noise, enhance the identification ability of disease areas at different scales, and achieve efficient and accurate field detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119478654B_ABST
    Figure CN119478654B_ABST
Patent Text Reader

Abstract

The present application relates to a method, apparatus, device, and medium for detecting rice leaf blast in a field. The method comprises: obtaining an image of a rice leaf to be detected; introducing a convolutional attention module after the backbone feature extraction layer of a Pyrami d-YOLOv8 model, replacing the bottleneck module in the bottleneck module of a cross-stage partial network with a pyramid-bottleneck module, introducing a higher-resolution feature map in the feature fusion layer, and constructing an additional detection head to construct an improved Pyrami d-YOLOv8 model to complete the construction of a rice leaf blast detection model; using the rice leaf blast detection model that has been trained to a convergent state to perform disease detection on the rice leaf image to be detected, so as to determine the diseased area and disease level of the leaf blast in the rice leaf image to be detected; and spraying the diseased area of the leaf blast with a fungicide type and dosage corresponding to the disease level of the leaf blast in the rice to be detected. The present application can improve the detection accuracy of rice leaf blast, which is conducive to the timely prevention and control of rice leaf blast.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of agricultural production, and in particular to a method for detecting rice leaf blast in a field, a corresponding device, an electronic device, and a computer-readable storage medium. Background Art

[0002] Rice, one of the world's three major staple crops, is the primary food for nearly half of the world's population. In China, rice, as a staple crop, contributes nearly half of total grain production. However, rice is susceptible to pathogens during its growth, posing a threat to grain production. Rice leaf blast is a major disease affecting rice growth. This disease, which typically occurs during the vegetative growth phase of rice, causes characteristic spindle-shaped lesions on the leaves and necrosis at the leaf collar. If left uncontrolled, it will not only severely impact rice yield and quality but also pose a threat to China's and even the global food security.

[0003] Traditional rice disease detection mainly relies on field surveys by plant protection experts. This method is costly and the results are somewhat subjective. Leaf blast detection based on polymerase chain reaction (PCR) technology has high accuracy, but requires relevant personnel to operate professional equipment, which limits its applicability. Due to these limitations, the above methods are not suitable for large-scale application. Therefore, growers often prevent and control rice diseases by spraying large amounts of fungicides in the early stages of rice growth. However, the use of eco-unfriendly fungicides will lead to pesticide residues, which in turn cause environmental problems.

[0004] Traditional crop disease detection methods, which rely on manual field surveys, are costly, inefficient, and subject to subjectivity. Machine learning-based methods have automated crop disease detection, but their effectiveness relies on manually extracted features, resulting in poor generalization for disease detection in complex scenarios. In contrast, deep learning-based object detection algorithms automate feature extraction and can process large datasets simultaneously, significantly improving the efficiency of crop disease detection. Two-stage detection models, such as R-CNN, and one-stage detection models, such as the YOLO series, have made significant progress in crop disease detection. However, each model has its own challenges. For example, the region proposal-based recognition strategy of two-stage detection models like R-CNN significantly reduces their real-time performance. Single-stage detection models, such as the YOLO series, sacrifice accuracy for speed. Furthermore, the balance between accurate detection of small objects, speed, and complexity remains a core challenge in existing technologies.

[0005] In summary, the machine learning-based methods in the existing technology are adapted to the fact that the detection effect of their models relies on manually extracted features, and the generalization ability of disease detection in complex scenarios is poor. In addition, single-stage detection models such as the YOLO series sacrifice the detection accuracy of the model in order to improve the detection speed of the model. In order to solve these problems, the applicant has made corresponding explorations. Summary of the Invention

[0006] The purpose of this application is to solve the above problems and provide a method for detecting rice leaf blast in the field, a corresponding device, an electronic device and a computer-readable storage medium.

[0007] In order to meet the various objectives of this application, this application adopts the following technical solutions:

[0008] A method for detecting rice leaf blast in a field, which is proposed to meet one of the purposes of this application, comprises:

[0009] Acquire an image of a rice leaf to be detected;

[0010] In response to the rice leaf blast detection model construction instruction, a convolutional attention module is introduced after the backbone feature extraction layer of the Pyrami d-YOLOv8 model, the bottleneck module in the cross-stage partial network bottleneck module is replaced with a pyramid-bottleneck module, a higher resolution feature map is introduced in the feature fusion layer, and an additional detection head is constructed to build an improved Pyrami d-YOLOv8 model to complete the construction of the rice leaf blast detection model;

[0011] In response to a field rice leaf blast detection instruction, the rice leaf blast detection model that has been trained to a convergent state is used to perform disease detection on the rice leaf image to be detected, so as to determine the diseased area and disease level of the rice leaf blast in the rice leaf image to be detected;

[0012] The leaf blast diseased area of the rice to be detected is sprayed with a fungicide type and dosage corresponding to the disease grade of the leaf blast disease in the rice to be detected, so as to complete the detection of rice leaf blast disease in the field.

[0013] Optionally, the step of performing disease detection on the rice leaf image to be detected using a rice leaf blast detection model that has been trained to a convergent state to determine the diseased area and disease level of leaf blast in the rice leaf image to be detected includes:

[0014] The backbone feature extraction layer in the rice leaf blast detection model is used to extract a feature map from the rice leaf image to be detected, and the feature map is input into the convolutional attention module, wherein the convolutional attention module includes a channel attention module and a spatial attention module;

[0015] In the channel attention module of the convolutional attention module, global average pooling and global maximum pooling are performed on each channel of the feature map output by the backbone feature extraction layer to generate channel descriptors, which are mapped to the weights of each channel through a shared multi-layer perceptron, and then the feature map is adjusted by weighting;

[0016] In the spatial attention module of the convolutional attention module, global average pooling and global maximum pooling are performed on the feature map processed by the channel attention module to generate a spatial descriptor, a spatial attention map is generated through a convolution operation, and the feature map is weighted to enhance the features of the leaf blight area.

[0017] Optionally, the step of performing disease detection on the rice leaf image to be detected using a rice leaf blast detection model that has been trained to a convergent state to determine the diseased area and disease level of leaf blast in the rice leaf image to be detected includes:

[0018] In the pyramid-bottleneck module of the cross-stage partial network bottleneck module, a pyramid structure is used to process features of different scales, capturing multi-scale information in the rice leaf image to be detected, so as to enhance the detection accuracy of diseases of different scales;

[0019] Features of different scales are extracted through multiple convolutional layers and pooling layers. The pyramid-bottleneck module fuses features of different scales in the feature fusion layer to improve the richness and accuracy of feature expression.

[0020] Optionally, the step of performing disease detection on the rice leaf image to be detected using a rice leaf blast detection model that has been trained to a convergent state to determine the diseased area and disease level of leaf blast in the rice leaf image to be detected includes:

[0021] A higher-resolution feature map is introduced into the feature fusion layer and an additional detection head is constructed to improve the detection accuracy of leaf blight. The higher-resolution feature map has a size of 160×160, and the other three feature maps with sizes of 80×80, 40×40, and 20×20 are all generated by the backbone feature extraction layer.

[0022] Deep high-semantic information is transmitted through upsampling and cascading, and spatial position information is supplemented with a bottom-up structure to efficiently utilize feature information at different layers and improve detection accuracy.

[0023] Optionally, the cross-stage partial network bottleneck module is located in the middle layer of the backbone feature extraction layer.

[0024] Optionally, the step of spraying the leaf blast diseased area with a fungicide type and dosage corresponding to the disease grade of the leaf blast disease in the rice to be detected comprises:

[0025] Input the rice leaf image to be tested into the rice leaf blast detection model that has been trained to convergence to determine the affected area of the leaf blast and its disease level;

[0026] In response to leaf blast prevention and control instructions, the corresponding fungicide type and dosage are selected according to the disease level of the leaf blast to spray the diseased area of the leaf blast, and the spraying frequency and time of the fungicide are controlled according to the disease level of the leaf blast until the rice leaves return to a healthy state, so as to complete the detection of rice leaf blast in the field.

[0027] Optionally, the basic network architecture of the rice blast detection model is an improved Pyrami d-YOLOv8 model.

[0028] A field rice leaf blast detection device provided for another purpose of the present application includes:

[0029] An image acquisition module is configured to acquire an image of a rice leaf to be detected;

[0030] a detection model construction module, configured to respond to a rice leaf blast disease detection model construction instruction, introduce a convolutional attention module after the backbone feature extraction layer of the Pyrami d-YOLOv8 model, replace the bottleneck module in the cross-stage partial network bottleneck module with a pyramid-bottleneck module, introduce a higher resolution feature map in the feature fusion layer and construct an additional detection head to construct an improved Pyrami d-YOLOv8 model to complete the construction of the rice leaf blast disease detection model;

[0031] a leaf blast disease detection module configured to respond to a rice leaf blast disease detection instruction in the field and perform disease detection on the rice leaf image to be detected using a rice leaf blast disease detection model that has been trained to a convergent state, so as to determine a diseased area and a disease level of leaf blast disease in the rice leaf image to be detected;

[0032] The leaf blast prevention and control module is configured to spray the leaf blast diseased area with a fungicide type and dosage corresponding to the disease level of the leaf blast in the rice to be detected, so as to complete the detection of rice leaf blast in the field.

[0033] An electronic device provided to meet another purpose of the present application includes a central processing unit and a memory, wherein the central processing unit is used to call and run a computer program stored in the memory to execute the steps of the field rice leaf blast detection method described in the present application.

[0034] A computer-readable storage medium is provided to meet another purpose of the present application, which stores a computer program implemented according to the field rice leaf blast detection method in the form of computer-readable instructions. When the computer program is called and executed by a computer, the steps included in the corresponding method are executed.

[0035] Compared with the existing technology, this application addresses the problems of the machine learning-based methods in the existing technology, such as the fact that the detection effect of the model depends on manually extracted manual features, the generalization ability of disease detection in complex scenes is poor, and the single-stage detection models such as the YOLO series sacrifice the detection accuracy of the model in order to improve the detection speed of the model. This application includes but is not limited to the following beneficial effects:

[0036] First, the rice leaf blast detection model of this application can capture the feature information of small targets more meticulously and improve detection accuracy by introducing high-resolution feature maps and additional detection heads; by combining feature maps from different scales, the network can better integrate information at different levels, thereby improving the comprehensive understanding of the target; and through bottom-up feature fusion, spatial position information is supplemented, which helps to improve the detection accuracy of small targets.

[0037] Secondly, the rice leaf blast detection model of this application introduces a convolutional attention module (CBAM), which allows it to more comprehensively capture feature information related to the detection of small target diseases (such as leaf blast). These features can effectively filter out background noise and enhance the feature expression of small targets, thereby significantly improving the accuracy and efficiency of leaf blast detection. The introduction of the convolutional attention module in the rice leaf blast detection model significantly improves the network's detection accuracy for small targets through channel and spatial attention mechanisms. It reduces the impact of noise through refined feature map processing, allowing the network to focus more on important target features, thereby enhancing target detection performance.

[0038] Third, the pyramid-bottleneck module of the rice leaf blast detection model of the present application enhances the multi-scale feature extraction capability of the diseased area in the rice leaf image to be detected through the feature fusion of the pyramid structure and the improved bottleneck design, thereby improving the detection accuracy.

[0039] Furthermore, the rice blast detection model of this application introduces a lightweight pyramid-bottleneck module during feature extraction, effectively reducing the model's parameter count and computational complexity. Furthermore, an additional detection head uses higher-resolution feature maps to predict small targets, and during feature fusion, the introduction of high-resolution feature maps effectively addresses the issue of information loss during feature transfer. Simultaneously, with the synergistic effect of the convolutional attention module (CBAM), the model can capture more detailed target information and effectively suppress background noise in the image, thereby improving the detection accuracy of small targets (rice blast). BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0041] Figure 1 Schematic diagram of the process of detecting rice leaf blast in the field in the embodiment of the present application;

[0042] Figure 2 This is a schematic diagram of data annotation for a rice leaf image in an embodiment of the present application;

[0043] Figure 3 This is a visual diagram of data enhancement for a data set in an embodiment of the present application;

[0044] Figure 4 Schematic diagram of the multi-attention feature fusion structure of Pyramid-YOLOv8 in an embodiment of the present application;

[0045] Figure 5 This is a schematic diagram of the convolutional attention module structure in an embodiment of the present application;

[0046] Figure 6 Schematic diagram of the original bottleneck module structure in the cross-stage partial network bottleneck module in an embodiment of the present application;

[0047] Figure 7 This is a flow chart of the pyramid-bottleneck module structure in the embodiment of the present application;

[0048] Figure 8 This is a functional block diagram of a device for detecting rice leaf blast in a field according to an embodiment of the present application;

[0049] Figure 9 Schematic diagram of the structure of the computer device in the embodiment of the present application. DETAILED DESCRIPTION

[0050] The following describes in detail embodiments of the present application, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and are not to be construed as limiting the present application.

[0051] It will be understood by those skilled in the art that, unless expressly stated otherwise, the singular forms "a", "an", "said" and "the" used herein may also include the plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, "connected" or "coupled" as used herein may include wireless connections or wireless couplings. The term "and / or" used herein includes all or any units and all combinations of one or more associated listed items.

[0052] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with their meanings in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0053] It will be understood by those skilled in the art that the terms "client," "terminal," and "terminal device" as used herein include both devices that are wireless signal receivers, i.e., devices that only have wireless signal receivers without transmission capabilities, and devices that have receiving and transmitting hardware capable of two-way communication over a two-way communication link. Such devices may include: cellular or other communication devices such as personal computers and tablet computers, which have single-line displays, multi-line displays, or cellular or other communication devices without multi-line displays; PCS (Personal Communications Service), which may combine voice, data processing, fax, and / or data communication capabilities; PDA (Personal Digital Assistant), which may include a radio frequency receiver, a pager, Internet / Intranet access, a web browser, a notepad, a calendar, and / or a GPS (Global Positioning System) receiver; and conventional laptop and / or palmtop computers or other devices, which have and / or include a radio frequency receiver. As used herein, the terms "client," "terminal," or "terminal device" may be portable, transportable, or installed in a vehicle (air, sea, and / or land), or may be adapted and / or configured to operate locally and / or in a distributed manner at any other location on Earth and / or in space. As used herein, the terms "client," "terminal," or "terminal device" may also refer to a communication terminal, an Internet terminal, or a music / video playback terminal, such as a PDA, an MID (Mobile Internet Device), and / or a mobile phone with music / video playback capabilities, or may include a smart TV, a set-top box, or other device.

[0054] The hardware referred to by names such as "server", "client", and "service node" in this application is essentially an electronic device with capabilities equivalent to those of a personal computer. It is a hardware device that has the necessary components revealed by the von Neumann principle, such as a central processing unit (including an arithmetic unit and a controller), a memory, an input device, and an output device. Computer programs are stored in its memory, and the central processing unit loads the program stored in the external memory into the internal memory for execution, executes the instructions in the program, and interacts with the input and output devices to complete specific functions.

[0055] It should be noted that the concept of "server" referred to in this application can also be extended to server clusters. Based on the network deployment principles understood by those skilled in the art, the servers described should be logically divided. In physical space, these servers can be independent of each other but callable through interfaces, or integrated into a single physical computer or a computer cluster. Those skilled in the art should understand this flexibility and should not use it to constrain the implementation of the network deployment method of this application.

[0056] Unless expressly specified, one or more technical features of the present application can be deployed on a server for implementation and accessed by a client through a remote call to obtain an online service interface provided by the server, or can be directly deployed and run on a client for implementation.

[0057] Unless expressly specified otherwise, the neural network models referenced or may be referenced in this application may be deployed on a remote server and remotely called on the client, or may be deployed and directly called on a client with sufficient device capabilities. In some embodiments, when it runs on the client, its corresponding intelligence may be obtained through transfer learning to reduce the requirements for the client's hardware operating resources and avoid excessive occupation of the client's hardware operating resources.

[0058] Unless explicitly specified, the various data involved in this application can be stored remotely on a server or on a local terminal device, as long as they are suitable for being called by the technical solution of this application.

[0059] Those skilled in the art should be aware that although the various methods of this application are described based on the same concept and thus exhibit commonality, unless otherwise specified, these methods can be independently executed. Similarly, the various embodiments disclosed in this application are all based on the same inventive concept. Therefore, concepts with the same expression, as well as concepts that are appropriately transformed for convenience despite different expression, should be understood as equivalent.

[0060] Unless expressly stated to be mutually exclusive, the various embodiments disclosed in this application may be cross-combined with the relevant technical features of the various embodiments to flexibly construct new embodiments, as long as such combination does not deviate from the creative spirit of this application and can meet the needs of the prior art or resolve certain deficiencies in the prior art. Those skilled in the art should be aware of such flexibility.

[0061] See also Figure 1 In one embodiment, the field rice leaf blast detection method of the present application comprises:

[0062] Step S10, obtaining an image of a rice leaf to be detected;

[0063] The field rice leaf blast detection system in the terminal device can obtain the image of the rice leaf to be detected. For details, please refer to Figure 2 To obtain data on rice leaf blast, under the guidance of plant protection experts, we used mobile devices to capture disease images in different weather conditions (sunny, cloudy) and at different growth stages (jointing, heading, and booting). We then divided the dataset into training, validation, and test sets in a ratio of 8:1:1, and used LabelImg software for data annotation. Figure 3 , acting on the training set by adjusting contrast, brightness, saturation, as well as data augmentation by flipping and scaling.

[0064] Step S20: In response to the rice leaf blast disease detection model construction instruction, a convolutional attention module is introduced after the backbone feature extraction layer of the Pyramid-YOLOv8 model, the bottleneck module in the cross-stage partial network bottleneck module is replaced with a pyramid-bottleneck module, a higher resolution feature map is introduced in the feature fusion layer, and an additional detection head is constructed to construct an improved Pyramid-YOLOv8 model to complete the construction of the rice leaf blast disease detection model;

[0065] After acquiring the image of the rice leaf to be detected, the field rice leaf blast detection system can respond to the rice leaf blast detection model construction instruction, introduce a convolutional attention module after the backbone feature extraction layer of the Pyramid-YOLOv8 model, replace the bottleneck module in the cross-stage partial network bottleneck module with a pyramid-bottleneck module, introduce a higher-resolution feature map in the feature fusion layer, and construct an additional detection head to construct an improved Pyramid-YOLOv8 model to complete the construction of the rice leaf blast detection model; wherein the cross-stage partial network bottleneck module is located in the middle layer of the backbone feature extraction layer. The basic network architecture of the rice leaf blast detection model is the improved Pyramid-YOLOv8 model, which is an object detection model based on the YOLO (You Only Look Once) framework.

[0066] In some embodiments, in the process of building a rice blast detection model, in order to improve the detection accuracy of small targets, a higher-resolution feature map is introduced into the feature fusion structure and an additional detection head is constructed. The improved feature fusion structure is as follows: Figure 4As shown in the figure, the higher-resolution feature map has a size of 160×160, and the other three feature maps with sizes of 80×80, 40×40, and 20×20 are all generated by the backbone feature extraction layer. For features of different scales, the deep high-semantic information is first transferred through upsampling and cascading, and then the spatial position information is supplemented by a bottom-up structure, thereby efficiently utilizing the feature information of different layers and improving the detection accuracy.

[0067] In some embodiments, a convolutional block attention module (CBAM) is introduced to suppress background noise in shallow features. Its structure is as follows: Figure 5 As shown in the figure, the feature map extracted from the backbone network is first processed by the Convolutional Block Attention Module (CBAM), which includes the Channel Attention Module (CAM) and the Spatial Attention Module (SAM). The Channel Attention Module (CAM) and the Spatial Attention Module (SAM) in the Convolutional Attention Module work together to extract important information from the feature map; then, the feature fusion layer (neck network) fuses the processed feature maps of different scales; by introducing the Convolutional Block Attention Module (CBAM), the multi-attention spatial fusion structure based on the additional detection head enables Pyramid-YOLOv8 to more comprehensively capture feature information related to small target disease detection, thereby significantly improving the accuracy and efficiency of leaf blight detection.

[0068] In some embodiments, in the Pyramid-YOLOv8 network structure, the bottleneck module in the Cross Stage Partial Network Bottleneck with 2Convolutions (C2f) module is replaced by a Pyramid-Bottleneck module, which is named C2f-Pyramid module.

[0069] The original bottleneck module structure in the cross-stage partial network bottleneck module is as follows Figure 6As shown in the figure, the input feature map goes through two stages: compression and expansion. In the compression stage, the network compresses the input information into a smaller spatial dimension, thereby retaining the most important information. The expansion stage is responsible for reconstructing the compressed information, and finally adding a residual connection at the end to prevent the gradient vanishing problem in deep networks. The structure of the Pyramid-Bottleneck module is shown in the figure. Figure 7 As shown in the figure, its design purpose is to solve the problem of excessive redundant calculations caused by repeated bottleneck modules as the neural network becomes deeper.

[0070] Step S30: responding to the field rice leaf blast detection instruction, performing disease detection on the rice leaf image to be detected using the rice leaf blast detection model that has been trained to a convergent state, so as to determine the diseased area and disease level of the rice leaf blast in the rice leaf image to be detected;

[0071] After the rice leaf blast disease detection model is constructed, the field rice leaf blast disease detection system can respond to the field rice leaf blast disease detection instruction and use the rice leaf blast disease detection model that has been trained to a convergent state to perform disease detection on the rice leaf image to be detected, so as to determine the diseased area and disease level of the rice leaf blast disease in the rice leaf image to be detected;

[0072] Furthermore, the step of using the rice leaf blast detection model that has been trained to a convergent state to perform disease detection on the rice leaf image to be detected to determine the diseased area and disease level of the rice leaf blast in the rice leaf image to be detected includes:

[0073] Step S301: extracting a feature map from the rice leaf image to be detected using the backbone feature extraction layer in the rice leaf blast detection model, and inputting the feature map into the convolutional attention module, wherein the convolutional attention module includes a channel attention module and a spatial attention module;

[0074] Step S302: In the channel attention module of the convolutional attention module, global average pooling and global maximum pooling are performed on each channel of the feature map output by the backbone feature extraction layer to generate channel descriptors, and these descriptors are mapped to the weights of each channel through a shared multi-layer perceptron, and then the feature map is adjusted by weighting;

[0075] Step S303: In the spatial attention module of the convolutional attention module, global average pooling and global maximum pooling are performed on the feature map processed by the channel attention module to generate a spatial descriptor, a spatial attention map is generated through a convolution operation, and the feature map is weighted to enhance the features of the leaf blight area.

[0076] The feature map extracted from the backbone feature extraction layer (backbone network) in the rice leaf blast detection model is first input into a convolutional attention module (CBAM); after being processed by a channel attention module (CAM), the channel information of the feature map is enhanced, effectively highlighting important channels and suppressing irrelevant channels; the feature map processed by the attention module (CAM) is further processed by a spatial attention module (SAM) to highlight important spatial regions in the feature map and suppress background noise and irrelevant regions.

[0077] The feature fusion layer (neck network) fuses the processed feature maps of different scales. The feature fusion layer (neck network) usually includes a path aggregation network (PANet) or a feature pyramid network (FPN) for fusing multi-scale features to provide rich contextual information.

[0078] As shown in the above steps, the introduction of the Convolutional Attention Module (CBAM) enables the rice leaf blast detection model to more comprehensively capture feature information relevant to detecting small target diseases such as leaf blast. These features effectively filter out background noise and enhance the characteristic expression of small targets, thereby significantly improving the accuracy and efficiency of leaf blast detection. The introduction of the Convolutional Attention Module in the rice leaf blast detection model significantly improves the network's detection accuracy for small targets through channel and spatial attention mechanisms. It reduces the impact of noise through refined feature map processing, allowing the network to focus more on important target features, thereby enhancing target detection performance.

[0079] The step of using a rice leaf blast disease detection model that has been trained to a convergent state to perform disease detection on the rice leaf image to be detected to determine the diseased area and disease level of the rice leaf blast disease in the rice leaf image to be detected includes:

[0080] Step S3001: In the pyramid-bottleneck module of the cross-stage partial network bottleneck module, a pyramid structure is used to process features of different scales, capturing multi-scale information in the rice leaf image to be detected, so as to enhance the detection accuracy of diseases of different scales;

[0081] Step S3002: extract features of different scales through multiple convolutional layers and pooling layers. The pyramid-bottleneck module fuses features of different scales in the feature fusion layer to improve the richness and accuracy of feature expression.

[0082] Specifically, the pyramid-bottleneck module uses a pyramid structure to process features of different scales, which helps capture multi-scale information in the image and enhances the model's ability to recognize diseased areas of different sizes. The module extracts features at different levels and integrates this information at the feature fusion layer, thereby improving the richness and accuracy of feature expression. The traditional bottleneck module usually contains two convolutional layers, while the pyramid-bottleneck module replaces these two convolutional layers by introducing a pyramid structure, aiming to improve the diversity and accuracy of feature extraction.

[0083] Furthermore, when processing rice leaf images to be tested, the pyramid-bottleneck module can extract rich multi-scale features from the images; through the pyramid structure, the module can better identify diseased areas of different sizes and improve the detection accuracy of rice leaf blast.

[0084] In summary, the pyramid-bottleneck module enhances the multi-scale feature extraction capability of diseased areas in rice leaf images to be detected through feature fusion of the pyramid structure and improved bottleneck design, thereby improving the detection accuracy.

[0085] The step of using a rice leaf blast disease detection model that has been trained to a convergent state to perform disease detection on the rice leaf image to be detected to determine the diseased area and disease level of the rice leaf blast disease in the rice leaf image to be detected includes:

[0086] Step S1100: introducing a higher-resolution feature map into the feature fusion layer and constructing an additional detection head to improve the detection accuracy of leaf blight, wherein the higher-resolution feature map has a size of 160×160, and the other three feature maps of sizes 80×80, 40×40, and 20×20 are all generated by the backbone feature extraction layer;

[0087] Step S1200: Deep high-semantic information is transmitted through upsampling and cascading, and spatial position information is supplemented with a bottom-up structure to efficiently utilize feature information of different layers and improve detection accuracy.

[0088] Specifically, in the improved feature fusion layer, the newly added feature maps have a resolution of 160×160, and these feature maps are used for multi-scale feature fusion together with the other three feature maps from the backbone feature extraction layer (with sizes of 80×80, 40×40, and 20×20, respectively); these feature maps are all generated by the feature extraction layer of the backbone network and cover information at different scales.

[0089] The upsampling and concatenation process upsamples deeper, high-semantic features (e.g., 80×80 feature maps) to restore their spatial resolution, enabling fusion with higher-resolution feature maps (e.g., 160×160). By concatenating these feature maps, high-semantic information is transferred to different scales.

[0090] The bottom-up approach starts from the lower layers (feature maps rich in spatial information) and gradually integrates spatial position information into the higher layers (feature maps rich in semantic information). This approach helps supplement the spatial information in the feature maps and improves the detection accuracy of small objects.

[0091] The introduction of an additional detection head is used to process the newly added 160×160 feature map. This detection head can better handle high-resolution features, further improving the detection accuracy of small objects. This specially designed detection head allows the network to detect objects at higher resolutions, which helps improve the localization and classification accuracy of small objects.

[0092] It can be seen from the above embodiments that by introducing high-resolution feature maps and additional detection heads, the feature information of small targets can be captured more meticulously, thereby improving detection accuracy; by combining feature maps from different scales, the network can better integrate information at different levels, thereby improving the comprehensive understanding of the target; and the spatial position information is supplemented by the bottom-up feature fusion method, which helps to improve the detection accuracy of small targets.

[0093] In summary, the multi-attention feature fusion structure based on additional detection heads can effectively improve the detection performance of small targets. By optimizing the resolution and fusion method of feature maps, the accuracy of the network in processing small targets is enhanced.

[0094] Step S40: spraying the affected area of rice leaf blast with a fungicide type and dosage corresponding to the disease level of rice leaf blast to be detected, so as to complete the detection of rice leaf blast in the field.

[0095] After determining the diseased area and disease level of leaf blast in the rice leaf image to be detected, the diseased area is sprayed with a fungicide type and dosage corresponding to the disease level of leaf blast in the rice to be detected to complete the detection of rice leaf blast in the field, wherein the disease level of leaf blast includes preliminary disease, moderate disease, and severe disease.

[0096] Furthermore, the step of spraying the leaf blast diseased area with a fungicide type and dosage corresponding to the disease level of the leaf blast disease in the rice to be detected comprises:

[0097] Step S401: inputting the rice leaf image to be detected into a rice leaf blast detection model that has been trained to a convergent state to determine the affected area of the leaf blast and its disease level;

[0098] Step S402: respond to the leaf blast prevention and control instruction, select the corresponding fungicide type and dosage according to the disease level of the leaf blast, spray the leaf blast-affected area, and control the spraying frequency and time of the fungicide according to the disease level of the leaf blast until the rice leaves return to a healthy state, thereby completing the detection of rice leaf blast in the field.

[0099] Specifically, a rice leaf image to be tested is fed into a trained and converged rice leaf blast detection model. This model can identify leaf blast disease features in the image, determine the affected area, and its severity. Based on the detected severity, control instructions are generated, including selecting the appropriate fungicide type and dosage. The appropriate fungicide is selected based on the severity. For example, a mild infection may require only a low dose of a broad-spectrum fungicide, while a severe infection may require a high-efficiency fungicide specifically targeted for leaf blast. The fungicide dosage and frequency are determined based on the severity of the disease. For example, a mild infection may require spraying at intervals, while a severe infection may require more frequent treatment. The infected leaf area is sprayed, ensuring uniform coverage of the affected area. Changes in the affected area are monitored regularly. If there is no significant improvement in the disease, the fungicide type, dosage, or spraying frequency may need to be adjusted. The health of the rice leaves is continuously monitored until they return to a healthy state. The need for further fungicide spraying or other measures is assessed.

[0100] As demonstrated in the above examples, the impact of rice leaf blast on crops can be reduced through intelligent detection and targeted prevention and control measures. The accuracy of detection models and the effectiveness of prevention and control measures are key factors in ensuring rice health. Using efficient image recognition technology and appropriate agricultural practices can significantly improve rice leaf blast prevention and control.

[0101] In some embodiments, to verify the advantages of Pyramid-YOLOv8 in rice disease detection, this study selected five other target detection algorithms (Faster-RCNN, RT-DETR, YOLOv3-SPP, YOLOv5, and YOLOv7) for comparison with Pyramid-YOLOv8, and selected the version with the best detection accuracy for testing. Table 1 shows the test results of different algorithms. Through in-depth analysis, it can be concluded that Pyramid-YOLOv8 shows an advantage in comprehensive performance compared with other mainstream target detection models. It has the highest accuracy (81.0%) and mAP (84.3%). At the same time, Pyramid-YOLOv8 also has the highest F1 score (78.3%), which means that it achieves the best balance between precision and recall. In addition, although the processing speed (FPS) is slightly lower than YOLOv7x, Pyramid-YOLOv8 has lower parameter and computational complexity (only 4.20M parameters and 196.2G Flops), which makes it more advantageous in terms of resource efficiency and deployment.

[0102] Table 1 Comparison of experimental results of different detection models

[0103]

[0104]

[0105] Further analysis of the models revealed that single-stage detectors significantly outperform two-stage detectors (Faster-RCNN) in both detection speed and accuracy. Specifically, YOLOv3-SPP, YOLOv5x, and YOLOv7x achieve mAP@0.5 scores 2.5%, 3.8%, and 8.4% higher than Faster-RCNN, respectively. They also achieve significantly higher detection speeds, with YOLOv7x achieving the fastest detection speed at 84.7 FPS. However, these models have limitations in terms of model parameter count and computational complexity. YOLOv3-SPP has 2.41 times the number of parameters of Faster-RCNN, while also requiring 2.1 times more computation. YOLOv5x and YOLOv7x fuse feature maps generated by downsampling by 8x, 16x, and 32x, respectively, which helps the models detect objects of varying sizes while maintaining accuracy for small objects. However, YOLOv5x's detection head uses a coupled approach, and the extracted features will be responsible for both the classification and regression tasks of the target. This puts YOLOv5x at risk of overfitting during training on the rice disease dataset. Although YOLOv7x achieved the fastest detection speed of all models, it consumed a lot of resources during training, which is not conducive to the model's practical application. In addition, the RT-DETR model applies Transformer to target detection tasks, and its accuracy is between YOLOv5x and YOLOv7x. However, precisely because DETR uses the Transformer architecture, its prediction process is relatively more complex and computationally intensive, so its detection speed ranks last among the five single-stage detections.

[0106] As can be seen from the above table, the rice blast detection model of this application introduces a lightweight pyramid-bottleneck module during the feature extraction process, effectively reducing the model's parameter count and computational complexity. Furthermore, an additional detection head uses higher-resolution feature maps to predict small targets, and during feature fusion, the introduction of high-resolution feature maps effectively solves the problem of information loss during feature transfer. Furthermore, with the synergistic effect of the convolutional attention module (CBAM), the model can capture more detailed information about the target and effectively suppress background noise in the image, thereby improving the detection accuracy of small targets.

[0107] As can be seen from the above embodiments, compared with the prior art, the present application addresses the problems of the machine learning-based methods in the prior art, such as the fact that the detection effect of the model relies on manually extracted features, the generalization ability of the disease detection in complex scenes is poor, and the single-stage detection models such as the YOLO series sacrifice the detection accuracy of the model in order to improve the detection speed of the model. The present application includes but is not limited to the following beneficial effects:

[0108] First, the rice leaf blast detection model of this application can capture the feature information of small targets more meticulously and improve detection accuracy by introducing high-resolution feature maps and additional detection heads; by combining feature maps from different scales, the network can better integrate information at different levels, thereby improving the comprehensive understanding of the target; and through bottom-up feature fusion, spatial position information is supplemented, which helps to improve the detection accuracy of small targets.

[0109] Secondly, the rice leaf blast detection model of this application introduces a convolutional attention module (CBAM), which allows it to more comprehensively capture feature information related to the detection of small target diseases (such as leaf blast). These features can effectively filter out background noise and enhance the feature expression of small targets, thereby significantly improving the accuracy and efficiency of leaf blast detection. The introduction of the convolutional attention module in the rice leaf blast detection model significantly improves the network's detection accuracy for small targets through channel and spatial attention mechanisms. It reduces the impact of noise through refined feature map processing, allowing the network to focus more on important target features, thereby enhancing target detection performance.

[0110] Third, the pyramid-bottleneck module of the rice leaf blast detection model of the present application enhances the multi-scale feature extraction capability of the diseased area in the rice leaf image to be detected through the feature fusion of the pyramid structure and the improved bottleneck design, thereby improving the detection accuracy.

[0111] Furthermore, the rice blast detection model of this application introduces a lightweight pyramid-bottleneck module during feature extraction, effectively reducing the model's parameter count and computational complexity. Furthermore, an additional detection head uses higher-resolution feature maps to predict small targets, and during feature fusion, the introduction of high-resolution feature maps effectively addresses the issue of information loss during feature transfer. Simultaneously, with the synergistic effect of the convolutional attention module (CBAM), the model can capture more detailed target information and effectively suppress background noise in the image, thereby improving the detection accuracy of small targets (rice blast).

[0112] See also Figure 8, a field rice leaf blast detection device provided to meet one of the purposes of this application, includes an image acquisition module 1100, a detection model construction module 1200, a leaf blast detection module 1300, and a leaf blast prevention and control module 1400. Among them, the image acquisition module 1100 is configured to acquire an image of a rice leaf to be detected; the detection model construction module 1200 is configured to respond to a rice leaf blast detection model construction instruction, introduce a convolutional attention module after the backbone feature extraction layer of the Pyrami d-YOLOv8 model, replace the bottleneck module in the cross-stage partial network bottleneck module with a pyramid-bottleneck module, introduce a higher resolution feature map in the feature fusion layer and construct an additional detection head to construct an improved Pyrami d-YOLOv8 model. A d-YOLOv8 model is used to complete the construction of a rice leaf blast detection model; a leaf blast detection module 1300 is configured to respond to a field rice leaf blast detection instruction and use the rice leaf blast detection model that has been trained to a convergent state to perform disease detection on the rice leaf image to be detected, so as to determine the diseased area and disease level of leaf blast in the rice leaf image to be detected; a leaf blast prevention and control module 1400 is configured to spray the diseased area of leaf blast with a fungicide type and dosage corresponding to the disease level of leaf blast in the rice to be detected, so as to complete the detection of rice leaf blast in the field.

[0113] Based on any embodiment of this application, please refer to Figure 9 Another embodiment of the present application further provides an electronic device, which can be implemented by a computer device, such as Figure 9 As shown, a schematic diagram of the internal structure of a computer device. The computer device includes a processor, a computer-readable storage medium, a memory, and a network interface connected via a system bus. Among them, the computer-readable storage medium of the computer device stores an operating system, a database, and computer-readable instructions. The database may store a control information sequence. When the computer-readable instructions are executed by the processor, the processor may implement a field rice leaf blast detection method. The processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. The memory of the computer device may store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor may execute the field rice leaf blast detection method of the present application. The network interface of the computer device is used to connect and communicate with a terminal. Those skilled in the art will understand that Figure 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0114] In this embodiment, the processor is used to execute Figure 8 The memory stores the program code and various data required to execute the modules and submodules. The network interface is used to transmit data between user terminals or servers. The memory in this embodiment stores the program code and data required to execute all modules and submodules in the field rice leaf blast detection device of this application. The server can call the server's program code and data to execute the functions of all submodules.

[0115] The present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the field rice leaf blast detection method described in any embodiment of the present application.

[0116] The present application also provides a computer program product, comprising a computer program / instruction, which, when executed by one or more processors, implements the steps of the field rice leaf blast detection method described in any embodiment of the present application.

[0117] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments of the present application can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiments of the method. The aforementioned storage medium can be a computer-readable storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0118] The above description is only part of the implementation methods of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

[0119] In summary, the rice blast detection model of this application introduces a lightweight pyramid-bottleneck module during feature extraction, effectively reducing the model's parameter count and computational complexity. Furthermore, an additional detection head uses higher-resolution feature maps to predict small targets, and during feature fusion, the introduction of high-resolution feature maps effectively addresses the issue of information loss during feature transfer. Furthermore, with the synergistic effect of the convolutional attention module (CBAM), the model can capture more detailed target information and effectively suppress background noise in the image, thereby improving the detection accuracy of small targets.

Claims

1. A method for detecting rice leaf blast in a field, characterized in that: include: Acquire an image of a rice leaf to be detected; In response to the instructions for building a rice leaf blast detection model, a convolutional attention module was introduced after the backbone feature extraction layer of the Pyramid-YOLOv8 model. The bottleneck module in the cross-stage partial network bottleneck module was replaced with a pyramid-bottleneck module. A higher-resolution feature map was introduced in the feature fusion layer and an additional detection head was built to build an improved Pyramid-YOLOv8 model to complete the construction of the rice leaf blast detection model. In response to a field rice leaf blast detection instruction, a rice leaf blast detection model that has been trained to a convergent state is used to perform disease detection on the rice leaf image to be detected, so as to determine a diseased area and a disease level of the rice leaf blast in the rice leaf image to be detected, which includes: In the pyramid-bottleneck module of the cross-stage partial network bottleneck module, a pyramid structure is used to process features of different scales to capture multi-scale information in the rice leaf image to be detected; Features of different scales are extracted through multiple convolutional layers and pooling layers, and the pyramid-bottleneck module fuses features of different scales in the feature fusion layer; A higher-resolution feature map is introduced into the feature fusion layer and an additional detection head is constructed, wherein the higher-resolution feature map has a size of 160×160, and the other three feature maps with sizes of 80×80, 40×40, and 20×20 are all generated by the backbone feature extraction layer; Deep semantic information is transferred through upsampling and cascading, and spatial position information is supplemented with a bottom-up structure to utilize feature information from different layers. The leaf blast diseased area of the rice to be detected is sprayed with a fungicide type and dosage corresponding to the disease grade of the leaf blast disease in the rice to be detected, so as to complete the detection of rice leaf blast disease in the field.

2. The method for detecting rice leaf blast in the field according to claim 1, characterized in that: The step of using a rice leaf blast disease detection model that has been trained to a convergent state to perform disease detection on the rice leaf image to be detected to determine the diseased area and disease level of the rice leaf blast disease in the rice leaf image to be detected includes: The backbone feature extraction layer in the rice leaf blast detection model is used to extract a feature map from the rice leaf image to be detected, and the feature map is input into the convolutional attention module, wherein the convolutional attention module includes a channel attention module and a spatial attention module; In the channel attention module of the convolutional attention module, global average pooling and global maximum pooling are performed on each channel of the feature map output by the backbone feature extraction layer to generate channel descriptors, which are mapped to the weights of each channel through a shared multi-layer perceptron, and then the feature map is adjusted by weighting; In the spatial attention module of the convolutional attention module, global average pooling and global maximum pooling are performed on the feature map processed by the channel attention module to generate a spatial descriptor, a spatial attention map is generated through a convolution operation, and the feature map is weighted to enhance the features of the leaf blight area.

3. The method for detecting rice leaf blast in the field according to claim 1, characterized in that: The cross-stage partial network bottleneck module is located in the middle layer of the backbone feature extraction layer.

4. The method for detecting rice leaf blast in the field according to claim 1, characterized in that: The step of spraying the leaf blast diseased area of the rice plant with a fungicide type and dosage corresponding to the disease level of the leaf blast disease to be detected comprises: Input the rice leaf image to be tested into the rice leaf blast detection model that has been trained to convergence to determine the affected area of the leaf blast and its disease level; In response to leaf blast prevention and control instructions, the corresponding fungicide type and dosage are selected according to the disease level of the leaf blast to spray the diseased area of the leaf blast, and the spraying frequency and time of the fungicide are controlled according to the disease level of the leaf blast until the rice leaves return to a healthy state, so as to complete the detection of rice leaf blast in the field.

5. The method for detecting rice leaf blast in the field according to any one of claims 1 to 4, characterized in that: The basic network architecture of the rice leaf blast detection model is an improved Pyramid-YOLOv8 model.

6. A device for detecting rice leaf blast in a field, characterized in that: include: An image acquisition module is configured to acquire an image of a rice leaf to be detected; a detection model construction module, configured to respond to a rice leaf blast disease detection model construction instruction, introduce a convolutional attention module after the backbone feature extraction layer of the Pyrami d-YOLOv8 model, replace the bottleneck module in the cross-stage partial network bottleneck module with a pyramid-bottleneck module, introduce a higher resolution feature map in the feature fusion layer and construct an additional detection head to construct an improved Pyrami d-YOLOv8 model to complete the construction of the rice leaf blast disease detection model; The leaf blast disease detection module is configured to respond to a rice leaf blast disease detection instruction in the field, and use a rice leaf blast disease detection model that has been trained to a convergent state to perform disease detection on the rice leaf image to be detected, so as to determine the diseased area and disease level of the leaf blast disease in the rice leaf image to be detected, which includes: In the pyramid-bottleneck module of the cross-stage partial network bottleneck module, a pyramid structure is used to process features of different scales to capture multi-scale information in the rice leaf image to be detected; Features of different scales are extracted through multiple convolutional layers and pooling layers, and the pyramid-bottleneck module fuses features of different scales in the feature fusion layer; A higher-resolution feature map is introduced into the feature fusion layer and an additional detection head is constructed, wherein the higher-resolution feature map has a size of 160×160, and the other three feature maps with sizes of 80×80, 40×40, and 20×20 are all generated by the backbone feature extraction layer; Deep semantic information is transferred through upsampling and cascading, and spatial position information is supplemented with a bottom-up structure to utilize feature information from different layers. The leaf blast prevention and control module is configured to spray the leaf blast diseased area with a fungicide type and dosage corresponding to the disease level of the leaf blast in the rice to be detected, so as to complete the detection of rice leaf blast in the field.

7. An electronic device comprising a central processing unit and a memory, characterized in that: The central processing unit is configured to call and run a computer program stored in the memory to execute the steps of the method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that It stores a computer program implemented according to the method described in any one of claims 1 to 5 in the form of computer-readable instructions, and when the computer program is called and executed by a computer, the steps included in the corresponding method are executed.

Citation Information

Patent Citations

  • Apple disease identification method based on improved YOLOv5s model

    CN114819052A

  • Rice disease and pest detection method and system based on improved YOLOv8

    CN117710820A