Crop image pest and disease identification method, device, equipment, storage medium and program product

CN122597983APending Publication Date: 2026-08-18DICUI INTELLIGENT TECH (SHANGHAI) CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610724918.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-25
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

然而,人工检查费时费力,导致农作物的病虫害识别效率较低

Benefits of technology

[0047] The aforementioned method, apparatus, equipment, storage medium, and program product for identifying crop diseases and pests involves: acquiring a current-time image of the target crop at the location to be identified; inputting the current-time image of the target crop into a disease and pest identification model and obtaining the current-time disease and pest identification result output by the model; wherein the disease and pest identification result includes candidate disease and pest categories and the confidence level of each category; the disease and pest identification model is a multi-classification model generated after training on a training image set; and determining the target disease and pest type from the candidate disease and pest categories based on the region where the target crop is located and the confidence level of the candidate disease and pest categories. Because the disease and pest identification model automatically identifies the current-time image of the target crop at the location to be identified, determines the candidate disease and pest categories and their confidence levels, and then combines the characteristics of the target crop's region with the confidence levels of the candidate disease and pest categories to determine the target disease and pest type, the efficiency of disease and pest identification is greatly improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122597983A_ABST
    Figure CN122597983A_ABST
Patent Text Reader

Abstract

The application relates to a crop image pest and disease identification method, device, equipment, storage medium and program product. The method comprises the following steps: acquiring a current time image of a target crop at a to-be-identified site; inputting the current time image of the target crop into a pest and disease identification model, and acquiring a pest and disease identification result of the current time output by the pest and disease identification model; wherein the pest and disease identification result comprises a candidate pest and disease category and a confidence degree of the pest and disease category, the pest and disease identification model is a multi-classification model generated by training an image set; and a target pest and disease type is determined from the candidate pest and disease category in the pest and disease identification result according to a region where the target crop is located and the confidence degree of the candidate pest and disease category. The method can improve the pest and disease identification efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent agricultural technology, and in particular to a method, apparatus, equipment, storage medium, and program product for identifying pests and diseases in crop images. Background Technology

[0002] With the continuous development of agricultural technology, large-scale intensive farms are becoming increasingly widespread, pursuing efficient, precise, and large-scale crop cultivation to effectively increase agricultural output. Because crops are densely planted in contiguous areas on large-scale intensive farms, pests and diseases spread rapidly; therefore, effective pest and disease identification from crop images is crucial.

[0003] In related technologies, drones and other equipment are typically used to collect images of crops in various areas of large-scale intensive farms, which are then manually inspected to determine if pests or diseases have occurred. However, manual inspection is time-consuming and labor-intensive, resulting in low efficiency in identifying crop pests and diseases. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, apparatus, equipment, storage medium, and program product for identifying crop images of pests and diseases that can improve the efficiency of pest and disease identification, in order to address the above-mentioned technical problems.

[0005] In a first aspect, this application provides a method for identifying pests and diseases in crop images, including:

[0006] Obtain the current image of the target crop at the location to be identified;

[0007] The current image of the target crop is input into the pest and disease identification model, and the pest and disease identification result at the current moment is obtained from the output of the pest and disease identification model; wherein, the pest and disease identification result includes candidate pest and disease categories and the confidence level of the pest and disease categories, and the pest and disease identification model is a multi-classification model generated after training with a training image set;

[0008] Based on the confidence level of the region where the target crop is located and the candidate pest and disease categories, the target pest and disease type is determined from the candidate pest and disease categories in the pest and disease identification results.

[0009] In one embodiment, the pest and disease identification result further includes the lesion area; after determining the target pest and disease type from the candidate pest and disease categories in the pest and disease identification result based on the confidence level of the target crop's location and the candidate pest and disease categories, the method further includes:

[0010] Obtain historical time-series images of the target crop;

[0011] Based on the target pest and disease type, the historical time series images are identified to determine the lesion area of ​​the target crop at different time points;

[0012] Based on the lesion area of ​​the target crop at different time points, predict the disease and pest development curve of the target crop corresponding to the target disease and pest type;

[0013] Based on the position of the lesion area in the current image on the pest and disease development curve, control strategy information is determined in the pest and disease control strategy information database.

[0014] In one embodiment, the control strategy information includes the type of pesticide application; after determining the control strategy information in the pest control strategy information database based on the current position of the pest in the pest development curve, the method further includes:

[0015] Acquire images of the target crops in each planting area grid adjacent to the location to be identified;

[0016] Identify the area of ​​lesions in the images of target crops within each planting area grid;

[0017] Based on the lesion area in the image of the target crop in each planting area grid, adjust the pesticide application concentration and frequency for each planting area grid;

[0018] Based on the spraying concentration and frequency of each planting area grid, the agent corresponding to the spraying type is sprayed on each planting area grid.

[0019] In one embodiment, the pest and disease identification model includes a feature extraction layer, a pest and disease classification layer, and a lesion segmentation layer;

[0020] The feature extraction layer is used to extract pest and disease feature information from the current image of the target crop;

[0021] The pest and disease classification layer is used to perform multi-class identification of pest and disease feature information in the current image of the target crop using an attention mechanism, so as to obtain multiple candidate pest and disease categories and the confidence level of each candidate pest and disease category.

[0022] The lesion segmentation layer segments the lesion region of the current time image according to each candidate pest category identified by the pest classification layer, and determines the lesion area corresponding to each candidate pest category based on the number of pixels in the segmented lesion region.

[0023] In one embodiment, the method further includes:

[0024] Obtain sample images of the target crop;

[0025] The training image set is determined based on the label information of the sample images of the target crop by the user. The training image set includes crop health images, common pest and disease images and rare pest and disease images generated after label annotation.

[0026] The initial model is trained multiple times using the training image set, and the model parameters of the initial model are adjusted according to the training results to obtain the pest and disease identification model.

[0027] In one embodiment, determining the training image set based on the user's label information for sample images of the target crop includes:

[0028] The sample images of the target crop are identified, and abnormal image regions of the sample images are determined and marked.

[0029] Based on the abnormal image regions, the sample images of the target crop are pre-classified;

[0030] Send labeling instruction information to the terminal device to indicate the pest and disease category label of the input pre-classified sample image.

[0031] Secondly, this application also provides a crop image pest and disease identification device, comprising:

[0032] The acquisition module is used to acquire the current image of the target crop to be identified;

[0033] The identification module is used to input the current image of the target crop into the pest and disease identification model and obtain the pest and disease identification result at the current time output by the pest and disease identification model; wherein, the pest and disease identification result includes candidate pest and disease categories and the confidence level of the pest and disease categories, and the pest and disease identification model is a multi-classification model generated by training a training image set, wherein the training image set includes labeled crop health images, common pest and disease images, and rare pest and disease images;

[0034] The determination module is used to determine the target pest type from the candidate pest categories in the pest identification results based on the confidence level of the target crop's location and the candidate pest categories.

[0035] In one embodiment, the pest and disease identification result further includes the lesion area; the determining module is also used to acquire historical time series images of the target crop; identify the historical time series images according to the target pest and disease type to determine the lesion area of ​​the target crop at different time points; predict the pest and disease development curve corresponding to the target pest and disease type based on the lesion area of ​​the target crop at different time points; and determine the control strategy information in the pest and disease control strategy information database based on the position of the lesion area of ​​the current image in the pest and disease development curve.

[0036] In one embodiment, the treatment strategy information includes the type of pesticide application; the determining module is further configured to acquire images of target crops in each planting area grid adjacent to the location to be identified; identify the lesion area in the images of the target crops in each planting area grid; adjust the pesticide application concentration and frequency of each planting area grid according to the lesion area in the images of the target crops in each planting area grid; and spray the pesticide corresponding to the pesticide application type in each planting area grid according to the pesticide application concentration and frequency of each planting area grid.

[0037] In one embodiment, the pest and disease identification model includes a feature extraction layer, a pest and disease classification layer, and a lesion segmentation layer;

[0038] The feature extraction layer is used to extract pest and disease feature information from the current image of the target crop;

[0039] The pest and disease classification layer is used to perform multi-class identification of pest and disease feature information in the current image of the target crop using an attention mechanism, so as to obtain multiple candidate pest and disease categories and the confidence level of each candidate pest and disease category.

[0040] The lesion segmentation layer segments the lesion region of the current time image according to each candidate pest category identified by the pest classification layer, and determines the lesion area corresponding to each candidate pest category based on the number of pixels in the segmented lesion region.

[0041] In one embodiment, the crop image pest and disease identification device further includes:

[0042] The training module is used to acquire sample images of the target crop; determine the training image set based on the user's label information for the sample images of the target crop, the training image set including crop health images, common pest and disease images and rare pest and disease images generated after label annotation; use the training image set to train the initial model multiple times, and adjust the model parameters of the initial model according to the training results to obtain the pest and disease recognition model.

[0043] In one embodiment, the training module is used to identify sample images of the target crop, determine and identify abnormal image regions of the sample images; pre-classify the sample images of the target crop based on the abnormal image regions; and send labeling instruction information to the terminal device to indicate the pest and disease category label of the pre-classified sample images.

[0044] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the crop image pest and disease identification method of the first aspect described above.

[0045] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the crop image pest and disease identification method of the first aspect described above.

[0046] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the crop image pest and disease identification method described in the first aspect above.

[0047] The aforementioned method, apparatus, equipment, storage medium, and program product for identifying crop diseases and pests involves: acquiring a current-time image of the target crop at the location to be identified; inputting the current-time image of the target crop into a disease and pest identification model and obtaining the current-time disease and pest identification result output by the model; wherein the disease and pest identification result includes candidate disease and pest categories and the confidence level of each category; the disease and pest identification model is a multi-classification model generated after training on a training image set; and determining the target disease and pest type from the candidate disease and pest categories based on the region where the target crop is located and the confidence level of the candidate disease and pest categories. Because the disease and pest identification model automatically identifies the current-time image of the target crop at the location to be identified, determines the candidate disease and pest categories and their confidence levels, and then combines the characteristics of the target crop's region with the confidence levels of the candidate disease and pest categories to determine the target disease and pest type, the efficiency of disease and pest identification is greatly improved. Attached Figure Description

[0048] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0049] Figure 1 An application environment diagram for a crop image pest and disease identification method provided in this application embodiment;

[0050] Figure 2 A flowchart illustrating a method for identifying pests and diseases in crop images, provided in an embodiment of this application;

[0051] Figure 3 A flowchart illustrating another method for identifying pests and diseases in crop images provided in this application embodiment;

[0052] Figure 4 A flowchart illustrating another method for identifying pests and diseases in crop images provided in this application embodiment;

[0053] Figure 5 A structural block diagram of a crop image pest and disease identification device provided in this application embodiment;

[0054] Figure 6 This is an internal structural diagram of a computer device provided in an embodiment of this application. Detailed Implementation

[0055] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0056] The crop image pest and disease identification method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104, or it can be located in the cloud or on another network server.

[0057] Server 104 first acquires a current-time image of the target crop at the location to be identified. Then, server 104 inputs the current-time image of the target crop into the pest and disease identification model and obtains the current-time pest and disease identification result output by the model. This result includes candidate pest and disease categories and their confidence levels. The pest and disease identification model is a multi-classification model generated after training on a training image set. Based on the location of the target crop and the confidence levels of the candidate pest and disease categories, server 104 determines the target pest and disease type from the candidate categories in the identification result and sends this type to terminal device 102.

[0058] The terminal 104 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle systems, and projection devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted displays. Head-mounted displays can be virtual reality (VR) devices, augmented reality (AR) devices, and smart glasses. The server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0059] In one exemplary embodiment, such as Figure 2 As shown, a method for identifying pests and diseases in crop images is provided, which can be applied to... Figure 1 Taking the server in the example, the explanation includes the following steps 201 to 203. Wherein:

[0060] S201. Obtain the current image of the target crop at the location to be identified.

[0061] In this application, the sensor device can acquire a current-time image of the target crop at the location to be identified and send it to the server so that the server can obtain the current-time image of the target crop at the location to be identified.

[0062] It should be understood that the embodiments of this application do not limit the type of target crop, and can be any type of crop, such as tomatoes, rice, wheat, etc. The aforementioned sensor device can be a camera, which may include a fixed-point camera, or a camera installed on a mobile device such as a drone, robot, or automated machinery.

[0063] The location to be identified can be a key area preset by the user, or any area within the planting range of the target crop. This application embodiment does not impose any restrictions on this.

[0064] In some embodiments, the sensor can capture a current-time image of the target crop at the location to be identified. The sensor can then send this image to a server. The server can analyze the current-time image of the target crop to determine if it represents a high-risk area for pests or diseases. If the current-time image shows a high-risk area, pest and disease identification is performed on subsequent crop images. If the current-time image does not show a high-risk area, only the current-time image of the target crop is saved, and subsequent pest and disease identification is not performed.

[0065] High-risk parts for pests and diseases can include leaves, fruits, roots, and stems. These high-risk parts may be the same or different for different crops.

[0066] S202. Input the current image of the target crop into the pest and disease identification model, and obtain the pest and disease identification result at the current moment output by the pest and disease identification model.

[0067] The pest and disease identification results include candidate pest and disease categories and the confidence level of the pest and disease categories. The pest and disease identification model is a multi-classification model generated after training the training image set.

[0068] The following section will first explain the pest and disease identification model.

[0069] In some embodiments, the pest and disease identification model includes a feature extraction layer, a pest and disease classification layer, and a lesion segmentation layer.

[0070] The feature extraction layer extracts pest and disease features from the current image of the target crop. The pest and disease classification layer uses an attention mechanism to perform multi-class classification of the pest and disease features in the current image of the target crop, obtaining multiple candidate pest and disease categories and their confidence scores. The lesion segmentation layer segments lesion regions in the current image based on the candidate pest and disease categories identified by the classification layer, and determines the lesion area corresponding to each candidate pest and disease category based on the number of pixels in the segmented lesion regions.

[0071] The aforementioned pest and disease identification model can be a neural network model, and the aforementioned feature extraction layer can be implemented through multiple convolutions.

[0072] For example, the shape, color, and texture of lesions from different pests and diseases, as well as the morphology and traces of pests, are extracted by a feature extraction layer consisting of convolutional kernels, activation functions, and pooling units. An attention mechanism is used to extract key features, gradually extracting low-order features (edges, color blocks) to high-order features (lesion outlines, pest bodies), thereby obtaining pest and disease feature information in the image at the current moment.

[0073] For example, the pest and disease classification layer can process pest and disease feature information to obtain feature vectors. Classifiers such as fully connected layers and support vector machines (SVM) are then used to classify these feature vectors, thereby obtaining various candidate pest and disease categories. A softmax transformation is then performed using an activation function to obtain the confidence level of each candidate pest and disease category.

[0074] For example, the above-mentioned pest and disease identification model can be an integrated detection and segmentation model, where the lesion region segmentation and pest and disease category identification share pest and disease feature information. In the lesion region segmentation, the lesion segmentation layer can segment the lesion region of the current time image according to each candidate pest and disease category, and obtain the boundary coordinates of the lesion region. Subsequently, based on the boundary coordinates of the lesion region, the number of pixels in the lesion region is calculated, and based on the number of pixels in the lesion region, the lesion area is obtained.

[0075] The following explains how to train a pest and disease identification model.

[0076] In some embodiments, the server may acquire sample images of the target crop. Subsequently, the server determines the training image set based on the user's label information for the sample images of the target crop. Finally, the server uses the training image set to train the initial model multiple times and adjusts the model parameters of the initial model based on the training results to obtain the pest and disease identification model.

[0077] The sample images of the target crop can be collected from multiple data sources. A maximum threshold is set for the number of sample images of the target crop collected from different data sources to avoid using too much data from the same data source.

[0078] The training image set can be a collection of sample images after label annotation. The training image set includes crop health images, images of common pests and diseases, and images of rare pests and diseases generated after label annotation.

[0079] It should be understood that the embodiments of this application do not limit how the training image set is generated. In some embodiments, sample images can be sent to a terminal device one by one, so that the user can sequentially label and annotate the sample images through the terminal device to determine whether they are images of healthy crops, images of common pests and diseases, or images of rare pests and diseases.

[0080] In other embodiments, the server can identify and mark abnormal image regions in the sample images of the target crop. Subsequently, the server pre-classifies the sample images of the target crop based on these abnormal image regions. Finally, the server sends labeling instructions to the terminal device, indicating the pest and disease category label to be entered into the pre-classified sample images.

[0081] For example, the server can identify sample images of the target crop, which can be pre-classified by using the color of the target crop in the sample image to pre-classify it into images of healthy crops, images of common pests and diseases, or images of rare pests and diseases. For images of common pests and diseases or images of rare pests and diseases, the server can also identify abnormal image areas so that users can quickly locate potentially abnormal parts when annotating. Subsequently, the server sends the pre-classified sample images and labeling instructions to the terminal device in batches, so that users can annotate the pre-classified sample images with pest and disease category labels through the terminal device.

[0082] It should be noted that by having the server pre-classify the sample images and identify abnormal image regions, the user's annotation speed for sample images is greatly accelerated, thereby improving the model training efficiency.

[0083] S203. Based on the confidence level of the target crop's location and the candidate pest and disease categories, determine the target pest and disease type from the candidate pest and disease categories in the pest and disease identification results.

[0084] In some embodiments, the server may first determine the types of pests and diseases that may occur on the target crop based on the region where the target crop is located. Secondly, candidate pest and disease categories that do not belong to the categories of pests and diseases that may occur on the target crop are deleted. Thirdly, for the remaining candidate pest and disease categories, they can be compared with a confidence threshold. If the confidence level of a candidate pest and disease category is greater than or equal to the confidence threshold, it can be identified as a target pest and disease type; if the confidence level of a candidate pest and disease category is less than the confidence threshold, it can be identified as not a target pest and disease type.

[0085] It should be noted that the target crop may include one or more types of target pests and diseases, and this application embodiment does not limit this. For example, when the target crop is tomato, the target pest and disease type may include one or more of fungal diseases, bacterial diseases, physiological diseases, borers, and piercing-sucking pests.

[0086] In some embodiments, the pest and disease identification results also include lesion area. Accordingly, after determining the target pest and disease type from the candidate pest and disease categories in the pest and disease identification results based on the confidence level of the target crop's location and the candidate pest and disease categories, the server can acquire historical time-series images of the target crop. Secondly, the server identifies the historical time-series images according to the target pest and disease type to determine the lesion area of ​​the target crop at different time points. Thirdly, the server predicts the pest and disease development curve corresponding to the target pest and disease type based on the lesion area of ​​the target crop at different time points. Finally, the server determines the control strategy information from the pest and disease control strategy information database based on the position of the lesion area in the current image within the pest and disease development curve.

[0087] The aforementioned historical time-series images can be images of the target crops at the location to be identified collected over a historical period. It should be understood that the embodiments of this application do not limit the time interval of the historical time-series images; for example, it can be a one-day interval, a three-day interval, a five-day interval, a ten-day interval, etc.

[0088] For example, after acquiring historical time-series images, they can be sequentially identified using a pest and disease identification model to obtain the lesion area of ​​the target pest and disease type. Subsequently, by using the lesion area of ​​the target pest and disease type at different time points, the development coefficient of that target pest and disease type is calculated, thereby generating a pest and disease development curve for the target pest and disease type.

[0089] The development curve of the target pest type can include the historical change curve of lesion area and the change curve of lesion area in the future time period predicted based on the development coefficient.

[0090] For example, after generating a pest development curve for the target pest type, the server can determine the position of the lesion area in the current image within the pest development curve, thereby determining the pest stage of the target crop. Subsequently, based on the pest stage of the target crop, a pest control strategy information database is queried to obtain control strategy information.

[0091] It should be noted that the pest and disease control strategy information database may include historical cases and industry standard cases of pest and disease control. By querying historical cases and / or industry standard cases that are similar to the pest and disease stage of the target crop, control strategy information can be obtained.

[0092] The information on control strategies can include physical control, biological control, and chemical control. Chemical control can include spraying corresponding types of pesticides; physical control can include hanging yellow and blue sticky traps and covering with insect-proof netting; biological control can include releasing ladybugs, predatory mites, etc.

[0093] In some embodiments, the control strategy information includes the type of pesticide applied. After determining the control strategy information from the pest control strategy information database based on the current position on the pest development curve, the server can acquire images of the target crop in each planting area grid adjacent to the location to be identified. Secondly, the server can identify the lesion area in the images of the target crop in each planting area grid. Thirdly, the server can adjust the pesticide application concentration and frequency for each planting area grid based on the lesion area in the images of the target crop in each planting area grid. Finally, the server can spray the pesticide corresponding to the application type in each planting area grid according to the pesticide application concentration and frequency.

[0094] It should be understood that the location to be identified can be one of the various planting area grids within a crop planting area. Once pests and diseases are identified in the planting area grid where the location to be identified is located, there is a high probability that pests and diseases will also occur in nearby planting area grids. Therefore, the server can acquire images of the target crop in each planting area grid adjacent to the location to be identified, identify the lesion area corresponding to the target pest or disease type using a pest and disease identification model, and then adjust the pesticide application concentration and frequency for each planting area grid based on the lesion area. Finally, pesticides corresponding to the appropriate pesticide type are sprayed in each planting area grid, thus ensuring that the pesticide application concentration and frequency for different planting area grids match the severity of the pests and diseases.

[0095] The method for identifying pests and diseases in crop images provided in this application involves acquiring a current-time image of a target crop at a location to be identified; inputting the current-time image of the target crop into a pest and disease identification model; and obtaining the pest and disease identification result output by the model at the current time. The pest and disease identification result includes candidate pest and disease categories and their confidence levels. The pest and disease identification model is a multi-classification model generated after training on a training image set. Based on the region where the target crop is located and the confidence levels of the candidate pest and disease categories, the target pest and disease type is determined from the candidate pest and disease categories in the pest and disease identification result. Because the pest and disease identification model automatically identifies the current-time image of the target crop at the location to be identified, determines the candidate pest and disease categories and their confidence levels, and then combines the characteristics of the region where the target crop is located with the confidence levels of the candidate pest and disease categories to determine the target pest and disease type, the efficiency of pest and disease identification is greatly improved.

[0096] In one exemplary embodiment, such as Figure 3 As shown, another method for identifying pests and diseases in crop images is provided. Taking the application of this method to a server as an example, the method includes the following steps 301 to 306. Wherein:

[0097] S301. Obtain a sample image of the target crop.

[0098] S302. Based on the label information of the sample images of the target crop by the user, determine the training image set. The training image set includes crop health images, common pest and disease images and rare pest and disease images generated after label annotation.

[0099] S303. The initial model is trained multiple times using the training image set, and the model parameters of the initial model are adjusted according to the training results to obtain the pest and disease identification model.

[0100] S304. Obtain the current image of the target crop at the location to be identified.

[0101] S305. Input the current image of the target crop into the pest and disease identification model, and obtain the pest and disease identification result at the current time output by the pest and disease identification model; wherein, the pest and disease identification result includes candidate pest and disease categories and the confidence of pest and disease categories, and the pest and disease identification model is a multi-classification model generated after training the training image set.

[0102] S306. Based on the confidence level of the target crop's location and the candidate pest and disease categories, determine the target pest and disease type from the candidate pest and disease categories in the pest and disease identification results.

[0103] It should be noted that the process of training the pest and disease identification model can be completed by a server or by other devices, and this application embodiment does not impose any restrictions on this.

[0104] In one exemplary embodiment, such as Figure 4 As shown, another method for identifying pests and diseases in crop images is provided. Taking the application of this method to a server as an example, the method includes the following steps 401 to 414. Wherein:

[0105] S401. Obtain a sample image of the target crop.

[0106] S402. Based on the label information of the sample images of the target crop by the user, determine the training image set. The training image set includes crop health images, common pest and disease images and rare pest and disease images generated after label annotation.

[0107] S403. Train the initial model multiple times using the training image set, and adjust the model parameters of the initial model according to the training results to obtain the pest and disease identification model.

[0108] S404. Obtain the current image of the target crop at the location to be identified.

[0109] S405. Input the current image of the target crop into the pest and disease identification model, and obtain the pest and disease identification result at the current time output by the pest and disease identification model; wherein, the pest and disease identification result includes candidate pest and disease categories and the confidence of pest and disease categories, and the pest and disease identification model is a multi-classification model generated by training the training image set.

[0110] S406. Based on the confidence level of the target crop's location and the candidate pest and disease categories, determine the target pest and disease type from the candidate pest and disease categories in the pest and disease identification results.

[0111] S407. Obtain historical time series images of the target crop.

[0112] S408. Based on the target pest and disease type, identify the historical time series images to determine the lesion area of ​​the target crop at different time points.

[0113] S409. Based on the lesion area of ​​the target crop at different time points, predict the disease and pest development curve of the target crop corresponding to the target disease and pest type.

[0114] S410. Based on the position of the lesion area in the current image on the pest and disease development curve, determine the control strategy information in the pest and disease control strategy information database.

[0115] S411. Obtain images of the target crops in each planting area grid adjacent to the location to be identified.

[0116] S412. Identify the area of ​​disease spots in the images of target crops in each planting area grid.

[0117] S413. Adjust the pesticide application concentration and frequency for each planting area grid based on the lesion area in the image of the target crop in each planting area grid.

[0118] S414. Based on the spraying concentration and frequency of each planting area grid, spray the corresponding pesticide type in each planting area grid.

[0119] The method for identifying pests and diseases in crop images provided in this application involves acquiring a current-time image of a target crop at a location to be identified; inputting the current-time image of the target crop into a pest and disease identification model; and obtaining the pest and disease identification result output by the model at the current time. The pest and disease identification result includes candidate pest and disease categories and their confidence levels. The pest and disease identification model is a multi-classification model generated after training on a training image set. Based on the region where the target crop is located and the confidence levels of the candidate pest and disease categories, the target pest and disease type is determined from the candidate pest and disease categories in the pest and disease identification result. Because the pest and disease identification model automatically identifies the current-time image of the target crop at the location to be identified, determines the candidate pest and disease categories and their confidence levels, and then combines the characteristics of the region where the target crop is located with the confidence levels of the candidate pest and disease categories to determine the target pest and disease type, the efficiency of pest and disease identification is greatly improved.

[0120] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0121] Based on the same inventive concept, this application also provides a crop image pest and disease identification device for implementing the above-mentioned crop image pest and disease identification method. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more crop image pest and disease identification device embodiments provided below can be found in the limitations of the crop image pest and disease identification method above, and will not be repeated here.

[0122] In one exemplary embodiment, such as Figure 5 As shown, a crop image pest and disease identification device 500 is provided, comprising: an acquisition module 501, an identification module 502, and a determination module 503, wherein:

[0123] The acquisition module 501 is used to acquire the current image of the target crop to be identified;

[0124] The identification module 502 is used to input the current image of the target crop into the pest and disease identification model and obtain the pest and disease identification result of the current time output by the pest and disease identification model. The pest and disease identification result includes candidate pest and disease categories and the confidence of the pest and disease categories. The pest and disease identification model is a multi-classification model generated by training a training image set. The training image set includes crop health images with labels, images of common pests and diseases, and images of rare pests and diseases.

[0125] The determination module 503 is used to determine the target pest type from the candidate pest categories in the pest identification results based on the confidence level of the target crop's location and the candidate pest categories.

[0126] In one embodiment, the pest and disease identification result also includes the lesion area; the determination module 503 is further used to acquire historical time series images of the target crop; according to the target pest and disease type, the historical time series images are identified respectively to determine the lesion area of ​​the target crop at different time points; according to the lesion area of ​​the target crop at different time points, the pest and disease development curve corresponding to the target pest and disease type is predicted; according to the position of the lesion area of ​​the current image in the pest and disease development curve, the pest and disease control strategy information is determined in the pest and disease control strategy information database.

[0127] In one embodiment, the governance strategy information includes the type of pesticide application; the determination module 503 is further configured to acquire images of target crops in each planting area grid adjacent to the location to be identified; identify the lesion area in the images of target crops in each planting area grid; adjust the pesticide application concentration and frequency of each planting area grid according to the lesion area in the images of target crops in each planting area grid; and spray the pesticide corresponding to the application type in each planting area grid according to the pesticide application concentration and frequency of each planting area grid.

[0128] In one embodiment, the pest and disease identification model includes a feature extraction layer, a pest and disease classification layer, and a lesion segmentation layer;

[0129] The feature extraction layer is used to extract pest and disease feature information from the current image of the target crop;

[0130] The pest and disease classification layer is used to perform multi-class identification of pest and disease features in the current image of the target crop using an attention mechanism, and obtain multiple candidate pest and disease categories and the confidence of each candidate pest and disease category.

[0131] The lesion segmentation layer segments the lesion region in the current image based on the candidate pest and disease categories identified by the pest and disease classification layer, and determines the lesion area corresponding to each candidate pest and disease category based on the number of pixels in the segmented lesion region.

[0132] In one embodiment, the crop image pest and disease identification device 500 further includes:

[0133] The training module is used to acquire sample images of the target crop; based on the user's label information for the sample images of the target crop, a training image set is determined, which includes crop health images, common pest and disease images, and rare pest and disease images generated after label annotation; the initial model is trained multiple times using the training image set, and the model parameters of the initial model are adjusted according to the training results to obtain the pest and disease recognition model.

[0134] In one embodiment, the training module is used to identify sample images of the target crop, determine and identify abnormal image regions of the sample images; pre-classify the sample images of the target crop based on the abnormal image regions; and send labeling instruction information to the terminal device to indicate the pest and disease category label of the pre-classified sample image.

[0135] Each module in the aforementioned crop image pest and disease identification device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.

[0136] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 6 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network. When executed by the processor, the computer program implements a method for identifying pests and diseases in crop images.

[0137] Those skilled in the art will understand that Figure 6The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0138] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method for identifying pests and diseases from crop images.

[0139] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the above-described method for identifying pests and diseases in crop images.

[0140] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described method for identifying pests and diseases in crop images.

[0141] 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, data stored, data displayed, 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 the relevant data must comply with relevant regulations.

[0142] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0143] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0144] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for identifying a disease and pest of a crop image, characterized in that, The method includes: Obtain the current image of the target crop at the location to be identified; The current image of the target crop is input into the pest and disease identification model, and the pest and disease identification result at the current moment is obtained from the output of the pest and disease identification model; wherein, the pest and disease identification result includes candidate pest and disease categories and the confidence level of the pest and disease categories, and the pest and disease identification model is a multi-classification model generated after training with a training image set; Based on the confidence level of the region where the target crop is located and the candidate pest and disease categories, the target pest and disease type is determined from the candidate pest and disease categories in the pest and disease identification results.

2. The method according to claim 1, characterized in that, The pest and disease identification results also include the area of ​​lesions; after determining the target pest and disease type from the candidate pest and disease categories in the pest and disease identification results based on the confidence level of the target crop's location and the candidate pest and disease categories, the method further includes: Obtain historical time-series images of the target crop; Based on the target pest and disease type, the historical time series images are identified to determine the lesion area of ​​the target crop at different time points; Based on the lesion area of ​​the target crop at different time points, predict the disease and pest development curve of the target crop corresponding to the target disease and pest type; Based on the position of the lesion area in the current image on the pest and disease development curve, control strategy information is determined in the pest and disease control strategy information database.

3. The method according to claim 2, characterized in that, The control strategy information includes the type of pesticide application; after determining the control strategy information in the pest control strategy information database based on the current position of the pest in the pest development curve, the method further includes: Acquire images of the target crops in each planting area grid adjacent to the location to be identified; Identify the area of ​​lesions in the images of target crops within each planting area grid; Based on the lesion area in the image of the target crop in each planting area grid, adjust the pesticide application concentration and frequency for each planting area grid; Based on the spraying concentration and frequency of each planting area grid, the agent corresponding to the spraying type is sprayed on each planting area grid.

4. The method according to claim 1, characterized in that, The pest and disease identification model includes a feature extraction layer, a pest and disease classification layer, and a lesion segmentation layer; The feature extraction layer is used to extract pest and disease feature information from the current image of the target crop; The pest and disease classification layer is used to perform multi-class identification of pest and disease feature information in the current image of the target crop using an attention mechanism, so as to obtain multiple candidate pest and disease categories and the confidence level of each candidate pest and disease category. The lesion segmentation layer segments the lesion region of the current time image according to each candidate pest category identified by the pest classification layer, and determines the lesion area corresponding to each candidate pest category based on the number of pixels in the segmented lesion region.

5. The method according to claim 1, characterized in that, The method further includes: Obtain sample images of the target crop; The training image set is determined based on the label information of the sample images of the target crop by the user. The training image set includes crop health images, common pest and disease images and rare pest and disease images generated after label annotation. The initial model is trained multiple times using the training image set, and the model parameters of the initial model are adjusted according to the training results to obtain the pest and disease identification model.

6. The method according to claim 5, characterized in that, The step of determining the training image set based on the user's label information for sample images of the target crop includes: The sample images of the target crop are identified, and abnormal image regions of the sample images are determined and marked. Based on the abnormal image regions, the sample images of the target crop are pre-classified; Send labeling instruction information to the terminal device to indicate the pest and disease category label of the input pre-classified sample image.

7. A device for identifying pests and diseases in crop images, characterized in that, The device includes: The acquisition module is used to acquire the current image of the target crop to be identified; The identification module is used to input the current image of the target crop into the pest and disease identification model and obtain the pest and disease identification result at the current time output by the pest and disease identification model; wherein, the pest and disease identification result includes candidate pest and disease categories and the confidence level of the pest and disease categories, and the pest and disease identification model is a multi-classification model generated by training a training image set, wherein the training image set includes labeled crop health images, common pest and disease images, and rare pest and disease images; The determination module is used to determine the target pest type from the candidate pest categories in the pest identification results based on the confidence level of the target crop's location and the candidate pest categories.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.