Crop disease and insect pest state determination method, device, equipment and medium
By collecting RGB images of crops and reconstructing hyperspectral images, and determining density parameters with density perception models, the problems of insufficient accuracy and high cost of pest and disease state recognition in the prior art are solved, and more efficient and accurate pest and disease state recognition is achieved.
Patent Information
- Application Number
- CN202410174133.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-06
- Publication Date
- 2025-08-08
AI Technical Summary
The prior art is difficult to accurately identify the pest and disease states of crops, especially due to the lack of detection accuracy and high cost due to the singularity of RGB images and the high cost and complexity of hyperspectral images.
By collecting RGB images of crops, downsampling and feature extraction are used for image generation models, hyperspectral images are reconstructed, and density parameters are determined through density perception models, combined with hyperspectral images, and the disease and pest status of crops are identified.
It improves the accuracy of identification of crop pest and disease states, reduces equipment costs and computing resource requirements, enhances the robustness of occlusion and growth states, and improves the consistency between pest and disease states and actual states.
Smart Images

Figure CN120451765A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of crop disease and insect pest monitoring, and in particular to a method, device, equipment and medium for determining the status of crop disease and insect pests. Background Art
[0002] In practical applications, determining whether a crop is infested by pests and diseases is often done by extracting features from RGB or hyperspectral images of the crop. However, the pest and disease infestation status determined using these methods cannot accurately reflect the presence and extent of pest infestation. Summary of the Invention
[0003] Based on the above technical problems, the embodiments of the present application provide a method, device, equipment and medium for determining the status of crop diseases and insect pests.
[0004] The present invention provides a method for determining the status of crop pests and diseases, comprising:
[0005] determining a hyperspectral image of the crop;
[0006] determining a density parameter characterizing a distribution state of the crop;
[0007] The disease and insect pest status of the crop is determined based on the density parameter and the hyperspectral image.
[0008] In some embodiments, determining a density parameter characterizing a distribution state of the crop comprises:
[0009] collecting an RGB image of the crop;
[0010] The encoding module of the image generation model performs downsampling and feature extraction processing on the RGB image to obtain intermediate features of the RGB image; wherein the image generation model includes the encoding module and the decoding module; the decoding module is used to perform upsampling and feature reconstruction processing on the intermediate features to obtain the hyperspectral image;
[0011] The intermediate features are processed by a density perception model to obtain the density parameters.
[0012] In some embodiments, the density-aware model includes K dilated convolution modules; K is an integer greater than or equal to 3; and processing the intermediate features using the density-aware model to obtain the density parameter includes:
[0013] Performing feature extraction on the intermediate feature based on the kth hole coefficient through the kth hole convolution module to obtain a kth extraction result; wherein k is an integer greater than or equal to 1 and less than or equal to K;
[0014] Performing splicing processing on the first extraction result to the Kth extraction result to obtain a splicing result;
[0015] A convolution process is performed on the splicing result to obtain the density parameter.
[0016] In some embodiments, the method further comprises:
[0017] Acquire crop sample images;
[0018] determining a density heat map of the crop sample image;
[0019] Performing downsampling and feature extraction processing on the crop sample image by the encoding module to obtain sample intermediate features;
[0020] Based on the density heat map and the intermediate features of the samples, the density perception model in the initial state is trained to obtain the density perception model.
[0021] In some embodiments, determining a density heat map of the crop sample image includes:
[0022] determining a skeleton line of a target portion of a crop in the crop sample image;
[0023] Determine the skeleton pixel value of the skeleton line;
[0024] The density heat map is determined based on the bone pixel values.
[0025] In some embodiments, determining the density heat map based on the bone pixel values includes:
[0026] Performing convolution processing on the bone pixel value to obtain a convolution result;
[0027] The density heat map is determined to be the convolution result.
[0028] In some embodiments, determining a skeleton line of a target portion of a crop in the crop sample image includes:
[0029] Analyzing the morphology of the target part in the crop sample image to determine the skeletal key points of the target part;
[0030] The skeleton line of the target part is determined based on the skeleton key points.
[0031] In some embodiments, determining the skeleton pixel value of the skeleton line includes:
[0032] determining an extension length of the skeleton line;
[0033] Based on the extension length, the bone pixel value is determined.
[0034] In some embodiments, determining the pest and disease status of the crop based on the density parameter and the hyperspectral image includes:
[0035] Extracting features from the hyperspectral image using a feature extraction module of a recognition model to obtain a feature extraction result;
[0036] determining a weight parameter based at least on the density parameter;
[0037] The feature extraction result is processed based on the weight parameter to determine the pest and disease status.
[0038] In some embodiments, determining a weight parameter based at least on the density parameter comprises:
[0039] Processing, by an mth attention unit of the attention module, an nth feature extraction result output by the nth feature extraction unit of the feature extraction module and the density parameter to obtain an mth processing result; wherein the recognition model includes the attention module and the feature extraction module, and at least some of the feature extraction units in the feature extraction module are interleaved with the attention units in the attention module; and m and n are both integers greater than or equal to 1;
[0040] The weight parameter is determined based on the mth processing result.
[0041] In some embodiments, determining the weight parameter based on the mth processing result includes:
[0042] Performing adaptive average pooling on the mth processing result to obtain a first pooling result;
[0043] Performing self-attention maximum pooling processing on the mth processing result to obtain a second pooling result;
[0044] Determine the weight parameter based on the first pooling result and the second pooling result.
[0045] In some embodiments, the method further comprises:
[0046] Obtaining sample density parameters obtained after the density perception model processes the crop sample image;
[0047] Obtaining a sample hyperspectral image obtained by processing the crop sample image with an image generation model;
[0048] determining the pest and disease status category of the crop sample image;
[0049] Based on the sample density parameter, the sample hyperspectral image and the pest and disease state category, the recognition model of the initial state is trained to obtain the recognition model.
[0050] In some embodiments, the method further comprises:
[0051] Determine additional data;
[0052] collecting an RGB image of the crop;
[0053] determining verification image data based on the additional data and the RGB image;
[0054] The verification image data is processed by a pest and disease status determination system to obtain a verification result; wherein the pest and disease status determination system includes an image generation model, a density perception model, and a recognition model; the image generation model is used to determine the hyperspectral image; the density perception model is used to determine the density parameter; and the recognition model is used to determine the pest and disease status;
[0055] The system status of the pest and disease status determination system is determined based on the verification result.
[0056] In some embodiments, the processing of the verification image data by the pest and disease status determination system to obtain a verification result includes:
[0057] Processing the verification image data using at least part of the model in the pest and disease status determination system to obtain an intermediate verification result;
[0058] Determining the system status of the pest and disease status determination system based on the verification result includes:
[0059] A model state of the at least part of the model is determined based on the intermediate verification result; wherein the system state includes the model state.
[0060] In some embodiments, the method further comprises:
[0061] Obtain sample additional data and crop sample images;
[0062] determining verification sample data based on the sample additional data and the crop sample image;
[0063] The pest and disease status determination system in the initial state is trained based on the verification sample data to obtain the pest and disease status determination system.
[0064] The present application also provides a device for determining the status of crop pests and diseases, the device comprising:
[0065] a determination module, configured to determine a hyperspectral image of the crop and a density parameter characterizing a distribution state of the crop;
[0066] The determination module is further configured to determine the disease and insect pest status of the crop based on the density parameter and the hyperspectral image.
[0067] An embodiment of the present application also provides an electronic device, comprising a processor and a memory; wherein the memory stores a computer program; and when the computer program is executed by the processor, it can implement any of the above methods for determining the status of crop pests and diseases.
[0068] An embodiment of the present application further provides a computer-readable storage medium, wherein the storage medium stores a computer program; when the computer program is executed by a processor of an electronic device, the crop disease and insect pest status determination method as described above can be implemented.
[0069] The crop disease and pest status determination method provided in the embodiment of the present application, after determining the hyperspectral image of the crop, can more intuitively and comprehensively display the health status or disease and pest level of the crop through the hyperspectral image of the crop; and, after determining the density parameter characterizing the distribution status of the crop, the density parameter can comprehensively and accurately display the occlusion status and growth status between the stems, branches and leaves of the crop; on this basis, the disease and pest status of the crop is determined based on the density parameter and the hyperspectral image, which can not only weaken the negative impact of the occlusion status and growth status between the stems, branches and leaves of the crop on the disease and pest status determination process, but also can generate a density indication for the disease and pest status determination process, thereby improving the consistency between the disease and pest status of the crop and the actual planting status, growth status and distribution status of the crop, thereby improving the accuracy of the disease and pest status of the crop. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 A schematic diagram of a process for determining the status of crop pests and diseases provided in an embodiment of the present application;
[0071] Figure 2 A schematic diagram showing the comparative status of pests and diseases in hyperspectral images provided in an embodiment of the present application;
[0072] Figure 3 A schematic diagram of the structure of a system for determining the status of pests and diseases provided in an embodiment of the present application;
[0073] Figure 4 A schematic diagram of the structure of the density perception model provided in the embodiment of the present application;
[0074] Figure 5 This is a schematic diagram of an image of a density heat map provided in an embodiment of the present application;
[0075] Figure 6A A schematic diagram of the structure of the movable image acquisition device provided in an embodiment of the present application;
[0076] Figure 6B A schematic diagram of the structure of a mobile image acquisition device for acquiring RGB images provided in an embodiment of the present application;
[0077] Figure 7 A schematic diagram of the structure of a density attention unit provided in an embodiment of the present application;
[0078] Figure 8 A schematic diagram showing the comparison between the RGB image and the verification image data provided in an embodiment of the present application;
[0079] Figure 9 A schematic diagram of the structure of a device for determining the status of crop diseases and insect pests provided in an embodiment of the present application;
[0080] Figure 10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0081] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application.
[0082] It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application.
[0083] During the agricultural crop planting process, identifying crop pest and disease status is of great significance for improving agricultural production efficiency and ensuring the quality of agricultural products. How to improve the ability to control crop pests and diseases has become a technical problem that needs to be solved urgently.
[0084] To address the above technical issues, related technologies have provided methods for identifying crop pests and diseases based on manual experience. However, these methods rely on the professional diagnosis of professional technicians and can only be used to identify or diagnose crops that have been infected with pests and diseases and have obvious lesions or damage, through visual inspection by professional technicians or testing of plant samples.
[0085] Obviously, the implementation of the above scheme requires professional and technical personnel, and the training and learning period of professional and technical personnel is long. For the diagnosis of some pests and diseases with similar visual characteristics, a higher level of professional knowledge is required. In this case, even professional and technical personnel may make misdiagnoses and misjudgments due to differences in conditions such as fatigue, lighting and vision. On the other hand, the above scheme has a strong lag and low efficiency. When the demand for pest and disease diagnosis is high, the time cost, economic cost and labor cost of professional and technical personnel's diagnosis will increase accordingly. In addition, the method of testing and detecting crops is costly and destructive, which has a negative impact on the growth and planting of crops.
[0086] To overcome the shortcomings of the above-mentioned technical solutions, related technologies also provide a solution for identifying crop pest and disease status based on RGB images. This solution uses an RGB camera to capture RGB images of crops, then performs image analysis and processing on the RGB images using an image algorithm. Supervised learning of image annotation information derives a mapping relationship between the image and the status of plant pests and diseases. Based on this mapping relationship, the crop pest and disease status is then detected. Depending on the image algorithm, the above-mentioned solution is mainly divided into two methods: traditional image algorithm detection and deep learning algorithm detection.
[0087] Traditional image detection algorithms often use manually designed extractors to extract features such as pixel distribution, color, and texture from RGB images. These extractors are then combined with classifiers to classify these features, enabling detection and analysis of RGB images. However, the design of these extractors relies on the expertise of professionals and complex parameter adjustments. Furthermore, each extractor is designed for a specific application scenario, resulting in poor generalization and robustness.
[0088] Deep learning algorithm detection mainly realizes feature extraction through data-driven means. It inputs RGB image data into a neural network, so that the neural network can extract deeper, dataset-specific feature representations from the RGB image based on a large number of pre-executed sample learning processes, and then combines the network classifier to realize intelligent recognition of the RGB image. This method can achieve efficient and accurate representation of the dataset, has stronger robustness and better generalization ability, and can be applied to end-to-end detection. Among them, the above-mentioned neural network includes a convolutional neural network or a feature attention module, etc. The above-mentioned scheme can also be combined with multi-scale feature aggregation and multimodal information fusion to extract richer image feature information from the RGB image to realize accurate detection of pests and diseases.
[0089] However, the detection accuracy of solutions based on RGB image recognition of crop pest and disease status is limited by the single nature of RGB image data. Pest and disease data usually has a high degree of mimicry. For example, the color, shape, and texture of some pests are very similar to those of crops. In many cases, it is difficult to identify and determine them simply through RGB images, which in turn affects detection accuracy and makes it difficult to solve the problem of pest mimicry.
[0090] To address the above technical issues, related technologies have also provided solutions for determining the pest and disease status of crops using hyperspectral imagery. Hyperspectral images, in the spectral dimension, include not only the three RGB channels but also spectral data of crops in different bands. Therefore, by analyzing hyperspectral images, it is possible to expand the crop image in the spectral dimension, thereby obtaining spectral data for each point in the crop image and image information of the crop in any spectral band.
[0091] In practical applications, solutions for determining the disease and pest status of crops based on hyperspectral images often collect vegetation hyperspectral images by shooting at a certain distance or handheld using drones, satellite remote sensing payloads, and hyperspectral cameras. The hyperspectral images are then multimodally fused with point cloud information, RGB images, and other data. The spectral change information is combined with traditional remote sensing images or image algorithms, deep learning algorithms, and other methods to process and analyze the hyperspectral images, thereby determining the disease and pest status of crops.
[0092] However, the acquisition of hyperspectral images depends on hyperspectral cameras, and hyperspectral cameras need to be taken by handheld, drone-mounted or satellite-mounted, which makes the equipment cost and technical cost of this solution high, and the implementation is difficult, time-consuming and labor-intensive; in addition, the preprocessing and analysis of hyperspectral images require a lot of computing resource costs, time costs and professional technicians costs; at the same time, the quality of hyperspectral images taken by drones and satellites is easily affected by environmental factors such as weather and light, which makes the quality of hyperspectral images unstable.
[0093] More importantly, agricultural crop environments are complex, and actual RGB or hyperspectral images often experience variations in occlusion, lighting, angle, and distance. However, methods for determining crop pest and disease status based on RGB or hyperspectral images fail to account for the high probability of occlusion between crops, variations in crop angle, lighting, and shooting distance. Consequently, the accuracy of crop pest and disease status determined using these methods is insufficient, leading to missed or false detections.
[0094] Based on the above technical problems, the embodiments of the present application provide a method, device, equipment and medium for determining the status of crop diseases and insect pests.
[0095] The embodiment of the present application first provides a method for determining the status of crop diseases and insect pests. Figure 1 A flow chart of the method for determining the status of crop pests and diseases provided in the embodiment of the present application is shown in FIG. Figure 1 As shown, the process may include the following steps:
[0096] Step 101: Determine a hyperspectral image of the crop.
[0097] In one embodiment, the crops may include cash crops, food crops, or oil crops.
[0098] In one embodiment, the crop may contain at least one type of plant.
[0099] In one embodiment, the hyperspectral image may correspond to a portion of a crop planting area or the entire crop planting area.
[0100] In practical applications, crop diseases and pests are highly mimics, making it difficult to accurately and efficiently identify their status using the texture features of RGB images. However, hyperspectral images can intuitively show the differences between crops and pests based on the different light bands between them.
[0101] Figure 2 This is a comparative diagram of the pest and disease status of the hyperspectral image provided in the embodiment of this application. Figure 2 As shown, the first image 201 is an RGB image of a cucumber leaf, and the second image 202 is a hyperspectral image of the cucumber leaf corresponding to the first image 201. The four images in the first image 201 correspond to the healthy state, powdery mildew state, green mottled mosaic disease state, and cucumber mosaic disease state from left to right, and the four images in the second image 202 correspond to the four images in the first image from left to right. Figure 2 It can be seen that the degree of difference in the status of pests and diseases presented by RGB images is lower than that of hyperspectral images. Therefore, hyperspectral images can improve the recognition accuracy of the status of crop pests and diseases.
[0102] In one embodiment, the hyperspectral image may be determined by any of the following methods:
[0103] The hyperspectral image is acquired through a hyperspectral data acquisition device.
[0104] By collecting RGB images of crops and then reconstructing them to generate hyperspectral images, this process improves the accuracy of determining crop pest and disease status while also reducing the equipment and maintenance costs associated with directly capturing hyperspectral images using hyperspectral cameras.
[0105] Step 102: Determine a density parameter that characterizes the distribution state of the crops.
[0106] In one embodiment, the density parameter may include the number of crops actually planted per unit area.
[0107] In one embodiment, the density parameter may further include a state in which at least a portion of the crop in the hyperspectral image is blocked.
[0108] In one embodiment, the density parameter may also represent the visibility of at least part of the crop in the hyperspectral image, the pixel depth, and the size of the pixel distribution area due to the setting of the image acquisition device and / or environmental factors such as lighting.
[0109] In one embodiment, the density parameter may be embodied in the form of a matrix or in the form of a density image; illustratively, the dimension or size of the density parameter may be the same as the dimension or size of the RGB image.
[0110] In one embodiment, the density parameter may be determined by any of the following methods:
[0111] Acquire the planting parameters and growth status parameters of the crop, and then determine the density parameters based on the planting parameters and growth status parameters; wherein the planting parameters may include the number of crops planted per unit plane or per unit space, and the growth status parameters may include the growth cycle of the crop and the plant characteristics of each growth cycle.
[0112] Obtain the plant distribution status of the crop in the current growth cycle, and then predict the density parameters based on the plant distribution status; wherein the plant distribution status may include the extension characteristics of the crop plant in at least one direction, the morphological characteristics of the plant roots and / or branches and leaves, etc.
[0113] Step 103: Determine the disease and insect pest status of the crop based on the density parameter and the hyperspectral image.
[0114] In one embodiment, the pest and disease status may include at least one of whether the crop is currently attacked by pests and diseases, the type of pests and diseases attacking the crop, and the extent and / or area of the crop attacked by pests and diseases.
[0115] In one embodiment, the pest and disease status may further include at least one of the probability, extent, and area of crops that may be infested by at least one pest and disease in at least one future period.
[0116] In one embodiment, the pest status can be determined by any of the following methods:
[0117] First data corresponding to a first area indicated by a density parameter is determined from a hyperspectral image, and a feature extraction operation is performed on the first data to obtain a first result, and then the pest and disease status of the first area is determined based on the first result; wherein the first area may include a crop planting area where the crop density indicated by the density parameter is greater than or equal to a density threshold.
[0118] Second data corresponding to a second area indicated by the density parameter is determined from the hyperspectral image, and a feature extraction operation is performed on the second data to obtain a second result, and the pest and disease status of the second area is determined based on the second result; wherein the second area may include a crop planting area where the crop density indicated by the density parameter is greater than or equal to a preset density; the preset density may include a crop planting density where there is no overlap or occlusion between crop plants.
[0119] From the above, it can be seen that the crop disease and pest status determination method provided in the embodiment of the present application, after determining the hyperspectral image of the crop, can more intuitively and comprehensively display the health level or disease and pest level of the crop through the hyperspectral image of the crop; and, after determining the density parameter characterizing the distribution status of the crop, the density parameter can comprehensively and accurately display the occlusion status and growth status between the stems, branches and leaves of the crop; on this basis, determining the disease and pest status of the crop based on the density parameter and the hyperspectral image can not only weaken the negative impact of the occlusion status and growth status between the stems, branches and leaves of the crop on the disease and pest status determination process, but also can generate a density indication for the disease and pest status determination process, thereby improving the consistency between the disease and pest status of the crop and the actual planting status, growth status and distribution status of the crop, thereby improving the accuracy of the disease and pest status of the crop.
[0120] Based on the above embodiments, in the crop disease and insect pest status determination method provided in the embodiments of the present application, determining the density parameter characterizing the distribution status of the crop can be achieved by the following steps:
[0121] Step A1: Collect RGB images of crops.
[0122] In one embodiment, an RGB image acquisition device provided in a crop planting environment may be used to acquire an image including crops, thereby obtaining an RGB image.
[0123] In one embodiment, the number of images in the RGB image may be at least one.
[0124] Step A2: downsampling and feature extraction are performed on the RGB image through the encoding module of the image generation model to obtain intermediate features of the RGB image.
[0125] Among them, the image generation model includes an encoding module and a decoding module; the decoding module is used to perform upsampling and feature reconstruction processing on the intermediate features to obtain a hyperspectral image.
[0126] In one embodiment, the image generation model may be used to process the RGB image to generate a hyperspectral image.
[0127] In one embodiment, the image generation model may be Pix2PixHD; wherein the encoding module may be the encoder part in Pix2PixHD, and the decoding module may be the decoder part in Pix2PixHD.
[0128] Figure 3 This is a schematic diagram of the structure of the pest and disease status determination system provided in the embodiment of this application. Figure 3 As shown, the pest and disease status determination system 3 includes an image generation model 301, a density perception model 302, a recognition model 303 and a generative adversarial neural network (GAN) 304.
[0129] Exemplarily, GAN 304 is used to train the image generation model in the initial state to obtain the image generation model 301.
[0130] Exemplarily, the image generation model 301 can be trained in the following manner:
[0131] A plurality of RGB images are collected as crop sample images 305 by an RGB image acquisition device, and the crop sample images are input into the image generation model in the initial state. The encoders E1 to E4 contained therein perform downsampling and feature extraction to obtain intermediate features f, and then the intermediate features f are input into decoders D1 to D4 to perform upsampling and feature reconstruction processing to obtain a reconstruction result 306. At the same time, a hyperspectral label image 307 collected by a hyperspectral image acquisition device is obtained, and then based on the degree of difference between the reconstruction result 306 and the hyperspectral label image 307, the model parameters of the image generation model in the initial state are adjusted to obtain the image generation model 301.
[0132] For example, the degree of difference between the reconstruction result 306 and the hyperspectral label image 307 can be determined by the GAN 304. For example, the reconstruction result 306 and the hyperspectral label image 307 can be respectively input into the GAN 304, so that the GAN 304 can determine whether the reconstruction result 306 is the hyperspectral label image 307, thereby obtaining the degree of difference.
[0133] Exemplarily, in order to improve the consistency between the reconstruction result and the hyperspectral label image, joint training can be performed through GAN and the initial state image generation model to improve the quality and accuracy of the reconstruction result generated by the image generation model; exemplarily, the GAN can be PatchGAN.
[0134] Exemplarily, adjusting the model parameters of the image generation model in the initial state can be performed based on the first loss function shown in formula (1) and the second loss function shown in formula (2).
[0135]
[0136]
[0137] Among them, l adv is the generation adversarial loss of GAN, l rec is the image reconstruction loss of the reconstruction result, To reconstruct the results, is the hyperspectral label image, x in is the crop sample image.
[0138] For example, by rec Adjusting the model parameters of the initial state image generation model can improve the consistency between the reconstruction result and the hyperspectral label image; adv Adjusting the model parameters of the initial state image generation model can further improve the consistency between the reconstruction results and the hyperspectral label images, and improve the consistency between the two in the overall texture and style dimensions.
[0139] For example, after the image generation model training is completed, during the process of generating the hyperspectral image, the GAN can be controlled to no longer execute the above judgment process.
[0140] Step A3: Process the intermediate features through the density perception model to obtain density parameters.
[0141] In one embodiment, the density parameter can be obtained by:
[0142] Feature aggregation processing is performed on multiple intermediate features through a density perception model, and the result of the aggregation processing is determined as a density parameter; exemplarily, the multiple intermediate features may include downsampling and feature extraction processing of multiple RGB images through an encoding module of an image generation model; exemplarily, the multiple RGB images may be RGB images captured at different angles of crops planted at the same position in a crop planting environment by an RGB image acquisition device.
[0143] From the above, it can be seen that the crop disease and pest status determination method provided by the embodiment of the present application, the image generation model includes an encoding module and a decoding module, the encoding module is used to perform downsampling and feature extraction processing on the RGB image to obtain the intermediate features of the RGB image, and the decoding module is used to perform upsampling and feature reconstruction processing on the intermediate features to obtain a hyperspectral image. In this way, through the above operations, the equipment setting cost and maintenance cost generated by setting up a hyperspectral image acquisition device for directly acquiring hyperspectral images can be reduced; and, by processing the intermediate features through the density perception model to obtain density parameters, the consistency between the density parameters and the RGB image can be improved; at the same time, since the density parameters are obtained by the density perception model performing downsampling and feature extraction processing on the RGB image by the encoding module of the image generation model, the redundancy of the intermediate features can be reduced, thereby improving the data processing efficiency of the density perception model.
[0144] Based on the foregoing embodiment, in the crop disease and pest status determination method provided in the embodiment of the present application, the density perception model includes K hole convolution modules; K is an integer greater than or equal to 3.
[0145] In one embodiment, the dilation coefficients of the K dilated convolution modules may be different.
[0146] Accordingly, the intermediate features are processed by the density-aware model to obtain the density parameters, which can be achieved through the following steps:
[0147] Step B1: Perform feature extraction on the intermediate features based on the kth hole coefficient through the kth hole convolution module to obtain the kth extraction result.
[0148] Here, k is an integer greater than or equal to 1 and less than or equal to K.
[0149] Figure 4 This is a schematic diagram of the structure of the density perception model provided in the embodiment of this application. Figure 4 In this paper, three dilated convolution modules are used as examples to illustrate. Figure 4 As shown, the density-aware model 302 may include a first dilated convolution module to a third dilated convolution module, and may also include an upsampling processing unit U, a splicing layer, and a convolution layer.
[0150] Exemplarily, the first to third dilated convolution modules in the density-aware model 302 are arranged in parallel to simultaneously implement dilated convolution operations on intermediate features.
[0151] Exemplarily, the hole coefficients corresponding to the first to third hole convolution modules may be 2, 4, and 6, respectively; exemplary, the convolution kernels of the first to third hole convolution modules may be 3*3, respectively.
[0152] Step B2: performing splicing processing on the first extraction result to the Kth extraction result to obtain a splicing result.
[0153] In one embodiment, if the first extraction result to the Kth extraction result are respectively M*N matrices, the concatenation result may be an M*N*K matrix.
[0154] In one embodiment, the upsampling processing unit U included in the density perception model 302 can perform upsampling processing on the first extraction result to the Kth extraction result respectively to obtain the first upsampling result to the Kth upsampling result, and then the first upsampling result to the Kth upsampling result are spliced in the RGB dimension to obtain a splicing result.
[0155] In one embodiment, a splicing process may be performed on the first extraction result to the Kth extraction result through a splicing layer in the density-aware model 302 to obtain a splicing result.
[0156] Step B3: Perform convolution processing on the splicing result to obtain density parameters.
[0157] In one embodiment, the convolution layer included in the density perception model 302 may be used to perform convolution processing on the splicing result to obtain a convolution result, and then the upsampling processing unit U may be used to perform upsampling processing on the convolution result to obtain a density parameter; exemplarily, the dimension of the density parameter may be the same as the dimension of the RGB image; exemplarily, the convolution kernel of the convolution layer may be 3*3.
[0158] From the above, it can be seen that in the crop disease and pest status determination method provided in the embodiment of the present application, the kth hole convolution module of the density perception model performs feature extraction on the intermediate features based on the kth hole coefficient to obtain the kth extraction result. In this way, through the above operation, more scale information can be extracted from the intermediate features without changing the dimension of the intermediate features; and by performing splicing processing on the first extraction result to the Kth extraction result to obtain the splicing result, the comprehensiveness and accuracy of the scale characteristics of the receptive field contained in the splicing result can be expanded; on this basis, by performing convolution processing on the splicing result to obtain the density parameter, the accuracy of the density parameter can be improved.
[0159] Based on the above embodiments, the method for determining the status of crop diseases and insect pests provided in the embodiments of the present application may further include the following steps:
[0160] Step C1: Acquire a crop sample image.
[0161] Step C2: Determine the density heat map of the crop sample image.
[0162] In one embodiment, the density heat map may be used to characterize the distribution state of crops in the crop sample image, the occlusion state between at least one of the crop plants, rhizomes, and leaves, and the like.
[0163] In one embodiment, the density heat map can represent the distribution status and occlusion status of crops at different pixel depths; for example, a deeper pixel depth can represent a higher crop distribution density or a higher degree of occlusion.
[0164] In one embodiment, the density heat map can be determined by processing the crop sample image through a neural network or by annotation by professional technicians.
[0165] Step C3: Perform downsampling and feature extraction processing on the crop sample image through the encoding module to obtain sample intermediate features.
[0166] In one embodiment, when the crop sample image includes multiple sample RGB images, the number of intermediate features included in the sample intermediate feature may also be multiple.
[0167] Step C4: Based on the density heat map and the intermediate features of the samples, the density perception model in the initial state is trained to obtain a density perception model.
[0168] In one embodiment, the density-aware model may be obtained by:
[0169] The intermediate features of the sample are processed by the density perception model in the initial state to obtain a sample heat map, and then the sample heat map and the density heat map are processed based on the third loss function to obtain the degree of difference between the sample heat map and the density heat map, and the model parameters of the density perception model in the initial state are adjusted based on the degree of difference, until the degree of difference between the sample heat map obtained by processing the intermediate features of the sample by the density perception model after the model parameters are adjusted and the density heat map meets the training requirements. At this time, the density perception model after the model parameters are adjusted can be determined as the density perception model.
[0170] For example, the third loss function can be expressed as formula (3):
[0171]
[0172] in, It can be a density heat map, It can be a sample heat map, and ldensity can represent the degree of difference between the density heat map and the sample heat map.
[0173] From the above, it can be seen that in the crop disease and pest status determination method provided in the embodiment of the present application, after obtaining the crop sample image and determining the density heat map of the crop sample image, the density heat map can accurately and comprehensively characterize the distribution density and occlusion status of the crop corresponding to the crop sample image; and, the crop sample image is subjected to downsampling and feature extraction processing by the encoding module to obtain the sample intermediate features, which can reduce the redundant data in the crop sample image; on this basis, based on the density heat map and the sample intermediate features, the density perception model of the initial state is trained to obtain the density perception model, which can not only reduce the amount of data calculation in the above-mentioned training process, shorten the training cycle and improve the training efficiency, but also improve the accuracy of data processing of the density perception model.
[0174] Based on the above embodiments, in the crop pest and disease status determination method provided in the embodiments of the present application, determining the density heat map of the crop sample image can be achieved by the following steps:
[0175] Step D1: Determine the skeleton line of the target part of the crop in the crop sample image.
[0176] In one embodiment, the target portion may include at least one occluded portion in the crop sample image; illustratively, the target portion may include a stem, branch, or leaf portion of the crop.
[0177] In one embodiment, the skeleton line of the target part may include a line connecting edge contour points of the target part.
[0178] In one embodiment, the skeleton line of the target site can be determined by:
[0179] Determine the crop variety and the crop growth cycle when the crop sample image is collected, then determine the crop plant status based on the variety and growth cycle, and outline the target part in the crop sample image based on the plant status, and determine the outline result as the skeleton line.
[0180] Step D2: Determine the bone pixel value of the skeleton line.
[0181] In one embodiment, the skeleton pixel value may include the pixel depth of each pixel point included in the skeleton line.
[0182] In one embodiment, the skeleton pixel value may be obtained by summing up the pixel depths of the pixels included in the skeleton line in the crop sample image.
[0183] Step D3: Determine a density heat map based on the bone pixel values.
[0184] In one embodiment, the density heat map can be obtained by:
[0185] The bone pixel values of each contour point in the skeleton line are counted to obtain the distribution state of the bone pixel values. The distribution state and the pixel coordinates of each contour point are then integrated, and the integration result is determined as a density heat map.
[0186] From the above, it can be seen that in the crop disease and pest status determination method provided in the embodiment of the present application, after determining the skeleton line of the target part of the crop in the crop sample image, the distribution and extension status of the target part of the crop can be reflected through the skeleton line; and after determining the skeleton pixel value of the skeleton line, the density heat map is determined based on the skeleton pixel value, which can improve the consistency between the density heat map and the distribution or extension status of the target part; at the same time, when the target part is adjusted or changed, the density heat map of any part in the crop sample image can be determined through the above method, thereby improving the flexibility of determining the density heat map, and also improving the comprehensiveness and accuracy of the density heat map.
[0187] Based on the above embodiments, in the crop disease and insect pest status determination method provided in the embodiments of the present application, the density heat map is determined based on the bone pixel value, which can be achieved by the following methods:
[0188] Perform convolution processing on the bone pixel values to obtain a convolution result; determine the density heat map as the convolution result.
[0189] In one embodiment, the convolution result can be obtained by:
[0190] Gaussian convolution processing is performed on the bone pixel values based on the extension state of the bone line to obtain a convolution result; illustratively, the Gaussian kernel and standard deviation of the above-mentioned Gaussian convolution can be adjusted or modified according to the setting method of the RGB image acquisition device; illustratively, the above-mentioned setting method can include the straight-line distance between the RGB image acquisition device and the crop or the height of the RGB image acquisition device; the size of the above-mentioned Gaussian kernel can be 91, and the standard deviation can be 22.
[0191] As can be seen from the above, in the crop pest and disease status determination method provided in the embodiment of the present application, convolution processing is performed on the skeleton pixel values to obtain a convolution result, and the density heat map is determined as the convolution result. In this way, through the above operation, it is possible to further extract the pixel features carried by each pixel value in the skeleton pixel value, thereby improving the accuracy of the convolution result and the density heat map.
[0192] Based on the above embodiments, in the crop disease and insect pest status determination method provided in the embodiments of the present application, determining the skeleton line of the target part in the crop sample image can be achieved by the following methods:
[0193] The morphology of the target part in the crop sample image is analyzed to determine the skeleton key points of the target part; and the skeleton line of the target part is determined based on the skeleton key points.
[0194] In one embodiment, the morphology of the target site may include at least one of the extension direction of the target site, the size of the target site, and the shape of the target site; illustratively, the size of the target site may include at least one of the width, length, and thickness of the target site.
[0195] In one embodiment, the morphology of the target part can be determined based on the variety or type of the crop and the current growth cycle of the crop.
[0196] In one embodiment, the skeleton key points may include a set of multiple pixel points contained in a pixel area corresponding to the target part in the crop sample image.
[0197] In one embodiment, the skeletal key points of the target part can be determined by:
[0198] Determine the outline of the target part and the pixel coordinates of the trunk center of the target part, and determine the set of the above pixel coordinates as the skeletal key point of the target part; exemplarily, the trunk center may include the stem center or leaf stem texture of the crop used to support the target part.
[0199] In one embodiment, the skeleton line of the target site can be determined by:
[0200] Based on the contour and / or biological features of the target part, the connection method of the skeleton key points is determined, and the various skeleton key points are connected based on the above connection method, and the contour formed by the connected skeleton key points is determined as a skeleton line; exemplarily, the above connection method may include the connection order and whether to connect, etc.
[0201] From the above, it can be seen that in the crop disease and pest status determination method provided in the embodiment of the present application, the morphology of the target part in the crop sample image is analyzed to determine the skeletal key points of the target part. In this way, through the above operation, the consistency between the skeletal key points and the target morphology in the crop sample image can be improved; and the skeleton line of the target part is determined based on the skeleton key points. In this way, the extension and / or growth state of the target part in the crop sample image can be reflected through the skeleton line.
[0202] Based on the above embodiments, in the crop disease and insect pest status determination method provided in the embodiments of the present application, determining the skeleton pixel value of the skeleton line can be achieved by the following method:
[0203] Determine the extension length of the bone line; and determine the bone pixel value based on the extension length.
[0204] In one embodiment, the extension length may include the straight-line pixel distance between the farthest-separated skeleton key points among all the skeleton key points included in the skeleton line; illustratively, the straight-line pixel distance may include the Euclidean distance between two skeleton key points.
[0205] In one embodiment, the extension length may include the length of a curve formed from the first skeleton key point to the last skeleton key point included in the skeleton line.
[0206] In one embodiment, the extension length can be determined by:
[0207] Determine the pixel coordinates of each bone key point in the bone line, then determine the distance between the pixel coordinates of adjacent bone key points based on the connection order between the bone key points, perform statistics on the above distances, and then determine the statistical results as the extension length.
[0208] In one embodiment, the bone pixel value may be determined by any of the following methods:
[0209] The depth is obtained by correcting the initial pixel depth of each skeleton key point in the skeleton line; wherein the initial pixel depth may include the pixel depth of the skeleton key point in the crop sample image.
[0210] The sum of the pixel values of all keypoints in the skeleton line is set as the target pixel value, and the quotient between the target pixel value and the number of keypoints is used as the skeleton pixel value. For example, to more accurately represent the density of the crop, the target pixel value can be 1. Then, for a skeleton line of length len, the value of each pixel on the line segment can be 1 / len. In other words, the skeleton pixel value can decrease as the length of the skeleton line increases.
[0211] Figure 5 This is a schematic diagram of the image of the density heat map provided in the embodiment of the present application. Figure 5As shown, the crop image 501 can be a crop sample image, in which the target part can be the leaf part of the plant, and the leaf parts of the plant are in a dense mutual occlusion state; the leaf image 502 can be an image of a part of the leaf part in the crop image 501; the third image 503 can be a crop sample image marked with a skeleton line 504, and the skeleton line 504 can be a dark line in the third image 503, which runs through the trunk center of the leaf part; the fourth image 505 can be the density heat map in the aforementioned embodiment, and the fifth image 506 can be a density heat map of the part of the leaf part corresponding to the leaf image 502.
[0212] As can be seen from the above, in the crop pest and disease status determination method provided in the embodiments of the present application, after determining the extension length of the skeleton line, the skeleton pixel value is determined based on the extension length. In this way, through the above operation, the skeleton pixel value can be associated with the extension length of the skeleton line, so that the skeleton pixel value can indirectly reflect the distribution status of the skeleton line.
[0213] Based on the above embodiments, in the crop disease and insect pest status determination method provided in the embodiments of the present application, collecting RGB images of crops can be achieved by the following methods:
[0214] RGB images are continuously collected through a movable image acquisition device set in the crop planting space.
[0215] In one embodiment, the planting space may include an indoor space or an outdoor space; illustratively, the indoor space may include a laboratory or a planting greenhouse; illustratively, the outdoor space may include a field.
[0216] In one embodiment, the movable image acquisition device may be disposed in a movable device disposed in the planting space.
[0217] In one embodiment, there may be multiple movable image acquisition devices, and the movement modes of the respective movable image acquisition devices may be different; illustratively, the above-mentioned movement modes may include at least one of a movement direction, a movement path, and a movement speed.
[0218] Figure 6A This is a schematic diagram of the structure of the movable image acquisition device provided in the embodiment of the present application. Figure 6A As shown, crops 602 may be planted in a planting greenhouse 601 , and a plurality of slide rails 603 may be provided in the top space of the planting greenhouse 601 , and a movable image acquisition device 604 may be mounted on the slide rails 603 .
[0219] For example, the structure and size of the slide rail 603 can be determined according to the structure of the planting greenhouse 601. For example, fixed points can be set at both ends of the planting greenhouse 601, and the slide rail 603 can be erected through the fixed points to carry the movable image acquisition device 604, so that the movable image acquisition device 604 can continuously collect sample RGB images or RGB images while moving along the slide rail.
[0220] For example, the sample RGB image or RGB image can be sent to the server device 606 via the network device 605, so that the processor of the server device 606 can execute the crop pest and disease status determination method provided in the embodiment of the present application, thereby determining the pest and disease status of the crop 602.
[0221] Exemplarily, the network device 605 may include a base station device in a mobile communication system; Exemplarily, the base station device may include a fifth generation mobile communication system (5 th The 5G base station is used to realize the real-time and stable transmission of high-resolution and large-scale RGB images.
[0222] Figure 6B This is a schematic diagram of the structure of the mobile image acquisition device provided in the embodiment of the present application for acquiring RGB images. Figure 6B As shown, the movable image acquisition device 604 can continuously acquire RGB images while moving along the slide rail 603, so that it can acquire crop images in the area corresponding to the slide rail 603; for example, the movable image acquisition devices set on other slide rails inside the planting greenhouse can also perform the above steps until the crop images of all areas in the planting greenhouse are acquired.
[0223] In practical applications, crop images within a planting area are typically captured using handheld or fixed-mounted RGB cameras. However, the image acquisition range of this acquisition method is limited by the camera's location, limiting it to a small area corresponding to the RGB camera's location. To achieve seamless image capture within a crop planting area, multiple RGB cameras are required, resulting in high equipment and installation costs. Furthermore, data acquisition with a handheld RGB camera is time-consuming and labor-intensive, and can lead to missed images and damage to crops.
[0224] In the crop disease and pest status determination method provided in the embodiment of the present application, a movable image acquisition device is set in the crop planting space to continuously acquire RGB images, which can reduce the installation cost and equipment cost caused by installing multiple image acquisition devices in the planting space, and can also improve the flexibility of RGB image acquisition and reduce the probability of missing the planting area in the planting space, thereby improving the integrity of the RGB image and the comprehensiveness of the crop characteristics carried in the RGB image.
[0225] Based on the above embodiments, in the crop pest and disease status determination method provided in the embodiments of the present application, the crop pest and disease status is determined based on density parameters and hyperspectral images, which can be achieved by the following steps:
[0226] Step E1: extract features from the hyperspectral image using the feature extraction module of the recognition model to obtain feature extraction results.
[0227] In one embodiment, the recognition model can be used to process hyperspectral images and density parameters to determine the pest and disease status of crops; illustratively, the recognition model can include at least one type of neural network model.
[0228] In one embodiment, the feature extraction module may include a convolutional neural network or a Transformer; illustratively, the convolutional neural network may include vgg16.
[0229] In one embodiment, the feature extraction result can be obtained by:
[0230] The convolutional layer, pooling layer and fully connected layer contained in vgg16 are used to perform convolution, pooling and fully connected processing on the data output by the previous layer in turn, and the result of the fully connected processing is determined as the feature extraction result.
[0231] Step E2: Determine a weight parameter based at least on the density parameter.
[0232] In one embodiment, the weight parameter may include multiple parameters; illustratively, the weight parameter may be used to perform weighted processing on the feature extraction result.
[0233] In one embodiment, the weight parameter may be determined as follows:
[0234] The weight parameter is determined based on the density interval in which the density parameter is located; exemplarily, if the density interval in which the density parameter is located is the first interval, the weight parameter may be the first parameter, and if the density interval in which the density parameter is located is the second interval, the weight parameter may be the second parameter; exemplarily, the density interval may be pre-set; exemplarily, the density interval may be related to at least one of the crop variety, the crop growth cycle, and the crop planting environment.
[0235] Step E3: Process the feature extraction results based on the weight parameters to determine the pest and disease status.
[0236] In one embodiment, the feature extraction results may be weighted based on a weight parameter, and the weighted processing result may be determined as the pest and disease status.
[0237] From the above, it can be seen that in the crop disease and pest status determination method provided in the embodiment of the present application, feature extraction is performed on the hyperspectral image through the feature extraction module in the recognition model to obtain a feature extraction result. In this way, redundant data in the hyperspectral image can be reduced, and the density of the disease and pest features in the feature extraction result can be improved; and, at least a weight parameter is determined based on the density parameter, so that the weight parameter can be associated with the density parameter, thereby improving the consistency between the weight parameter and the density parameter; on this basis, the feature extraction result is processed based on the weight parameter to determine the disease and pest status, so that the disease and pest status is not only associated with the feature extraction result of the hyperspectral image, but also related to the weight parameter associated with the density parameter, thereby weakening the negative impact of crop occlusion and distribution status on the disease and pest status, and improving the accuracy of the disease and pest status.
[0238] Based on the above embodiments, in the crop disease and insect pest status determination method provided in the embodiments of the present application, determining the weight parameter based on at least the density parameter can be achieved by the following steps:
[0239] Step F1: Process the nth feature extraction result and density parameter output by the nth feature extraction unit of the feature extraction module through the mth attention unit of the attention module to obtain the mth processing result.
[0240] Among them, the recognition model includes an attention module and a feature extraction module, and at least some of the feature extraction units in the feature extraction module are cross-set with the attention units in the attention module; m and n are both integers greater than or equal to 1.
[0241] In one embodiment, the feature extraction module may include multiple feature extraction units, and the attention module may include multiple attention units; illustratively, at least some of the adjacent feature extraction units in the multiple feature extraction units may be cross-arranged with attention units; illustratively, Figure 3 As shown, the diamond filling units in the recognition model 303 can be feature extraction units, and the i-th attention unit and the j-th attention unit can be cross-set between the feature extraction units; wherein i and j are different positive integers, and j can be greater than i.
[0242] In one embodiment, the hyperspectral image may be input data of the first feature extraction unit.
[0243] In one embodiment, the input data of each attention unit may include a density parameter and a feature extraction result output by a previous feature extraction unit adjacent to it.
[0244] In one embodiment, when the feature extraction module is vgg16, attention units can be set in some designated intermediate layers of vgg16. For example, attention units can be set at the 7th, 10th and 13th layers of the vgg16 intermediate layer, respectively, so that in the process of vgg16 processing the hyperspectral image, the features of the dense areas and occluded areas of the crops can be paid attention to.
[0245] For example, the size of the hyperspectral image may be 224*224.
[0246] For example, when attention units are set at the 7th, 10th and 13th layers of the vgg16 intermediate layer respectively, the density image corresponding to the density parameter can be downsampled to the same size as the output data of the 7th, 10th and 13th layers, and the attention unit performs point-by-point calculation on the data output by the 7th, 10th or 13th layer and the density image corresponding to the density parameter, and performs residual attention calculation in the spatial dimension through formula (4).
[0247]
[0248] Among them, f i sptial is the output data of the i-th attention unit, f i It can be the feature extraction result output by the previous feature extraction unit adjacent to the i-th attention unit.
[0249] Step F2: Determine a weight parameter based on the mth processing result.
[0250] In one embodiment, the processing results output by each attention unit can be statistically averaged, and the result of the statistical average can be determined as a weight parameter.
[0251] From the above, it can be seen that the crop disease and pest status determination method provided in the embodiment of the present application processes the nth feature extraction result and density parameter output by the nth feature extraction unit of the feature extraction module through the mth attention unit of the attention module to obtain the mth processing result, and at least part of the feature extraction units of the feature extraction module in the recognition model are cross-set with the attention units of the attention module. In this way, through the above operation, the output data of the attention unit can improve the intervention and guidance of the density dimension of the feature extraction process of the next adjacent feature extraction unit, and also enable the mth processing result to include richer feature extraction result components; on this basis, the weight parameter is determined based on the mth processing result, so that the weight parameter includes the density distribution status of the crop and the pixel characteristics of the crop, thereby improving the matching between the weight parameter and the actual status of the crop.
[0252] Based on the above embodiments, in the crop disease and insect pest status determination method provided in the embodiments of the present application, determining the weight parameter based on the mth processing result can be achieved in the following manner:
[0253] Perform adaptive average pooling (AAP) processing on the mth processing result to obtain a first pooling result; perform self-attention maximum pooling processing on the mth processing result to obtain a second pooling result; determine the weight parameters based on the first pooling result and the second pooling result.
[0254] In one embodiment, the AAP processing and the self-attention maximum pooling processing on the mth processing result can be performed in parallel, or the order can be adjusted, which is not limited in this embodiment of the present application.
[0255] Figure 7 A schematic diagram of the structure of the density attention unit provided in the embodiment of the present application is shown as follows: Figure 7 As shown, the input data of the density attention unit 701 may include the feature extraction result f output by the previous feature extraction unit adjacent to it. i And the density image corresponding to the density parameter For example, after downsampling the density image, f i as well as Execute the process shown in formula (4) to obtain f i sptial .
[0256] For example, the first pooling layer can be used to i sptial AAP processing is performed, and convolution processing is performed on the results of the AAP processing in sequence through two convolution layers with 1*1 convolution kernels set in cascade to obtain the first pooling result.
[0257] For example, f can be pooled by the second pooling layer i sptial Perform self-attention maximum pooling processing, and perform convolution processing on the results of the self-attention maximum pooling processing in sequence through two convolution layers with 1*1 convolution kernels set in cascade to obtain the second pooling result.
[0258] Exemplarily, point-by-point addition processing may be performed on the first pooling result and the second pooling result, and weight parameters may be obtained through processing of a Sigmod function.
[0259] For example, the weight parameter can be compared with f i sptial The product between them is used as the attention feature f output by the density attention unit i out ; Wherein, the value of i can be 7, 10 and 13; accordingly, the weight parameter can be used to perform weighted processing on the input data of the next feature extraction unit adjacent to the i-th attention unit.
[0260] From the above, it can be seen that in the crop disease and pest status determination method provided in the embodiment of the present application, the first pooling result is obtained by performing AAP processing on the mth processing result, and the second pooling result is obtained by performing self-attention maximum pooling processing on the mth processing result. In this way, through the above two different types of pooling operations, not only the data amount of the mth processing result can be reduced, but also the feature data carried by the mth processing result can be fully retained; and, based on the first pooling result and the second pooling result, the weight parameters are determined so that the weight parameters can comprehensively and completely include the feature data contained in the mth processing result.
[0261] Based on the above embodiments, the method for determining the status of crop diseases and insect pests provided in the embodiments of the present application may further include the following steps:
[0262] Step G1: Obtain sample density parameters obtained after the density perception model processes the crop sample image.
[0263] In one embodiment, the process of obtaining the sample density parameter may be the same as the process of determining the density parameter in the aforementioned embodiment.
[0264] Step G2: Obtain a sample hyperspectral image obtained by processing the crop sample image with the image generation model.
[0265] Exemplarily, the process of obtaining the sample hyperspectral image is the same as the process of determining the hyperspectral image in the aforementioned embodiment.
[0266] Step G3: Determine the pest and disease status category of the crop sample image.
[0267] In one embodiment, the pest and disease status category may include data such as whether the crop is in a state of being infested by pests and diseases when the crop sample image is collected, the degree and scope of the crop being infested by pests and diseases, and the category of the pests and diseases.
[0268] In one embodiment, the pest and disease status category can be determined by manual labeling.
[0269] Step G4: Based on the sample density parameter, the sample hyperspectral image, and the pest and disease status category, the recognition model of the initial state is trained to obtain a recognition model.
[0270] In one embodiment, during the above training process, the pest and disease status category can be used as label data for the training process, and supervised training is performed on the recognition model of the initial state, thereby improving training efficiency.
[0271] In one embodiment, the recognition model can be obtained by:
[0272] The sample density parameters and the sample hyperspectral images are processed by the recognition model of the initial state to obtain the sample recognition results; based on the degree of difference between the pest and disease status category and the sample recognition results, the model parameters of the recognition model of the initial state are adjusted to obtain the recognition model.
[0273] For example, the pest and disease state category and the sample recognition result can be calculated by using a cross entropy loss function to obtain a calculation result, and back propagation training is performed based on the calculation result to obtain a recognition network; wherein the cross entropy loss function can be shown as formula (5):
[0274]
[0275] Among them, l class is the cross entropy loss between the pest and disease status category and the sample identification result, For pest and disease status categories, is the sample identification result; N is the number of status categories in the pest and disease status category, and N is an integer greater than 1.
[0276] From the above, it can be seen that the crop disease and pest status determination method provided in the embodiment of the present application, after obtaining the sample density parameter obtained after the density perception model processes the crop sample image, obtaining the sample hyperspectral image obtained after the image generation model processes the crop sample image, and determining the disease and pest status category of the crop sample image, the recognition model of the initial state is trained based on the sample density parameter, the sample hyperspectral image and the disease and pest status category to obtain the recognition model. In this way, through the above operation, the density perception model, the image generation model and the recognition model are trained separately, thereby reducing the coupling degree between the training processes of each model; and through the above operation, the density perception model and the image generation model are directly applied in the training process of the recognition model of the initial state, thereby improving the training efficiency of the recognition model of the initial state; at the same time, through the disease and pest status category, the supervised training of the recognition model of the initial state is realized, thereby improving the training efficiency and improving the accuracy of the recognition model in determining the disease and pest status category of the crop.
[0277] Based on the above embodiments, the method for determining the status of crop diseases and insect pests provided in the embodiments of the present application may further perform the following steps:
[0278] Step H1: Determine additional data.
[0279] In one embodiment, the additional data may include pre-set interference data or authentication data; exemplarily, the interference data may include noise data, wherein the noise data may include Gaussian white noise; exemplarily, the authentication data may include watermark data or encrypted data.
[0280] Step H2: Collect RGB images of crops.
[0281] Illustratively, the RGB image can be captured by a movable image capture device using the method provided in the aforementioned embodiment.
[0282] Step H3: Determine verification image data based on the additional data and the RGB image.
[0283] In one embodiment, the verification image data may include all pixel features of the RGB image and at least part of the data features of the additional data.
[0284] In one embodiment, the verification image data can be used to verify the system status of the pest and disease status determination system; illustratively, the system status may include whether the pest and disease status determination system is capable of implementing the process of the crop pest and disease status determination method provided in the embodiment of the present application, and may also indicate whether the pest and disease status determination system is being used reasonably with authorization.
[0285] In one embodiment, the dimension and data volume of the additional data may be the same as those of the RGB image. Therefore, the additional data may be superimposed on the RGB image to obtain verification image data.
[0286] Figure 8 Schematic diagram of the comparison between the RGB image and the verification image data provided in the embodiment of the present application. Figure 8 As shown, the RGB image 801 can clearly and completely include the distribution status of crops and the growth status of the branches, leaves, and rhizomes of crops. Compared with the RGB image 801, the verification image data 802 contains Gaussian white noise, which reduces the clarity of the pixel data used to characterize the distribution status of crops and the growth status of the roots, stems, branches, and leaves of crops.
[0287] Step H4: Process the verification image data through the pest and disease status determination system to obtain a verification result.
[0288] Among them, the pest and disease status determination system includes an image generation model, a density perception model and a recognition model; the image generation model is used to determine the hyperspectral image; the density perception model is used to determine the density parameters; the recognition model is used to determine the pest and disease status
[0289] In one embodiment, the physical meaning of the verification result may be the same as the physical meaning of the pest and disease status, but the verification result may further include at least part of the data features carried by the additional data.
[0290] In one embodiment, the process of obtaining the verification result may be the same as the process of determining the pest status in the aforementioned embodiment, and will not be repeated here.
[0291] Step H5: Determine the system status of the pest and disease status determination system based on the verification result.
[0292] In one embodiment, the system status may be determined by any of the following methods:
[0293] If the verification result includes the target feature, the system status can be determined as follows: the pest and disease status determination system can implement the process and steps of the crop pest and disease status determination method provided in the embodiment of the present application; exemplarily, the target feature may include label data corresponding to the additional data; exemplarily, the target feature may include the identifier or name of the provider of the crop pest and disease status determination method provided in the embodiment of the present application.
[0294] If the verification result contains the target feature and the organization or enterprise using the pest and disease status determination system is in an unauthorized state, the system status can be determined as: the pest and disease status determination system is being used by the above-mentioned organization or enterprise without authorization.
[0295] In related technologies, copyright verification of models is typically performed through black-box authentication or white-box authentication. Black-box authentication methods include those based on adversarial samples, meta-learning, and transfer learning. These methods typically implement copyright verification by constructing a trigger set, i.e., verifying the copyright of the model based on a specific set of samples. White-box authentication methods include those based on encryption, watermarking, and verifiable computing. These methods primarily implement copyright verification by modifying the model's internal weights and structure, or through combined verification.
[0296] However, the pest and disease detection algorithms or models in related technologies do not have copyright verification functions.
[0297] In the crop pest and disease status determination method provided in the embodiment of the present application, after determining the additional data and collecting the RGB image of the crop, verification image data is determined based on the additional data and the RGB image. The verification data is processed by the pest and disease status determination system to obtain a verification result, and then the system status of the pest and disease status determination system is determined based on the verification result. Thus, through the above operations, the pest and disease status determination system provided in the embodiment of the present application has the function of verifying the system status, thereby enriching the functional scope of the pest and disease status determination system and realizing black box authentication of the pest and disease status determination system.
[0298] Based on the above embodiments, in the crop pest and disease status determination method provided in the embodiments of the present application, the pest and disease status determination system processes the verification image data to obtain the verification result, which can be achieved by the following methods:
[0299] The verification image data is processed by at least part of the model in the pest and disease status determination system to obtain an intermediate verification result.
[0300] Accordingly, the system status of the pest and disease status determination system based on the verification result can be achieved in the following ways:
[0301] A model state of at least a portion of the model is determined based on the intermediate verification results.
[0302] The system state includes the model state.
[0303] In one embodiment, at least part of the model may include at least one of an image generation model, a density perception model, and a recognition model.
[0304] In one embodiment, the intermediate verification result may include a verification hyperspectral image output by the image generation model; accordingly, the model status may include whether the image generation model is the image generation model provided in the embodiment of the present application; illustratively, whether the verification hyperspectral image obtained by processing and reconstructing the verification image data by the image generation model carries a first feature can be used to determine whether the image generation model is the image generation model provided in the embodiment of the present application; wherein, the first feature may correspond to the additional data.
[0305] In one embodiment, the intermediate verification result may include the verification density parameter output by the density perception model; accordingly, the model status may include whether the density perception model is the density perception model provided by the embodiment of the present application; exemplarily, whether the verification density parameter obtained by processing the verification intermediate feature output by the image generation model by the density perception model carries a second feature to determine whether the density perception model is the density perception model provided by the embodiment of the present application; wherein, the second feature may correspond to additional data.
[0306] In one embodiment, the intermediate verification result may include the verification result output by the recognition model; accordingly, the model status may include whether the recognition model is the recognition model provided in the embodiment of the present application; illustratively, whether the verification result obtained after the recognition model processes the verification density parameters and the verification hyperspectral image carries the target feature can be determined to determine whether the recognition model is the recognition model provided in the embodiment of the present application.
[0307] The model authentication methods provided by related technologies all directly determine whether the model is in an authorized state by directly judging the output data, but are unable to judge the intermediate results of the model, and therefore lack local module authentication capabilities.
[0308] In the crop pest and disease status determination method provided in the embodiments of the present application, verification image data is processed by at least a portion of the models in the pest and disease status determination system to obtain an intermediate verification result, and the model status of at least a portion of the models is determined based on the intermediate verification result. Thus, through the above operation, the model status of at least a portion of the models in the pest and disease status determination system can be flexibly determined; by associating the model status with the authorization status of at least a portion of the models, the above operation can determine the authorization status of at least a portion of the models in the pest and disease status determination system, and realize white-box authentication of the pest and disease status determination system on a module basis.
[0309] Based on the above embodiments, the method for determining the status of crop diseases and insect pests provided in the embodiments of the present application may further include the following steps:
[0310] Step J1: Obtain sample additional data and crop sample data.
[0311] In one embodiment, the sample additional data may be the same as the additional data in the aforementioned embodiment.
[0312] Step J2: Determine verification sample data based on the sample additional data and the crop sample data.
[0313] In one embodiment, the verification sample data may be determined in the same manner as the verification image data in the aforementioned embodiment.
[0314] In one embodiment, the verification sample data may be referred to as trigger data carrying Gaussian noise; illustratively, the first feature may include Gaussian noise carried by the trigger data, and the hyperspectral data carrying the first feature may be hyperspectral label data of the image generation model.
[0315] Step J3: Training the pest and disease status determination system in the initial state based on the verification sample data to obtain a status determination system.
[0316] In one embodiment, the intermediate verification results can be obtained in the aforementioned embodiment, so that each model in the initial state pest and disease status determination system processes the input data of the model to obtain an intermediate sample processing result, and based on the degree of difference between the intermediate sample processing result and the verification label, the parameters of the initial state pest and disease status determination system are adjusted to obtain a status determination system; wherein the verification label may include the first feature, the second feature and the target feature in the aforementioned embodiment.
[0317] As can be seen from the above, the pest and disease status determination system provided in the embodiments of the present application, after obtaining sample additional data and crop sample images, determines verification sample data based on the sample additional data and crop sample images, and trains the pest and disease status determination system in its initial state based on the verification sample data, thereby obtaining the pest and disease status determination system. Thus, through the above operations, targeted training of the pest and disease status determination system is achieved, enabling the pest and disease status determination system to have verification functions for the system state and the model state of at least part of the model, thereby protecting the intellectual property rights of the pest and disease status determination system and reducing the probability of improper use of the pest and disease status determination system.
[0318] Based on the above embodiments, the present application also provides a device for determining the status of crop pests and diseases. Figure 9 This is a schematic diagram of the structure of the crop disease and insect pest status determination device provided in the embodiment of the present application, as shown in FIG. Figure 9 As shown, the crop disease and insect pest status determination device 9 may include:
[0319] The determination module 901 is configured to determine a hyperspectral image of a crop; determine a density parameter representing a distribution state of the crop; and determine a disease and insect pest state of the crop based on the density parameter and the hyperspectral image.
[0320] In some embodiments, the crop pest and disease status determination device 9 may further include an acquisition module and a processing module, wherein the acquisition module is used to collect RGB images of crops;
[0321] A processing module is configured to perform downsampling and feature extraction processing on the RGB image through the encoding module of the image generation model to obtain intermediate features of the RGB image; wherein the image generation model includes an encoding module and a decoding module; the decoding module is configured to perform upsampling and feature reconstruction processing on the intermediate features to obtain a hyperspectral image;
[0322] The processing module is also used to process the intermediate features through the density perception model to obtain density parameters.
[0323] In some embodiments, the density-aware model includes K dilated convolution modules; K is an integer greater than or equal to 3;
[0324] a processing module, configured to perform feature extraction on the intermediate features based on the kth hole coefficient through the kth hole convolution module to obtain a kth extraction result; wherein k is an integer greater than or equal to 1 and less than or equal to K;
[0325] The processing module is used to perform splicing processing on the first extraction result to the Kth extraction result to obtain a splicing result; and perform convolution processing on the splicing result to obtain a density parameter.
[0326] In some embodiments, the acquisition module is configured to acquire a crop sample image;
[0327] A determination module 901 is configured to determine a density heat map of a crop sample image;
[0328] The processing module is used to perform downsampling and feature extraction processing on the crop sample image through the encoding module to obtain the intermediate features of the sample; based on the density heat map and the intermediate features of the sample, the density perception model in the initial state is trained to obtain the density perception model.
[0329] In some embodiments, the determination module 901 is configured to determine a skeleton line of a target portion of a crop in a crop sample image; determine a skeleton pixel value of the skeleton line; and determine a density heat map based on the skeleton pixel value.
[0330] In some embodiments, the processing module is configured to perform convolution processing on the bone pixel values to obtain a convolution result;
[0331] The determination module 901 is used to determine whether the density heat map is a convolution result.
[0332] In some embodiments, the determination module is used to analyze the morphology of the target part in the crop sample image, determine the skeleton key points of the target part, and determine the skeleton line of the target part based on the skeleton key points.
[0333] In some embodiments, the determination module 901 is configured to determine an extension length of a skeleton line; and determine a skeleton pixel value based on the extension length.
[0334] In some embodiments, the processing module is configured to extract features from the hyperspectral image using a feature extraction module of the recognition model to obtain a feature extraction result;
[0335] The determination module 901 is configured to determine a weight parameter based at least on the density parameter; and process the feature extraction result based on the weight parameter to determine the pest status.
[0336] In some embodiments, the processing module is configured to process, through an mth attention unit of the attention module, an nth feature extraction result and a density parameter output by an nth feature extraction unit of the feature extraction module to obtain an mth processing result; wherein the recognition model includes an attention module and a feature extraction module, and at least some of the feature extraction units in the feature extraction module are interleaved with the attention units in the attention module; and m and n are both integers greater than or equal to 1;
[0337] The determination module 901 is configured to determine a weight parameter based on the mth processing result.
[0338] In some embodiments, the processing module is configured to perform adaptive average pooling on the mth processing result to obtain a first pooling result; and perform self-attention maximum pooling on the mth processing result to obtain a second pooling result;
[0339] The determination module 901 is configured to determine a weight parameter based on the first pooling result and the second pooling result.
[0340] In some embodiments, the acquisition module is used to obtain a sample density parameter obtained after the density perception model processes the crop sample image; obtain a sample hyperspectral image obtained after the image generation model processes the crop sample image;
[0341] Determination module 901, for determining the pest and disease status category of the crop sample image;
[0342] The processing module is used to train the recognition model of the initial state based on the sample density parameter, the sample hyperspectral image and the pest and disease state category to obtain the recognition model.
[0343] In some embodiments, the determination module 901 is configured to determine additional data;
[0344] Acquisition module, used to collect RGB images of crops;
[0345] A determination module 901 is configured to determine verification image data based on the additional data and the RGB image;
[0346] A processing module is used to process the verification image data through the pest and disease status determination system to obtain a verification result; wherein the pest and disease status determination system includes an image generation model, a density perception model, and a recognition model; the image generation model is used to determine the hyperspectral image; the density perception model is used to determine the density parameter; and the recognition model is used to determine the pest and disease status;
[0347] The determination module 901 is configured to determine the system status of the pest and disease status determination system based on the verification result.
[0348] In some embodiments, a processing module is configured to process the verification image data using at least a portion of the model in the pest and disease status determination system to obtain an intermediate verification result;
[0349] The determination module 901 is configured to determine the model state of at least part of the model based on the intermediate verification result; wherein the system state includes the model state.
[0350] In some embodiments, an acquisition module is used to acquire sample additional data and crop sample images;
[0351] A determination module 901 is configured to determine verification sample data based on the sample additional data and the crop sample image;
[0352] The processing module is used to train the pest and disease status determination system in the initial state based on the verification sample data to obtain the pest and disease status determination system.
[0353] Based on the above embodiments, the present application also provides an electronic device, Figure 10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Figure 10 As shown, the electronic device 10 may include a processor 1001 and a memory 1002; wherein the memory 1002 stores a computer program, and when the computer program is executed by the processor 1001, it can implement the crop disease and pest status determination method provided in any of the previous embodiments.
[0354] Based on the foregoing embodiments, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor of an electronic device, it can implement the crop disease and pest status determination method provided in any of the previous embodiments.
[0355] The above description of the various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced with each other and will not be repeated herein for the sake of brevity.
[0356] The methods disclosed in the various method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0357] The features disclosed in the various product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0358] The features disclosed in the various method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0359] It should be noted that the above-mentioned computer-readable storage medium can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory (Flash Memory), a magnetic surface storage, an optical disc, or a compact disc read-only memory (CD-ROM); it can also be various electronic devices that include one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
[0360] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0361] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0362] 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 necessary general hardware nodes, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application 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), including a number of instructions for enabling 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 application.
[0363] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0364] These computer program instructions may 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, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0365] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0366] The above are only preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for determining the status of crop diseases and insect pests, characterized in that: The method comprises: determining a hyperspectral image of the crop; determining a density parameter characterizing a distribution state of the crop; The disease and insect pest status of the crop is determined based on the density parameter and the hyperspectral image.
2. The method according to claim 1, characterized in that The determining of a density parameter characterizing the distribution state of the crop comprises: collecting an RGB image of the crop; The encoding module of the image generation model performs downsampling and feature extraction processing on the RGB image to obtain intermediate features of the RGB image; wherein the image generation model includes the encoding module and the decoding module; the decoding module is used to perform upsampling and feature reconstruction processing on the intermediate features to obtain the hyperspectral image; The intermediate features are processed by a density perception model to obtain the density parameters.
3. The method according to claim 2, characterized in that The density-aware model includes K dilated convolution modules, where K is an integer greater than or equal to 3. The intermediate features are processed by the density-aware model to obtain the density parameter, including: Performing feature extraction on the intermediate feature based on the kth hole coefficient through the kth hole convolution module to obtain a kth extraction result; wherein k is an integer greater than or equal to 1 and less than or equal to K; Performing splicing processing on the first extraction result to the Kth extraction result to obtain a splicing result; A convolution process is performed on the splicing result to obtain the density parameter.
4. The method according to claim 2, characterized in that The method further comprises: Acquire crop sample images; determining a density heat map of the crop sample image; Performing downsampling and feature extraction processing on the crop sample image by the encoding module to obtain sample intermediate features; Based on the density heat map and the intermediate features of the samples, the density perception model in the initial state is trained to obtain the density perception model.
5. The method according to claim 4, characterized in that Determining the density heat map of the crop sample image includes: determining a skeleton line of a target portion of a crop in the crop sample image; Determine the skeleton pixel value of the skeleton line; The density heat map is determined based on the bone pixel values.
6. The method according to claim 5, characterized in that The determining the density heat map based on the bone pixel value includes: Performing convolution processing on the bone pixel value to obtain a convolution result; The density heat map is determined to be the convolution result.
7. The method according to claim 5, characterized in that The determining of the skeleton line of the target part of the crop in the crop sample image includes: Analyzing the morphology of the target part in the crop sample image to determine the skeletal key points of the target part; The skeleton line of the target part is determined based on the skeleton key points.
8. The method according to claim 5, characterized in that Determining the skeleton pixel value of the skeleton line includes: determining an extension length of the skeleton line; Based on the extension length, the bone pixel value is determined.
9. The method according to claim 1, characterized in that The determining of the disease and insect pest status of the crop based on the density parameter and the hyperspectral image includes: Extracting features from the hyperspectral image using a feature extraction module of a recognition model to obtain a feature extraction result; determining a weight parameter based at least on the density parameter; The feature extraction result is processed based on the weight parameter to determine the pest and disease status.
10. The method according to claim 9, characterized in that The determining of the weight parameter based at least on the density parameter comprises: Processing, by an mth attention unit of the attention module, an nth feature extraction result output by the nth feature extraction unit of the feature extraction module and the density parameter to obtain an mth processing result; wherein the recognition model includes the attention module and the feature extraction module, and at least some of the feature extraction units in the feature extraction module are interleaved with the attention units in the attention module; and m and n are both integers greater than or equal to 1; The weight parameter is determined based on the mth processing result.
11. The method according to claim 10, characterized in that The determining the weight parameter based on the mth processing result includes: Performing adaptive average pooling on the mth processing result to obtain a first pooling result; Performing self-attention maximum pooling processing on the mth processing result to obtain a second pooling result; Determine the weight parameter based on the first pooling result and the second pooling result.
12. The method according to claim 10, characterized in that The method further comprises: Obtaining sample density parameters obtained after the density perception model processes the crop sample image; Obtaining a sample hyperspectral image obtained by processing the crop sample image with an image generation model; determining the pest and disease status category of the crop sample image; Based on the sample density parameter, the sample hyperspectral image and the pest and disease state category, the recognition model of the initial state is trained to obtain the recognition model.
13. The method according to claim 1, wherein The method further comprises: Determine additional data; collecting an RGB image of the crop; determining verification image data based on the additional data and the RGB image; The verification image data is processed by a pest and disease status determination system to obtain a verification result; wherein the pest and disease status determination system includes an image generation model, a density perception model, and a recognition model; the image generation model is used to determine the hyperspectral image; the density perception model is used to determine the density parameter; and the recognition model is used to determine the pest and disease status; The system status of the pest and disease status determination system is determined based on the verification result.
14. The method according to claim 13, wherein: The verification image data is processed by the pest and disease status determination system to obtain a verification result, including: Processing the verification image data using at least part of the model in the pest and disease status determination system to obtain an intermediate verification result; Determining the system status of the pest and disease status determination system based on the verification result includes: A model state of the at least part of the model is determined based on the intermediate verification result; wherein the system state includes the model state.
15. The method according to claim 13, characterized in that The method further comprises: Obtain sample additional data and crop sample images; determining verification sample data based on the sample additional data and the crop sample image; The pest and disease status determination system in the initial state is trained based on the verification sample data to obtain the pest and disease status determination system.
16. A device for determining the status of crop pests and diseases, characterized in that: The crop disease and insect pest status determination device comprises: a determination module, configured to determine a hyperspectral image of the crop and a density parameter characterizing a distribution state of the crop; The determination module is further configured to determine the disease and insect pest status of the crop based on the density parameter and the hyperspectral image.
17. An electronic device, characterized in that: The electronic device includes a processor and a memory; wherein a computer program is stored in the memory; when the computer program is executed by the processor, the method for determining the status of crop pests and diseases as described in any one of claims 1 to 15 can be implemented.
18. A computer-readable storage medium, characterized in that The storage medium stores a computer program; when the computer program is executed by a processor of an electronic device, it can implement the method for determining the status of crop diseases and insect pests as described in any one of claims 1 to 15.