Pest and disease identification method and system based on open set identification

Through the open set recognition method, the pre-trained model and OpenMax algorithm are used to solve the problem that traditional pest recognition methods are difficult to identify new pests and diseases, and achieve higher recognition accuracy and robustness.

CN120047718APending Publication Date: 2025-05-27AISINO CORPORATION +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411980120.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

Traditional pest identification methods based on known categories are difficult to identify new pest species, and are not effective in the face of unknown categories.

Method used

Using an open set recognition method, crawling crop picture data, constructing pest data sets, and fine-tuning using pre-trained models, combining OpenMax algorithm to achieve open set recognition of pests and diseases.

Benefits of technology

It improves the accuracy and robustness of pest identification, can effectively identify known and unknown pest species, reduce false alarm rates, and enhance the practicality and adaptability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120047718A_ABST
    Figure CN120047718A_ABST
Patent Text Reader

Abstract

The invention discloses a pest and disease damage identification method and system based on open set identification, and the method comprises the steps: crawling crop picture data based on keywords, carrying out the data cleaning of the crop picture data, removing repeated, fuzzy or irrelevant pictures, and constructing a pest and disease damage data set; the method comprises the following steps: managing a pest and disease damage data set through a comma separation value (CSV) file, wherein the CSV file comprises three columns of key information: file Name, file Path and label category; pre-training the model based on the pest and disease damage data set, and finely adjusting output layer parameters to obtain a pre-trained model; and based on the pre-training model, fitting various disease and insect pest curve graphs, and calculating an openmax score to realize disease and insect pest open set identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of recognition algorithms, and more particularly, to a pest and disease recognition method and system based on open set recognition. Background Art

[0002] Crop pests and diseases are one of the main factors affecting agricultural production safety, the quality of agricultural products, and the sustainable development of agriculture. The outbreak of pests and diseases will not only lead to crop yield reduction and quality decline, but in severe cases, it may even result in a complete crop failure, bringing huge economic losses to farmers. With the advancement of agricultural modernization, higher requirements are put forward for the efficiency and accuracy of pest and disease recognition. The agricultural production requires a technical means that can quickly and accurately identify pests and diseases, so as to take prevention and control measures in a timely manner and reduce losses.

[0003] In addition, there are a wide variety of crop pests and diseases, and there may be similar symptoms or characteristics between different species. Moreover, with the changes in climate, ecological environment, and agricultural production methods, new pest and disease species are constantly emerging, which poses challenges to traditional recognition methods based on known categories. In order to effectively identify known pest and disease species and accurately distinguish unknown pest and disease species, through image recognition technology based on transfer learning, it is possible to achieve real-time and online recognition of crop pests and diseases accurately. At the same time, combined with open set recognition (OSR) technology, by accurately distinguishing known and unknown categories, it helps to improve the robustness and adaptability of the algorithm. Summary of the Invention

[0004] According to the present invention, there is provided a pest and disease recognition method and system based on open set recognition to solve the technical problem that the traditional recognition method based on known categories cannot recognize current pests and diseases.

[0005] According to the first aspect of the present invention, there is provided a pest and disease recognition method based on open set recognition, including:

[0006] Crawling crop picture data based on keywords, cleaning the crop picture data, removing duplicate, blurred or irrelevant pictures, and constructing a pest and disease data set;

[0007] Managing the pest and disease data set through a comma-separated values (CSV) file, where the CSV file contains three columns of key information: file name fileName, file path filePath, and label category label;

[0008] Pre-training a model based on the pest and disease data set, fine-tuning the parameters of the output layer, and obtaining a pre-trained model;

[0009] Based on the pre-trained model, fitting curves of various pests and diseases, calculating openmax scores, and realizing open set recognition of pests and diseases.

[0010] Optionally, crawl crop image data based on keywords, clean the crop image data, remove duplicate, blurred or irrelevant images, and construct a pest and disease dataset, including:

[0011] Determine the categories of crop images based on keywords, crawl crop image data, and determine the number of crop images in each category;

[0012] Clean the number of crop images in each category, remove duplicate, blurred or irrelevant images, and construct a pest and disease dataset.

[0013] Optionally, based on the pre-trained model, fit curves of various pests and diseases, calculate the openmax score, and achieve open-set recognition of pests and diseases, including:

[0014] Based on the pre-trained model, fit curves of various pests and diseases, calculate the openmax score, mark unknown categories, and process and identify the crop image data of unknown categories.

[0015] Optionally, based on the pre-trained model, fit curves of various pests and diseases, calculate the openmax score, and achieve open-set recognition of pests and diseases, including:

[0016] Input an open-set test sample, load the pre-trained model, and obtain a feature vector and a softmax vector;

[0017] Obtain the feature vector value corresponding to the maximum value of the softmax vector, and load various Weibull curves and means;

[0018] Calculate distances according to the means of each category saved, and calculate distances according to various Weibull curves;

[0019] Calculate the correction weights according to the probabilities of each category, correct the feature vector according to the correction weights, and define and calculate the feature values of unknown categories;

[0020] Reconstruct the openmax score according to the feature vector, and perform open-set recognition according to the maximum openmax score.

[0021] According to another aspect of the present invention, there is also provided a pest and disease recognition system based on open-set recognition, including:

[0022] A dataset construction module for crawling crop image data based on keywords, cleaning the crop image data, removing duplicate, blurred or irrelevant images, and constructing a pest and disease dataset;

[0023] A management dataset module for managing pest and disease datasets through a Comma-Separated Values (CSV) file, where the CSV file contains three columns of key information: file name (fileName), file path (filePath), and label category (label).

[0024] A training model acquisition module for pre-training a model based on pest and disease datasets, fine-tuning the output layer parameters, and obtaining a pre-trained model.

[0025] An open-set pest and disease recognition module for fitting curves of various pests and diseases based on the pre-trained model, calculating openmax scores, and realizing open-set pest and disease recognition.

[0026] Optionally, a dataset construction module includes:

[0027] A crop image crawling sub-module for determining the categories of crop images based on keywords, crawling crop image data, and determining the number of crop images in each category.

[0028] A preprocessing image sub-module for cleaning the data of the number of crop images in each category, removing duplicate, blurred, or irrelevant images, and constructing a pest and disease dataset.

[0029] Optionally, the open-set pest and disease recognition module includes:

[0030] An open-set pest and disease recognition sub-module for fitting curves of various pests and diseases based on the pre-trained model, calculating openmax scores, marking unknown categories, and processing and recognizing crop image data of unknown categories.

[0031] Optionally, the open-set pest and disease recognition module includes:

[0032] A feature vector acquisition sub-module for inputting open-set test samples, loading the pre-trained model, and obtaining feature vectors and softmax vectors.

[0033] A Weibull curve loading sub-module for obtaining the feature vector value corresponding to the maximum value of the softmax vector, and loading various Weibull curves and means.

[0034] A distance calculation sub-module for calculating distances according to the saved means of each category and calculating distances according to various Weibull curves.

[0035] An unknown category eigenvalue calculation sub-module for calculating corrected weights according to the probabilities of each category, correcting the feature vectors according to the corrected weights, and defining and calculating unknown category eigenvalues.

[0036] An open-set recognition sub-module for recognizing openmax scores reconstructed from feature vectors and performing open-set recognition based on the maximum openmax score.

[0037] According to another aspect of the present invention, there is also provided a computer-readable storage medium, on which a computer program is stored, characterized in that when the program is executed by a processor, it implements the steps of the method described in any one of the above.

[0038] According to another aspect of the present invention, there is also provided an electronic device, including:

[0039] The computer-readable storage medium described above; and

[0040] One or more processors for executing the program in the computer-readable storage medium.

[0041] Thus, by using web crawler technology to automatically crawl crop pest and disease pictures, through image processing technology to clean, label and unify the picture format, construct a high-quality data set, and incorporate open set data to enhance the generalization ability of the model. Only fine-tune the output layer of the model to quickly adapt to the crop pest and disease recognition task. Use the openmax algorithm to identify pictures that do not belong to known pest and disease categories, improve the practicability and robustness of the system to cope with unknown situations. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] By referring to the following drawings, the exemplary embodiments of the present invention can be more fully understood:

[0043] Figure 1 It is a schematic flowchart of a method for pest and disease recognition based on open set recognition described in this embodiment;

[0044] Figure 2 It is a schematic diagram of the pest and disease recognition algorithm architecture described in this embodiment;

[0045] Figure 3 It is a schematic diagram of the CSV file described in this embodiment;

[0046] Figure 4 As shown in the flowchart of the OpenMax open set recognition algorithm described in this embodiment:

[0047] Figure 5 It is a schematic diagram of selecting five pictures from the non-pest and disease data set as detection data to verify the open set recognition effect described in this embodiment;

[0048] Figure 6 It is a schematic diagram of a system for pest and disease recognition based on open set recognition described in this embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0049] Reference will now be made to the accompanying drawings to describe exemplary embodiments of the present invention. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. These embodiments are provided to disclose the present invention in detail and completely, and to fully convey the scope of the present invention to those skilled in the art. The terms in the exemplary embodiments shown in the drawings are not intended to limit the present invention. In the drawings, the same units / components are denoted by the same reference numerals.

[0050] Unless otherwise specified, the terms used herein (including scientific and technical terms) have the ordinary meaning understood by those skilled in the art. Additionally, it can be understood that terms defined in a commonly used dictionary should be construed to have a meaning consistent with the context of their relevant fields, and should not be construed as having an idealized or overly formal meaning.

[0051] According to a first aspect of the present invention, there is provided a pest and disease identification method for open-set recognition, 100, referring to Figure 1 As shown, the method 100 includes:

[0052] S101: Crawl crop image data based on keywords, clean the crop image data, remove duplicate, blurred or irrelevant images, and construct a pest and disease dataset;

[0053] S102: Manage the pest and disease dataset through a comma-separated values (CSV) file, where the CSV file contains three columns of key information: file name fileName, file path filePath, and label category label;

[0054] S103: Pre-train the model based on the pest and disease dataset, fine-tune the output layer parameters, and obtain a pre-trained model;

[0055] S104: Based on the pre-trained model, fit the curve graphs of various pests and diseases, calculate the openmax score, and achieve open-set recognition of pests and diseases.

[0056] Specifically, in order to improve the accuracy and effect of image recognition, the model training and testing processes must rely on a large amount of diverse relevant image data. This image data is not only used to train the model to learn recognition features, but also used in the testing phase to verify and optimize the performance of the model. To verify the algorithm effect, the present invention takes tomatoes as an example, crawls tomato crop images to construct a dataset. A python script is used for web scraping to obtain network images. Referring to Figure 2As shown, the crawling sources are Baidu Images and Bing Images, and the crawling keywords are "tomato", "tomato", "Tomato", "tomato bacterial spot", "tomato Bacterial spot", "tomato early blight spot", "tomato Early blight", "tomato late blight spot", "tomato Late blight", "tomato leaf mold", "tomato Leaf Mold", "tomato powdery mildew", "tomato powdery mildew", "tomato septoria leaf spot", "tomato Septoria leaf spot", "tomato spider mite", "tomato Spider Two-spotted spider mite", "tomato target leaf spot", "tomato target leaf spot", "Tomato mosaic virus", "tomato mosaic virus", "Tomato Yellow Leaf Curl Virus", "tomato yellow leaf curl virus disease", "tomato healthy leaf", "tomato healthy leaf". A total of 12 types of image data were crawled. After the data cleaning step, duplicate, blurred or irrelevant images were removed, and finally a dataset containing 11,858 images was formed. The data volumes of the 12 types of image data are shown in Table 1 below:

[0057] Table 1 Tomato Pest and Disease Dataset

[0058] Bacterial speck of tomato Early blight spot of tomato Tomato fruit 889 1749 1714 Healthy leaf of tomato Late blight spot of tomato Leaf mold of tomato 1046 934 814 Powdery mildew of tomato Septoria leaf spot of tomato Tomato spider mite 628 1481 548 Target spot of tomato Tomato mosaic virus Tomato yellow leaf curl virus disease 577 819 659

[0059] To further improve the efficiency and convenience of model training, CSV files were used to manage this data. This CSV file contains three columns of key information: file name (fileName), file path (filePath), and label category (label). Its structure is as Figure 3 shown.

[0060] Transfer learning allows the transfer of knowledge from the source domain (abundant data) to the target domain (scarce data), thus significantly reducing the need for a large amount of labeled data in the target domain. In the case where the cost of data annotation in the target domain is high, transfer learning can utilize the existing labeled data in the source domain and reduce the annotation work in the target domain. In this invention, the RESNET18 model was selected as the pre-trained model, and the constructed tomato pest and disease dataset was used to pre-train the model, and the parameters of the output layer were fine-tuned, and the classification accuracy of the 12 types of data reached more than 99%.

[0061] Refer to Figure 4As shown, the Open Set Recognition (OSR) technology is a technique that, in classification problems, not only identifies known classes but also accurately labels unknown classes as "unknown" or "other". This technology is closer to real-world situations because in practical applications, it is often impossible to predict which new classes will be encountered in the future. The OSR technology focuses on the handling of unknown classes that do not appear in the training set, aiming to solve the problem of new classes that may arise in the real world. Traditional classification methods only consider known classes, while open set recognition requires the model to identify "unknown" when encountering unknown classes. In order to accurately identify unknown classes that do not belong to the tomato pest and disease dataset, the present invention selects the OpneMax algorithm to achieve open set recognition.

[0062] Reference Figure 5 As shown, five pictures from the non-pest and disease dataset are selected as test data to verify the open set recognition effect. A total of 5 pictures are selected for testing, and the test accuracy rate is 100%. The classification results are shown in Table 2:

[0063] Table 2 Open Set Recognition Results

[0064] OpenMax score OpenMax predicted class True class Prediction result 0.6499 Tomato__unknow Tomato__unknow Unknown class 0.5940 Tomato__unknow Tomato__unknow Unknown class 0.6757 Tomato__unknow Tomato__unknow Unknown class 0.6599 Tomato__unknow Tomato__unknow Unknown class 0.5223 Tomato__unknow Tomato__unknow Unknown class

[0065] The pest and disease recognition algorithm combined with the OSR (Open Set Recognition) technology has brought significant benefits in agricultural pest and disease monitoring and management. The OSR technology is a machine learning technology that can effectively process unknown or new class data while identifying known classes. Applying it to the pest and disease recognition algorithm can bring the following main advantages:

[0066] Improve recognition accuracy and expand the recognition scope. Traditional pest and disease recognition algorithms are often limited to preset pest and disease types. After combining the OSR technology, the algorithm can identify pest and disease types not included in the training set and label them as unknown classes, thus improving the comprehensiveness and accuracy of recognition. At the same time, reduce the false alarm rate. When encountering new pest and disease types, traditional algorithms may misclassify them as known classes, resulting in false alarms. The OSR technology can identify and process these unknown classes, effectively reducing the false alarm rate.

[0067] Enhance decision-making support capabilities and provide comprehensive information. By identifying known and unknown pest and disease types, the pest and disease recognition algorithm combined with the OSR technology can provide more comprehensive pest and disease information for agricultural production. This helps farmers and agricultural experts more accurately judge the occurrence degree and damage degree of pests and diseases. Assist in scientific decision-making. Based on comprehensive pest and disease information, farmers and agricultural experts can formulate more scientific and reasonable pest and disease control plans, reduce the abuse and waste of pesticides, and improve the control effect.

[0068] In addition, the pest and disease control method provided by the present invention is applicable not only to tomatoes but also to other crops.

[0069] Optionally, based on keywords, crawl crop picture data, clean the crop picture data to remove duplicate, blurred or irrelevant pictures, and construct a pest and disease dataset, including:

[0070] Determine the category of crop pictures based on keywords, crawl crop picture data, and determine the number of crop pictures in each category;

[0071] Clean the number of crop pictures in each category to remove duplicate, blurred or irrelevant pictures, and construct a pest and disease dataset.

[0072] Optionally, based on the pre-trained model, fit various pest and disease curve graphs, calculate the openmax score, and achieve open-set recognition of pests and diseases, including:

[0073] Based on the pre-trained model, fit various pest and disease curve graphs, calculate the openmax score, mark unknown categories, and process and identify the crop picture data of unknown categories.

[0074] Optionally, based on the pre-trained model, fit various pest and disease curve graphs, calculate the openmax score, and achieve open-set recognition of pests and diseases, including:

[0075] Input an open-set test sample, load the pre-trained model, and obtain a feature vector and a softmax vector;

[0076] Obtain the feature vector value corresponding to the maximum value of the softmax vector, and load various Weibull curves and means;

[0077] Calculate the distance according to the means of each category saved, and calculate the distance according to various Weibull curves;

[0078] Calculate the correction weight according to the probabilities of each category, correct the feature vector according to the correction weight, and define and calculate the feature value of the unknown category;

[0079] Reconstruct the openmax score according to the feature vector, and perform open-set recognition according to the maximum openmax score.

[0080] Thus, use web crawler technology to automatically crawl crop pest and disease pictures, clean, label and unify the picture format through image processing technology, construct a high-quality dataset, and incorporate open-set data to enhance the generalization ability of the model. Only fine-tune the output layer of the model to quickly adapt to the crop pest and disease recognition task. Use the openmax algorithm to identify pictures that do not belong to known pest and disease categories, and improve the practicability and robustness of the system to cope with unknown situations.

[0081] According to another aspect of the present invention, a pest and disease identification system 600 based on open set recognition is also provided. Referring to Figure 6 as shown, the system 600 includes:

[0082] A dataset construction module 610, configured to crawl crop image data based on keywords, perform data cleaning on the crop image data, remove duplicate, blurred or irrelevant images, and construct a pest and disease dataset;

[0083] A dataset management module 620, configured to manage the pest and disease dataset through a comma-separated values (CSV) file, where the CSV file contains three columns of key information: file name fileName, file path filePath, and label category label;

[0084] A pre-trained model acquisition module 630, configured to pre-train a model based on the pest and disease dataset, fine-tune the output layer parameters, and obtain a pre-trained model;

[0085] An open set pest and disease identification module 640, configured to fit curves of various pests and diseases based on the pre-trained model, calculate the openmax score, and implement open set identification of pests and diseases.

[0086] Optionally, the dataset construction module includes:

[0087] An image crawling sub-module, configured to determine the category of crop images based on keywords, crawl crop image data, and determine the number of crop images in each category;

[0088] An image preprocessing sub-module, configured to perform data cleaning on the number of crop images in each category, remove duplicate, blurred or irrelevant images, and construct a pest and disease dataset.

[0089] Optionally, the open set pest and disease identification module includes:

[0090] An open set pest and disease identification sub-module, configured to fit curves of various pests and diseases based on the pre-trained model, calculate the openmax score, mark unknown categories, and process and identify crop image data of unknown categories.

[0091] Optionally, the open set pest and disease identification module includes:

[0092] A feature vector acquisition sub-module, configured to input open set test samples, load the pre-trained model, and obtain a feature vector and a softmax vector;

[0093] A Weibull curve loading sub-module, configured to obtain the feature vector value corresponding to the maximum value of the softmax vector, and load various Weibull curves and means;

[0094] A distance calculation sub-module, configured to calculate distances based on the saved means of various categories and calculate distances based on various Weber curves;

[0095] An unknown category eigenvalue calculation sub-module, configured to calculate corrected weights based on the probabilities of various categories, correct the feature vectors according to the corrected weights, and define and calculate the eigenvalues of the unknown category;

[0096] An open-set recognition sub-module, configured to recognize the openmax scores obtained by reconstructing the feature vectors and perform open-set recognition based on the maximum openmax score.

[0097] A system 600 for pest and disease identification based on open-set recognition according to an embodiment of the present invention corresponds to a method 100 for pest and disease identification based on open-set recognition according to another embodiment of the present invention, which will not be elaborated herein.

[0098] According to another aspect of the present invention, there is also provided a computer-readable storage medium, on which a computer program is stored, characterized in that when the program is executed by a processor, the steps of the method described in any one of the above are implemented.

[0099] According to another aspect of the present invention, there is also provided an electronic device, including:

[0100] The computer-readable storage medium as described above; and

[0101] One or more processors, configured to execute the program in the computer-readable storage medium.

[0102] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes. The solutions in the embodiments of the present application can be implemented in various computer languages, for example, object-oriented programming languages such as Java and interpreted scripting languages such as JavaScript.

[0103] This application is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, as well as the combination of flows and / or blocks in the flowchart and / or block diagram. These computer program instructions can be provided to the processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing device produce a means for implementing the functions specified in the Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.

[0104] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufactured article including an instruction means that implements the functions specified in the Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.

[0105] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in the Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.

[0106] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications once they learn the basic creative concepts. Therefore, the appended claims are intended to be construed to include the preferred embodiments as well as all changes and modifications falling within the scope of the present application.

[0107] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these changes and modifications.

Claims

1. A method for identifying pests and diseases based on open set recognition, characterized in that: include: Crawling crop image data based on keywords, performing data cleaning on the crop image data, removing duplicate, blurred or irrelevant images, and constructing a pest and disease dataset; The pest and disease dataset is managed through a comma-separated value CSV file, which contains three columns of key information: file name fileName, file path filePath and label category label; Pre-train the model based on the pest and disease dataset, fine-tune the output layer parameters, and obtain the pre-trained model; Based on the pre-trained model, various pest curves are fitted, and the openmax scores are calculated to achieve open set recognition of pests and diseases.

2. The method according to claim 1, characterized in that Crawling crop image data based on keywords, cleaning the crop image data, removing duplicate, fuzzy or irrelevant images, and constructing a pest and disease dataset, including: Determine the categories of crop images based on keywords, crawl crop image data, and determine the number of crop images in each category; The number of crop images in each category is cleaned, duplicate, blurred or irrelevant images are removed, and a pest and disease dataset is constructed.

3. The method according to claim 1, characterized in that Based on the pre-trained model, various pest curves are fitted, the openmax score is calculated, and open set recognition of pests and diseases is realized, including: Based on the pre-trained model, various pest and disease curves are fitted, the openmax scores are calculated, unknown categories are marked, and crop image data of unknown categories are processed and identified.

4. The method according to claim 1, characterized in that: Based on the pre-trained model, various pest curves are fitted, the openmax score is calculated, and open set recognition of pests and diseases is realized, including: Input open set test samples, load the pre-trained model, and obtain feature vectors and softmax vectors; Get the eigenvector value corresponding to the maximum value of the softmax vector, and load various Weibull curves and means; Calculate the distance based on the saved mean of each category, and calculate the distance based on various Weibull curves; Calculate the modified weights according to the probability of each category, modify the feature vector according to the modified weights, and define and calculate the unknown category feature values; The openmax score is obtained according to the feature vector reconstruction, and open set recognition is performed according to the maximum openmax score.

5. A system for identifying pests and diseases based on open set recognition, characterized in that: include: A data set construction module is used to crawl crop image data based on keywords, perform data cleaning on the crop image data, remove duplicate, blurred or irrelevant images, and construct a pest and disease dataset; The dataset management module is used to manage the pest and disease dataset through a comma-separated value CSV file. The CSV file contains three columns of key information: file name fileName, file path filePath and label category label; Obtain training model module, which is used to pre-train the model based on the pest and disease dataset, fine-tune the output layer parameters, and obtain the pre-trained model; The open set identification module for pests and diseases is used to fit various pest and disease curves based on the pre-trained model, calculate the openmax score, and realize the open set identification of pests and diseases.

6. The system according to claim 5, characterized in that Build the dataset module, including: The crawling picture submodule is used to determine the category of crop pictures based on keywords, crawl crop picture data, and determine the number of crop pictures in each category; The preprocessing image submodule is used to perform data cleaning on the number of crop images of each category, remove duplicate, blurred or irrelevant images, and construct a pest and disease dataset.

7. The system according to claim 6, characterized in that Open set of pest and disease identification modules, including: The open set pest and disease identification submodule is used to fit various pest and disease curves based on the pre-trained model, calculate the openmax score, mark unknown categories, and process and identify crop image data of unknown categories.

8. The system according to claim 7, characterized in that Open set of pest and disease identification modules, including: Get feature vector submodule, which is used to input open set test samples, load the pre-trained model, and obtain feature vectors and softmax vectors; Load the Weibull curve submodule to obtain the eigenvector value corresponding to the maximum value of the softmax vector, and load various Weibull curves and means; The distance calculation submodule is used to calculate the distance according to the saved mean of each category and the distance according to various Weibull curves; The submodule for calculating the unknown category eigenvalue is used to calculate the correction weight according to the probability of each category, correct the eigenvector according to the correction weight, and define and calculate the unknown category eigenvalue; The open set recognition submodule is used to identify the openmax score obtained by reconstructing the feature vector and perform open set recognition based on the maximum openmax score.

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

10. An electronic device, characterized in that: include: The computer readable storage medium as claimed in claim 9; as well as One or more processors are used to execute the program in the computer-readable storage medium.

Citation Information

Patent Citations

  • An open set identification method and device for electromagnetic signals

    CN109934269A

  • Small sample plant disease identification method based on transfer learning and self-learning

    CN113298150A

  • Unknown attack intrusion detection method and device and computer readable storage medium

    CN115580445A