Cotton field pest detection system based on super-resolution reconstruction
By introducing improved super-resolution reconstruction modules and feature fusion technology into the object detection model, the shortcomings of existing models in identifying small pests are solved, and the detection accuracy and robustness are achieved. It is suitable for deep learning model training and application of cotton field pests.
Patent Information
- Application Number
- CN202311461799.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-03
- Publication Date
- 2025-05-06
AI Technical Summary
Existing target detection models are difficult to accurately and quickly identify and detect extremely small or small pests, especially in outdoor cotton fields, where environmental factors lead to a decrease in the pollution and detection ability of insect-touching boards.
Using a pest detection system based on super-resolution reconstruction, the improved super-resolution reconstruction module and object detection algorithm are combined with the YOLOv7 object detection model, and the original upsampling module is replaced to improve the recovery effect of the feature map, and the accuracy and robustness of the model are improved through feature fusion.
It significantly improves the detection performance of small targets, enhances the accuracy and robustness of the model, and can be more effectively applied to actual cotton field pest detection.
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of computer vision and target detection, and in particular to a cotton field pest detection system based on super-resolution reconstruction. Background Art
[0002] With the development of deep learning in recent years, innovations have continued to increase compared to traditional target detection algorithms. Similarly, it is also widely used in agricultural development. Although deep learning has made great progress in the application of agricultural weed and disease detection, existing target detection models are difficult to accurately and quickly identify and detect extremely small or small pests. Due to the complex scenes of outdoor cotton fields, which are often affected by the weather, the degree of impact of cotton fields on pests is determined by the density of pests collected by the insect detection board. Therefore, the insect detection board will cause the board to distort, absorb dust, attach watermarks and stick impurities due to environmental problems, which will cause the detection ability of the existing target detection model to drop sharply, thus affecting the actual application of agriculture.
[0003] This method is inseparable from the collection and production of data sets. In order to achieve practical application, yellow insect traps must be used to collect cotton pests during the pest infestation period in cotton fields, and then photographed outdoors by shooting equipment. Subsequently, a large number of manual labor is required to accurately annotate the data set, but this process is not only time-consuming, but also quite difficult. After the data set is produced, the improved target detection model is trained to improve the detection accuracy of the detection model.
[0004] In the field of agricultural pest detection, some people do pest specimen testing, and some do pest testing on greenhouse insect boards, but these are experiments under indoor environmental conditions, and there are very few studies on insect board pests in real outdoor fields and weather.
[0005] There are two types of target detection algorithms: one-step target detection and two-step target detection. The representative algorithms are one-step YOLO and two-step FasterR-CNN. Nowadays, the development of one-step detection not only has a faster detection speed, but also has a higher detection accuracy. It is a good choice in practical applications.
[0006] In terms of pest detection in agriculture, the methods include: adding an attention mechanism, increasing a small target detection layer, and placing a super-resolution reconstruction module at the front end.
[0007] The attention-based framework suffers from attention drift, which means that the attention model cannot accurately associate each feature vector with the corresponding region in the input image.
[0008] Adding a small target detection layer model will increase the probability of losing feature information due to a larger downsampling multiple, making network learning more difficult.
[0009] Placing a super-resolution reconstruction module at the front end doubles the resolution of the input image and provides richer feature information, but it increases the training parameters. Summary of the invention
[0010] Based on the existing pest detection technology, the present invention provides a pest detection system based on super-resolution reconstruction. The system includes the following steps:
[0011] Establish a data set. The data set is collected from real cotton fields. When cotton thrips are rampant in cotton fields, yellow insect traps are placed in different areas to collect pests. These traps are photographed and replaced outdoors at regular intervals.
[0012] Create a data set and use Labelme to annotate the data set. Since the selected model is YOLOv7, the training strategy is to split the annotated data set into 640×640 pixels, and finally allocate the training set and validation set in a ratio of 8:2;
[0013] The super-resolution reconstruction module is improved. The SRGAN generator network is used as the basic network. The output of the first activation function PReLu of the network is fused with the features of the following five residual blocks. The feature fusion method is used to make the enlarged features have a better display effect.
[0014] Construct a pest detection network model. This pest detection model is improved on the basis of the super-resolution reconstruction module. The improved super-resolution reconstruction module is used to replace the second upsampling module in the YOLOv7 target detection model to improve the feature map recovery effect.
[0015] Feature fusion method: After adding the super-resolution reconstruction module, the feature map effect of the YOLOv7 target detection model at small targets is significantly improved. On this basis, the P3 layer features are fused by element-wise addition of the super-resolved feature maps. The fused features are fused by channel splicing with the super-resolved features and the P3 layer features, thereby improving the accuracy and robustness of the overall model.
[0016] Compared with the prior art, the technical solution provided by the present invention is innovative in that: 1. The present invention uses the improved super-resolution reconstruction module and target detection algorithm to create a data set that can be used for agricultural pest deep learning model training, and this data set has been fully annotated so that the trained model can be better applied to actual pest detection; 2. The present invention improves the SRGAN super-resolution reconstruction module, and the improved super-resolution reconstruction module has a better pixel magnification effect; 3. The present invention optimizes the network module of the YOLOv7 target detection algorithm and replaces the original upsampling module with an improved super-resolution reconstruction module, thereby effectively improving the recovery effect of the feature map; 4. The present invention optimizes the network connection of the YOLOv7 target detection algorithm, performs feature fusion by element-wise addition of the P3 layer features and the super-resolved feature map, and performs feature fusion by channel splicing of the fused features with the super-resolved features and the P3 layer features, thereby improving the accuracy and robustness of the overall model; 5. The present invention applies the trained model to the insect pest data of cotton field insect sticking board to prove the effectiveness of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 Schematic diagram of the process of the cotton field pest target detection system in the embodiment;
[0018] Figure 2 This is a schematic diagram of the data collected from the yellow insect trap;
[0019] Figure 3 Schematic diagram of segmentation training strategy;
[0020] Figure 4 Schematic diagram of the training data set;
[0021] Figure 5 It is the improved super-resolution reconstruction module;
[0022] Figure 6 A schematic diagram of a cotton field pest detection system model based on super-resolution reconstruction;
[0023] Figure 7 The effect diagram of the target detection model before and after improvement. DETAILED DESCRIPTION
[0024] In order to make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention are described in detail below in conjunction with specific examples.
[0025] See also Figure 1 , a cotton field pest detection system based on super-resolution reconstruction, the method comprises the following steps:
[0026] Since there are very few data sets related to yellow insect sticking boards in real outdoor cotton field scenes, the primary task of the present invention is to establish a yellow insect sticking board data set for cotton fields that can be effectively trained. The training set mainly includes the cotton thrips pest. The data set is collected by placing yellow insect sticking boards on site during the rampant period of cotton thrips pests in cotton fields and photographing and replacing them regularly.
[0027] The process of making the dataset used in the experiment is to label the dataset collected on site, select Labelme as the labeling tool, and then segment it according to the pixel size of 640×640. The segmented data are randomly allocated into training set and validation set in a ratio of 8:2.
[0028] From the dataset annotation information, we can know that the dataset contains some extremely small and small pests with pixels within 10×10 and 32×32. The common target detection model does not perform well in detecting these extremely small targets.
[0029] In order to improve the detection effect of extremely small and small targets, this paper will adopt the idea of combining super-resolution reconstruction method with target detection. More specifically, super-resolution reconstruction is applied to feature map recovery to improve the feature map recovery effect.
[0030] The super-resolution reconstruction module is improved. Based on the original SRGAN super-resolution generator model, the output after the first PReLu is fused with the following five residual blocks respectively. The fusion method adopts the element addition method to improve the performance of the super-resolution reconstruction network and optimize the effect after super-resolution reconstruction.
[0031] A pest target detection model was constructed. The model was based on an improved algorithm based on super-resolution reconstruction. The upsampling module in the original model was replaced with the improved SRGAN super-resolution generator to improve the restoration effect of the feature map and the detection performance of small targets.
[0032] The target detection model is optimized after combining with the super-resolution reconstruction module. The details are optimized by adding the P3 layer features with the super-resolution feature map element by element to fuse the features. The fused features are then fused with the super-resolution features and the P3 layer features by ConCat to improve the accuracy and robustness of the overall model.
[0033] See also Figure 7 The detection effect of the yellow insect trapping board in the real outdoor cotton field scene of the present invention is compared with the detection effect example of the improved model.
[0034] Unless otherwise specified, the models of the components in the embodiments of the present invention are not limited, and any device that can perform the above functions may be used.
[0035] Those skilled in the art will appreciate that the accompanying drawing is only a schematic diagram of a preferred embodiment, and the serial numbers of the embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0036] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A cotton field pest detection system based on super-resolution reconstruction, characterized in that it includes the following steps: Establish a yellow insect trap dataset in actual cotton fields. The training set mainly includes cotton thrips pests. The steps of establishing the dataset are to use yellow insect traps to fix in the cotton fields during the pest infestation period and collect data regularly. Then, the collected data are labeled using the Labelme annotation tool. During training, each data is segmented into 640×640 pixels. After segmentation, the training set and the validation set are allocated in a ratio of 8:
2. Construct a cotton field pest detection model, which is a super-resolution reconstruction module combined with the YOLOv7 target detection algorithm. The improved super-resolution reconstruction module is used to replace the ordinary upsampling in the YOLOv7 model and improve channel fusion to solve the problem of decreased detection performance for extremely small or small targets in real scenes. The super-resolution reconstruction method is introduced, and the super-resolution reconstruction module is added to the feature fusion improvement. The improved super-resolution reconstruction module replaces the upsampling module in the target detection model to achieve a better feature map recovery effect. Similarly, the feature fusion improvement of the YOLOv7 target detection model with the super-resolution reconstruction module is performed, and the features of different levels are fused with the features of the super-resolution reconstruction module to improve the accuracy and robustness of the model. The real cotton field insect trap data was manually collected and labeled, and the trained model was used to perform real-time detection of the real yellow insect trap data in the cotton field.
2. The cotton field pest detection system based on super-resolution reconstruction according to claim 1, characterized in that: The established dataset was collected and photographed manually in cotton fields where insect pests were rampant. After the dataset was labeled using the Labelme annotation tool, each piece of data was segmented according to 640×640 pixels. The segmented data was allocated to the training set and the validation set in a ratio of 8:2, while ensuring the authenticity of the dataset and the practical applicability of the model.
3. The cotton field pest detection system based on super-resolution reconstruction as shown in claim 2, characterized in that: The cotton field pest detection model constructed is based on the YOLOv7 target detection model, replacing the second upsampling module in the target detection model with a super-resolution reconstruction module. Enhance feature recovery effect.
4. The cotton field pest detection system based on super-resolution reconstruction as claimed in claim 3, characterized in that: The improved super-resolution reconstruction module is based on the SRGAN network, and the features of the first layer PReLU are fused with the features of each layer of residual blocks; Similarly, in the YOLOv7 model, the P3 layer features are fused with the super-resolved feature map by element-wise addition, and the fused features are fused with the super-resolved features and the P3 layer features by channel-wise concatenation.