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

Through the improved Pyramid-YOLOv8 model, combined with the convolutional attention module, pyramid-bottleneck module and additional detection head, the problem of insufficient detection accuracy of rice disease detection in the prior art is solved, achieving high efficiency and precision rice leaf plague detection.

CN119478654AActive Publication Date: 2025-02-18SHENYANG AGRI UNIV
View PDF 4 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The rice disease detection method based on machine learning in the prior art relies on manual extraction of features, has poor generalization capabilities, and the single-stage detection model sacrifices detection accuracy in order to improve speed.

Method used

An improved Pyramid-YOLOv8 model is proposed, which improves the accuracy of feature extraction and disease detection by introducing a convolutional attention module, a pyramid-bottleneck module and an additional detection head.

Benefits of technology

It significantly improves the accuracy and efficiency of rice leaf plague detection, can capture the characteristic information of small targets more carefully, enhances the comprehensive understanding of the targets, and effectively suppresses background noise.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119478654A_ABST
    Figure CN119478654A_ABST
Patent Text Reader

Abstract

The invention relates to a field rice leaf blast detection method, device and equipment and a medium. The method comprises the following steps: acquiring a to-be-detected rice leaf image; a convolution attention module is introduced after a backbone feature extraction layer of a Pyrami d-YOLOv8 model, a bottleneck module in cross-stage partial network bottleneck modules is replaced by a pyramid-bottleneck module, a feature map with higher resolution is introduced into a feature fusion layer, and an additional detection head is constructed, so that the improved Pyrami d-YOLOv8 model is constructed. The construction of a rice leaf blast detection model is completed; carrying out disease detection on the to-be-detected rice leaf image by adopting a rice leaf blast detection model trained to a convergence state so as to determine a disease area and a disease grade of leaf blast in the to-be-detected rice leaf image; and spraying the disease area of the leaf blast disease by adopting the bactericide type and dosage corresponding to the disease grade of the leaf blast disease in the to-be-detected rice. The detection precision of the rice leaf blast can be improved, and the rice leaf blast can be prevented and controlled in time.
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 the field, a corresponding device, an electronic device and a computer-readable storage medium. Background Art

[0002] As one of the three major food crops in the world, rice is the main food for nearly half of the world's population. In China, rice, as a major food crop, contributes nearly half of the total grain output. However, rice is susceptible to infection by pathogens during its growth, posing a threat to grain production. Leaf blight is one of the important diseases that affect rice growth. The disease mostly occurs during the vegetative growth period of rice, causing characteristic spindle-shaped lesions on the leaves and necrosis at the leaf collar. If it is not controlled, it will not only seriously affect the yield and quality of rice, but may also pose a threat to China's and even the world's food economic security.

[0003] Traditional rice disease detection mainly relies on field surveys by plant protection experts, a method that is costly and has subjective results. Leaf blight 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 can lead to pesticide residues, which in turn cause environmental problems.

[0004] The traditional field survey crop disease detection method that relies on manual labor is costly and inefficient, and the detection results are somewhat subjective. The machine learning-based method realizes the automatic detection of crop diseases, but the detection effect of the model depends on the manual features extracted manually, and the generalization ability of disease detection in complex scenes is poor. In contrast, the target detection algorithm based on deep learning realizes the automatic extraction of features and can process large-scale data sets at the same time, which greatly improves the efficiency of crop disease detection. Among them, the two-stage detection model represented by R-CNN and the one-stage detection model represented by the YOLO series have made many progresses in crop disease detection. But they also have their own problems. For example. The two-stage detection model such as R-CNN, its recognition strategy based on regional proposals greatly reduces the real-time performance of the model. And the single-stage detection model such as the YOLO series also sacrifices the detection accuracy of the model in order to improve the detection speed of the model. At the same time, the balance between the accurate detection of small targets, the detection speed of the model and the complexity of the model is still a core problem that needs to be solved in the existing technology.

[0005] To sum up, the machine learning-based methods in the prior art are adapted to the problems that the detection effect of their models depends on manually extracted features, the generalization ability of disease detection in complex scenes is poor, and single-stage detection models such as the YOLO series sacrifice the detection accuracy of the models in order to improve the detection speed of the models. The applicant has made corresponding explorations to solve these problems. Summary of the invention

[0006] The purpose of the present application is to solve the above-mentioned problems and to 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 blight in the field 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 disease 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 construct an improved Pyrami d-YOLOv8 model to complete the construction of the rice leaf blast disease detection model;

[0011] 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 leaf blast in the rice leaf image to be detected;

[0012] The fungicide type and dosage corresponding to the disease grade of the leaf blast in the rice to be detected are used to spray the diseased area of ​​the leaf blast to complete the detection of rice leaf blast in the field.

[0013] Optionally, 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 leaf blast disease in the rice leaf image to be detected includes:

[0014] The backbone feature extraction layer in the rice leaf blast disease detection model is used to extract a feature map in 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, and these descriptors are mapped to the weight 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 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 leaf blast disease 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, and multi-scale information in the rice leaf image to be detected is captured 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 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 leaf blast disease 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, 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 generated by the backbone feature extraction layer;

[0022] The deep high-semantic information is transmitted through upsampling and cascading, and the spatial position information is supplemented by a bottom-up structure to efficiently utilize the feature information of different layers and improve the 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 blight diseased area with a fungicide type and dosage corresponding to the disease grade of the leaf blight in the rice to be detected comprises:

[0025] Inputting the rice leaf image to be detected into the rice leaf blight detection model that has been trained to convergence state to determine the diseased area of ​​leaf blight and its disease level;

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

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

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

[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 blight detection module, configured to respond to a field rice leaf blight detection instruction, and use a rice leaf blight detection model that has been trained to a convergence state to perform disease detection on the rice leaf image to be detected, so as to determine a diseased area and a disease level of leaf blight in the rice leaf image to be detected;

[0032] The leaf blight prevention and control module is configured to spray the leaf blight-affected area with the fungicide type and dosage corresponding to the disease level of the leaf blight in the rice to be detected, so as to complete the detection of rice leaf blight 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 prior art, the present application is aimed at the problems that the detection effect of the machine learning-based method in the prior art depends on the manual features extracted manually, 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. The present application includes but is not limited to the following beneficial effects:

[0036] First, the rice leaf blast detection model of the present application can capture the feature information of small targets more carefully and improve the 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 by supplementing the spatial position information through bottom-up feature fusion, it helps to improve the detection accuracy of small targets.

[0037] Secondly, the rice leaf blast detection model of the present application can more comprehensively capture the feature information related to the detection of small target diseases (such as leaf blast) by introducing the convolutional attention module (CBAM). These features can effectively filter out background noise and strengthen 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 the performance of target detection;

[0038] Thirdly, the pyramid-bottleneck module of the rice leaf blight 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 leaf blast detection model of the present application introduces a lightweight pyramid-bottleneck module in the feature extraction process, which effectively reduces the number of model parameters and the amount of calculation; in addition, the additional detection head uses a higher-resolution feature map to predict small targets, and in the process of feature fusion, the introduction of high-resolution feature maps effectively solves the problem of information loss during feature transmission. At the same time, under the synergy of the convolutional attention module (CBAM), the model can obtain more detailed information of the target and effectively suppress background noise in the image, thereby improving the detection accuracy of small targets (rice leaf 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 This is a schematic diagram of the process of the field rice leaf blast detection method in the embodiment of the present application;

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

[0043] Figure 3 A visual schematic 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 structure of a convolutional attention module in an embodiment of the present application;

[0046] Figure 6 This is a 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 principle block diagram of a field rice leaf blight detection device in an embodiment of the present application;

[0049] Fig. 9 It is a schematic diagram of the structure of the computer device in the embodiment of the present application. DETAILED DESCRIPTION

[0050] The embodiments of the present application are described in detail below, and examples of the embodiments 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 cannot be interpreted as limiting the present application.

[0051] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include 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 an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit 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 those generally understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.

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

[0054] The hardware referred to by the names such as "server", "client", and "service node" in this application is essentially an electronic device with the equivalent capabilities of a personal computer. It is a hardware device with 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. The computer program is stored in its memory, and the central processing unit calls 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 pointed out that the concept of "server" referred to in this application can also be extended to the case of server clusters. According to the network deployment principle understood by those skilled in the art, the servers should be logically divided. In physical space, these servers can be independent of each other but can be called through interfaces, or integrated into a physical computer or a set of computer clusters. Those skilled in the art should understand this flexibility, and should not use it to restrict 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 access.

[0057] The neural network models referenced or may be referenced in this application, unless expressly specified, can be deployed on a remote server and remotely called on the client, or can be deployed and directly called on a client with sufficient device capabilities. In some embodiments, when it runs on the client, its corresponding intelligence can 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 it is 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 the present application are described based on the same concept and thus present commonality to each other, unless otherwise specified, these methods can be independently executed. Similarly, for each embodiment disclosed in the present application, they are all proposed based on the same inventive concept, therefore, concepts with the same expression, and concepts that are appropriately changed for convenience despite different expressions, should be understood as equivalent.

[0060] Unless the mutually exclusive relationship between the embodiments to be disclosed in this application is explicitly stated, the relevant technical features involved in each embodiment can be cross-combined to flexibly construct a new embodiment, 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 solve certain deficiencies in the prior art. Those skilled in the art should be aware of this flexibility.

[0061] See also Figure 1 In one embodiment, the field rice leaf blight 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 blight 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, mobile terminal devices were used to capture disease images in different weather conditions (sunny, cloudy) and different growth stages (jointing, heading and booting). The data set was divided into training, validation and test sets in a ratio of 8:1:1, and LabelImg software was used for data annotation. Please refer to 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, introducing a convolutional attention module after the backbone feature extraction layer of the Pyramid-YOLOv8 model, replacing the bottleneck module in the cross-stage partial network bottleneck module 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 Pyramid-YOLOv8 model to complete the construction of the rice leaf blast disease detection model;

[0065] After obtaining the rice leaf image to be detected, the field rice leaf blight detection system can respond to the rice leaf blight 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 build an additional detection head to build an improved Pyramid-YOLOv8 model to complete the construction of the rice leaf blight 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 blight detection model is an improved Pyramid-YOLOv8 model, which is a target detection model based on the YOLO (You Only Look Once) framework.

[0066] In some embodiments, in the process of building a rice leaf 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 feature map with higher resolution 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 transmitted through upsampling and cascading, and then the spatial position information is supplemented by a bottom-up structure, so as to efficiently utilize the feature information of different layers and improve 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 a convolutional block attention module (CBAM), which includes a channel attention module (CAM) and a spatial attention module (SAM). The channel attention module (CAM) and the spatial attention module (SAM) in the convolutional attention module jointly 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 the 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 using 2 convolutions 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 will go 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 the deep network. 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, 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;

[0071] After the construction of the rice leaf blast disease detection model is completed, 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 leaf blast disease in the rice leaf image to be detected;

[0072] Further, the step of using 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 to determine the diseased area and disease level of the leaf blast disease in the rice leaf image to be detected includes:

[0073] Step S301, using the backbone feature extraction layer in the rice leaf blast disease detection model to extract a feature map from the rice leaf image to be detected, 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 weight 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 disease 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] From the above steps, we can see that by introducing the convolutional attention module (CBAM), the rice leaf blast detection model can more comprehensively capture the feature information related to the detection of small target diseases (such as leaf blast). These features can effectively filter out background noise and strengthen 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 the performance of target detection.

[0079] The step of using 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 to determine the diseased area and disease level of the 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, and multi-scale information in the rice leaf image to be detected is captured 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 detected, 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 the diseased area in the rice leaf image to be detected through feature fusion of the pyramid structure and improved bottleneck design, thereby improving the detection accuracy.

[0085] The step of using 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 to determine the diseased area and disease level of the leaf blast disease in the rice leaf image to be detected includes:

[0086] Step S1100, introducing a higher resolution feature map in 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 of 80×80, 40×40 and 20×20 are all generated by the backbone feature extraction layer;

[0087] Step S1200: The deep high-semantic information is transmitted by upsampling and cascading, and the spatial position information is supplemented by a bottom-up structure to efficiently utilize the feature information of different layers and improve the 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 (sizes of 80×80, 40×40, and 20×20) from the backbone feature extraction layer; these feature maps are all generated by the feature extraction layer of the backbone network and cover information of different scales.

[0089] The upsampling and cascading process upsamples the deeper high semantic features (such as the feature map with a size of 80×80) to restore its spatial resolution so that it can be fused with the feature map with a higher resolution (such as 160×160). By cascading these feature maps, the high semantic information is transferred to different scales.

[0090] The bottom-up structure refers to starting from the low layer (feature map with rich spatial information) and gradually fusing spatial position information to the high layer (feature map with rich semantic information). This method helps to supplement the spatial information in the feature map and improve the detection accuracy of small targets.

[0091] The introduction of an additional detection head is used to process the newly added 160×160 feature map. This detection head can better process high-resolution features and further improve the detection accuracy of small objects. With the specially designed detection head, the network can perform object detection at a higher resolution, which helps to 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 finely and the detection accuracy can be improved; by combining feature maps from different scales, the network can better integrate information at different levels, thereby improving the comprehensive understanding of the target; 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 and enhance the accuracy of the network in processing small targets by optimizing the resolution and fusion method of feature maps.

[0094] Step S40, spraying the diseased area of ​​rice leaf blast with a fungicide type and dosage corresponding to the disease grade 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 blight in the rice leaf image to be detected, the diseased area of ​​leaf blight is sprayed with a fungicide type and dosage corresponding to the disease level of leaf blight in the rice to be detected to complete the detection of rice leaf blight in the field, wherein the disease level of leaf blight includes preliminary disease, moderate disease and severe disease.

[0096] Further, the step of spraying the diseased area of ​​the leaf blight with the fungicide type and dosage corresponding to the disease grade of the leaf blight in the rice to be detected comprises:

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

[0098] Step S402, responding to the leaf blight prevention and control instruction, selecting the corresponding fungicide type and dosage according to the disease level of the leaf blight to spray the diseased area of ​​the leaf blight, and controlling the spraying frequency and time of the fungicide according to the disease level of the leaf blight until the rice leaves recover to a healthy state, so as to complete the detection of rice leaf blight in the field.

[0099] Specifically, the rice leaf image to be detected is input into the rice leaf blast detection model that has been trained and converged, which can identify the disease characteristics of leaf blast in the image, determine the diseased area of ​​leaf blast and its disease level; based on the detected disease level, generate prevention and control instructions, which include selecting the appropriate fungicide type and its dosage; select the appropriate fungicide according to the disease level. For example, a mild infection may only require a low dose of a broad-spectrum fungicide, while a severe infection may require a high-efficiency fungicide specifically for leaf blast; determine the spraying dose and frequency of the fungicide according to the disease level. For example, a mild infection may require spraying once every once in a while, while a severe infection may require more frequent treatment; spray the infected leaf area. Ensure that the fungicide covers the diseased area evenly; monitor changes in the diseased area regularly. If the disease does not improve significantly, the type, dosage or spraying frequency of the fungicide may need to be adjusted; continue to monitor the health of the rice leaves until the leaves return to a healthy state. Evaluate whether it is necessary to continue spraying fungicides or take other measures.

[0100] It can be seen from the above embodiments that the impact of rice leaf blast on crops can be reduced through intelligent detection and targeted prevention and control measures. The accuracy of the detection model and the effectiveness of the prevention and control measures are key factors in ensuring the health of rice. The use of efficient image recognition technology and appropriate agricultural practices can significantly improve the prevention and control effect of rice leaf blast.

[0101] In some embodiments, in order 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, YOLOv7) and Pyramid-YOLOv8 for comparison, 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 advantages in comprehensive performance compared with other mainstream target detection models. It has the highest accuracy (81.0%) and mAP (84.3%), and the F1 score (78.3%) of Pyramid-YOLOv8 is also the highest, which means that it has achieved the best balance between accuracy and recall. In addition, although slightly lower than YOLOv7x in processing speed (FPS), 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] In the process of further analyzing the model, we found that the single-stage detector has completely surpassed the two-stage detector (Faster-RCNN) in detection speed and accuracy. Specifically, the mAP@0.5 of YOLOv3-SPP, YOLOv5x and YOLOv7x are 2.5%, 3.8% and 8.4% higher than Faster-RCNN respectively, and the detection speed is also much higher than Faster-RCNN. Among them, YOLOv7x achieved the fastest detection speed with an FPS of 84.7. However, they have certain limitations in the number of model parameters and the amount of calculation. Among them, the number of parameters of YOLOv3-SPP is 2.41 times that of Faster-RCNN, and the amount of calculation is also increased by 2.1 times. YOLOv5x and YOLOv7x fuse the feature maps generated by 8x, 16x and 32x downsampling, which helps the model detect objects of different sizes while maintaining the detection accuracy of small objects. However, the detection head of YOLOv5x adopts a coupled approach, and the extracted features will be responsible for both the classification and regression tasks of the target, which makes YOLOv5x face the risk of overfitting during training on the rice disease dataset. Although YOLOv7x has the fastest detection speed among all models, it consumes 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 the target detection task, and its accuracy is between YOLOv5x and YOLOv7x. However, precisely because DETR uses the Transformer architecture, it is relatively more complex and computationally intensive in the prediction process, so its detection speed ranks last among the five single-stage detections.

[0106] As can be seen from the above table, the rice leaf blast detection model of the present application introduces a lightweight pyramid-bottleneck module in the feature extraction process, which effectively reduces the number of parameters and calculations of the model. In addition, the additional detection head uses a higher-resolution feature map to predict small targets, and in the process of feature fusion, the introduction of high-resolution feature maps effectively solves the problem of information loss during feature transmission. At the same time, under the synergy of the convolutional attention module (CBAM), the model can obtain more detailed information of the target and effectively suppress background noise in the image, thereby improving the detection accuracy of small targets.

[0107] It can be seen from the above embodiments that, compared with the prior art, the present application is aimed at the problems that the detection effect of the model based on machine learning in the prior art depends on the manual features extracted manually, 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. The present application includes but is not limited to the following beneficial effects:

[0108] First, the rice leaf blast detection model of the present application can capture the feature information of small targets more carefully and improve the 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 by supplementing the spatial position information through bottom-up feature fusion, it helps to improve the detection accuracy of small targets.

[0109] Secondly, the rice leaf blast detection model of the present application can more comprehensively capture the feature information related to the detection of small target diseases (such as leaf blast) by introducing the convolutional attention module (CBAM). These features can effectively filter out background noise and strengthen 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 the performance of target detection;

[0110] Thirdly, the pyramid-bottleneck module of the rice leaf blight 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 leaf blast detection model of the present application introduces a lightweight pyramid-bottleneck module in the feature extraction process, which effectively reduces the number of model parameters and the amount of calculation; in addition, the additional detection head uses a higher-resolution feature map to predict small targets, and in the process of feature fusion, the introduction of high-resolution feature maps effectively solves the problem of information loss during feature transmission. At the same time, under the synergy of the convolutional attention module (CBAM), the model can obtain more detailed information of the target and effectively suppress background noise in the image, thereby improving the detection accuracy of small targets (rice leaf blast).

[0112] See also Figure 8, a field rice leaf blight detection device provided to meet one of the purposes of the present application, includes an image acquisition module 1100, a detection model construction module 1200, a leaf blight detection module 1300 and a leaf blight 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 blight 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 construct an improved Pyrami d-YOLOv8 model. d-YOLOv8 model is used to complete the construction of the rice leaf blast detection model; the leaf blast detection module 1300 is configured to respond to the 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; the leaf blast prevention and control module 1400 is configured to use the fungicide type and dosage corresponding to the disease level of leaf blast in the rice to be detected to spray the diseased area of ​​leaf blast to complete the detection of rice leaf blast in the field.

[0113] Based on any embodiment of this application, please refer to Fig. 9 Another embodiment of the present application further provides an electronic device, which can be implemented by a computer device, such as Fig. 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 can 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 can 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 can understand that Fig. 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 those shown in the figure, or combine certain components, or have a different arrangement of components.

[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 above modules or 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 / submodules in the field rice leaf blast detection device of the present application, and the server can call the program code and data of the server 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, including 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 can understand 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, and the computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a computer-readable storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0118] The above description is only a partial implementation method 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 leaf blast detection model of the present application introduces a lightweight pyramid-bottleneck module in the feature extraction process, which effectively reduces the number of model parameters and the amount of calculation; in addition, the additional detection head uses a higher-resolution feature map to predict small targets, and in the process of feature fusion, the introduction of high-resolution feature maps effectively solves the problem of information loss during feature transmission. At the same time, under the synergy of the convolutional attention module (CBAM), the model can obtain more detailed information of the target and effectively suppress background noise in the image, thereby improving the detection accuracy of small targets.

Claims

1. A method for detecting rice leaf blight in the field, characterized in that: include: Acquire an image of a rice leaf to be detected; In response to the rice leaf blast disease detection model construction instruction, a convolutional attention module was introduced after the backbone feature extraction layer of the Pyrami d-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 disease 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 leaf blast in the rice leaf image to be detected; The fungicide type and dosage corresponding to the disease grade of the leaf blast in the rice to be detected are used to spray the diseased area of ​​the leaf blast to complete the detection of rice leaf blast 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 blight 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 leaf blight in the rice leaf image to be detected comprises: The backbone feature extraction layer in the rice leaf blast disease detection model is used to extract a feature map in 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, and these descriptors are mapped to the weight 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 step of using 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 to determine the diseased area and disease level of the leaf blast disease in the rice leaf image to be detected 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, and multi-scale information in the rice leaf image to be detected is captured to enhance the detection accuracy of diseases of different scales; 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.

4. The method for detecting rice leaf blast in the field according to claim 1, characterized in that: The step of using 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 to determine the diseased area and disease level of the leaf blast disease in the rice leaf image to be detected includes: 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, 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 generated by the backbone feature extraction layer; The deep high-semantic information is transmitted through upsampling and cascading, and the spatial position information is supplemented by a bottom-up structure to efficiently utilize the feature information of different layers and improve the detection accuracy.

5. 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.

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

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

8. A device for detecting rice leaf blight in the 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; a leaf blight detection module, configured to respond to a field rice leaf blight detection instruction, and use a rice leaf blight detection model that has been trained to a convergence state to perform disease detection on the rice leaf image to be detected, so as to determine a diseased area and a disease level of leaf blight in the rice leaf image to be detected; The leaf blight prevention and control module is configured to spray the leaf blight-affected area with the fungicide type and dosage corresponding to the disease level of the leaf blight in the rice to be detected, so as to complete the detection of rice leaf blight in the field.

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

10. 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 7 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

  • Method of detecting image, electronic device, and storage medium

    US20230102467A1

  • Road disease identification method and re-identification method, and related device

    WO2024139297A1