Crop disease detection method and device

Through deep learning technology and drones to collect images, identify and mark crop disease areas, the problem of traditional manual detection is solved, and the problem of time-consuming, labor-intensive and easy to misjudgment is achieved, and the disease detection is suitable for large-scale farmland disease monitoring and management.

CN120032181AActive Publication Date: 2025-05-23BEIJING URBAN CONSTR INTELLIGENT CONTROL TECH CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

Traditional manual detection of crop diseases is time-consuming and labor-intensive, and is prone to misjudgment and misjudgment, making it difficult to meet the needs of large-scale farmland disease monitoring and management.

Method used

Deep learning technology is used to develop disease detection models, collect crop images through drones, perform image preprocessing and feature extraction, and identify and mark disease areas and their types.

Benefits of technology

It realizes the rapid and accurate identification of crop diseases, improves the efficiency and accuracy of disease detection, and is suitable for large-scale farmland disease monitoring and management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120032181A_ABST
    Figure CN120032181A_ABST
Patent Text Reader

Abstract

The invention provides a crop disease detection method and device, and the method comprises the steps: obtaining at least one initial region image corresponding to a target detection region which comprises to-be-detected vegetation; performing normalization processing on each initial region image to obtain a to-be-processed region image corresponding to each initial region image; the to-be-processed area image is input to a disease detection model, at least one disease area identifier output by the disease detection model and a disease type corresponding to each disease area are obtained, the disease detection model determines at least one reference disease area in the to-be-processed area image, and the at least one reference disease area corresponds to the at least one reference disease area; and identifying at least one target disease area in each reference disease area, marking a disease area identifier corresponding to each target disease area, and identifying a disease type of each target disease area. Through the method, the calculation efficiency of disease detection is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method for detecting crop diseases. The present application 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 diseases on crop yield and quality in agricultural production has become increasingly significant. Early detection and accurate identification of diseases have become an important part of improving agricultural production efficiency. Traditional manual detection methods are time-consuming and labor-intensive, and are limited by the experience of testers. There is a possibility of misjudgment and omission, which is not conducive to large-scale farmland disease monitoring and management. Summary of the invention

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

[0004] According to a first aspect of an embodiment of the present application, a crop disease detection method is provided, comprising: Acquire 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; 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.

[0005] According to a second aspect of an embodiment of the present application, a crop disease detection device is provided, comprising: An acquisition module 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; A preprocessing module 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; 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.

[0006] According to a third aspect of an embodiment of the present application, a computing device is provided, including: 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 programs / instructions are executed by the processor, the steps of the above method are implemented.

[0007] 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 steps of the above method are implemented when the computer program / instruction is executed by a processor.

[0008] 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.

[0009] The crop disease detection method provided by 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; normalizes each initial area image to obtain an image of an area to be processed corresponding to each initial area image; inputs the image of the area to be processed into a disease detection model to obtain at least one disease area identifier output by the disease detection model and a disease type corresponding to each disease area, 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.

[0010] An embodiment of the present application implements the recognition of acquired images by 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, and performing disease screening in a two-dimensional progressive manner, thereby effectively improving the efficiency of query and calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 is a flow chart of a crop disease detection method provided by an embodiment of the present application; Figure 2 is a schematic diagram of the structure of an encoder provided in an embodiment of the present application; Figure 3 is a schematic diagram of the architecture of a disease detection system based on a Transformer architecture provided in one embodiment of the present application; Figure 4 is a structural schematic diagram of a crop disease detection device provided in one embodiment of the present application; Figure 5 It is a structural block diagram of a computing device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0012] Many specific details are described in the following description to facilitate a full 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 connotation of the present application, so the present application is not limited by the specific implementation disclosed below.

[0013] The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms of "a", "said" 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 other meanings. 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.

[0014] 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, these information should not be limited to these terms. These terms are only used to distinguish the same type of information 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".

[0015] 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 relevant laws, regulations and standards in the relevant regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0016] In the present application, a crop disease detection method is provided. The present 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.

[0017] Figure 1 A flow chart of a crop disease detection method provided according to an embodiment of the present application is shown, which specifically includes the following steps: 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.

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

[0019] The initial region image is at least one image collected for the target detection region. In practical applications, the target detection region may be relatively large, and one image may not be able to capture the entire target detection region. Therefore, a method of shooting in different regions can be adopted to obtain multiple initial region images corresponding to the target detection region. Multiple initial region images can be combined and spliced ​​into the target detection region.

[0020] 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.

[0021] In a specific implementation provided in the present application, obtaining 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.

[0022] 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.

[0023] In another specific implementation provided by the present application, the target detection area is usually a large area such as farmland and flowers that are inconvenient to enter. If the camera is taken 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., so as to facilitate subsequent image processing for the target detection area. Based on this, in a specific implementation 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: 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.

[0024] 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.

[0025] After obtaining the electronic map of the target detection area, the flight information and image acquisition information of the drone can be generated based on the electronic map. Flight information can be understood as the information of the drone when performing a flight mission, such as flight navigation path, flight altitude, flight speed, flight angle, etc. Image acquisition information can be understood as the shooting parameters of the camera installed on the drone, such as shutter shooting interval, shooting clarity, shooting mode, etc.

[0026] After the flight information and the image acquisition information are determined, the flight information and the 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 according to the image acquisition information to obtain at least one initial area image.

[0027] Specifically, the drone is equipped with a GPS navigation and positioning module. After obtaining flight information, the flight trajectory of the drone can be controlled according to the GPS navigation and positioning module, and a parallel line flight trajectory is adopted to ensure that the entire target detection area can be covered. At the same time, the flight interval of the drone must also meet the subsequent image stitching requirements to avoid information loss caused by missing images.

[0028] Considering the uneven distribution of leaves of the vegetation to be detected in the target detection area and the mutual occlusion between leaves, the drone also uses multi-angle fusion, such as 45°, 90°, etc. to reduce the interference of leaf occlusion on disease detection and improve recognition accuracy. In order to avoid the influence of light, you can also choose to shoot in the morning or afternoon when the light is softer, so as to improve the image quality of the initial area image. The use of multi-angle fusion can not only effectively correct the distortion in shooting, but also reduce the interference of leaf occlusion on disease detection.

[0029] In order to obtain clear images of crop diseases, the flight altitude also needs to be optimized according to the machine parameters of the camera. In order to ensure the clarity of the image, the flight altitude of the drone is usually set according to the resolution of the camera on the drone. For example, for a resolution of 1-2cm / pixel, the flight altitude can be set to 1-10 meters. At the same time, the shutter speed of the camera can be increased to reduce image blur caused by flight.

[0030] The drone carries a camera and flies over the target detection area according to the flight information, and controls the camera to capture at least one initial area image through the image acquisition information. Subsequently, the captured image can be sent to the server running the method for processing.

[0031] In another specific embodiment provided in the present application, the method further comprises: establishing a communication connection with the drone; Accordingly, the receiving 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.

[0032] In the method provided in the embodiment of the present application, in order to improve the efficiency of data processing, the WiFi module on the drone can be used to establish a communication connection with the server, and the collected initial area image can be sent to the server through the WiFi module for subsequent image processing. The server side receives at least one initial area image taken by the drone based on the communication connection. The transmission rate of WiFi transmission is relatively high, which is suitable for short-distance real-time image transmission and is adapted to the operation scenario of the drone and the server within a certain range.

[0033] 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.

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

[0035] After obtaining each initial area image, subsequent processing can be performed based on each initial area image. However, since each initial area image taken is a raw image, it may have some impact on subsequent image processing due to shooting angle, lighting and other reasons. In addition, there may be a large number of repeated areas in multiple initial area images. 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 image of the area to be processed corresponding to each initial area image. Among them, the image of the area to be processed is the image after the integration of each initial area image, which is a global image of the target detection area.

[0036] In a specific implementation 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: 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.

[0037] In the method provided in the embodiment of the present application, each initial region image is first standardized for subsequent processing, so that each initial region image is converted into a corresponding standardized region image. Specifically, the initial region images are standardized to obtain the standardized region images corresponding to each initial region image, including: 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.

[0038] 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, so as to perform angle correction of the overhead shooting angle.

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

[0040] After processing each initial region image, a number of standardized region images for the target detection region may be obtained. The standardized region image at this time is a global standardized image for the target detection region.

[0041] After obtaining the standardized regional image, in order to adapt the subsequent disease detection model, the standardized regional image needs to be normalized. Specifically, the pixel value of each pixel is normalized to the interval [0, 1], the mean value of the image pixels in the training set is subtracted and divided by the standard deviation, so as to obtain the processed regional image corresponding to the standardized regional image. After the pixels in the standardized regional image are normalized, the robustness of the model can be improved.

[0042] 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 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.

[0043] With the development of computer vision technology, deep learning algorithms have been widely used in image recognition. After the image acquisition device collects and processes the generated image of the area to be processed, the deep learning algorithm can also be used to analyze and process the image of the area to be processed to achieve automated and intelligent disease detection.

[0044] Specifically, in the method provided in the present 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 diseased area and disease category after identification.

[0045] In a specific embodiment provided in the present application, the disease detection model includes an embedding layer, an encoder and a decoder; Inputting the image of the area to be processed into a disease detection model, obtaining at least one disease area identifier output by the disease detection model and a disease type corresponding to each disease area, including: S1062: Input the image of the area to be processed into the embedding layer to obtain embedded image features.

[0046] In practical applications, the disease detection model is used to process images. First, the image of the area to be processed must be embedded. The embedding layer is a network layer used to convert the image into a feature vector that can be processed by the model. The image of the area to be processed is an image based on human vision and is an objective reflection of natural scenery. For computers, it needs to be converted into a language that can be processed by computers, that is, the image of the area to be processed is input into the embedding layer for processing to obtain the embedded image features output by the embedding layer.

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

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

[0049] In practical applications, the images taken by drones are unique in that they have diverse perspectives, significant lighting changes, and complex background interference, making it impossible for conventional networks to extract key features of diseases and distinguish them from normal crops. Therefore, in the method provided in this application, an encoder combining an adaptive channel attention mechanism and ResNet is designed to enhance the ability to extract important features by dynamically adjusting the weights of feature map channels.

[0050] In a specific implementation provided in the present application, the encoder includes a multi-scale feature extraction unit and a feature fusion unit; Inputting the embedded image features into the encoder to obtain the multi-scale fusion coding features output by the encoder includes: Inputting the embedded image features into the multi-scale feature extraction unit to obtain multi-scale image features; The multi-scale image features and the embedded image features are input into the feature fusion unit to obtain the multi-scale fusion coding features corresponding to the embedded image features.

[0051] See also Figure 2 , Figure 2 The schematic diagram of the structure of the encoder provided by an embodiment of the present application is shown. The encoder includes a multi-scale feature extraction unit, the embedded image features are input into the multi-scale feature extraction unit for processing, and the multi-scale image features are obtained, and then the multi-scale image features and the embedded image features are input into the feature fusion unit, and the addition operation is performed in the feature fusion unit for fusion, so as to obtain the multi-scale fusion coding features corresponding to the embedded image features.

[0052] Specifically, the embedded image features are input into the multi-scale feature extraction unit, and the global average pooling operation is first performed, and then the fully connected layer is used to reduce the channel dimension, and then the activation function ReLU is used to increase the nonlinear factor, and then the fully connected layer is used to increase the dimension, and finally after the Sigmoid function is activated, the multi-scale image features are output. The multi-scale image features and the original embedded image features are input into the feature fusion unit for fusion processing, and finally the multi-scale fusion coding features are output.

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

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

[0055] In a specific implementation provided in the present application, the design of the encoder mainly 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, 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 diseased area feature of at least one target diseased area output by the query unit; Inputting each diseased area feature into the mask generating unit, and obtaining 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.

[0056] Among them, the query unit is mainly used to generate multiple query features, each query feature represents a potential disease area. In the specific implementation provided by the present application, a preset number of features most relevant to the disease features are selected from the feature sequence output by the encoder as query feature information, and these query feature information are processed by the decoder and mapped to confidence and bounding box according to the prediction head. Specifically, 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 coded 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.

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

[0058] 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 of which 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 .

[0059] Subsequently, multiple multi-scale encoded 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 not related to the disease features, and only the features with a high correlation with the disease features are retained. Specifically, the global module calculates and Adjacency Matrix of Correlation , and then take the first k reference disease area features .in, , .

[0060] 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 the features and attention mechanism to achieve more accurate feature interaction. Aggregate the key-value pairs of the first k feature regions, and then perform the aggregation on the key-value pairs and Calculate attention and obtain the disease area features of at least one target disease area O .in, , . Characteristics of the disease area , It is an enhancement item, and its purpose is to enhance the local context information.

[0061] After being processed by the selection unit, the most relevant diseased area features are obtained, and each diseased area feature is 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 the target more ,accurately.

[0062] 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 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 the 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.

[0063] The above content is input into the label assignment unit for processing, and the disease type corresponding to each target disease area is assigned according to the model task of the disease detection model. If the disease detection model is a one-to-many label assignment mechanism, the labels of multiple diseases included in the input image can be output. If the disease detection model is a one-to-one label assignment mechanism, the label of the specific disease included in the input image can be output.

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

[0065] The method provided in the embodiment of the present application is applied to the field of drone identification and detection of crop diseases. The drone is used as a carrier for image acquisition, and the processing of deep learning models provides a new solution for crop disease detection. Drones have the advantages of flexible maneuverability and rapid coverage of large areas of farmland, and can complete the inspection of large areas of farmland in a short time. Drones can collect high-resolution image data in real time by carrying high-definition cameras, laying a solid foundation for subsequent disease identification.

[0066] 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.

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

[0068] Taking the drone as an example, the image collector is equipped with a high-definition camera and a GPS navigation and positioning module. According to the pre-set flight trajectory, the flight path of the drone is controlled by the GPS navigation and positioning module to meet the coverage requirements of image stitching. At the same time, a high-definition camera is used for shooting in a multi-angle fusion manner. It can not only effectively correct the evenness during the shooting process, but also reduce the interference of crop leaf occlusion on disease detection.

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

[0070] The data processing server can be a cloud server or a terminal 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.

[0071] The processed image is then input into the disease detection model for image processing. The disease detection model is based on the Transformer architecture, including 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.

[0072] Corresponding to the above method embodiment, the present application also provides an embodiment of a crop disease detection device, Figure 4 FIG. 1 is a schematic diagram showing the structure of a crop disease detection device provided by an embodiment of the present application. Figure 4 As shown, the device comprises: The 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; The preprocessing 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; The detection module 406 is configured to input the image of the area to be processed into a disease detection model, and 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.

[0073] Optionally, the preprocessing module 404 is further configured to: 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.

[0074] Optionally, the preprocessing module 404 is further configured to: performing angle correction on each initial region image; Non-local mean filtering is performed on the pixels in the corrected image to obtain a standardized regional image.

[0075] Optionally, the disease detection model includes an embedding layer, an encoder and a decoder; The detection module 406 is further configured to: 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 encoder to obtain multi-scale fusion coding features output by the encoder; The multi-scale fusion coding features are 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.

[0076] Optionally, the encoder includes a multi-scale feature extraction unit and a feature fusion unit; The detection module 406 is further configured to: Inputting the embedded image features into the multi-scale feature extraction unit to obtain multi-scale image features; The multi-scale image features and the embedded image features are input into the feature fusion unit to obtain the multi-scale fusion coding features corresponding to the embedded image features.

[0077] Optionally, the encoder includes a query unit, a mask generation unit, a mask attention unit, and a label assignment unit; The detection module 406 is further configured to: 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; Inputting each diseased area feature into the mask generating unit, and obtaining 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.

[0078] Optionally, the query unit includes a segmentation module, a global module and a local module; The detection module 406 is further configured to: 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 coded 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.

[0079] Optionally, the acquisition module 402 is further configured to: At least one initial area image corresponding to the target detection area is acquired based on an image acquisition device.

[0080] Optionally, the image acquisition device includes a drone; The acquisition module 402 is further configured to: 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.

[0081] Optionally, the device further includes a communication module configured to: establishing a communication connection with the drone; Accordingly, the acquisition module 402 is further configured to: At least one initial area image taken by the drone is received based on the communication connection.

[0082] The device provided in the embodiment of the present application is applied to the field of drone identification and detection of crop diseases. It uses drones as carriers for image acquisition and provides a new solution for crop disease detection by processing with deep learning models. Drones have the advantages of flexibility and rapid coverage of large areas of farmland, and can complete inspections of large areas of farmland in a short time. Drones can collect high-resolution image data in real time by carrying high-definition cameras, laying a solid foundation for subsequent disease identification.

[0083] 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.

[0084] The above is a schematic scheme of a crop disease detection device of this embodiment. It should be noted that the technical scheme of the crop disease detection device and the technical scheme of the above-mentioned crop disease detection method belong to the same concept, and the details of the technical scheme of the crop disease detection device that are not described in detail can all be referred to the description of the technical scheme of the above-mentioned crop disease detection method.

[0085] Figure 5 The block diagram of a computing device 500 provided according to an embodiment of the present application is shown. 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 the database 550 is used to store data.

[0086] 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 these 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)) of wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide 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.

[0087] 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. It should be understood that Figure 5 The computing device structure block diagram shown is only for the purpose of illustration, 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.

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

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

[0090] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned crop disease detection method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above-mentioned crop disease detection method.

[0091] An embodiment of the present specification further provides a computer-readable storage medium storing a computer program / instruction, which implements the steps of the above-mentioned crop disease detection method when executed by a processor.

[0092] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above-mentioned crop disease detection method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above-mentioned crop disease detection method.

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

[0094] The above is a schematic scheme of a computer program product of this embodiment. It should be noted that the technical scheme of the computer program product and the technical scheme of the above-mentioned crop disease detection method belong to the same concept, and the details not described in detail in the technical scheme of the computer program product can be referred to the description of the technical scheme of the above-mentioned crop disease detection method.

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

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

[0097] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

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

[0099] The preferred embodiments of the present application disclosed above are only used to help explain the present application. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the present application. The present application selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can understand and use the present application well. The present application is only limited by the claims and their full scope and equivalents.

Claims

1. A method for detecting crop diseases, characterized in that: include: Acquire 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; 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.

2. The method according to claim 1, characterized in that 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, characterized in that 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 corrected image to obtain a standardized regional image.

4. The method according to claim 1, characterized in that The disease detection model includes an embedding layer, an encoder and a decoder; Inputting the image of the area to be processed into a disease detection model, obtaining at least one disease area identifier output by the disease detection model and a disease type corresponding to each disease area, 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 encoder to obtain multi-scale fusion coding features output by the encoder; The multi-scale fusion coding features are 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.

5. The method according to claim 4, characterized in that The encoder includes a multi-scale feature extraction unit and a feature fusion unit; Inputting the embedded image features into the encoder to obtain the multi-scale fusion coding features output by the encoder includes: Inputting the embedded image features into the multi-scale feature extraction unit to obtain multi-scale image features; The multi-scale image features and the embedded image features are input into the feature fusion unit to obtain the multi-scale fusion coding features corresponding to the embedded image features.

6. The method according to claim 4, characterized in that 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, 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 diseased area feature of at least one target diseased area output by the query unit; Inputting each diseased area feature into the mask generating unit, and obtaining 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.

7. The method according to claim 6, characterized in that 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 coded 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.

8. The method according to claim 1, characterized in that 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.

9. The method according to claim 8, characterized in that 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, including: 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.

10. The method according to claim 9, characterized in that Also includes: establishing a communication connection with the drone; Accordingly, the receiving 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.

11. A crop disease detection device, characterized in that: include: An acquisition module 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; A preprocessing module 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; 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.

12. 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 programs / instructions are executed by the processor, the steps of the method described in any one of claims 1 to 10 are implemented.

13. 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 10 are implemented.

14. 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 10 are implemented.

Citation Information

Patent Citations

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

    CN119107447A

  • Leaf disease detection method and device and storage medium

    CN119251154A

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

    CN119515948A

  • Image processing model training method and image processing method

    WO2025026016A1

Cited By

  • Disease and pest image multi-scale detection method, device and equipment and storage medium

    CN120953673A

  • A pest image multi-scale detection method, device, equipment and storage medium

    CN120953673B

  • Agricultural disease detection method based on multi-scale feature extraction

    CN122636998A