Crop disease detection method and device

Through drones collecting crop disease images and combining disease detection methods with deep learning models, the problem of time-consuming and labor-consuming traditional manual detection is solved, and the automation and efficient identification of crop diseases is achieved.

CN120032181BActive Publication Date: 2025-08-08BEIJING URBAN CONSTR INTELLIGENT CONTROL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510218429.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-26
Publication Date
2025-08-08
Estimated Expiration
2045-02-26

AI Technical Summary

Technical Problem

Traditional artificial crop disease detection methods are time-consuming and labor-intensive, and misjudgment and misjudgment occur frequently, making it difficult to meet the needs of large-scale farmland disease monitoring and management.

Method used

The drone is used to collect crop disease images, combine deep learning models for disease detection, obtain the initial area image through the drone, and input the disease detection model after normalization. The encoder based on the Transformer architecture is used for disease region identification and labeling.

Benefits of technology

It has realized the automation and intelligence of crop disease detection, improved the efficiency and accuracy of disease detection, and is suitable for rapid disease monitoring in large areas of farmland.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120032181B_ABST
    Figure CN120032181B_ABST
Patent Text Reader

Abstract

The present application provides a method and apparatus for detecting crop diseases, wherein the method comprises: obtaining at least one initial region image corresponding to a target detection region, wherein the target detection region includes vegetation to be detected; performing normalization processing on each initial region image to obtain an image of a region to be processed corresponding to each initial region image; inputting the image of the region to be processed into a disease detection model, obtaining at least one disease region identifier and a disease type corresponding to each disease region output by the disease detection model, wherein the disease detection model determines at least one reference disease region in the image of the region to be processed, identifies at least one target disease region in each reference disease region, marks the disease region identifier corresponding to each target disease region, and identifies the disease type of each target disease region. This method effectively improves the computational efficiency of disease detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and more particularly to a method for detecting crop diseases. The present invention also relates to a device for detecting crop diseases, a computing device, a computer-readable storage medium, and a computer program product. Background Art

[0002] In recent years, the impact of agricultural diseases on crop yield and quality has become increasingly significant. Early detection and accurate identification of diseases have become crucial for improving agricultural production efficiency. Traditional manual detection methods are time-consuming and labor-intensive, limited by the experience of inspectors, and prone to misjudgments and omissions, making them unsuitable for large-scale farmland disease monitoring and management. Summary of the Invention

[0003] In view of this, embodiments of the present application provide a method for detecting crop diseases. The present application also relates to a crop disease detection apparatus, a computing device, a computer-readable storage medium, and a computer program product to solve the above-mentioned problems existing in the prior art.

[0004] According to a first aspect of an embodiment of the present application, a method for detecting crop diseases is provided, comprising:

[0005] Acquiring at least one initial area image corresponding to a target detection area, wherein the target detection area includes vegetation to be detected;

[0006] Performing normalization processing on each initial region image to obtain a region image to be processed corresponding to each initial region image;

[0007] The image of the area to be processed is input into a disease detection model to obtain at least one disease area identifier and a disease type corresponding to each disease area output by the disease detection model, wherein the disease detection model determines at least one reference disease area in the image of the area to be processed, identifies at least one target disease area in each reference disease area, marks the disease area identifier corresponding to each target disease area, and identifies the disease type of each target disease area.

[0008] According to a second aspect of an embodiment of the present application, a crop disease detection device is provided, comprising:

[0009] an acquisition module configured to acquire at least one initial area image corresponding to a target detection area, wherein the target detection area includes vegetation to be detected;

[0010] A preprocessing module is configured to perform normalization processing on each initial region image to obtain a to-be-processed region image corresponding to each initial region image;

[0011] The detection module is configured to input the image of the area to be processed into a disease detection model, obtain at least one disease area identifier and the disease type corresponding to each disease area output by the disease detection model, wherein the disease detection model determines at least one reference disease area in the image of the area to be processed, identifies at least one target disease area in each reference disease area, marks the disease area identifier corresponding to each target disease area, and identifies the disease type of each target disease area.

[0012] According to a third aspect of an embodiment of the present application, a computing device is provided, including:

[0013] memory and processor;

[0014] The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the above method are implemented.

[0015] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores a computer program / instruction, and the computer program / instruction implements the steps of the above method when executed by a processor.

[0016] According to a fifth aspect of an embodiment of the present application, a computer program product is provided, comprising a computer program / instruction, which implements the steps of the above method when executed by a processor.

[0017] The crop disease detection method provided in the present application obtains at least one initial area image corresponding to a target detection area, wherein the target detection area includes vegetation to be detected; normalization processing is performed on each initial area image to obtain an image of an area to be processed corresponding to each initial area image; the image of the area to be processed is input into a disease detection model to obtain at least one disease area identifier and a disease type corresponding to each disease area output by the disease detection model, wherein the disease detection model determines at least one reference disease area in the image of the area to be processed, identifies at least one target disease area in each reference disease area, marks the disease area identifier corresponding to each target disease area, and identifies the disease type of each target disease area.

[0018] An embodiment of the present application implements the recognition of acquired images using a deep learning-based disease detection model. By identifying at least one reference disease area in the image of the area to be processed, and further identifying the target disease area from the reference disease area, disease screening is performed in a two-dimensional progressive manner, effectively improving the efficiency of query and calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1This is a flow chart of a crop disease detection method provided in one embodiment of the present application;

[0020] Figure 2 1 is a schematic structural diagram of an encoder provided in one embodiment of the present application;

[0021] Figure 3 This is a schematic diagram of the architecture of a disease detection system based on the Transformer architecture provided in one embodiment of the present application;

[0022] Figure 4 This is a structural diagram of a crop disease detection device provided in one embodiment of the present application;

[0023] Figure 5 This is a structural block diagram of a computing device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0024] The following description sets forth many specific details to facilitate a thorough understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the scope of the present application. Therefore, the present application is not limited to the specific implementations disclosed below.

[0025] The terms used in one or more embodiments of the present application are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of the present application. The singular forms "a", "the" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more associated listed items.

[0026] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present application, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0027] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0028] In this application, a crop disease detection method is provided. This application also relates to a crop disease detection device, a computing device, a computer-readable storage medium and a computer program product, which are described in detail one by one in the following embodiments.

[0029] Figure 1 A flow chart of a crop disease detection method according to an embodiment of the present application is shown, which specifically includes the following steps:

[0030] Step 102: Acquire at least one initial area image corresponding to a target detection area, wherein the target detection area includes vegetation to be detected.

[0031] The target detection area is the area where crop disease detection is required in the methods provided herein, and the crops to be detected are the crops grown in the target detection area. In practical applications, the target detection area may be farmland, and the vegetation to be detected may be the crops grown in the farmland. In another specific embodiment provided herein, the target detection area may be a flower garden, and the vegetation to be detected may be flowers planted in the flower garden.

[0032] The initial region image is at least one image captured for the target detection region. In practical applications, the target detection region may be quite large, and a single image may not capture the entire target detection region. Therefore, a region-by-region capture method can be used to obtain multiple initial region images corresponding to the target detection region. These multiple initial region images can be combined and stitched together to form the target detection region.

[0033] The crop disease detection method provided in the embodiment of the present application can be applied to a cloud server or to a client, which is not limited in this embodiment.

[0034] In a specific embodiment provided in the present application, obtaining at least one initial area image corresponding to the target detection area includes:

[0035] At least one initial area image corresponding to the target detection area is acquired based on an image acquisition device.

[0036] In this embodiment, the initial area image for the target detection area is obtained by an image acquisition device. In practical applications, at least one initial area image for the target detection area can be acquired by moving the image acquisition device.

[0037] In another specific embodiment provided by the present application, since the target detection area is usually a large area such as farmland, flowers, etc. that is inconvenient to enter. If the shooting is done manually with a handheld camera, there are problems such as inconvenient shooting and inappropriate shooting angles. With the development of drone technology, drones have also been widely used in agricultural production. Drones can cover a large area of farmland in a short period of time, and collect image data of the vegetation to be detected in real time through high-definition cameras, sensors, etc., thereby facilitating subsequent image processing for the target detection area. Based on this, in a specific embodiment provided by the present application, the image acquisition device includes a drone. Accordingly, obtaining at least one initial area image corresponding to the target detection area based on the image acquisition device includes:

[0038] Obtaining an electronic map of the target detection area;

[0039] generating flight information and image acquisition information of the UAV according to the electronic map;

[0040] sending the flight information and the image acquisition information to the drone, so that the drone flies based on the flight information and captures at least one initial area image corresponding to the target detection area based on the image acquisition information;

[0041] Receive at least one initial area image taken by the drone.

[0042] In this embodiment, in order to ensure that the drone can fully cover the target detection area, an electronic map corresponding to the target detection area can be obtained first. In actual applications, the electronic map can be obtained from a third-party map agency.

[0043] After obtaining an electronic map of the target detection area, the drone's flight information and image acquisition information can be generated based on this electronic map. Flight information can be understood as information about the drone during its flight mission, such as the flight navigation path, flight altitude, flight speed, and flight angle. Image acquisition information can be understood as the shooting parameters of the drone's camera, such as shutter interval, shooting resolution, and shooting mode.

[0044] After the flight information and image acquisition information are determined, the flight information and image acquisition information can be sent to the drone so that the drone can move according to the flight information. The target detection area is photographed based on the image acquisition information to obtain at least one initial area image.

[0045] Specifically, the drone is equipped with a GPS navigation and positioning module. After obtaining flight information, the drone's flight trajectory is controlled based on this GPS navigation and positioning module, using a parallel flight path to ensure coverage of the entire target detection area. At the same time, the drone's flight path spacing must also meet the requirements for subsequent image stitching to avoid information loss caused by missed images.

[0046] Considering the uneven distribution of leaves and mutual occlusion within the target detection area, the drone also uses multi-angle fusion, such as 45° and 90°. This reduces the interference of leaf occlusion on disease detection and improves recognition accuracy. To minimize the impact of lighting, shooting can be performed in the morning or afternoon when the light is softer, thereby improving the image quality of the initial area. Using multi-angle fusion not only effectively corrects distortion during shooting but also reduces the interference of leaf occlusion on disease detection.

[0047] To obtain clear images of crop diseases and symptoms, the flight altitude must be optimized based on the camera's machine parameters. To ensure image clarity, the drone's flight altitude is typically set based on the camera's resolution. For example, for a resolution of 1-2 cm / pixel, the flight altitude can be set between 1 and 10 meters. The camera's shutter speed can also be increased to reduce image blur caused by flight.

[0048] The drone carries a camera and flies over the target detection area based on flight information. The drone controls the camera to capture at least one image of the initial area using image acquisition information. The captured image can then be sent to a server running the method for processing.

[0049] In another specific embodiment provided in this application, the method further includes:

[0050] establishing a communication connection with the drone;

[0051] Accordingly, the receiving of at least one initial area image taken by the drone includes:

[0052] At least one initial area image taken by the drone is received based on the communication connection.

[0053] In the method provided in the embodiments of this application, to improve data processing efficiency, the WiFi module on the drone can be used to establish a communication connection with a server. The captured initial area image can then be sent to the server via the WiFi module for subsequent image processing. The server receives at least one initial area image captured by the drone over this communication connection. WiFi transmission has a high transmission rate, making it suitable for short-distance real-time image transmission and suitable for operating scenarios where the drone and server are within a certain range.

[0054] In actual applications, WiFi communication is only one of the implementation methods. In actual applications, other communication methods such as Bluetooth and infrared can also be used for data transmission. This is not limited in the method provided in this application, and the actual application shall prevail.

[0055] Step 104: performing normalization processing on each initial region image to obtain a region image to be processed corresponding to each initial region image.

[0056] After obtaining each initial area image, subsequent processing can be performed based on each initial area image. However, since each initial area image captured is an original image, it may have some impact on subsequent image processing due to reasons such as shooting angle and lighting. In addition, there may be a large number of repeated areas in each initial area image. Therefore, in order to make subsequent data processing more efficient, in the method provided in the embodiment of the present application, it is also necessary to normalize each initial area image to obtain the area image to be processed corresponding to each initial area image. Among them, the area image to be processed is the image after the initial area images are integrated, which is a global image of the target detection area.

[0057] In a specific embodiment provided in the present application, normalization processing is performed on each initial region image to obtain a region image to be processed corresponding to each initial region image, including:

[0058] Performing standardization processing on each initial region image to obtain a standardized region image corresponding to each initial region image;

[0059] Normalization is performed on the pixels in the standardized region image to obtain a region image to be processed corresponding to the standardized region image.

[0060] In the method provided in the embodiment of the present application, each initial region image is first normalized for subsequent processing, so that each initial region image is converted into its corresponding standardized region image. Specifically, normalizing each initial region image to obtain a standardized region image corresponding to each initial region image includes:

[0061] performing angle correction on each initial region image;

[0062] Non-local mean filtering is performed on the pixels in the rectified image to obtain a standardized regional image.

[0063] Specifically, since the images of each initial area may not be taken completely vertically due to the shooting angle, in the method provided in the embodiment of the present application, the angle can be adjusted by affine transformation to perform angle correction of the overhead shooting angle.

[0064] Since there are multiple similar and repeated areas in multiple initial area images, in the method provided in this application, non-local mean filtering and stitching can also be performed on the corrected image, and the weighted average of the pixels calculated by the similarity area is used to stitch the images of adjacent areas, thereby removing noise and reducing the impact of lighting and shooting angles.

[0065] After processing each initial region image, many standardized region images for the target detection region can be obtained. The standardized region image at this time is a global standardized image for the target detection region.

[0066] After obtaining the standardized region image, it needs to be normalized to adapt it to the subsequent disease detection model. Specifically, the pixel value of each pixel is normalized to the range [0, 1]. The mean value of the pixels in the training set is subtracted and divided by the standard deviation to obtain the processed region image corresponding to the standardized region image. Normalizing the pixels in the standardized region image can improve the robustness of the model.

[0067] Step 106: Input the image of the area to be processed into a disease detection model to obtain at least one disease area identifier and the disease type corresponding to each disease area output by the disease detection model, wherein the disease detection model determines at least one reference disease area in the image of the area to be processed, identifies at least one target disease area in each reference disease area, marks the disease area identifier corresponding to each target disease area, and identifies the disease type of each target disease area.

[0068] With the development of computer vision technology, deep learning algorithms have been widely used in image recognition. After the image acquisition device captures and processes the generated image of the target area, it can be combined with deep learning algorithms to analyze and process the image of the target area, realizing automated and intelligent disease detection.

[0069] Specifically, in the method provided in this application, a disease detection model is pre-trained. The model is based on a real-time Transformer architecture and can extract effective disease features based on the input image of the area to be processed, and output the disease area and disease category after identification.

[0070] In a specific embodiment provided in this application, the disease detection model includes an embedding layer, an encoder and a decoder;

[0071] Inputting the image of the area to be processed into a disease detection model, and obtaining at least one disease area identifier and a disease type corresponding to each disease area output by the disease detection model, including:

[0072] S1062: Input the image of the area to be processed into the embedding layer to obtain embedded image features.

[0073] In practical applications, disease detection models are used to process images. The image of the area to be processed must first be embedded. The embedding layer is a network layer used to convert the image into a feature vector that the model can process. The image of the area to be processed is based on human vision and is an objective reflection of the natural scene. For computers, this needs to be converted into a language that the computer can process. Specifically, the image of the area to be processed is fed into the embedding layer for processing, which then outputs the embedded image features.

[0074] S1064: Input the embedded image features into the encoder to obtain multi-scale fusion coding features output by the encoder.

[0075] After obtaining the embedded image features, they are input into the encoder for feature extraction to obtain the multi-scale fusion coding features output by the encoder.

[0076] In practical applications, drone images are unique due to their diverse perspectives, significant lighting variations, and complex background interference, making it difficult for conventional networks to extract key features of diseased crops and distinguish them from healthy crops. Therefore, the method provided in this application designs an encoder that combines an adaptive channel attention mechanism with a ResNet. This encoder enhances the ability to extract important features by dynamically adjusting the weights of feature map channels.

[0077] In a specific embodiment provided in this application, the encoder includes a multi-scale feature extraction unit and a feature fusion unit;

[0078] Inputting the embedded image features into the encoder to obtain the multi-scale fusion coding features output by the encoder includes:

[0079] Inputting the embedded image features into the multi-scale feature extraction unit to obtain multi-scale image features;

[0080] The multi-scale image features and the embedded image features are input into the feature fusion unit to obtain multi-scale fusion coding features corresponding to the embedded image features.

[0081] See also Figure 2 , Figure 2 A schematic diagram of the structure of an encoder provided in one embodiment of the present application is shown. The encoder includes a multi-scale feature extraction unit, which inputs embedded image features into the multi-scale feature extraction unit for processing to obtain multi-scale image features. The multi-scale image features and embedded image features are then input into a feature fusion unit, where an addition operation is performed to fuse them, thereby obtaining multi-scale fused coding features corresponding to the embedded image features.

[0082] Specifically, the embedded image features are input into the multi-scale feature extraction unit, where global average pooling is first performed. A fully connected layer is then used for channel dimensionality reduction. The ReLU activation function is then used to add nonlinearity, followed by a fully connected layer for dimensionality increase. Finally, after Sigmoid activation, multi-scale image features are output. The multi-scale image features and the original embedded image features are then input into the feature fusion unit for fusion, ultimately outputting the multi-scale fused encoding features.

[0083] S1066: Input the multi-scale fusion coding feature into the decoder to obtain at least one diseased area identifier and a disease type corresponding to each diseased area output by the decoder.

[0084] After obtaining the multi-scale fusion coding features, the multi-scale fusion coding features are input into the decoder to obtain the diseased area identifier corresponding to at least one diseased area output by the decoder and the disease type corresponding to the diseased area.

[0085] In a specific embodiment provided in this application, the design of the encoder mainly includes a query unit, a mask generation unit, a mask attention unit, and a label assignment unit;

[0086] Inputting the multi-scale fusion coding features into the decoder, and obtaining at least one diseased area identifier and a disease type corresponding to each diseased area output by the decoder, including:

[0087] Inputting the multi-scale fusion coding feature into the query unit to obtain the disease area feature of at least one target disease area output by the query unit;

[0088] Inputting each diseased area feature into the mask generating unit to obtain mask feature information corresponding to each diseased area feature output by the mask generating unit;

[0089] Inputting each diseased area feature and each mask feature information into the mask attention unit, and obtaining the diseased area identifier corresponding to each target diseased area output by the mask attention unit;

[0090] The characteristics of each diseased area are input into the label assignment unit to obtain the disease type corresponding to each target diseased area.

[0091] The query unit is mainly used to generate multiple query features, each of which represents a potential disease area. In the specific embodiment provided in this application, a preset number of features most relevant to disease characteristics are selected from the feature sequence output by the encoder as query feature information. After these query feature information are processed by the decoder, they are mapped into confidence levels and bounding boxes according to the prediction head. Specifically, the query unit includes a segmentation module, a global module, and a local module;

[0092] Inputting the multi-scale fusion coding feature into the query unit to obtain the diseased area feature of at least one target diseased area output by the query unit includes:

[0093] Inputting the multi-scale fusion coding feature into the segmentation module to obtain a plurality of multi-scale coding sub-features;

[0094] Inputting a plurality of multi-scale coding sub-features into the global module to obtain a reference disease region feature corresponding to at least one reference disease region determined by the global module based on global feature information;

[0095] The features of each reference diseased area are input into the local module to obtain the diseased area features of at least one target diseased area determined by the local module based on the local feature information.

[0096] Furthermore, the query unit specifically includes a segmentation module, a global module and a local module.

[0097] The segmentation module is used to divide the multi-scale fusion coding features output by the encoder into multiple different regions, where each region contains a preset number of feature vectors. Then multiple multi-scale coding sub-features are obtained through linear mapping. For example, the multi-scale fusion coding features Divided into S*S different areas, each area includes HW / S 2 feature vectors, that is, the feature of each region is Then, through linear mapping, we get ,in, , They are The projection weight of .

[0098] Subsequently, multiple multi-scale encoding sub-features are input into the global module. In the global module, a coarse-grained screening is performed to extract most of the features that are irrelevant to the disease characteristics, and only the features with high correlation with the disease characteristics are retained. Specifically, the global module calculates and Adjacency matrix of correlation , then take the first k reference disease area features .in, , .

[0099] After the coarse-grained screening of the global module, the reference diseased area features can be further input into the local module for fine-grained screening using features and attention mechanisms to achieve more accurate feature interaction. Aggregate the key-value pairs of the first k feature areas, and then perform the aggregation on the key-value pairs and Calculate attention and obtain the diseased area features of at least one target diseased area O .in, , . Disease area characteristics , It is an enhancement item, the purpose of which is to enhance local context information.

[0100] After being processed by the selection unit, the most relevant features of the diseased area are obtained, and the features of each diseased area are input into the mask generation unit. The mask generation unit is used to generate a set of mask feature information for the attention mechanism. M i ,These mask feature information emphasizes or ignores the features of specific areas through the ,selfattention mechanism. By generating mask feature information, ,the model can focus on more relevant areas during the attention ,process, which helps to detect targets more accurately.

[0101] After obtaining the features of each diseased area and each compressed feature information, the two are input into the mask attention unit for fusion to obtain the diseased area identification corresponding to each target diseased area. Specifically, the diseased area features output by the selection unit O And the mask feature information generated by the mask generation unit M i , and input them together into the mask attention unit for feature fusion to obtain the fusion result Then, after the query and encoder feature interaction, the cross-attention module obtains context information and further enhances the features. The enhanced features are processed through a feedforward neural network for category prediction and bounding box regression, thereby obtaining the diseased area identification corresponding to each target diseased area.

[0102] The above information is input into the label assignment unit for processing. Based on the disease detection model's model task, the target disease area is assigned a corresponding disease type. If the disease detection model uses a one-to-many label assignment mechanism, labels for multiple diseases included in the input image are output. If the disease detection model uses a one-to-one label assignment mechanism, the label for the specific disease included in the input image is output.

[0103] Finally, the disease detection model will output the disease area identification (such as a detection box) corresponding to the detected target disease area, and output the disease type of each target disease area.

[0104] The method provided in the embodiments of this application is applied to the field of drone-based crop disease detection. Using drones as a carrier for image acquisition and processing with deep learning models provides a novel solution for crop disease detection. Drones offer the advantages of flexibility and rapid coverage of large farmland areas, enabling inspections of large tracts of farmland in a short period of time. Equipped with high-definition cameras, drones can capture high-resolution image data in real time, laying a solid foundation for subsequent disease identification.

[0105] In addition, this application also designs a disease detection model based on a real-time Transformer architecture. After preprocessing, the data collected by the drone is input into the disease detection model. Feature extraction is performed through an encoder combined with an adaptive channel attention mechanism and ResNet. In the encoder, the target disease area is screened out, marked, and identified in both coarse-grained and fine-grained dimensions, effectively improving the efficiency of query and calculation.

[0106] See also Figure 3 , Figure 3 FIG shows an architecture diagram of a disease detection system based on a Transformer architecture provided in an embodiment of the present application. Figure 3 As shown, the system includes an image collector, a data transmitter and a data processing server.

[0107] For example, the image acquisition system uses a drone equipped with a high-definition camera and a GPS navigation and positioning module. Based on a pre-set flight trajectory, the GPS navigation and positioning module controls the drone's flight path to meet the coverage requirements for image stitching. The high-definition camera also captures images using multi-angle fusion. This not only effectively corrects for errors during capture but also reduces interference from crop leaf obstruction on disease detection.

[0108] The data transmitter needs to consider the real-time performance, stability, and transmission range of the data transmission. In the method provided by this application, a WiFi module is selected for wireless communication. The advantages of the WiFi module are high transmission rate and suitability for short-distance real-time image transmission, which is suitable for scenarios where the drone and server operate within a suitable range.

[0109] The data processing server can be a cloud server or an end server. After receiving the image sent by the drone, the data processing server performs image preprocessing operations through the image preprocessing unit, mainly including non-local mean filtering, overhead angle correction, data standardization and normalization, etc.

[0110] The processed image is then input into the disease detection model for image processing. The disease detection model is based on the Transformer architecture and includes an encoder and a decoder. After recognition and processing by the disease detection model, the disease area identification and disease type corresponding to the target disease area are obtained and output through the detection result output unit.

[0111] Corresponding to the above method embodiment, the present application also provides an embodiment of a crop disease detection device, Figure 4 FIG. 1 shows a schematic diagram of the structure of a crop disease detection device provided by an embodiment of the present application. Figure 4 As shown, the device includes:

[0112] An acquisition module 402 is configured to acquire at least one initial area image corresponding to a target detection area, wherein the target detection area includes vegetation to be detected;

[0113] A pre-processing module 404 is configured to perform normalization processing on each initial region image to obtain a region image to be processed corresponding to each initial region image;

[0114] The detection module 406 is configured to input the image of the area to be processed into a disease detection model, obtain at least one disease area identifier and the disease type corresponding to each disease area output by the disease detection model, wherein the disease detection model determines at least one reference disease area in the image of the area to be processed, identifies at least one target disease area in each reference disease area, marks the disease area identifier corresponding to each target disease area, and identifies the disease type of each target disease area.

[0115] Optionally, the pre-processing module 404 is further configured to:

[0116] Performing standardization processing on each initial region image to obtain a standardized region image corresponding to each initial region image;

[0117] Normalization is performed on the pixels in the standardized region image to obtain a region image to be processed corresponding to the standardized region image.

[0118] Optionally, the pre-processing module 404 is further configured to:

[0119] performing angle correction on each initial region image;

[0120] Non-local mean filtering is performed on the pixels in the rectified image to obtain a standardized regional image.

[0121] Optionally, the disease detection model includes an embedding layer, an encoder, and a decoder;

[0122] The detection module 406 is further configured to:

[0123] Inputting the image of the area to be processed into the embedding layer to obtain embedded image features;

[0124] Inputting the embedded image features into the encoder to obtain multi-scale fusion coding features output by the encoder;

[0125] The multi-scale fusion coding feature is input into the decoder to obtain at least one diseased area identifier and a disease type corresponding to each diseased area output by the decoder.

[0126] Optionally, the encoder includes a multi-scale feature extraction unit and a feature fusion unit;

[0127] The detection module 406 is further configured to:

[0128] Inputting the embedded image features into the multi-scale feature extraction unit to obtain multi-scale image features;

[0129] The multi-scale image features and the embedded image features are input into the feature fusion unit to obtain multi-scale fusion coding features corresponding to the embedded image features.

[0130] Optionally, the encoder includes a query unit, a mask generation unit, a mask attention unit, and a label assignment unit;

[0131] The detection module 406 is further configured to:

[0132] Inputting the multi-scale fusion coding feature into the query unit to obtain the disease area feature of at least one target disease area output by the query unit;

[0133] Inputting each diseased area feature into the mask generating unit to obtain mask feature information corresponding to each diseased area feature output by the mask generating unit;

[0134] Inputting each diseased area feature and each mask feature information into the mask attention unit, and obtaining the diseased area identifier corresponding to each target diseased area output by the mask attention unit;

[0135] The characteristics of each diseased area are input into the label assignment unit to obtain the disease type corresponding to each target diseased area.

[0136] Optionally, the query unit includes a segmentation module, a global module and a local module;

[0137] The detection module 406 is further configured to:

[0138] Inputting the multi-scale fusion coding feature into the segmentation module to obtain a plurality of multi-scale coding sub-features;

[0139] Inputting a plurality of multi-scale coding sub-features into the global module to obtain a reference disease region feature corresponding to at least one reference disease region determined by the global module based on global feature information;

[0140] The features of each reference diseased area are input into the local module to obtain the diseased area features of at least one target diseased area determined by the local module based on the local feature information.

[0141] Optionally, the acquisition module 402 is further configured to:

[0142] At least one initial area image corresponding to the target detection area is acquired based on an image acquisition device.

[0143] Optionally, the image acquisition device includes a drone;

[0144] The acquisition module 402 is further configured to:

[0145] Obtaining an electronic map of the target detection area;

[0146] generating flight information and image acquisition information of the UAV according to the electronic map;

[0147] sending the flight information and the image acquisition information to the drone, so that the drone flies based on the flight information and captures at least one initial area image corresponding to the target detection area based on the image acquisition information;

[0148] Receive at least one initial area image taken by the drone.

[0149] Optionally, the device further includes a communication module configured to:

[0150] establishing a communication connection with the drone;

[0151] Accordingly, the acquisition module 402 is further configured to:

[0152] At least one initial area image taken by the drone is received based on the communication connection.

[0153] The device provided in the embodiments of this application is applied to the field of drone-based crop disease detection. Using drones as a carrier for image acquisition and processing with deep learning models, it provides a new solution for crop disease detection. Drones offer the advantages of flexibility and rapid coverage of large farmland areas, enabling inspections of large tracts of farmland in a short period of time. Equipped with high-definition cameras, drones can capture high-resolution image data in real time, laying a solid foundation for subsequent disease identification.

[0154] In addition, this application also designs a disease detection model based on a real-time Transformer architecture. After preprocessing, the data collected by the drone is input into the disease detection model. Feature extraction is performed through an encoder combined with an adaptive channel attention mechanism and ResNet. In the encoder, the target disease area is screened out, marked, and identified in both coarse-grained and fine-grained dimensions, effectively improving the efficiency of query and calculation.

[0155] The above is a schematic diagram of a crop disease detection device according to this embodiment. It should be noted that the technical solution of this crop disease detection device and the technical solution of the aforementioned crop disease detection method are based on the same concept. For details not described in detail in the technical solution of the crop disease detection device, please refer to the description of the technical solution of the aforementioned crop disease detection method.

[0156] Figure 5 The block diagram shows a structure of a computing device 500 according to an embodiment of the present application. The components of the computing device 500 include, but are not limited to, a memory 510 and a processor 520. The processor 520 is connected to the memory 510 via a bus 530, and a database 550 is used to store data.

[0157] The computing device 500 also includes an access device 540 that enables the computing device 500 to communicate via one or more networks 560. Examples of such networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 540 may include one or more of any type of network interface (e.g., a network interface card (NIC)) whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.

[0158] In one embodiment of the present application, the above components of the computing device 500 and Figure 5 Other components not shown in the figure may also be connected to each other, for example, via a bus. Figure 5 The computing device structure block diagram shown is for illustrative purposes only and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as needed.

[0159] Computing device 500 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, personal digital assistant, laptop computer, notebook computer, netbook computer, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smartwatch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or personal computer (PC). Computing device 500 can also be a mobile or stationary server.

[0160] The processor 520 is configured to execute the following computer program / instructions, which, when executed by the processor, implement the steps of the above-mentioned crop disease detection method.

[0161] The above is a schematic diagram of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the aforementioned crop disease detection method are based on the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the aforementioned crop disease detection method.

[0162] An embodiment of the present specification further provides a computer-readable storage medium storing a computer program / instruction. When the computer program / instruction is executed by a processor, the steps of the above-mentioned crop disease detection method are implemented.

[0163] The above is a schematic diagram of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium is based on the same concept as the technical solution of the aforementioned crop disease detection method. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the aforementioned crop disease detection method.

[0164] An embodiment of the present specification further provides a computer program product, comprising a computer program / instruction, which implements the steps of the above-mentioned crop disease detection method when executed by a processor.

[0165] The above is a schematic diagram of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product and the technical solution of the aforementioned crop disease detection method are based on the same concept. For details not described in detail in the technical solution of the computer program product, please refer to the description of the technical solution of the aforementioned crop disease detection method.

[0166] The foregoing description describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0167] The computer instructions include computer program code, which may be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium may include any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium. It should be noted that the content of the computer-readable medium may be appropriately increased or decreased based on the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media does not include electric carrier signals and telecommunication signals.

[0168] It should be noted that for the aforementioned method embodiments, for ease of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.

[0169] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0170] The preferred embodiments of the present application disclosed above are intended only to help illustrate the present application. The optional embodiments do not describe all details in detail, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made based on the content of this application. This application selects and describes these embodiments in detail in order to better explain the principles and practical applications of this application, so that those skilled in the art can better understand and utilize this application. This application is limited only by the claims and their full scope and equivalents.

Claims

1. A method for detecting crop diseases, characterized in that: include: Acquiring at least one initial area image corresponding to a target detection area, wherein the target detection area includes vegetation to be detected; Performing normalization processing on each initial region image to obtain a region image to be processed corresponding to each initial region image; Inputting the image of the area to be processed into a disease detection model, obtaining at least one disease area identifier and a disease type corresponding to each disease area output by the disease detection model, wherein the disease detection model determines at least one reference disease area in the image of the area to be processed, identifies at least one target disease area in each reference disease area, marks the disease area identifier corresponding to each target disease area, and identifies the disease type of each target disease area; The disease detection model includes an embedding layer, an encoder and a decoder, and the encoder includes a multi-scale feature extraction unit and a feature fusion unit; Inputting the image of the area to be processed into a disease detection model, and obtaining at least one disease area identifier and a disease type corresponding to each disease area output by the disease detection model, including: Inputting the image of the area to be processed into the embedding layer to obtain embedded image features; Inputting the embedded image features into the multi-scale feature extraction unit to obtain multi-scale image features; inputting the multi-scale image features and the embedded image features into the feature fusion unit to obtain multi-scale fusion coding features corresponding to the embedded image features; The multi-scale fusion coding feature is input into the decoder to obtain at least one diseased area identifier and a disease type corresponding to each diseased area output by the decoder.

2. The method according to claim 1, wherein Normalization processing is performed on each initial region image to obtain a region image to be processed corresponding to each initial region image, including: Performing standardization processing on each initial region image to obtain a standardized region image corresponding to each initial region image; Normalization is performed on the pixels in the standardized region image to obtain a region image to be processed corresponding to the standardized region image.

3. The method according to claim 2, wherein Performing standardization processing on each initial region image to obtain a standardized region image corresponding to each initial region image includes: performing angle correction on each initial region image; Non-local mean filtering is performed on the pixels in the rectified image to obtain a standardized regional image.

4. The method according to claim 1, wherein The encoder includes a query unit, a mask generation unit, a mask attention unit, and a label assignment unit; Inputting the multi-scale fusion coding features into the decoder, and obtaining at least one diseased area identifier and a disease type corresponding to each diseased area output by the decoder, including: Inputting the multi-scale fusion coding feature into the query unit to obtain the disease area feature of at least one target disease area output by the query unit; Inputting each diseased area feature into the mask generating unit to obtain mask feature information corresponding to each diseased area feature output by the mask generating unit; Inputting each diseased area feature and each mask feature information into the mask attention unit, and obtaining the diseased area identifier corresponding to each target diseased area output by the mask attention unit; The characteristics of each diseased area are input into the label assignment unit to obtain the disease type corresponding to each target diseased area.

5. The method according to claim 4, wherein The query unit includes a segmentation module, a global module and a local module; Inputting the multi-scale fusion coding feature into the query unit to obtain the diseased area feature of at least one target diseased area output by the query unit includes: Inputting the multi-scale fusion coding feature into the segmentation module to obtain a plurality of multi-scale coding sub-features; Inputting a plurality of multi-scale coding sub-features into the global module to obtain a reference disease region feature corresponding to at least one reference disease region determined by the global module based on global feature information; The features of each reference diseased area are input into the local module to obtain the diseased area features of at least one target diseased area determined by the local module based on the local feature information.

6. The method according to claim 1, wherein Acquiring at least one initial area image corresponding to the target detection area includes: At least one initial area image corresponding to the target detection area is acquired based on an image acquisition device.

7. The method according to claim 6, wherein The image acquisition device includes a drone; Acquiring at least one initial area image corresponding to the target detection area based on an image acquisition device includes: Obtaining an electronic map of the target detection area; generating flight information and image acquisition information of the UAV according to the electronic map; sending the flight information and the image acquisition information to the drone, so that the drone flies based on the flight information and captures at least one initial area image corresponding to the target detection area based on the image acquisition information; Receive at least one initial area image taken by the drone.

8. The method according to claim 7, wherein Also includes: establishing a communication connection with the drone; Accordingly, the receiving of at least one initial area image taken by the drone includes: At least one initial area image taken by the drone is received based on the communication connection.

9. A crop disease detection device, characterized in that: include: an acquisition module configured to acquire at least one initial area image corresponding to a target detection area, wherein the target detection area includes vegetation to be detected; A preprocessing module is configured to perform normalization processing on each initial region image to obtain a to-be-processed region image corresponding to each initial region image; a detection module configured to input the image of the area to be processed into a disease detection model, obtain at least one disease area identifier and a disease type corresponding to each disease area output by the disease detection model, wherein the disease detection model determines at least one reference disease area in the image of the area to be processed, identifies at least one target disease area in each reference disease area, marks the disease area identifier corresponding to each target disease area, and identifies the disease type of each target disease area; The disease detection model includes an embedding layer, an encoder and a decoder, and the encoder includes a multi-scale feature extraction unit and a feature fusion unit; Inputting the image of the area to be processed into a disease detection model, and obtaining at least one disease area identifier and a disease type corresponding to each disease area output by the disease detection model, including: Inputting the image of the area to be processed into the embedding layer to obtain embedded image features; Inputting the embedded image features into the multi-scale feature extraction unit to obtain multi-scale image features; inputting the multi-scale image features and the embedded image features into the feature fusion unit to obtain multi-scale fusion coding features corresponding to the embedded image features; The multi-scale fusion coding feature is input into the decoder to obtain at least one diseased area identifier and a disease type corresponding to each diseased area output by the decoder.

10. A computing device, characterized in that include: memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer program / instructions are executed by the processor, the steps of the method according to any one of claims 1 to 8 are implemented.

11. A computer-readable storage medium storing a computer program / instruction, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

12. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Multi-source pavement disease identification method based on language and image large model

    CN119107447A

  • BEV-based accurate calculation method for road disease area ratio

    CN119515948A