Fine granularity identification method for field rice planthoppers based on improved Yolov6
Through the combination of the improved Yolov6 model and Resnet50, the accuracy of fine-grain recognition of rice planthoppers in the field is solved, efficient automatic identification and counting is achieved, and the scientificity and production efficiency of agricultural management are improved.
Patent Information
- Application Number
- CN202410956621.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-11-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, the fine-grained identification of rice planthoppers in the field, especially the accurate identification of young nymphs, third-instar nymphs, older nymphs and male and female insect states is difficult, and the lack of grassroots plant protection personnel leads to difficulties in early warning and scientific prevention and control.
Using the improved Yolov6 model combined with Resnet50, the ECA module was introduced through pre-processing, blocking processing and multi-category balanced Mosaic enhancement methods to build a first detection and then classification process to achieve fine-grained identification of rice planthoppers.
It significantly improves the recognition accuracy and accuracy of rice planthoppers, realizes automated identification and counting, reduces labor costs and operational complexity, and improves the scientificity and production efficiency of agricultural management.
Smart Images

Figure CN118968544A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of rice planthopper investigation and detection, and specifically relates to a fine-grained recognition method for rice planthoppers in the field based on improved Yolov6. Background Art
[0002] The "Rice Planthopper Monitoring and Survey Specification GB / T 15794-2009" issued by the National Agricultural Technology Extension Center specifies in detail the survey method, survey time and location, survey items and data reporting format. It stipulates: Use white discs as carriers, gently insert the discs into the rice rows when checking insects, with the lower edge close to the base of the rice bush on the water surface, and quickly tap the middle and lower parts of the plants for 3 consecutive taps, counting each point once; count the number of adults of different wing types of various planthoppers, as well as the number of old and young nymphs.
[0003] This survey method requires two people to work together, one person goes to the field to slap the insects, identify and count them, and the other person stands by the field to record the data. This method has certain limitations. When different planthoppers are mixed, investigators need to accurately identify the planthopper species and distinguish between high- and low-age nymphs after recognizing a certain species. This requires extremely high professional skills. When the insect population density is high, investigators often use zoning to give an estimate in order to prevent planthoppers from escaping, which has poor accuracy. In addition, there is currently a shortage of grassroots plant protection personnel, and the field survey task is heavy. The manual identification and counting method can no longer meet the needs of modern agriculture.
[0004] The current rice planthopper identification method based on deep learning can identify and count various insect stages and numbers of rice planthoppers according to national standards. However, it is difficult to distinguish between young nymphs (1-2), 3rd instar nymphs, older nymphs, and male and female insect stages of rice planthoppers at a fine granularity, and the accuracy rate is low. This makes early warning and scientific prevention and control of rice planthoppers face some difficulties. Summary of the invention
[0005] The purpose of the present invention is to provide a fine-grained identification method for rice planthoppers in the field based on improved Yolov6, aiming to solve the following two defects in the prior art:
[0006] First, the manual identification of young nymphs (1-2), 3rd instar nymphs, older nymphs, and male and female stages of rice planthoppers at fine-grained levels requires extremely high professional skills. There is currently a shortage of grassroots plant protection personnel and the field investigation tasks are heavy, which makes it difficult to meet the needs of modern agriculture.
[0007] Second, the current deep learning method can accurately identify brown planthoppers, white-backed planthoppers and gray planthoppers among rice planthoppers, but it is difficult to identify low-instar nymphs (1-2), 3rd-instar nymphs, high-instar nymphs, and male and female insect stages under one category.
[0008] In order to solve the above technical problems, the following technical solutions are adopted:
[0009] A fine-grained identification method for rice planthoppers in the field based on improved Yolov6, characterized by comprising the following steps:
[0010] S1, preprocessed rice planthopper white disk image dataset;
[0011] S2, extract the insect images in the image dataset;
[0012] S3, preprocessing rice planthopper white disk images by blocks;
[0013] S4, train the sub-images by improved Yolov6, and train the insect images by Resnet50;
[0014] S5. Use the trained improved Yolov6 and Resnet50 to construct a detection-then-classification process for fine-grained recognition of rice planthoppers.
[0015] After optimization, the step S1 comprises:
[0016] S11, data cleaning, eliminating invalid white disk images;
[0017] S12. Divide the images into an original image training set and an original image test set.
[0018] After optimization, the step S2 comprises:
[0019] S21, extracting insect images from the original data set obtained in S12 respectively;
[0020] S22, corresponding the deducted images to a bug training set and a bug test set;
[0021] After optimization, the step S3 comprises:
[0022] S31, dividing the large image into blocks of 6×8 and overlapping 130 pixels, and dividing them into a block training set and a block test set;
[0023] S32, using operations such as flipping, mirroring, and rotation in image enhancement to paste the insect images obtained in S22 into the corresponding block training set and block test set respectively.
[0024] After optimization, the step S4 comprises:
[0025] S41. Improve the Mosaic enhancement method of Yolov6 to a multi-category balanced Mosaic enhancement method. The specific rules are as follows: randomly select the ground truth with the least frequency of categories in the improved multi-category balanced Mosaic, calculate the Euclidean distance from the four vertices of the image respectively, and rearrange the order of the images;
[0026] S42, introduce 4-layer ECA module in Pafpn of Neck structure in Yolov6;
[0027] S43, using the improved Yolov6 training block training set and testing the block test set to obtain a detection model;
[0028] S44. Use Resnet50 to train the 1-2 instar nymphs, 3rd instar nymphs, older nymphs, and male and female nymphs of brown planthoppers, white-backed planthoppers, and gray planthoppers respectively. The test is the small insect test set, and 6 classification models are obtained.
[0029] After optimization, the step S5 comprises:
[0030] S51. First, use the improved block Yolov6 model to perform sliding window target detection on the white disk image to obtain the target frame and target category;
[0031] S52. When the target is brown planthopper, white-backed planthopper, gray planthopper, etc. that need to be further classified, the insect body image of the area will be deducted according to the target frame, and Resnet50 will be used to further predict the insect stage categories of 1-2 instar nymphs, 3rd instar nymphs, older nymphs, and male and female nymphs.
[0032] The above technical solution has the following beneficial effects:
[0033] The present invention improves the recognition accuracy and precision, and effectively improves the recognition ability of fine-grained features of rice planthoppers by combining the improved Yolov6 model with the Resnet50 detection-before-classification method. This method can not only accurately detect the presence of various types of rice planthoppers, but also distinguish between young nymphs (1-2 years old), 3rd-instar nymphs, older nymphs, and male and female insect states, significantly improving the accuracy of traditional methods in these segmentation issues.
[0034] Optimize the rice planthopper survey process. Compared with the traditional manual identification and counting method, this technical solution realizes automated rice planthopper identification and counting, greatly reducing labor costs and operational complexity. Field surveys no longer rely on highly professional skills, but achieve more accurate and efficient results through image processing and deep learning algorithms.
[0035] The scalability and practicality of the system, a preprocessing method based on the white disk image dataset, as well as block processing and data enhancement technology are proposed, making the recognition model more adaptable and operable in practical applications. In addition, the introduction of multi-category balanced mosaic enhancement and ECA module and other technologies further improves the ability to capture the subtle features of rice planthoppers and the classification accuracy.
[0036] Scientific prevention and control and early warning capabilities, by accurately identifying rice planthoppers at different developmental stages and male and female insect stages, this technical solution helps agricultural managers take targeted prevention and control measures in a timely manner, effectively prevent and reduce the damage of rice planthoppers to rice fields, thereby improving the efficiency and quality of agricultural production. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The present invention will be further described below in conjunction with the accompanying drawings:
[0038] Figure 1 It is a schematic diagram of the flow chart of the identification method of the present invention. DETAILED DESCRIPTION
[0039] according to Figure 1 As shown, in combination with specific embodiments, the technical solution of the present invention is described in detail:
[0040] A fine-grained identification method of rice planthoppers in the field based on improved Yolov6 comprises the following steps:
[0041] S1. Preprocessing rice planthopper white disk image dataset, which includes:
[0042] S11, data cleaning, eliminating invalid white disk images;
[0043] S12. Divide the images into an original image training set and an original image test set.
[0044] S2, extracting insect images from the image dataset, which includes:
[0045] S21, extracting insect images from the original data set obtained in S12 respectively;
[0046] S22, corresponding the deducted images to a bug training set and a bug test set;
[0047] S3, pre-processing the rice planthopper white disk image by blocks, which includes:
[0048] S31, dividing the large image into blocks of 6×8 and overlapping 130 pixels, and dividing them into a block training set and a block test set;
[0049] S32, using operations such as flipping, mirroring, and rotation in image enhancement to paste the insect images obtained in S22 into the corresponding block training set and block test set respectively.
[0050] S4, train the sub-images by improved Yolov6, and train the insect images by Resnet50, which includes:
[0051] S41. Improve the Mosaic enhancement method of Yolov6 to a multi-category balanced Mosaic enhancement method. The specific rules are: randomly select the ground truth with the least frequency of categories in the improved multi-category balanced Mosaic, calculate the Euclidean distance from the four vertices of the image respectively, and rearrange the order of the images. For example, the image closest to the upper left vertex is placed in the lower right corner of the merged image. Specifically, the image closest to the upper right vertex is placed in the lower left corner of the merged image, so that some minority categories are easier to learn.
[0052] S42. Introduce a 4-layer ECA module into Pafpn in the Neck structure of Yolov6 to enhance feature fusion and processing effects, thereby improving the accuracy of small target detection.
[0053] S43. Use the improved Yolov6 training block training set and the test block test set to obtain a detection model.
[0054] S44. Use Resnet50 to train the low-instar nymphs (1-2), 3rd-instar nymphs, older nymphs, and male and female insect stages of brown planthoppers, white-backed planthoppers, and gray planthoppers, respectively. The test is a small insect test set, and 6 classification models are obtained.
[0055] S5. Use the trained improved Yolov6 and Resnet50 to build a detection-then-classification process for fine-grained recognition of rice planthoppers, which includes:
[0056] S51. First, use the improved block Yolov6 model to perform sliding window target detection on the white disk image to obtain the target frame and target category;
[0057] S52. When the target is brown planthopper, white-backed planthopper, gray planthopper, etc. that need to be further classified, the insect body image of the area will be deducted according to the target frame, and Resnet50 will be used to further predict the insect stage categories such as 1-2 instar nymphs, 3rd instar nymphs, older nymphs, and male and female.
[0058] The above are only specific embodiments of the present invention, but the technical features of the present invention are not limited thereto. Any simple changes, equivalent replacements or modifications made based on the present invention to solve basically the same technical problems and achieve basically the same technical effects are all included in the protection scope of the present invention.
Claims
1. A fine-grained identification method for rice planthoppers in the field based on improved Yolov6, characterized in that The steps include: S1, preprocessed rice planthopper white disk image dataset; S2, extract the insect images in the image dataset; S3, preprocessing rice planthopper white disk images by blocks; S4, train the sub-images by improved Yolov6, and train the insect images by Resnet50; S5. Use the trained improved Yolov6 and Resnet50 to construct a detection-then-classification process for fine-grained recognition of rice planthoppers.
2. The method for fine-grained identification of rice planthoppers in the field based on improved Yolov6 according to claim 1, characterized in that: The step S1 comprises: S11, data cleaning, eliminating invalid white disk images; S12. Divide the images into an original image training set and an original image test set.
3. The method for fine-grained identification of rice planthoppers in the field based on improved Yolov6 according to claim 2, characterized in that: The step S2 comprises: S21, extracting insect images from the original data set obtained in S12 respectively; S22, the extracted images are mapped into a bug training set and a bug test set.
4. The method for fine-grained identification of rice planthoppers in the field based on improved Yolov6 according to claim 3, characterized in that: The step S3 comprises: S31, dividing the large image into blocks of 6×8 and overlapping 130 pixels, and dividing them into a block training set and a block test set; S32, using operations such as flipping, mirroring, and rotation in image enhancement to paste the insect images obtained in S22 into the corresponding block training set and block test set respectively.
5. The method for fine-grained identification of rice planthoppers in the field based on improved Yolov6 according to claim 4, characterized in that: The step S4 comprises: S41. Improve the Mosaic enhancement method of Yolov6 to a multi-category balanced Mosaic enhancement method. The specific rules are as follows: randomly select the groundtruth with the least frequency of categories in the improved multi-category balanced Mosaic, calculate the Euclidean distance from the four vertices of the image respectively, and rearrange the order of the images; S42, introduce 4-layer ECA module in Pafpn of Neck structure in Yolov6; S43, using the improved Yolov6 training block training set and testing the block test set to obtain a detection model; S44. Use Resnet50 to train the 1-2 instar nymphs, 3rd instar nymphs, older nymphs, and male and female nymphs of brown planthoppers, white-backed planthoppers, and gray planthoppers respectively. The test is the small insect test set, and 6 classification models are obtained.
6. The method for fine-grained identification of rice planthoppers in the field based on improved Yolov6 according to claim 5, characterized in that: The step S5 comprises: S51. First, use the improved block Yolov6 model to perform sliding window target detection on the white disk image to obtain the target frame and target category; S52. When the target is brown planthopper, white-backed planthopper, gray planthopper, etc. that need to be further classified, the insect body image of the area will be deducted according to the target frame, and Resnet50 will be used to further predict the insect stage categories of 1-2 instar nymphs, 3rd instar nymphs, older nymphs, and male and female nymphs.
Citation Information
Patent Citations
Hierarchical structure-based two-stage forestry pest identification and detection system and method
CN113449806A
Rice planthopper and leafhopper subdivision method, system and device based on deep learning
CN116310539A
Substation pressing plate state identification method based on improved YOLOX
CN116912650A
