Agricultural pest identification method, device, equipment and storage medium

By constructing an agricultural pest sample database and optimizing the identification model, the problem of low training sample collection efficiency and pest severity assessment accuracy in agricultural pest identification has been solved, and efficient pest identification and assessment adapted to the region and environment have been achieved.

CN118397461BActive Publication Date: 2024-08-27SICHUAN CHENHAI DIGITAL INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410850945.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-08-27
Estimated Expiration
2044-06-28

AI Technical Summary

Technical Problem

Existing agricultural pest identification technology has problems such as low efficiency in training sample collection, unsatisfactory recognition accuracy, and low accuracy in pest severity assessment, especially due to differences in pest representation caused by regional and environmental differences.

Method used

By obtaining crop pest images and pest representation related information in the monitoring area, an agricultural pest sample database is constructed, and based on the pest representation information, target sample selection and model verification and correction are performed, and the agricultural pest identification model is optimized to adapt to the current region and environment.

Benefits of technology

It improves the collection efficiency and identification accuracy of training samples for agricultural pest identification, provides regional and environmentally differentiated pest level assessment solutions, and solves the problem of accuracy in pest level assessment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118397461B
    Figure CN118397461B
Patent Text Reader

Abstract

The present invention relates to the field of smart agricultural technology, and discloses an agricultural pest identification method, device, equipment and storage medium. An agricultural pest sample database is constructed by acquiring crop pest images collected in several monitoring areas. When training an agricultural pest identification model, suitable target agricultural pest samples are selected from the agricultural pest sample database based on pest characterization association information. The agricultural pest identification model is continuously verified and corrected to finally obtain an agricultural pest identification model adapted to the current region and the current environment. The invention can avoid the influence of training sample differences caused by the external environment on the agricultural pest identification accuracy. At the same time, it can also provide a pest degree assessment scheme differentiated by region and environment, and solve the technical problems of low training sample collection efficiency, unsatisfactory pest identification accuracy and low pest degree assessment accuracy in current agricultural pest identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of smart agricultural technology, and in particular to an agricultural pest identification method, device, equipment and storage medium. Background Art

[0002] Agricultural pests seriously affect the growth and yield of crops. In this regard, traditional agricultural pest monitoring methods usually rely on manual inspections, which are inefficient, costly, and prone to missed detections. With the development of computer vision and deep learning technology, automated agricultural pest detection has become a powerful means to solve this problem. For a variety of crop pest images, in natural environments, due to the wide variety of pests and the similarity of small target features, pest detection is difficult and the recognition accuracy is low. At present, pest research based on deep learning involves various crop pests, and applying target detection technology to crop pests has become the main research direction in this field.

[0003] However, existing agricultural pest identification solutions based on deep learning have the following defects:

[0004] (1) Training sample collection: Deep learning uses a large number of accurate agricultural pest sample images for model training. When faced with different types of agricultural pest identification, it is necessary to prepare a large number of images of different crops for different agricultural pests to provide enough features for model learning. At present, the collection of training samples is time-consuming, labor-intensive, costly, and inefficient.

[0005] (2) Impact of sample differences: Although the solution of sharing pest sample images can solve the problem of the number of training samples to a certain extent, the shared pest sample images are usually crop pest images from different regions and environments. Crops in different regions and environments usually have different pest manifestations (such as differences in shape, size, and distribution) due to differences in pathogens and climate. At the same time, since crops in different regions have different growth schedules, crops at different stages have differences in pest representation (for example, the color of corn spots in the seedling stage is brighter, and the color of corn spots in the growth stage is darker). Therefore, when using shared pest sample images for deep learning training, there may be inaccurate training sample images, and additional features are introduced for learning and training, making the accuracy of the final recognition model less than ideal.

[0006] (3) Pest severity assessment: The purpose of agricultural pest assessment is usually to determine the type of pests currently affecting crops and the severity of the pests, so as to guide the selection of pest control measures (such as pruning, spraying, introducing natural enemies of pests, etc.) during agricultural production. However, due to differences in pest manifestations in different regions and environments, inaccurate assessments of pest severity may occur, which in turn affects the pest control guidance for agricultural production.

[0007] Therefore, how to improve the efficiency of training sample collection, model recognition accuracy and pest severity assessment accuracy of agricultural pests is a technical problem that needs to be solved urgently. Summary of the invention

[0008] The main purpose of the present invention is to provide an agricultural pest identification method, device, equipment and storage medium, aiming to solve the technical problems of low efficiency of training sample collection, unsatisfactory pest identification accuracy and low accuracy of pest degree assessment in current agricultural pest identification.

[0009] To achieve the above object, the present invention provides an agricultural pest identification method, comprising the following steps:

[0010] Acquire crop pest images and pest characterization-related information collected in a number of monitoring areas; wherein the pest characterization-related information includes crop planting locations and crop planting environment parameters;

[0011] Based on several crop pest images, the pest degree annotation results of each crop pest image and pest characterization association information, an agricultural pest sample database is constructed;

[0012] Upon receiving a target agricultural pest identification request, extracting the image of the crop to be identified and the target pest characterization association information in the target agricultural pest identification request, and determining the target agricultural pest sample in the agricultural pest sample database using the target pest characterization association information;

[0013] The target agricultural pest samples are used to train the constructed initial agricultural pest identification model, and the trained intermediate agricultural pest identification model is verified and corrected according to the target pest representation association information to obtain the trained final agricultural pest identification model;

[0014] The crop image to be identified is input into the final agricultural pest identification model that has been trained to obtain a crop pest identification result, and the degree of the crop pest identification result is evaluated based on the pest degree labeling results of the crop pest images in the agricultural pest sample database.

[0015] Optionally, the step of obtaining crop pest images and pest characterization association information collected in a plurality of monitoring areas specifically includes:

[0016] Acquire crop pest images collected by a plurality of insect situation lamps set in each monitoring area and pest characterization correlation information collected by a crop planting condition monitoring component set in each monitoring area;

[0017] The crop planting condition monitoring component includes a crop planting position sensing component for collecting crop planting positions in a corresponding monitoring area and a crop planting environment sensing component for collecting crop planting environment parameters in a corresponding monitoring area;

[0018] The pest characterization association information collected in each monitoring area is added as additional information of the crop pest image collected in the monitoring area.

[0019] Optionally, the step of constructing an agricultural pest sample database based on a plurality of crop pest images, the pest degree annotation results of each crop pest image, and pest characterization association information specifically includes:

[0020] The crop pest images collected in each monitoring area are sent to the agricultural planting management terminal corresponding to the monitoring area, and the pest degree of each crop pest image is marked according to the pest degree evaluation fed back by the agricultural planting management terminal;

[0021] A pest information association relationship is established between the crop pest image, the pest characterization association information attached to the crop pest image and the pest degree annotation result, and an agricultural pest sample database is constructed according to the pest information association relationship of each monitoring area.

[0022] Optionally, the target pest characterization association information includes: a target crop planting location corresponding to the crop image to be identified; and the step of determining the target agricultural pest sample in the agricultural pest sample database using the target pest characterization association information specifically includes:

[0023] Extracting the target crop planting location corresponding to the crop image to be identified in the target pest characterization association information, and determining the scope of action of the agricultural pest sample based on the target crop planting location;

[0024] The scope of action of the agricultural pest samples is configured as the area consisting of all monitoring areas whose distances from the crop planting location to the target crop planting location are within a preset distance;

[0025] A plurality of target crop pest images that fall within the scope of the agricultural pest sample are selected from the agricultural pest sample database, and an image set consisting of the plurality of target crop pest images is used as a target agricultural pest sample for the target agricultural pest identification request.

[0026] Optionally, the target pest characterization association information includes: target crop planting environment parameters corresponding to the crop image to be identified; using the target agricultural pest sample to train the constructed initial agricultural pest recognition model, and verifying and correcting the trained intermediate agricultural pest recognition model according to the target pest characterization association information to obtain the final agricultural pest recognition model after training, specifically including:

[0027] A number of target crop pest images in the target agricultural pest samples are randomly divided into agricultural pest training samples and agricultural pest verification samples according to a preset ratio;

[0028] The constructed initial agricultural pest identification model is trained using the agricultural pest training samples, and the accuracy of the trained intermediate agricultural pest identification model is verified using the agricultural pest verification samples to determine whether the verification accuracy meets the preset indicator;

[0029] If yes, the intermediate agricultural pest identification model is used as the final agricultural pest identification model; if no, the optimization action of the scope of action of agricultural pest samples is performed according to the target crop planting environment parameters and the crop planting environment parameters of each monitoring area, and the optimized agricultural pest sample scope is used to return to the step of determining the target agricultural pest sample and the model training and verification step until the verification accuracy meets the preset index, and the revised agricultural pest identification model is obtained;

[0030] Using the revised agricultural pest identification model as the final agricultural pest identification model;

[0031] The optimization action of performing the action range of agricultural pest samples is configured to add the target monitoring area to the current action range of agricultural pest samples to obtain the optimized action range of agricultural pest samples, and the target monitoring area is configured as each monitoring area where the value variance of the crop planting environment parameter and the target crop planting environment parameter at several sampling points within the duration of crop planting is within a preset value range;

[0032] When performing each optimization action of the action range of agricultural pest samples, the preset numerical range of this optimization action is adjusted to L times of the previous one, where L is a constant greater than 1.

[0033] Optionally, before the step of training the constructed initial agricultural pest recognition model using the target agricultural pest sample, the method further includes:

[0034] Constructing an original agricultural pest recognition model based on the YOLOv5 algorithm architecture; wherein the original agricultural pest recognition model includes an input end, a backbone network, and a head network in the YOLOv5 algorithm architecture;

[0035] The original agricultural pest identification model is improved to obtain an initial agricultural pest identification model; wherein the improvement of the original agricultural pest identification model includes:

[0036] The first improvement action: adding a CA attention module between the C3 module and the SPPF module in the backbone network; wherein the C3 module is configured as a convolutional neural network module consisting of three Conv modules and one Bottleneck module, the SPPF module is configured as a fast spatial pyramid pooling module, and the CA attention module is configured to decompose the input feature vector into two one-dimensional feature codes, aggregate features along two spatial directions, one spatial direction captures long-range dependencies, and the other spatial direction retains precise position information;

[0037] The second improvement action: replace the C3 module in the head network with a c2f module; wherein the c2f module is configured as a convolutional neural network module consisting of a Conv module, a BN module and a SILU module.

[0038] Optionally, based on the pest degree labeling results of the crop pest images in the agricultural pest sample database, a degree evaluation step is performed on the crop pest identification results, specifically including:

[0039] Extracting crop pest images of target agricultural pest samples and pest degree annotation results of the crop pest images from the agricultural pest sample database;

[0040] Calculate the lesion performance characteristic value of each crop pest image in the target agricultural pest sample, and obtain a curve of the pest severity level with respect to the lesion performance characteristic value by fitting based on the lesion performance characteristic value and the pest severity labeling result; wherein the lesion performance characteristic value includes the lesion area or lesion color value of the crop pest image;

[0041] According to the actual lesion manifestation characteristic value of the crop image to be identified in the crop pest identification result, the pest degree level of the crop image to be identified is determined by using the variation curve of the pest degree level with respect to the lesion manifestation characteristic value.

[0042] In addition, in order to achieve the above-mentioned purpose, the present invention also provides an agricultural pest identification device, comprising:

[0043] An acquisition module, used to acquire crop pest images and pest characterization associated information collected in a number of monitoring areas; wherein the pest characterization associated information includes crop planting locations and crop planting environment parameters;

[0044] A construction module, used to construct an agricultural pest sample database based on a number of crop pest images, pest degree annotation results of each crop pest image, and pest characterization association information;

[0045] an extraction module, configured to extract, upon receiving a target agricultural pest identification request, an image of a crop to be identified and target pest characterization association information in the target agricultural pest identification request, and determine a target agricultural pest sample in the agricultural pest sample database using the target pest characterization association information;

[0046] A training module is used to train the constructed initial agricultural pest recognition model using the target agricultural pest samples, and to verify and correct the trained intermediate agricultural pest recognition model according to the target pest representation association information, so as to obtain the trained final agricultural pest recognition model;

[0047] The recognition module is used to input the crop image to be identified into the final agricultural pest recognition model that has been trained to obtain the crop pest recognition result, and evaluate the degree of crop pests based on the pest degree labeling results of the crop pest images in the agricultural pest sample database.

[0048] In addition, in order to achieve the above-mentioned purpose, the present invention also provides an agricultural pest identification device, which includes: a memory, a processor, and an agricultural pest identification program stored in the memory and executable on the processor, and when the agricultural pest identification program is executed by the processor, the steps of the agricultural pest identification method as described above are implemented.

[0049] In addition, in order to achieve the above-mentioned purpose, the present invention also provides a storage medium, on which an agricultural pest identification program is stored, and when the agricultural pest identification program is executed by a processor, the steps of the above-mentioned agricultural pest identification method are implemented.

[0050] The beneficial effects of the present invention are as follows: a method, device, equipment and storage medium for identifying agricultural pests are proposed, an agricultural pest sample database is constructed by acquiring crop pest images collected from several monitoring areas, and when training an agricultural pest identification model, suitable target agricultural pest samples are selected from the agricultural pest sample database based on pest characterization association information, and the agricultural pest identification model is continuously verified and corrected, so as to finally obtain an agricultural pest identification model adapted to the current region and the current environment, which can avoid the influence of training sample differences caused by the external environment on the accuracy of agricultural pest identification, and at the same time, can also provide a pest degree assessment scheme differentiated by region and environment, solving the technical problems of low training sample collection efficiency, unsatisfactory pest identification accuracy and low accuracy of pest degree assessment in current agricultural pest identification. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 A schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention;

[0052] Figure 2 A schematic diagram of a flow chart of an embodiment of a method for identifying agricultural pests according to the present invention;

[0053] Figure 3 The figure is a structural block diagram of an agricultural pest identification device in an embodiment of the present invention.

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

[0055] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0056] like Figure 1 As shown, Figure 1 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention.

[0057] like Figure 1 As shown, the device may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may optionally be a storage device independent of the aforementioned processor 1001.

[0058] Those skilled in the art will understand that Figure 1 The structure of the device shown in the figure does not constitute a limitation of the device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0059] like Figure 1 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an agricultural pest identification program.

[0060] exist Figure 1 In the terminal shown, the network interface 1004 is mainly used to connect to the backend server and perform data communication with the backend server; the user interface 1003 is mainly used to connect to the client (user end) and perform data communication with the client; and the processor 1001 can be used to call the agricultural pest identification program stored in the memory 1005 and perform the following operations:

[0061] Acquire crop pest images and pest characterization-related information collected in a number of monitoring areas; wherein the pest characterization-related information includes crop planting locations and crop planting environment parameters;

[0062] Based on several crop pest images, the pest degree annotation results of each crop pest image and pest characterization association information, an agricultural pest sample database is constructed;

[0063] Upon receiving a target agricultural pest identification request, extracting the image of the crop to be identified and the target pest characterization association information in the target agricultural pest identification request, and determining the target agricultural pest sample in the agricultural pest sample database using the target pest characterization association information;

[0064] The target agricultural pest samples are used to train the constructed initial agricultural pest identification model, and the trained intermediate agricultural pest identification model is verified and corrected according to the target pest representation association information to obtain the trained final agricultural pest identification model;

[0065] The crop image to be identified is input into the final agricultural pest identification model that has been trained to obtain a crop pest identification result, and the degree of the crop pest identification result is evaluated based on the pest degree labeling results of the crop pest images in the agricultural pest sample database.

[0066] The specific embodiments of the present invention applied to the device are basically the same as the embodiments of the agricultural pest identification method described below, and will not be described in detail here.

[0067] The present invention provides a method for identifying agricultural pests. Figure 2 , Figure 2 The figure is a flow chart of an embodiment of the agricultural pest identification method of the present invention.

[0068] In this embodiment, the agricultural pest identification method comprises the following steps:

[0069] S100: Acquire crop pest images and pest characterization-related information collected in a plurality of monitoring areas; wherein the pest characterization-related information includes crop planting locations and crop planting environment parameters;

[0070] S200: Building an agricultural pest sample database based on a number of crop pest images, the pest degree annotation results of each crop pest image, and pest characterization association information;

[0071] S300: upon receiving a target agricultural pest identification request, extracting the image of the crop to be identified and the target pest characterization association information in the target agricultural pest identification request, and determining the target agricultural pest sample in the agricultural pest sample database using the target pest characterization association information;

[0072] S400: using the target agricultural pest samples to train the constructed initial agricultural pest identification model, and verifying and correcting the trained intermediate agricultural pest identification model according to the target pest representation association information, to obtain a trained final agricultural pest identification model;

[0073] S500: Input the crop image to be identified into the final agricultural pest identification model that has been trained to obtain a crop pest identification result, and evaluate the degree of the crop pest identification result based on the pest degree labeling results of the crop pest images in the agricultural pest sample database.

[0074] It should be noted that the existing agricultural pest identification solutions based on deep learning have the following defects: (1) The number and accuracy of agricultural pest sample images required for training samples are high, and the collection of training samples is time-consuming, labor-intensive, costly, and inefficient. (2) Training samples are affected by regional and environmental differences, resulting in inaccurate training sample images when using shared pest sample images for deep learning training. The introduction of additional features for learning and training makes the accuracy of the final recognition model less than ideal. (3) The assessment of pest severity is affected by different regions and environments, and there may be inaccurate assessment of pest severity. In order to solve the above problems, this embodiment constructs an agricultural pest sample database by acquiring crop pest images collected from several monitoring areas. When training the agricultural pest recognition model, suitable target agricultural pest samples are selected from the agricultural pest sample database based on the pest characterization association information, and the agricultural pest recognition model is continuously verified and corrected to finally obtain an agricultural pest recognition model that is adapted to the current region and current environment. This can avoid the impact of training sample differences caused by the external environment on the accuracy of agricultural pest recognition. At the same time, it can also provide regional and environmental differentiated pest degree assessment solutions, which solves the current technical problems of low training sample collection efficiency, unsatisfactory pest recognition accuracy, and low accuracy of pest degree assessment in agricultural pest recognition.

[0075] In a preferred embodiment, the step of obtaining crop pest images and pest characterization association information collected in a plurality of monitoring areas specifically includes:

[0076] S101: Acquire crop pest images collected by a plurality of insect situation lamps arranged in each monitoring area and pest characterization correlation information collected by a crop planting condition monitoring component arranged in each monitoring area;

[0077] The crop planting condition monitoring component includes a crop planting position sensing component for collecting crop planting positions in a corresponding monitoring area and a crop planting environment sensing component for collecting crop planting environment parameters in a corresponding monitoring area;

[0078] S102: Adding pest characterization association information collected in each monitoring area as additional information of the crop pest image collected in the monitoring area.

[0079] Furthermore, based on a number of crop pest images, the pest degree annotation results of each crop pest image and pest characterization related information, the steps of constructing an agricultural pest sample database specifically include:

[0080] S201: sending the crop pest images collected in each monitoring area to the agricultural planting management terminal corresponding to the monitoring area, and marking the pest degree of each crop pest image according to the pest degree evaluation fed back by the agricultural planting management terminal;

[0081] S202: establishing a pest information association relationship between the crop pest image, the pest characterization association information attached to the crop pest image, and the pest degree annotation result, and constructing an agricultural pest sample database according to the pest information association relationship of each monitoring area.

[0082] In this embodiment, in order to solve the problems of the existing agricultural pest identification scheme based on deep learning, such as the high requirements on the number and accuracy of agricultural pest sample images required for training samples, and the time-consuming, labor-intensive, costly and inefficient collection of training samples, an agricultural pest training sample collection scheme based on shared pest sample images is adopted, that is, crop pest images and pest characterization-related information are collected by insect lights and crop planting condition monitoring components set in several monitoring areas. It should be noted that several different monitoring areas can be configured as crop planting and monitoring areas belonging to different agricultural production departments, units, or even individual farmers. By uploading the collected crop pest images and pest characterization-related information by each user, an agricultural pest sample database with rich agricultural pest sample images can be constructed to solve the problem of collecting training samples for different crops for different pest type identification needs. At the same time, when constructing the agricultural pest sample database, the pest degree evaluation for each crop pest image uploaded by agricultural planting personnel on the management terminal is also entered. In this way, after obtaining the agricultural pest identification results, the current pest degree can be evaluated and graded to guide pest control in the agricultural production process.

[0083] In a preferred embodiment, the target pest characterization association information includes: the target crop planting location corresponding to the crop image to be identified; using the target pest characterization association information, the step of determining the target agricultural pest sample in the agricultural pest sample database specifically includes:

[0084] S301: extracting the target crop planting location corresponding to the crop image to be identified in the target pest characterization association information, and determining the action range of the agricultural pest sample based on the target crop planting location;

[0085] The scope of action of the agricultural pest samples is configured as the area consisting of all monitoring areas whose distances from the crop planting location to the target crop planting location are within a preset distance;

[0086] S302: Selecting a plurality of target crop pest images that fall within the scope of the agricultural pest sample from the agricultural pest sample database, and using an image set consisting of the plurality of target crop pest images as a target agricultural pest sample for the target agricultural pest identification request.

[0087] Furthermore, the target pest characterization association information includes: target crop planting environment parameters corresponding to the crop image to be identified; using the target agricultural pest sample to train the constructed initial agricultural pest recognition model, and verifying and correcting the trained intermediate agricultural pest recognition model according to the target pest characterization association information, to obtain the final agricultural pest recognition model after training, specifically including:

[0088] S401: randomly dividing a number of target crop pest images in the target agricultural pest samples into agricultural pest training samples and agricultural pest verification samples according to a preset ratio;

[0089] S402: using the agricultural pest training samples to train the constructed initial agricultural pest identification model, and using the agricultural pest verification samples to verify the accuracy of the trained intermediate agricultural pest identification model, and determining whether the verification accuracy meets the preset indicator;

[0090] S403: If yes, use the intermediate agricultural pest identification model as the final agricultural pest identification model; if no, perform an optimization action on the scope of action of agricultural pest samples according to the target crop planting environment parameters and the crop planting environment parameters of each monitoring area, and use the optimized agricultural pest sample scope to return to the step of determining the target agricultural pest sample and the model training and verification step until the verification accuracy meets the preset index, and obtain a revised agricultural pest identification model;

[0091] S404: using the revised agricultural pest identification model as a final agricultural pest identification model;

[0092] The optimization action of performing the action range of agricultural pest samples is configured to add the target monitoring area to the current action range of agricultural pest samples to obtain the optimized action range of agricultural pest samples, and the target monitoring area is configured as each monitoring area where the value variance of the crop planting environment parameter and the target crop planting environment parameter at several sampling points within the duration of crop planting is within a preset value range;

[0093] When performing each optimization action of the action range of agricultural pest samples, the preset numerical range of this optimization action is adjusted to L times of the previous one, where L is a constant greater than 1.

[0094] In this embodiment, in order to solve the problem that the representation of training sample images in the agricultural pest training scheme of sharing pest sample images is affected by the region and environment, when determining the target agricultural pest samples from the agricultural pest sample database, firstly, the pest sample images collected in all monitoring areas within a preset distance range from the target crop planting location are considered as target agricultural pest samples for model training (i.e., considering the influence of different regions), and then, the agricultural pest recognition model obtained by the current training is used to verify the recognition accuracy. If the verification index does not meet the requirements, the selection range of the target agricultural pest samples is increased based on the target crop planting environment parameters and the crop planting environment parameters of each monitoring area, and more pest images with similar planting environments are included in the pest sample considerations, and the verification and sample adjustment process is repeated until the model recognition accuracy meets the requirements. Thus, by continuously adjusting the target agricultural pest samples used for training the model and continuously optimizing the agricultural pest recognition model, the agricultural pest recognition model finally obtained has better adaptability when recognizing agricultural pest images in the current region and environment.

[0095] In practical applications, before the step of training the constructed initial agricultural pest recognition model using the target agricultural pest sample, it also includes: constructing an original agricultural pest recognition model based on the YOLOv5 algorithm architecture; wherein the original agricultural pest recognition model includes the input end, the backbone network and the head network in the YOLOv5 algorithm architecture; improving the original agricultural pest recognition model to obtain the initial agricultural pest recognition model; wherein the improvement of the original agricultural pest recognition model includes: the first improvement action: adding a CA attention module between the C3 module and the SPPF module in the backbone network; wherein the C3 module is configured to be composed of A convolutional neural network module consisting of three Conv modules and one Bottleneck module, the SPPF module is configured as a fast spatial pyramid pooling module, the CA attention module is configured to decompose the input feature vector into two one-dimensional feature codes, aggregate features along two spatial directions respectively, one spatial direction captures long-range dependencies, and the other spatial direction retains precise position information; the second improvement action: replace the C3 module in the head network with a c2f module; wherein the c2f module is configured as a convolutional neural network module consisting of a Conv module, a BN module and a SILU module.

[0096] In this embodiment, a CAresNet2-yolov5s architecture-based agricultural pest recognition model is proposed. By adopting an improved YOLOv5 architecture and introducing C3 and c2f modules, the detection capability of YOLOv5 for small target pests is increased, while the interference of the background on the detection target is reduced, thereby improving the network accuracy of the model.

[0097] In a preferred embodiment, based on the pest degree labeling results of the crop pest images in the agricultural pest sample database, the step of evaluating the degree of the crop pest identification results specifically includes:

[0098] S501: extracting crop pest images and pest degree annotation results of the crop pest images of the target agricultural pest samples in the agricultural pest sample database;

[0099] S502: Calculate the lesion performance characteristic value of each crop pest image in the target agricultural pest sample, and obtain a curve of the pest severity level with respect to the lesion performance characteristic value by fitting based on the lesion performance characteristic value and the pest severity labeling result; wherein the lesion performance characteristic value includes the lesion area or lesion color value of the crop pest image;

[0100] S503: Determine the pest degree level of the crop image to be identified according to the actual lesion manifestation characteristic value of the crop image to be identified in the crop pest identification result and using the variation curve of the pest degree level with respect to the lesion manifestation characteristic value.

[0101] In this embodiment, after obtaining the recognition result of agricultural pests, the crop pest images of the target agricultural pest samples in the final agricultural pest recognition model are extracted and the pest degree annotation results of the crop pest images are extracted. By calculating the pest degree index result (such as the lesion area or the lesion color value), a curve of the change of the pest degree level with respect to the lesion performance characteristic value is fitted. Finally, the pest degree level of the current crop pest recognition result is determined according to the actual lesion performance characteristic value of the crop image to be identified (for example, if the lesion area falls within the target area range or the lesion color value falls within the target color value interval, it is determined to be the pest level corresponding to the range or interval). In this way, a more accurate and regional and environmentally adaptable pest degree evaluation scheme is provided, which avoids the impact of different regions and environments on the assessment of pest degree, and the problem of inaccurate assessment of pest severity may occur.

[0102] Therefore, this embodiment provides an agricultural pest identification method, which constructs an agricultural pest sample database by acquiring crop pest images collected from several monitoring areas. When training an agricultural pest identification model, suitable target agricultural pest samples are selected from the agricultural pest sample database based on pest characterization association information, and the agricultural pest identification model is continuously verified and corrected to finally obtain an agricultural pest identification model that is adapted to the current region and current environment. This method can avoid the impact of training sample differences caused by the external environment on the accuracy of agricultural pest identification. At the same time, it can also provide a pest degree assessment scheme differentiated by region and environment, which solves the technical problems of low training sample collection efficiency, unsatisfactory pest identification accuracy, and low accuracy of pest degree assessment in current agricultural pest identification.

[0103] Reference Figure 3 , Figure 3 This is a structural block diagram of an embodiment of an agricultural pest identification device of the present invention.

[0104] like Figure 3 As shown, the agricultural pest identification device proposed in the embodiment of the present invention includes:

[0105] The acquisition module 10 is used to acquire crop pest images and pest characterization associated information collected in a plurality of monitoring areas; wherein the pest characterization associated information includes crop planting locations and crop planting environment parameters;

[0106] A construction module 20 is used to construct an agricultural pest sample database based on a plurality of crop pest images, the pest degree annotation results of each crop pest image, and pest characterization association information;

[0107] The extraction module 30 is used to extract the image of the crop to be identified and the target pest characterization association information in the target agricultural pest identification request when receiving the target agricultural pest identification request, and determine the target agricultural pest sample in the agricultural pest sample database using the target pest characterization association information;

[0108] The training module 40 is used to train the constructed initial agricultural pest identification model using the target agricultural pest samples, and verify and correct the trained intermediate agricultural pest identification model according to the target pest characterization association information to obtain the trained final agricultural pest identification model;

[0109] The identification module 50 is used to input the crop image to be identified into the final agricultural pest identification model that has been trained to obtain the crop pest identification result, and evaluate the degree of crop pests based on the pest degree labeling results of the crop pest images in the agricultural pest sample database.

[0110] Other embodiments or specific implementations of the agricultural pest identification device of the present invention can refer to the above-mentioned method embodiments, which will not be described in detail here.

[0111] In addition, the present invention also proposes an agricultural pest identification device, which includes: a memory, a processor, and an agricultural pest identification program stored in the memory and executable on the processor. When the agricultural pest identification program is executed by the processor, the steps of the agricultural pest identification method described above are implemented.

[0112] The specific implementation of the agricultural pest identification device of the present application is basically the same as the various embodiments of the above-mentioned agricultural pest identification method, and will not be repeated here.

[0113] In addition, the present invention also provides a readable storage medium, the readable storage medium includes a computer readable storage medium, on which an agricultural pest identification program is stored. The readable storage medium may be Figure 1 The memory 1005 in the terminal may also be at least one of a ROM (Read-Only Memory) / RAM (Random Access Memory), a magnetic disk, and an optical disk. The readable storage medium includes a number of instructions for enabling an agricultural pest identification device with a processor to execute the agricultural pest identification method described in each embodiment of the present invention.

[0114] The specific implementation methods in the readable storage medium of the present application are basically the same as the above-mentioned embodiments of the agricultural pest identification method, and will not be repeated here.

[0115] It is understood that, in the description of this specification, the description with reference to the terms "one embodiment", "another embodiment", "other embodiments", or "first to Nth embodiments" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0116] It should be noted that, in this article, the terms "include", "comprises" or any other variations 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 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 a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

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

[0118] 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, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0119] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for identifying agricultural pests, It is characterized in that The following steps are involved: Acquire crop pest images and pest characterization-related information collected in a number of monitoring areas; wherein the pest characterization-related information includes crop planting locations and crop planting environment parameters; Based on several crop pest images, the pest degree annotation results of each crop pest image and pest characterization association information, an agricultural pest sample database is constructed; Upon receiving a target agricultural pest identification request, extracting the image of the crop to be identified and the target pest characterization association information in the target agricultural pest identification request, and determining the target agricultural pest sample in the agricultural pest sample database using the target pest characterization association information; The target agricultural pest samples are used to train the constructed initial agricultural pest identification model, and the trained intermediate agricultural pest identification model is verified and corrected according to the target pest representation association information to obtain the trained final agricultural pest identification model; Inputting the crop image to be identified into the final agricultural pest identification model after training to obtain a crop pest identification result, and evaluating the degree of the crop pest identification result based on the pest degree labeling results of the crop pest images in the agricultural pest sample database; The target pest characterization associated information includes: target crop planting environment parameters corresponding to the crop image to be identified; using the target agricultural pest sample to train the constructed initial agricultural pest recognition model, and verifying and correcting the trained intermediate agricultural pest recognition model according to the target pest characterization associated information to obtain the final agricultural pest recognition model after training, specifically including: A number of target crop pest images in the target agricultural pest samples are randomly divided into agricultural pest training samples and agricultural pest verification samples according to a preset ratio; The constructed initial agricultural pest identification model is trained using the agricultural pest training samples, and the accuracy of the trained intermediate agricultural pest identification model is verified using the agricultural pest verification samples to determine whether the verification accuracy meets the preset indicator; If yes, the intermediate agricultural pest identification model is used as the final agricultural pest identification model; if no, the optimization action of the scope of action of agricultural pest samples is performed according to the target crop planting environment parameters and the crop planting environment parameters of each monitoring area, and the optimized agricultural pest sample scope is used to return to the step of determining the target agricultural pest sample and the model training and verification step until the verification accuracy meets the preset index, and the revised agricultural pest identification model is obtained; Using the revised agricultural pest identification model as the final agricultural pest identification model; The optimization action of performing the action range of agricultural pest samples is configured to add the target monitoring area to the current action range of agricultural pest samples to obtain the optimized action range of agricultural pest samples, and the target monitoring area is configured as each monitoring area where the value variance of the crop planting environment parameter and the target crop planting environment parameter at several sampling points within the duration of crop planting is within a preset value range; When performing each optimization action of the action range of agricultural pest samples, the preset value range of this optimization action is adjusted to L times of the previous one, where L is a constant greater than 1; Before the step of training the constructed initial agricultural pest recognition model using the target agricultural pest sample, the method further includes: Constructing an original agricultural pest recognition model based on the YOLOv5 algorithm architecture; wherein the original agricultural pest recognition model includes an input end, a backbone network, and a head network in the YOLOv5 algorithm architecture; The original agricultural pest identification model is improved to obtain an initial agricultural pest identification model; wherein the improvement of the original agricultural pest identification model includes: The first improvement action: adding a CA attention module between the C3 module and the SPPF module in the backbone network; wherein the C3 module is configured as a convolutional neural network module consisting of three Conv modules and one Bottleneck module, the SPPF module is configured as a fast spatial pyramid pooling module, and the CA attention module is configured to decompose the input feature vector into two one-dimensional feature codes, aggregate features along two spatial directions, one spatial direction captures long-range dependencies, and the other spatial direction retains precise position information; The second improvement action: replace the C3 module in the head network with a c2f module; wherein the c2f module is configured as a convolutional neural network module consisting of a Conv module, a BN module and a SILU module.

2. The agricultural pest identification method according to claim 1, It is characterized in that The steps of obtaining crop pest images and pest characterization correlation information collected in several monitoring areas specifically include: Acquire crop pest images collected by a plurality of insect situation lamps set in each monitoring area and pest characterization correlation information collected by a crop planting condition monitoring component set in each monitoring area; The crop planting condition monitoring component includes a crop planting position sensing component for collecting crop planting positions in a corresponding monitoring area and a crop planting environment sensing component for collecting crop planting environment parameters in a corresponding monitoring area; The pest characterization association information collected in each monitoring area is added as additional information of the crop pest image collected in the monitoring area.

3. The agricultural pest identification method according to claim 2, It is characterized in that Based on a number of crop pest images, the pest degree annotation results of each crop pest image and pest characterization association information, the steps of constructing an agricultural pest sample database include: The crop pest images collected in each monitoring area are sent to the agricultural planting management terminal corresponding to the monitoring area, and the pest degree of each crop pest image is marked according to the pest degree evaluation fed back by the agricultural planting management terminal; A pest information association relationship is established between the crop pest image, the pest characterization association information attached to the crop pest image and the pest degree annotation result, and an agricultural pest sample database is constructed according to the pest information association relationship of each monitoring area.

4. The agricultural pest identification method according to claim 3, It is characterized in that The target pest characterization association information includes: the target crop planting location corresponding to the crop image to be identified; using the target pest characterization association information, the step of determining the target agricultural pest sample in the agricultural pest sample database specifically includes: Extracting the target crop planting location corresponding to the crop image to be identified in the target pest characterization association information, and determining the scope of action of the agricultural pest sample based on the target crop planting location; The scope of action of the agricultural pest samples is configured as the area consisting of all monitoring areas whose distances from the crop planting location to the target crop planting location are within a preset distance; A plurality of target crop pest images that fall within the scope of the agricultural pest sample are selected from the agricultural pest sample database, and an image set consisting of the plurality of target crop pest images is used as a target agricultural pest sample for the target agricultural pest identification request.

5. The agricultural pest identification method according to claim 4, It is characterized in that Based on the pest degree labeling results of the crop pest images in the agricultural pest sample database, the step of evaluating the degree of the crop pest identification results specifically includes: Extracting crop pest images of target agricultural pest samples and pest degree annotation results of the crop pest images from the agricultural pest sample database; Calculate the lesion performance characteristic value of each crop pest image in the target agricultural pest sample, and obtain a curve of the pest severity level with respect to the lesion performance characteristic value by fitting based on the lesion performance characteristic value and the pest severity labeling result; wherein the lesion performance characteristic value includes the lesion area or lesion color value of the crop pest image; According to the actual lesion manifestation characteristic value of the crop image to be identified in the crop pest identification result, the pest degree level of the crop image to be identified is determined by using the variation curve of the pest degree level with respect to the lesion manifestation characteristic value.

6. An agricultural pest identification device, It is characterized in that include: An acquisition module, used to acquire crop pest images and pest characterization associated information collected in a number of monitoring areas; wherein the pest characterization associated information includes crop planting locations and crop planting environment parameters; A construction module, used to construct an agricultural pest sample database based on a number of crop pest images, pest degree annotation results of each crop pest image, and pest characterization association information; an extraction module, configured to extract, upon receiving a target agricultural pest identification request, an image of a crop to be identified and target pest characterization association information in the target agricultural pest identification request, and determine a target agricultural pest sample in the agricultural pest sample database using the target pest characterization association information; A training module is used to train the constructed initial agricultural pest recognition model using the target agricultural pest samples, and to verify and correct the trained intermediate agricultural pest recognition model according to the target pest representation association information, so as to obtain the trained final agricultural pest recognition model; An identification module is used to input the crop image to be identified into the final agricultural pest identification model that has been trained to obtain a crop pest identification result, and to evaluate the degree of crop pests based on the pest degree labeling results of the crop pest images in the agricultural pest sample database; The target pest characterization associated information includes: target crop planting environment parameters corresponding to the crop image to be identified; the constructed initial agricultural pest recognition model is trained using the target agricultural pest sample, and the trained intermediate agricultural pest recognition model is verified and corrected according to the target pest characterization associated information to obtain the final agricultural pest recognition model after training, which specifically includes: A number of target crop pest images in the target agricultural pest samples are randomly divided into agricultural pest training samples and agricultural pest verification samples according to a preset ratio; The constructed initial agricultural pest identification model is trained using the agricultural pest training samples, and the accuracy of the trained intermediate agricultural pest identification model is verified using the agricultural pest verification samples to determine whether the verification accuracy meets the preset indicator; If yes, the intermediate agricultural pest identification model is used as the final agricultural pest identification model; if no, the optimization action of the scope of action of agricultural pest samples is performed according to the target crop planting environment parameters and the crop planting environment parameters of each monitoring area, and the optimized agricultural pest sample scope is used to return to the step of determining the target agricultural pest sample and the model training and verification step until the verification accuracy meets the preset index, and the revised agricultural pest identification model is obtained; Using the revised agricultural pest identification model as the final agricultural pest identification model; The optimization action of performing the action range of agricultural pest samples is configured to add the target monitoring area to the current action range of agricultural pest samples to obtain the optimized action range of agricultural pest samples, and the target monitoring area is configured as each monitoring area where the value variance of the crop planting environment parameter and the target crop planting environment parameter at several sampling points within the duration of crop planting is within a preset value range; When performing each optimization action of the action range of agricultural pest samples, the preset value range of this optimization action is adjusted to L times of the previous one, where L is a constant greater than 1; Before the target agricultural pest samples are used to train the constructed initial agricultural pest recognition model, the method further includes: Constructing an original agricultural pest recognition model based on the YOLOv5 algorithm architecture; wherein the original agricultural pest recognition model includes an input end, a backbone network, and a head network in the YOLOv5 algorithm architecture; The original agricultural pest identification model is improved to obtain an initial agricultural pest identification model; wherein the improvement of the original agricultural pest identification model includes: The first improvement action: adding a CA attention module between the C3 module and the SPPF module in the backbone network; wherein the C3 module is configured as a convolutional neural network module consisting of three Conv modules and one Bottleneck module, the SPPF module is configured as a fast spatial pyramid pooling module, and the CA attention module is configured to decompose the input feature vector into two one-dimensional feature codes, aggregate features along two spatial directions, one spatial direction captures long-range dependencies, and the other spatial direction retains precise position information; The second improvement action: replace the C3 module in the head network with a c2f module; wherein the c2f module is configured as a convolutional neural network module consisting of a Conv module, a BN module and a SILU module.

7. An agricultural pest identification device, It is characterized in that The agricultural pest identification device includes: a memory, a processor, and an agricultural pest identification program stored in the memory and executable on the processor. When the agricultural pest identification program is executed by the processor, the steps of the agricultural pest identification method as described in any one of claims 1 to 5 are implemented.

8. A storage medium, It is characterized in that The storage medium stores an agricultural pest identification program, which, when executed by the processor, implements the steps of the agricultural pest identification method according to any one of claims 1 to 5.