A real-time detection system for agricultural pests based on a hybrid distillation framework
By adopting a hybrid distillation framework in the agricultural pest detection system, combining feature distillation and relational distillation technology, the problem of insufficient detection accuracy and robustness of the YOLOv8 algorithm under complex conditions is solved, and higher detection accuracy and stronger algorithm robustness are achieved.
Patent Information
- Application Number
- CN202411733351.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-11-29
AI Technical Summary
The YOLOv8 algorithm in the prior art is not highly accurate in agricultural pest detection under complex backgrounds and changing lighting conditions, and the algorithm is not robust enough to meet the high-precision detection requirements in strict scenarios.
A real-time detection system for agricultural pests based on a hybrid distillation framework is adopted. By introducing the YOLOv8 model as a student and teacher model, feature distillation and relational distillation are performed, feature channel alignment loss and relational distillation loss are calculated, mixed distillation loss is formed, and the weight parameters of the student model are dynamically adjusted to improve detection accuracy.
It significantly improves the real-time detection accuracy and algorithm robustness of agricultural pest detection, ensures that student models can better understand and save the inherent structure of data, and improve generalization ability and detection accuracy.
Smart Images

Figure CN119206520B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of agricultural pest detection, and in particular to a real-time agricultural pest detection system based on a hybrid distillation framework. Background Art
[0002] Agricultural pest detection has achieved remarkable progress through the integration of deep learning techniques. In traditional deep learning methods, agricultural pest detection relies on manual feature extraction followed by classical machine learning classifiers to classify the features. Feature-based methods utilize techniques such as SIFT and SURF, followed by classifiers such as SVM to detect pests and diseases. Traditional deep learning agricultural pest detection methods, while effective to some extent, show limitations in handling complex backgrounds and changing lighting conditions.
[0003] In order to more accurately identify agricultural pests under complex backgrounds and changing lighting conditions, it is necessary to rely on two-stage deep learning detection methods and single-stage deep learning detection methods. The RCNN series, including R-CNN, FasterR-CNN and MaskR-CNN, all belong to two-stage deep learning detection methods, which generate region proposals to locate potential objects and then classify them. FasterR-CNN and its region proposal network have significantly improved efficiency, making it suitable for real-time pest and disease detection.
[0004] Single-stage detection methods, such as the YOLO algorithm, have also been applied to pest detection. The YOLOv3 algorithm further improves on the basis of YOLO, using multi-scale prediction and a deeper residual network structure to further enhance performance. The YOLOv5 algorithm focuses on industry applications and can provide a lighter and faster implementation. The YOLOv8 algorithm introduces an anchor free target detection algorithm, improves the network architecture, and enhances data processing capabilities, significantly improving the speed of object detection.
[0005] However, the pest detection accuracy of the YOLOv8 algorithm in the existing technology is still not high enough, and the algorithm robustness is not strong enough, which makes it unable to meet the needs of high-precision agricultural pest detection in harsh scenarios. Summary of the invention
[0006] In view of the shortcomings of the prior art, the object of the present invention is to provide a real-time detection system for agricultural pests based on a hybrid distillation framework, so as to improve the accuracy and algorithm robustness of agricultural pest detection.
[0007] To achieve the above object, the present invention provides the following technical solution: a real-time detection system for agricultural pests based on a hybrid distillation framework, comprising:
[0008] The introduction module is used to introduce the YOLOv8 model as the student model and teacher model of feature distillation;
[0009] A feature extraction module, connected to the introduction module, for extracting a student feature map from the student feature encoder of the student model, and extracting a teacher feature map from the teacher feature encoder of the teacher model;
[0010] A first processing module, connected to the feature extraction module, is used to input the student feature map and the teacher feature map into a preset channel alignment loss calculation formula, calculate the feature channel alignment loss as the feature distillation loss, and guide the student model to align the corresponding multiple feature channels with the teacher model at the adaptive layer according to the feature channel alignment loss;
[0011] A first calculation module, connected to the first processing module, is used to calculate the cosine similarity between each of the feature channels in a layer of the student model and the teacher model to obtain an adjacency matrix;
[0012] A second calculation module, connected to the first calculation module, is used to calculate the degree of alignment of the geometric relationship between each of the feature channels according to the adjacency matrix of the student model and the adjacency matrix of the teacher model, so as to serve as the relationship distillation loss;
[0013] a third calculation module, connected to the first calculation module and the second calculation module respectively, configured to calculate a mixed distillation loss according to the feature distillation loss and the relationship distillation loss, and calculate an overall loss according to the mixed distillation loss;
[0014] An adjustment module is connected to the third calculation module and is used to dynamically adjust the weight parameters of the student model according to the overall loss, wherein the input of the student model is a plurality of unlabeled agricultural pest images, and the output of the student model is a labeled pest labeled image.
[0015] Furthermore, the characteristic distillation calculation formula is configured as:
[0016] ,
[0017] in, Used to represent the feature channel alignment loss as the feature distillation loss, For representing the teacher characteristic graph, For representing the student characteristics graph, Used to indicate the total number of feature maps, Used to indicate the number of channels. Used to represent the feature map height, Used to indicate feature map width.
[0018] Furthermore, the calculation formula of the adjacency matrix is configured as:
[0019] ,
[0020] in, is used to represent the adjacency matrix, Used to indicate the Tier The eigenvector of the channel, Used to indicate the Tier The eigenvector of the channel, Used to indicate the Tier The Euclidean norm of the channel's eigenvector, Used to indicate the Tier Euclidean norm of the channel's eigenvector.
[0021] Furthermore, the calculation formula of the relationship distillation loss is configured as:
[0022] ,
[0023] in, The distillation loss is used to express the relationship, The adjacency matrix used to represent the teacher model, The adjacency matrix used to represent the student model.
[0024] Furthermore, the calculation formula of the mixed distillation loss is configured as:
[0025] ,
[0026] in, Used to represent the mixed distillation loss.
[0027] Furthermore, the calculation formula of the overall loss is configured as:
[0028] ,
[0029] in, Used to represent the overall loss, Used to represent pre-configured loss hyperparameters.
[0030] Furthermore, it also includes a performance evaluation module, which is connected to the adjustment module and is used to calculate the average accuracy of the student model in the adjustment process based on the COCO dataset to evaluate the performance of the student model.
[0031] Furthermore, the calculation formula of the average accuracy is configured as:
[0032] ,
[0033] in, Used to indicate the first The average precision of objects, It is used to represent the average precision when the IoU threshold is t. Used to indicate the total number of objects.
[0034] Furthermore, it also includes a detection module, which is connected to the third calculation module and is used to detect the light intensity, vegetation color, soil color and field debris color in the farmland in real time, and input the light intensity, vegetation color, soil color, field debris color and loss hyperparameters into a preset hyperparameter optimization formula to calculate the optimized loss hyperparameters, and then update the calculation formula of the overall loss according to the optimized loss hyperparameters.
[0035] Furthermore, the hyperparameter optimization formula is configured as:
[0036] ,
[0037] in, Used to indicate pest color correction values, Used to indicate initial pest color, Used to represent the vermin texture correction value, Used to represent the initial pest texture, Used to represent the light intensity, Used to represent the color of the vegetation. Used to indicate the soil color, Used to indicate the color of the field debris, Used to indicate standard light intensity. Used to represent standard vegetation colors. Used to indicate standard soil color, Used to indicate standard field debris colors, , , , They are used to represent the preset illumination conversion coefficient, vegetation conversion coefficient, soil conversion coefficient and debris conversion coefficient respectively. Used to represent the optimized loss hyperparameters, , They are used to represent color interference values and texture interference values respectively.
[0038] Beneficial effects of the present invention:
[0039] The present invention first extracts the student feature map and the teacher feature map, and then uses feature distillation to align the feature channels of the teacher model and the student model, thereby ensuring good alignment between the student feature map and the teacher feature map. In addition, the present invention also uses relational distillation to maintain the relative relationship between feature channels, so that the student model can better understand and preserve the inherent structure of the data, further improving the generalization ability and detection accuracy of the student model;
[0040] Therefore, the present invention integrates feature distillation and relation distillation to form a hybrid distillation training student model, which significantly improves the real-time detection accuracy and algorithm robustness of agricultural pest detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 It is a structural schematic diagram of the real-time detection system for agricultural pests in the present invention;
[0042] Figure 2 It is a graph of changes in various parameters during the training process of the present invention;
[0043] Figure 3 It is the PR curve and F1 curve of the student model after training under the hybrid distillation framework of the present invention;
[0044] Figure 4 It is a comparison diagram of the YOLOv8n confusion matrix before and after the application of the hybrid distillation framework in the present invention;
[0045] Figure 5 It is a sensitivity experiment curve diagram of the loss hyperparameter in the present invention.
[0046] Figure numerals: 1. introduction module; 2. feature extraction module; 3. first processing module; 4. first calculation module; 5. second calculation module; 6. third calculation module; 7. adjustment module; 8. performance evaluation module; 9. detection module. DETAILED DESCRIPTION
[0047] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. The same parts are represented by the same reference numerals. It should be noted that the words "front", "rear", "left", "right", "upper" and "lower" used in the following description refer to directions in the accompanying drawings, and the words "bottom surface" and "top surface", "inner" and "outer" refer to directions toward or away from the geometric center of a specific component, respectively.
[0048] Example 1, reference Figure 1 , which is the first embodiment of the present invention, provides a real-time agricultural pest detection system based on a hybrid distillation framework, which can improve the accuracy of agricultural pest detection and algorithm robustness, including:
[0049] Module 1 is introduced to introduce the YOLOv8 model as the student model and teacher model for feature distillation;
[0050] A feature extraction module 2, connected to the introduction module 1, is used to extract a student feature map from a c2f module of a student feature encoder of the student model, and to extract a teacher feature map from a c2f module of a teacher feature encoder of the teacher model;
[0051] The first processing module 3 is connected to the feature extraction module 2, and is used to input the student feature map and the teacher feature map into a preset channel alignment loss calculation formula, calculate the feature channel alignment loss as the feature distillation loss, and guide the student model to align the corresponding multiple feature channels with the teacher model in the adaptive layer according to the feature channel alignment loss;
[0052] A first calculation module 4, connected to the first processing module 3, is used to calculate the cosine similarity between each feature channel in a layer of the student model and the teacher model to obtain an adjacency matrix;
[0053] The second calculation module 5 is connected to the first calculation module 4 and is used to calculate the degree of alignment of the geometric relationship between each feature channel according to the adjacency matrix of the student model and the adjacency matrix of the teacher model, so as to serve as the relationship distillation loss;
[0054] A third calculation module 6, connected to the first calculation module 4 and the second calculation module 5, respectively, is used to calculate the mixed distillation loss according to the feature distillation loss and the relationship distillation loss, and calculate the overall loss according to the mixed distillation loss;
[0055] The adjustment module 7 is connected to the third calculation module 6 and is used to dynamically adjust the weight parameters of the student model according to the overall loss. The input of the student model is a plurality of unlabeled agricultural pest images, and the output of the student model is a labeled pest labeled image.
[0056] Working principle of embodiment 1:
[0057] This embodiment first extracts the student feature map and the teacher feature map, and then uses feature distillation to align the feature channels of the teacher model and the student model, thereby ensuring that the student feature map is well aligned with the teacher feature map. By learning the detailed and subtle information obtained by the teacher model from the input data, the intermediate reproduction ability of the student model is significantly enriched, resulting in a deeper and more comprehensive understanding of the data.
[0058] This embodiment also constructs a detailed relationship graph for the teacher model, mapping the dependencies and interactions between various functional channels. This relationship graph is then transferred to the student model through a relationship distillation loss function. The relationship distillation loss function is used to guide the update of the student model weights. In order to optimize the learning cycle of the student model and ensure that it can better understand and retain the inherent structure of the data, this embodiment uses the feature distillation method to guide the student model to focus on the rich semantic information in the intermediate features of the teacher model. This embodiment also combines relationship distillation to maintain the complexity of the structure and relationships between features, so that the student model can better understand and preserve the inherent structure of the data, further improving the generalization ability and detection accuracy of the student model;
[0059] Therefore, this embodiment integrates feature distillation and relationship distillation to form a hybrid distillation training student model, which significantly improves the real-time detection accuracy and algorithm robustness of agricultural pest detection.
[0060] In order to verify the detection accuracy of the adjusted student model for agricultural pests, this embodiment also conducted an experiment. This experiment is based on computer implementation, and the introduction module, feature extraction module, first processing module, first calculation module, second calculation module, third calculation module and adjustment module are all programs pre-configured on the computer. In this embodiment, an Ubuntu20.04 operating system running on an Intel (R) Xeon (R) processor with a clock speed of 2.10 GHz was used. The system is equipped with 80 CPU cores to ensure the processing power of the CPU. For GPU acceleration, we used 4 NVIDIARTX3090gpus, each with 24GB of VRAM to ensure the efficiency of image processing.
[0061] In the experiment of this embodiment, a set of specific parameters is used to ensure the validity and repeatability of the results. Table 1 is an experimental parameter configuration table, and the experimental parameter configuration is shown in Table 1:
[0062] Table 1
[0063]
[0064] In this embodiment, the number of training iterations is set to 200, the input image size is 640*640*3, and the batch size is 64. In order to enhance data diversity, mosaic enhancement is used in this embodiment. The number of workers is set to 8, and the random seed is set to 0. The initial learning rate (Lr0) and the final learning rate (Lrf) are both set to 0.01. The weight decay is 0.0005, the warm-up momentum is 0.8, and the momentum is 0.937. This embodiment also enables automatic mixed precision (AMP) to accelerate training, and uses the automatic optimizer (Optimizer:Auto) to select the best optimization strategy.
[0065] In the experiment of this embodiment, the lightweight YOLOv8n model is used as the student model, while the other four YOLOv8 models with larger parameters (YOLOv8s, YOLOv8m, YOLOv8I and YOLOv8x) are used as teacher models. This embodiment compares various state-of-the-art distillation methods (such as KD, FitNet, AT, RKD, FGD and MKD) with the hybrid distillation framework proposed in this embodiment in terms of average precision (AP):
[0066] Table 2 is a comparison table of the hybrid distillation framework proposed in this embodiment and other distillation methods in terms of AP. The comparison results of the hybrid distillation framework proposed in this embodiment and other distillation methods in terms of AP are shown in Table 2:
[0067] Table 2
[0068]
[0069] As shown in Table 2, the hybrid distillation framework (Ours) proposed in this example consistently outperforms other distillation methods in all teacher model configurations. For example, when using YOLOv8x as the teacher model, our method achieves an AP of 43.1, which is significantly higher than other distillation methods. In general, as shown in the AP data in Table 2, the hybrid distillation framework proposed in this example shows excellent effectiveness and advantages in improving the performance of the student model.
[0070] In this example, YOLOv8s is selected as the teacher model and YOLOv8n is selected as the student model to visualize the changes of various parameters during the training process, such as Figure 2 shown.
[0071] The PR curve and F1 curve of the student model after training under the hybrid distillation framework are as follows Figure 3 shown.
[0072] Comparison of the YOLOv8n confusion matrix before and after the hybrid distillation framework is applied Figure 4 As shown, Figure 4 On the left is the YOLOv8n confusion matrix before the hybrid distillation framework is applied. Figure 4 On the left is the confusion matrix plot of YOLOv8n after the hybrid distillation framework is applied.
[0073] In this embodiment, an ablation experiment is also performed on the hybrid distillation framework to evaluate the impact of feature distillation and relationship distillation on model performance. Table 3 is an ablation experiment table of the hybrid distillation framework. The ablation experiment results of the hybrid distillation framework are shown in Table 3:
[0074] Table 3
[0075]
[0076] The results show that when no component is used, the AP, AP5O, and AP75 of the model are 40.2, 63.1, and 35.0, respectively. When only feature distillation is used, the AP is improved to 40.5, and the AP50 and AP75 are 63.3 and 35.1, respectively. When only relation distillation is used, the AP is 40.4, and the AP50 and AP75 are 63.2 and 35.1, respectively. When feature distillation and relation distillation are used together, the model achieves the best performance, with the AP, AP5O, and AP75 improved to 41.5, 66.3, and 35.9, respectively. This shows that the hybrid distillation framework combines feature distillation and relation distillation to significantly improve the model performance.
[0077] Preferably, the characteristic distillation calculation formula is configured as:
[0078] ,
[0079] in, Used to represent the feature channel alignment loss as feature distillation loss, Used to represent the teacher feature map, Used to represent student characteristics graph, Used to indicate the total number of feature maps, Used to indicate the number of channels. Used to represent the feature map height, Used to indicate feature map width.
[0080] Specifically, in this embodiment, the layers, number of channels, width, and height of all features are summed and iterated to calculate the mean square error of corresponding elements in the teacher feature map and the student feature map as the feature channel alignment loss to ensure that the feature maps can be well aligned.
[0081] Preferably, the calculation formula of the adjacency matrix is configured as:
[0082] ,
[0083] in, is used to represent the adjacency matrix, Used to indicate the Tier The eigenvector of the channel, Used to indicate the Tier The eigenvector of the channel, Used to indicate the Tier The Euclidean norm of the channel's eigenvector, Used to indicate the Tier Euclidean norm of the channel's eigenvector.
[0084] Preferably, the calculation formula for the relationship distillation loss is configured as:
[0085] ,
[0086] in, Used to represent the relation distillation loss, The adjacency matrix used to represent the teacher model, Adjacency matrix used to represent the student model.
[0087] Preferably, the calculation formula for mixed distillation loss is configured as:
[0088] ,
[0089] in, Used to express mixed distillation losses.
[0090] Preferably, the calculation formula of the overall loss is configured as:
[0091] ,
[0092] in, Used to indicate overall loss, Used to represent pre-configured loss hyperparameters.
[0093] Specifically, in this embodiment, a sensitivity experiment on the loss hyperparameter is conducted to evaluate the loss hyperparameter that balances the distillation loss and the original loss. The impact on the performance of the model in the hybrid distillation framework. In this experiment, the teacher model is YOLOv8s and the student model is YOLOv8n. Figure 5 As shown, different The average precision (AP) under the value of When When it is between 0 and 1, AP is significantly improved. = 1. Further increase (e.g. =5) will slightly reduce AP, but still maintain a high level. This shows that choosing the right The performance of the hybrid distillation framework can be effectively enhanced.
[0094] Preferably, it also includes a performance evaluation module 8, connected to the adjustment module 7, for calculating the average accuracy of the student model in the adjustment process based on the COCO dataset to evaluate the performance of the student model.
[0095] Preferably, the calculation formula of average precision is configured as:
[0096] ,
[0097] in, Used to indicate the first The average precision of objects, It is used to represent the average precision when the IoU threshold is t. Used to indicate the total number of objects.
[0098] Specifically, in this embodiment, in the COCO evaluation index, mAP is equivalent to mAP50-95 and is unified under the AP index. The performance evaluation of YOLOv8 uses the mean average precision (mAP), which specifically includes mAP50 and mAP50-95. mAP50 measures the average precision when the IoU threshold is 0.50, while mAP50-95 calculates the average precision within the range of IoU thresholds from 0.50 to 0.95, with an increment of 0.05.
[0099] Embodiment 2 is the second embodiment of the present invention. Different from the previous embodiment, this embodiment provides a detection module, which can further enhance the performance of the hybrid distillation framework and improve the detection accuracy of the student model. It includes a detection module 9, connected to a third calculation module 6, for real-time detection of light intensity, vegetation color, soil color and field debris color in the farmland, and inputting the light intensity, vegetation color, soil color and field debris color and loss hyperparameters into a preset hyperparameter optimization formula, calculating the optimized loss hyperparameters, and then updating the overall loss calculation formula according to the optimized loss hyperparameters.
[0100] Preferably, the hyperparameter optimization formula is configured as:
[0101] ,
[0102] in, Used to indicate pest color correction values, Used to indicate initial pest color, Used to represent the vermin texture correction value, Used to represent the initial pest texture, Used to indicate light intensity. Used to represent vegetation color. Used to indicate soil color. Used to indicate the color of field debris. Used to indicate standard light intensity. Used to represent standard vegetation colors. Used to indicate standard soil color, Used to indicate standard field debris colors, , , , They are used to represent the preset illumination conversion coefficient, vegetation conversion coefficient, soil conversion coefficient and debris conversion coefficient respectively. Used to represent the optimized loss hyperparameters, , They are used to represent color interference values and texture interference values respectively.
[0103] Working principle of embodiment 2:
[0104] The detection module can be a light intensity detector and an image sensor, which is used to detect the light intensity and farmland pictures containing farmland vegetation, farmland soil and field debris in real time, and the vegetation color, soil color and field debris color in the farmland picture according to the preset color recognition algorithm. Uneven light intensity or too strong / weak light may cause some areas of the image to be too bright or too dark, thereby affecting the recognition of pest color and pest texture, and the color of vegetation may be similar to the color of pests, increasing the difficulty of identifying pest color and pest texture. Similarly, the color of farmland soil and field debris will also be similar to the color of pests, interfering with the recognition of pest color and pest texture. Once the recognition of pest color and pest texture is interfered with by the above factors, it will affect the detection accuracy of the student model for agricultural pests. In order to ensure the performance of the hybrid distillation framework, this embodiment introduces light intensity, vegetation color, soil color and field debris color into the correction process of pest color and pest texture using an algorithm, thereby adjusting the loss hyperparameters according to the pest color correction value and the pest texture correction value, effectively avoiding the influence of light intensity, vegetation color, soil color and field debris color on pest color and pest texture, further enhancing the performance of the hybrid distillation framework, and ensuring the detection accuracy of the student model for agricultural pests.
[0105] The above are only preferred embodiments of the present invention. The protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. A real-time agricultural pest detection system based on a hybrid distillation framework, characterized in that: include: Module (1) is introduced to introduce the YOLOv8 model as the student model and teacher model for feature distillation; A feature extraction module (2), connected to the introduction module (1), for extracting a student feature map from the student feature encoder of the student model, and extracting a teacher feature map from the teacher feature encoder of the teacher model; A first processing module (3), connected to the feature extraction module (2), is used to input the student feature map and the teacher feature map into a preset channel alignment loss calculation formula, calculate the feature channel alignment loss as the feature distillation loss, and guide the student model to align the corresponding multiple feature channels with the teacher model at the adaptive layer according to the feature channel alignment loss; A first calculation module (4), connected to the first processing module (3), is used to calculate the cosine similarity between each of the feature channels in a layer of the student model and the teacher model to obtain an adjacency matrix; A second calculation module (5), connected to the first calculation module (4), is used to calculate the degree of alignment of the geometric relationship between each of the feature channels according to the adjacency matrix of the student model and the adjacency matrix of the teacher model, so as to serve as the relationship distillation loss; a third calculation module (6), connected to the first calculation module (4) and the second calculation module (5), respectively, for calculating a mixed distillation loss according to the characteristic distillation loss and the relationship distillation loss, and calculating an overall loss according to the mixed distillation loss; an adjustment module (7), connected to the third calculation module (6), and used for dynamically adjusting the weight parameters of the student model according to the overall loss, wherein the input of the student model is a plurality of unlabeled agricultural pest images, and the output of the student model is a labeled pest labeled image; The characteristic distillation calculation formula is configured as: , in, Used to represent the feature channel alignment loss as the feature distillation loss, For representing the teacher characteristic graph, For representing the student characteristics graph, Used to indicate the total number of feature maps, Used to indicate the number of channels. Used to represent the feature map height, Used to indicate feature map width.
2. The real-time agricultural pest detection system based on the hybrid distillation framework according to claim 1 is characterized in that: The calculation formula of the adjacency matrix is configured as: , in, is used to represent the adjacency matrix, Used to indicate the Tier The eigenvector of the channel, Used to indicate the Tier The eigenvector of the channel, Used to indicate the Tier The Euclidean norm of the channel's eigenvector, Used to indicate the Tier Euclidean norm of the channel's eigenvector.
3. The real-time agricultural pest detection system based on the hybrid distillation framework according to claim 2 is characterized in that: The calculation formula of the relationship distillation loss is configured as: , in, The distillation loss is used to express the relationship, The adjacency matrix used to represent the teacher model, The adjacency matrix used to represent the student model.
4. The real-time agricultural pest detection system based on the hybrid distillation framework according to claim 3 is characterized in that: The calculation formula of the mixed distillation loss is configured as: , in, Used to represent the mixed distillation loss.
5. The real-time agricultural pest detection system based on the hybrid distillation framework according to claim 4 is characterized in that: The calculation formula of the overall loss is configured as: , in, Used to represent the overall loss, Used to represent pre-configured loss hyperparameters.
6. The real-time agricultural pest detection system based on the hybrid distillation framework according to claim 1, characterized in that: It also includes a performance evaluation module (8), which is connected to the adjustment module (7) and is used to calculate the average accuracy of the student model during the adjustment process based on the COCO data set to evaluate the performance of the student model.
7. The real-time agricultural pest detection system based on the hybrid distillation framework according to claim 6 is characterized in that: The calculation formula of the average accuracy is configured as: , in, It is used to represent the average precision when the IoU threshold is 0.
50. It is used to represent the average precision when the IoU threshold is t. Used to indicate the total number of objects.
8. The real-time agricultural pest detection system based on the hybrid distillation framework according to claim 5, characterized in that: The method further comprises a detection module (9) connected to the third calculation module (6) for detecting the light intensity, vegetation color, soil color and field debris color in the farmland in real time, and inputting the light intensity, vegetation color, soil color, field debris color and loss hyperparameter into a preset hyperparameter optimization formula to calculate the optimized loss hyperparameter, and then updating the overall loss calculation formula according to the optimized loss hyperparameter.
9. The real-time agricultural pest detection system based on the hybrid distillation framework according to claim 8, characterized in that: The hyperparameter optimization formula is configured as: , in, Used to indicate pest color correction values, Used to indicate initial pest color, Used to represent the vermin texture correction value, Used to represent the initial pest texture, Used to represent the light intensity, Used to represent the color of the vegetation. Used to indicate the soil color, Used to indicate the color of the field debris, Used to indicate standard light intensity. Used to represent standard vegetation colors. Used to indicate standard soil color, Used to indicate standard field debris colors, , , , They are used to represent the preset illumination conversion coefficient, vegetation conversion coefficient, soil conversion coefficient and debris conversion coefficient respectively. Used to represent the optimized loss hyperparameters, , They are used to represent color interference values and texture interference values respectively.
Citation Information
Patent Citations
Agricultural pest intelligent identification and positioning method and system
CN113744226A
Construction and training method of lightweight plant disease and insect pest target detection model
CN115131627A