A method, medium and system for large-scale identification of aphid-transmitted viruses
Through the combination of drone aerial photography and deep learning models, the accurate location and identification of aphid-borne viruses are achieved, which solves the problem of inability to monitor and locate diseases in traditional prevention and control methods, improves the identification accuracy and positioning accuracy, and is suitable for precise prevention and control .
Patent Information
- Application Number
- CN202410483154.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-22
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-04-22
AI Technical Summary
Traditional aphid-borne virus prevention and control methods cannot effectively monitor and locate diseases, resulting in "treating the symptoms but not the root cause", and the use of pesticides will pollute the environment. The breeding cycle of disease-resistant varieties is long and the resistance may be weakened.
UAV aerial photography is used to obtain farmland images, and image processing and identification are performed through pre-trained aphid-borne virus distribution models and recognition models to achieve accurate location of aphid-borne viruses and accurate scoring of infection levels, combined with sliding window technology and convolution Neural network improves recognition accuracy and positioning accuracy.
It has achieved accurate identification and precise positioning of aphid-borne viruses, with a high degree of automation, a positioning accuracy of 1 square meter, an identification accuracy of ≥90%, no environmental pollution, a simple and reliable method, and suitable for precise prevention and control.
Smart Images

Figure CN118314478B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of crop disease prevention and control, and in particular relates to a method, a medium and a system for large-scale identification of aphid-transmitted viruses. Background Art
[0002] In my country's agricultural production, viral diseases spread by aphids are one of the important diseases that cause crop losses. Common viruses include cucumber green vein hydrangea virus transmitted by melon aphids and tobacco mosaic virus transmitted by whiteflies, which can cause various disease symptoms in crops and lead to reduced production. Traditional prevention and control methods include spraying chemical pesticides to kill disease-carrying insects and planting disease-resistant varieties. However, these methods have certain problems: excessive use of pesticides will pollute the environment, and the cultivation cycle of disease-resistant varieties is long and the resistance may be weakened. The main problem is that traditional prevention and control is "treating the symptoms but not the root cause", and it is impossible to effectively monitor and locate the disease, and it is impossible to guide precise prevention and control.
[0003] In response to the above problems, attempts to use thermal imaging, ultrasound and other technical means to detect crop diseases have made some progress and can perform scanning monitoring of large areas. However, these methods are limited by resolution and often have difficulty in making accurate judgments on the morphology of diseases. They can only give areas where there may be problems, but cannot accurately determine the coordinates of serious areas. Summary of the invention
[0004] In view of this, the present invention provides a method, medium and system for large-scale identification of aphid-transmitted viruses, which can accurately identify the virus and accurately locate the virus infection position, have a high degree of automation, and are convenient for real-time monitoring.
[0005] The present invention is achieved in that:
[0006] A first aspect of the present invention provides a method for large-scale identification of aphid-transmitted viruses, which comprises the following steps:
[0007] S01, obtaining drone cruise images of a designated farmland area, and stitching them together to form a first image;
[0008] S02, pre-processing the first image, deleting the area not including the crop image, and splicing the first image after the deletion into a second image;
[0009] S03, performing grayscale processing on the second image to obtain a third image;
[0010] S04, using a pre-trained suspected aphid-borne virus distribution model to calculate the third image to obtain an aphid-borne virus suspected distribution matrix, wherein each element of the aphid-borne virus suspected distribution matrix includes two parameters, namely, a coordinate and a corresponding aphid-borne virus suspected degree;
[0011] S05, clustering the virus suspicion degree of each element in the suspected distribution matrix to obtain multiple typical suspicion degrees;
[0012] S06, selecting a region picture corresponding to a suspicion degree closest to the plurality of typical suspicion degrees on the third image, and recording the region picture set;
[0013] S07, obtaining a high-definition image of each area picture, and using a pre-trained aphid-borne virus recognition model to recognize the high-definition image of each area picture, to obtain the aphid-borne virus infection degree of each high-definition image;
[0014] S08, optimizing the suspected distribution matrix of the aphid-borne virus using the infection degree of the aphid-borne virus of each high-definition image to obtain the aphid-borne virus distribution matrix;
[0015] S09, according to the aphid-borne virus distribution matrix, selecting the area pictures corresponding to the matrix elements whose aphid-borne virus suspicion degree is greater than a preset minimum threshold, and recording them as the precise collection area set;
[0016] S10, according to the set of precise collection areas, obtaining a high-definition image of each precise collection area, and using a pre-trained aphid-borne virus recognition model to recognize the high-definition image of each precise collection area, to obtain the aphid-borne virus infection degree of each precise collection area;
[0017] S11, optimizing the aphid-borne virus distribution matrix according to the obtained aphid-borne virus infection degree of each precise collection area, obtaining an aphid-borne virus target distribution matrix, and outputting it.
[0018] On the basis of the above technical solution, the large-scale identification method of aphid-transmitted virus of the present invention can also be improved as follows:
[0019] The specific implementation of step S02 includes:
[0020] Using semantic segmentation technology to identify the vegetation area of the first image and obtain the coordinates of the vegetation area;
[0021] According to the coordinates of the vegetation area, all non-vegetation areas are cropped from the first image to complete the deletion process of the area not containing the crop image;
[0022] The image regions retained after the deletion process are stitched together to generate a second image.
[0023] The beneficial effect of adopting the above-mentioned improved solution is: by using image feature matching and image stitching algorithms, a second image is generated from the original image after deleting the non-crop area.
[0024] Furthermore, the specific implementation of step S04 includes:
[0025] reading the third image;
[0026] According to the size of the third image, setting sliding window parameters, including sliding window size, sliding step size, and scanning path;
[0027] Slidingly intercepting all window images in the third image, loading a suspected distribution model of aphid-borne virus, predicting window images according to the suspected distribution model of aphid-borne virus, and constructing a window image data set;
[0028] Traverse and construct the suspected distribution matrix of aphid-borne viruses and store the predicted probabilities.
[0029] The beneficial effects of adopting the above-mentioned improved scheme are as follows: image blocks are intercepted through a sliding window, and the pre-trained model is input to predict the probability of aphid-transmitted virus, thereby outputting a matrix reflecting the distribution of suspected viruses in the entire image area, providing a basis for the subsequent determination of the precise virus-infected area.
[0030] Furthermore, the training steps of the suspected aphid-borne virus distribution model include:
[0031] Build a dataset containing images of healthy and infected crops;
[0032] Manually mark the locations of aphid-borne viruses and divide them into training sets, validation sets, and test sets;
[0033] Use convolutional neural network, set network layer parameters, use stochastic gradient descent method to optimize, set the number of training rounds and batch size parameters, and save the model with the highest accuracy in the validation set.
[0034] Furthermore, the specific implementation of step S06 includes:
[0035] Input the typical suspicion degree and the corresponding category label, and read the suspected distribution matrix of the aphid-borne virus;
[0036] Traversing each element of the aphid-transmitted virus suspected distribution matrix to obtain element coordinates and aphid-transmitted virus suspected degree;
[0037] The difference between the obtained aphid-borne virus suspicion degree and the typical suspicion degree is calculated, the closest element is selected, and the window picture of the third image is intercepted to construct a regional picture set.
[0038] The beneficial effect of adopting the above-mentioned improved scheme is as follows: by selecting the sub-block closest to the typical suspicion degree, the image area that may have a typical degree of aphid-borne virus infection is extracted, providing samples for subsequent identification and construction of the virus distribution matrix.
[0039] Furthermore, the specific implementation of step S09 includes:
[0040] Read the aphid-borne virus distribution matrix;
[0041] Browse the aphid-borne virus infection degree of each element of the aphid-borne virus distribution matrix;
[0042] Set the infection screening threshold and select elements above the threshold;
[0043] Record the coordinates corresponding to the elements above the threshold and construct a coordinate set;
[0044] Extract the images of the area corresponding to the coordinate set and construct an image set of the precise acquisition area.
[0045] The beneficial effect of adopting the above-mentioned improvement scheme is as follows: by setting the screening threshold, areas with higher virus infection rates are selected to construct a collection sample set, providing target areas for subsequent fine identification and determination.
[0046] Furthermore, the specific implementation of step S10 includes:
[0047] Read the high-definition image of each area corresponding to the accurate acquisition area image set;
[0048] Calculate the distance of the sample area from the ground;
[0049] Downsample the collected sample images to obtain high-resolution images, and input them into the recognition model;
[0050] Record the prediction results of aphid-borne virus infection, build a dictionary, read the aphid-borne virus distribution matrix, and update the aphid-borne virus infection degree of each precise collection area.
[0051] The beneficial effect of adopting the above-mentioned improvement scheme is: through the recognition feedback of high-resolution acquisition sample images, the virus infection distribution matrix is further optimized to more accurately reflect the actual virus infection distribution on crops.
[0052] Furthermore, the training steps of the aphid-borne virus recognition model include:
[0053] Construct a dataset of images with different degrees of infection;
[0054] Label the infection degree of crops in each image in the image dataset and divide the dataset according to the infection degree;
[0055] Use a convolutional neural network based on ResNet, freeze some weights, and set the parameters of the fully connected layer;
[0056] The Adam optimization algorithm was used to set the loss function parameters, and the model with the smallest loss on the validation set was saved as the aphid-borne virus recognition model.
[0057] A second aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores program instructions, and when the program instructions are executed, they are used to execute the above-mentioned large-scale identification method of aphid-borne viruses.
[0058] A third aspect of the present invention provides a large-scale identification system for aphid-borne viruses, comprising the above-mentioned computer-readable storage medium.
[0059] Compared with the prior art, the method, medium and system for large-scale identification of aphid-transmitted viruses provided by the present invention have the following beneficial effects:
[0060] 1. Use drones to take aerial photos to obtain an overview of crop growth, ensuring clear images and complete information;
[0061] 2. The first model preliminarily analyzes the image, locates the suspected diseased area, and significantly reduces the amount of data in the target area;
[0062] 3. Obtain high-resolution local images of the suspected area to improve the judgment basis of the second model;
[0063] 4. The second model realizes accurate classification and scoring of the degree of virus infection;
[0064] 5. Statistical analysis is used to obtain the coordinates of areas with severe virus infection, with a positioning accuracy of 1 square meter;
[0065] 6. The overall process is highly automated, enabling real-time monitoring over a wide range;
[0066] 7. No environmental pollution, the method is simple and reliable.
[0067] Compared with the prior art, the technical effects of the present invention are significantly improved:
[0068] 1. Dual models achieve precise recognition with an accuracy rate of ≥ 90%, exceeding single model technology;
[0069] 2. The positioning accuracy is improved several times, which can accurately lock the key areas of virus infection;
[0070] 3. The method is simple and reliable, suitable for promotion, and provides guarantee for precise prevention and control. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0072] Figure 1Flowchart of a method for large-scale identification of aphid-borne viruses. DETAILED DESCRIPTION
[0073] In order to make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0074] like Figure 1 As shown, the first embodiment of a method for large-scale identification of aphid-transmitted viruses provided by the first aspect of the present invention is shown. In this embodiment, the following steps are included:
[0075] S01, obtaining drone cruise images of a designated farmland area, and stitching them together to form a first image;
[0076] S02, pre-processing the first image, deleting the area not including the crop image, and splicing the first image after the deletion process into a second image;
[0077] S03, performing grayscale processing on the second image to obtain a third image;
[0078] S04, using the pre-trained suspected aphid-borne virus distribution model to calculate the third image, to obtain an aphid-borne virus suspected distribution matrix, each element of the aphid-borne virus suspected distribution matrix contains two parameters, namely, a coordinate and a corresponding aphid-borne virus suspected degree;
[0079] S05. Clustering the virus suspicion degree of each element in the suspected distribution matrix to obtain multiple typical suspicion degrees;
[0080] S06, selecting a region picture corresponding to a suspicion degree closest to the plurality of typical suspicion degrees on the third image, and recording the region picture set;
[0081] S07, obtaining a high-definition image of each area picture, and using a pre-trained aphid-borne virus recognition model to recognize the high-definition image of each area picture, to obtain the aphid-borne virus infection degree of each high-definition image;
[0082] S08, optimizing the suspected distribution matrix of aphid-borne viruses using the infection degree of aphid-borne viruses of each high-definition image to obtain the aphid-borne virus distribution matrix;
[0083] S09, according to the aphid-transmitted virus distribution matrix, select the area pictures corresponding to the matrix elements whose aphid-transmitted virus suspicion degree is greater than a preset minimum threshold, and record them as the precise collection area set;
[0084] S10, according to the precise collection area set, obtaining a high-definition image of each precise collection area, and using a pre-trained aphid-borne virus recognition model to recognize the high-definition image of each precise collection area, to obtain the aphid-borne virus infection degree of each precise collection area;
[0085] S11. Optimize the aphid-borne virus distribution matrix according to the obtained aphid-borne virus infection degree of each precise collection area to obtain the aphid-borne virus target distribution matrix and output it.
[0086] The specific implementation of S01 is:
[0087] The first step is to determine the coordinate range of the target farmland area and calculate the longitude and latitude range corresponding to the area;
[0088] The second step is to design the flight route of the drone according to the area of the farmland so that the shooting range covers the entire farmland area. The route design follows the equidistance method, that is, the distance between the drone routes is kept at a certain distance, which is generally set to 60% of the width of the drone image shooting. The number of routes is calculated based on the farmland area and the image shooting range;
[0089] The third step is to assemble the camera equipment on the drone. Generally, a digital camera with a pixel of more than 10 million and anti-shake function should be selected. Different focal length lenses should be equipped according to the flight altitude to ensure clear ground images. The camera should be pointed downward to shoot vertically;
[0090] The fourth step is to write the flight control program of the drone, input the designed flight route, flight altitude, flight speed and other parameters, so that the drone can automatically fly according to the set route and turn on the camera to shoot;
[0091] Step 5: During the automatic flight of the drone, the camera takes pictures at a certain time interval. The shooting time interval is set according to the flight speed to ensure that there is enough overlap between two adjacent pictures.
[0092] Step 6. After the flight, collect, name, and organize all the images taken.
[0093] Through the above steps, the drone aerial images of the specified farmland area are obtained to prepare for the next step of image stitching processing.
[0094] The specific implementation of S01 is:
[0095] The first step is to load all the original drone images acquired in S01;
[0096] The second step is to use the SIFT feature matching algorithm to calculate the feature matching points between adjacent images and find all matching image pairs;
[0097] The third step is to determine which images have overlapping areas based on the positional relationship of the matching feature points;
[0098] The fourth step is to select a pair of images with the largest overlapping area and use affine transformation to calculate the transformation matrix between the pair of images;
[0099] Step 5: Apply the transformation matrix to align the two images into the same coordinate space;
[0100] Step 6: Use polygon fusion algorithm in the overlapping area to smoothly transition and stitch the images;
[0101] In the seventh step, repeat the fourth step to the sixth step, and sequentially stitch other overlapping images to the stitched parts until all images are stitched together to generate the first image.
[0102] The specific implementation of S02 is:
[0103] The first step is to use semantic segmentation technology to identify all vegetation areas in the first image and obtain the coordinate range of the vegetation area;
[0104] The second step is to crop all non-vegetation areas from the first image according to the vegetation area coordinates, and complete the deletion process of the image area that does not contain the crop;
[0105] The third step is to stitch the image areas retained after the deletion process to generate a second image.
[0106] By using image feature matching and image stitching algorithms, a second image with non-crop areas removed is generated from the original image.
[0107] The specific implementation of S03 is:
[0108] The first step is to read the second image;
[0109] The second step is to traverse all the pixels of the second image and obtain the RGB three-channel value corresponding to each pixel;
[0110] The third step is to calculate the corresponding grayscale value using the R, G, and B values of each pixel according to the grayscale image calculation formula;
[0111] The fourth step is to replace the original pixel RGB value with the calculated grayscale value to construct a grayscale image;
[0112] The specific gray value calculation formula is as follows:
[0113] Gray=R*0.299+G*0.587+B*0.114;
[0114] Among them, R, G, and B represent the color values of the red, green, and blue channels of the pixel respectively; 0.299, 0.587, and 0.114 are the weights of the three channels.
[0115] Step 5: Repeat steps 2 to 4 until the grayscale values of all pixels of the second image are calculated to obtain a complete third image.
[0116] By performing grayscale processing on the second image according to the grayscale image conversion formula, it is beneficial to reduce the interference of color information on subsequent image processing algorithms and improve image quality and contrast.
[0117] The steps for establishing and training the distribution model of suspected aphid-borne viruses in S04 are:
[0118] 1. Build a training data set:
[0119] 1. Obtain a large number of healthy crop images and images of crops infected with aphid-borne viruses through field collection and web crawling;
[0120] 2. Manually label all images, identify the location of aphid-borne viruses, and classify each image into healthy / infected;
[0121] 3. Divide the data set into training set, validation set and test set. The training set is used for model training, the validation set is used for parameter adjustment, and the test set is used for final evaluation.
[0122] 2. Define the model structure:
[0123] 1. Use a convolutional neural network model, including convolutional layers, pooling layers, and fully connected layers;
[0124] 2. The first layer is a convolutional layer with a convolution kernel size of 5*5, a number of convolution kernels of 32, and an activation function of ReLu;
[0125] 3. The second layer is the pooling layer, the pooling kernel size is 2*2, and the maximum value is taken;
[0126] 4. The third layer is also a convolution layer, with a convolution kernel size of 3*3 and 64 kernels;
[0127] 5. The fourth layer is the pooling layer, the pooling kernel size is 2*2, and the maximum value is taken;
[0128] 6. The fifth to seventh layers are fully connected layers, with 128, 64, and 2 neurons respectively;
[0129] 7. The last layer is the softmax classification layer to obtain the probability of the two-classification result.
[0130] 3. Model training:
[0131] 1. Use stochastic gradient descent as the optimization algorithm;
[0132] 2. The batch size is set to 128 and the number of training rounds is set to 30;
[0133] 3. Using cross entropy as the loss function, a genetic algorithm is used to automatically adjust the parameters and select the learning rate;
[0134] 4. Save the model with the highest accuracy in the test set as the final suspected aphid-borne virus identification model.
[0135] The training process of the model constructs representative training samples, designs the convolutional neural network model structure, and after iterative training, obtains the final aphid-borne virus suspected area identification model to provide support for subsequent identification.
[0136] The specific implementation of S04 is:
[0137] The first step is to read the third image obtained by processing in step S03;
[0138] The second step is to set the size of the sliding window, the sliding step and the scanning path according to the size of the third image; the sliding window size is generally set to 1 / 10 to 1 / 5 of the original image size; the sliding step is set according to the window overlap rate, and the step is half of the window size when the overlap rate is 50%; the scanning path can use linear scanning, zigzag scanning, etc.;
[0139] The third step is to slide the window according to the set path and step size, and capture all window images in the third image in sequence;
[0140] The fourth step is to load the pre-trained aphid-transmitted virus suspected distribution model, perform model prediction on each captured window image, and obtain the probability value of the aphid-transmitted virus existence;
[0141] Step 5: Save the coordinates and predicted probability of each window image and build a window image dataset;
[0142] Step 6: traverse the window image data set and construct a matrix M, where the number of rows of M is equal to the height of the third image and the number of columns is equal to the width; each element in M records the probability of the presence of aphid-borne virus in the pixel window image;
[0143] In the seventh step, each element of the matrix M is traversed, and those with probability values greater than 0.2 are saved as suspected infected areas, and the suspected distribution matrix of aphid-borne viruses containing coordinates and corresponding suspected degrees is output.
[0144] Image blocks are captured through a sliding window and input into the pre-trained model to predict the probability of aphid-transmitted viruses, thereby outputting a matrix reflecting the distribution of suspected viruses in the entire image area, providing a basis for the subsequent determination of the precise virus-infected area.
[0145] The specific implementation of S05 is:
[0146] The first step is to read the suspected distribution matrix of aphid-borne viruses generated by S04;
[0147] The second step is to extract the aphid-transmitted virus suspicion data of all elements in the matrix;
[0148] The third step is to cluster all the suspected degree data using the mean shift algorithm and iteratively calculate the cluster centers of different categories;
[0149] Step 4: Set the number of cluster categories to 3, and iterate to obtain the cluster centers of the three categories as typical suspicions;
[0150] The fifth step is to calculate the distance between each suspicion and the three cluster centers, and determine it as belonging to the class according to the nearest center point;
[0151] Step 6: average all suspicion values in each category to obtain 3 means representing typical suspicion levels;
[0152] Step 7: Select the two higher means as typical suspicions and record the corresponding category labels.
[0153] Through the clustering algorithm, the typical high and medium suspicion levels of aphid-borne viruses are automatically determined, providing support for the subsequent extraction of diseased image areas based on the typical suspicion levels.
[0154] The specific implementation of S06 is:
[0155] In the first step, input the two typical suspicions and corresponding category labels obtained by S05;
[0156] The second step is to read the suspected distribution matrix of aphid-transmitted viruses generated by S04;
[0157] The third step is to traverse each element of the matrix to obtain the element coordinates and the suspected degree value of aphid-transmitted virus;
[0158] The fourth step is to calculate the difference between the suspicion value and two typical suspicion values;
[0159] The fifth step is to select the element with the smallest difference, that is, the element closest to the typical suspicion degree;
[0160] Step 6: According to the coordinates of the selected element, a corresponding window image block is intercepted in the original third image as a disease sample image;
[0161] Step 7: Repeat steps 3 to 6, traverse all matrix elements, and obtain all window image sets closest to the typical suspicion degree;
[0162] Step 8: Merge all window images to build a regional image set.
[0163] By selecting the sub-blocks closest to the typical suspicion degree, image areas that may be infected with aphid-borne viruses to a typical degree are extracted to provide samples for subsequent identification and construction of the virus distribution matrix.
[0164] The steps for establishing and training the aphid-borne virus recognition model are as follows:
[0165] 1. Construct training set:
[0166] 1. Collect a large number of high-definition images of healthy crops, mildly infected crops, moderately infected crops, and severely infected crops through field collection and web crawling;
[0167] 2. Plant protection experts manually divide the virus-infected areas and mark the infection levels as sample labels;
[0168] 3. Divide the training set, validation set and test set into a ratio of 8:1:1.
[0169] 2. Define the model structure:
[0170] 1. Use a convolutional neural network model based on ResNet;
[0171] 2. The front part contains the ResNet50 pre-trained model, freezing the weights of the first 50 layers;
[0172] 3. Add global average pooling layer, Dropout layer, etc. in the middle;
[0173] 4. The end is 4 fully connected layers with 1024, 512, 128, and 4 neurons;
[0174] 5. The final output layer is the Softmax classification layer.
[0175] 3. Model training:
[0176] 1. The Adam optimization algorithm is used, the initial learning rate is 0.001, and the learning rate decay rate is set to 0.9;
[0177] 2. The loss function uses cross entropy loss;
[0178] 3. The number of training rounds is set to 100 and the batch size is 32;
[0179] 4. Save the model with the smallest loss on the validation set as the final model.
[0180] By constructing training data with rich annotations, using the classic convolutional neural network model, and adjusting key hyperparameters, an accurate aphid-borne virus identification model is obtained to provide support for subsequent identification.
[0181] The specific implementation of S07 is:
[0182] The first step is to read all sample images in the regional picture set;
[0183] In the second step, each sample image is traversed, and the actual ground pixel size of the sample area is calculated and recorded using the digital elevation model captured by the drone;
[0184] The third step is to determine the required sampling rate according to the pixel size, sample the sample image, and obtain a high-resolution image;
[0185] The fourth step is to crop the downsampled high-definition image into a fixed-size image, such as 224*224;
[0186] Step 5: Repeat steps 2 to 4 to process all sample images and obtain a high-definition image set.
[0187] By calculating the sampling rate based on the ground truth distance and improving the resolution of the original image, it is helpful to obtain high-definition sample images with rich details to provide support for subsequent recognition.
[0188] The specific implementation of S08 is:
[0189] The first step is to read the high-definition image set;
[0190] In the second step, each image is input into the aphid-borne virus recognition model to obtain the virus infection prediction results of the image, including the infection degree classification;
[0191] The third step is to record the file name and recognition results of each high-definition image;
[0192] Step 4: Build a dictionary, where the key is the original sample image name and the value is the recognition result;
[0193] Step 5: Read the suspected distribution matrix of aphid-borne viruses generated by S04;
[0194] Step 6: traverse each element of the matrix and obtain the corresponding sample image name;
[0195] Step 7: Look up the recognition result of the image according to the dictionary and update the infection degree of aphid-borne virus of the current matrix element;
[0196] In the eighth step, steps six and seven are repeated until the infection degree of all elements in the matrix is updated, and the optimized aphid-transmitted virus distribution matrix is obtained.
[0197] The suspected distribution matrix is updated through feedback from high-definition image recognition results, making it a matrix that reflects the actual virus distribution.
[0198] The specific implementation of S09 is:
[0199] The first step is to read in the aphid-transmitted virus distribution matrix optimized by S08;
[0200] The second step is to browse the aphid-borne virus infection value of each element of the matrix;
[0201] The third step is to set the infection screening threshold. After multiple tests and comprehensive considerations, it is recommended to set it to 0.7;
[0202] The fourth step is to traverse each element of the matrix and select the elements with infection degree greater than 0.7;
[0203] Step 5: Record the coordinates of the selected elements and construct a coordinate set;
[0204] Step 6: According to the coordinates of each element in the coordinate set, the corresponding area is intercepted in the original third image to obtain a sample area image with a high infection degree;
[0205] Step 7: Merge all the collected sample area images to construct an accurate collection area image set.
[0206] By setting the screening threshold, areas with higher virus infection rates are selected to construct a collection sample set, providing target areas for subsequent fine identification and determination.
[0207] The specific implementation of S10 is:
[0208] The first step is to read the precise acquisition area image set constructed by S09;
[0209] In the second step, each collected sample image is traversed and the actual ground distance of the sample area is calculated using the digital elevation model;
[0210] The third step is to convert the sampling rate according to the ground distance, downsample the collected sample images, and obtain high-resolution images;
[0211] Step 4: Load the pre-trained aphid-borne virus recognition model;
[0212] The fifth step is to input high-resolution sample images one by one to obtain the prediction results of aphid-borne virus infection, including the infection degree score;
[0213] Step 6: Record the file name and recognition result of each collected sample image;
[0214] Step 7: Build a dictionary, where the key is the name of the sample image and the value is the recognition result;
[0215] Step 8, reading the aphid-transmitted virus distribution matrix generated by S08;
[0216] Step 9: traverse each element of the matrix to obtain the corresponding sample image name;
[0217] Step 10, search the collected sample identification results according to the constructed dictionary and update the aphid-borne virus infection degree of the current matrix element;
[0218] In the eleventh step, steps nine and ten are repeated until the infection degree of all elements in the matrix is updated, and an optimized target distribution matrix is generated.
[0219] Through the recognition feedback of high-resolution sample images, the virus infection distribution matrix is further optimized to more accurately reflect the actual virus infection distribution on crops.
[0220] The specific implementation of S11 is:
[0221] The first step is to read the target distribution matrix of aphid-borne viruses optimized by S10;
[0222] The second step is to count the infection degree of aphid-borne viruses of all elements in the matrix and obtain the infection degree frequency distribution histogram;
[0223] The third step is to analyze the frequency distribution histogram to determine the maximum and minimum values of the infection degree score;
[0224] The fourth step is to calculate the mean μ and standard deviation σ of the matrix infection degree;
[0225] The fifth step is to use μ plus 2σ as the threshold and extract all matrix elements whose infection degree exceeds this threshold;
[0226] Step 6: Record the coordinates of all extracted elements and construct the coordinate set of the infected target area;
[0227] The seventh step is to load the original first image, extract the corresponding infected target area according to the coordinate set, and obtain the final confirmed aphid-borne virus key observation and control area.
[0228] The eighth step is to output the target distribution matrix of aphid-borne viruses and the coordinates of the determined control areas to provide a basis for subsequent precise control.
[0229] By statistically analyzing the virus infection matrix, the screening conditions are automatically set to extract severely infected areas, accurately locate the disease, and guide subsequent prevention and control work.
[0230] A second aspect of the present invention provides a computer-readable storage medium, wherein program instructions are stored in the computer-readable storage medium, and when the program instructions are executed, they are used to execute the above-mentioned large-scale identification method of aphid-borne viruses.
[0231] A third aspect of the present invention provides a large-scale identification system for aphid-transmitted viruses, which includes the above-mentioned computer-readable storage medium.
[0232] Specifically, the principle of the present invention is:
[0233] 1. Use drones to obtain high-definition images of the entire farmland to ensure that all disease information is included;
[0234] 2. The first model analyzes the overall image to obtain local suspected infected areas where diseases may exist;
[0235] 3. Improve the resolution of images of suspected infected areas to provide high-quality samples for the second model to judge;
[0236] 4. The second model realizes accurate virus identification and disease grade determination;
[0237] 5. Statistically analyze the distribution of diseases, automatically set screening conditions, and extract the coordinates of serious disease points;
[0238] 6. The two models are cascaded for analysis, with clear division of labor and mutual support to ensure the accuracy of recognition and positioning;
[0239] 7. Complex image processing problems are divided into multiple steps to solve, and the technical principles are scientific and reliable.
[0240] In summary, the present invention aims at the problem of insufficient clarity in large-scale image acquisition, and adopts a dual-model cascade technical solution, which can effectively solve the technical difficulties of aphid-borne virus identification and positioning, achieve the effect of precise prevention and control, and is a reliable disease identification and positioning method.
Claims
1. A method for large-scale identification of aphid-transmitted viruses, characterized in that: The following steps are involved: S01, obtaining drone cruise images of a designated farmland area, and stitching them together to form a first image; S02, pre-processing the first image, deleting the area not including the crop image, and splicing the first image after the deletion into a second image; S03, performing grayscale processing on the second image to obtain a third image; S04, using a pre-trained suspected aphid-borne virus distribution model to calculate the third image to obtain an aphid-borne virus suspected distribution matrix, wherein each element of the aphid-borne virus suspected distribution matrix includes two parameters, namely, a coordinate and a corresponding aphid-borne virus suspected degree; S05, clustering the virus suspicion degree of each element in the suspected distribution matrix to obtain multiple typical suspicion degrees; S06, selecting a region picture corresponding to a suspicion degree closest to the plurality of typical suspicion degrees on the third image, and recording the region picture set; S07, obtaining a high-definition image of each area picture, and using a pre-trained aphid-borne virus recognition model to recognize the high-definition image of each area picture, to obtain the aphid-borne virus infection degree of each high-definition image; S08, optimizing the suspected distribution matrix of the aphid-borne virus using the infection degree of the aphid-borne virus of each high-definition image to obtain the aphid-borne virus distribution matrix; S09, according to the aphid-borne virus distribution matrix, selecting the area pictures corresponding to the matrix elements whose aphid-borne virus suspicion degree is greater than a preset minimum threshold, and recording them as the precise collection area set; S10, according to the set of precise collection areas, obtaining a high-definition image of each precise collection area, and using a pre-trained aphid-borne virus recognition model to recognize the high-definition image of each precise collection area, to obtain the aphid-borne virus infection degree of each precise collection area; S11, optimizing the aphid-borne virus distribution matrix according to the obtained aphid-borne virus infection degree of each precise collection area, obtaining an aphid-borne virus target distribution matrix, and outputting it; The specific implementation of step S04 includes: reading the third image; According to the size of the third image, setting sliding window parameters, including sliding window size, sliding step size, and scanning path; Slidingly intercepting all window images in the third image, loading a suspected distribution model of aphid-borne virus, predicting window images according to the suspected distribution model of aphid-borne virus, and constructing a window image data set; Traverse and construct the suspected distribution matrix of aphid-borne viruses and store the predicted probabilities; The specific implementation of step S06 includes: Input the typical suspicion degree and the corresponding category label, and read the suspected distribution matrix of the aphid-borne virus; Traversing each element of the aphid-transmitted virus suspected distribution matrix to obtain element coordinates and aphid-transmitted virus suspected degree; Calculate the difference between the obtained aphid-borne virus suspicion degree and the typical suspicion degree, select the closest element, and intercept the window picture of the third image to construct a regional picture set; The training steps of the suspected aphid-borne virus distribution model include: Build a dataset containing images of healthy and infected crops; Manually mark the locations of aphid-borne viruses and divide them into training sets, validation sets, and test sets; Use convolutional neural network, set network layer parameters, use stochastic gradient descent method to optimize, set the number of training rounds and batch size parameters, and save the model with the highest accuracy in the validation set; The training steps of the aphid-borne virus recognition model include: Construct a dataset of images with different degrees of infection; Label the infection degree of crops in each image in the image dataset and divide the dataset according to the infection degree; Use a convolutional neural network based on ResNet, freeze some weights, and set the parameters of the fully connected layer; The Adam optimization algorithm was used to set the loss function parameters, and the model with the smallest loss on the validation set was saved as the aphid-borne virus recognition model.
2. A method for large-scale identification of aphid-transmitted viruses according to claim 1, characterized in that: The specific implementation of step S02 includes: Using semantic segmentation technology to identify the vegetation area of the first image and obtain the coordinates of the vegetation area; According to the coordinates of the vegetation area, all non-vegetation areas are cropped from the first image to complete the deletion process of the area not containing the crop image; The image regions retained after the deletion process are stitched together to generate a second image.
3. A method for large-scale identification of aphid-transmitted viruses according to claim 2, characterized in that: The specific implementation of step S09 includes: Read the aphid-borne virus distribution matrix; Browse the aphid-borne virus infection degree of each element of the aphid-borne virus distribution matrix; Set the infection screening threshold and select elements above the threshold; Record the coordinates corresponding to the elements above the threshold and construct a coordinate set; Extract the images of the area corresponding to the coordinate set and construct an image set of the precise acquisition area.
4. A method for large-scale identification of aphid-transmitted viruses according to claim 3, characterized in that: The specific implementation of step S10 includes: Read the high-definition image of each area corresponding to the accurate acquisition area image set; Calculate the distance of the sample area from the ground; Downsample the collected sample images to obtain high-resolution images, and input them into the recognition model; Record the prediction results of aphid-borne virus infection, build a dictionary, read the aphid-borne virus distribution matrix, and update the aphid-borne virus infection degree of each precise collection area.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program instructions, and when the program instructions are executed, the method for large-scale identification of aphid-transmitted viruses according to any one of claims 1 to 4 is used to execute.
6. A large-scale identification system for aphid-borne viruses, comprising the computer-readable storage medium of claim 5.
