Disease and pest identification method, system and device, storage medium and program product

By combining multi-classification models and object detection models, the problem of low accuracy of existing pest and disease identification technologies is solved, and higher identification accuracy and scope of application are achieved, and the identification needs of complex situations are adapted to the identification needs.

CN119273956AActive Publication Date: 2025-01-07中和农信农业集团有限公司

Patent Information

Application Number
CN202411052779.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-02
Publication Date
2025-01-07
Estimated Expiration
2044-08-02

AI Technical Summary

Technical Problem

Existing pest and disease identification technologies rely on a single model and are difficult to cope with complex situations, resulting in low recognition accuracy.

Method used

A pest detection model combining multi-classification model and object detection model is used. After the target crop is initially identified through a computer vision model, the multi-classification model or object detection model is further input to generate and analyze feature maps to determine the detection results of pests and diseases.

Benefits of technology

It improves the accuracy and scope of application of pest and disease identification, reduces misjudgment, and enhances the ability to adapt to different images and complex situations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119273956A_ABST
    Figure CN119273956A_ABST
Patent Text Reader

Abstract

The invention discloses a disease and pest recognition method, system and device, a storage medium and a program product, and belongs to the technical field of crop pest recognition. The method comprises: acquiring a pest image; inputting the disease and pest image into a computer vision model to obtain a content identification result of the disease and pest image, the content identification result being that the disease and pest image includes the target crop or does not include the target crop; under the condition that the content identification result is that the disease and insect pest image comprises the target crop, inputting the disease and insect pest image into a trained disease and insect pest detection model to obtain a target feature map, the disease and insect pest detection model comprising at least one of a multi-classification model and a target detection model; the multi-classification model outputs a first feature map; the target detection model outputs a second feature map; the target feature map is determined based on at least one of the first feature map and the second feature map; and determining a pest detection result of the pest image according to the target feature map. The method can improve the pest recognition accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of crop pest identification, and in particular to a pest identification method, system, device, storage medium and program product. Background Art

[0002] Due to the large variety and number of pests and diseases, which have a great impact on crops, the prevention and control of pests and diseases becomes particularly important. Pest and disease identification technology also plays an important role in ensuring the healthy growth of crops.

[0003] Existing pest and disease identification algorithms mainly rely on a single model to identify plant pests and diseases. However, there are many complex situations in practical applications that a single model cannot cope with, resulting in the problem of low accuracy in existing pest and disease identification.

[0004] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The main purpose of the embodiments of the present application is to provide a method, system, device, storage medium and program product for identifying pests and diseases, aiming to solve the problem of low accuracy of pest and disease identification in existing methods.

[0006] In a first aspect, an embodiment of the present application provides a method for identifying pests and diseases, the method comprising:

[0007] Obtain pest and disease images;

[0008] Inputting the pest image into a computer vision model to obtain a content recognition result of the pest image, wherein the content recognition result is that the pest image includes a target crop, or that the pest image does not include the target crop;

[0009] In the case where the content recognition result is that the pest image includes the target crop, the pest image is input into a trained pest detection model to obtain a target feature map, wherein the pest detection model includes at least one of a multi-classification model and a target detection model; the multi-classification model outputs a first feature map, and the first feature map is used to characterize the health status recognition result of the target part of the target crop; the target detection model outputs a second feature map, and the second feature map is used to characterize the pest recognition result of the target crop; the target feature map is determined based on at least one of the first feature map and the second feature map;

[0010] The pest detection result of the pest image is determined according to the target feature map.

[0011] In a second aspect, an embodiment of the present application provides a pest identification system, the system comprising:

[0012] An acquisition module, used to acquire pest and disease images;

[0013] An input module, used for inputting the pest image into a computer vision model to obtain a content recognition result of the pest image, wherein the content recognition result is that the pest image includes a target crop, or that the pest image does not include the target crop;

[0014] A detection module, configured to input the pest image into a trained pest detection model to obtain a target feature map when the content recognition result indicates that the pest image includes the target crop, wherein the pest detection model includes at least one of a multi-classification model and a target detection model; the multi-classification model outputs a first feature map, the first feature map being used to characterize a health status recognition result of a target part of the target crop; the target detection model outputs a second feature map, the second feature map being used to characterize a pest recognition result of the target crop; the target feature map is determined based on at least one of the first feature map and the second feature map;

[0015] A result module is used to determine the pest detection result of the pest image according to the target feature map.

[0016] In a third aspect, an embodiment of the present application provides a pest and disease identification device, the device comprising: a memory, a processor, and a computer processing program stored on the memory and executable on the processor, the computer processing program being configured to implement the steps of the pest and disease identification method as described in the first aspect.

[0017] In a fourth aspect, an embodiment of the present application provides a storage medium having a computer processing program stored thereon, and when the computer processing program is executed by a processor, the steps of the pest identification method as described in the first aspect are implemented.

[0018] In a fifth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the steps of the method described in the first aspect.

[0019] The present application proposes a pest identification method, system, device, storage medium and program product, which obtains pest images and then inputs the pest images into a computer vision model to obtain content recognition results of the pest images, wherein the content recognition results are that the pest images include target crops, or that the pest images do not include target crops. Then, when the content recognition results are that the pest images include target crops, the pest images are input into a trained pest detection model to obtain a target feature map, wherein the pest detection model includes at least one of a multi-classification model and a target detection model; the multi-classification model outputs a first feature map, which is used to characterize the health status recognition results of the target parts of the target crops; the target detection model outputs a second feature map, which is used to characterize the pest identification results of the target crops; the target feature map is determined based on at least one of the first feature map and the second feature map. Finally, the pest detection results of the pest images are determined according to the target feature map. The present application realizes multi-route identification of pests and diseases by inputting pest and disease images into a computer vision model, and when the recognition result shows that the target crop is included, further inputting the pest and disease images into a pre-trained multi-classification model and / or target detection model. In this way, the scope of application of pest and disease identification can be improved, thereby improving the accuracy of pest and disease identification. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 This is one of the flow charts of the pest identification method provided in the embodiment of the present application;

[0021] Figure 2 This is the second flow chart of the pest identification method provided in the embodiment of the present application;

[0022] Figure 3 is a schematic diagram of the structure of the pest identification system provided in the embodiment of the present application;

[0023] Figure 4 It is one of the structural schematic diagrams of the electronic device provided in the embodiment of the present application;

[0024] Figure 5 This is the second structural diagram of the electronic device provided in the embodiment of the present application;

[0025] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0027] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0028] The display method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0029] The present application embodiment provides a pest identification method, which is applied to electronic equipment, such as Figure 1 As shown, the pest identification method of the embodiment of the present application may include the following steps:

[0030] Step 10, obtaining pest and disease images;

[0031] Step 20: input the pest image into a computer vision model to obtain a content recognition result of the pest image, wherein the content recognition result is that the pest image includes the target crop, or that the pest image does not include the target crop;

[0032] Step 30: When the content recognition result is that the pest image includes the target crop, the pest image is input into a trained pest detection model to obtain a target feature map, wherein the pest detection model includes at least one of a multi-classification model and a target detection model; the multi-classification model outputs a first feature map, and the first feature map is used to characterize the health status recognition result of the target part of the target crop; the target detection model outputs a second feature map, and the second feature map is used to characterize the pest recognition result of the target crop; the target feature map is determined based on at least one of the first feature map and the second feature map;

[0033] Step 40: Determine the pest detection result of the pest image according to the target feature map.

[0034] The embodiment of the present application obtains a pest image, and then inputs the pest image into a computer vision model to obtain a content recognition result of the pest image, wherein the content recognition result is that the pest image includes the target crop, or the pest image does not include the target crop. Then, when the content recognition result is that the pest image includes the target crop, the pest image is input into a trained pest detection model to obtain a target feature map, wherein the pest detection model includes at least one of a multi-classification model and a target detection model; the multi-classification model outputs a first feature map, and the first feature map is used to characterize the health status recognition result of the target part of the target crop; the target detection model outputs a second feature map, and the second feature map is used to characterize the pest recognition result of the target crop; the target feature map is determined based on at least one of the first feature map and the second feature map. Finally, according to the target feature map, the pest detection result of the pest image is determined. The present application realizes multi-route recognition of pests and diseases by inputting the pest image into a computer vision model, and when the recognition result is that the target crop is included, the pest image is further input into a pre-trained multi-classification model and / or a target detection model. In this way, the application scope of pest and disease identification can be improved, thereby improving the accuracy of pest and disease identification.

[0035] In some embodiments, in the above step 10, an image of pests and diseases is acquired.

[0036] In this embodiment, it should be noted that the pest image is an image of pests to be detected, which does not necessarily mean that pests exist. The pests may be any of the following: abnormal spots, color changes, abnormal shapes, etc. on the leaves, stems, or fruits of crops. The pest image may be an image obtained by a photographic or scanning device. Furthermore, the pest image may be a pre-processed image or an un-pre-processed image.

[0037] When acquiring, use image acquisition equipment such as high-resolution cameras, smartphones or drones to take a comprehensive picture of crops in the field or greenhouse. When shooting, attention should be paid to choosing appropriate lighting conditions and angles to ensure clear images with rich details.

[0038] For example, in a soybean field, users use drones to take aerial images of the entire field to identify pests and diseases over a large area. The drones can cruise automatically, collect images at regular intervals, and transmit the images in real time to the user's smartphone or computer.

[0039] In some embodiments, in the above step 20, the pest image is input into a computer vision model to obtain a content recognition result of the pest image, wherein the content recognition result is that the pest image includes the target crop, or that the pest image does not include the target crop.

[0040] In this embodiment, it should be noted that the computer vision (CV) model refers to a model that uses computer algorithms and deep learning techniques to identify, detect and analyze the content in images and videos. The content recognition result refers to the result output by the computer vision model after analyzing the input image, including whether the image contains the target crop. The embodiment of the present application does not limit the crop type of the target crop, which can be set according to actual needs. For example, the target crop can be wheat, corn, rice, etc.

[0041] The acquired pest and disease images are imported into the computer vision model through specific software or interfaces. The computer vision model processes the images, extracts and analyzes the features, and finally outputs the content recognition results. The output content recognition results may include the target crops or not.

[0042] For example, a user uploads an image of corn leaves to an agricultural intelligence platform, which directly uses a computer vision model to analyze the image and determine whether the image contains corn crops.

[0043] In some embodiments, in the above step 30, when the content recognition result is that the pest image includes the target crop, the pest image is input into a trained pest detection model to obtain a target feature map.

[0044] In this embodiment, it should be noted that the pest detection model is a machine learning or deep learning model specifically used to identify crop pests and diseases. The pest detection model includes at least one of a multi-classification model and a target detection model, which is used to identify and locate pests and diseases.

[0045] The multi-classification model is a classification algorithm that classifies an input pest image into multiple categories, such as a corrupt state or a healthy state. The object detection model refers to a detection algorithm that is used to identify whether a specific object (such as a pest) exists in a pest image and to determine the location of the specific object in the image if it exists. The health status recognition result includes the health status of the target part of the target crop, and the result is healthy or corrupt. The pest recognition result can be the detection of the presence of pests in the pest image, or the detection of the absence of pests in the pest image.

[0046] When the computer vision model identifies that the target crop is contained in the pest image, the pest image is input into the trained pest detection model for further analysis, which may include the following methods:

[0047] 1. When the pest detection model only includes a multi-classification model, the pest image is input into the multi-classification model, the pest image is identified by the multi-classification model, and the first feature map is output. In this case, the first feature map is used as the target feature map.

[0048] Second, when the pest detection model only includes the target detection model, the pest image is input into the target detection model, so that the target detection model outputs the second feature map. In this case, the second feature map is used as the target feature map.

[0049] 3. When the pest and disease detection model includes two models, a multi-classification model and a target detection model, there are two implementation methods.

[0050] First, the pest and disease image is input into a multi-classification model, and a classification is performed through the multi-classification model to obtain a part recognition result of the pest and disease image. When the part recognition result is that the target crop includes the target part, a secondary classification is performed through the multi-classification model to obtain a first feature map, and the first feature map is used as the target feature map. When the part recognition result is that the target crop does not include the target part, the pest and disease image is input into the target detection model to obtain a second feature map, and the second feature map is used as the target feature map. In this embodiment, the condition for inputting the pest and disease image into the target detection model is that the part recognition result of the pest and disease image output by the multi-classification model does not include the target part, and the execution of the multi-classification model depends on the output of the multi-classification model. The target feature map is the first feature map or the second feature map.

[0051] Second, the pest image is input into the multi-classification model, and the first feature map is obtained through the multi-classification model. The pest image is input into the target detection model to obtain the second feature map. In this implementation, the multi-classification model is executed independently from the multi-classification model and has no dependency. The target feature map is determined based on the first feature map and the second feature map.

[0052] The target feature map can contain detailed information about crop pests and diseases, such as pest type, location, and severity.

[0053] For example, after confirming that the uploaded image contains corn, the online agricultural platform further analyzes the image, uses the pest and disease detection model to identify the specific pest and disease types (such as corn rust) and locations on the leaves, and generates a target feature map containing this information.

[0054] In some embodiments, in the above step 40, the pest detection result of the pest image is determined according to the target feature map.

[0055] In this embodiment, it should be noted that the pest detection result refers to the type and location of the pests and diseases that are specifically present in the image that is finally determined. The pest detection result can be used to guide the user to take corresponding prevention and control measures.

[0056] According to the target feature map output by the pest detection model, the pest type and its impact in the image are analyzed to generate detailed pest detection results. The pest detection results can include the type of pest, the size and location of the infected area, etc.

[0057] In the case where the first characteristic graph is used as the target characteristic graph, the pest detection result determined based on the target characteristic graph includes the health status identification result of the target part of the target crop. Exemplarily, the pest detection result is corn root rot.

[0058] When the second feature map is used as the target feature map, the pest detection result determined based on the target feature map includes the pest identification result of the target crop. Exemplarily, the pest detection result is the pest type and location or the absence of pests.

[0059] When the target feature graph is determined based on the first feature graph and the second feature graph, the pest detection result determined based on the target feature graph includes the health status of the target part of the target crop and the pest identification result of the target crop. For example, the pest detection result is a gray spot in the center of a soybean leaf.

[0060] For example, the online platform can generate a pest and disease detection report based on the pest and disease detection results and notify users of the presence of corn rust on corn leaves. The report includes the specific location of the infection and recommended prevention and control measures, such as using specific pesticides or performing leaf pruning.

[0061] In some embodiments, when the pest detection model includes a multi-classification model, the step of inputting the pest image into a trained pest detection model to obtain a target feature map includes:

[0062] Inputting the pest image into the multi-classification model, performing a classification through the multi-classification model, and obtaining a part recognition result of the pest image, wherein the part recognition result is that the target crop includes the target part, or the target crop does not include the target part;

[0063] In a case where the part identification result is that the target crop includes the target part, secondary classification is performed through the multi-classification detection model to obtain the first feature map, wherein the target feature map is the first feature map or is determined based on the first feature map.

[0064] In this embodiment, first, the pest and disease image is input into the multi-classification model, and a classification is performed through the multi-classification model to identify the parts in the image. According to the part recognition result, it is determined whether the target crop includes the target part. If the target part is included, a secondary classification is performed to obtain the first feature map. Through the gradual refinement of the two classifications, the pest and disease parts can be identified more accurately, misjudgment can be reduced, and the overall recognition accuracy can be improved. At the same time, after one classification and filtering, unnecessary calculations can be reduced, the detection efficiency can be improved, and the overall processing speed can be significantly improved. In addition, the specific parts where pests and diseases occur can be accurately identified, which can provide more reliable data support for the diagnosis and prevention of crop pests and diseases, and improve the reliability of diagnosis.

[0065] In this embodiment, it should be noted that the primary classification refers to the preliminary classification of the input image by the multi-classification model to identify the main parts in the image. It is mainly used to determine which parts of crops are contained in the image, such as leaves, stems or fruits. The part recognition result refers to the recognition result of the parts in the image obtained by the model after the primary classification, indicating which parts are specifically contained in the image. The target crop refers to the specific crop being detected and classified. The target part refers to the specific part of the target crop, such as leaves, stems or fruits, which is the key area for detection and classification. The secondary classification refers to further detailed classification of the image after confirming that the image contains the target part, so as to obtain more feature information about the health status of the target part. The secondary classification is mainly used to identify the specific type or degree of pests and diseases. The first feature map refers to the feature map obtained after the secondary classification, which contains detailed feature information of the target part in the image, such as the health or corruption of the target part, for further analysis and processing.

[0066] In the case where the pest detection model includes a multi-classification model, the crop image containing pests and diseases is input into the multi-classification model, and the model classifies the input image once to identify the specific parts in the image. The parts included in the image are indicated in the output result after the classification. Based on the part recognition result, it is determined whether the image includes the target part. If it does, detailed classification is continued. If it does not, no further processing is required.

[0067] After confirming that the image contains the target part, secondary classification is performed to obtain the first feature map, and the output of the secondary classification contains detailed feature information of the target part, such as health or corruption, etc. The first feature map is determined as the target feature map. The multi-classification model can be a Residual Network for Multi-class Classification (ResNet) model.

[0068] In this embodiment, the target feature map can be the first feature map or be determined based on the first feature map. In specific implementation, when the execution of the target detection model is independent of the multi-classification model, the target feature map can be determined based on the first feature map and the second feature map; when the execution of the target detection model depends on the multi-classification model, the target feature map is the first feature map.

[0069] For example, an image of damaged rice leaves is input into a pre-trained multi-classification model. The model recognizes that the image shows the part of the rice stem. After the recognition result shows that the image contains the part of the rice stem, the disease type of the identified part of the rice stem is further classified to obtain a feature map of the health status characteristics of the stem, which is used for further diagnosis and analysis of pests and diseases.

[0070] In some implementations, after the pest and disease image is input into the multi-classification model and the multi-classification model performs a classification once, if the part recognition result obtained by the multi-classification model after the first classification is that the target crop includes the target part, then the multi-classification model can continue to perform a second classification to obtain a first feature map. It can be understood that in this implementation, a single input of the pest and disease image can trigger the multi-classification model to perform a first classification and a second classification.

[0071] In other implementations, after the pest image is input into the multi-classification model and the multi-classification model performs a classification once, if the part recognition result obtained by the multi-classification model after the first classification is that the target crop includes the target part, the pest image can be input into the multi-classification model again, and the multi-classification model performs a second classification to obtain a first feature map. It can be understood that in this implementation, the first classification and the second classification performed by the multi-classification model are triggered by different inputs of the pest image.

[0072] In some embodiments, when the pest detection model further includes a target detection model, after the step of inputting the pest image into the multi-classification detection model, performing a classification by the multi-classification detection model, and obtaining a part recognition result of the pest image, the method further includes:

[0073] When the part identification result is that the target crop does not include the target part, the pest image is input into the target detection model to obtain the second feature map, wherein the target feature map is the second feature map.

[0074] In this embodiment, after the pest and disease image is input into the multi-classification model, a classification is performed through the multi-classification model to identify the parts in the image. After determining whether the target crop includes the target part according to the part recognition result, if the part recognition result is that the target crop does not include the target part, the pest and disease image is input into the target detection model. The detection is performed by the target detection model to obtain a second feature map, and it is determined as the target feature map. Thereby, the detection coverage can be improved, and further detection is performed in the case of part recognition failure to ensure that potential pests and diseases can be detected even when the target part is not recognized in the initial classification. In addition, the accuracy of the detection is improved, and the specific location and morphology of the pest and disease can be accurately identified by further analyzing the image using the target detection model. The robustness and reliability of the model are enhanced, and the advantages of the multi-classification detection model and the target detection model are combined to improve the system's adaptability to different images and complex situations. The overall detection efficiency is improved, and the computational burden of the target detection model is reduced through the preliminary screening of the multi-classification detection model, and resource utilization is optimized.

[0075] In this embodiment, it should be noted that the second feature map is a feature map obtained by outputting the processing of the target detection model, and includes the pest and disease recognition result of the target crop in the pest and disease image.

[0076] In this embodiment, the execution of the target detection model depends on a multi-classification model. Specifically, in a classification process, the model determines that the part in the input image does not belong to the specific part of the target crop. After confirming that the image does not include the target part, the image is input into the target detection model to detect potential pests and diseases in the image. The output processed by the target detection model, the second feature map obtained contains the detailed feature information of the pests and diseases in the image, that is, the pest and disease recognition result of the target crop. Among them, the target detection model can be a fast regional convolutional neural network (Faster Region-Based Convolutional Neural Network, Faster R-CNN).

[0077] For example, the input image is an image showing a damaged plant, but the first classification result determines that the part is not the stem of the target crop (rice), but may be a leaf, etc. Then the above image is input into the trained target detection model to identify specific pests and diseases in the image, such as disease spots, insect pests, etc., or to identify that there is no disease in the image.

[0078] In some embodiments, when the pest detection model includes a target detection model, the step of inputting the pest image into a trained pest detection model to obtain a target feature map includes:

[0079] Inputting the pest image into the target detection model to obtain the second feature map;

[0080] Among them, the target feature map is the second feature map or is determined based on the second feature map.

[0081] In this embodiment, the pest image is input into the target detection model to obtain a second feature map, which is determined as the target feature map. The target detection model can quickly identify pests and diseases in crops and improve detection efficiency. In addition, the powerful feature extraction capability of the deep learning model can be used to more accurately identify and classify pests and diseases, reducing human misjudgment.

[0082] When the pest detection model includes a target detection model, the pest image is input into the target detection model to detect potential pest targets in the pest image, and the second feature map is obtained through the output processed by the target detection model.

[0083] In this embodiment, the target feature map can be the second feature map or be determined based on the second feature map. In specific implementation, when the execution of the target detection model is independent of the multi-classification model, the target feature map can be determined based on the first feature map and the second feature map; when the execution of the target detection model depends on the multi-classification model, the target feature map is the second feature map.

[0084] For example, if an image of rice with pests and diseases is input, after being processed by the target detection model, if there is a disease, the target detection model outputs that there is a gray spot in the center of the rice leaf. If there is no disease, the target detection model outputs that there is no disease yet.

[0085] In an embodiment of the present application, when the target feature map is based on the first feature map and the second feature map, in some implementations, the target feature map can be obtained by directly concatenating the first feature map and the second feature map.

[0086] In some embodiments, the step of inputting the pest image into a trained pest detection model to obtain a target feature map further includes:

[0087] Obtaining a first feature vector corresponding to the first feature map;

[0088] Obtaining a second feature vector corresponding to the second feature map;

[0089] Concatenate the first feature vector and the second feature vector to obtain a target feature vector;

[0090] The elements in the target feature vector are weighted averaged to obtain the target feature map.

[0091] In this embodiment, the first feature vector corresponding to the first feature map and the second feature vector corresponding to the second feature map are obtained, the first feature vector and the second feature vector are spliced ​​according to the dimension to obtain the target feature vector, and then the elements in the target feature vector are weighted averaged to obtain the target feature map. By splicing and weighted averaging feature vectors from different sources, multiple feature information can be integrated to improve the richness and accuracy of feature representation.

[0092] In this embodiment, it should be noted that the feature vector is a one-dimensional array extracted from the feature map to represent the image feature information. Concatenation is to connect two or more vectors together to form a new, longer vector. Weighted average is to perform a weighted summation of the elements in the feature vector and then take the average value to highlight the important features.

[0093] In the case where the pest detection model includes a multi-classification model and a target detection model, the target detection model does not rely on the multi-classification model for detection. Extract a first feature vector from the first feature map, the first feature vector represents detailed feature information of the target part in the image, such as the health or corruption of the target part. Extract a second feature vector from the second feature map, the second feature vector represents feature information of other parts in the image, such as gray spots in the center of a leaf. Connect the first feature vector and the second feature vector according to a fixed dimension to form a target feature vector. Perform weighted processing on each element in the target feature vector, calculate the weighted average, and form the final target feature map.

[0094] In some embodiments, before the step of acquiring the pest image, the method further includes:

[0095] Acquire a pest and disease image training set, wherein the pest and disease image training set includes at least one pest and disease image and a reference feature map of the at least one pest and disease image;

[0096] The pest and disease detection model is trained using the pest and disease image training set to obtain the trained pest and disease detection model.

[0097] In this embodiment, a pest image training set is obtained, and the pest detection model is trained using the pest image training set to obtain a trained pest detection model. Using the pest image training set containing the reference feature map, pest features can be better extracted and learned, and the accuracy of the detection model can be improved. At the same time, using a diverse training set, the model can better adapt to pest detection of different types and scenarios, and enhance the generalization ability of the model.

[0098] In this embodiment, it should be noted that the pest image training set is a set of multiple images with pest features and reference feature maps, which are used to train the pest detection model. The reference feature map is a labeled map representing the features of the disease or pest in the pest image, which is used to guide the model to learn the correct features. The pest detection model is a deep learning model for identifying and detecting pest features in an image, and may include at least one of a multi-classification model and a target detection model.

[0099] The image training set containing pest and disease characteristics is collected and organized. Each image is equipped with a corresponding reference feature map for training the model. The pest and disease image training set is input into the model for training. The pest and disease detection model obtained after training can accurately identify and detect pest and disease characteristics. The image training set is obtained by collecting multiple pest and disease images and preprocessing them. Use a high-resolution camera or drone to collect pest and disease images of the target crop, and perform image preprocessing on the collected images. Image preprocessing includes denoising, enhancement, and cropping to improve image quality. The training model includes training a multi-classification model and training a target detection model. When training a multi-classification model, EfficientNetworks (EfficientNet) can be used for multi-classification training, and then a deep learning framework can be used to train and optimize the model. The training data is classified for different parts of the target crop (such as roots, stems, leaves, etc.). When training a target detection model, it can be trained by the You Only Look Once version 8 (YOLOv8) model. Use a deep learning framework to train and optimize the target detection model. The training data is used to label small target pests and diseases in the image, such as disease spots, pests, etc.

[0100] It should be noted that the various embodiments, implementation methods and implementation methods provided in the embodiments of the present application can be implemented independently or in combination without conflicting with each other. The specific implementation method can be determined based on actual needs, and the embodiments of the present application are not limited to this.

[0101] For easier understanding, see Figure 2 , Figure 2 Schematic diagram of the identification process in the embodiment of the pest identification method provided by the present application. Figure 2 In the corresponding pest and disease identification method, the target crops are wheat and citrus, and the target parts are the roots / stems of wheat, but this does not limit the specific forms of expression of the target crops and target parts in the embodiments of the present application.

[0102] Input a pest image, and use the CV model to identify whether the pest image includes wheat or does not include crops. In the case where wheat is included in the pest image, the pest image is input into the multi-classification model, and a classification is performed using the multi-classification model. If the multi-classification model recognition result shows that the target part in the image is the root or stem of wheat, the identified wheat root or stem is further classified to obtain detailed features, such as healthy or rotten, and the pest detection result is output as healthy stem or stem rot, healthy root or root rot. If the recognition result of a classification shows that the target part in the image does not include the root or stem of wheat, the image is input into the target detection model to identify the location and type of pests and diseases, and the pest detection result is output as the disease type and location or the disease has not been identified yet.

[0103] Input a pest image, and use the CV model to identify whether the pest image includes citrus or does not include crops. If the pest image includes citrus, the pest image is input into the target detection model. If there is a disease, the pest detection result is output as the disease type and location. If there is no disease, the pest detection result is output as no disease has been identified.

[0104] Reference Figure 3 One embodiment of the present application provides a pest identification system, the system comprising:

[0105] An acquisition module 301 is used to acquire pest and disease images;

[0106] An input module 302 is used to input the pest image into a computer vision model to obtain a content recognition result of the pest image, wherein the content recognition result is that the pest image includes a target crop, or that the pest image does not include the target crop;

[0107] The detection module 303 is used to input the pest image into a trained pest detection model to obtain a target feature map when the content recognition result is that the pest image includes the target crop, wherein the pest detection model includes at least one of a multi-classification model and a target detection model; the multi-classification model outputs a first feature map, and the first feature map is used to characterize the health status recognition result of the target part of the target crop; the target detection model outputs a second feature map, and the second feature map is used to characterize the pest recognition result of the target crop; the target feature map is determined based on at least one of the first feature map and the second feature map;

[0108] The result module 304 is used to determine the pest detection result of the pest image according to the target feature map.

[0109] It should be noted that the present system embodiment and the above method embodiment are based on the same inventive concept, so the content of the above method embodiment is also applicable to the present system embodiment and will not be repeated here.

[0110] Alternatively, if Figure 4 As shown, an embodiment of the present application further provides an electronic device 400, including a processor 401 and a memory 402, wherein the memory 402 stores programs or instructions that can be executed on the processor 401, and when the program or instructions are executed by the processor 401, the various steps of the above-mentioned pest and disease identification method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.

[0111] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.

[0112] Figure 5 A schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.

[0113] The electronic device 500 includes but is not limited to: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 506, a user input unit 507, an interface unit 508, a memory 509, and a processor 510.

[0114] Those skilled in the art will appreciate that the electronic device 500 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 510 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 5 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0115] The processor 510 is used for:

[0116] Obtain pest and disease images;

[0117] Inputting the pest image into a computer vision model to obtain a content recognition result of the pest image, wherein the content recognition result is that the pest image includes a target crop, or that the pest image does not include the target crop;

[0118] In the case where the content recognition result is that the pest image includes the target crop, the pest image is input into a trained pest detection model to obtain a target feature map, wherein the pest detection model includes at least one of a multi-classification model and a target detection model; the multi-classification model outputs a first feature map, and the first feature map is used to characterize the health status recognition result of the target part of the target crop; the target detection model outputs a second feature map, and the second feature map is used to characterize the pest recognition result of the target crop; the target feature map is determined based on at least one of the first feature map and the second feature map;

[0119] The pest detection result of the pest image is determined according to the target feature map.

[0120] In some implementations, the processor 510 is further configured to:

[0121] Inputting the pest image into the multi-classification model, performing a classification through the multi-classification model, and obtaining a part recognition result of the pest image, wherein the part recognition result is that the target crop includes the target part, or the target crop does not include the target part;

[0122] In a case where the part identification result is that the target crop includes the target part, secondary classification is performed using the multi-classification model to obtain the first feature map, wherein the target feature map is the first feature map or is determined based on the first feature map.

[0123] In some implementations, the processor 510 is further configured to:

[0124] When the part identification result is that the target crop does not include the target part, the pest image is input into the target detection model to obtain the second feature map, wherein the target feature map is the second feature map.

[0125] In some implementations, the processor 510 is further configured to:

[0126] Inputting the pest image into the target detection model to obtain the second feature map;

[0127] Among them, the target feature map is the second feature map or is determined based on the second feature map.

[0128] In some implementations, the processor 510 is further configured to:

[0129] Obtaining a first feature vector corresponding to the first feature map;

[0130] Obtaining a second feature vector corresponding to the second feature map;

[0131] Concatenate the first feature vector and the second feature vector to obtain a target feature vector;

[0132] The elements in the target feature vector are weighted averaged to obtain the target feature map.

[0133] In some implementations, the processor 510 is further configured to:

[0134] Acquire a pest and disease image training set, wherein the pest and disease image training set includes at least one pest and disease image and a reference feature map of the at least one pest and disease image;

[0135] The pest and disease detection model is trained using the pest and disease image training set to obtain the trained pest and disease detection model.

[0136] It should be understood that in the embodiment of the present application, the input unit 504 may include a graphics processor (GPU) 5041 and a microphone 5042, and the graphics processor 5041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 506 may include a display panel 5061, and the display panel 5061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 507 includes a touch panel 5071 and at least one of other input devices 5072. The touch panel 5071 is also called a touch screen. The touch panel 5071 may include two parts: a touch detection device and a touch controller. Other input devices 5072 may include, but are not limited to, a physical keyboard, function keys (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0137] The memory 509 can be used to store software programs and various data. The memory 509 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 509 may include a volatile memory or a non-volatile memory, or the memory 509 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 509 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0138] The processor 510 may include one or more processing units; optionally, the processor 510 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 510.

[0139] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned display method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0140] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0141] In addition, an embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned display method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0142] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises one..." does not exclude the presence of other identical elements in the process, method, article or system including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0143] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0144] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0145] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A method for identifying pests and diseases, characterized in that: The method comprises the following steps: Obtain pest and disease images; Inputting the pest image into a computer vision model to obtain a content recognition result of the pest image, wherein the content recognition result is that the pest image includes a target crop, or that the pest image does not include the target crop; In the case where the content recognition result is that the pest image includes the target crop, the pest image is input into a trained pest detection model to obtain a target feature map, wherein the pest detection model includes at least one of a multi-classification model and a target detection model; the multi-classification model outputs a first feature map, and the first feature map is used to characterize the health status recognition result of the target part of the target crop; the target detection model outputs a second feature map, and the second feature map is used to characterize the pest recognition result of the target crop; the target feature map is determined based on at least one of the first feature map and the second feature map; The pest detection result of the pest image is determined according to the target feature map.

2. The pest identification method according to claim 1, characterized in that: In the case where the pest detection model includes a multi-classification model, the step of inputting the pest image into a trained pest detection model to obtain a target feature map includes: Inputting the pest image into the multi-classification model, performing a classification through the multi-classification model, and obtaining a part recognition result of the pest image, wherein the part recognition result is that the target crop includes the target part, or the target crop does not include the target part; In a case where the part identification result is that the target crop includes the target part, secondary classification is performed using the multi-classification model to obtain the first feature map, wherein the target feature map is the first feature map or is determined based on the first feature map.

3. The pest identification method according to claim 2, characterized in that: In the case where the pest detection model also includes a target detection model, after the step of inputting the pest image into the multi-classification model, performing a classification by the multi-classification model, and obtaining a part recognition result of the pest image, the method further includes: When the part identification result is that the target crop does not include the target part, the pest image is input into the target detection model to obtain the second feature map, wherein the target feature map is the second feature map.

4. The pest identification method according to claim 1, characterized in that: In the case where the pest detection model includes a target detection model, the step of inputting the pest image into the trained pest detection model to obtain a target feature map includes: Inputting the pest image into the target detection model to obtain the second feature map; Among them, the target feature map is the second feature map or is determined based on the second feature map.

5. The pest identification method according to claim 2 or 4, characterized in that: The step of inputting the pest image into a trained pest detection model to obtain a target feature map further includes: Obtaining a first feature vector corresponding to the first feature map; Obtaining a second feature vector corresponding to the second feature map; Concatenate the first feature vector and the second feature vector to obtain a target feature vector; The elements in the target feature vector are weighted averaged to obtain the target feature map.

6. The pest identification method according to claim 1, characterized in that: Before the step of acquiring the pest image, the method further includes: Acquire a pest and disease image training set, wherein the pest and disease image training set includes at least one pest and disease image and a reference feature map of the at least one pest and disease image; The pest and disease detection model is trained using the pest and disease image training set to obtain the trained pest and disease detection model.

7. A pest identification system, characterized in that: The system comprises: An acquisition module, used to acquire pest and disease images; An input module, used for inputting the pest image into a computer vision model to obtain a content recognition result of the pest image, wherein the content recognition result is that the pest image includes a target crop, or that the pest image does not include the target crop; A detection module, configured to input the pest image into a trained pest detection model to obtain a target feature map when the content recognition result indicates that the pest image includes the target crop, wherein the pest detection model includes at least one of a multi-classification model and a target detection model; the multi-classification model outputs a first feature map, the first feature map being used to characterize a health status recognition result of a target part of the target crop; the target detection model outputs a second feature map, the second feature map being used to characterize a pest recognition result of the target crop; the target feature map is determined based on at least one of the first feature map and the second feature map; A result module is used to determine the pest detection result of the pest image according to the target feature map.

8. A pest identification device, characterized in that: The device comprises: a memory, a processor, and a computer processing program stored in the memory and executable on the processor, wherein the computer processing program is configured to implement the steps of the pest identification method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium stores a computer processing program, and when the computer processing program is executed by the processor, the steps of the pest identification method according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the steps of the pest identification method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Insect identification device and method based on three-dimensional simulation

    CN106846462A

  • Method and system for identifying fruit tree pest and disease damage types

    CN112465038A

  • Pest and disease identification and model training method and device, electronic equipment and storage medium

    CN114596468A

  • Deep learning-based tomato disease and insect pest detection and identification method

    CN116630803A

  • Accurate identification method and system for frequent insect pests of crops

    CN117115858A

Cited By

  • Paddy rice disease and insect pest intelligent monitoring system and method based on image recognition

    CN120894633A